#include <golioth/client.h>
#include <golioth/golioth_status.h>
#include <stdint.h>
#include <zcbor_encode.h>
Go to the source code of this file.
◆ GOLIOTH_LOCATION_FLAG_WIFI
#define GOLIOTH_LOCATION_FLAG_WIFI (1 << 0) |
◆ golioth_location_finish()
Finish building location request
Needs to be called after filling data with golioth_location_*_append() APIs and before requesting location with golioth_location_get_sync().
- Parameters
-
- Return values
-
GOLIOTH_OK | Location request finished successfully |
GOLIOTH_ERR_NULL | No location information encoded within request |
GOLIOTH_ERR_MEM_ALLOC | Not enough memory in request buffer |
◆ golioth_location_get_sync()
Get location from cloud
- Parameters
-
client | The client handle from golioth_client_create |
req | Location request sent to Golioth cloud |
rsp | Location response received from Golioth cloud |
timeout_s | The timeout, in seconds, for receiving a server response |
- Return values
-
GOLIOTH_OK | response received from server, set was successful |
GOLIOTH_ERR_NULL | invalid client handle |
GOLIOTH_ERR_INVALID_STATE | client is not running, currently stopped |
GOLIOTH_ERR_QUEUE_FULL | request queue is full, this request is dropped |
GOLIOTH_ERR_TIMEOUT | response not received from server, timeout occurred |
◆ golioth_location_init()
Initialize location request
Needs to be called before filling data with golioth_location_*_append() APIs.
- Parameters
-