- OC_LOG(INFO, TAG, "Usage : occlient -u <0|1> -t <1|2|3>");
- OC_LOG(INFO, TAG, "-u <0|1> : Perform multicast/unicast discovery of resources");
- OC_LOG(INFO, TAG, "-t 1 : Discover Resources");
- OC_LOG(INFO, TAG, "-t 2 : Discover Resources and Initiate Nonconfirmable Get Request");
- OC_LOG(INFO, TAG, "-t 3 : Discover Resources and Initiate Confirmable Get Request");
+ OIC_LOG(INFO, TAG, "Usage : occlient -c <0|1> -u <0|1> -t <1|2|3>");
+ OIC_LOG(INFO, TAG, "-c 0 : Default auto-selection");
+ OIC_LOG(INFO, TAG, "-c 1 : IP Connectivity Type");
+ OIC_LOG(INFO, TAG, "-u <0|1> : Perform multicast/unicast discovery of resources");
+ OIC_LOG(INFO, TAG, "-t 1 : Discover Resources");
+ OIC_LOG(INFO, TAG, "-t 2 : Discover Resources and Initiate Nonconfirmable Get Request");
+ OIC_LOG(INFO, TAG, "-t 3 : Discover Resources and Initiate Confirmable Get Request");
+ OIC_LOG(INFO, TAG, "-t 4 : Discover Resources and Initiate NonConfirmable Put Request");
+ OIC_LOG(INFO, TAG, "-t 5 : Discover Resources and Initiate Confirmable Put Request");
+}
+
+OCPayload* putPayload()
+{
+ OCRepPayload* payload = OCRepPayloadCreate();
+
+ if(!payload)
+ {
+ std::cout << "Failed to create put payload object"<<std::endl;
+ std::exit(1);
+ }
+
+ OCRepPayloadSetPropInt(payload, "power", 15);
+ OCRepPayloadSetPropBool(payload, "state", true);
+
+ return (OCPayload*) payload;