CTRE Phoenix 6 C++ 24.3.0
ConfigSerializer.h
Go to the documentation of this file.
1/*
2 * Copyright (C) Cross The Road Electronics.  All rights reserved.
3 * License information can be found in CTRE_LICENSE.txt
4 * For support and suggestions contact support@ctr-electronics.com or file
5 * an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases
6 */
7#pragma once
8
10#include <stddef.h>
11#include <stdint.h>
12
13#ifdef __cplusplus
14extern "C"
15{
16#endif
17 /* Note: This returns a malloc'd char array that caller needs to free */
18 CTREXPORT int c_ctre_phoenix6_serialize_double(int spn, double value, char **str);
19 CTREXPORT int c_ctre_phoenix6_serialize_double_no_malloc(int spn, double value, char *str, uint32_t max_len);
20 /* Note: This returns a malloc'd char array that caller needs to free */
21 CTREXPORT int c_ctre_phoenix6_serialize_int(int spn, int value, char **str);
22 CTREXPORT int c_ctre_phoenix6_serialize_int_no_malloc(int spn, int value, char *str, uint32_t max_len);
23 /* Note: This returns a malloc'd char array that caller needs to free */
24 CTREXPORT int c_ctre_phoenix6_serialize_bool(int spn, bool value, char **str);
25 CTREXPORT int c_ctre_phoenix6_serialize_bool_no_malloc(int spn, bool value, char *str, uint32_t max_len);
26 /* Note: This returns a malloc'd char array that caller needs to free */
27 CTREXPORT int c_ctre_phoenix6_serialize_pgn(int spn, uint16_t frame_index, uint16_t framePeriodMs, char **str);
28 CTREXPORT int c_ctre_phoenix6_serialize_pgn_no_malloc(int spn, uint16_t frame_index, uint16_t framePeriodMs, char *str, uint32_t max_len);
29
30 CTREXPORT int c_ctre_phoenix6_deserialize_double(int spn, const char *str, uint32_t strlen, double *val);
31 CTREXPORT int c_ctre_phoenix6_deserialize_int(int spn, const char *str, uint32_t strlen, int *val);
32 CTREXPORT int c_ctre_phoenix6_deserialize_bool(int spn, const char *str, uint32_t strlen, bool *val);
33 CTREXPORT int c_ctre_phoenix6_deserialize_pgn(int spn, const char *str, uint32_t strlen, uint16_t *frame_index, uint16_t *framePeriodMs);
34
36#ifdef __cplusplus
37}
38#endif
CTREXPORT int c_ctre_phoenix6_deserialize_double(int spn, const char *str, uint32_t strlen, double *val)
CTREXPORT int c_ctre_phoenix6_serialize_bool_no_malloc(int spn, bool value, char *str, uint32_t max_len)
CTREXPORT int c_ctre_phoenix6_serialize_int(int spn, int value, char **str)
CTREXPORT int c_ctre_phoenix6_serialize_int_no_malloc(int spn, int value, char *str, uint32_t max_len)
CTREXPORT int c_ctre_phoenix6_serialize_double_no_malloc(int spn, double value, char *str, uint32_t max_len)
CTREXPORT int c_ctre_phoenix6_serialize_pgn(int spn, uint16_t frame_index, uint16_t framePeriodMs, char **str)
CTREXPORT int c_ctre_phoenix6_deserialize_pgn(int spn, const char *str, uint32_t strlen, uint16_t *frame_index, uint16_t *framePeriodMs)
CTREXPORT int c_ctre_phoenix6_serialize_bool(int spn, bool value, char **str)
CTREXPORT int c_ctre_phoenix6_serialize_pgn_no_malloc(int spn, uint16_t frame_index, uint16_t framePeriodMs, char *str, uint32_t max_len)
CTREXPORT int c_ctre_phoenix6_deserialize_bool(int spn, const char *str, uint32_t strlen, bool *val)
CTREXPORT int c_ctre_phoenix6_deserialize_int(int spn, const char *str, uint32_t strlen, int *val)
CTREXPORT void c_ctre_phoenix6_free_memory(char **str)
CTREXPORT int c_ctre_phoenix6_serialize_double(int spn, double value, char **str)
#define CTREXPORT
Definition: export.h:14