summaryrefslogtreecommitdiff
path: root/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_r15_transport_layer.h
blob: 904eb8bcd62e0f9297aa05ae6f3c389d57074dce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*******************************************************************************
 * Copyright (C) ST-Ericsson SA 2011
 * License terms: 3-clause BSD license
 ******************************************************************************/
#ifndef _INCLUSION_GUARD_R_R15_TRANSPORT_LAYER_H_
#define _INCLUSION_GUARD_R_R15_TRANSPORT_LAYER_H_
/**
 *  @addtogroup ldr_communication_serv
 *  @{
 *    @addtogroup r15_family
 *    @{
 *      @addtogroup ldr_r15_transport_layer R15 Transport layer
 *      R15 functionalities for sending R15 packets and
 *      polling receiver and transmiter.
 *
 *      @{
 */

/*******************************************************************************
 * Includes
 ******************************************************************************/
#include "t_r15_transport_layer.h"
#include "t_communication_service.h"
#include  "error_codes.h"

/*******************************************************************************
 * Declaration of functions
 ******************************************************************************/

/**
 * Initializes the transport layer for R15 protocol family.
 *
 * @param [in]  Communication_p Communication module context.
 *
 * @retval E_SUCCESS           After successful execution.
 * @retval E_FAILED_TO_INIT_TL Unsuccessful initialization.
 * @retval E_ALLOCATE_FAILED   Failed to allocate memory space.
 */
ErrorCode_e R15_Transport_Initialize(const Communication_t *const Communication_p);

/**
 * Shut Down the transport layer for R15 protocol family.
 *
 * @param [in]  Communication_p Communication module context.

 * @retval E_SUCCESS  After successful execution.
 */
ErrorCode_e R15_Transport_Shutdown(const Communication_t *const Communication_p);

/**
 * Handles all registered TL processes for R15 protocol family.
 *
 * @param [in]  Communication_p Communication module context.
 *
 * @retval  E_SUCCESS After successful execution.
 */
ErrorCode_e R15_Transport_Poll(Communication_t *Communication_p);

/**
 * Function for sending packet in R15 protocol family.
 *
 * @param [in]  Communication_p Communication module context.
 * @param [in]  InputDataIn_p       Pointer to the input data.
 *
 * @retval E_SUCCESS                                                After successful execution.
 * @retval E_FAILED_TO_ALLOCATE_COMM_BUFFER Failed to allocate communication
 *                                          buffer.
 */
ErrorCode_e R15_Transport_Send(Communication_t *Communication_p, void *InputDataIn_p);

/**
 * Function for setting the timeouts in the R15 protocol family.
 *
 * @param [in]  Communication_p Communication module context.
 * @param [in]  TimeoutData_p   Pointer to the input data with all timeouts.
 *
 * @retval E_SUCCESS            After successful execution.
 */
ErrorCode_e R15_SetProtocolTimeouts(Communication_t *Communication_p, void *TimeoutData_p);

/**
 * Function for getting the timeouts in the R15 protocol family.
 *
 * @param [in]  Communication_p Communication module context.
 * @param [out] TimeoutData_p   Return all defined timeouts.
 *
 * @retval E_SUCCESS            After successful execution.
 */
ErrorCode_e R15_GetProtocolTimeouts(Communication_t *Communication_p, void *TimeoutData_p);


/** @} */
/** @} */
/** @} */
#endif // _INCLUSION_GUARD_R_R15_TRANSPORT_LAYER_H_