/** To represent resource type with presence.*/
#define OC_RSRVD_RESOURCE_TYPE_PRESENCE "oic.wk.ad"
+/** To represent resource type with device.*/
+#define OC_RSRVD_RESOURCE_TYPE_DEVICE "oic.wk.d"
+
+/** To represent resource type with platform.*/
+#define OC_RSRVD_RESOURCE_TYPE_PLATFORM "oic.wk.p"
+
/** To represent interface.*/
#define OC_RSRVD_INTERFACE "if"
/** To represent default interface.*/
#define OC_RSRVD_INTERFACE_DEFAULT "oic.if.baseline"
+/** To represent read-only interface.*/
+#define OC_RSRVD_INTERFACE_READ "oic.if.r"
+
/** To represent ll interface.*/
#define OC_RSRVD_INTERFACE_LL "oic.if.ll"
#define OC_RSRVD_DATA_MODEL_VERSION "dmv"
/** Device specification version.*/
-#define OC_SPEC_VERSION "0.9.0"
+#define OC_SPEC_VERSION "core.1.0.0"
/** Device Data Model version.*/
-#define OC_DATA_MODEL_VERSION "sec.0.95"
+#define OC_DATA_MODEL_VERSION "res.1.0.0"
/**
* These provide backward compatibility - their use is deprecated.
/**Remote Access over XMPP.*/
OC_ADAPTER_REMOTE_ACCESS = (1 << 3),
#endif
-
-#ifdef TCP_ADAPTER
/** CoAP over TCP.*/
OC_ADAPTER_TCP = (1 << 4)
-#endif
} OCTransportAdapter;
/** Remote Access over XMPP.*/
CT_ADAPTER_REMOTE_ACCESS = (1 << 19),
#endif
-
-#ifdef TCP_ADAPTER
/** CoAP over TCP.*/
CT_ADAPTER_TCP = (1 << 20),
-#endif
/** Insecure transport is the default (subject to change).*/
OCREP_PROP_DOUBLE,
OCREP_PROP_BOOL,
OCREP_PROP_STRING,
+ OCREP_PROP_BYTE_STRING,
OCREP_PROP_OBJECT,
OCREP_PROP_ARRAY
}OCRepPayloadPropType;
+/** This structure will be used to represent a binary string for CBOR payloads.*/
+typedef struct
+{
+ /** pointer to data bytes.*/
+ uint8_t* bytes;
+
+ /** number of data bytes.*/
+ size_t len;
+} OCByteString;
+
#define MAX_REP_ARRAY_DEPTH 3
typedef struct
{
double* dArray;
bool* bArray;
char** strArray;
+
+ /** pointer to ByteString array.*/
+ OCByteString* ocByteStrArray;
+
struct OCRepPayload** objArray;
};
} OCRepPayloadValueArray;
double d;
bool b;
char* str;
+
+ /** ByteString object.*/
+ OCByteString ocByteStr;
+
struct OCRepPayload* obj;
OCRepPayloadValueArray arr;
};
typedef struct OCResourcePayload
{
char* uri;
- uint8_t* sid;
OCStringLL* types;
OCStringLL* interfaces;
uint8_t bitmap;
typedef struct
{
OCPayload base;
+
+ uint8_t* sid;
+
/** This structure holds the old /oic/res response. */
OCResourcePayload *resources;
/** This structure holds the collection response for the /oic/res. */
typedef struct
{
OCPayload base;
- char* uri;
uint8_t* sid;
char* deviceName;
char* specVersion;