foxBMS-UnitTests  1.0.0
The foxBMS Unit Tests API Documentation
diag_cbs.h File Reference

Diagnosis driver header. More...

#include "general.h"
#include "diag_cfg.h"
Include dependency graph for diag_cbs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void DIAG_DummyCallback (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t data)
 dummy callback function of diagnosis events More...
 
void DIAG_ErrorOvervoltage (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t stringNumber)
 diagnosis callback function for overvoltage events More...
 
void DIAG_ErrorUndervoltage (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t stringNumber)
 diagnosis callback function for undervoltage events More...
 
void DIAG_ErrorOvertemperatureCharge (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t stringNumber)
 diagnosis callback function for overtemperature charge events More...
 
void DIAG_ErrorOvertemperatureDischarge (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t stringNumber)
 diagnosis callback function for overtemperature discharge events More...
 
void DIAG_ErrorUndertemperatureCharge (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t stringNumber)
 diagnosis callback function for undertemperature charge events More...
 
void DIAG_ErrorUndertemperatureDischarge (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t stringNumber)
 diagnosis callback function for undertemperature discharge events More...
 
void DIAG_ErrorOvercurrentCharge (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t stringNumber)
 diagnosis callback function for overcurrent charge events More...
 
void DIAG_ErrorOvercurrentDischarge (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t stringNumber)
 diagnosis callback function for overcurrent discharge events More...
 
void DIAG_ErrorCurrentOnOpenString (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t stringNumber)
 diagnosis callback function for overcurrent charge events More...
 
void DIAG_ErrorCurrentMeasurement (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t stringNumber)
 diagnosis callback function for current measurement related events More...
 
void DIAG_ErrorHighVoltageMeasurement (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t stringNumber)
 diagnosis callback function for current sensor related events More...
 
void DIAG_ErrorSystemMonitoring (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t data)
 Callback function for system monitoring related diagnosis events. More...
 
void DIAG_ErrorInterlock (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t data)
 Callback function for interlock related diagnosis events. More...
 
void DIAG_ErrorCanTiming (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t data)
 diagnosis callback function for CAN related events More...
 
void DIAG_ErrorLtc (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t stringNumber)
 diagnosis callback function for LTC module related events More...
 
void DIAG_ErrorMeasurementIc (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t stringNumber)
 diagnosis callback function for measurement IC related events More...
 
void DIAG_ErrorCurrentSensor (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t stringNumber)
 diagnosis callback function for current sensor related events More...
 
void DIAG_Sbc (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t data)
 diagnosis callback function for SBC related events More...
 
void DIAG_ErrorPlausibility (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t stringNumber)
 diagnosis callback function for plausibility check related events More...
 
void DIAG_StringContactorFeedback (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t stringNumber)
 diagnosis callback function for string contactor feedback related events More...
 
void DIAG_PrechargeContactorFeedback (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t stringNumber)
 diagnosis callback function for precharge contactor feedback related events More...
 
void DIAG_PlausibilityCheck (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t stringNumber)
 diagnosis callback function for plausibility check related events More...
 
void DIAG_ErrorDeepDischarge (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t stringNumber)
 diagnosis callback function for deep discharge events More...
 
void DIAG_ErrorPowerMeasurement (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t data)
 diagnosis callback function for current sensor related events More...
 
void DIAG_Insulation (DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t data)
 

Detailed Description

Diagnosis driver header.

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:

  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
2021-02-17 (date of creation)
Updated
2021-02-17 (date of last update)
Prefix
DIAG

Definition in file diag_cbs.h.

Function Documentation

◆ DIAG_DummyCallback()

void DIAG_DummyCallback ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  data 
)

dummy callback function of diagnosis events

Parameters
[in]ch_idID of entry
[in]eventOK, NOK or RESET
[in]kpkDiagShimshim to the database entries
[in]datadata

Definition at line 68 of file diag_cbs_dummy.c.

◆ DIAG_ErrorCanTiming()

void DIAG_ErrorCanTiming ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  data 
)

diagnosis callback function for CAN related events

Parameters
[in]ch_idID of diag entry
[in]eventDIAG_EVENT_e
[in]kpkDiagShimshim to the database entries
[in]datadata

Definition at line 68 of file diag_cbs_can.c.

◆ DIAG_ErrorCurrentMeasurement()

void DIAG_ErrorCurrentMeasurement ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  stringNumber 
)

diagnosis callback function for current measurement related events

Parameters
[in]ch_idID of diag entry
[in]eventOK, NOK or RESET
[in]kpkDiagShimshim to the database entries
[in]stringNumberstringNumber where event occurred

Definition at line 231 of file diag_cbs_current.c.

◆ DIAG_ErrorCurrentOnOpenString()

void DIAG_ErrorCurrentOnOpenString ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  stringNumber 
)

diagnosis callback function for overcurrent charge events

Parameters
[in]ch_idID of diag entry
[in]eventOK, NOK or RESET
[in]kpkDiagShimshim to the database entries
[in]stringNumberstringNumber where overcurrent event occurred

Definition at line 268 of file diag_cbs_current.c.

◆ DIAG_ErrorCurrentSensor()

void DIAG_ErrorCurrentSensor ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  stringNumber 
)

diagnosis callback function for current sensor related events

Parameters
[in]ch_idID of diag entry
[in]eventOK, NOK or RESET
[in]kpkDiagShimshim to the database entries
[in]stringNumberstringNumber where current sensor event occurred

Definition at line 68 of file diag_cbs_current-sensor.c.

◆ DIAG_ErrorDeepDischarge()

void DIAG_ErrorDeepDischarge ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  stringNumber 
)

diagnosis callback function for deep discharge events

Parameters
[in]ch_idID of diag entry
[in]eventOK, NOK or RESET
[in]kpkDiagShimshim to the database entries
[in]stringNumberstringNumber where deep discharge event occurred

Definition at line 69 of file diag_cbs_deep-discharge.c.

Here is the call graph for this function:

◆ DIAG_ErrorHighVoltageMeasurement()

void DIAG_ErrorHighVoltageMeasurement ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  stringNumber 
)

diagnosis callback function for current sensor related events

Parameters
[in]ch_idID of diag entry
[in]eventOK, NOK or RESET
[in]kpkDiagShimshim to the database entries
[in]stringNumberstringNumber where event occurred

Definition at line 136 of file diag_cbs_voltage.c.

◆ DIAG_ErrorInterlock()

void DIAG_ErrorInterlock ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  data 
)

Callback function for interlock related diagnosis events.

Parameters
[in]ch_idID of diag entry
[in]eventDIAG_EVENT_e
[in]kpkDiagShimshim to the database entries
[in]datadata

Definition at line 68 of file diag_cbs_interlock.c.

◆ DIAG_ErrorLtc()

void DIAG_ErrorLtc ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  stringNumber 
)

diagnosis callback function for LTC module related events

Parameters
[in]ch_idID of diag entry
[in]eventOK, NOK or RESET
[in]kpkDiagShimshim to the database entries
[in]stringNumberstringNumber where LTC event occurred

Definition at line 68 of file diag_cbs_ltc.c.

◆ DIAG_ErrorMeasurementIc()

void DIAG_ErrorMeasurementIc ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  stringNumber 
)

diagnosis callback function for measurement IC related events

Parameters
[in]ch_idID of diag entry
[in]eventOK, NOK or RESET
[in]kpkDiagShimshim to the database entries
[in]stringNumberstringNumber where event occurred

Definition at line 68 of file diag_cbs_mic.c.

◆ DIAG_ErrorOvercurrentCharge()

void DIAG_ErrorOvercurrentCharge ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  stringNumber 
)

diagnosis callback function for overcurrent charge events

Parameters
[in]ch_idID of diag entry
[in]eventOK, NOK or RESET
[in]kpkDiagShimshim to the database entries
[in]stringNumberstringNumber where overcurrent event occurred

Definition at line 68 of file diag_cbs_current.c.

◆ DIAG_ErrorOvercurrentDischarge()

void DIAG_ErrorOvercurrentDischarge ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  stringNumber 
)

diagnosis callback function for overcurrent discharge events

Parameters
[in]ch_idID of diag entry
[in]eventOK, NOK or RESET
[in]kpkDiagShimshim to the database entries
[in]stringNumberstringNumber where overcurrent event occurred

Definition at line 150 of file diag_cbs_current.c.

◆ DIAG_ErrorOvertemperatureCharge()

void DIAG_ErrorOvertemperatureCharge ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  stringNumber 
)

diagnosis callback function for overtemperature charge events

Parameters
[in]ch_idID of diag entry
[in]eventOK, NOK or RESET
[in]kpkDiagShimshim to the database entries
[in]stringNumberstringNumber where overtemperature event occurred

Definition at line 68 of file diag_cbs_temperature.c.

◆ DIAG_ErrorOvertemperatureDischarge()

void DIAG_ErrorOvertemperatureDischarge ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  stringNumber 
)

diagnosis callback function for overtemperature discharge events

Parameters
[in]ch_idID of diag entry
[in]eventOK, NOK or RESET
[in]kpkDiagShimshim to the database entries
[in]stringNumberstringNumber where overtemperature event occurred

Definition at line 102 of file diag_cbs_temperature.c.

◆ DIAG_ErrorOvervoltage()

void DIAG_ErrorOvervoltage ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  stringNumber 
)

diagnosis callback function for overvoltage events

Parameters
[in]ch_idID of diag entry
[in]eventOK, NOK or RESET
[in]kpkDiagShimshim to the database entries
[in]stringNumberstringNumber where overvoltage event occurred

Definition at line 68 of file diag_cbs_voltage.c.

◆ DIAG_ErrorPlausibility()

void DIAG_ErrorPlausibility ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  stringNumber 
)

diagnosis callback function for plausibility check related events

Parameters
[in]ch_idID of diag entry
[in]eventDIAG_EVENT_e
[in]kpkDiagShimshim to the database entries
[in]stringNumberstringNumber where current sensor event occurred

Definition at line 68 of file diag_cbs_plausibility.c.

◆ DIAG_ErrorPowerMeasurement()

void DIAG_ErrorPowerMeasurement ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  data 
)

diagnosis callback function for current sensor related events

Parameters
[in]ch_idID of diag entry
[in]eventOK, NOK or RESET
[in]kpkDiagShimshim to the database entries
[in]dataTODO

Definition at line 68 of file diag_cbs_power-measurement.c.

◆ DIAG_ErrorSystemMonitoring()

void DIAG_ErrorSystemMonitoring ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  data 
)

Callback function for system monitoring related diagnosis events.

Parameters
[in]ch_idID of diag entry
[in]eventDIAG_EVENT_e
[in]kpkDiagShimshim to the database entries
[in]datadata

Definition at line 70 of file diag_cbs_sys-mon.c.

◆ DIAG_ErrorUndertemperatureCharge()

void DIAG_ErrorUndertemperatureCharge ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  stringNumber 
)

diagnosis callback function for undertemperature charge events

Parameters
[in]ch_idID of diag entry
[in]eventOK, NOK or RESET
[in]kpkDiagShimshim to the database entries
[in]stringNumberstringNumber where undertemperature event occurred

Definition at line 136 of file diag_cbs_temperature.c.

◆ DIAG_ErrorUndertemperatureDischarge()

void DIAG_ErrorUndertemperatureDischarge ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  stringNumber 
)

diagnosis callback function for undertemperature discharge events

Parameters
[in]ch_idID of diag entry
[in]eventOK, NOK or RESET
[in]kpkDiagShimshim to the database entries
[in]stringNumberstringNumber where undertemperature event occurred

Definition at line 170 of file diag_cbs_temperature.c.

◆ DIAG_ErrorUndervoltage()

void DIAG_ErrorUndervoltage ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  stringNumber 
)

diagnosis callback function for undervoltage events

Parameters
[in]ch_idID of diag entry
[in]eventOK, NOK or RESET
[in]kpkDiagShimshim to the database entries
[in]stringNumberstringNumber where undervoltage event occurred

Definition at line 102 of file diag_cbs_voltage.c.

◆ DIAG_Insulation()

void DIAG_Insulation ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  data 
)

Definition at line 68 of file diag_cbs_insulation.c.

◆ DIAG_PlausibilityCheck()

void DIAG_PlausibilityCheck ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  stringNumber 
)

diagnosis callback function for plausibility check related events

Parameters
[in]ch_idID of diag entry
[in]eventDIAG_EVENT_e
[in]kpkDiagShimshim to the database entries
[in]stringNumberstringNumber where precharge feedback event occurred

Definition at line 88 of file diag_cbs_plausibility.c.

◆ DIAG_PrechargeContactorFeedback()

void DIAG_PrechargeContactorFeedback ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  stringNumber 
)

diagnosis callback function for precharge contactor feedback related events

Parameters
[in]ch_idID of diag entry
[in]eventDIAG_EVENT_e
[in]kpkDiagShimshim to the database entries
[in]stringNumberstringNumber where precharge feedback event occurred

Definition at line 88 of file diag_cbs_contactor.c.

◆ DIAG_Sbc()

void DIAG_Sbc ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  data 
)

diagnosis callback function for SBC related events

Parameters
[in]ch_idID of diag entry
[in]eventDIAG_EVENT_e
[in]kpkDiagShimshim to the database entries
[in]datadata

Definition at line 68 of file diag_cbs_sbc.c.

◆ DIAG_StringContactorFeedback()

void DIAG_StringContactorFeedback ( DIAG_ID_e  ch_id,
DIAG_EVENT_e  event,
const DIAG_DATABASE_SHIM_s *const  kpkDiagShim,
uint32_t  stringNumber 
)

diagnosis callback function for string contactor feedback related events

Parameters
[in]ch_idID of diag entry
[in]eventDIAG_EVENT_e
[in]kpkDiagShimshim to the database entries
[in]stringNumberstringNumber where contactor feedback event occurred

Definition at line 68 of file diag_cbs_contactor.c.