void* wait_for_bootstrap(void* arg) { MbedClient *client; client = (MbedClient*) arg; if(client->bootstrap_successful()) { printf("\n============== After Bootstrapping ==============\n"); display_mallinfo(); printf("Registering endpoint\n"); client->test_register(); } return NULL; }
void* wait_for_bootstrap(void* arg) { MbedClient *client; client = (MbedClient*) arg; if(client->bootstrap_successful()) { printf("Registering endpoint\n"); // Create LWM2M device object specifying device resources // as per OMA LWM2M specification. M2MDevice* device_object = client->create_device_object(); M2MObject* object = client->create_generic_object(); // Add all the objects that you would like to register // into the list and pass the list for register API. M2MObjectList object_list; object_list.push_back(device_object); object_list.push_back(object); // Issue register command. client->test_register(object_list); } return NULL; }