Change settings on deviceInfo and platformInfo in samples as per specs.
authorZiran Sun <ziran.sun@samsung.com>
Mon, 10 Oct 2016 14:17:10 +0000 (15:17 +0100)
committerZiran Sun <ziran.sun@samsung.com>
Wed, 12 Oct 2016 12:22:56 +0000 (12:22 +0000)
Bug: https://jira.iotivity.org/browse/IOT-1435
Change-Id: I9de03c0c6c09d4632503f9ad8f2943c9f1468527
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13051
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
android/examples/devicediscoveryserver/src/main/java/org/iotivity/base/examples/DeviceDiscoveryServer.java
resource/csdk/stack/samples/linux/SimpleClientServer/ocserver.cpp
resource/csdk/stack/samples/tizen/SimpleClientServer/ocserver.cpp
resource/examples/devicediscoveryserver.cpp

index c0d96b7..db35c11 100644 (file)
@@ -77,17 +77,17 @@ public class DeviceDiscoveryServer extends Activity {
         }
 
         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");
index 2acfc24..7602e40 100644 (file)
@@ -71,22 +71,22 @@ static bool observeThreadStarted = false;
 #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
@@ -1080,9 +1080,9 @@ int main(int argc, char* argv[])
     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)
     {
index b5fc0ca..569aa81 100644 (file)
@@ -63,22 +63,22 @@ static int stopPresenceCount = 10;
 #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
@@ -1014,9 +1014,9 @@ int main(int argc, char* argv[])
     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)
     {
index 1c85547..d92fd5b 100644 (file)
 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;