}
OcPlatformInfo platformInfo = new OcPlatformInfo(
- "myPlatformId", //Platform ID
- "myManufactName", //Manufacturer Name
- "www.myurl.com", //Manufacturer URL
- "myModelNumber", //Model Number
- "myDateOfManufacture", //Date of Manufacture
- "myPlatformVersion", //Platform Version
- "Manufacturer OS version", //Operating System Version
- "myHardwareVersion", //Hardware Version
- "myFirmwareVersion", //Firmware Version
- "www.mysupporturl.com", //Support URL
- String.valueOf(System.currentTimeMillis()) // System Time
+ "0A3E0D6F-DBF5-404E-8719-D6880042463A", // Platform ID
+ "myManufactName", // Manufacturer Name
+ "https://www.mylink.com", // Manufacturer Link
+ "myModelNumber", // Model Number
+ "2016-01-15", // Date of Manufacture
+ "myPlatformVersion", // Platform Version
+ "Manufacturer OS version", // Operating System Version
+ "myHardwareVersion", // Hardware Version
+ "myFirmwareVersion", // Firmware Version
+ "https://www.mysupportlink.com", // Support Link
+ String.valueOf(System.currentTimeMillis()) // System Time
);
try {
msg("Registering platform info");
#endif
char *gResourceUri= (char *)"/a/light";
-const char *dateOfManufacture = "myDateOfManufacture";
+const char *dateOfManufacture = "2016-01-15";
const char *deviceName = "myDeviceName";
-const char *deviceUUID = "myDeviceUUID";
+const char *deviceUUID = "51b55ddc-ccbb-4cb3-a57f-494eeca13a21";
const char *firmwareVersion = "myFirmwareVersion";
const char *manufacturerName = "myName";
const char *operatingSystemVersion = "myOS";
const char *hardwareVersion = "myHardwareVersion";
-const char* platformID = "myPlatformID";
-const char *manufacturerUrl = "myManufacturerUrl";
+const char *platformID = "0A3E0D6F-DBF5-404E-8719-D6880042463A";
+const char *manufacturerLink = "https://www.iotivity.org";
const char *modelNumber = "myModelNumber";
const char *platformVersion = "myPlatformVersion";
-const char *supportUrl = "mySupportUrl";
+const char *supportLink = "https://www.iotivity.org";
const char *version = "myVersion";
const char *systemTime = "2015-05-15T11.04";
-const char *specVersion = "myDeviceSpecVersion";
-const char *dataModelVersions = "myDeviceModelVersions";
+const char *specVersion = "core.1.1.0";
+const char *dataModelVersions = "res.1.1.0";
// Entity handler should check for resourceTypeName and ResourceInterface in order to GET
// the existence of a known resource
OCSetDefaultDeviceEntityHandler(OCDeviceEntityHandlerCb, NULL);
OCStackResult registrationResult =
- SetPlatformInfo(platformID, manufacturerName, manufacturerUrl, modelNumber,
+ SetPlatformInfo(platformID, manufacturerName, manufacturerLink, modelNumber,
dateOfManufacture, platformVersion, operatingSystemVersion, hardwareVersion,
- firmwareVersion, supportUrl, systemTime);
+ firmwareVersion, supportLink, systemTime);
if (registrationResult != OC_STACK_OK)
{
#endif
char *gResourceUri= (char *)"/a/light";
-const char *dateOfManufacture = "myDateOfManufacture";
+const char *dateOfManufacture = "2016-01-15";
const char *deviceName = "myDeviceName";
-const char *deviceUUID = "myDeviceUUID";
+const char *deviceUUID = "51b55ddc-ccbb-4cb3-a57f-494eeca13a21";
const char *firmwareVersion = "myFirmwareVersion";
const char *manufacturerName = "myName";
const char *operatingSystemVersion = "myOS";
const char *hardwareVersion = "myHardwareVersion";
-const char* platformID = "myPlatformID";
-const char *manufacturerUrl = "myManufacturerUrl";
+const char *platformID = "0A3E0D6F-DBF5-404E-8719-D6880042463A";
+const char *manufacturerLink = "https://www.iotivity.org";
const char *modelNumber = "myModelNumber";
const char *platformVersion = "myPlatformVersion";
-const char *supportUrl = "mySupportUrl";
+const char *supportLink = "https://www.iotivity.org";
const char *version = "myVersion";
const char *systemTime = "2015-05-15T11.04";
-const char *specVersion = "myDeviceSpecVersion";
-const char *dataModelVersions = "myDeviceModelVersions";
+const char *specVersion = "core.1.1.0";
+const char *dataModelVersions = "res.1.1.0";
// Entity handler should check for resourceTypeName and ResourceInterface in order to GET
// the existence of a known resource
OCSetDefaultDeviceEntityHandler(OCDeviceEntityHandlerCb, NULL);
OCStackResult registrationResult =
- SetPlatformInfo(platformID, manufacturerName, manufacturerUrl, modelNumber,
+ SetPlatformInfo(platformID, manufacturerName, manufacturerLink, modelNumber,
dateOfManufacture, platformVersion, operatingSystemVersion, hardwareVersion,
- firmwareVersion, supportUrl, systemTime);
+ firmwareVersion, supportLink, systemTime);
if (registrationResult != OC_STACK_OK)
{
using namespace OC;
// Set of strings for each of platform Info fields
-std::string dateOfManufacture = "myDateOfManufacture";
-std::string firmwareVersion = "my.Firmware.Version";
-std::string manufacturerName = "myName";
-std::string operatingSystemVersion = "myOS";
-std::string hardwareVersion = "myHardwareVersion";
-std::string platformID = "myPlatformID";
-std::string manufacturerLink = "www.myurl.com";
-std::string modelNumber = "myModelNumber";
-std::string platformVersion = "platformVersion";
-std::string supportLink = "www.mysupporturl.com";
-std::string systemTime = "mySystemTime";
+std::string platformID = "0A3E0D6F-DBF5-404E-8719-D6880042463A";
+std::string manufacturerName = "myName";
+std::string manufacturerLink = "https://www.example.com";
+std::string modelNumber = "myModelNumber";
+std::string dateOfManufacture = "2016-01-15";
+std::string platformVersion = "platformVersion";
+std::string operatingSystemVersion = "myOS";
+std::string hardwareVersion = "myHardwareVersion";
+std::string firmwareVersion = "1.0";
+std::string supportLink = "https://www.examplesupport.com";
+std::string systemTime = "2016-01-15T11.01";
// Set of strings for each of device info fields
-std::string deviceName = "Bill's Battlestar";
-std::string specVersion = "myDeviceSpecVersion";
-std::string dataModelVersions = "myDeviceModelVersion";
+std::string deviceName = "Bill's Battlestar";
+std::string specVersion = "core.1.1.0";
+std::string dataModelVersions = "res.1.1.0";
// OCPlatformInfo Contains all the platform info to be stored
OCPlatformInfo platformInfo;