10#ifndef ANJAY_INCLUDE_ANJAY_DM_H
11#define ANJAY_INCLUDE_ANJAY_DM_H
22#define ANJAY_DM_OID_SECURITY 0
23#define ANJAY_DM_OID_SERVER 1
24#define ANJAY_DM_OID_ACCESS_CONTROL 2
25#define ANJAY_DM_OID_DEVICE 3
26#define ANJAY_DM_OID_FIRMWARE_UPDATE 5
47#ifdef ANJAY_WITH_CON_ATTR
67#define ANJAY_ATTRIB_INTEGER_NONE (-1)
70#define ANJAY_ATTRIB_PERIOD_NONE ANJAY_ATTRIB_INTEGER_NONE
74#define ANJAY_ATTRIB_DOUBLE_NONE (NAN)
77#define ANJAY_ATTRIB_VALUE_NONE ANJAY_ATTRIB_DOUBLE_NONE
1025#ifdef ANJAY_WITH_OBSERVATION_STATUS
1030# ifndef ANJAY_MAX_OBSERVATION_SERVERS_REPORTED_NUMBER
1031# define ANJAY_MAX_OBSERVATION_SERVERS_REPORTED_NUMBER 0
1055# if (ANJAY_MAX_OBSERVATION_SERVERS_REPORTED_NUMBER > 0)
1059 uint16_t servers_number;
1177#ifdef ANJAY_WITH_SMS
1189#define ANJAY_ACCESS_MASK_READ (1U << 0)
1190#define ANJAY_ACCESS_MASK_WRITE (1U << 1)
1191#define ANJAY_ACCESS_MASK_EXECUTE (1U << 2)
1192#define ANJAY_ACCESS_MASK_DELETE (1U << 3)
1193#define ANJAY_ACCESS_MASK_CREATE (1U << 4)
1195#define ANJAY_ACCESS_MASK_FULL \
1196 (ANJAY_ACCESS_MASK_READ \
1197 | ANJAY_ACCESS_MASK_WRITE \
1198 | ANJAY_ACCESS_MASK_DELETE \
1199 | ANJAY_ACCESS_MASK_EXECUTE \
1200 | ANJAY_ACCESS_MASK_CREATE)
1202#define ANJAY_ACCESS_MASK_NONE 0
1203#define ANJAY_ACCESS_LIST_OWNER_BOOTSTRAP UINT16_MAX
uint16_t anjay_oid_t
Definition core.h:1182
uint16_t anjay_rid_t
Definition core.h:1188
uint16_t anjay_iid_t
Definition core.h:1185
struct anjay_struct anjay_t
Definition core.h:45
uint16_t anjay_ssid_t
Definition core.h:31
uint16_t anjay_riid_t
Definition core.h:1191
int anjay_notify_instances_changed(anjay_t *anjay, anjay_oid_t oid)
anjay_sms_security_mode_t
Definition dm.h:1182
@ ANJAY_SMS_SECURITY_NOSEC
Definition dm.h:1185
@ ANJAY_SMS_SECURITY_DTLS_PSK
Definition dm.h:1183
@ ANJAY_SMS_SECURITY_SECURE_PACKET
Definition dm.h:1184
int anjay_notify_changed(anjay_t *anjay, anjay_oid_t oid, anjay_iid_t iid, anjay_rid_t rid)
int anjay_dm_instance_remove_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_iid_t iid)
Definition dm.h:217
int anjay_register_object(anjay_t *anjay, const anjay_dm_object_def_t *const *def_ptr)
int anjay_dm_transaction_begin_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr)
Definition dm.h:647
int anjay_dm_object_write_default_attrs_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_ssid_t ssid, const anjay_dm_oi_attributes_t *attrs)
Definition dm.h:125
int anjay_dm_resource_write_attrs_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_iid_t iid, anjay_rid_t rid, anjay_ssid_t ssid, const anjay_dm_r_attributes_t *attrs)
Definition dm.h:555
anjay_resource_observation_status_t anjay_resource_observation_status(anjay_t *anjay, anjay_oid_t oid, anjay_iid_t iid, anjay_rid_t rid)
int anjay_dm_instance_read_default_attrs_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_iid_t iid, anjay_ssid_t ssid, anjay_dm_oi_attributes_t *out)
Definition dm.h:261
const anjay_dm_r_attributes_t ANJAY_DM_R_ATTRIBUTES_EMPTY
int anjay_dm_instance_create_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_iid_t iid)
Definition dm.h:240
int anjay_dm_resource_read_attrs_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_iid_t iid, anjay_rid_t rid, anjay_ssid_t ssid, anjay_dm_r_attributes_t *out)
Definition dm.h:529
int anjay_dm_resource_instance_write_attrs_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_iid_t iid, anjay_rid_t rid, anjay_riid_t riid, anjay_ssid_t ssid, const anjay_dm_r_attributes_t *attrs)
Definition dm.h:609
int anjay_dm_resource_reset_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_iid_t iid, anjay_rid_t rid)
Definition dm.h:462
int anjay_unregister_object(anjay_t *anjay, const anjay_dm_object_def_t *const *def_ptr)
int anjay_dm_transaction_validate_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr)
Definition dm.h:677
anjay_dm_con_attr_t
Definition dm.h:31
@ ANJAY_DM_CON_ATTR_NON
Definition dm.h:33
@ ANJAY_DM_CON_ATTR_NONE
Definition dm.h:32
@ ANJAY_DM_CON_ATTR_CON
Definition dm.h:34
#define ANJAY_MAX_OBSERVATION_SERVERS_REPORTED_NUMBER
Definition dm.h:1031
bool anjay_binding_mode_valid(const char *binding_mode)
int anjay_dm_resource_instance_read_attrs_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_iid_t iid, anjay_rid_t rid, anjay_riid_t riid, anjay_ssid_t ssid, anjay_dm_r_attributes_t *out)
Definition dm.h:581
uint16_t anjay_access_mask_t
Definition dm.h:1205
int anjay_dm_object_read_default_attrs_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_ssid_t ssid, anjay_dm_oi_attributes_t *out)
Definition dm.h:103
int anjay_dm_resource_read_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_iid_t iid, anjay_rid_t rid, anjay_riid_t riid, anjay_output_ctx_t *ctx)
Definition dm.h:365
int anjay_dm_instance_write_default_attrs_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_iid_t iid, anjay_ssid_t ssid, const anjay_dm_oi_attributes_t *attrs)
Definition dm.h:285
int anjay_dm_list_instances_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_dm_list_ctx_t *ctx)
Definition dm.h:163
const anjay_dm_oi_attributes_t ANJAY_DM_OI_ATTRIBUTES_EMPTY
int anjay_dm_transaction_NOOP(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr)
int anjay_dm_instance_reset_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_iid_t iid)
Definition dm.h:197
int anjay_dm_resource_write_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_iid_t iid, anjay_rid_t rid, anjay_riid_t riid, anjay_input_ctx_t *ctx)
Definition dm.h:400
int anjay_dm_list_resources_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_iid_t iid, anjay_dm_resource_list_ctx_t *ctx)
Definition dm.h:322
int anjay_dm_list_resource_instances_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_iid_t iid, anjay_rid_t rid, anjay_dm_list_ctx_t *ctx)
Definition dm.h:504
int anjay_dm_transaction_commit_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr)
Definition dm.h:702
int anjay_dm_transaction_rollback_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr)
Definition dm.h:726
int anjay_dm_resource_execute_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_iid_t iid, anjay_rid_t rid, anjay_execute_ctx_t *ctx)
Definition dm.h:428
anjay_security_mode_t
Definition dm.h:1169
@ ANJAY_SECURITY_RPK
Definition dm.h:1171
@ ANJAY_SECURITY_NOSEC
Definition dm.h:1173
@ ANJAY_SECURITY_EST
Definition dm.h:1174
@ ANJAY_SECURITY_CERTIFICATE
Definition dm.h:1172
@ ANJAY_SECURITY_PSK
Definition dm.h:1170
int anjay_dm_list_instances_SINGLE(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, anjay_dm_list_ctx_t *ctx)
struct anjay_dm_resource_list_ctx_struct anjay_dm_resource_list_ctx_t
Definition io.h:40
struct anjay_input_ctx_struct anjay_input_ctx_t
Definition io.h:413
struct anjay_dm_list_ctx_struct anjay_dm_list_ctx_t
Definition io.h:22
struct anjay_output_ctx_struct anjay_output_ctx_t
Definition io.h:123
struct anjay_execute_ctx_struct anjay_execute_ctx_t
Definition io.h:417
anjay_dm_resource_execute_t * resource_execute
Definition dm.h:847
anjay_dm_instance_create_t * instance_create
Definition dm.h:778
anjay_dm_resource_read_t * resource_read
Definition dm.h:829
anjay_dm_list_resource_instances_t * list_resource_instances
Definition dm.h:869
anjay_dm_resource_instance_read_attrs_t * resource_instance_read_attrs
Definition dm.h:948
anjay_dm_resource_reset_t * resource_reset
Definition dm.h:858
anjay_dm_object_write_default_attrs_t * object_write_default_attrs
Definition dm.h:750
anjay_dm_transaction_rollback_t * transaction_rollback
Definition dm.h:935
anjay_dm_transaction_validate_t * transaction_validate
Definition dm.h:912
anjay_dm_object_read_default_attrs_t * object_read_default_attrs
Definition dm.h:739
anjay_dm_instance_write_default_attrs_t * instance_write_default_attrs
Definition dm.h:810
anjay_dm_transaction_commit_t * transaction_commit
Definition dm.h:923
anjay_dm_instance_read_default_attrs_t * instance_read_default_attrs
Definition dm.h:799
anjay_dm_instance_remove_t * instance_remove
Definition dm.h:788
anjay_dm_list_instances_t * list_instances
Definition dm.h:760
anjay_dm_resource_write_t * resource_write
Definition dm.h:838
anjay_dm_resource_read_attrs_t * resource_read_attrs
Definition dm.h:879
anjay_dm_instance_reset_t * instance_reset
Definition dm.h:769
anjay_dm_transaction_begin_t * transaction_begin
Definition dm.h:900
anjay_dm_resource_write_attrs_t * resource_write_attrs
Definition dm.h:889
anjay_dm_resource_instance_write_attrs_t * resource_instance_write_attrs
Definition dm.h:961
anjay_dm_list_resources_t * list_resources
Definition dm.h:820
anjay_dm_handlers_t handlers
Definition dm.h:981
const char * version
Definition dm.h:978
anjay_oid_t oid
Definition dm.h:967
int32_t max_period
Definition dm.h:42
anjay_dm_con_attr_t con
Definition dm.h:49
int32_t min_period
Definition dm.h:40
int32_t max_eval_period
Definition dm.h:46
int32_t min_eval_period
Definition dm.h:44
double step
Definition dm.h:62
double less_than
Definition dm.h:60
double greater_than
Definition dm.h:58
anjay_dm_oi_attributes_t common
Definition dm.h:56
int32_t min_period
Definition dm.h:1047
bool is_observed
Definition dm.h:1041
int32_t max_eval_period
Definition dm.h:1054