BS120x Ethernet Library 1.0.0
BS120x Ethernet Library
Loading...
Searching...
No Matches

Functions for controlling and reading back cells. More...

+ Collaboration diagram for Cells:

Functions

int Bs120xEnet_SetAllCellCurrents (Bs120xEnetHandle handle, float isrc, float isnk)
 Sets the sinking and sourcing current limits for all cells.
 
int Bs120xEnet_SetCellSinkCurrent (Bs120xEnetHandle handle, unsigned int cell, float isnk)
 Sets the sinking current limit for a single cell.
 
int Bs120xEnet_SetCellSourceCurrent (Bs120xEnetHandle handle, unsigned int cell, float isrc)
 Sets teh sourcing current limit for a single cell.
 
int Bs120xEnet_SetAllCellVoltage (Bs120xEnetHandle handle, float voltage)
 Sets the voltage for all cells.
 
int Bs120xEnet_SetCellVoltage (Bs120xEnetHandle handle, unsigned int cell, float voltage)
 Sets the voltage for a single cell.
 
int Bs120xEnet_EnableAllCells (Bs120xEnetHandle handle, bool enable)
 Enables or disables all cells.
 
int Bs120xEnet_EnableCell (Bs120xEnetHandle handle, unsigned int cell, bool enable)
 Enables or disables a single cell.
 
int Bs120xEnet_GetCellVoltage (Bs120xEnetHandle handle, unsigned int cell, float *voltage_out)
 Gets the voltage of a cell.
 
int Bs120xEnet_GetAllCellVoltage (Bs120xEnetHandle handle, float voltage_out[], size_t voltage_out_len)
 Gets the voltages of all cells.
 
int Bs120xEnet_GetCellCurrent (Bs120xEnetHandle handle, unsigned int cell, float *current_out)
 Gets the current of a cell in Amps.
 
int Bs120xEnet_GetAllCellCurrent (Bs120xEnetHandle handle, float current_out[], size_t current_out_len)
 Get the currents of all cells in Amps.
 

Detailed Description

Functions for controlling and reading back cells.

Function Documentation

◆ Bs120xEnet_EnableAllCells()

int Bs120xEnet_EnableAllCells ( Bs120xEnetHandle  handle,
bool  enable 
)

Enables or disables all cells.

Parameters
[in]handleEthernet client handle.
[in]enableThe state for the cells. A value of TRUE will enable all cells.
Returns
0 on success or a negative error code.

◆ Bs120xEnet_EnableCell()

int Bs120xEnet_EnableCell ( Bs120xEnetHandle  handle,
unsigned int  cell,
bool  enable 
)

Enables or disables a single cell.

Parameters
[in]handleEthernet client handle.
[in]cellThe cell to target. Cells are 0-indexed.
[in]enableThe state for the cell. A value of TRUE will enable the cell.
Returns
0 on success or a negative error code.

◆ Bs120xEnet_GetAllCellCurrent()

int Bs120xEnet_GetAllCellCurrent ( Bs120xEnetHandle  handle,
float  current_out[],
size_t  current_out_len 
)

Get the currents of all cells in Amps.

Note
The BS120x unit must have UDP data broadcast enabled for this method to return valid data.
Parameters
[in]handleEthernet client handle.
[out]current_outArray to store the returned currents.
[in]current_out_lenLength of the current_out array. Must be equal to the number of cells.
Returns
0 on success or a negative error code.

◆ Bs120xEnet_GetAllCellVoltage()

int Bs120xEnet_GetAllCellVoltage ( Bs120xEnetHandle  handle,
float  voltage_out[],
size_t  voltage_out_len 
)

Gets the voltages of all cells.

Note
The BS120x unit must have UDP data broadcast enabled for this method to return valid data.
Parameters
[in]handleEthernet client handle.
[out]voltage_outArray to store the returned voltages.
[in]voltage_out_lenLength of the voltages_out array. Must be equal to the number of cells.
Returns
0 on success or a negative error code.

◆ Bs120xEnet_GetCellCurrent()

int Bs120xEnet_GetCellCurrent ( Bs120xEnetHandle  handle,
unsigned int  cell,
float *  current_out 
)

Gets the current of a cell in Amps.

Note
The BS120x unit must have UDP data broadcast enabled for this method to return valid data.
Parameters
[in]handleEthernet client handle.
[in]cellThe cell to target. Cells are 0-indexed.
[out]current_outPointer to the returned current.
Returns
0 on success or a negative error code.

◆ Bs120xEnet_GetCellVoltage()

int Bs120xEnet_GetCellVoltage ( Bs120xEnetHandle  handle,
unsigned int  cell,
float *  voltage_out 
)

Gets the voltage of a cell.

Note
The BS120x unit must have UDP data broadcast enabled for this method to return valid data.
Parameters
[in]handleEthernet client handle.
[in]cellThe cell to target. Cells are 0-indexed.
[out]voltage_outPointer to the returned voltage.
Returns
0 on success or a negative error code.

◆ Bs120xEnet_SetAllCellCurrents()

int Bs120xEnet_SetAllCellCurrents ( Bs120xEnetHandle  handle,
float  isrc,
float  isnk 
)

Sets the sinking and sourcing current limits for all cells.

Parameters
[in]handleEthernet client handle.
[in]isrcThe sourcing current limit in Amps.
[in]isnkThe sinking current limit in Amps.
Returns
0 on success or a negative error code.

◆ Bs120xEnet_SetAllCellVoltage()

int Bs120xEnet_SetAllCellVoltage ( Bs120xEnetHandle  handle,
float  voltage 
)

Sets the voltage for all cells.

Parameters
[in]handleEthernet client handle.
[in]voltageThe voltage setpoint.
Returns
0 on success or a negative error code.

◆ Bs120xEnet_SetCellSinkCurrent()

int Bs120xEnet_SetCellSinkCurrent ( Bs120xEnetHandle  handle,
unsigned int  cell,
float  isnk 
)

Sets the sinking current limit for a single cell.

Parameters
[in]handleEthernet client handle.
[in]cellThe cell to target. Cells are 0-indexed.
[in]isnkThe sinking current limit in Amps for the cell.
Returns
0 on success or a negative error code.

◆ Bs120xEnet_SetCellSourceCurrent()

int Bs120xEnet_SetCellSourceCurrent ( Bs120xEnetHandle  handle,
unsigned int  cell,
float  isrc 
)

Sets teh sourcing current limit for a single cell.

Parameters
[in]handleEthernet client handle.
[in]cellThe cell to target. Cells are 0-indexed.
[in]isrcThe sourcing current limit in Amps for the cell.
Returns
0 on success or a negative error code.

◆ Bs120xEnet_SetCellVoltage()

int Bs120xEnet_SetCellVoltage ( Bs120xEnetHandle  handle,
unsigned int  cell,
float  voltage 
)

Sets the voltage for a single cell.

Parameters
[in]handleEthernet client handle.
[in]cellThe cell to target. Cells are 0-indexed.
[in]voltageThe voltage setpoint.
Returns
0 on success or a negative error code.