101 uint16_t num_sec_modes, ...);
118 void (*sol_lwm2m_server_registration_event_cb)(
void *data,
134 void (*sol_lwm2m_server_registration_event_cb)(
void *data,
166 void (*sol_lwm2m_server_content_cb)(
void *data,
191 void (*sol_lwm2m_server_content_cb)(
void *data,
217 void (*sol_lwm2m_server_management_status_response_cb)(
void *data,
235 void (*sol_lwm2m_server_management_status_response_cb)(
void *data,
254 void (*sol_lwm2m_server_management_status_response_cb)(
void *data,
277 void (*sol_lwm2m_server_management_status_response_cb)(
void *data,
296 void (*sol_lwm2m_server_content_cb)(
void *data,
int sol_lwm2m_server_del_registration_monitor(struct sol_lwm2m_server *server, void(*sol_lwm2m_server_registration_event_cb)(void *data, struct sol_lwm2m_server *server, struct sol_lwm2m_client_info *cinfo, enum sol_lwm2m_registration_event event), const void *data)
Removes a registration monitor.
const struct sol_ptr_vector * sol_lwm2m_server_get_clients(const struct sol_lwm2m_server *server)
Gets all registerd clients.
int sol_lwm2m_server_del_observer(struct sol_lwm2m_server *server, struct sol_lwm2m_client_info *client, const char *path, void(*sol_lwm2m_server_content_cb)(void *data, struct sol_lwm2m_server *server, struct sol_lwm2m_client_info *client, const char *path, enum sol_coap_response_code response_code, enum sol_lwm2m_content_type content_type, struct sol_str_slice content), const void *data)
Unobserve a client object, instance or resource.
int sol_lwm2m_client_info_get_lifetime(const struct sol_lwm2m_client_info *client, uint32_t *lifetime)
Gets the client lifetime in seconds.
const char * sol_lwm2m_client_info_get_sms_number(const struct sol_lwm2m_client_info *client)
Gets the client SMS number.
static struct sol_http_server * server
Definition: server-https.c:52
int sol_lwm2m_server_add_observer(struct sol_lwm2m_server *server, struct sol_lwm2m_client_info *client, const char *path, void(*sol_lwm2m_server_content_cb)(void *data, struct sol_lwm2m_server *server, struct sol_lwm2m_client_info *client, const char *path, enum sol_coap_response_code response_code, enum sol_lwm2m_content_type content_type, struct sol_str_slice content), const void *data)
Observes a client object, instance or resource.
Indicates that a client was registered in the server.
Definition: sol-lwm2m-server.h:66
Indicates that a client was unregistered.
Definition: sol-lwm2m-server.h:74
sol_lwm2m_binding_mode
LWM2M Client binding mode.
Definition: sol-lwm2m.h:100
Indicates that the server is discarding a client, since the server did not hear from it after some ti...
Definition: sol-lwm2m-server.h:79
Routines that handle the LWM2M protocol.
int sol_lwm2m_server_read(struct sol_lwm2m_server *server, struct sol_lwm2m_client_info *client, const char *path, void(*sol_lwm2m_server_content_cb)(void *data, struct sol_lwm2m_server *server, struct sol_lwm2m_client_info *client, const char *path, enum sol_coap_response_code response_code, enum sol_lwm2m_content_type content_type, struct sol_str_slice content), const void *data)
Reads an object, instance or resource from a client.
String slice type.
Definition: sol-str-slice.h:84
Structure to represent a network address, both IPv6 and IPv4 are valid.
Definition: sol-network.h:145
int sol_lwm2m_server_write(struct sol_lwm2m_server *server, struct sol_lwm2m_client_info *client, const char *path, struct sol_lwm2m_resource *resources, size_t len, void(*sol_lwm2m_server_management_status_response_cb)(void *data, struct sol_lwm2m_server *server, struct sol_lwm2m_client_info *client, const char *path, enum sol_coap_response_code response_code), const void *data)
Writes an object instance or resource.
enum sol_lwm2m_binding_mode sol_lwm2m_client_info_get_binding_mode(const struct sol_lwm2m_client_info *client)
Gets the client binding mode.
sol_coap_response_code
Set of response codes available for a response packet.
Definition: sol-coap.h:190
struct sol_lwm2m_client_info sol_lwm2m_client_info
A handle that contains information about a registered LWM2M client.
Definition: sol-lwm2m-server.h:55
void sol_lwm2m_server_del(struct sol_lwm2m_server *server)
Deletes a server instance.
const char * sol_lwm2m_client_info_get_location(const struct sol_lwm2m_client_info *client)
Gets the client location path in the LWM2M server.
const char * sol_lwm2m_client_info_get_objects_path(const struct sol_lwm2m_client_info *client)
Gets the client objects path.
int sol_lwm2m_server_execute_resource(struct sol_lwm2m_server *server, struct sol_lwm2m_client_info *client, const char *path, const char *args, void(*sol_lwm2m_server_management_status_response_cb)(void *data, struct sol_lwm2m_server *server, struct sol_lwm2m_client_info *client, const char *path, enum sol_coap_response_code response_code), const void *data)
Executes an resource on a client.
int sol_lwm2m_server_delete_object_instance(struct sol_lwm2m_server *server, struct sol_lwm2m_client_info *client, const char *path, void(*sol_lwm2m_server_management_status_response_cb)(void *data, struct sol_lwm2m_server *server, struct sol_lwm2m_client_info *client, const char *path, enum sol_coap_response_code response_code), const void *data)
Deletes an object instance on a client.
int sol_lwm2m_server_add_registration_monitor(struct sol_lwm2m_server *server, void(*sol_lwm2m_server_registration_event_cb)(void *data, struct sol_lwm2m_server *server, struct sol_lwm2m_client_info *cinfo, enum sol_lwm2m_registration_event event), const void *data)
Adds a registration monitor.
sol_lwm2m_content_type
Enum that represents a LWM2M response/request content type.
Definition: sol-lwm2m.h:181
const struct sol_network_link_addr * sol_lwm2m_client_info_get_address(const struct sol_lwm2m_client_info *client)
Gets the client address.
sol_lwm2m_registration_event
Enum that expresses a LWM2M client lifecycle changes.
Definition: sol-lwm2m-server.h:62
struct sol_lwm2m_server * sol_lwm2m_server_new(uint16_t coap_port, uint16_t num_sec_modes,...)
Creates a new LWM2M server.
Soletta pointer vector is a wrapper around vector with an API more convenient to handle pointers...
Definition: sol-vector.h:310
struct sol_lwm2m_server sol_lwm2m_server
A handle to a LWM2M server.
Definition: sol-lwm2m-server.h:47
int sol_lwm2m_server_create_object_instance(struct sol_lwm2m_server *server, struct sol_lwm2m_client_info *client, const char *path, struct sol_lwm2m_resource *resources, size_t len, void(*sol_lwm2m_server_management_status_response_cb)(void *data, struct sol_lwm2m_server *server, struct sol_lwm2m_client_info *client, const char *path, enum sol_coap_response_code response_code), const void *data)
Creates an object instance on a client.
const struct sol_ptr_vector * sol_lwm2m_client_info_get_objects(const struct sol_lwm2m_client_info *client)
Get client's objects.
Indicates that a client updated itself in the server.
Definition: sol-lwm2m-server.h:70
Struct that represents a LWM2M resource.
Definition: sol-lwm2m.h:355
const char * sol_lwm2m_client_info_get_name(const struct sol_lwm2m_client_info *client)
Gets the name of client.