anjay
Loading...
Searching...
No Matches
ipso_objects_v2.h File Reference
#include <anjay/dm.h>

Go to the source code of this file.

Data Structures

struct  anjay_ipso_v2_basic_sensor_meta_struct
 
struct  anjay_ipso_v2_3d_sensor_meta_struct
 
struct  anjay_ipso_v2_3d_sensor_value_struct
 

Typedefs

typedef struct anjay_ipso_v2_basic_sensor_meta_struct anjay_ipso_v2_basic_sensor_meta_t
 
typedef struct anjay_ipso_v2_3d_sensor_meta_struct anjay_ipso_v2_3d_sensor_meta_t
 
typedef struct anjay_ipso_v2_3d_sensor_value_struct anjay_ipso_v2_3d_sensor_value_t
 

Functions

int anjay_ipso_v2_basic_sensor_install (anjay_t *anjay, anjay_oid_t oid, const char *version, size_t instance_count)
 
int anjay_ipso_v2_basic_sensor_instance_add (anjay_t *anjay, anjay_oid_t oid, anjay_iid_t iid, double initial_value, const anjay_ipso_v2_basic_sensor_meta_t *meta)
 
int anjay_ipso_v2_basic_sensor_value_update (anjay_t *anjay, anjay_oid_t oid, anjay_iid_t iid, double value)
 
int anjay_ipso_v2_basic_sensor_instance_remove (anjay_t *anjay, anjay_oid_t oid, anjay_iid_t iid)
 
int anjay_ipso_v2_3d_sensor_install (anjay_t *anjay, anjay_oid_t oid, const char *version, size_t instance_count)
 
int anjay_ipso_v2_3d_sensor_instance_add (anjay_t *anjay, anjay_oid_t oid, anjay_iid_t iid, const anjay_ipso_v2_3d_sensor_value_t *initial_value, const anjay_ipso_v2_3d_sensor_meta_t *meta)
 
int anjay_ipso_v2_3d_sensor_value_update (anjay_t *anjay, anjay_oid_t oid, anjay_iid_t iid, const anjay_ipso_v2_3d_sensor_value_t *value)
 
int anjay_ipso_v2_3d_sensor_instance_remove (anjay_t *anjay, anjay_oid_t oid, anjay_iid_t iid)
 

Typedef Documentation

◆ anjay_ipso_v2_3d_sensor_meta_t

Experimental:
This is experimental IPSO object v2 API. This API can change in future versions without any notice.

IPSO three-axis sensor object instance metadata.

◆ anjay_ipso_v2_3d_sensor_value_t

Experimental:
This is experimental IPSO object v2 API. This API can change in future versions without any notice.

Value of IPSO three-axis sensor object.

◆ anjay_ipso_v2_basic_sensor_meta_t

Experimental:
This is experimental IPSO object v2 API. This API can change in future versions without any notice.

IPSO basic sensor object instance metadata.

Function Documentation

◆ anjay_ipso_v2_3d_sensor_install()

int anjay_ipso_v2_3d_sensor_install ( anjay_t anjay,
anjay_oid_t  oid,
const char *  version,
size_t  instance_count 
)
Experimental:
This is experimental IPSO object v2 API. This API can change in future versions without any notice.

Installs a three-axis IPSO object.

Parameters
anjayAnjay object for which the object is installed.
oidObject ID of installed object.
versionObject version. This value is optional; version will not be reported if this value is set to NULL. The pointed string is not copied, so user code must assure that the pointer will remain valid for the lifetime of the object.
instance_countMaximum count of instances of installed object.
Returns
0 on success, or a negative value in case of error.

◆ anjay_ipso_v2_3d_sensor_instance_add()

int anjay_ipso_v2_3d_sensor_instance_add ( anjay_t anjay,
anjay_oid_t  oid,
anjay_iid_t  iid,
const anjay_ipso_v2_3d_sensor_value_t initial_value,
const anjay_ipso_v2_3d_sensor_meta_t meta 
)
Experimental:
This is experimental IPSO object v2 API. This API can change in future versions without any notice.

Adds an instance of three-axis IPSO object. Requires the object to be installed first with anjay_ipso_v2_3d_sensor_install .

Parameters
anjayAnjay object for which the instance is added.
oidObject ID of added object instance.
iidInstance ID of added object instance. Must be lower than number of instance_count parameter passed to anjay_ipso_v2_3d_sensor_install
initial_valueInitial sensor value.
metaMetadata about added object instance.
Returns
0 on success, or a negative value in case of error.

◆ anjay_ipso_v2_3d_sensor_instance_remove()

int anjay_ipso_v2_3d_sensor_instance_remove ( anjay_t anjay,
anjay_oid_t  oid,
anjay_iid_t  iid 
)
Experimental:
This is experimental IPSO object v2 API. This API can change in future versions without any notice.

Removes an instance of three-axis IPSO object.

Parameters
anjayAnjay object with an installed three-axis IPSO object.
oidObject ID of object instance to remove.
iidInstance ID of object instance to remove.
Returns
0 on success, or a negative value in case of error.

◆ anjay_ipso_v2_3d_sensor_value_update()

int anjay_ipso_v2_3d_sensor_value_update ( anjay_t anjay,
anjay_oid_t  oid,
anjay_iid_t  iid,
const anjay_ipso_v2_3d_sensor_value_t value 
)
Experimental:
This is experimental IPSO object v2 API. This API can change in future versions without any notice.

Updates sensor value of three-axis IPSO object.

This method should be called frequently if user needs LwM2M observations to behave responsively.

CAUTION: Do not call this method from interrupts.

Parameters
anjayAnjay object with an installed three-axis IPSO object.
oidObject ID of object instance of which the sensor value is updated.
iidInstance ID of object instance of which the sensor value is updated.
valueNew sensor value.
Returns
0 on success, or a negative value in case of error.

◆ anjay_ipso_v2_basic_sensor_install()

int anjay_ipso_v2_basic_sensor_install ( anjay_t anjay,
anjay_oid_t  oid,
const char *  version,
size_t  instance_count 
)
Experimental:
This is experimental IPSO object v2 API. This API can change in future versions without any notice.

Installs a basic IPSO object.

Parameters
anjayAnjay object for which the object is installed.
oidObject ID of installed object.
versionObject version. This value is optional; version will not be reported if this value is set to NULL. The pointed string is not copied, so user code must assure that the pointer will remain valid for the lifetime of the object.
instance_countMaximum count of instances of installed object.
Returns
0 on success, or a negative value in case of error.

◆ anjay_ipso_v2_basic_sensor_instance_add()

int anjay_ipso_v2_basic_sensor_instance_add ( anjay_t anjay,
anjay_oid_t  oid,
anjay_iid_t  iid,
double  initial_value,
const anjay_ipso_v2_basic_sensor_meta_t meta 
)
Experimental:
This is experimental IPSO object v2 API. This API can change in future versions without any notice.

Adds an instance of basic IPSO object. Requires the object to be installed first with anjay_ipso_v2_basic_sensor_install .

Parameters
anjayAnjay object for which the instance is added.
oidObject ID of added object instance.
iidInstance ID of added object instance. Must be lower than number of instance_count parameter passed to anjay_ipso_v2_basic_sensor_install
initial_valueInitial sensor value.
metaMetadata about added object instance.
Returns
0 on success, or a negative value in case of error.

◆ anjay_ipso_v2_basic_sensor_instance_remove()

int anjay_ipso_v2_basic_sensor_instance_remove ( anjay_t anjay,
anjay_oid_t  oid,
anjay_iid_t  iid 
)
Experimental:
This is experimental IPSO object v2 API. This API can change in future versions without any notice.

Removes an instance of basic IPSO object.

Parameters
anjayAnjay object with an installed basic IPSO object.
oidObject ID of object instance to remove.
iidInstance ID of object instance to remove.
Returns
0 on success, or a negative value in case of error.

◆ anjay_ipso_v2_basic_sensor_value_update()

int anjay_ipso_v2_basic_sensor_value_update ( anjay_t anjay,
anjay_oid_t  oid,
anjay_iid_t  iid,
double  value 
)
Experimental:
This is experimental IPSO object v2 API. This API can change in future versions without any notice.

Updates sensor value of basic IPSO object, and also minimum and maximum measured values.

This method should be called frequently if user needs LwM2M observations to behave responsively.

CAUTION: Do not call this method from interrupts.

Parameters
anjayAnjay object with an installed basic IPSO object.
oidObject ID of object instance of which the sensor value is updated.
iidInstance ID of object instance of which the sensor value is updated.
valueNew sensor value.
Returns
0 on success, or a negative value in case of error.