From 4047a3941b3ead406755add2671282ee5ba0e2a1 Mon Sep 17 00:00:00 2001 From: "jihwan.seo" Date: Mon, 27 Jul 2015 21:08:13 +0900 Subject: [PATCH] modified comment for doxygen. Fixed several files with out of date or incorrect doxygen comments Change-Id: Iddd76b6aed32de74c819d3794e6845401561bae5 Signed-off-by: jihwan.seo Reviewed-on: https://gerrit.iotivity.org/gerrit/1939 Reviewed-by: Ashok Babu Channa Tested-by: jenkins-iotivity Reviewed-by: Jon A. Cruz --- resource/csdk/connectivity/inc/caadapterutils.h | 184 +++++++------- resource/csdk/connectivity/inc/caedradapter.h | 74 +++--- resource/csdk/connectivity/inc/caedrinterface.h | 2 +- .../csdk/connectivity/inc/cainterfacecontroller.h | 85 ++++--- resource/csdk/connectivity/inc/caipadapter.h | 14 +- resource/csdk/connectivity/inc/caipinterface.h | 106 ++++---- resource/csdk/connectivity/inc/caleadapter.h | 58 ++--- resource/csdk/connectivity/inc/caleinterface.h | 271 ++++++++++----------- .../csdk/connectivity/inc/canetworkconfigurator.h | 28 +-- resource/csdk/connectivity/inc/caprotocolmessage.h | 186 +++++++------- resource/csdk/connectivity/inc/caqueueingthread.h | 56 ++--- resource/csdk/connectivity/inc/caretransmission.h | 94 +++---- 12 files changed, 553 insertions(+), 605 deletions(-) diff --git a/resource/csdk/connectivity/inc/caadapterutils.h b/resource/csdk/connectivity/inc/caadapterutils.h index 5c0b652..c1e17c7 100644 --- a/resource/csdk/connectivity/inc/caadapterutils.h +++ b/resource/csdk/connectivity/inc/caadapterutils.h @@ -47,8 +47,7 @@ extern "C" #endif /** - * @def VERIFY_NON_NULL_RET - * @brief Macro to verify the validity of input argument + * Macro to verify the validity of input argument. */ #define VERIFY_NON_NULL_RET(arg, log_tag, log_message,ret) \ if (NULL == arg) { \ @@ -57,15 +56,13 @@ extern "C" } \ /** - * @def VERIFY_NON_NULL - * @brief Macro to verify the validity of input argument + * Macro to verify the validity of input argument. */ #define VERIFY_NON_NULL(arg, log_tag, log_message) \ VERIFY_NON_NULL_RET((arg), (log_tag), (log_message), CA_STATUS_INVALID_PARAM) /** - * @def VERIFY_NON_NULL_VOID - * @brief Macro to verify the validity of input argument + * Macro to verify the validity of input argument. */ #define VERIFY_NON_NULL_VOID(arg, log_tag, log_message) \ if (NULL == arg) { \ @@ -74,76 +71,73 @@ extern "C" } \ /** - * @brief Length of network interface name. + * Length of network interface name. */ #define CA_INTERFACE_NAME_SIZE 16 /** - * @def IPV4_ADDR_ONE_OCTECT_LEN - * @brief Macro to allocate memory for ipv4 address in the form of uint8_t. + * Macro to allocate memory for ipv4 address in the form of uint8_t. */ #define IPV4_ADDR_ONE_OCTECT_LEN 4 #ifdef SINGLE_THREAD /** - * @brief Network Interface Information. Only needed for Arduino. + * Network Interface Information. Only needed for Arduino. */ typedef struct { - char ipAddress[CA_IPADDR_SIZE]; /**< Address of the interface **/ - char subnetMask[CA_IPADDR_SIZE]; /**< Maintains interface subnetmask **/ - char interfaceName[CA_INTERFACE_NAME_SIZE]; /**< Interface name**/ + char ipAddress[CA_IPADDR_SIZE]; /**< Address of the interface. **/ + char subnetMask[CA_IPADDR_SIZE]; /**< Maintains interface subnetmask. **/ + char interfaceName[CA_INTERFACE_NAME_SIZE]; /**< Interface name. **/ } CANetInfo_t; #endif /** - * @brief unicast and multicast server information. + * unicast and multicast server information. */ typedef struct { - int socketFd; /**< Socket decriptor **/ - CAEndpoint_t endpoint; /**< endpoint description **/ - bool isServerStarted; /**< Indicates server started **/ - bool isMulticastServer; /**< Indicates multicast server **/ - char ifAddr[CA_IPADDR_SIZE]; /**< Address of the multicast interface **/ - char interfaceName[CA_INTERFACE_NAME_SIZE]; /**< Interface Name **/ - char subNetMask[CA_IPADDR_SIZE]; /**< Subnet Mask **/ + int socketFd; /**< Socket descriptor. **/ + CAEndpoint_t endpoint; /**< endpoint description. **/ + bool isServerStarted; /**< Indicates server started. **/ + bool isMulticastServer; /**< Indicates multicast server. **/ + char ifAddr[CA_IPADDR_SIZE]; /**< Address of the multicast interface. **/ + char interfaceName[CA_INTERFACE_NAME_SIZE]; /**< Interface Name. **/ + char subNetMask[CA_IPADDR_SIZE]; /**< Subnet Mask. **/ } CAServerInfo_t; /** - * @brief To log the PDU data + * To log the PDU data. */ void CALogPDUData(coap_pdu_t *pdu); /** - * @fn CAParseIPv4AddressInternal - * @brief To parse the IP address and port from "ipaddress:port" - * @param ipAddrStr [IN] IP address to be parsed - * @param ipAddr [OUT] Parsed IP address - * @param ipAddr [IN] Buffer length for parsed IP address - * @param port [OUT] Parsed Port number - * @return #CA_STATUS_OK or Appropriate error code + * To parse the IP address and port from "ipaddress:port". + * @param[in] ipAddrStr IP address to be parsed. + * @param[out] ipAddr Parsed IP address. + * @param[in] ipAddr Buffer length for parsed IP address. + * @param[out] port Parsed Port number. + * @return ::CA_STATUS_OK or Appropriate error code. */ CAResult_t CAParseIPv4AddressInternal(const char *ipAddrStr, uint8_t *ipAddr, size_t ipAddrLen, uint16_t *port); /** - * @fn CAAdapterIsSameSubnet - * @brief Check if two ip address belong to same subnet. - * @param ipAddress1 [IN] IP address to be checked - * @param ipAddress2 [IN] IP address to be checked - * @param netMask [IN] Subnet mask - * @return true if same subnet and false if not same subnet + * Check if two ip address belong to same subnet. + * @param[in] ipAddress1 IP address to be checked. + * @param[in] ipAddress2 IP address to be checked. + * @param[in] netMask Subnet mask. + * @return true if same subnet and false if not same subnet. */ bool CAAdapterIsSameSubnet(const char *ipAddress1, const char *ipAddress2, const char *netMask); /** - * @brief Used to check the multicast server is running or not. + * Used to check the multicast server is running or not. * - * @param serverInfoList [IN] Server information list. - * @param ipAddress [IN] Interface address of the server. - * @param multicastAddress [IN] Multicast address of the server. - * @param port [IN] Port number of the server. + * @param[in] serverInfoList Server information list. + * @param[in] ipAddress Interface address of the server. + * @param[in] multicastAddress Multicast address of the server. + * @param[in] port Port number of the server. * * @return true or false. */ @@ -151,11 +145,11 @@ bool CAIsMulticastServerStarted(const u_arraylist_t *serverInfoList, const char const char *multicastAddress, uint16_t port); /** - * @brief Used to check the unicast server is running or not. + * Used to check the unicast server is running or not. * - * @param serverInfoList [IN] Server information list. - * @param ipAddress [IN] Ip address of the server. - * @param port [IN] Port number of the server. + * @param[in] serverInfoList Server information list. + * @param[in] ipAddress Ip address of the server. + * @param[in] port Port number of the server. * * @return true or false. */ @@ -163,11 +157,11 @@ bool CAIsUnicastServerStarted(const u_arraylist_t *serverInfoList, const char *i uint16_t port); /** - * @brief Used to get the port number based on given information. + * Used to get the port number based on given information. * - * @param serverInfoList [IN] Server information list. - * @param ipAddress [IN] Ip address of the server. - * @param isSecured [IN] specifies whether to get secured or normal unicast server port. + * @param[in] serverInfoList Server information list. + * @param[in] ipAddress Ip address of the server. + * @param[in] isSecured specifies whether to get secured or normal unicast server port. * * @return positive value on success and 0 on error. */ @@ -175,11 +169,11 @@ uint16_t CAGetServerPort(const u_arraylist_t *serverInfoList, const char *ipAddr bool isSecured); /** - * @brief Used to get the socket fd for given server information. + * Used to get the socket fd for given server information. * - * @param serverInfoList [IN] Server information list. - * @param isMulticast [IN] To check whether it is multicast server or not. - * @param endpoint [IN] network address + * @param[in] serverInfoList Server information list. + * @param[in] isMulticast To check whether it is multicast server or not. + * @param[in] endpoint network address * @return positive value on success and -1 on error. */ @@ -187,97 +181,85 @@ int CAGetSocketFdForUnicastServer(const u_arraylist_t *serverInfoList, bool isMulticast, const CAEndpoint_t *endpoint); /** - * @brief Used to add the server information into serverinfo list + * Used to add the server information into serverinfo list. * - * @param serverInfoList [INOUT] server information list. - * @param info [IN] server informations like ip, port. + * @param[in/out] serverInfoList server information list. + * @param[in] info server informations like ip, port. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input data - * @retval #CA_STATUS_FAILED Initialization failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input data. + * @retval ::CA_STATUS_FAILED Initialization failed. */ CAResult_t CAAddServerInfo(u_arraylist_t *serverInfoList, CAServerInfo_t *info); /** - * @brief Used to remove the server information based on socket fd from server info list. + * Used to remove the server information based on socket fd from server info list. * - * @param serverInfoList [INOUT] server information list. - * @param sockFd [IN] Socket descriptor. - * - * @return None + * @param[in/out] serverInfoList server information list. + * @param[in] sockFd Socket descriptor. */ void CARemoveServerInfo(u_arraylist_t *serverInfoList, int sockFd); /** - * @brief Used to clear the memory of network inteface list - * Memory pointed by infoList will become invalid after this function call. - * - * @param infoList [IN] Network interface list. + * Used to clear the memory of network interface list. + * Memory pointed by infoList will become invalid after this function call. * - * @return None + * @param[in] infoList Network interface list. */ void CAClearNetInterfaceInfoList(u_arraylist_t *infoList); /** - * @brief Used to clear the memory of server info list. - * Memory pointed by serverInfoList will become invalid after this function call. - * - * @param infoList [IN] Server information list. + * Used to clear the memory of server info list. + * Memory pointed by serverInfoList will become invalid after this function call. * - * @return None + * @param[in] infoList Server information list. */ void CAClearServerInfoList(u_arraylist_t *serverInfoList); /** - * @brief Convert address from binary to string - * @param ipaddr [IN] IP address info - * @param host [OUT] address string (must be CA_IPADDR_SIZE) - * @param port [OUT] host order port number + * Convert address from binary to string. + * @param[in] ipaddr IP address info. + * @param[out] host address string (must be CA_IPADDR_SIZE). + * @param[out] port host order port number. */ void CAConvertAddrToName(const struct sockaddr_storage *sockaddr, char *host, uint16_t *port); /** - * @brief Convert address from string to binary - * @param host [IN] address string - * @param port [IN] host order port number - * @param ipaddr [OUT] IP address info + * Convert address from string to binary. + * @param[in] host address string. + * @param[in] port host order port number. + * @param[out] ipaddr IP address info. */ void CAConvertNameToAddr(const char *host, uint16_t port, struct sockaddr_storage *sockaddr); #ifdef __ANDROID__ /** - * @fn CANativeJNISetContext - * @brief To set context of JNI Application - * This must be called by the Android API before CA Initialization - * @param env [IN] JNI interface pointer - * @param context [IN] context object - * @return None + * To set context of JNI Application. + * This must be called by the Android API before CA Initialization. + * @param[in] env JNI interface pointer. + * @param[in] context context object. */ void CANativeJNISetContext(JNIEnv *env, jobject context); /** - * @fn CANativeJNISetJavaVM - * @brief To set jvm object - * This must be called by the Android API before CA Initialization - * @param jvm [IN] jvm object - * @return None + * To set jvm object. + * This must be called by the Android API before CA Initialization. + * @param[in] jvm jvm object. */ void CANativeJNISetJavaVM(JavaVM *jvm); /** - * @fn CANativeJNISetContext - * @brief To get context - * Called by adapters to get Application context - * @return context object + * To get context. + * Called by adapters to get Application context. + * @return context object. */ jobject CANativeJNIGetContext(); /** - * @fn CANativeJNIGetJavaVM - * @brief To get JVM object - * Called from adapters to get JavaVM object - * @return JVM object + * To get JVM object. + * Called from adapters to get JavaVM object. + * @return JVM object. */ JavaVM *CANativeJNIGetJavaVM(); #endif diff --git a/resource/csdk/connectivity/inc/caedradapter.h b/resource/csdk/connectivity/inc/caedradapter.h index 7e0b533..ff613dd 100644 --- a/resource/csdk/connectivity/inc/caedradapter.h +++ b/resource/csdk/connectivity/inc/caedradapter.h @@ -20,7 +20,6 @@ /** * @file - * * This file contains the APIs for EDR adapters. */ @@ -28,7 +27,7 @@ #define CA_EDRADAPTER_H_ /** - * EDR Interface AP + * EDR Interface AP. **/ #include "cacommon.h" #include "caadapterinterface.h" @@ -40,17 +39,17 @@ extern "C" #endif /** - * @brief Initialize EDR Interface. - * @param registerCallback [IN] Callback to register EDR interface to Connectivity - * Abstraction Layer - * @param reqRespCallback [IN] Callback to notify request and response messages from + * Initialize EDR Interface. + * @param[in] registerCallback Callback to register EDR interface to Connectivity + * Abstraction Layer. + * @param[in] reqRespCallback Callback to notify request and response messages from * server(s) started at Connectivity Abstraction Layer. - * @param netCallback [IN] Callback to notify the network additions to Connectivity + * @param[in] netCallback Callback to notify the network additions to Connectivity * Abstraction Layer. - * @param errorCallback [IN] errorCallback to notify error to connectivity common logic - * layer from adapter - * @param handle [IN] Threadpool Handle - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * @param[in] errorCallback errorCallback to notify error to connectivity common logic + * layer from adapter. + * @param[in] handle Threadpool Handle. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAInitializeEDR(CARegisterConnectivityCallback registerCallback, CANetworkPacketReceivedCallback reqRespCallback, @@ -58,34 +57,34 @@ CAResult_t CAInitializeEDR(CARegisterConnectivityCallback registerCallback, CAErrorHandleCallback errorCallback, ca_thread_pool_t handle); /** - * @brief Starts EDR connectivity adapters. As its peer to peer it doesnot require to start - * any servers. - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Starts EDR connectivity adapters. + * As its peer to peer it does not require to start any servers. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAStartEDR(); /** - * @brief Starts listening server for receiving multicast search requests. + * Starts listening server for receiving multicast search requests. * Starts RFCOMM Server with prefixed UUID as per OIC specification. * - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAStartEDRListeningServer(); /** - * @brief Starting discovery server for receiving multicast advertisements. + * Starting discovery server for receiving multicast advertisements. * Starts RFCOMM Server with prefixed UUID as per OIC specification. * - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAStartEDRDiscoveryServer(); /** - * @brief Sends data to the peer bluetooth OIC device using the adapter connectivity. - * @param endpoint [IN] Remote Endpoint information (like ipaddress, port, and + * Sends data to the peer bluetooth OIC device using the adapter connectivity. + * @param[in] endpoint Remote Endpoint information (like ipaddress, port, and * connectivity type) to which the unicast data has to be sent. - * @param data [IN] Data to be sent. - * @param dataLength [IN] Size of data to be sent. + * @param[in] data Data to be sent. + * @param[in] dataLength Size of data to be sent. * @return The number of bytes sent on the network. Returns -1 on error. * */ @@ -93,48 +92,47 @@ int32_t CASendEDRUnicastData(const CAEndpoint_t *endpoint, const void *data, uint32_t dataLength); /** - * @brief Sends multicast data to all discovered bluetooth OIC devices using the adapter - * @param endpoint [IN] Remote Endpoint information (like ipaddress, port, and connectivity. - * @param data [IN] Data which needs to be sent to all discovered bluetooth OIC device. - * @param dataLength [IN] Length of data in bytes. + * Sends multicast data to all discovered bluetooth OIC devices using the adapter. + * @param[in] endpoint Remote Endpoint information (like ipaddress, port, and connectivity. + * @param[in] data Data which needs to be sent to all discovered bluetooth OIC device. + * @param[in] dataLength Length of data in bytes. * @return Number of bytes sent on the network. Returns -1 on error. */ int32_t CASendEDRMulticastData(const CAEndpoint_t *endpoint, const void *data, uint32_t dataLength); /** - * @brief Get EDR Connectivity network information. + * Get EDR Connectivity network information. * - * @param info [OUT] Array of local connectivity information structures. - * @param size [OUT] Size of the array @info. + * @param[out] info Array of local connectivity information structures. + * @param[out] size Size of the array @info. * - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAGetEDRInterfaceInformation(CAEndpoint_t **info, uint32_t *size); /** - * @brief Read Synchronous API callback. - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Read Synchronous API callback. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAReadEDRData(); /** - * @brief EDR Stops all RFCOMM servers and close sockets. - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * EDR Stops all RFCOMM servers and close sockets. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAStopEDR(); /** - * @brief Terminate the EDR connectivity adapter. + * Terminate the EDR connectivity adapter. * Configuration information will be deleted from further use. - * @return NONE */ void CATerminateEDR(); /** - * @brief Initializes the adapter queues. + * Initializes the adapter queues. * This will initiates both server and receiver adapter queues. - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAAdapterStartQueue(); diff --git a/resource/csdk/connectivity/inc/caedrinterface.h b/resource/csdk/connectivity/inc/caedrinterface.h index 5175216..df00dd8 100644 --- a/resource/csdk/connectivity/inc/caedrinterface.h +++ b/resource/csdk/connectivity/inc/caedrinterface.h @@ -81,7 +81,7 @@ typedef struct } CAEDRNetworkEvent; /** - * This will be used during the recive of network requests and response. + * This will be used during the Receiver of network requests and response. * @param[in] remoteAddress EDR address of remote OIC device from which data received. * @param[in] data Data received. * @param[in] dataLength Length of the Data received. diff --git a/resource/csdk/connectivity/inc/cainterfacecontroller.h b/resource/csdk/connectivity/inc/cainterfacecontroller.h index 034e374..f6fdb63 100644 --- a/resource/csdk/connectivity/inc/cainterfacecontroller.h +++ b/resource/csdk/connectivity/inc/cainterfacecontroller.h @@ -40,58 +40,55 @@ extern "C" #ifdef SINGLE_THREAD /** - * @brief Initializes different adapters based on the compilation flags. - * @return none + * Initializes different adapters based on the compilation flags. */ void CAInitializeAdapters(); #else /** - * @brief Initializes different adapters based on the compilation flags. - * @param handle [IN] thread pool handle created by message handler for different adapters. - * @return none + * Initializes different adapters based on the compilation flags. + * @param[in] handle thread pool handle created by message handler + * for different adapters. */ void CAInitializeAdapters(ca_thread_pool_t handle); #endif /** - * @brief Set the received packets callback for message handler - * @param callback [IN] message handler callback to receive packets from different adapters. - * @return none + * Set the received packets callback for message handler. + * @param[in] callback message handler callback to receive packets + * from different adapters. */ void CASetPacketReceivedCallback(CANetworkPacketReceivedCallback callback); /** - * @brief Set the error handler callback for message handler - * @param errorCallback [IN] error handler callback from adapters - * @return none + * Set the error handler callback for message handler. + * @param[in] errorCallback error handler callback from adapters */ void CASetErrorHandleCallback(CAErrorHandleCallback errorCallback); /** - * @brief Set the network status changed callback for message handler - * @param callback [IN] message handler network status callback to receive network changes. - * @return none + * Set the network status changed callback for message handler. + * @param[in] callback message handler network status callback + * to receive network changes. */ void CASetNetworkChangeCallback(CANetworkChangeCallback callback); /** - * @brief Starting different connectivity adapters based on the network selection. - * @param transportType [IN] interested network for starting - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * Starting different connectivity adapters based on the network selection. + * @param[in] transportType interested network for starting. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAStartAdapter(CATransportAdapter_t transportType); /** - * @brief Stopping different connectivity adapters based on the network un-selection. - * @param transportType [IN] network type that want to stop - * @return none + * Stopping different connectivity adapters based on the network un-selection. + * @param[in] transportType network type that want to stop. */ void CAStopAdapter(CATransportAdapter_t transportType); #ifdef RA_ADAPTER /** - * @brief Set Remote Access information for XMPP Client. - * @param caraInfo [IN] remote access info. + * Set Remote Access information for XMPP Client. + * @param[in] caraInfo remote access info.. * * @return CA_STATUS_OK */ @@ -99,54 +96,54 @@ CAResult_t CASetAdapterRAInfo(const CARAInfo_t *caraInfo); #endif /** - * @brief Get network information such as ipaddress and mac information - * @param info [OUT] connectivity information such as ipaddress and mac information - * @param size [OUT] number of connectivity information structures - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * Get network information such as ipaddress and mac information. + * @param[out] info connectivity information + * such as ipaddress and mac information. + * @param[out] size number of connectivity information structures. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAGetNetworkInfo(CAEndpoint_t **info, uint32_t *size); /** - * @brief Sends unicast data to the remote endpoint - * @param endpoint [IN] endpoint information where the data has to be sent - * @param data [IN] data that needs to be sent - * @param length [IN] length of the data that needs to be sent - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * Sends unicast data to the remote endpoint. + * @param[in] endpoint endpoint information where the data has to be sent. + * @param[in] data data that needs to be sent. + * @param[in] length length of the data that needs to be sent. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CASendUnicastData(const CAEndpoint_t *endpoint, const void *data, uint32_t length); /** - * @brief Sends multicast data to all endpoints in the network. - * @param endpoint [IN] endpoint information where the data has to be sent - * @param data [IN] data that needs to be sent - * @param length [IN] length of the data that needs to be sent - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * Sends multicast data to all endpoints in the network. + * @param[in] endpoint endpoint information where the data has to be sent. + * @param[in] data data that needs to be sent. + * @param[in] length length of the data that needs to be sent. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CASendMulticastData(const CAEndpoint_t *endpoint, const void *data, uint32_t length); /** - * @brief Start listening servers to receive search requests from clients - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * Start listening servers to receive search requests from clients. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAStartListeningServerAdapters(); /** - * @brief Start discovery servers to receive advertisements from server - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * Start discovery servers to receive advertisements from server. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAStartDiscoveryServerAdapters(); /** - * @brief Terminates the adapters which are initialized during the initialization - * @return none + * Terminates the adapters which are initialized during the initialization. */ void CATerminateAdapters(); #ifdef SINGLE_THREAD /** - * @brief Checks for available data and reads it - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * Checks for available data and reads it. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAReadData(); #endif diff --git a/resource/csdk/connectivity/inc/caipadapter.h b/resource/csdk/connectivity/inc/caipadapter.h index 505974d..643cffc 100644 --- a/resource/csdk/connectivity/inc/caipadapter.h +++ b/resource/csdk/connectivity/inc/caipadapter.h @@ -46,7 +46,7 @@ extern "C" * @param[in] errorCallback Callback to notify the network errors to * Connectivity Abstraction Layer. * @param[in] handle Threadpool Handle. - * @return #CA_STATUS_OK or Appropriate error code + * @return ::CA_STATUS_OK or Appropriate error code */ CAResult_t CAInitializeIP(CARegisterConnectivityCallback registerCallback, CANetworkPacketReceivedCallback networkPacketCallback, @@ -55,7 +55,7 @@ CAResult_t CAInitializeIP(CARegisterConnectivityCallback registerCallback, /** * Start IP Interface adapter. - * @return #CA_STATUS_OK or Appropriate error code. + * @return ::CA_STATUS_OK or Appropriate error code. */ CAResult_t CAStartIP(); @@ -64,7 +64,7 @@ CAResult_t CAStartIP(); * Transport Specific Behavior: * IP Starts Multicast Server on a particular interface and prefixed port * number and as per OIC Specification. - * @return #CA_STATUS_OK or Appropriate error code. + * @return ::CA_STATUS_OK or Appropriate error code. */ CAResult_t CAStartIPListeningServer(); @@ -73,7 +73,7 @@ CAResult_t CAStartIPListeningServer(); * Transport Specific Behavior: * IP Starts multicast server on a particular interface and prefixed port * number as per OIC Specification. - * @return #CA_STATUS_OK or Appropriate error code. + * @return ::CA_STATUS_OK or Appropriate error code. */ CAResult_t CAStartIPDiscoveryServer(); @@ -106,19 +106,19 @@ int32_t CASendIPMulticastData(const CAEndpoint_t *endpoint, const void *data, ui * @param[out] info Local connectivity information structures. * @note info is allocated in this API and should be freed by the caller. * @param[out] size Number of local connectivity structures. - * @return #CA_STATUS_OK or Appropriate error code. + * @return ::CA_STATUS_OK or Appropriate error code. */ CAResult_t CAGetIPInterfaceInformation(CAEndpoint_t **info, uint32_t *size); /** * Read Synchronous API callback. - * @return #CA_STATUS_OK or Appropriate error code. + * @return ::CA_STATUS_OK or Appropriate error code. */ CAResult_t CAReadIPData(); /** * Stops Unicast, Multicast servers and close the sockets. - * @return #CA_STATUS_OK or Appropriate error code. + * @return ::CA_STATUS_OK or Appropriate error code. */ CAResult_t CAStopIP(); diff --git a/resource/csdk/connectivity/inc/caipinterface.h b/resource/csdk/connectivity/inc/caipinterface.h index a7afbd9..6a71f28 100644 --- a/resource/csdk/connectivity/inc/caipinterface.h +++ b/resource/csdk/connectivity/inc/caipinterface.h @@ -20,7 +20,7 @@ /** * @file caipinterface.h - * @brief This file provides APIs IP client/server/network monitor modules + * This file provides APIs IP client/server/network monitor modules. */ #ifndef CA_IP_INTERFACE_H_ @@ -38,8 +38,7 @@ extern "C" #endif /** - * @enum CAAdapterServerType_t - * @brief Enum for defining different server types. + * Enum for defining different server types. */ typedef enum { @@ -49,49 +48,44 @@ typedef enum } CAAdapterServerType_t; /** - * @brief Callback to be notified on reception of any data from remote OIC devices. + * Callback to be notified on reception of any data from remote OIC devices. * - * @param endpoint [IN] network endpoint description - * @param data [IN] Data received from remote OIC device. - * @param dataLength [IN] Length of data in bytes. - * - * @return NONE - * @pre Callback must be registered using CAIPSetPacketReceiveCallback() + * @param[in] endpoint network endpoint description. + * @param[in] data Data received from remote OIC device. + * @param[in] dataLength Length of data in bytes. + * @pre Callback must be registered using CAIPSetPacketReceiveCallback(). */ typedef void (*CAIPPacketReceivedCallback)(const CAEndpoint_t *endpoint, const void *data, uint32_t dataLength); /** - * @brief Callback to notify error in the IP adapter + * Callback to notify error in the IP adapter. * - * @param endpoint [IN] [IN] network endpoint description - * @param data [IN] Data sent/received - * @param dataLength [IN] Length of data in bytes. - * @param result [IN] result of request from R.I - * @return NONE - * @pre Callback must be registered using CAIPSetPacketReceiveCallback() + * @param[in] endpoint network endpoint description. + * @param[in] data Data sent/received. + * @param[in] dataLength Length of data in bytes. + * @param[in] result result of request from R.I. + * @pre Callback must be registered using CAIPSetPacketReceiveCallback(). */ typedef void (*CAIPErrorHandleCallback)(const CAEndpoint_t *endpoint, const void *data, uint32_t dataLength, CAResult_t result); /** - * @brief Callback to be notified when exception occures on multicast/unicast server. - * @param type [IN] Type of server(#CAAdapterServerType_t) - * @return NONE - * @pre Callback must be registered using CAIPSetExceptionCallback() + * Callback to be notified when exception occures on multicast/unicast server. + * @param type Type of server(#CAAdapterServerType_t). + * @pre Callback must be registered using CAIPSetExceptionCallback(). */ typedef void (*CAIPExceptionCallback)(CAAdapterServerType_t type); /** - * @brief Start IP server - * - * @param threadPool [IN] Thread pool for managing Unicast/Multicast server threads. + * Start IP server. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input data - * @retval #CA_STATUS_FAILED Initialization failed + * @param threadPool Thread pool for managing Unicast/Multicast server threads. + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input data. + * @retval ::CA_STATUS_FAILED Initialization failed. */ #ifdef SINGLE_THREAD CAResult_t CAIPStartServer(); @@ -100,52 +94,46 @@ CAResult_t CAIPStartServer(const ca_thread_pool_t threadPool); #endif /** - * @brief Stop IP server - * @return NONE + * Stop IP server. */ void CAIPStopServer(); /** - * @brief Set this callback for receiving data packets from peer devices. + * Set this callback for receiving data packets from peer devices. * - * @param callback [IN] Callback to be notified on reception of unicast/multicast data packets. - * - * @return NONE + * @param[in] callback Callback to be notified on reception of unicast/multicast data packets. */ void CAIPSetPacketReceiveCallback(CAIPPacketReceivedCallback callback); /** - * @brief Set this callback for receiving exception notifications. - * - * @param callback [IN] Callback to be notified on occurance of exception on running servers. + * Set this callback for receiving exception notifications. * - * @return NONE + * @param[in] callback Callback to be notified on exception on running servers. */ void CAIPSetExceptionCallback(CAIPExceptionCallback callback); /** - * @brief Set socket description for sending unicast UDP data. Once the Unicast server is started, - * the same socket descriptor is used for sending the Unicast UDP data. + * Set socket description for sending unicast UDP data. + * Once the Unicast server is started, + * the same socket descriptor is used for sending the Unicast UDP data. * - * @param socketFD [IN] Socket descriptor used for sending UDP data. - * @return NONE + * @param[in] socketFD Socket descriptor used for sending UDP data. */ void CAIPSetUnicastSocket(int socketFD); /** - * @brief Set the port number for sending unicast UDP data - * @param port [IN] Port number used for sending UDP data. - * @return NONE + * Set the port number for sending unicast UDP data. + * @param[in] port Port number used for sending UDP data. */ void CAIPSetUnicastPort(uint16_t port); /** - * @brief API to send unicast UDP data + * API to send unicast UDP data. * - * @param endpoint [IN] complete network address to send to - * @param data [IN] Data to be send. - * @param dataLength [IN] Length of data in bytes - * @param isMulticast [IN] Whether data needs to be sent to multicast ip + * @param[in] endpoint complete network address to send to. + * @param[in] data Data to be send. + * @param[in] dataLength Length of data in bytes. + * @param[in] isMulticast Whether data needs to be sent to multicast ip. */ void CAIPSendData(CAEndpoint_t *endpoint, const void *data, @@ -153,15 +141,14 @@ void CAIPSendData(CAEndpoint_t *endpoint, bool isMulticast); /** - * @brief Get IP adapter connection state. + * Get IP adapter connection state. * - * @return True if IP adapter is connected, otherwise false + * @return True if IP adapter is connected, otherwise false. */ bool CAIPIsConnected(); /** - * @brief Pull the Received Data - * @return NONE + * Pull the Received Data. */ void CAIPPullData(); @@ -175,21 +162,20 @@ typedef struct uint32_t index; uint32_t flags; uint16_t family; - uint32_t ipv4addr; // used for IPv4 only + uint32_t ipv4addr; /**< used for IPv4 only. */ } CAInterface_t; /** - * @brief Get a list of CAInterface_t items + * Get a list of CAInterface_t items. * - * @return List of CAInterface_t items + * @return List of CAInterface_t items. */ u_arraylist_t *CAIPGetInterfaceInformation(int desiredIndex); /** - * @brief Set callback for error handling + * Set callback for error handling. * - * @param ipErrorCallback [IN] callback to notify error to the ipadapter - * @return NONE + * @param[in] ipErrorCallback callback to notify error to the ipadapter. */ void CAIPSetErrorHandleCallback(CAIPErrorHandleCallback ipErrorCallback); diff --git a/resource/csdk/connectivity/inc/caleadapter.h b/resource/csdk/connectivity/inc/caleadapter.h index f03eb7f..88b94af 100644 --- a/resource/csdk/connectivity/inc/caleadapter.h +++ b/resource/csdk/connectivity/inc/caleadapter.h @@ -45,13 +45,13 @@ typedef struct { CAEndpoint_t *remoteEndpoint; /**< Remote endpoint contains the information of remote device. */ - void *data; /**< Data to be transmitted over LE tranport. */ + void *data; /**< Data to be transmitted over LE transport. */ uint32_t dataLen; /**< Length of the data being transmitted. */ } CALEData_t; /** * Stores information of all the senders. - * This structure will be used to track and defragment all incoming data packets. + * This structure will be used to track and de-fragmentation all incoming data packets. */ typedef struct { @@ -182,12 +182,12 @@ void CATerminateLE(); * is received. * @param[in] serviceUUID Uuid of the OIC service running on the remote * device. - * @param[in] data Actual data recevied from the remote device. + * @param[in] data Actual data Received from the remote device. * @param[in] dataLength Length of the data received from the remote device. * @param[in] sentLength Length of the data sent from the remote device. * @return ::CA_STATUS_OK or Appropriate error code. * @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. * */ @@ -202,12 +202,12 @@ CAResult_t CALEAdapterServerReceivedData(const char *remoteAddress, const char * * is received. * @param[in] serviceUUID Uuid of the OIC service running on the remote * device. - * @param[in] data Actual data recevied from the remote device. + * @param[in] data Actual data received from the remote device. * @param[in] dataLength Length of the data received from the remote device. * @param[in] sentLength Length of the data sent from the remote device. * @return ::CA_STATUS_OK or Appropriate error code. * @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 CALEAdapterClientReceivedData(const char *remoteAddress, const char *serviceUUID, @@ -230,7 +230,7 @@ void CASetLEReqRespAdapterCallback(CANetworkPacketReceivedCallback callback); * * @return ::CA_STATUS_OK or Appropriate error code. * @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 CALEAdapterServerSendData(const CAEndpoint_t *remoteEndpoint, @@ -245,7 +245,7 @@ CAResult_t CALEAdapterServerSendData(const CAEndpoint_t *remoteEndpoint, * * @return ::CA_STATUS_OK or Appropriate error code. * @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 CALEAdapterClientSendData(const CAEndpoint_t *remoteEndpoint, @@ -266,7 +266,7 @@ void CALEServerSendDataThread(void *threadData); * This function will be associated with the sender queue for GattClient. * This function will fragment the data to the MTU of the transport and * send the data in fragments to the adapters. The function will be - * blocked untill all data is sent out from the adapter. + * blocked until all data is sent out from the adapter. * * @param[in] threadData Data pushed to the queue which contains the info * about RemoteEndpoint and Data. @@ -274,7 +274,7 @@ void CALEServerSendDataThread(void *threadData); void CALEClientSendDataThread(void *threadData); /** - * This function will be associated with the receiver queue. This function will defragment + * This function will be associated with the receiver queue. This function will reassemble * the received data from each sender respectively and will send it up to CA layer. * Respective sender's header will provide the length of the data sent. * @@ -284,7 +284,7 @@ void CALEClientSendDataThread(void *threadData); void CALEDataReceiverHandler(void *threadData); /** - * This function is used to Initalize both GattServer and GattClient + * This function is used to initialize both GattServer and GattClient * queues. All four queues will be initialized with this function invocations. */ void CAInitLEQueues(); @@ -303,64 +303,64 @@ void CAStopLEQueues(); void CATerminateLEQueues(); /** - * This function will initalize the Receiver and Sender queues for + * This function will initialize the Receiver and Sender queues for * GattServer. This function will inturn call the functions * CAInitBleServerReceiverQueue() and CAInitBleServerSenderQueue() to * initialize the queues. * @return ::CA_STATUS_OK or Appropriate error code. * @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 CAInitLEServerQueues(); /** - * This function will initalize the Receiver and Sender queues for + * This function will initialize the Receiver and Sender queues for * GattClient. This function will inturn call the functions * CAInitBleClientReceiverQueue() and CAInitBleClientSenderQueue() to * initialize the queues. * * @return ::CA_STATUS_OK or Appropriate error code. * @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 CAInitLEClientQueues(); /** - * This function will initalize the Receiver queue for GattServer. This + * This function will initialize the Receiver queue for GattServer. This * will initialize the queue to process the function * CABLEServerSendDataThread() when ever the task is added to this queue. * * @return ::CA_STATUS_OK or Appropriate error code. * @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 CAInitLEServerSenderQueue(); /** - * This function will initalize the Receiver queue for GattClient. This + * This function will initialize the Receiver queue for GattClient. This * will initialize the queue to process the function * CABLEClientSendDataThread() when ever the task is added to this queue. * * @return ::CA_STATUS_OK or Appropriate error code. * @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 CAInitLEClientSenderQueue(); /** - * This function will initalize the Receiver queue for LEAdapter. This will initialize + * This function will initialize the Receiver queue for LEAdapter. This will initialize * the queue to process the function CABLEDataReceiverHandler() when ever the task * is added to this queue. * - * @return ::CA_STATUS_OK or Appropriate error code. - * @retval ::CA_STATUS_OK Successful. - * @retval ::CA_STATUS_INVALID_PARAM Invalid input argumets. - * @retval ::CA_STATUS_FAILED Operation failed. + * @return ::CA_STATUS_OK or Appropriate error code + * @retval ::CA_STATUS_OK Successful + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments + * @retval ::CA_STATUS_FAILED Operation failed * */ CAResult_t CAInitLEReceiverQueue(); @@ -374,7 +374,7 @@ CAResult_t CAInitLEReceiverQueue(); * * @return ::CA_STATUS_OK or Appropriate error code. * @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. */ CALEData_t *CACreateLEData(const CAEndpoint_t *remoteEndpoint, const void *data, @@ -394,7 +394,7 @@ void CAFreeLEData(CALEData_t *bleData); typedef void (*CALEDeviceStateChangedCallback)(CAAdapterState_t adapter_state); /** - * This will be used to notify that network packet recieved from + * This will be used to notify that network packet received from * GATTClient to adapter layer. * @param[in] remoteAddress Remote endpoint Address. * @param[in] serviceUUID Service UUID. @@ -403,7 +403,7 @@ typedef void (*CALEDeviceStateChangedCallback)(CAAdapterState_t adapter_state); * @param[in] sentLength Length of the data sent. * @return ::CA_STATUS_OK or Appropriate error code. * @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. */ typedef CAResult_t (*CABLEClientDataReceivedCallback)(const char *remoteAddress, @@ -411,7 +411,7 @@ typedef CAResult_t (*CABLEClientDataReceivedCallback)(const char *remoteAddress, uint32_t dataLength, uint32_t *sentLength); /** - * This will be used to notify that network packet recieved from + * This will be used to notify that network packet received from * GATTServer to adapter layer. * @param[in] remoteAddress Remote endpoint Address. * @param[in] serviceUUID Service UUID. @@ -420,7 +420,7 @@ typedef CAResult_t (*CABLEClientDataReceivedCallback)(const char *remoteAddress, * @param[in] sentLength Length of the data sent. * @return ::CA_STATUS_OK or Appropriate error code. * @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. */ typedef CAResult_t (*CABLEServerDataReceivedCallback)(const char *remoteAddress, diff --git a/resource/csdk/connectivity/inc/caleinterface.h b/resource/csdk/connectivity/inc/caleinterface.h index 5f83e51..b5fd208 100644 --- a/resource/csdk/connectivity/inc/caleinterface.h +++ b/resource/csdk/connectivity/inc/caleinterface.h @@ -38,9 +38,8 @@ extern "C" #endif /** - * @enum CALETransferType_t - * @brief Provide info about different mode of data transfer - * This enum is used to differentiate between unicast and multicast data transfer. + * Provide info about different mode of data transfer. + * This enum is used to differentiate between unicast and multicast data transfer. */ typedef enum { @@ -50,272 +49,260 @@ typedef enum /** - * @brief Initialize the LE adapter layer. This will be invoked from the CA layer. + * Initialize the LE adapter layer. This will be invoked from the CA layer. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAInitializeLEAdapter(); /** - * @brief Used to get the current state of the LE adapter. + * Used to get the current state of the LE adapter. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_ADAPTER_NOT_ENABLED adapter not enabled - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_ADAPTER_NOT_ENABLED adapter not enabled. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAGetLEAdapterState(); /** - * @brief Used to initialize the network monitor layer of the LE adapter. Mutex variables required - * to operate in this layer and other paramters can be initialized in this function. + * Used to initialize the network monitor layer of the LE adapter. Mutex variables required + * to operate in this layer and other paramters can be initialized in this function. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAInitializeLENetworkMonitor(); /** - * @brief Used to terminate the network monitor layer of the LE adapter. The variables intialized - * in CAInitializeLEAdapterController() must be cleared in this function. - * @return NONE + * Used to terminate the network monitor layer of the LE adapter. The variables intialized + * in CAInitializeLEAdapterController() must be cleared in this function. */ void CATerminateLENetworkMonitor(); /** - * @brief This function is used to set the callback for the Device state changes in the adapter. + * This function is used to set the callback for the Device state changes in the adapter. * - * @param callback [IN] Callback to notify the Device state change to the CA Layer + * @param[in] callback Callback to notify the Device state change to the CA Layer. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CASetLEAdapterStateChangedCb(CALEDeviceStateChangedCallback callback); /** - * @brief Used to initilaze all the mutex variables required to operate the LE network monitor - * layer. - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * Used to initilaze all the mutex variables required. + * to operate the LE network monitor layer. + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAInitLENetworkMonitorMutexVariables(); /** - * @brief Used to terminate all the mutex variables required to operate the LE network monitor - * layer. - * @return NONE + * Used to terminate all the mutex variables required + * to operate the LE network monitor layer. */ void CATerminateLENetworkMonitorMutexVariables(); /** - * @brief Provides the BD address of the local adapter. - * @param local_address [OUT] pointer to the location where bd address needs to be stored. + * Provides the BD address of the local adapter. + * @param[out] local_address pointer to the location where bd address needs to be stored. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAGetLEAddress(char **local_address); /** - * @brief Used to start Gatt Server thread for service creation and advertise ble service. + * Used to start Gatt Server thread for service creation and advertise ble service. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAStartLEGattServer(); /** - * @brief Used to stop BLE Gatt Service. + * Used to stop BLE Gatt Service. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAStopLEGattServer(); /** - * @brief Used to stop Gatt Server thread and remove service registration, stop advertising. - * @return NONE + * Used to stop Gatt Server thread and remove service registration, stop advertising. */ void CATerminateLEGattServer(); /** - * @brief Used to store upper layer callback locally which will be used to send the data to - * application - * @param callback [IN] Callback function to pass the data to CA layer. - * @return NONE + * Used to store upper layer callback locally + * which will be used to send the data to application. + * @param[in] callback Callback function to pass the data to CA layer. */ void CASetLEReqRespServerCallback(CABLEServerDataReceivedCallback callback); /** - * @brief Used to update characteristics(Read/Write) value that we want to send to particular - * client. + * Used to update characteristics(Read/Write) value + * that we want to send to particular client. * - * @param address [IN] BD address of Gatt client - * @param charValue [IN] Data that we want to send to client(unicast) - * @param charValueLen [IN] Length of the data. + * @param[in] address BD address of Gatt client. + * @param[in] charValue Data that we want to send to client(unicast). + * @param[in] charValueLen Length of the data. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAUpdateCharacteristicsToGattClient(const char* address, const char *charValue, const uint32_t charValueLen); /** - * @brief Used to update characteristics(Read/Write) value that we want to multicast to all clients + * Used to update characteristics(Read/Write) value that we want to multicast to all clients. * - * @param charValue [IN] Data that we want to send to clients(multicast) - * @param charValueLen [IN] Length of the data. + * @param[in] charValue Data that we want to send to clients(multicast). + * @param[in] charValueLen Length of the data. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAUpdateCharacteristicsToAllGattClients(const char *charValue, uint32_t charValueLen); /** - * @brief Used to start CAStartBleGattClientThread for initializing Gatt Client + * Used to start CAStartBleGattClientThread for initializing Gatt Client. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAStartLEGattClient(); /** - * @brief Used to stop Gatt Client gracefully in turn it will call CATerminateBLEGattClient - * function. - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * Used to stop Gatt Client gracefully in turn it will + * call CATerminateBLEGattClient function. + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ void CAStopLEGattClient(); /** - * @brief Used to unset all the callbacks and stop service discovery - * @return NONE + * Used to unset all the callbacks and stop service discovery. */ void CATerminateLEGattClient(); /** - * @brief API to read the data from characteristics and invoke notifyCallback. - * @return - NONE + * API to read the data from characteristics and invoke notifyCallback. */ void CACheckLEData(); /** - * @brief Sets the value of characteristic and update the value to GATTServer(unicast). + * Sets the value of characteristic and update the value to GATTServer(unicast). * - * @param remoteAddress [IN] The address of the remote device - * @param data [IN] The value of characteristic (byte array) - * @param dataLen [IN] The length of value - * @param type [IN] Type of the transfer(#CALETransferType_t) - * @param position [IN] The unique index of each ble server. Used for multicast feature. + * @param[in] remoteAddress The address of the remote device. + * @param[in] data The value of characteristic (byte array). + * @param[in] dataLen The length of value. + * @param[in] type Type of the transfer(::CALETransferType_t). + * @param[in] position The unique index of each ble server. Used for multicast feature. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAUpdateCharacteristicsToGattServer(const char *remoteAddress, const char *data, const uint32_t dataLen, CALETransferType_t type, const int32_t position); /** - * @brief Sets the value of characteristic and update the value to all registered - * GATTServer -> Multicast - * @param data [IN] The value of characteristic (byte array) - * @param dataLen [IN] The length of value + * Sets the value of characteristic and update the value to all registered. + * GATTServer -> Multicast. + * @param[in] data The value of characteristic (byte array). + * @param[in] dataLen The length of value. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAUpdateCharacteristicsToAllGattServers(const char *data, uint32_t dataLen); /** - * @brief Used to store upper layer callback locally which will be used to send the data to - * application - * @param callback [IN] Callback function to pass the data to CA layer. - * - * @return void + * Used to store upper layer callback locally which will be used + * to send the data to application. + * @param[in] callback Callback function to pass the data to CA layer. */ void CASetLEReqRespClientCallback(CABLEClientDataReceivedCallback callback); /** - * @brief Used to Set the gThreadPool handle which is required for spawning new thread. + * Used to Set the gThreadPool handle which is required for spawning new thread. * - * @param handle [IN] Thread pool handle which is given by above layer for using thread - * creation task. - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @param[in] handle Thread pool handle which is given by above layer + * for using thread creation task. + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ void CASetLEServerThreadPoolHandle(ca_thread_pool_t handle); /** -* @brief Used to Set the gThreadPool handle which is required for spawning new thread. -* @param handle [IN] Thread pool handle which is given by above layer for using thread creation -* task. -* @return NONE +* Used to Set the gThreadPool handle which is required for spawning new thread. +* @param[in] handle Thread pool handle which is given by above layer +* for using thread creation task. */ void CASetLEClientThreadPoolHandle(ca_thread_pool_t handle); /** - * @brief Used to unset the callback of adapter connection state change. + * Used to unset the callback of adapter connection state change. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAUnSetLEAdapterStateChangedCb(); /** - * @brief This will be used to notify errors in BLE adapter - * @param remoteAddress [IN] Remote endpoint Address - * @param serviceUUID [IN] Service UUID - * @param data [IN] Data received - * @param dataLength [IN] Length of the data received - * @param result [IN] error code as per CAResult_t - * @return NONE + * This will be used to notify errors in BLE adapter + * @param[in] remoteAddress Remote endpoint Address. + * @param[in] serviceUUID Service UUID. + * @param[in] data Data received. + * @param[in] dataLength Length of the data received. + * @param[in] result error code as per CAResult_t. */ typedef void (*CABLEErrorHandleCallback)(const char *remoteAddress, const void *data, uint32_t dataLength, CAResult_t result); /** - * @brief sets the error handle callback - * @param callback [IN] Callback function to update error to the adapter - * @return NONE + * sets the error handle callback. + * @param[in] callback Callback function to update error to the adapter. */ void CASetBLEClientErrorHandleCallback(CABLEErrorHandleCallback callback); /** - * @brief sets the error handle callback - * @param callback [IN] Callback function to update error to the adapter - * @return NONE + * sets the error handle callback. + * @param[in] callback Callback function to update error to the adapter. */ void CASetBLEServerErrorHandleCallback(CABLEErrorHandleCallback callback); diff --git a/resource/csdk/connectivity/inc/canetworkconfigurator.h b/resource/csdk/connectivity/inc/canetworkconfigurator.h index 0ace516..2162df3 100644 --- a/resource/csdk/connectivity/inc/canetworkconfigurator.h +++ b/resource/csdk/connectivity/inc/canetworkconfigurator.h @@ -36,36 +36,36 @@ extern "C" #endif /** - * @brief Add network type to the selected networks for network packets reception - * @param transportAdapter [IN] Adapter that needs to be added - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * Add network type to the selected networks for network packets reception. + * @param[in] transportAdapter Adapter that needs to be added. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAAddNetworkType(CATransportAdapter_t transportAdapter); /** - * @brief Remove network type from the selected configuration - * @param transportAdapter [IN] Adapter that needs to be removed - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * Remove network type from the selected configuration. + * @param[in] transportAdapter Adapter that needs to be removed. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CARemoveNetworkType(CATransportAdapter_t transportAdapter); /** - * @brief Get selected network information - * @return array list having the connectivity types + * Get selected network information. + * @return array list having the connectivity types. */ u_arraylist_t *CAGetSelectedNetworkList(); /** - * @brief Getnetwork informations of the selected networks - * @param info [OUT] LocalConnectivity objects - * @param size [OUT] No Of Array objects - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * Getnetwork informations of the selected networks. + * @param[out] info LocalConnectivity objects. + * @param[out] size No Of Array objects. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAGetNetworkInformationInternal(CAEndpoint_t **info, uint32_t *size); /** - * @brief Terminate network type from selected configuration - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * Terminate network type from selected configuration. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CATerminateNetworkType(); diff --git a/resource/csdk/connectivity/inc/caprotocolmessage.h b/resource/csdk/connectivity/inc/caprotocolmessage.h index 591aac1..d6c4e91 100644 --- a/resource/csdk/connectivity/inc/caprotocolmessage.h +++ b/resource/csdk/connectivity/inc/caprotocolmessage.h @@ -50,10 +50,10 @@ typedef uint32_t code_t; #endif /** - * @brief generates pdu structure from the given information. - * @param code [IN] code of the pdu packet - * @param info [IN] pdu information - * @return generated pdu + * generates pdu structure from the given information. + * @param[in] code code of the pdu packet. + * @param[in] info pdu information. + * @return generated pdu. */ coap_pdu_t *CAGeneratePDU(uint32_t code, const CAInfo_t *info); @@ -62,175 +62,173 @@ coap_pdu_t *CAGeneratePDU(uint32_t code, const CAInfo_t *info); */ /** - * @brief extracts request information from received pdu. - * @param pdu [IN] received pdu - * @param outReqInfo [OUT] request info structure made from received pdu - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * extracts request information from received pdu. + * @param[in] pdu received pdu. + * @param[out] outReqInfo request info structure made from received pdu. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAGetRequestInfoFromPDU(const coap_pdu_t *pdu, CARequestInfo_t *outReqInfo); /** - * @brief extracts response information from received pdu. - * @param pdu [IN] received pdu - * @param outResInfo [OUT] response info structure made from received pdu - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * extracts response information from received pdu. + * @param[in] pdu received pdu. + * @param[out] outResInfo response info structure made from received pdu. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAGetResponseInfoFromPDU(const coap_pdu_t *pdu, CAResponseInfo_t *outResInfo); /** - * @brief extracts error information from received pdu. - * @param pdu [IN] received pdu - * @param errorInfo [OUT] error info structure made from received pdu - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * extracts error information from received pdu. + * @param[in] pdu received pdu. + * @param[out] errorInfo error info structure made from received pdu. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAGetErrorInfoFromPDU(const coap_pdu_t *pdu, CAErrorInfo_t *errorInfo); /** - * @brief creates pdu from the request information - * @param code [IN] request or response code - * @param options [OUT] options for the request and response - * @param info [IN] information to create pdu - * @param payload [IN] payload for the request or response consumed - * @return generated pdu + * creates pdu from the request information. + * @param[in] code request or response code. + * @param[out] options options for the request and response. + * @param[in] info information to create pdu. + * @param[in] payload payload for the request or response consumed. + * @return generated pdu. */ coap_pdu_t *CAGeneratePDUImpl(code_t code, coap_list_t *options, const CAInfo_t *info, const uint8_t *payload, size_t payloadSize); /** - * @brief parse the URI and creates the options - * @param uriInfo [IN] uri information - * @param options [OUT] options information - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * parse the URI and creates the options. + * @param[in] uriInfo uri information. + * @param[out] options options information. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAParseURI(const char *uriInfo, coap_list_t **options); /** - * @brief Helper that uses libcoap to parse either the path or the parameters of a URI - * and populate the supplied options list. + * Helper that uses libcoap to parse either the path or the parameters of a URI + * and populate the supplied options list. * - * @param str [IN] the input partial URI string (either path or query) - * @param length [IN] the length of the supplied partial URI - * @param target [IN] the part of the URI to parse (either COAP_OPTION_URI_PATH - * or COAP_OPTION_URI_QUERY) - * @param optlist [OUT] options information - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * @param[in] str the input partial URI string (either path or query). + * @param[in] length the length of the supplied partial URI. + * @param[in] target the part of the URI to parse (either COAP_OPTION_URI_PATH. + * or COAP_OPTION_URI_QUERY). + * @param[out] optlist options information. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAParseUriPartial(const unsigned char *str, size_t length, int target, coap_list_t **optlist); /** - * @brief create option list from header information in the info - * @param code [IN] uri information - * @param info [IN] information of the request/response - * @param optlist [OUT] options information - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * create option list from header information in the info. + * @param[in] code uri information. + * @param[in] info information of the request/response. + * @param[out] optlist options information. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAParseHeadOption(uint32_t code, const CAInfo_t *info, coap_list_t **optlist); /** - * @brief creates option node from key length and data - * @param key [IN] key for the that needs to be sent - * @param length [IN] length of the data that needs to be sent - * @param data [IN] data that needs to be sent - * @return created list + * creates option node from key length and data. + * @param[in] key key for the that needs to be sent. + * @param[in] length length of the data that needs to be sent. + * @param[in] data data that needs to be sent. + * @return created list. */ coap_list_t *CACreateNewOptionNode(uint16_t key, uint32_t length, const char *data); /** - * @brief order the inserted options - * need to replace queue head if new node has to be added before the existing queue head - * @param a [IN] option 1 for insertion - * @param b [IN] option 2 for insertion - * @return 0 or 1 + * order the inserted options. + * need to replace queue head if new node has to be added before the existing queue head. + * @param[in] a option 1 for insertion. + * @param[in] b option 2 for insertion. + * @return 0 or 1. */ int CAOrderOpts(void *a, void *b); /** - * @brief number of options count - * @param opt_iter [IN] option iteration for count - * @return number of options + * number of options count. + * @param[in] opt_iter option iteration for count. + * @return number of options. */ uint32_t CAGetOptionCount(coap_opt_iterator_t opt_iter); /** - * @brief gets option data - * @param data [IN] data that is received - * @param length [IN] length of the data - * @param option [OUT] result of the operation - * @param buflen [IN] buffer length of the result - * @return option count + * gets option data. + * @param[in] data data that is received. + * @param[in] length length of the data. + * @param[out] option result of the operation. + * @param[in] buflen buffer length of the result. + * @return option count. */ uint32_t CAGetOptionData(const uint8_t *data, uint32_t len, uint8_t *option, uint32_t buflen); /** - * @brief extracts request information from received pdu. - * @param pdu [IN] received pdu - * @param outCode [OUT] code of the received pdu - * @param outInfo [OUT] request info structure made from received pdu - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * extracts request information from received pdu. + * @param[in] pdu received pdu. + * @param[out] outCode code of the received pdu. + * @param[out] outInfo request info structure made from received pdu. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAGetInfoFromPDU(const coap_pdu_t *pdu, uint32_t *outCode, CAInfo_t *outInfo); /** - * @brief create pdu from received data - * @param data [IN] received data - * @param length [IN] length of the data received - * @param outCode [OUT] code received - * @return coap_pdu_t value + * create pdu from received data. + * @param[in] data received data. + * @param[in] length length of the data received. + * @param[out] outCode code received. + * @return coap_pdu_t value. */ coap_pdu_t *CAParsePDU(const char *data, uint32_t length, uint32_t *outCode); /** - * @brief get Token fromn received data(pdu) - * @param pdu_hdr [IN] header of received pdu - * @param outInfo [OUT] information with token received - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * get Token fromn received data(pdu). + * @param[in] pdu_hdr header of received pdu. + * @param[out] outInfo information with token received. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAGetTokenFromPDU(const coap_hdr_t *pdu_hdr, CAInfo_t *outInfo); /** - * @brief generates the token - * @param token [OUT] generated token - * @param tokenLength [IN] length of the token - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * generates the token. + * @param[out] token generated token. + * @param[in] tokenLength length of the token. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAGenerateTokenInternal(CAToken_t *token, uint8_t tokenLength); /** - * @brief destroys the token - * @param token [IN] generated token - * @return None + * destroys the token. + * @param[in] token generated token. */ void CADestroyTokenInternal(CAToken_t token); /** - * @brief destroy the ca info structure - * @param info [IN] info structure created from received packet - * @return None + * destroy the ca info structure. + * @param[in] info info structure created from received packet. */ void CADestroyInfo(CAInfo_t *info); /** - * @brief gets message type from PDU binary data - * @param pdu [IN] pdu data - * @param size [IN] size of pdu data - * @return message type + * gets message type from PDU binary data. + * @param[in] pdu pdu data. + * @param[in] size size of pdu data. + * @return message type. */ CAMessageType_t CAGetMessageTypeFromPduBinaryData(const void *pdu, uint32_t size); /** - * @brief gets message ID PDU binary data - * @param pdu [IN] pdu data - * @param size [IN] size of pdu data - * @return message ID + * gets message ID PDU binary data. + * @param[in] pdu pdu data. + * @param[in] size size of pdu data. + * @return message ID. */ uint16_t CAGetMessageIdFromPduBinaryData(const void *pdu, uint32_t size); /** - * @brief gets code PDU binary data - * @param pdu [IN] pdu data - * @param size [IN] size of pdu data - * @return code + * gets code PDU binary data. + * @param[in] pdu pdu data. + * @param[in] size size of pdu data. + * @return code. */ CAResponseResult_t CAGetCodeFromPduBinaryData(const void *pdu, uint32_t size); diff --git a/resource/csdk/connectivity/inc/caqueueingthread.h b/resource/csdk/connectivity/inc/caqueueingthread.h index b3d282d..89efec1 100644 --- a/resource/csdk/connectivity/inc/caqueueingthread.h +++ b/resource/csdk/connectivity/inc/caqueueingthread.h @@ -38,69 +38,69 @@ extern "C" { #endif -/**Thread function to be invoked**/ +/** Thread function to be invoked. **/ typedef void (*CAThreadTask)(void *threadData); -/**Data destroy function**/ +/** Data destroy function. **/ typedef void (*CADataDestroyFunction)(void *data, uint32_t size); typedef struct { - /** Thread pool of the thread started **/ + /** Thread pool of the thread started. **/ ca_thread_pool_t threadPool; - /** mutex for synchrnoization **/ + /** mutex for synchronization. **/ ca_mutex threadMutex; - /** conditional mutex for synchrnoization **/ + /** conditional mutex for synchronization. **/ ca_cond threadCond; - /**Thread function to be invoked**/ + /** Thread function to be invoked. **/ CAThreadTask threadTask; - /**Data destroy function**/ + /** Data destroy function. **/ CADataDestroyFunction destroy; - /** Variable to inform the thread to stop **/ + /** Variable to inform the thread to stop. **/ bool isStop; /** Que on which the thread is operating. **/ u_queue_t *dataQueue; } CAQueueingThread_t; /** - * @brief Initializes the queing thread - * @param thread [IN] thread data for each thread - * @param handle [IN] thread pool handle created - * @param task [IN] function to be called for each data - * @param destroy [IN] function to data destroy - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * Initializes the queuing thread. + * @param[in] thread thread data for each thread. + * @param[in] handle thread pool handle created. + * @param[in] task function to be called for each data. + * @param[in] destroy function to data destroy. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAQueueingThreadInitialize(CAQueueingThread_t *thread, ca_thread_pool_t handle, CAThreadTask task, CADataDestroyFunction destroy); /** - * @brief Starting the queueing thread - * @param thread [IN] thread data that needs to be started - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * Start the queuing thread. + * @param[in] thread thread data that needs to be started. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAQueueingThreadStart(CAQueueingThread_t *thread); /** - * @brief Add queueing thread data for new thread - * @param thread [IN] thread data for new thread control - * @param data [IN] data that needs to be given for each thread - * @param size [IN] length of the data - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * Add queuing thread data for new thread. + * @param[in] thread thread data for new thread control. + * @param[in] data data that needs to be given for each thread. + * @param[in] size length of the data. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAQueueingThreadAddData(CAQueueingThread_t *thread, void *data, uint32_t size); /** - * @brief Stopping the queueing thread - * @param thread [IN] thread data that needs to be started - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * Stop the queuing thread. + * @param[in] thread thread data that needs to be started. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAQueueingThreadStop(CAQueueingThread_t *thread); /** - * @brief Terminating the queing thread - * @param thread [IN] thread data for each thread - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * Terminate the queuing thread. + * @param[in] thread thread data for each thread. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CAQueueingThreadDestroy(CAQueueingThread_t *thread); diff --git a/resource/csdk/connectivity/inc/caretransmission.h b/resource/csdk/connectivity/inc/caretransmission.h index d43db32..845e2fe 100644 --- a/resource/csdk/connectivity/inc/caretransmission.h +++ b/resource/csdk/connectivity/inc/caretransmission.h @@ -33,61 +33,61 @@ #include "uarraylist.h" #include "cacommon.h" -/** IP, EDR, LE **/ +/** IP, EDR, LE. **/ #define DEFAULT_RETRANSMISSION_TYPE (CA_ADAPTER_IP | \ CA_ADAPTER_RFCOMM_BTEDR | \ CA_ADAPTER_GATT_BTLE) -/** default ACK time is 2 sec.(CoAP) **/ +/** default ACK time is 2 sec(CoAP). **/ #define DEFAULT_ACK_TIMEOUT_SEC 2 -/** default max retransmission trying count is 4.(CoAP) **/ +/** default max retransmission trying count is 4(CoAP). **/ #define DEFAULT_RETRANSMISSION_COUNT 4 /** check period is 1 sec. **/ #define RETRANSMISSION_CHECK_PERIOD_SEC 1 -/** retransmission data send method type**/ +/** retransmission data send method type. **/ typedef CAResult_t (*CADataSendMethod_t)(const CAEndpoint_t *endpoint, const void *pdu, uint32_t size); -/** retransmission timeout callback type**/ +/** retransmission timeout callback type. **/ typedef void (*CATimeoutCallback_t)(const CAEndpoint_t *endpoint, const void *pdu, uint32_t size); typedef struct { - /** retransmission support transport type **/ + /** retransmission support transport type. **/ CATransportAdapter_t supportType; - /** retransmission trying count **/ + /** retransmission trying count. **/ uint8_t tryingCount; } CARetransmissionConfig_t; typedef struct { - /** Thread pool of the thread started **/ + /** Thread pool of the thread started. **/ ca_thread_pool_t threadPool; - /** mutex for synchronization **/ + /** mutex for synchronization. **/ ca_mutex threadMutex; - /** conditional mutex for synchronization **/ + /** conditional mutex for synchronization. **/ ca_cond threadCond; - /** send method for retransmission data **/ + /** send method for retransmission data. **/ CADataSendMethod_t dataSendMethod; - /** callback function for retransmit timeout **/ + /** callback function for retransmit timeout. **/ CATimeoutCallback_t timeoutCallback; - /** retransmission configure data **/ + /** retransmission configure data. **/ CARetransmissionConfig_t config; - /** Variable to inform the thread to stop **/ + /** Variable to inform the thread to stop. **/ bool isStop; /** array list on which the thread is operating. **/ @@ -101,14 +101,14 @@ extern "C" #endif /** - * @brief Initializes the retransmission context - * @param context [IN] context for retransmission - * @param handle [IN] thread pool handle - * @param retransmissionSendMethod [IN] function to be called for retransmission - * @param timeoutCallback [IN] callback for retransmit timeout - * @param config [IN] configuration for retransmission. + * Initializes the retransmission context. + * @param[in] context context for retransmission. + * @param[in] handle thread pool handle. + * @param[in] retransmissionSendMethod function to be called for retransmission. + * @param[in] timeoutCallback callback for retransmit timeout. + * @param[in] config configuration for retransmission. * if NULL is coming, it will set default values. - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CARetransmissionInitialize(CARetransmission_t *context, ca_thread_pool_t handle, @@ -117,56 +117,56 @@ CAResult_t CARetransmissionInitialize(CARetransmission_t *context, CARetransmissionConfig_t* config); /** - * @brief Starting the retransmission context - * @param context [IN] context for retransmission - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Starting the retransmission context. + * @param[in] context context for retransmission. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CARetransmissionStart(CARetransmission_t *context); /** - * @brief Pass the sent pdu data. if retransmission process need, internal thread will wake up and - * process the retransmission data - * @param context [IN] context for retransmission - * @param endpoint [IN] endpoint information - * @param pdu [IN] sent pdu binary data - * @param size [IN] sent pdu binary data size - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Pass the sent pdu data. if retransmission process need, internal thread will wake up and + * process the retransmission data. + * @param[in] context context for retransmission. + * @param[in] endpoint endpoint information. + * @param[in] pdu sent pdu binary data. + * @param[in] size sent pdu binary data size. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CARetransmissionSentData(CARetransmission_t* context, const CAEndpoint_t* endpoint, const void* pdu, uint32_t size); /** - * @brief Pass the received pdu data. if received pdu is ACK data for the retransmission CON data, - * the specified CON data will remove on retransmission list. - * @param context [IN] context for retransmission - * @param endpoint [IN] endpoint information - * @param pdu [IN] received pdu binary data - * @param size [IN] received pdu binary data size - * @param retransmissionPdu [OUT] pdu data of the request for reset and ack - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Pass the received pdu data. if received pdu is ACK data for the retransmission CON data, + * the specified CON data will remove on retransmission list. + * @param[in] context context for retransmission. + * @param[in] endpoint endpoint information. + * @param[in] pdu received pdu binary data. + * @param[in] size received pdu binary data size. + * @param[out] retransmissionPdu pdu data of the request for reset and ack. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CARetransmissionReceivedData(CARetransmission_t *context, const CAEndpoint_t *endpoint, const void *pdu, uint32_t size, void **retransmissionPdu); /** - * @brief Stopping the retransmission context - * @param context [IN] context for retransmission - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Stopping the retransmission context. + * @param[in] context context for retransmission. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CARetransmissionStop(CARetransmission_t *context); /** - * @brief Terminating the retransmission context - * @param context [IN] context for retransmission - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Terminating the retransmission context. + * @param[in] context context for retransmission. + * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). */ CAResult_t CARetransmissionDestroy(CARetransmission_t *context); /** - * @brief Invoke Retransmission according to TimedAction Response - * @param threadValue [IN] context for retransmission + * Invoke Retransmission according to TimedAction Response. + * @param[in] threadValue context for retransmission. */ void CARetransmissionBaseRoutine(void *threadValue); -- 2.7.4