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
8extern "C"
9{
10#endif
11
12#pragma once
13
14#include <golioth/client.h>
16#include <stdint.h>
17#include <zcbor_encode.h>
18
20{
22 int64_t latitude;
24 int64_t longitude;
25
27 int64_t accuracy;
28};
29
35{
37 zcbor_state_t zse[2 /* backup */ + 1 /* WiFi only */];
38 int flags;
39};
40
47
60
73enum 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
#define CONFIG_GOLIOTH_LOCATION_REQUEST_BUFFER_SIZE
Definition config.h:125
golioth_status
enum golioth_status golioth_location_finish(struct golioth_location_req *req)
void golioth_location_init(struct golioth_location_req *req)
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)
Wi-Fi location request, used with golioth_location_init(), golioth_location_finish() and golioth_loca...
Definition location.h:35
zcbor_state_t zse[2+1]
Definition location.h:37
uint8_t buf[CONFIG_GOLIOTH_LOCATION_REQUEST_BUFFER_SIZE]
Definition location.h:36