16 #ifndef M2M_INTERFACE_H 17 #define M2M_INTERFACE_H 24 #include "sn_coap_protocol.h" 25 #include "nsdl-c/sn_nsdl_lib.h" 38 typedef enum request_error_e {
39 FAILED_TO_SEND_MSG = 0,
40 FAILED_TO_ALLOCATE_MEMORY = 1,
41 ERROR_NOT_REGISTERED = 2
44 typedef request_error_e get_data_req_error_e;
45 typedef request_error_t get_data_req_error_t;
102 SecureConnectionFailed,
104 UnregistrationFailed,
106 FailedToStoreCredentials,
107 FailedToReadCredentials
120 UDP_SMS_QUEUE = 0x07,
145 #ifndef MBED_CLIENT_DISABLE_BOOTSTRAP_FEATURE 167 #endif //MBED_CLIENT_DISABLE_BOOTSTRAP_FEATURE 224 const uint32_t lifetime = 0) = 0;
238 const uint32_t lifetime = 0) = 0;
340 const uint16_t payload_len,
341 uint8_t *payload_ptr,
343 get_data_error_cb error_cb,
362 virtual void pause() = 0;
376 #endif // M2M_INTERFACE_H virtual void post_data_request(const char *uri, const bool async, const uint16_t payload_len, uint8_t *payload_ptr, get_data_cb data_cb, get_data_error_cb error_cb, void *context)=0
Sends the CoAP POST request to the server. Uri path to the data. In async mode application must cal...
The base class for Client Objects.
Definition: m2mobject.h:39
virtual void set_entropy_callback(entropy_cb callback)=0
Sets the function callback that is called by mbed Client to provide an entropy source from an applica...
virtual void update_registration(M2MSecurity *security_object, const uint32_t lifetime=0)=0
Updates or refreshes the client's registration on the LWM2M server.
virtual bool set_uri_query_parameters(const char *uri_query_params)=0
Set custom uri query paramaters used in LWM2M registration. Uri query params. Parameters must be in ...
virtual void finish_bootstrap()=0
Finishes bootstrap in cases where client will be the one to finish it.
The base class based on which all LwM2M object models can be created.
Definition: m2mbase.h:63
Definition: m2minterfaceobserver.h:32
virtual void set_queue_sleep_handler(callback_handler handler)=0
Sets the function that is called for indicating that the client is going to sleep when the binding mo...
virtual void resume(void *iface, const M2MBaseList &object_list)=0
Resumes client's timed functionality and network connection to the Cloud. Updates registration...
virtual const char * error_description() const =0
Return error description for the latest error code.
Definition: functionpointer.h:27
BindingMode
An enum defining different kinds of binding modes handled for client operations.
Definition: m2minterface.h:114
Definition: m2msecurity.h:31
virtual void get_data_request(DownloadType type, const char *uri, const size_t offset, const bool async, get_data_cb, get_data_error_cb, void *context)=0
Sends the CoAP GET request to the server. Download type. Uri path to the data. Data offset...
Definition: m2mstring.h:33
virtual void update_domain(const String &domain)=0
Updates the domain name.
NetworkStack
An enum defining different kinds of network stacks that can be used by mbed Client.
Definition: m2minterface.h:131
virtual void pause()=0
Pauses client's timed functionality and closes network connection to the Cloud. After successful call...
virtual void update_endpoint(const String &name)=0
Updates the endpoint name.
virtual void set_random_number_callback(random_number_cb callback)=0
Sets the function callback that is called by mbed Client to fetch a random number from an application...
A class for storing and calling a pointer to a static or member void function.
virtual void register_object(M2MSecurity *security_object, const M2MBaseList &list)=0
Initiates the registration of a provided security object to the corresponding LWM2M server...
A simple C++ Vector class, used as replacement for std::vector.
virtual const String internal_endpoint_name() const =0
Return internal endpoint name.
virtual void set_platform_network_handler(void *handler=NULL)=0
Sets the network interface handler that is used by mbed Client to connect to a network over IP...
Definition: m2minterface.h:82
virtual void unregister_object(M2MSecurity *security_object=NULL)=0
Unregisters the registered object from the LWM2M server.
Definition: m2mconfig.h:116
File defining all system build time configuration used by mbed-client.
Definition: m2mvector.h:30
void(* request_data_cb)(const uint8_t *buffer, size_t buffer_size, size_t total_size, bool last_block, void *context)
A callback function to receive data from GET request. Transfer is completed once total size equals to...
Definition: m2minterface.h:58
virtual void bootstrap(M2MSecurity *security_object)=0
Initiates bootstrapping of the client with the provided Bootstrap Server information. NOTE: This API is not supported for developers!!
void(* request_error_cb)(request_error_t error_code, void *context)
A callback function to receive errors from GET transfer.
Definition: m2minterface.h:70
virtual void cancel_bootstrap()=0
Cancels an ongoing bootstrapping operation of the client. If the client has already successfully boot...
Error
An enum defining different kinds of errors that can occur during various client operations.
Definition: m2minterface.h:90
virtual bool remove_object(M2MBase *base)=0
Removes an object from M2MInterface. Does not call delete on the object though.