Soletta™ Framework
Framework for making IoT devices

Full online documentation | C API Index
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
sol_oic_repr_field Struct Reference

Structure to keep a single oic-map's field. More...

#include <sol-oic.h>

Data Fields

union {
   bool   v_boolean
 Field's data if type is SOL_OIC_REPR_TYPE_BOOL. More...
 
   double   v_double
 Field's data if type is SOL_OIC_REPR_TYPE_DOUBLE. More...
 
   float   v_float
 Field's data if type is SOL_OIC_REPR_TYPE_FLOAT. More...
 
   int64_t   v_int
 Field's data if type is SOL_OIC_REPR_TYPE_INT. More...
 
   uint8_t   v_simple
 Field's data if type is SOL_OIC_REPR_TYPE_SIMPLE. More...
 
   struct sol_str_slice   v_slice
 Field's data if type is SOL_OIC_REPR_TYPE_TEXT_STRING or SOL_OIC_REPR_TYPE_BYTE_STRING. More...
 
   uint64_t   v_uint
 Field's data if type is SOL_OIC_REPR_TYPE_UINT. More...
 
   void *   v_voidptr
 Field's data if type is SOL_OIC_REPR_TYPE_HALF_FLOAT. More...
 
}; 
 Union used to access field's data in correct format specified by type. More...
 
const char * key
 Field's key as a string. More...
 
enum sol_oic_repr_type type
 type of the data of this field. More...
 

Detailed Description

Structure to keep a single oic-map's field.

Use this structure to read fields using a sol_oic_map_reader and macro SOL_OIC_MAP_LOOP() or to write fields using a sol_oic_map_writer and function sol_oic_map_append().

See Also
sol_oic_map_append()
SOL_OIC_MAP_LOOP()
Examples:
/src/samples/coap/iotivity-test-client.c, /src/samples/coap/oic-client.c, and /src/samples/coap/oic-server.c.

Field Documentation

union { ... }

Union used to access field's data in correct format specified by type.

const char* sol_oic_repr_field::key

Field's key as a string.

Examples:
/src/samples/coap/oic-client.c.

Referenced by fill_info(), got_get_response(), print_response(), and user_handle_put().

enum sol_oic_repr_type sol_oic_repr_field::type

type of the data of this field.

Examples:
/src/samples/coap/oic-client.c.

Referenced by fill_info(), got_get_response(), print_response(), and user_handle_put().

bool sol_oic_repr_field::v_boolean

Field's data if type is SOL_OIC_REPR_TYPE_BOOL.

Examples:
/src/samples/coap/oic-client.c.

Referenced by fill_info(), got_get_response(), print_response(), and user_handle_put().

double sol_oic_repr_field::v_double

Field's data if type is SOL_OIC_REPR_TYPE_DOUBLE.

Examples:
/src/samples/coap/oic-client.c.

Referenced by got_get_response(), and print_response().

float sol_oic_repr_field::v_float

Field's data if type is SOL_OIC_REPR_TYPE_FLOAT.

Examples:
/src/samples/coap/oic-client.c.

Referenced by got_get_response(), and print_response().

int64_t sol_oic_repr_field::v_int

Field's data if type is SOL_OIC_REPR_TYPE_INT.

Examples:
/src/samples/coap/oic-client.c.

Referenced by fill_info(), got_get_response(), and print_response().

uint8_t sol_oic_repr_field::v_simple

Field's data if type is SOL_OIC_REPR_TYPE_SIMPLE.

Examples:
/src/samples/coap/oic-client.c.

Referenced by fill_info(), got_get_response(), and print_response().

struct sol_str_slice sol_oic_repr_field::v_slice

Field's data if type is SOL_OIC_REPR_TYPE_TEXT_STRING or SOL_OIC_REPR_TYPE_BYTE_STRING.

Examples:
/src/samples/coap/oic-client.c.

Referenced by got_get_response(), and print_response().

uint64_t sol_oic_repr_field::v_uint

Field's data if type is SOL_OIC_REPR_TYPE_UINT.

Examples:
/src/samples/coap/oic-client.c.

Referenced by fill_info(), got_get_response(), and print_response().

void* sol_oic_repr_field::v_voidptr

Field's data if type is SOL_OIC_REPR_TYPE_HALF_FLOAT.

Examples:
/src/samples/coap/oic-client.c.

Referenced by got_get_response(), and print_response().


The documentation for this struct was generated from the following file: