#define OC_RSRVD_DATA_MODEL_VERSION "dmv"
/** Device specification version.*/
-#define OC_SPEC_VERSION "core.1.1.0"
+#define OC_SPEC_VERSION "ocf.1.1.0"
/** Integer value of spec version.*/
#define OC_SPEC_VERSION_VALUE 0
/** Device Data Model version.*/
-#define OC_DATA_MODEL_VERSION "res.1.1.0,sh.1.1.0"
+#define OC_DATA_MODEL_VERSION "ocf.res.1.1.0,ocf.sh.1.1.0"
/** Protocol-Independent ID.*/
#define OC_RSRVD_PROTOCOL_INDEPENDENT_ID "piid"
const char *supportLink = "https://www.iotivity.org";
const char *version = "myVersion";
const char *systemTime = "2015-05-15T11.04";
-const char *specVersion = "core.1.1.0";
-const char *dataModelVersions = "res.1.1.0,sh.1.1.0";
+const char *specVersion = "ocf.1.1.0";
+const char *dataModelVersions = "ocf.res.1.1.0,ocf.sh.1.1.0";
const char *deviceType = "oic.d.tv";
OCPlatformInfo platformInfo;
const char *supportLink = "https://www.iotivity.org";
const char *version = "myVersion";
const char *systemTime = "2015-05-15T11.04";
-const char *specVersion = "core.1.1.0";
-const char *dataModelVersions = "res.1.1.0,sh.1.1.0";
+const char *specVersion = "ocf.1.1.0";
+const char *dataModelVersions = "ocf.res.1.1.0,ocf.sh.1.1.0";
const char *deviceType = "oic.d.tv";
// Entity handler should check for resourceTypeName and ResourceInterface in order to GET
// Set of strings for each of device info fields
std::string deviceName = "Bill's Battlestar";
-std::string specVersion = "core.1.1.0";
-std::vector<std::string> dataModelVersions = {"res.1.1.0", "sh.1.1.0"};
+std::string specVersion = "ocf.1.1.0";
+std::vector<std::string> dataModelVersions = {"ocf.res.1.1.0", "ocf.sh.1.1.0"};
std::string protocolIndependentID = "4cae60c1-48cb-47dc-882e-dedec114f45c";
// Device type
// Set of strings for each of device info fields
std::string deviceName = "IoTivity Fridge Server";
-std::string specVersion = "core.1.1.0";
-std::vector<std::string> dataModelVersions = {"res.1.1.0"};
+std::string specVersion = "ocf.1.1.0";
+std::vector<std::string> dataModelVersions = {"ocf.res.1.1.0"};
std::string protocolIndependentID = "054718eb-b1e7-4e9e-9892-30e718a6a8f3";
// OCPlatformInfo Contains all the platform info to be stored
// Set of strings for each of device info fields
std::string deviceName = "IoTivity Garage Server";
-std::string specVersion = "core.1.1.0";
-std::vector<std::string> dataModelVersions = {"res.1.1.0"};
+std::string specVersion = "ocf.1.1.0";
+std::vector<std::string> dataModelVersions = {"ocf.res.1.1.0"};
std::string protocolIndependentID = "1cbab786-ca5f-4eb9-89b2-e90eb4820145";
// OCPlatformInfo Contains all the platform info to be stored
// Set of strings for each of device info fields
std::string deviceName = "IoTivity Light Server";
-std::string specVersion = "core.1.1.0";
-std::vector<std::string> dataModelVersions = {"res.1.1.0"};
+std::string specVersion = "ocf.1.1.0";
+std::vector<std::string> dataModelVersions = {"ocf.res.1.1.0"};
std::string protocolIndependentID = "b0ed9259-ec95-4ac6-8f62-241d0da02683";
// OCPlatformInfo Contains all the platform info to be stored
return result;
}
- result = OCPlatform::setPropertyValue(PAYLOAD_TYPE_DEVICE, OC_RSRVD_SPEC_VERSION, "core.1.1.0");
+ result = OCPlatform::setPropertyValue(PAYLOAD_TYPE_DEVICE, OC_RSRVD_SPEC_VERSION, "ocf.1.1.0");
if (result != OC_STACK_OK)
{
cout << "Failed to set spec version" << endl;
// Set of strings for each of device info fields
std::string deviceName = "IoTivity Presence Server";
-std::string specVersion = "core.1.1.0";
-std::vector<std::string> dataModelVersions = {"res.1.1.0"};
+std::string specVersion = "ocf.1.1.0";
+std::vector<std::string> dataModelVersions = {"ocf.res.1.1.0"};
std::string protocolIndependentID = "41a75d38-83c3-4b83-a794-f2174990b30b";
// OCPlatformInfo Contains all the platform info to be stored
// Set of strings for each of device info fields
std::string deviceName = "IoTivity Room Server";
-std::string specVersion = "core.1.1.0";
-std::vector<std::string> dataModelVersions = {"res.1.1.0"};
+std::string specVersion = "ocf.1.1.0";
+std::vector<std::string> dataModelVersions = {"ocf.res.1.1.0"};
std::string protocolIndependentID = "ac1b42a7-0518-448f-9b11-bfe328837bbf";
// OCPlatformInfo Contains all the platform info to be stored
// Set of strings for each of device info fields
std::string deviceName = "IoTivity Simple Server";
std::string deviceType = "oic.wk.tv";
-std::string specVersion = "core.1.1.0";
-std::vector<std::string> dataModelVersions = {"res.1.1.0", "sh.1.1.0"};
+std::string specVersion = "ocf.1.1.0";
+std::vector<std::string> dataModelVersions = {"ocf.res.1.1.0", "ocf.sh.1.1.0"};
std::string protocolIndependentID = "fa008167-3bbf-4c9d-8604-c9bcb96cb712";
// OCPlatformInfo Contains all the platform info to be stored
// Set of strings for each of device info fields
std::string deviceName = "IoTivity Simple Server HQ";
-std::string specVersion = "core.1.1.0";
-std::vector<std::string> dataModelVersions = {"res.1.1.0"};
+std::string specVersion = "ocf.1.1.0";
+std::vector<std::string> dataModelVersions = {"ocf.res.1.1.0"};
std::string protocolIndependentID = "88b3584f-d7bc-4e56-9210-0e8b305202c3";
// OCPlatformInfo Contains all the platform info to be stored
size_t dim1[MAX_REP_ARRAY_DEPTH] = {2, 0, 0};
char **dt1 = (char **)OICMalloc(sizeof(char *) * 2);
EXPECT_TRUE(dt1);
- dt1[0] = OICStrdup("res.1.1.0");
- dt1[1] = OICStrdup("sh.1.1.0");
+ dt1[0] = OICStrdup("ocf.res.1.1.0");
+ dt1[1] = OICStrdup("ocf.sh.1.1.0");
OCRepPayloadSetStringArray(device, OC_RSRVD_DATA_MODEL_VERSION, (const char**)dt1, dim1);
EXPECT_EQ(OC_STACK_OK, OCConvertPayload((OCPayload *)device, &cborData, &cborSize));
EXPECT_EQ(OC_STACK_OK, OCParsePayload(&parsedDevice, PAYLOAD_TYPE_REPRESENTATION, cborData, cborSize));
char **dmv1 = NULL;
parsedRep = (OCRepPayload *)parsedDevice;
EXPECT_TRUE(OCRepPayloadGetStringArray(parsedRep, OC_RSRVD_DATA_MODEL_VERSION, &dmv1, dim));
- EXPECT_STREQ("res.1.1.0", dmv1[0]);
- EXPECT_STREQ("sh.1.1.0", dmv1[1]);
+ EXPECT_STREQ("ocf.res.1.1.0", dmv1[0]);
+ EXPECT_STREQ("ocf.sh.1.1.0", dmv1[1]);
OICFree(dmv1[0]);
OICFree(dmv1[1]);
OICFree(dmv1);
EXPECT_EQ(1u, mc2.representations().size());
const OC::OCRepresentation r2 = mc2.representations()[0];
std::vector<std::string> dmv3 = r2.getValue<std::vector<std::string>>(OC_RSRVD_DATA_MODEL_VERSION);
- EXPECT_STREQ("res.1.1.0", dmv3[0].c_str());
- EXPECT_STREQ("sh.1.1.0", dmv3[1].c_str());
+ EXPECT_STREQ("ocf.res.1.1.0", dmv3[0].c_str());
+ EXPECT_STREQ("ocf.sh.1.1.0", dmv3[1].c_str());
OCPayloadDestroy(parsedDevice);
}