Rename camsgparser to cafragmentation in adapter_util directory
authorhyuna0213.jo <hyuna0213.jo@samsung.com>
Fri, 29 May 2015 05:03:32 +0000 (14:03 +0900)
committerErich Keane <erich.keane@intel.com>
Thu, 18 Jun 2015 16:40:31 +0000 (16:40 +0000)
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 <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1134
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Naga Ashok Jampani <jn.ashok@samsung.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>
resource/csdk/connectivity/build/android/jni/Android.mk
resource/csdk/connectivity/build/arduino/arduinomega.properties
resource/csdk/connectivity/inc/cafragmentation.h [moved from resource/csdk/connectivity/inc/camsgparser.h with 90% similarity]
resource/csdk/connectivity/src/SConscript
resource/csdk/connectivity/src/adapter_util/cafragmentation.c [moved from resource/csdk/connectivity/src/adapter_util/camsgparser.c with 70% similarity]
resource/csdk/connectivity/src/bt_edr_adapter/caedradapter.c
resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c
resource/csdk/connectivity/src/bt_le_adapter/caleadapter_singlethread.c
resource/csdk/connectivity/src/bt_le_adapter/tizen/cableclient.c
resource/csdk/connectivity/src/bt_le_adapter/tizen/cableserver.c

index 158e359..104f536 100644 (file)
@@ -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 \
index 9d55105..7227798 100755 (executable)
@@ -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
 
@@ -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_ */
 
index 207fce8..f7a3fa2 100755 (executable)
@@ -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/'])
  *
  ******************************************************************/
 
-#include "camsgparser.h"
-
 #include <string.h>
 #include <math.h>
 
 #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;
 }
 
-
index 2db5548..dc642f0 100644 (file)
@@ -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"
 
index 69cde76..3528ac8 100644 (file)
@@ -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"
 
index 7e6c1af..c5b90c9 100644 (file)
@@ -23,7 +23,7 @@
 #include "cableserver.h"
 #include "logger.h"
 #include "caadapterutils.h"
-#include "camsgparser.h"
+#include "cafragmentation.h"
 
 #define TAG "LAD"
 
index 1d47591..eb71734 100644 (file)
@@ -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"
 
index bfe3d8a..baa636d 100644 (file)
@@ -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"