foxBMS - Unit Tests  1.4.1
The foxBMS Unit Tests API Documentation
can_cbs_tx.h
Go to the documentation of this file.
1 /**
2  *
3  * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.
4  * All rights reserved.
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are met:
10  *
11  * 1. Redistributions of source code must retain the above copyright notice, this
12  * list of conditions and the following disclaimer.
13  *
14  * 2. Redistributions in binary form must reproduce the above copyright notice,
15  * this list of conditions and the following disclaimer in the documentation
16  * and/or other materials provided with the distribution.
17  *
18  * 3. Neither the name of the copyright holder nor the names of its
19  * contributors may be used to endorse or promote products derived from
20  * this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  *
33  * We kindly request you to use one or more of the following phrases to refer to
34  * foxBMS in your hardware, software, documentation or advertising materials:
35  *
36  * - ″This product uses parts of foxBMS®″
37  * - ″This product includes parts of foxBMS®″
38  * - ″This product is derived from foxBMS®″
39  *
40  */
41 
42 /**
43  * @file can_cbs_tx.h
44  * @author foxBMS Team
45  * @date 2021-04-20 (date of creation)
46  * @updated 2022-10-27 (date of last update)
47  * @version v1.4.1
48  * @ingroup DRIVER
49  * @prefix CANTX
50  *
51  * @brief CAN callbacks header
52  *
53  */
54 
55 #ifndef FOXBMS__CAN_CBS_TX_H_
56 #define FOXBMS__CAN_CBS_TX_H_
57 
58 /*========== Includes =======================================================*/
59 #include "general.h"
60 
61 #include "can_cfg.h"
62 
63 /*========== Macros and Definitions =========================================*/
64 
65 /*========== Extern Constant and Variable Declarations ======================*/
66 
67 /*========== Extern Function Prototypes =====================================*/
68 /** TX callback functions @{ */
69 /**
70  * @brief can tx callback function for state
71  * @param[in] message contains the message ID, DLC and endianness
72  * @param[in] pCanData payload of can frame
73  * @param[in] pMuxId multiplexer for multiplexed CAN messages
74  * @param[in] kpkCanShim shim to the database entries
75  */
76 extern uint32_t CANTX_BmsState(
78  uint8_t *pCanData,
79  uint8_t *pMuxId,
80  const CAN_SHIM_s *const kpkCanShim);
81 /**
82  * @brief can tx callback function for detail state
83  * @param[in] message contains the message ID, DLC and endianness
84  * @param[in] pCanData payload of can frame
85  * @param[in] pMuxId multiplexer for multiplexed CAN messages
86  * @param[in] kpkCanShim shim to the database entries
87  */
88 extern uint32_t CANTX_BmsStateDetails(
90  uint8_t *pCanData,
91  uint8_t *pMuxId,
92  const CAN_SHIM_s *const kpkCanShim);
93 /**
94  * @brief can tx callback function for cell voltages
95  * @param[in] message contains the message ID, DLC and endianness
96  * @param[in] pCanData payload of can frame
97  * @param[in] pMuxId multiplexer for multiplexed CAN messages
98  * @param[in] kpkCanShim shim to the database entries
99  */
100 extern uint32_t CANTX_CellVoltages(
101  CAN_MESSAGE_PROPERTIES_s message,
102  uint8_t *pCanData,
103  uint8_t *pMuxId,
104  const CAN_SHIM_s *const kpkCanShim);
105 /**
106  * @brief can tx callback function for cell temperatures
107  * @param[in] message contains the message ID, DLC and endianness
108  * @param[in] pCanData payload of can frame
109  * @param[in] pMuxId multiplexer for multiplexed CAN messages
110  * @param[in] kpkCanShim shim to the database entries
111  */
112 extern uint32_t CANTX_CellTemperatures(
113  CAN_MESSAGE_PROPERTIES_s message,
114  uint8_t *pCanData,
115  uint8_t *pMuxId,
116  const CAN_SHIM_s *const kpkCanShim);
117 /**
118  * @brief can tx callback function for limit values
119  * @param[in] message contains the message ID, DLC and endianness
120  * @param[in] pCanData payload of can frame
121  * @param[in] pMuxId multiplexer for multiplexed CAN messages
122  * @param[in] kpkCanShim shim to the database entries
123  */
124 extern uint32_t CANTX_LimitValues(
125  CAN_MESSAGE_PROPERTIES_s message,
126  uint8_t *pCanData,
127  uint8_t *pMuxId,
128  const CAN_SHIM_s *const kpkCanShim);
129 /**
130  * @brief can tx callback function for min/max values
131  * @param[in] message contains the message ID, DLC and endianness
132  * @param[in] pCanData payload of can frame
133  * @param[in] pMuxId multiplexer for multiplexed CAN messages
134  * @param[in] kpkCanShim shim to the database entries
135  */
136 extern uint32_t CANTX_MinimumMaximumValues(
137  CAN_MESSAGE_PROPERTIES_s message,
138  uint8_t *pCanData,
139  uint8_t *pMuxId,
140  const CAN_SHIM_s *const kpkCanShim);
141 /**
142  * @brief can tx callback function for state estimation values
143  * @param[in] message contains the message ID, DLC and endianness
144  * @param[in] pCanData payload of can frame
145  * @param[in] pMuxId multiplexer for multiplexed CAN messages
146  * @param[in] kpkCanShim shim to the database entries
147  */
148 extern uint32_t CANTX_PackStateEstimation(
149  CAN_MESSAGE_PROPERTIES_s message,
150  uint8_t *pCanData,
151  uint8_t *pMuxId,
152  const CAN_SHIM_s *const kpkCanShim);
153 /**
154  * @brief can tx callback function for pack values values
155  * @param[in] message contains the message ID, DLC and endianness
156  * @param[in] pCanData payload of can frame
157  * @param[in] pMuxId multiplexer for multiplexed CAN messages
158  * @param[in] kpkCanShim shim to the database entries
159  */
160 extern uint32_t CANTX_PackValues(
161  CAN_MESSAGE_PROPERTIES_s message,
162  uint8_t *pCanData,
163  uint8_t *pMuxId,
164  const CAN_SHIM_s *const kpkCanShim);
165 /**
166  * @brief can tx callback function for string state values
167  * @param[in] message contains the message ID, DLC and endianness
168  * @param[in] pCanData payload of can frame
169  * @param[in] pMuxId multiplexer for multiplexed CAN messages
170  * @param[in] kpkCanShim shim to the database entries
171  */
172 extern uint32_t CANTX_StringState(
173  CAN_MESSAGE_PROPERTIES_s message,
174  uint8_t *pCanData,
175  uint8_t *pMuxId,
176  const CAN_SHIM_s *const kpkCanShim);
177 /**
178  * @brief can tx callback function for string values
179  * @param[in] message contains the message ID, DLC and endianness
180  * @param[in] pCanData payload of can frame
181  * @param[in] pMuxId multiplexer for multiplexed CAN messages
182  * @param[in] kpkCanShim shim to the database entries
183  */
184 extern uint32_t CANTX_StringValuesP0(
185  CAN_MESSAGE_PROPERTIES_s message,
186  uint8_t *pCanData,
187  uint8_t *pMuxId,
188  const CAN_SHIM_s *const kpkCanShim);
189 /**
190  * @brief can tx callback function for string minimum and maximum values
191  * @param[in] message contains the message ID, DLC and endianness
192  * @param[in] pCanData payload of can frame
193  * @param[in] pMuxId multiplexer for multiplexed CAN messages
194  * @param[in] kpkCanShim shim to the database entries
195  */
196 extern uint32_t CANTX_StringMinimumMaximumValues(
197  CAN_MESSAGE_PROPERTIES_s message,
198  uint8_t *pCanData,
199  uint8_t *pMuxId,
200  const CAN_SHIM_s *const kpkCanShim);
201 /**
202  * @brief can tx callback function for string state estimation
203  * @param[in] message contains the message ID, DLC and endianness
204  * @param[in] pCanData payload of can frame
205  * @param[in] pMuxId multiplexer for multiplexed CAN messages
206  * @param[in] kpkCanShim shim to the database entries
207  */
208 extern uint32_t CANTX_StringStateEstimation(
209  CAN_MESSAGE_PROPERTIES_s message,
210  uint8_t *pCanData,
211  uint8_t *pMuxId,
212  const CAN_SHIM_s *const kpkCanShim);
213 /**
214  * @brief can tx callback function for string values 2
215  * @param[in] message contains the message ID, DLC and endianness
216  * @param[in] pCanData payload of can frame
217  * @param[in] pMuxId multiplexer for multiplexed CAN messages
218  * @param[in] kpkCanShim shim to the database entries
219  */
220 extern uint32_t CANTX_StringValuesP1(
221  CAN_MESSAGE_PROPERTIES_s message,
222  uint8_t *pCanData,
223  uint8_t *pMuxId,
224  const CAN_SHIM_s *const kpkCanShim);
225 /** @} */
226 
227 /*========== Externalized Static Functions Prototypes (Unit Test) ===========*/
228 #ifdef UNITY_UNIT_TEST
229 
230 #endif
231 
232 #endif /* FOXBMS__CAN_CBS_TX_H_ */
uint32_t CANTX_CellVoltages(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for cell voltages
uint32_t CANTX_PackStateEstimation(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for state estimation values
uint32_t CANTX_BmsState(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for state
uint32_t CANTX_StringValuesP0(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for string values
uint32_t CANTX_StringStateEstimation(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for string state estimation
uint32_t CANTX_LimitValues(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for limit values
uint32_t CANTX_CellTemperatures(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for cell temperatures
uint32_t CANTX_PackValues(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for pack values values
uint32_t CANTX_MinimumMaximumValues(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for min/max values
uint32_t CANTX_StringMinimumMaximumValues(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for string minimum and maximum values
uint32_t CANTX_BmsStateDetails(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for detail state
uint32_t CANTX_StringValuesP1(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for string values 2
uint32_t CANTX_StringState(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for string state values
Headers for the configuration for the CAN module.
General macros and definitions for the whole platform.