foxBMS  1.2.0
The foxBMS Battery Management System API Documentation
mxm_registry.h File Reference

Functions in order to have a registry of monitoring ICs. More...

#include "mxm_cfg.h"
#include "mxm_1785x_tools.h"
#include "mxm_basic_defines.h"
Include dependency graph for mxm_registry.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void MXM_MonRegistryInit (MXM_MONITORING_INSTANCE_s *pState)
 Initialize monitoring registry. More...
 
STD_RETURN_TYPE_e MXM_MonRegistryConnectDevices (MXM_MONITORING_INSTANCE_s *pState, uint8_t numberOfDevices)
 Mark devices as connected in the registry and set the address. More...
 
uint8_t MXM_MonRegistryGetHighestConnected5XDevice (const MXM_MONITORING_INSTANCE_s *const kpkState)
 Parse number of highest connected device from monitoring- register. More...
 
void MXM_MonRegistryParseIdIntoDevices (MXM_MONITORING_INSTANCE_s *pState, uint8_t rxBufferLength, MXM_REG_NAME_e type)
 Parse ID (1 or 2) into the registry. More...
 
void MXM_MonRegistryParseVersionIntoDevices (MXM_MONITORING_INSTANCE_s *pState, uint8_t rxBufferLength)
 Parse Version into the registry. More...
 

Detailed Description

Functions in order to have a registry of monitoring ICs.

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
2020-07-16 (date of creation)
Updated
2021-06-16 (date of last update)
Prefix
MXM

Monitoring registry stores information about the connected ICs.

Definition in file mxm_registry.h.

Function Documentation

◆ MXM_MonRegistryConnectDevices()

STD_RETURN_TYPE_e MXM_MonRegistryConnectDevices ( MXM_MONITORING_INSTANCE_s pState,
uint8_t  numberOfDevices 
)

Mark devices as connected in the registry and set the address.

Takes the number of connected (adjacent!) devices and marks them in the registry.

Parameters
[in,out]pStatestate-pointer
[in]numberOfDevicesnumber of normal satellites
Returns
STD_OK if the number of modules is OK, STD_NOT_OK otherwise

Definition at line 82 of file mxm_registry.c.

◆ MXM_MonRegistryGetHighestConnected5XDevice()

uint8_t MXM_MonRegistryGetHighestConnected5XDevice ( const MXM_MONITORING_INSTANCE_s *const  kpkState)

Parse number of highest connected device from monitoring- register.

Parameters
[in]kpkStatestate-pointer
Returns
MXM_MONITORING_INSTANCE_s::highest5xDevice

Definition at line 98 of file mxm_registry.c.

◆ MXM_MonRegistryInit()

void MXM_MonRegistryInit ( MXM_MONITORING_INSTANCE_s pState)

Initialize monitoring registry.

Sets the connected state of every entry of the registry of monitoring ICs to false.

Parameters
[in]pStatestate-pointer

Definition at line 70 of file mxm_registry.c.

◆ MXM_MonRegistryParseIdIntoDevices()

void MXM_MonRegistryParseIdIntoDevices ( MXM_MONITORING_INSTANCE_s pState,
uint8_t  rxBufferLength,
MXM_REG_NAME_e  type 
)

Parse ID (1 or 2) into the registry.

Parameters
[in,out]pStatestate-pointer
[in]rxBufferLengthlength of the rxBuffer
[in]typetype of register (has to be MXM_REG_ID1 or MXM_REG_ID2)

Definition at line 104 of file mxm_registry.c.

Here is the call graph for this function:

◆ MXM_MonRegistryParseVersionIntoDevices()

void MXM_MonRegistryParseVersionIntoDevices ( MXM_MONITORING_INSTANCE_s pState,
uint8_t  rxBufferLength 
)

Parse Version into the registry.

Parameters
[in,out]pStatestate-pointer
[in]rxBufferLengthlength of the rxBuffer

Definition at line 133 of file mxm_registry.c.

Here is the call graph for this function: