From a5ba37c49bbd420bfadd646c8b08cce18003a821 Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Thu, 6 Aug 2015 18:42:56 +0300 Subject: [PATCH] ocpayload.h: Factor out logging Signed-off-by: Gabriel Schulhof Change-Id: I35b7dac9a7877723da5ba3478193a3e8c78a78ed Reviewed-on: https://gerrit.iotivity.org/gerrit/2128 Reviewed-by: Erich Keane Tested-by: jenkins-iotivity --- resource/csdk/stack/include/ocpayload.h | 236 ------------------ resource/csdk/stack/include/payload_logging.h | 269 +++++++++++++++++++++ .../samples/linux/SimpleClientServer/occlient.cpp | 1 + .../linux/SimpleClientServer/occlientbasicops.cpp | 1 + .../linux/SimpleClientServer/occlientcoll.cpp | 1 + .../linux/SimpleClientServer/occlientslow.cpp | 1 + .../SimpleClientServer/ocremoteaccessclient.cpp | 1 + .../linux/SimpleClientServer/ocserverslow.cpp | 1 + .../samples/linux/secure/occlientbasicops.cpp | 1 + resource/csdk/stack/src/occollection.c | 1 + 10 files changed, 277 insertions(+), 236 deletions(-) create mode 100644 resource/csdk/stack/include/payload_logging.h diff --git a/resource/csdk/stack/include/ocpayload.h b/resource/csdk/stack/include/ocpayload.h index 7550059..4850d92 100644 --- a/resource/csdk/stack/include/ocpayload.h +++ b/resource/csdk/stack/include/ocpayload.h @@ -33,242 +33,6 @@ extern "C" typedef struct OCResource OCResource; -#ifdef TB_LOG - #define OC_LOG_PAYLOAD(level, tag, payload) OCPayloadLog((level),(tag),(payload)) - #define UUID_SIZE (16) - #define UUID_LENGTH (37) -const char *convertTriggerEnumToString(OCPresenceTrigger trigger); -OCPresenceTrigger convertTriggerStringToEnum(const char * triggerStr); - -static inline void OCPayloadLogRep(LogLevel level, const char* tag, OCRepPayload* payload) -{ - OC_LOG(level, tag, PCF("Payload Type: Representation")); - OCRepPayload* rep = payload; - int i = 1; - while(rep) - { - OC_LOG_V(level, tag, "\tResource #%d", i); - OC_LOG_V(level, tag, "\tURI:%s", rep->uri); - OC_LOG(level, tag, PCF("\tResource Types:")); - OCStringLL* strll = rep->types; - while(strll) - { - OC_LOG_V(level, tag, "\t\t%s", strll->value); - strll = strll->next; - } - OC_LOG(level, tag, PCF("\tInterfaces:")); - strll = rep->interfaces; - while(strll) - { - OC_LOG_V(level, tag, "\t\t%s", strll->value); - strll = strll->next; - } - - // TODO Finish Logging: Values - OCRepPayloadValue* val = rep->values; - - OC_LOG(level, tag, PCF("\tValues:")); - - while(val) - { - switch(val->type) - { - case OCREP_PROP_NULL: - OC_LOG_V(level, tag, "\t\t%s: NULL", val->name); - break; - case OCREP_PROP_INT: - OC_LOG_V(level, tag, "\t\t%s(int):%lld", val->name, val->i); - break; - case OCREP_PROP_DOUBLE: - OC_LOG_V(level, tag, "\t\t%s(double):%f", val->name, val->d); - break; - case OCREP_PROP_BOOL: - OC_LOG_V(level, tag, "\t\t%s(bool):%s", val->name, val->b ? "true" : "false"); - break; - case OCREP_PROP_STRING: - OC_LOG_V(level, tag, "\t\t%s(string):%s", val->name, val->str); - break; - case OCREP_PROP_OBJECT: - // Note: Only prints the URI (if available), to print further, you'll - // need to dig into the object better! - OC_LOG_V(level, tag, "\t\t%s(OCRep):%s", val->name, val->obj->uri); - break; - case OCREP_PROP_ARRAY: - switch(val->arr.type) - { - case OCREP_PROP_INT: - OC_LOG_V(level, tag, "\t\t%s(int array):%lld x %lld x %lld", - val->name, - val->arr.dimensions[0], val->arr.dimensions[1], - val->arr.dimensions[2]); - break; - case OCREP_PROP_DOUBLE: - OC_LOG_V(level, tag, "\t\t%s(double array):%lld x %lld x %lld", - val->name, - val->arr.dimensions[0], val->arr.dimensions[1], - val->arr.dimensions[2]); - break; - case OCREP_PROP_BOOL: - OC_LOG_V(level, tag, "\t\t%s(bool array):%lld x %lld x %lld", - val->name, - val->arr.dimensions[0], val->arr.dimensions[1], - val->arr.dimensions[2]); - break; - case OCREP_PROP_STRING: - OC_LOG_V(level, tag, "\t\t%s(string array):%lld x %lld x %lld", - val->name, - val->arr.dimensions[0], val->arr.dimensions[1], - val->arr.dimensions[2]); - break; - case OCREP_PROP_OBJECT: - OC_LOG_V(level, tag, "\t\t%s(OCRep array):%lld x %lld x %lld", - val->name, - val->arr.dimensions[0], val->arr.dimensions[1], - val->arr.dimensions[2]); - break; - default: - OC_LOG_V(ERROR, tag, "\t\t%s <-- Unknown/unsupported array type!", - val->name); - break; - } - break; - default: - OC_LOG_V(ERROR, tag, "\t\t%s <-- Unknown type!", val->name); - break; - } - val = val -> next; - } - - ++i; - rep = rep->next; - } - -} - -static inline void OCPayloadLogDiscovery(LogLevel level, const char* tag, - OCDiscoveryPayload* payload) -{ - OC_LOG(level, tag, PCF("Payload Type: Discovery")); - int i = 1; - - if(!payload->resources) - { - OC_LOG(level, tag, PCF("\tNO Resources")); - return; - } - - OCResourcePayload* res = payload->resources; - - while(res) - { - OC_LOG_V(level, tag, "\tResource #%d", i); - OC_LOG_V(level, tag, "\tURI:%s", res->uri); - OC_LOG(level, tag, PCF("\tSID:")); - OC_LOG_BUFFER(level, tag, res->sid, UUID_SIZE); - OC_LOG(level, tag, PCF("\tResource Types:")); - OCStringLL* strll = res->types; - while(strll) - { - OC_LOG_V(level, tag, "\t\t%s", strll->value); - strll = strll->next; - } - OC_LOG(level, tag, PCF("\tInterfaces:")); - strll = res->interfaces; - while(strll) - { - OC_LOG_V(level, tag, "\t\t%s", strll->value); - strll = strll->next; - } - - OC_LOG_V(level, tag, "\tBitmap: %u", res->bitmap); - OC_LOG_V(level, tag, "\tSecure?: %s", res->secure ? "true" : "false"); - OC_LOG_V(level, tag, "\tPort: %u", res->port); - OC_LOG(level, tag, PCF("")); - res = res->next; - ++i; - } -} - -static inline void OCPayloadLogDevice(LogLevel level, const char* tag, OCDevicePayload* payload) -{ - OC_LOG(level, tag, PCF("Payload Type: Device")); - OC_LOG_V(level, tag, "\tURI:%s", payload->uri); - OC_LOG(level, tag, PCF("\tSID:")); - OC_LOG_BUFFER(level, tag, payload->sid, UUID_SIZE); - OC_LOG_V(level, tag, "\tDevice Name:%s", payload->deviceName); - OC_LOG_V(level, tag, "\tSpec Version%s", payload->specVersion); - OC_LOG_V(level, tag, "\tData Model Version:%s", payload->dataModelVersion); -} - -static inline void OCPayloadLogPlatform(LogLevel level, const char* tag, OCPlatformPayload* payload) -{ - OC_LOG(level, tag, PCF("Payload Type: Platform")); - OC_LOG_V(level, tag, "\tURI:%s", payload->uri); - OC_LOG_V(level, tag, "\tPlatform ID:%s", payload->info.platformID); - OC_LOG_V(level, tag, "\tMfg Name:%s", payload->info.manufacturerName); - OC_LOG_V(level, tag, "\tMfg URL:%s", payload->info.manufacturerUrl); - OC_LOG_V(level, tag, "\tModel Number:%s", payload->info.modelNumber); - OC_LOG_V(level, tag, "\tDate of Mfg:%s", payload->info.dateOfManufacture); - OC_LOG_V(level, tag, "\tPlatform Version:%s", payload->info.platformVersion); - OC_LOG_V(level, tag, "\tOS Version:%s", payload->info.operatingSystemVersion); - OC_LOG_V(level, tag, "\tHardware Version:%s", payload->info.hardwareVersion); - OC_LOG_V(level, tag, "\tFirmware Version:%s", payload->info.firmwareVersion); - OC_LOG_V(level, tag, "\tSupport URL:%s", payload->info.supportUrl); - OC_LOG_V(level, tag, "\tSystem Time:%s", payload->info.systemTime); -} - -static inline void OCPayloadLogPresence(LogLevel level, const char* tag, OCPresencePayload* payload) -{ - OC_LOG(level, tag, PCF("Payload Type: Presence")); - OC_LOG_V(level, tag, "\tSequence Number:%u", payload->sequenceNumber); - OC_LOG_V(level, tag, "\tMax Age:%d", payload->maxAge); - OC_LOG_V(level, tag, "\tTrigger:%s", convertTriggerEnumToString(payload->trigger)); - OC_LOG_V(level, tag, "\tResource Type:%s", payload->resourceType); -} - -static inline void OCPayloadLogSecurity(LogLevel level, const char* tag, - OCSecurityPayload* payload) -{ - OC_LOG(level, tag, PCF("Payload Type: Security")); - OC_LOG_V(level, tag, "\tSecurity Data: %s", payload->securityData); -} - -static inline void OCPayloadLog(LogLevel level, const char* tag, OCPayload* payload) -{ - if(!payload) - { - OC_LOG(level, tag, PCF("NULL Payload")); - return; - } - switch(payload->type) - { - case PAYLOAD_TYPE_REPRESENTATION: - OCPayloadLogRep(level, tag, (OCRepPayload*)payload); - break; - case PAYLOAD_TYPE_DISCOVERY: - OCPayloadLogDiscovery(level, tag, (OCDiscoveryPayload*)payload); - break; - case PAYLOAD_TYPE_DEVICE: - OCPayloadLogDevice(level, tag, (OCDevicePayload*)payload); - break; - case PAYLOAD_TYPE_PLATFORM: - OCPayloadLogPlatform(level, tag, (OCPlatformPayload*)payload); - break; - case PAYLOAD_TYPE_PRESENCE: - OCPayloadLogPresence(level, tag, (OCPresencePayload*)payload); - break; - case PAYLOAD_TYPE_SECURITY: - OCPayloadLogSecurity(level, tag, (OCSecurityPayload*)payload); - break; - default: - OC_LOG_V(level, tag, "Unknown Payload Type: %d", payload->type); - break; - } -} -#else - #define OC_LOG_PAYLOAD(level, tag, payload) -#endif - void OCPayloadDestroy(OCPayload* payload); // Representation Payload diff --git a/resource/csdk/stack/include/payload_logging.h b/resource/csdk/stack/include/payload_logging.h new file mode 100644 index 0000000..acc207a --- /dev/null +++ b/resource/csdk/stack/include/payload_logging.h @@ -0,0 +1,269 @@ +//****************************************************************** +// +// Copyright 2015 Intel Mobile Communications GmbH All Rights Reserved. +// +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +#ifndef PAYLOAD_LOGGING_H_ +#define PAYLOAD_LOGGING_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#ifdef TB_LOG + #define OC_LOG_PAYLOAD(level, tag, payload) OCPayloadLog((level),(tag),(payload)) + #define UUID_SIZE (16) + #define UUID_LENGTH (37) +const char *convertTriggerEnumToString(OCPresenceTrigger trigger); +OCPresenceTrigger convertTriggerStringToEnum(const char * triggerStr); + +static inline void OCPayloadLogRep(LogLevel level, const char* tag, OCRepPayload* payload) +{ + OC_LOG(level, tag, PCF("Payload Type: Representation")); + OCRepPayload* rep = payload; + int i = 1; + while(rep) + { + OC_LOG_V(level, tag, "\tResource #%d", i); + OC_LOG_V(level, tag, "\tURI:%s", rep->uri); + OC_LOG(level, tag, PCF("\tResource Types:")); + OCStringLL* strll = rep->types; + while(strll) + { + OC_LOG_V(level, tag, "\t\t%s", strll->value); + strll = strll->next; + } + OC_LOG(level, tag, PCF("\tInterfaces:")); + strll = rep->interfaces; + while(strll) + { + OC_LOG_V(level, tag, "\t\t%s", strll->value); + strll = strll->next; + } + + // TODO Finish Logging: Values + OCRepPayloadValue* val = rep->values; + + OC_LOG(level, tag, PCF("\tValues:")); + + while(val) + { + switch(val->type) + { + case OCREP_PROP_NULL: + OC_LOG_V(level, tag, "\t\t%s: NULL", val->name); + break; + case OCREP_PROP_INT: + OC_LOG_V(level, tag, "\t\t%s(int):%lld", val->name, val->i); + break; + case OCREP_PROP_DOUBLE: + OC_LOG_V(level, tag, "\t\t%s(double):%f", val->name, val->d); + break; + case OCREP_PROP_BOOL: + OC_LOG_V(level, tag, "\t\t%s(bool):%s", val->name, val->b ? "true" : "false"); + break; + case OCREP_PROP_STRING: + OC_LOG_V(level, tag, "\t\t%s(string):%s", val->name, val->str); + break; + case OCREP_PROP_OBJECT: + // Note: Only prints the URI (if available), to print further, you'll + // need to dig into the object better! + OC_LOG_V(level, tag, "\t\t%s(OCRep):%s", val->name, val->obj->uri); + break; + case OCREP_PROP_ARRAY: + switch(val->arr.type) + { + case OCREP_PROP_INT: + OC_LOG_V(level, tag, "\t\t%s(int array):%lld x %lld x %lld", + val->name, + val->arr.dimensions[0], val->arr.dimensions[1], + val->arr.dimensions[2]); + break; + case OCREP_PROP_DOUBLE: + OC_LOG_V(level, tag, "\t\t%s(double array):%lld x %lld x %lld", + val->name, + val->arr.dimensions[0], val->arr.dimensions[1], + val->arr.dimensions[2]); + break; + case OCREP_PROP_BOOL: + OC_LOG_V(level, tag, "\t\t%s(bool array):%lld x %lld x %lld", + val->name, + val->arr.dimensions[0], val->arr.dimensions[1], + val->arr.dimensions[2]); + break; + case OCREP_PROP_STRING: + OC_LOG_V(level, tag, "\t\t%s(string array):%lld x %lld x %lld", + val->name, + val->arr.dimensions[0], val->arr.dimensions[1], + val->arr.dimensions[2]); + break; + case OCREP_PROP_OBJECT: + OC_LOG_V(level, tag, "\t\t%s(OCRep array):%lld x %lld x %lld", + val->name, + val->arr.dimensions[0], val->arr.dimensions[1], + val->arr.dimensions[2]); + break; + default: + OC_LOG_V(ERROR, tag, "\t\t%s <-- Unknown/unsupported array type!", + val->name); + break; + } + break; + default: + OC_LOG_V(ERROR, tag, "\t\t%s <-- Unknown type!", val->name); + break; + } + val = val -> next; + } + + ++i; + rep = rep->next; + } + +} + +static inline void OCPayloadLogDiscovery(LogLevel level, const char* tag, + OCDiscoveryPayload* payload) +{ + OC_LOG(level, tag, PCF("Payload Type: Discovery")); + int i = 1; + + if(!payload->resources) + { + OC_LOG(level, tag, PCF("\tNO Resources")); + return; + } + + OCResourcePayload* res = payload->resources; + + while(res) + { + OC_LOG_V(level, tag, "\tResource #%d", i); + OC_LOG_V(level, tag, "\tURI:%s", res->uri); + OC_LOG(level, tag, PCF("\tSID:")); + OC_LOG_BUFFER(level, tag, res->sid, UUID_SIZE); + OC_LOG(level, tag, PCF("\tResource Types:")); + OCStringLL* strll = res->types; + while(strll) + { + OC_LOG_V(level, tag, "\t\t%s", strll->value); + strll = strll->next; + } + OC_LOG(level, tag, PCF("\tInterfaces:")); + strll = res->interfaces; + while(strll) + { + OC_LOG_V(level, tag, "\t\t%s", strll->value); + strll = strll->next; + } + + OC_LOG_V(level, tag, "\tBitmap: %u", res->bitmap); + OC_LOG_V(level, tag, "\tSecure?: %s", res->secure ? "true" : "false"); + OC_LOG_V(level, tag, "\tPort: %u", res->port); + OC_LOG(level, tag, PCF("")); + res = res->next; + ++i; + } +} + +static inline void OCPayloadLogDevice(LogLevel level, const char* tag, OCDevicePayload* payload) +{ + OC_LOG(level, tag, PCF("Payload Type: Device")); + OC_LOG_V(level, tag, "\tURI:%s", payload->uri); + OC_LOG(level, tag, PCF("\tSID:")); + OC_LOG_BUFFER(level, tag, payload->sid, UUID_SIZE); + OC_LOG_V(level, tag, "\tDevice Name:%s", payload->deviceName); + OC_LOG_V(level, tag, "\tSpec Version%s", payload->specVersion); + OC_LOG_V(level, tag, "\tData Model Version:%s", payload->dataModelVersion); +} + +static inline void OCPayloadLogPlatform(LogLevel level, const char* tag, OCPlatformPayload* payload) +{ + OC_LOG(level, tag, PCF("Payload Type: Platform")); + OC_LOG_V(level, tag, "\tURI:%s", payload->uri); + OC_LOG_V(level, tag, "\tPlatform ID:%s", payload->info.platformID); + OC_LOG_V(level, tag, "\tMfg Name:%s", payload->info.manufacturerName); + OC_LOG_V(level, tag, "\tMfg URL:%s", payload->info.manufacturerUrl); + OC_LOG_V(level, tag, "\tModel Number:%s", payload->info.modelNumber); + OC_LOG_V(level, tag, "\tDate of Mfg:%s", payload->info.dateOfManufacture); + OC_LOG_V(level, tag, "\tPlatform Version:%s", payload->info.platformVersion); + OC_LOG_V(level, tag, "\tOS Version:%s", payload->info.operatingSystemVersion); + OC_LOG_V(level, tag, "\tHardware Version:%s", payload->info.hardwareVersion); + OC_LOG_V(level, tag, "\tFirmware Version:%s", payload->info.firmwareVersion); + OC_LOG_V(level, tag, "\tSupport URL:%s", payload->info.supportUrl); + OC_LOG_V(level, tag, "\tSystem Time:%s", payload->info.systemTime); +} + +static inline void OCPayloadLogPresence(LogLevel level, const char* tag, OCPresencePayload* payload) +{ + OC_LOG(level, tag, PCF("Payload Type: Presence")); + OC_LOG_V(level, tag, "\tSequence Number:%u", payload->sequenceNumber); + OC_LOG_V(level, tag, "\tMax Age:%d", payload->maxAge); + OC_LOG_V(level, tag, "\tTrigger:%s", convertTriggerEnumToString(payload->trigger)); + OC_LOG_V(level, tag, "\tResource Type:%s", payload->resourceType); +} + +static inline void OCPayloadLogSecurity(LogLevel level, const char* tag, + OCSecurityPayload* payload) +{ + OC_LOG(level, tag, PCF("Payload Type: Security")); + OC_LOG_V(level, tag, "\tSecurity Data: %s", payload->securityData); +} + +static inline void OCPayloadLog(LogLevel level, const char* tag, OCPayload* payload) +{ + if(!payload) + { + OC_LOG(level, tag, PCF("NULL Payload")); + return; + } + switch(payload->type) + { + case PAYLOAD_TYPE_REPRESENTATION: + OCPayloadLogRep(level, tag, (OCRepPayload*)payload); + break; + case PAYLOAD_TYPE_DISCOVERY: + OCPayloadLogDiscovery(level, tag, (OCDiscoveryPayload*)payload); + break; + case PAYLOAD_TYPE_DEVICE: + OCPayloadLogDevice(level, tag, (OCDevicePayload*)payload); + break; + case PAYLOAD_TYPE_PLATFORM: + OCPayloadLogPlatform(level, tag, (OCPlatformPayload*)payload); + break; + case PAYLOAD_TYPE_PRESENCE: + OCPayloadLogPresence(level, tag, (OCPresencePayload*)payload); + break; + case PAYLOAD_TYPE_SECURITY: + OCPayloadLogSecurity(level, tag, (OCSecurityPayload*)payload); + break; + default: + OC_LOG_V(level, tag, "Unknown Payload Type: %d", payload->type); + break; + } +} +#else + #define OC_LOG_PAYLOAD(level, tag, payload) +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/resource/csdk/stack/samples/linux/SimpleClientServer/occlient.cpp b/resource/csdk/stack/samples/linux/SimpleClientServer/occlient.cpp index d828286..533436a 100644 --- a/resource/csdk/stack/samples/linux/SimpleClientServer/occlient.cpp +++ b/resource/csdk/stack/samples/linux/SimpleClientServer/occlient.cpp @@ -29,6 +29,7 @@ #include "logger.h" #include "occlient.h" #include "ocpayload.h" +#include "payload_logging.h" // Tracking user input static int UNICAST_DISCOVERY = 0; diff --git a/resource/csdk/stack/samples/linux/SimpleClientServer/occlientbasicops.cpp b/resource/csdk/stack/samples/linux/SimpleClientServer/occlientbasicops.cpp index 17e4ba8..ce00796 100644 --- a/resource/csdk/stack/samples/linux/SimpleClientServer/occlientbasicops.cpp +++ b/resource/csdk/stack/samples/linux/SimpleClientServer/occlientbasicops.cpp @@ -30,6 +30,7 @@ #include "logger.h" #include "occlientbasicops.h" #include "ocpayload.h" +#include "payload_logging.h" #include "oic_malloc.h" #include "oic_string.h" diff --git a/resource/csdk/stack/samples/linux/SimpleClientServer/occlientcoll.cpp b/resource/csdk/stack/samples/linux/SimpleClientServer/occlientcoll.cpp index a544ada..23392f9 100644 --- a/resource/csdk/stack/samples/linux/SimpleClientServer/occlientcoll.cpp +++ b/resource/csdk/stack/samples/linux/SimpleClientServer/occlientcoll.cpp @@ -27,6 +27,7 @@ #include #include #include "ocpayload.h" +#include "payload_logging.h" #include "logger.h" const char *getResult(OCStackResult result); std::string getIPAddrTBServer(OCClientResponse * clientResponse); diff --git a/resource/csdk/stack/samples/linux/SimpleClientServer/occlientslow.cpp b/resource/csdk/stack/samples/linux/SimpleClientServer/occlientslow.cpp index aed6f4b..abf0e52 100644 --- a/resource/csdk/stack/samples/linux/SimpleClientServer/occlientslow.cpp +++ b/resource/csdk/stack/samples/linux/SimpleClientServer/occlientslow.cpp @@ -30,6 +30,7 @@ #include "occlientslow.h" #include "oic_string.h" #include "ocpayload.h" +#include "payload_logging.h" // Tracking user input static int UNICAST_DISCOVERY = 0; diff --git a/resource/csdk/stack/samples/linux/SimpleClientServer/ocremoteaccessclient.cpp b/resource/csdk/stack/samples/linux/SimpleClientServer/ocremoteaccessclient.cpp index 89da3ff..4f82a02 100644 --- a/resource/csdk/stack/samples/linux/SimpleClientServer/ocremoteaccessclient.cpp +++ b/resource/csdk/stack/samples/linux/SimpleClientServer/ocremoteaccessclient.cpp @@ -28,6 +28,7 @@ #include "ocstack.h" #include "logger.h" #include "ocpayload.h" +#include "payload_logging.h" #include "ocremoteaccessclient.h" // Tracking user input diff --git a/resource/csdk/stack/samples/linux/SimpleClientServer/ocserverslow.cpp b/resource/csdk/stack/samples/linux/SimpleClientServer/ocserverslow.cpp index fed8f34..d6d805a 100644 --- a/resource/csdk/stack/samples/linux/SimpleClientServer/ocserverslow.cpp +++ b/resource/csdk/stack/samples/linux/SimpleClientServer/ocserverslow.cpp @@ -33,6 +33,7 @@ #include "cJSON.h" #include "ocserverslow.h" #include "ocpayload.h" +#include "payload_logging.h" volatile sig_atomic_t gQuitFlag = 0; diff --git a/resource/csdk/stack/samples/linux/secure/occlientbasicops.cpp b/resource/csdk/stack/samples/linux/secure/occlientbasicops.cpp index d56a790..b375da1 100644 --- a/resource/csdk/stack/samples/linux/secure/occlientbasicops.cpp +++ b/resource/csdk/stack/samples/linux/secure/occlientbasicops.cpp @@ -29,6 +29,7 @@ #include "logger.h" #include "occlientbasicops.h" #include "ocpayload.h" +#include "payload_logging.h" #include "oic_string.h" #include "common.h" diff --git a/resource/csdk/stack/src/occollection.c b/resource/csdk/stack/src/occollection.c index 625f5fd..87664e2 100644 --- a/resource/csdk/stack/src/occollection.c +++ b/resource/csdk/stack/src/occollection.c @@ -35,6 +35,7 @@ #include "oic_malloc.h" #include "oic_string.h" #include "ocpayload.h" +#include "payload_logging.h" /// Module Name #include -- 2.7.4