foxBMS
1.1.1
The foxBMS Battery Management System API Documentation
|
Database module header. More...
#include "database_cfg.h"
Go to the source code of this file.
Functions | |
bool | DATA_DatabaseEntryUpdatedAtLeastOnce (DATA_BLOCK_HEADER_s dataBlockHeader) |
Checks if passed database entry has been updated at least once. More... | |
bool | DATA_EntryUpdatedWithinInterval (DATA_BLOCK_HEADER_s dataBlockHeader, uint32_t timeInterval) |
Checks if passed database entry has been updated within the last time interval. More... | |
bool | DATA_EntryUpdatedPeriodicallyWithinInterval (DATA_BLOCK_HEADER_s dataBlockHeader, uint32_t timeInterval) |
Checks if passed database entry has been periodically updated within the time interval. More... | |
uint8_t | DATA_GetStringNumberFromVoltageIndex (uint16_t cellIndex) |
Returns string number of passed cell index. More... | |
uint8_t | DATA_GetModuleNumberFromVoltageIndex (uint16_t cellIndex) |
Returns module number of passed cell index. More... | |
uint8_t | DATA_GetCellNumberFromVoltageIndex (uint16_t cellIndex) |
Returns cell number of passed cell index. More... | |
uint8_t | DATA_GetStringNumberFromTemperatureIndex (uint16_t sensorIndex) |
Returns string number of passed temperature sensor index. More... | |
uint8_t | DATA_GetModuleNumberFromTemperatureIndex (uint16_t sensorIndex) |
Returns module number of passed temperature sensor index. More... | |
uint8_t | DATA_GetSensorNumberFromTemperatureIndex (uint16_t sensorIndex) |
Returns sensor number of passed temperature sensor index. More... | |
Database module header.
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:
Provides helper function to handle database entries
Definition in file database_helper.h.
bool DATA_DatabaseEntryUpdatedAtLeastOnce | ( | DATA_BLOCK_HEADER_s | dataBlockHeader | ) |
Checks if passed database entry has been updated at least once.
[in] | dataBlockHeader | header of database entry |
Definition at line 73 of file database_helper.c.
bool DATA_EntryUpdatedPeriodicallyWithinInterval | ( | DATA_BLOCK_HEADER_s | dataBlockHeader, |
uint32_t | timeInterval | ||
) |
Checks if passed database entry has been periodically updated within the time interval.
Checks if the last update timestamp is not older than time interval and if the difference between previous timestamp and timestamp is smaller than time interval
[in] | dataBlockHeader | header of database entry |
[in] | timeInterval | in systicks (type: uint32_t) |
Definition at line 100 of file database_helper.c.
bool DATA_EntryUpdatedWithinInterval | ( | DATA_BLOCK_HEADER_s | dataBlockHeader, |
uint32_t | timeInterval | ||
) |
Checks if passed database entry has been updated within the last time interval.
[in] | dataBlockHeader | header of database entry |
[in] | timeInterval | in systicks (type: uint32_t) |
Definition at line 84 of file database_helper.c.
uint8_t DATA_GetCellNumberFromVoltageIndex | ( | uint16_t | cellIndex | ) |
Returns cell number of passed cell index.
[in] | cellIndex | index of cell in starting by 0 |
Definition at line 129 of file database_helper.c.
uint8_t DATA_GetModuleNumberFromTemperatureIndex | ( | uint16_t | sensorIndex | ) |
Returns module number of passed temperature sensor index.
[in] | sensorIndex | index of sensor starting by 0 |
Definition at line 139 of file database_helper.c.
uint8_t DATA_GetModuleNumberFromVoltageIndex | ( | uint16_t | cellIndex | ) |
Returns module number of passed cell index.
[in] | cellIndex | index of cell starting by 0 |
Definition at line 122 of file database_helper.c.
uint8_t DATA_GetSensorNumberFromTemperatureIndex | ( | uint16_t | sensorIndex | ) |
Returns sensor number of passed temperature sensor index.
[in] | sensorIndex | index of sensorstarting by 0 |
Definition at line 147 of file database_helper.c.
uint8_t DATA_GetStringNumberFromTemperatureIndex | ( | uint16_t | sensorIndex | ) |
Returns string number of passed temperature sensor index.
[in] | sensorIndex | index of sensor starting by 0 |
Definition at line 134 of file database_helper.c.
uint8_t DATA_GetStringNumberFromVoltageIndex | ( | uint16_t | cellIndex | ) |
Returns string number of passed cell index.
[in] | cellIndex | index of cell starting by 0 |
Definition at line 117 of file database_helper.c.