uBlink
0.0.1
TheBlinkProtocol
|
Object model interface (under development)
Functions | |
blink_object_t | BLINK_Object_newGroup (const struct blink_allocator *alloc, blink_schema_t group) |
Create a new group model from a group definition. More... | |
bool | BLINK_Object_clear (blink_object_t group, const char *fieldName) |
Clear a field (i.e. More... | |
bool | BLINK_Object_fieldIsNull (blink_object_t group, const char *fieldName) |
Test if a field value is NULL. More... | |
bool | BLINK_Object_setEnum (blink_object_t group, const char *fieldName, const char *symbol) |
Write enum to field. More... | |
bool | BLINK_Object_setBool (blink_object_t group, const char *fieldName, bool value) |
Write boolean to field. More... | |
bool | BLINK_Object_setDecimal (blink_object_t group, const char *fieldName, int64_t mantissa, int8_t exponent) |
Write decimal to field. More... | |
bool | BLINK_Object_setUint (blink_object_t group, const char *fieldName, uint64_t value) |
Write an unsigned integer to field. More... | |
bool | BLINK_Object_setInt (blink_object_t group, const char *fieldName, int64_t value) |
Write a signed integer to field. More... | |
bool | BLINK_Object_setF64 (blink_object_t group, const char *fieldName, double value) |
Write f64 to field. More... | |
bool | BLINK_Object_setString (blink_object_t group, const char *fieldName, const char *str, uint32_t len) |
Write string to field. More... | |
bool | BLINK_Object_setString2 (blink_object_t group, const char *fieldName, const char *str) |
bool | BLINK_Object_setBinary (blink_object_t group, const char *fieldName, const uint8_t *data, uint32_t len) |
Write binary to field. More... | |
bool | BLINK_Object_setFixed (blink_object_t group, const char *fieldName, const uint8_t *data, uint32_t len) |
Write fixed to field. More... | |
bool | BLINK_Object_setGroup (blink_object_t group, const char *fieldName, blink_object_t value) |
Write group to field. More... | |
const char * | BLINK_Object_getEnum (blink_object_t group, const char *fieldName) |
Read enum from field. More... | |
bool | BLINK_Object_getBool (blink_object_t group, const char *fieldName) |
Read boolean from field. More... | |
struct blink_decimal | BLINK_Object_getDecimal (blink_object_t group, const char *fieldName) |
Read decimal from field. More... | |
uint64_t | BLINK_Object_getUint (blink_object_t group, const char *fieldName) |
Read Uint from field. More... | |
int64_t | BLINK_Object_getInt (blink_object_t group, const char *fieldName) |
Read Int from field. More... | |
double | BLINK_Object_getF64 (blink_object_t group, const char *fieldName) |
Read f64 from field. More... | |
struct blink_string | BLINK_Object_getString (blink_object_t group, const char *fieldName) |
Read string from field. More... | |
struct blink_string | BLINK_Object_getBinary (blink_object_t group, const char *fieldName) |
Read binary from field. More... | |
struct blink_string | BLINK_Object_getFixed (blink_object_t group, const char *fieldName) |
Read fixed from field. More... | |
blink_object_t | BLINK_Object_getGroup (blink_object_t group, const char *fieldName) |
Read group from field. More... | |
blink_schema_t | BLINK_Object_getFieldDefinition (blink_object_t group, const char *fieldName) |
Read field definition from field. More... | |
bool | BLINK_Object_encodeCompact (blink_object_t group, blink_stream_t out) |
blink_object_t | BLINK_Object_decodeCompact (blink_stream_t in, const struct blink_allocator *alloc) |
Typedefs | |
typedef struct blink_object * | blink_object_t |
typedef struct blink_stream * | blink_stream_t |
typedef struct blink_schema * | blink_schema_t |
bool BLINK_Object_clear | ( | blink_object_t | group, |
const char * | fieldName | ||
) |
Clear a field (i.e.
set to NULL)
[in] | group | |
[in] | fieldName | null terminated field name string |
bool BLINK_Object_fieldIsNull | ( | blink_object_t | group, |
const char * | fieldName | ||
) |
Test if a field value is NULL.
Test if field value is NULL.
[in] | group | |
[in] | fieldName | null terminated field name string |
struct blink_string BLINK_Object_getBinary | ( | blink_object_t | group, |
const char * | fieldName | ||
) |
Read binary from field.
[in] | group | |
[in] | fieldName | null terminated field name string |
bool BLINK_Object_getBool | ( | blink_object_t | group, |
const char * | fieldName | ||
) |
Read boolean from field.
[in] | group | |
[in] | fieldName | null terminated field name string |
struct blink_decimal BLINK_Object_getDecimal | ( | blink_object_t | group, |
const char * | fieldName | ||
) |
Read decimal from field.
[in] | group | |
[in] | fieldName | null terminated field name string |
const char* BLINK_Object_getEnum | ( | blink_object_t | group, |
const char * | fieldName | ||
) |
Read enum from field.
[in] | group | |
[in] | fieldName | null terminated field name string |
double BLINK_Object_getF64 | ( | blink_object_t | group, |
const char * | fieldName | ||
) |
Read f64 from field.
[in] | group | |
[in] | fieldName | null terminated field name string |
blink_schema_t BLINK_Object_getFieldDefinition | ( | blink_object_t | group, |
const char * | fieldName | ||
) |
Read field definition from field.
[in] | group | |
[in] | fieldName | null terminated field name string |
struct blink_string BLINK_Object_getFixed | ( | blink_object_t | group, |
const char * | fieldName | ||
) |
Read fixed from field.
[in] | group | |
[in] | fieldName | null terminated field name string |
blink_object_t BLINK_Object_getGroup | ( | blink_object_t | group, |
const char * | fieldName | ||
) |
Read group from field.
[in] | group | |
[in] | fieldName | null terminated field name string |
int64_t BLINK_Object_getInt | ( | blink_object_t | group, |
const char * | fieldName | ||
) |
Read Int from field.
[in] | group | |
[in] | fieldName | null terminated field name string |
struct blink_string BLINK_Object_getString | ( | blink_object_t | group, |
const char * | fieldName | ||
) |
Read string from field.
[in] | group | |
[in] | fieldName | null terminated field name string |
uint64_t BLINK_Object_getUint | ( | blink_object_t | group, |
const char * | fieldName | ||
) |
Read Uint from field.
[in] | group | |
[in] | fieldName | null terminated field name string |
blink_object_t BLINK_Object_newGroup | ( | const struct blink_allocator * | alloc, |
blink_schema_t | group | ||
) |
Create a new group model from a group definition.
[in] | allocator | |
[in] | group | group definition |
NULL | could not create group model |
bool BLINK_Object_setBinary | ( | blink_object_t | group, |
const char * | fieldName, | ||
const uint8_t * | data, | ||
uint32_t | len | ||
) |
Write binary to field.
[in] | group | |
[in] | fieldName | null terminated field name string |
[in] | data | |
[in] | len | byte length of data |
bool BLINK_Object_setBool | ( | blink_object_t | group, |
const char * | fieldName, | ||
bool | value | ||
) |
Write boolean to field.
[in] | group | |
[in] | fieldName | null terminated field name string |
[in] | value | boolean |
bool BLINK_Object_setDecimal | ( | blink_object_t | group, |
const char * | fieldName, | ||
int64_t | mantissa, | ||
int8_t | exponent | ||
) |
Write decimal to field.
[in] | group | |
[in] | fieldName | null terminated field name string |
[in] | mantissa | |
[in] | exponent |
bool BLINK_Object_setEnum | ( | blink_object_t | group, |
const char * | fieldName, | ||
const char * | symbol | ||
) |
Write enum to field.
[in] | group | |
[in] | fieldName | null terminated field name string |
[in] | symbol |
bool BLINK_Object_setF64 | ( | blink_object_t | group, |
const char * | fieldName, | ||
double | value | ||
) |
Write f64 to field.
[in] | group | |
[in] | fieldName | null terminated field name string |
[in] | value | f64 |
bool BLINK_Object_setFixed | ( | blink_object_t | group, |
const char * | fieldName, | ||
const uint8_t * | data, | ||
uint32_t | len | ||
) |
Write fixed to field.
[in] | group | |
[in] | fieldName | null terminated field name string |
[in] | data | |
[in] | value | byte length of data |
bool BLINK_Object_setGroup | ( | blink_object_t | group, |
const char * | fieldName, | ||
blink_object_t | value | ||
) |
Write group to field.
[in] | group | |
[in] | fieldName | null terminated field name string |
[in] | value | group |
bool BLINK_Object_setInt | ( | blink_object_t | group, |
const char * | fieldName, | ||
int64_t | value | ||
) |
Write a signed integer to field.
[in] | group | |
[in] | fieldName | null terminated field name string |
[in] | value |
bool BLINK_Object_setString | ( | blink_object_t | group, |
const char * | fieldName, | ||
const char * | str, | ||
uint32_t | len | ||
) |
Write string to field.
[in] | group | |
[in] | fieldName | null terminated field name string |
[in] | str | |
[in] | len | byte length of str |
bool BLINK_Object_setUint | ( | blink_object_t | group, |
const char * | fieldName, | ||
uint64_t | value | ||
) |
Write an unsigned integer to field.
[in] | group | |
[in] | fieldName | null terminated field name string |
[in] | value |