Golioth Firmware SDK
Loading...
Searching...
No Matches
location.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2024 Golioth, Inc.
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifdef __cplusplus
8
extern
"C"
9
{
10
#endif
11
12
#pragma once
13
14
#include <
golioth/client.h
>
15
#include <
golioth/golioth_status.h
>
16
#include <stdint.h>
17
#include <zcbor_encode.h>
18
19
struct
golioth_location_rsp
20
{
22
int64_t
latitude
;
24
int64_t
longitude
;
25
27
int64_t
accuracy
;
28
};
29
34
struct
golioth_location_req
35
{
36
uint8_t
buf
[
CONFIG_GOLIOTH_LOCATION_REQUEST_BUFFER_SIZE
];
37
zcbor_state_t
zse
[2
/* backup */
+ 1
/* WiFi only */
];
38
int
flags
;
39
};
40
46
void
golioth_location_init
(
struct
golioth_location_req
*req);
47
59
enum
golioth_status
golioth_location_finish
(
struct
golioth_location_req
*req);
60
73
enum
golioth_status
golioth_location_get_sync
(
struct
golioth_client *client,
74
const
struct
golioth_location_req
*req,
75
struct
golioth_location_rsp
*rsp,
76
int32_t timeout_s);
77
78
#ifdef __cplusplus
79
}
80
#endif
client.h
CONFIG_GOLIOTH_LOCATION_REQUEST_BUFFER_SIZE
#define CONFIG_GOLIOTH_LOCATION_REQUEST_BUFFER_SIZE
Definition
config.h:125
golioth_status.h
golioth_status
golioth_status
Definition
golioth_status.h:37
golioth_location_finish
enum golioth_status golioth_location_finish(struct golioth_location_req *req)
golioth_location_init
void golioth_location_init(struct golioth_location_req *req)
golioth_location_get_sync
enum golioth_status golioth_location_get_sync(struct golioth_client *client, const struct golioth_location_req *req, struct golioth_location_rsp *rsp, int32_t timeout_s)
golioth_location_req
Wi-Fi location request, used with golioth_location_init(), golioth_location_finish() and golioth_loca...
Definition
location.h:35
golioth_location_req::zse
zcbor_state_t zse[2+1]
Definition
location.h:37
golioth_location_req::flags
int flags
Definition
location.h:38
golioth_location_req::buf
uint8_t buf[CONFIG_GOLIOTH_LOCATION_REQUEST_BUFFER_SIZE]
Definition
location.h:36
golioth_location_rsp
Definition
location.h:20
golioth_location_rsp::latitude
int64_t latitude
Definition
location.h:22
golioth_location_rsp::accuracy
int64_t accuracy
Definition
location.h:27
golioth_location_rsp::longitude
int64_t longitude
Definition
location.h:24
include
golioth
location.h
Generated on Tue Feb 18 2025 13:22:35 for Golioth Firmware SDK by
1.10.0