This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Adding new IPSO objects for nRF9160

I need to add some IPSO objects for our project. It is not quite obvious to me if I need to create modules similar to i e ipso_temp_sensor.c or if it would be enough to use:

    lwm2m_engine_create_obj_inst("3316/0");
    lwm2m_engine_register_read_callback("3316/0/5700", volt_read_cb);
    lwm2m_engine_set_res_data("3316/0/5518",
                  &timestamp, sizeof(timestamp), 0);

Above to create a battery voltage object?

Best regards

Dirk

  • Hi,

    Looking at ipso_temp_sensor.c, it seems like most of it is used to handle insternal state, such as max and min values.

    The macroes used to create the object instance doesn't seem to be available for "external" libraries. However, to me, it didn't seem like there were much difference between the macros and the lwm2m_engine_* functions.

    I would use the lwm2m_client sample as inspiration on how more obejcts can be implemented.

    Best regards,

    Didrik

Related