![]() |
The foxBMS secondary mcu API documentation
|
Headers for the messages and signal settings for the CAN driver. More...
Go to the source code of this file.
Data Structures | |
struct | CANS_STATE_s |
Functions | |
void | CANS_Init (void) |
void | CANS_MainFunction (void) |
void | CANS_Enable_Periodic (uint8_t command) |
enable/disable the periodic transmit/receive. More... | |
uint8_t | CANS_IsCurrentSensorPresent (void) |
set flag for presence of current sensor. More... | |
uint8_t | CANS_IsCurrentSensorCCPresent (void) |
set flag for sending of C-C by current sensor. More... | |
STD_RETURN_TYPE_e | CANS_AddMessage (CAN_NodeTypeDef_e canNode, uint32_t msgID, uint8_t *ptrMsgData, uint32_t msgLength, uint32_t RTR) |
Add message to transmit buffer, message will be transmitted shortly after. More... | |
STD_RETURN_TYPE_e | CANS_TransmitBuffer (CAN_NodeTypeDef_e canNode) |
Transmits canNode transmit buffer. More... | |
STD_RETURN_TYPE_e | CANS_TransmitMessage (CAN_NodeTypeDef_e canNode, uint32_t msgID, uint8_t *ptrMsgData, uint32_t msgLength, uint32_t RTR) |
Transmits message directly on the CAN bus. More... | |
Headers for the messages and signal settings for the CAN driver.
BSD 3-Clause License Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
We kindly request you to use one or more of the following phrases to refer to foxBMS in your hardware, software, documentation or advertising materials:
″This product uses parts of foxBMS®″
″This product includes parts of foxBMS®″
″This product is derived from foxBMS®″
generic conversion module header of Can signals from CAN buffered reception to DATA Manager and vice versa
STD_RETURN_TYPE_e CANS_AddMessage | ( | CAN_NodeTypeDef_e | canNode, |
uint32_t | msgID, | ||
uint8_t * | ptrMsgData, | ||
uint32_t | msgLength, | ||
uint32_t | RTR | ||
) |
Add message to transmit buffer, message will be transmitted shortly after.
canNode | canNode on which the message shall be transmitted |
msgID | ID of the message that will be transmitted |
ptrMsgData | pointer to a uint8_t array that contains the message that will be transmitted |
msgLength | length of the message that will be transmitted This parameter can be a value of CAN_identifier_type. |
RTR | Specifies the type of frame for the message that will be transmitted. This parameter can be a value of CAN_remote_transmission_request |
E_OK | if successful, E_NOT_OK if buffer is full or error occurred |
void CANS_Enable_Periodic | ( | uint8_t | command | ) |
enable/disable the periodic transmit/receive.
void CANS_Init | ( | void | ) |
initializes local variables and module internals needed to use conversion of can signals. Until now no initialization is needed and thus the function does nothing.
uint8_t CANS_IsCurrentSensorCCPresent | ( | void | ) |
set flag for sending of C-C by current sensor.
uint8_t CANS_IsCurrentSensorPresent | ( | void | ) |
set flag for presence of current sensor.
void CANS_MainFunction | ( | void | ) |
handles the conversion of can signals from and to datamanager database or other modules defined by the getter and setter configuration.
STD_RETURN_TYPE_e CANS_TransmitBuffer | ( | CAN_NodeTypeDef_e | canNode | ) |
Transmits canNode transmit buffer.
canNode | canNode on which the message shall be transmitted |
E_OK | if transmission successful, otherwise E_NOT_OK |
STD_RETURN_TYPE_e CANS_TransmitMessage | ( | CAN_NodeTypeDef_e | canNode, |
uint32_t | msgID, | ||
uint8_t * | ptrMsgData, | ||
uint32_t | msgLength, | ||
uint32_t | RTR | ||
) |
Transmits message directly on the CAN bus.
canNode | canNode on which the message shall be transmitted |
msgID | ID of the message that will be transmitted |
ptrMsgData | pointer to the data that shall be transmitted |
msgLength | Specifies the data length |
RTR | Specifies the type of frame for the message that will be transmitted. |
E_OK | if transmission successful, otherwise E_NOT_OK |