|
#define | OC_MAX_IF_MASKS 14 |
|
#define | OC_NUM_CORE_RESOURCES_PER_DEVICE (1 + WELLKNOWNCORE) |
|
#define | oc_ri_add_timed_event_callback_seconds(cb_data, event_callback, seconds) |
| add timed event callback in seconds
More...
|
|
#define | oc_ri_create_const_resource_final(resource_name, ...) |
|
#define | oc_ri_create_const_resource_internal( next_resource, resource_name, device_index, name, uri, dpt, iface_mask, content_format, properties, get_cb, put_cb, post_cb, delete_cb, ctx, observe_period, instance, ...) |
|
#define | oc_ri_create_const_resource_linked(next_resource, ...) |
|
|
enum | oc_content_format_t {
TEXT_PLAIN = 0
, TEXT_XML = 1
, TEXT_CSV = 2
, TEXT_HTML = 3
,
IMAGE_GIF = 21
, IMAGE_JPEG = 22
, IMAGE_PNG = 23
, IMAGE_TIFF = 24
,
AUDIO_RAW = 25
, VIDEO_RAW = 26
, APPLICATION_LINK_FORMAT = 40
, APPLICATION_XML = 41
,
APPLICATION_OCTET_STREAM = 42
, APPLICATION_RDF_XML = 43
, APPLICATION_SOAP_XML = 44
, APPLICATION_ATOM_XML = 45
,
APPLICATION_XMPP_XML = 46
, APPLICATION_EXI = 47
, APPLICATION_FASTINFOSET = 48
, APPLICATION_SOAP_FASTINFOSET = 49
,
APPLICATION_JSON = 50
, APPLICATION_X_OBIX_BINARY = 51
, APPLICATION_CBOR = 60
, APPLICATION_SENML_JSON = 110
,
APPLICATION_SENSML_JSON = 111
, APPLICATION_SENML_CBOR = 112
, APPLICATION_SENSML_CBOR = 113
, APPLICATION_SENML_EXI = 114
,
APPLICATION_SENSML_EXI = 115
, APPLICATION_PKCS7_SGK
, APPLICATION_PKCS7_CO
, APPLICATION_PKCS7_CMC_REQUEST
,
APPLICATION_PKCS7_CMC_RESPONSE
, APPLICATION_PKCS8 = 284
, APPLICATION_CRATTRS = 285
, APPLICATION_PKCS10 = 286
,
APPLICATION_PKIX_CERT = 287
, APPLICATION_VND_OCF_CBOR = 10000
, APPLICATION_OSCORE = 10001
, APPLICATION_VND_OMA_LWM2M_TLV = 11542
,
APPLICATION_VND_OMA_LWM2M_JSON = 11543
, APPLICATION_VND_OMA_LWM2M_CBOR = 11544
, CONTENT_NONE = 99999
} |
| payload content formats More...
|
|
enum | oc_core_resource_t {
OC_DEV_SN = 0
, OC_DEV_HWV
, OC_DEV_FWV
, OC_DEV_HWT
,
OC_DEV_MODEL
, OC_DEV_HOSTNAME
, OC_DEV_IID
, OC_DEV_PM
,
OC_DEV_IPV6
, OC_DEV_SA
, OC_DEV_DA
, OC_DEV_FID
,
OC_DEV_PORT
, OC_DEV_MPORT
, OC_DEV_MID
, OC_DEV
,
OC_APP
, OC_APP_X
, OC_A_LSM
, OC_KNX_SPAKE
,
OC_KNX_IDEVID
, OC_KNX_LDEVID
, OC_KNX_K
, OC_KNX_FINGERPRINT
,
OC_KNX_IA
, OC_KNX_OSN
, OC_KNX
, OC_KNX_FP_G
,
OC_KNX_FP_G_X
, OC_KNX_FP_R
, OC_KNX_FP_R_X
, OC_KNX_P
,
OC_KNX_F
, OC_KNX_F_X
, OC_KNX_SWU_PROTOCOL
, OC_KNX_SWU_MAXDEFER
,
OC_KNX_SWU_METHOD
, OC_KNX_LASTUPDATE
, OC_KNX_SWU_RESULT
, OC_KNX_SWU_STATE
,
OC_KNX_SWU_UPDATE
, OC_KNX_SWU_PKGV
, OC_KNX_SWU_PKGCMD
, OC_KNX_SWU_PKGBYTES
,
OC_KNX_SWU_PKGQURL
, OC_KNX_SWU_PKGNAMES
, OC_KNX_SWU
, OC_KNX_SUB
,
OC_KNX_A_SEN
, OC_KNX_AUTH_O_REPLWDO
, OC_KNX_AUTH_O_OSNDELAY
, OC_KNX_AUTH_O
,
OC_KNX_AUTH_AT
, OC_KNX_AUTH_AT_X
, OC_KNX_AUTH
, WELLKNOWNCORE
} |
| core resource numbers More...
|
|
enum | oc_event_callback_retval_t { OC_EVENT_DONE = 0
, OC_EVENT_CONTINUE
} |
| callback return values More...
|
|
enum | oc_interface_mask_t {
OC_IF_NONE = 0
, OC_IF_I = (1 << 1)
, OC_IF_O = (1 << 2)
, OC_IF_G = (1 << 3)
,
OC_IF_C = (1 << 4)
, OC_IF_P = (1 << 5)
, OC_IF_D = (1 << 6)
, OC_IF_A = (1 << 7)
,
OC_IF_S = (1 << 8)
, OC_IF_LI = (1 << 9)
, OC_IF_B = (1 << 10)
, OC_IF_SEC = (1 << 11)
,
OC_IF_SWU = (1 << 12)
, OC_IF_PM = (1 << 13)
, OC_IF_M = (1 << 14)
} |
| interface masks security access scopes defined as interfaces note that scope = 1 is not used. More...
|
|
enum | oc_method_t {
OC_GET = 1
, OC_POST
, OC_PUT
, OC_DELETE
,
OC_FETCH
} |
| CoAP methods. More...
|
|
enum | oc_resource_properties_t {
OC_UNDISCOVERABLE = 0
, OC_DISCOVERABLE = (1 << 0)
, OC_OBSERVABLE = (1 << 1)
, OC_SECURE = (1 << 4)
,
OC_PERIODIC = (1 << 6)
, OC_SECURE_MCAST = (1 << 8)
} |
| resource properties (bit mask) More...
|
|
enum | oc_status_t {
OC_STATUS_OK = 0
, OC_STATUS_CREATED
, OC_STATUS_CHANGED
, OC_STATUS_DELETED
,
OC_STATUS_NOT_MODIFIED
, OC_STATUS_BAD_REQUEST
, OC_STATUS_UNAUTHORIZED
, OC_STATUS_BAD_OPTION
,
OC_STATUS_FORBIDDEN
, OC_STATUS_NOT_FOUND
, OC_STATUS_METHOD_NOT_ALLOWED
, OC_STATUS_NOT_ACCEPTABLE
,
OC_STATUS_REQUEST_ENTITY_TOO_LARGE
, OC_STATUS_UNSUPPORTED_MEDIA_TYPE
, OC_STATUS_INTERNAL_SERVER_ERROR
, OC_STATUS_NOT_IMPLEMENTED
,
OC_STATUS_BAD_GATEWAY
, OC_STATUS_SERVICE_UNAVAILABLE
, OC_STATUS_GATEWAY_TIMEOUT
, OC_STATUS_PROXYING_NOT_SUPPORTED
,
__NUM_OC_STATUS_CODES__
, OC_IGNORE
, OC_PING_TIMEOUT
} |
| CoAP status codes. More...
|
|
|
const char * | get_interface_string (oc_interface_mask_t mask) |
| Get the interface string object Note: should be called with a single interface as mask only. More...
|
|
const char * | get_method_name (oc_method_t method) |
| Get the method name object. More...
|
|
bool | oc_check_accept_header (oc_request_t *request, oc_content_format_t accept) |
| checks if the accept header is correct note that if the accept header is not there, this check is a pass More...
|
|
int | oc_get_interface_in_mask_in_string_array (oc_interface_mask_t iface_mask, int nr_entries, oc_string_array_t interface_array) |
| sets all interfaces in the mask in the string array More...
|
|
void | oc_print_interface (oc_interface_mask_t iface_mask) |
| prints all interfaces in the mask to stdout More...
|
|
bool | oc_ri_add_resource (oc_resource_t *resource) |
| add resource to the system More...
|
|
bool | oc_ri_add_resource_block (const oc_resource_t *resource) |
| add resource block to the system More...
|
|
void | oc_ri_add_timed_event_callback_ticks (void *cb_data, oc_trigger_t event_callback, oc_clock_time_t ticks) |
| add timed event callback More...
|
|
oc_resource_t * | oc_ri_alloc_resource (void) |
| allocate a resource structure More...
|
|
oc_resource_data_t * | oc_ri_alloc_resource_data (void) |
| allocate a resource structure More...
|
|
bool | oc_ri_delete_resource (const oc_resource_t *resource) |
| remove the resource from the list of application resources More...
|
|
bool | oc_ri_delete_resource_block (const oc_resource_t *resource) |
| remove the resource block from the list of application resources More...
|
|
void | oc_ri_free_resource_properties (oc_resource_t *resource) |
| free the properties of the resource More...
|
|
const oc_resource_t * | oc_ri_get_app_resource_by_uri (const char *uri, size_t uri_len, size_t device) |
| retrieve the resource by uri and device index More...
|
|
const oc_resource_t * | oc_ri_get_app_resources (void) |
| retrieve list of resources More...
|
|
oc_interface_mask_t | oc_ri_get_interface_mask (char *iface, size_t if_len) |
| retrieve the interface mask from the interface name More...
|
|
int | oc_ri_get_query_nth_key_value (const char *query, size_t query_len, char **key, size_t *key_len, char **value, size_t *value_len, size_t n) |
| retrieve the query value at the nth position More...
|
|
int | oc_ri_get_query_value (const char *query, size_t query_len, const char *key, char **value) |
| retrieve the value of the query parameter "key" More...
|
|
void | oc_ri_init (void) |
| initialize the resource implementation handler More...
|
|
bool | oc_ri_is_app_resource_valid (const oc_resource_t *resource) |
| checks if the resource is valid More...
|
|
bool | oc_ri_new_request_from_request (oc_request_t *new_request, oc_request_t *request, oc_response_buffer_t *response_buffer, oc_response_t *response_obj) |
| create a new request from the old request is used internally only for redirection of: More...
|
|
int | oc_ri_query_exists (const char *query, size_t query_len, const char *key) |
| checks if key exist in query More...
|
|
int | oc_ri_query_nth_key_exists (const char *query, size_t query_len, char **key, size_t *key_len, size_t n) |
| check if the nth key exists More...
|
|
void | oc_ri_remove_timed_event_callback (void *cb_data, oc_trigger_t event_callback) |
| remove the timed event callback More...
|
|
const oc_resource_t * | oc_ri_resource_next (const oc_resource_t *resource) |
| get the next resource More...
|
|
void | oc_ri_shutdown (void) |
| shut down the resource implementation handler More...
|
|
int | oc_status_code (oc_status_t key) |
| convert the (internal) status code to coap status as integer More...
|
|
int | oc_total_interface_in_mask (oc_interface_mask_t iface_mask) |
| total interfaces in the interface mask Note calculates the if.g.s.a only 1 More...
|
|
resource internals
Definition in file oc_ri.h.