ZotBins Core
Loading...
Searching...
No Matches
Serialize.hpp
1
#ifndef CLIENT_SERIALIZE_HPP
2
#define CLIENT_SERIALIZE_HPP
3
4
#include <cJSON.h>
5
#include <stdint.h>
6
7
namespace
Client
8
{
9
/*
10
* @brief Serialize data from sensors for API interaction.
11
*
12
* The current shape of the JSON object returned is the following:
13
* {
14
* "bin_id": 18838586676582,
15
* "fullness": 0.5,
16
* "usage": 44,
17
* "overflow": false,
18
* "weight": 50
19
* }
20
*
21
* @return cJSON* root of a JSON object containing sensor data. Make sure to free this after you are done using it.
22
*/
23
cJSON *serialize(
float
fullness, uint32_t usage,
bool
overflow, int32_t weight);
24
}
25
26
#endif
components
ClientComponent
include
Serialize.hpp
Generated by
1.13.2