foxBMS - Unit Tests
1.4.1
The foxBMS Unit Tests API Documentation
|
API header for the insulation monitoring device. More...
Go to the source code of this file.
Macros | |
#define | IMD_PERIODIC_CALL_TIME_ms (FTSK_TASK_CYCLIC_100MS_CYCLE_TIME) |
#define | IMD_ERROR_THRESHOLD_INSULATION_RESISTANCE_kOhm (500u) |
#define | IMD_WARNING_THRESHOLD_INSULATION_RESISTANCE_kOhm (750u) |
Functions | |
IMD_RETURN_TYPE_e | IMD_RequestInitialization (void) |
Request initialization of IMD statemachine. More... | |
IMD_RETURN_TYPE_e | IMD_RequestInsulationMeasurement (void) |
Request to activate the actual IMD measurement. More... | |
IMD_RETURN_TYPE_e | IMD_RequestMeasurementStop (void) |
Request to deactivate the actual IMD measurement. More... | |
bool | IMD_GetInitializationState (void) |
Gets the initialization state. More... | |
STD_RETURN_TYPE_e | IMD_Trigger (void) |
trigger function for the IMD driver state machine. More... | |
IMD_FSM_STATES_e | IMD_ProcessInitializationState (void) |
Processes the initialization state. More... | |
IMD_FSM_STATES_e | IMD_ProcessEnableState (void) |
Processes the IMD enable state. More... | |
IMD_FSM_STATES_e | IMD_ProcessRunningState (DATA_BLOCK_INSULATION_MONITORING_s *pTableInsulationMonitoring) |
Processes the running state. More... | |
IMD_FSM_STATES_e | IMD_ProcessShutdownState (void) |
Processes the shutdown state. More... | |
API header for the insulation monitoring device.
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:
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:
Definition in file imd.h.
#define IMD_ERROR_THRESHOLD_INSULATION_RESISTANCE_kOhm (500u) |
#define IMD_PERIODIC_CALL_TIME_ms (FTSK_TASK_CYCLIC_100MS_CYCLE_TIME) |
#define IMD_WARNING_THRESHOLD_INSULATION_RESISTANCE_kOhm (750u) |
enum IMD_FSM_STATES_e |
States of the state machine
enum IMD_RETURN_TYPE_e |
enum IMD_STATE_REQUEST_e |
bool IMD_GetInitializationState | ( | void | ) |
IMD_FSM_STATES_e IMD_ProcessEnableState | ( | void | ) |
Processes the IMD enable state.
This function needs to be implemented in the dedicated driver. This function enables the actual IMD device to start the insulation measurement. Functionality need to be fullfilled after one call.
Definition at line 211 of file bender_ir155.c.
IMD_FSM_STATES_e IMD_ProcessInitializationState | ( | void | ) |
Processes the initialization state.
This function needs to be implemented in the dedicated driver. This function initializes the required SW modules and peripherals but does not start the actual IMD measurement.
Definition at line 207 of file bender_ir155.c.
IMD_FSM_STATES_e IMD_ProcessRunningState | ( | DATA_BLOCK_INSULATION_MONITORING_s * | pTableInsulationMonitoring | ) |
Processes the running state.
This function needs to be implemented in the dedicated driver
pTableInsulationMonitoring | pointer to insulation monitoring database entry |
Definition at line 217 of file bender_ir155.c.
IMD_FSM_STATES_e IMD_ProcessShutdownState | ( | void | ) |
Processes the shutdown state.
This function needs to be implemented in the dedicated driver. This function disables the actual IMD device to stop the insulation measurement.
Definition at line 222 of file bender_ir155.c.
IMD_RETURN_TYPE_e IMD_RequestInitialization | ( | void | ) |
Request initialization of IMD statemachine.
Definition at line 509 of file imd.c.
IMD_RETURN_TYPE_e IMD_RequestInsulationMeasurement | ( | void | ) |
Request to activate the actual IMD measurement.
Definition at line 513 of file imd.c.
IMD_RETURN_TYPE_e IMD_RequestMeasurementStop | ( | void | ) |
Request to deactivate the actual IMD measurement.
Definition at line 517 of file imd.c.
STD_RETURN_TYPE_e IMD_Trigger | ( | void | ) |
trigger function for the IMD driver state machine.
This function contains the sequence of events in the IMD state machine. It must be called time-triggered, every 100ms.
Definition at line 525 of file imd.c.