X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fconnectivity%2Finc%2Fcafragmentation.h;h=be96caf857de0867d4d7ed0cc6ecf89039158526;hb=7f00f942c39b7bc27c7eeecf213a239c3fe4173c;hp=0aff468ed318cc68df0f5ecdd0fe9b90018888c0;hpb=edcfc3d2329da7b914771c0dcff5f42c9b74fd93;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/connectivity/inc/cafragmentation.h b/resource/csdk/connectivity/inc/cafragmentation.h index 0aff468..be96caf 100644 --- a/resource/csdk/connectivity/inc/cafragmentation.h +++ b/resource/csdk/connectivity/inc/cafragmentation.h @@ -33,11 +33,6 @@ #include "logger.h" /** - * The MTU supported for BLE adapter - */ -#define CA_SUPPORTED_BLE_MTU_SIZE 20 - -/** * The maximum port value for BLE packet format */ #define CA_SUPPORTED_BLE_MAX_PORT 127 @@ -127,7 +122,8 @@ typedef enum { CAResult_t CAGenerateVariableForFragmentation(size_t dataLength, uint32_t *midPacketCount, size_t *remainingLen, - size_t *totalLength); + size_t *totalLength, + uint16_t mtuSize); /** * This function is used to generate the CA BLE header to @@ -214,16 +210,18 @@ CAResult_t CAMakeFirstDataSegment(uint8_t *dataSegment, * to maintain the fragmentation logic. start data segment is included * 2 bytes header and transmit data. * - * @param[out] dataSegment Pointer to the octet array that will - * contain the generated data packet. - * @param[in] data Data to the octet array that required - * transmittin to remote device. it will - * be embedded in 7th byte to data length. - * @param[in] dataLength The length of data size. - * @param[in] index Index to determine whether some of the - * total data - * @param[in] dataHeader Pointer to the octet array that contain - * data header. + * @param[out] dataSegment Pointer to the octet array that will + * contain the generated data packet. + * @param[in] segmentPayloadLength The length of data segment payload. + * @param[in] sourceData Data to the octet array that required + * transmission to remote device. it will + * be embedded in 7th byte to data length. + * @param[in] sourceDataLength The length of total data. + * @param[in] segmentNum Index to determine whether some of the + * total data + * @param[in] dataHeader Pointer to the octet array that contain + * data header. + * @param[in] mtuSize MTU size. * * @return ::CA_STATUS_OK on success. One of the CA_STATUS_FAILED * or other error values on error. @@ -232,10 +230,12 @@ CAResult_t CAMakeFirstDataSegment(uint8_t *dataSegment, * @retval ::CA_STATUS_FAILED Operation failed */ CAResult_t CAMakeRemainDataSegment(uint8_t *dataSegment, - const uint8_t *data, - const uint32_t dataLength, - const uint32_t index, - const uint8_t *dataHeader); + const uint32_t segmentPayloadLength, + const uint8_t *sourceData, + const uint32_t sourceDataLength, + const uint32_t segmentNum, + const uint8_t *dataHeader, + uint16_t mtuSize); /** * This function is used to parse the header in the receiver end. This