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

Go to the source code of this file.

Data Structures

struct  anjay_ipso_basic_sensor_impl_struct
 
struct  anjay_ipso_3d_sensor_impl_struct
 

Typedefs

typedef int anjay_ipso_basic_sensor_value_reader_t(anjay_iid_t iid, void *ctx, double *value)
 
typedef struct anjay_ipso_basic_sensor_impl_struct anjay_ipso_basic_sensor_impl_t
 
typedef int anjay_ipso_3d_sensor_value_reader_t(anjay_iid_t iid, void *ctx, double *x_value, double *y_value, double *z_value)
 
typedef struct anjay_ipso_3d_sensor_impl_struct anjay_ipso_3d_sensor_impl_t
 

Functions

int anjay_ipso_basic_sensor_install (anjay_t *anjay, anjay_oid_t oid, size_t num_instances)
 
int anjay_ipso_basic_sensor_instance_add (anjay_t *anjay, anjay_oid_t oid, anjay_iid_t iid, const anjay_ipso_basic_sensor_impl_t impl)
 
int anjay_ipso_basic_sensor_instance_remove (anjay_t *anjay, anjay_oid_t oid, anjay_iid_t iid)
 
int anjay_ipso_basic_sensor_update (anjay_t *anjay, anjay_oid_t oid, anjay_iid_t iid)
 
int anjay_ipso_3d_sensor_install (anjay_t *anjay, anjay_oid_t oid, size_t num_instances)
 
int anjay_ipso_3d_sensor_instance_add (anjay_t *anjay, anjay_oid_t oid, anjay_iid_t iid, const anjay_ipso_3d_sensor_impl_t impl)
 
int anjay_ipso_3d_sensor_instance_remove (anjay_t *anjay, anjay_oid_t oid, anjay_iid_t iid)
 
int anjay_ipso_3d_sensor_update (anjay_t *anjay, anjay_oid_t oid, anjay_iid_t iid)
 
int anjay_ipso_button_install (anjay_t *anjay, size_t num_instances)
 
int anjay_ipso_button_instance_add (anjay_t *anjay, anjay_iid_t iid, const char *application_type)
 
int anjay_ipso_button_instance_remove (anjay_t *anjay, anjay_iid_t iid)
 
int anjay_ipso_button_update (anjay_t *anjay, anjay_iid_t iid, bool pressed)
 

Typedef Documentation

◆ anjay_ipso_3d_sensor_impl_t

◆ anjay_ipso_3d_sensor_value_reader_t

typedef int anjay_ipso_3d_sensor_value_reader_t(anjay_iid_t iid, void *ctx, double *x_value, double *y_value, double *z_value)

Type of the user provided callbacks to read the three-axis sensor value.

Parameters
iidIID of the instance reading the value.
ctxUser provided context.
x_valueX axis output.
y_valueY axis output.
z_valueZ axis output.
Returns
0 on success, or a negative value in case of error.

◆ anjay_ipso_basic_sensor_impl_t

◆ anjay_ipso_basic_sensor_value_reader_t

typedef int anjay_ipso_basic_sensor_value_reader_t(anjay_iid_t iid, void *ctx, double *value)

Type of the user provided callbacks to read a basic sensor value.

Parameters
iidIID of the instance for which the value will be read.
ctxUser provided context.
valueOutput.
Returns
0 on success, or a negative value in case of error.

Function Documentation

◆ anjay_ipso_3d_sensor_install()

int anjay_ipso_3d_sensor_install ( anjay_t anjay,
anjay_oid_t  oid,
size_t  num_instances 
)

Installs a three-axis sensor object in an Anjay object.

Parameters
anjayAnjay object for which the sensor object is installed.
oidOID of the installed object.
num_instancesMaximum number of the instances which will be created for the installed object.
Returns
0 on success, or a negative value in case of error.

◆ anjay_ipso_3d_sensor_instance_add()

int anjay_ipso_3d_sensor_instance_add ( anjay_t anjay,
anjay_oid_t  oid,
anjay_iid_t  iid,
const anjay_ipso_3d_sensor_impl_t  impl 
)

Adds an instance of a three-axis sensor object installed in an Anjay object.

Parameters
anjayAnjay object with the installed the sensor object.
oidOID of the installed object.
iidIID of the added instance. Should be lower than the number of instances passed to the corresponding anjay_ipso_3d_sensor_install
implParameters and callbacks needed to initialize an instance.
Returns
0 on success, or a negative value in case of error.

◆ anjay_ipso_3d_sensor_instance_remove()

int anjay_ipso_3d_sensor_instance_remove ( anjay_t anjay,
anjay_oid_t  oid,
anjay_iid_t  iid 
)

Removes an instance of a three-axis sensor object installed in an Anjay object.

Parameters
anjayAnjay object with the installed the sensor object.
oidOID of the installed object.
iidIID of the removed instance.
Returns
0 on success, or a negative value in case of error.

◆ anjay_ipso_3d_sensor_update()

int anjay_ipso_3d_sensor_update ( anjay_t anjay,
anjay_oid_t  oid,
anjay_iid_t  iid 
)

Updates a three-axis sensor object installed in an Anjay object.

Parameters
anjayAnjay object with the installed the sensor object.
oidOID of the installed object.
iidIID of the updated instance.

◆ anjay_ipso_basic_sensor_install()

int anjay_ipso_basic_sensor_install ( anjay_t anjay,
anjay_oid_t  oid,
size_t  num_instances 
)

Installs a basic sensor object in an Anjay object.

Parameters
anjayAnjay object for which the sensor object is installed.
oidOID of the installed object.
num_instancesMaximum number of the instances which will be created for the installed object.
Returns
0 on success, or a negative value in case of error.

◆ anjay_ipso_basic_sensor_instance_add()

int anjay_ipso_basic_sensor_instance_add ( anjay_t anjay,
anjay_oid_t  oid,
anjay_iid_t  iid,
const anjay_ipso_basic_sensor_impl_t  impl 
)

Adds an instance of a sensor object installed in an Anjay object.

Parameters
anjayAnjay object with the installed the sensor object.
oidOID of the installed object.
iidIID of the added instance. Should be lower than the number of instances passed to the corresponding anjay_ipso_basic_sensor_install
implParameters and callbacks needed to initialize an instance.
Returns
0 on success, or a negative value in case of error.

◆ anjay_ipso_basic_sensor_instance_remove()

int anjay_ipso_basic_sensor_instance_remove ( anjay_t anjay,
anjay_oid_t  oid,
anjay_iid_t  iid 
)

Removes an instance of a sensor object installed in an Anjay object.

Parameters
anjayAnjay object with the installed the sensor object.
oidOID of the installed object.
iidIID of the removed instance. Should be lower than the number of instances passed to the corresponding anjay_ipso_basic_sensor_install
Returns
0 on success, or a negative value in case of error.

◆ anjay_ipso_basic_sensor_update()

int anjay_ipso_basic_sensor_update ( anjay_t anjay,
anjay_oid_t  oid,
anjay_iid_t  iid 
)

Updates a basic sensor object installed in an Anjay object.

Parameters
anjayAnjay object with the installed the sensor object.
oidOID of the installed object.
iidIID of the updated instance.

◆ anjay_ipso_button_install()

int anjay_ipso_button_install ( anjay_t anjay,
size_t  num_instances 
)

Installs button object in the given Anjay object.

Parameters
anjayAnjay object for the Push Button Object installation.
num_instancesMaximum number of the instances of the installed object.
Returns
0 on success, or a negative value in case of error.

◆ anjay_ipso_button_instance_add()

int anjay_ipso_button_instance_add ( anjay_t anjay,
anjay_iid_t  iid,
const char *  application_type 
)

Add an instance of the Push Button Object installed in an Anjay object.

Parameters
anjayAnjay object with the Push Button Object installed.
iidIID of the added instance.
application_type"Application type" string for the button instance, is copied during the instance initialization, should not be longer than 40 characters.
Returns
0 on success, or a negative value in case of error.

◆ anjay_ipso_button_instance_remove()

int anjay_ipso_button_instance_remove ( anjay_t anjay,
anjay_iid_t  iid 
)

Remove an instance of the Push Button Object installed in an Anjay object.

Parameters
anjayAnjay object with the Push Button Object installed.
iidIID of the removed instance.
Returns
0 on success, or a negative value in case of error.

◆ anjay_ipso_button_update()

int anjay_ipso_button_update ( anjay_t anjay,
anjay_iid_t  iid,
bool  pressed 
)

Updates Push Button Object installed in an Anjay object.

Parameters
anjayAnjay object with the Push Button Object installed.
iidIID of the removed instance.
pressedNew state of the button (true if pressed).
Returns
0 on success, or a negative value in case of error.