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
30#define GOLIOTH_LOCATION_FLAG_WIFI (1 << 0)
31
37{
39 zcbor_state_t zse[2 /* backup */ + 1 /* WiFi only */];
40 int flags;
41};
42
49
62
75enum golioth_status golioth_location_get_sync(struct golioth_client *client,
76 const struct golioth_location_req *req,
77 struct golioth_location_rsp *rsp,
78 int32_t timeout_s);
79
80#ifdef __cplusplus
81}
82#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:37
zcbor_state_t zse[2+1]
Definition location.h:39
uint8_t buf[CONFIG_GOLIOTH_LOCATION_REQUEST_BUFFER_SIZE]
Definition location.h:38