foxBMS - Unit Tests  1.4.1
The foxBMS Unit Tests API Documentation
can_cfg_rx.c File Reference

Configuration for the CAN module. More...

#include "can_cfg.h"
#include "can_cbs_rx.h"
#include "can_cfg_rx-message-definitions.h"
#include "database.h"
#include "ftask.h"
Include dependency graph for can_cfg_rx.c:

Go to the source code of this file.

Variables

const CAN_RX_MESSAGE_TYPE_s can_rxMessages []
 
const uint8_t can_rxLength = sizeof(can_rxMessages) / sizeof(can_rxMessages[0])
 

Detailed Description

Configuration for the CAN module.

SPDX-License-Identifier: BSD-3-Clause

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

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®″
Author
foxBMS Team
Date
2019-12-04 (date of creation)
Updated
2022-10-27 (date of last update)
Version
v1.4.1
Prefix
CANRX

The CAN bus settings and the received messages and their reception handling are to be specified here.

Definition in file can_cfg_rx.c.

Variable Documentation

◆ can_rxLength

const uint8_t can_rxLength = sizeof(can_rxMessages) / sizeof(can_rxMessages[0])

length of CAN message arrays

Definition at line 92 of file can_cfg_rx.c.

◆ can_rxMessages

const CAN_RX_MESSAGE_TYPE_s can_rxMessages[]
Initial value:
= {
}
uint32_t CANRX_ImdResponse(CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim)
can rx callback function for IMD response messages
uint32_t CANRX_SoftwareReset(CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim)
can rx callback function for SW reset
uint32_t CANRX_SoftwareVersion(CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim)
can rx callback function for SW version
uint32_t CANRX_Debug(CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim)
can rx callback function for debug messages
uint32_t CANRX_CurrentSensor(CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim)
can rx callback function for current sensor measurements
uint32_t CANRX_BmsStateRequest(CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim)
can rx callback function for state requests
uint32_t CANRX_ImdInfo(CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim)
can rx callback function for IMD info messages
#define CAN_NODE_1
Definition: can_cfg.h:71
#define CAN_NODE_IMD
Definition: can_cfg.h:75
#define CAN_NODE_CURRENT_SENSOR
Definition: can_cfg.h:76
#define CANRX_DEBUG_MESSAGE
#define CANRX_SOFTWARE_RESET_MESSAGE
#define CANRX_STRING0_ENERGY_COUNTER_MESSAGE
#define CANRX_STRING0_VOLTAGE1_MESSAGE
#define CANRX_IMD_RESPONSE_MESSAGE
#define CANRX_IMD_INFO_MESSAGE
#define CANRX_STRING0_CURRENT_COUNTER_MESSAGE
#define CANRX_STRING0_VOLTAGE2_MESSAGE
#define CANRX_STRING0_CURRENT_MESSAGE
#define CANRX_STRING0_POWER_MESSAGE
#define CANRX_SOFTWARE_VERSION_MESSAGE
#define CANRX_STRING0_VOLTAGE3_MESSAGE
#define CANRX_BMS_STATE_REQUEST_MESSAGE
#define CANRX_STRING0_TEMPERATURE_MESSAGE

registry of CAN RX messages

Definition at line 74 of file can_cfg_rx.c.