Golioth Firmware SDK
Loading...
Searching...
No Matches
payload_utils.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 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 <stdbool.h>
15#include <stdint.h>
16
17
21
28int32_t golioth_payload_as_int(const uint8_t *payload, size_t payload_size);
29
36float golioth_payload_as_float(const uint8_t *payload, size_t payload_size);
37
45bool golioth_payload_as_bool(const uint8_t *payload, size_t payload_size);
46
54bool golioth_payload_is_null(const uint8_t *payload, size_t payload_size);
55
57
58#ifdef __cplusplus
59}
60#endif
bool golioth_payload_is_null(const uint8_t *payload, size_t payload_size)
int32_t golioth_payload_as_int(const uint8_t *payload, size_t payload_size)
float golioth_payload_as_float(const uint8_t *payload, size_t payload_size)
bool golioth_payload_as_bool(const uint8_t *payload, size_t payload_size)