ser_conn_pkt_decoder.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved.
  2. *
  3. * The information contained herein is property of Nordic Semiconductor ASA.
  4. * Terms and conditions of usage are described in detail in NORDIC
  5. * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
  6. *
  7. * Licensees are granted free, non-transferable use of the information. NO
  8. * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
  9. * the file.
  10. *
  11. */
  12. /**
  13. * @addtogroup ser_conn Connectivity application code
  14. * @ingroup ble_sdk_lib_serialization
  15. */
  16. /** @file
  17. *
  18. * @defgroup ser_pkt_decoder Packets decoder in the connectivity chip
  19. * @{
  20. * @ingroup ser_conn
  21. *
  22. * @brief Decoder for serialized packets from an Application Chip.
  23. *
  24. * @details This file contains declaration of common function used for processing packets (packets
  25. * dispatcher) received by the transport layer.
  26. */
  27. #ifndef SER_CONN_PKT_DECODER_H__
  28. #define SER_CONN_PKT_DECODER_H__
  29. #include <stdint.h>
  30. #include "ser_hal_transport.h"
  31. /**@brief A function for dispatching packets from an Application Chip to an appropriate decoder.
  32. *
  33. * @details The function is called to process received packets from a transport layer.
  34. * The function analyzes packet type and calls appropriate command decoder which among
  35. * other things processes command and sends a response. Then a received packet is freed.
  36. *
  37. * @param[in] p_rx_pkt_params A pointer to a transport layer event of type
  38. * @ref ser_hal_transport_evt_rx_pkt_received_params_t.
  39. *
  40. * @retval NRF_SUCCESS Operation success.
  41. * @retval NRF_ERROR_NULL Operation failure. NULL pointer supplied.
  42. * @retval NRF_ERROR_INTERNAL Operation failure. Internal error ocurred.
  43. */
  44. uint32_t ser_conn_received_pkt_process(
  45. ser_hal_transport_evt_rx_pkt_received_params_t * p_rx_pkt_params);
  46. #endif /* SER_CONN_PKT_DECODER_H__ */
  47. /** @} */