Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-client by
Diff: source/include/m2mnsdlinterface.h
- Revision:
- 4:ae5178938864
- Parent:
- 1:79b6cc67d8b4
- Child:
- 5:e36098b177a4
--- a/source/include/m2mnsdlinterface.h Fri Feb 19 17:44:50 2016 +0000
+++ b/source/include/m2mnsdlinterface.h Sat Apr 02 00:31:13 2016 +0300
@@ -21,6 +21,7 @@
#include "mbed-client/m2minterface.h"
#include "mbed-client/m2mtimerobserver.h"
#include "mbed-client/m2mobservationhandler.h"
+#include "mbed-client/m2mbase.h"
#include "include/nsdllinker.h"
//FORWARD DECLARARTION
@@ -30,7 +31,6 @@
class M2MResource;
class M2MResourceInstance;
class M2MNsdlObserver;
-class M2MBase;
class M2MServer;
class M2MTimer;
@@ -210,7 +210,10 @@
protected: // from M2MObservationHandler
- virtual void observation_to_be_sent(M2MBase *object);
+ virtual void observation_to_be_sent(M2MBase *object,
+ uint16_t obs_number,
+ m2m::Vector<uint16_t> changed_instance_ids,
+ bool send_object = false);
virtual void resource_to_be_deleted(const String &resource_name);
@@ -218,6 +221,8 @@
virtual void remove_object(M2MBase *object);
+ virtual void send_delayed_response(M2MBase *base);
+
private:
/**
@@ -236,7 +241,7 @@
const String &object_name = "",
bool multiple_instances = false);
- bool create_nsdl_resource(M2MBase *base, const String &name = "");
+ bool create_nsdl_resource(M2MBase *base, const String &name = "", bool publish_uri = true);
String coap_to_string(uint8_t *coap_data_ptr,
int coap_data_ptr_length);
@@ -263,11 +268,28 @@
M2MInterface::Error interface_error(sn_coap_hdr_s *coap_header);
- void send_object_observation(M2MObject *object);
+ void send_object_observation(M2MObject *object,
+ uint16_t obs_number,
+ m2m::Vector<uint16_t> changed_instance_ids,
+ bool send_object);
+
+ void send_object_instance_observation(M2MObjectInstance *object_instance,
+ uint16_t obs_number);
+
+ void send_resource_observation(M2MResource *resource, uint16_t obs_number);
- void send_object_instance_observation(M2MObjectInstance *object_instance);
+ void build_observation_number(uint8_t *obs_number,
+ uint8_t *obs_len,
+ uint16_t number);
- void send_resource_observation(M2MResource *resource);
+ void send_notification(uint8_t *token,
+ uint8_t token_length,
+ uint8_t *value,
+ uint32_t value_length,
+ uint16_t observation,
+ uint32_t max_age,
+ uint8_t coap_content_type,
+ const String &uri_path);
private:
