From 483f3849eaaa14f2bb80c5bc62f188e331a699b5 Mon Sep 17 00:00:00 2001 From: "hyuna0213.jo" Date: Fri, 29 May 2015 14:03:32 +0900 Subject: [PATCH] Rename camsgparser to cafragmentation in adapter_util directory file naming convention should be consistent throughout the entire code. camsgparser seems to mean the control layer functionality. Change-Id: Idb5d31fb4b480e879cb50b70588cc6ef24c6a8a6 Signed-off-by: hyuna0213.jo Reviewed-on: https://gerrit.iotivity.org/gerrit/1134 Tested-by: jenkins-iotivity Reviewed-by: Jaehong Jo Reviewed-by: jihwan seo Reviewed-by: Naga Ashok Jampani Reviewed-by: Erich Keane --- .../csdk/connectivity/build/android/jni/Android.mk | 2 +- .../build/arduino/arduinomega.properties | 2 +- .../inc/{camsgparser.h => cafragmentation.h} | 16 ++++++------- resource/csdk/connectivity/src/SConscript | 2 +- .../{camsgparser.c => cafragmentation.c} | 26 +++++++++++----------- .../connectivity/src/bt_edr_adapter/caedradapter.c | 2 +- .../connectivity/src/bt_le_adapter/caleadapter.c | 2 +- .../src/bt_le_adapter/caleadapter_singlethread.c | 2 +- .../src/bt_le_adapter/tizen/cableclient.c | 2 +- .../src/bt_le_adapter/tizen/cableserver.c | 2 +- 10 files changed, 29 insertions(+), 29 deletions(-) rename resource/csdk/connectivity/inc/{camsgparser.h => cafragmentation.h} (90%) rename resource/csdk/connectivity/src/adapter_util/{camsgparser.c => cafragmentation.c} (70%) diff --git a/resource/csdk/connectivity/build/android/jni/Android.mk b/resource/csdk/connectivity/build/android/jni/Android.mk index 158e359..104f536 100644 --- a/resource/csdk/connectivity/build/android/jni/Android.mk +++ b/resource/csdk/connectivity/build/android/jni/Android.mk @@ -173,7 +173,7 @@ LOCAL_SRC_FILES = \ camessagehandler.c canetworkconfigurator.c caprotocolmessage.c \ caretransmission.c caqueueingthread.c \ $(ADAPTER_UTILS)/caadapternetdtls.c $(ADAPTER_UTILS)/caadapterutils.c \ - $(ADAPTER_UTILS)/camsgparser.c \ + $(ADAPTER_UTILS)/cafragmentation.c \ bt_le_adapter/caleadapter.c $(LE_ADAPTER_PATH)/caleclient.c \ $(LE_ADAPTER_PATH)/caleserver.c $(LE_ADAPTER_PATH)/caleutils.c \ $(LE_ADAPTER_PATH)/calenwmonitor.c \ diff --git a/resource/csdk/connectivity/build/arduino/arduinomega.properties b/resource/csdk/connectivity/build/arduino/arduinomega.properties index 9d55105..7227798 100755 --- a/resource/csdk/connectivity/build/arduino/arduinomega.properties +++ b/resource/csdk/connectivity/build/arduino/arduinomega.properties @@ -95,7 +95,7 @@ CORE_CPPOBJ = CDC.cpp.o HardwareSerial.cpp.o HardwareSerial0.cpp.o HardwareSeria main.cpp.o new.cpp.o Print.cpp.o Stream.cpp.o Tone.cpp.o USBCore.cpp.o WMath.cpp.o WString.cpp.o SPI_OBJ = SPI.cpp.o LOGGER_OBJ = logger.c.o oic_logger.c.o oic_console_logger.c.o oic_malloc.c.o oic_string.c.o uarraylist.c.o -UTIL_OBJ = caadapterutils.c.o camsgparser.c.o +UTIL_OBJ = caadapterutils.c.o cafragmentation.c.o CACOMMON_OBJ = caconnectivitymanager_singlethread.c.o cainterfacecontroller_singlethread.c.o camessagehandler_singlethread.c.o canetworkconfigurator_singlethread.c.o caprotocolmessage_singlethread.c.o \ caremotehandler.c.o caretransmission_singlethread.c.o diff --git a/resource/csdk/connectivity/inc/camsgparser.h b/resource/csdk/connectivity/inc/cafragmentation.h similarity index 90% rename from resource/csdk/connectivity/inc/camsgparser.h rename to resource/csdk/connectivity/inc/cafragmentation.h index 6780860..6c5d98b 100644 --- a/resource/csdk/connectivity/inc/camsgparser.h +++ b/resource/csdk/connectivity/inc/cafragmentation.h @@ -25,8 +25,8 @@ * fragmentation and reassemebly. */ -#ifndef CA_MSG_PARSER_H_ -#define CA_MSG_PARSER_H_ +#ifndef CA_FRAGMENTATION_H_ +#define CA_FRAGMENTATION_H_ #include "cacommon.h" #include "logger.h" @@ -129,7 +129,7 @@ extern "C" /***************************************************************** * @file The CA Header format - * @brief CA Header will be difined by 2 bytes of Header. + * @brief CA Header will be defined by 2 bytes of Header. * First two bits : Header version(Currently Its not being used) * Third bit and fourth bit: Reserved bits for future use. * 5th to 16th bit : 12 bits to provide the length of the data. @@ -138,15 +138,15 @@ extern "C" /** * @fn CAGenerateHeader * @brief This function is used to generate the CA specific header to maintain the fragmentation -* logic. The header sturcture explained above will be formed and returned to the caller. +* logic. The header structure explained above will be formed and returned to the caller. * -* @param[in] data Pointer to the charcter data which needs to be printed. +* @param[in] data Pointer to the character data which needs to be printed. * @param[in] length The total legth of the data which will be represented from 5th -16th bits * in the header. * * @return CA_STATUS_OK on success. One of theCA_STATUS_FAILED or other error values on error. * @retval CA_STATUS_OK Successful -* @retval CA_STATUS_INVALID_PARAM Invalid input argumets +* @retval CA_STATUS_INVALID_PARAM Invalid input arguments * @retval CA_STATUS_FAILED Operation failed */ CAResult_t CAGenerateHeader(char *header, uint32_t length); @@ -156,7 +156,7 @@ CAResult_t CAGenerateHeader(char *header, uint32_t length); * @brief This function is used to parse the header in the receiver end. This function will * provide the information of the total length of the data which has been fragmented. * -* @param[in] header Pointer to the charcter data which contains the header information. +* @param[in] header Pointer to the character data which contains the header information. * Note that pointer should point to two bytes of data header * which needs to be parsed. * @@ -167,5 +167,5 @@ uint32_t CAParseHeader(const char *header); } /* extern "C" */ #endif -#endif /* CA_MSG_PARSER_H_ */ +#endif /* CA_FRAGMENTATION_H_ */ diff --git a/resource/csdk/connectivity/src/SConscript b/resource/csdk/connectivity/src/SConscript index 207fce8..f7a3fa2 100755 --- a/resource/csdk/connectivity/src/SConscript +++ b/resource/csdk/connectivity/src/SConscript @@ -47,7 +47,7 @@ if env.get('SECURED') == '1': env.AppendUnique(CA_SRC=[ca_path+'adapter_util/caadapterutils.c']) -env.AppendUnique(CA_SRC=[ca_path+'adapter_util/camsgparser.c']) +env.AppendUnique(CA_SRC=[ca_path+'adapter_util/cafragmentation.c']) if env.get('SECURED') == '1': env.AppendUnique(CA_SRC=[ca_path+'adapter_util/caadapternetdtls.c']) env.AppendUnique(CPPPATH = [root_dir + '/external/inc/']) diff --git a/resource/csdk/connectivity/src/adapter_util/camsgparser.c b/resource/csdk/connectivity/src/adapter_util/cafragmentation.c similarity index 70% rename from resource/csdk/connectivity/src/adapter_util/camsgparser.c rename to resource/csdk/connectivity/src/adapter_util/cafragmentation.c index 16e8bde..fc39b96 100644 --- a/resource/csdk/connectivity/src/adapter_util/camsgparser.c +++ b/resource/csdk/connectivity/src/adapter_util/cafragmentation.c @@ -18,30 +18,30 @@ * ******************************************************************/ -#include "camsgparser.h" - #include #include #include "cacommon.h" #include "caadapterutils.h" +#include "cafragmentation.h" /** - * @var CA_MSG_PARSER_TAG - * @brief debugging tag for parser module + * @var CA_FRAGMENTATION_TAG + * @brief debugging tag for fragmentation module */ -#define CA_MSG_PARSER_TAG "CA_MSG_PARSER" +#define CA_FRAGMENTATION_TAG "CA_FRAGMENTATION" CAResult_t CAGenerateHeader(char *header, uint32_t length) { - OIC_LOG(DEBUG, CA_MSG_PARSER_TAG, "IN"); + OIC_LOG(DEBUG, CA_FRAGMENTATION_TAG, "IN"); - VERIFY_NON_NULL(header, CA_MSG_PARSER_TAG, "header is NULL"); + VERIFY_NON_NULL(header, CA_FRAGMENTATION_TAG, "header is NULL"); memset(header, 0x0, sizeof(char) * CA_HEADER_LENGTH); if(length > MAX_DATA_LENGTH_SUPPORTED) { - OIC_LOG(DEBUG, CA_MSG_PARSER_TAG, "Given length is more than 4095.It will be truncated"); + OIC_LOG(DEBUG, CA_FRAGMENTATION_TAG, + "Given length is more than 4095.It will be truncated"); } //if length is more than 4095 then it will be truncated. header[1] = length & 0xFF; @@ -49,20 +49,20 @@ CAResult_t CAGenerateHeader(char *header, uint32_t length) header[0] = length & 0x0F; header[0] = header[0] | 0x40; // Adding version 0100.(Not used. Future use) - OIC_LOG(DEBUG, CA_MSG_PARSER_TAG, "OUT"); + OIC_LOG(DEBUG, CA_FRAGMENTATION_TAG, "OUT"); + return CA_STATUS_OK; } uint32_t CAParseHeader(const char *header) { - OIC_LOG(DEBUG, CA_MSG_PARSER_TAG, "IN"); + OIC_LOG(DEBUG, CA_FRAGMENTATION_TAG, "IN"); - VERIFY_NON_NULL(header, CA_MSG_PARSER_TAG, "header is NULL"); + VERIFY_NON_NULL(header, CA_FRAGMENTATION_TAG, "header is NULL"); uint32_t dataLen = ((header[0] & 0x0F) << 8) | (header[1] & 0xFF); - OIC_LOG(DEBUG, CA_MSG_PARSER_TAG, "OUT"); + OIC_LOG(DEBUG, CA_FRAGMENTATION_TAG, "OUT"); return dataLen; } - diff --git a/resource/csdk/connectivity/src/bt_edr_adapter/caedradapter.c b/resource/csdk/connectivity/src/bt_edr_adapter/caedradapter.c index 2db5548..dc642f0 100644 --- a/resource/csdk/connectivity/src/bt_edr_adapter/caedradapter.c +++ b/resource/csdk/connectivity/src/bt_edr_adapter/caedradapter.c @@ -29,7 +29,7 @@ #include "caedrinterface.h" #include "caadapterutils.h" #include "logger.h" -#include "camsgparser.h" +#include "cafragmentation.h" #include "caqueueingthread.h" #include "oic_malloc.h" diff --git a/resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c b/resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c index 69cde76..3528ac8 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c +++ b/resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c @@ -27,7 +27,7 @@ #include "camutex.h" #include "caadapterutils.h" #include "caqueueingthread.h" -#include "camsgparser.h" +#include "cafragmentation.h" #include "oic_malloc.h" #include "oic_string.h" diff --git a/resource/csdk/connectivity/src/bt_le_adapter/caleadapter_singlethread.c b/resource/csdk/connectivity/src/bt_le_adapter/caleadapter_singlethread.c index 7e6c1af..c5b90c9 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/caleadapter_singlethread.c +++ b/resource/csdk/connectivity/src/bt_le_adapter/caleadapter_singlethread.c @@ -23,7 +23,7 @@ #include "cableserver.h" #include "logger.h" #include "caadapterutils.h" -#include "camsgparser.h" +#include "cafragmentation.h" #define TAG "LAD" diff --git a/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableclient.c b/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableclient.c index 1d47591..eb71734 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableclient.c +++ b/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableclient.c @@ -34,7 +34,7 @@ #include "uarraylist.h" #include "caqueueingthread.h" #include "caadapterutils.h" -#include "camsgparser.h" +#include "cafragmentation.h" #include "oic_string.h" #include "oic_malloc.h" diff --git a/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableserver.c b/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableserver.c index bfe3d8a..baa636d 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableserver.c +++ b/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableserver.c @@ -30,7 +30,7 @@ #include "camutex.h" #include "caqueueingthread.h" #include "caadapterutils.h" -#include "camsgparser.h" +#include "cafragmentation.h" #include "cableutil.h" #include "oic_string.h" #include "oic_malloc.h" -- 2.7.4