HFCC-01 Low-Level Software (LLSW) Rel_6802_HFCC-01-RP-CSAR-CB
Loading...
Searching...
No Matches
psu.c File Reference
#include <math.h>
#include "psu.h"
#include "interDrv.h"
#include "mmapPsu.h"
Include dependency graph for psu.c:
psu.c Node1 psu.c Node2 math.h Node1->Node2 Node3 psu.h Node1->Node3 Node6 interDrv.h Node1->Node6 Node8 mmapPsu.h Node1->Node8 Node4 commonDataTypes.h Node3->Node4 Node5 driverStatus.h Node3->Node5 Node6->Node4 Node7 interStatus.h Node6->Node7 Node8->Node4 Node8->Node5

Macros

#define PSU_CBIT_CNT   (4U)
#define PSU_DIAG_CNT   (3U)

Functions

static DriverStatus readPsuReg (const UInt32 baseAddr, const UInt32 offset, UInt32 *data)
 readPsuReg.
static DriverStatus valueConversion (const SensorNumber sensorNumber, const UInt8 xValue, Float32 *valuePtr)
 valueConversion.
static Float32 formulaSensor (const Int16 mValue, const UInt8 xValue, const Int16 bValue, const Int8 k1Value, const Int8 k2Value)
 formulaSensor
static Float32 roundToDecimal (const Float32 num)
 roundToDecimal
DriverStatus psu_getPsuDiag (const PSUDevHandler psuDevHdl, PsuDiagStatus *psuDiagPtr)
 psu_getPsuDiag.
DriverStatus psu_getPsuCbit (const PSUDevHandler psuDevHdl, PsuCbitStatus *psuCbitPtr)
 psu_getPsuCbit.
DriverStatus psu_getInputVolt (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getInputVolt.
DriverStatus psu_getOutputRail12VVolt (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getOutputRail12VVolt.
DriverStatus psu_getOutputRail3V3Volt (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getOutputRail3V3Volt.
DriverStatus psu_getOutputRail5VVolt (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getOutputRail5VVolt.
DriverStatus psu_getOutputRailN12VAuxVolt (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getOutputRailN12VAuxVolt.
DriverStatus psu_getOutputRailP12VAuxVolt (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getOutputRailP12VAuxVolt.
DriverStatus psu_getOutputRail3V3AuxVolt (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getOutputRail3V3AuxVolt.
DriverStatus psu_getInputAmp (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getInputAmp.
DriverStatus psu_getOutputRail12VAmp (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getOutputRail12VAmp.
DriverStatus psu_getOutputRail3V3Amp (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getOutputRail3V3Amp.
DriverStatus psu_getOutputRail5VAmp (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getOutputRail5VAmp.
DriverStatus psu_getOutputRailN12VAuxAmp (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getOutputRailN12VAuxAmp.
DriverStatus psu_getOutputRailP12VAuxAmp (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getOutputRailP12VAuxAmp.
DriverStatus psu_getOutputRail3V3AuxAmp (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getOutputRail3V3AuxAmp.
DriverStatus psu_getBoardTemp (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getBoardTemp.
DriverStatus psu_getOutputRail12VTemp (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getOutputRail12VTemp.
DriverStatus psu_getOutputRail3V3Temp (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getOutputRail3V3Temp.
DriverStatus psu_getOutputRail5VTemp (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getOutputRail5VTemp.
DriverStatus psu_getOutputRailN12VAuxTemp (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getOutputRailN12VAuxTemp.
DriverStatus psu_getOutputRailP12VAuxTemp (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getOutputRailP12VAuxTemp.
DriverStatus psu_getOutputRail3V3AuxTemp (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getOutputRail3V3AuxTemp.
DriverStatus psu_getPrimaryTransTemp (const PSUDevHandler psuDevHdl, Float32 *valuePtr)
 psu_getPrimaryTransTemp.

Detailed Description

Macro Definition Documentation

◆ PSU_CBIT_CNT

#define PSU_CBIT_CNT   (4U)

◆ PSU_DIAG_CNT

#define PSU_DIAG_CNT   (3U)

Function Documentation

◆ formulaSensor()

Float32 formulaSensor ( const Int16 mValue,
const UInt8 xValue,
const Int16 bValue,
const Int8 k1Value,
const Int8 k2Value )
static

formulaSensor

Performs a calculation based on the given parameters.

Parameters
[in]mValueThe slope value.
[in]xValueThe raw input value.
[in]bValueThe Y-intercept value.
[in]k1ValueThe first exponent value (K1).
[in]k2ValueThe second exponent value (K2).
Returns
The converted value.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: formulaSensor

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_FORMULASENSOR_01 HLR_PSU_329 WHEN raw ADC count xValue is equal to 0, the formulaSensor() function SHALL set the computed sensor engineering value to 0.0F. psu.c:formulaSensor() Test Closed
LLR_PSU_FORMULASENSOR_02 HLR_PSU_329 WHEN raw ADC count xValue is not equal to 0, the formulaSensor() function SHALL compute the calibrated sensor engineering value using the polynomial formulation ((mValue * xValue) + (bValue * 10^k1Value)) * 10^k2Value. psu.c:formulaSensor() Test Closed
LLR_PSU_FORMULASENSOR_03 HLR_PSU_329 WHEN sensor engineering calculation completes, the formulaSensor() function SHALL return the computed Float32 engineering value (sum). psu.c:formulaSensor() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller formulaSensor() [Low-Level Device Drivers] Target pow() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   mValue (Flag) l_t1->l_b1   xValue (Flag) l_t2->l_b2   bValue (Flag) l_t3->l_b3   k1Value (Flag) l_t4->l_b4   k2Value (Flag) r_b0->r_t0   statusCode (Float32)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller formulaSensor() [Low-Level Device Drivers] Target pow() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   mValue (Payload) l_t1->l_b1   xValue (Payload) l_t2->l_b2   bValue (Payload) l_t3->l_b3   k1Value (Payload) l_t4->l_b4   k2Value (Payload) r_b0->r_t0   stateTelemetry (Internal State)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_formulaSensor start Entry: formulaSensor() guard_1 LLR_01: Guard Check Is `xValue` is equal to `0`? start->guard_1 err_exit_1 LLR_01 Error Exit execute conditional operational branch guard_1->err_exit_1 YES (TRUE) act_2 LLR_02: Action Step invoke routine `pow()` to execute target subsystem hardware operation guard_1->act_2 NO (FALSE) success_exit LLR_03: Final Exit return `the computed result` act_2->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_formulaSensor in_store Input Data Sources & Parameters • mValue (const Int16) • xValue (const UInt8) • bValue (const Int16) • k1Value (const Int8) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: xValue in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Payload Transformation • Process payload via pow() proc_1->proc_2 Data Payload (pow) proc_3 LLR_03: Status Output Packaging • Format Return Payload: Float32 proc_2->proc_3 Final Output Data out_sink Output Data Sinks & Status Return • Status Payload (Float32) proc_3->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
formulaSensor Node1 formulaSensor Node1->Node1
Here is the caller graph for this function:
formulaSensor Node1 formulaSensor Node1->Node1 Node2 valueConversion Node1->Node2 Node2->Node2 Node3 psu_getBoardTemp Node2->Node3 Node5 psu_getInputAmp Node2->Node5 Node7 psu_getInputVolt Node2->Node7 Node9 psu_getOutputRail12VAmp Node2->Node9 Node10 psu_getOutputRail12VTemp Node2->Node10 Node11 psu_getOutputRail12VVolt Node2->Node11 Node12 psu_getOutputRail3V3Amp Node2->Node12 Node13 psu_getOutputRail3V3AuxAmp Node2->Node13 Node14 psu_getOutputRail3V3AuxTemp Node2->Node14 Node15 psu_getOutputRail3V3AuxVolt Node2->Node15 Node16 psu_getOutputRail3V3Temp Node2->Node16 Node17 psu_getOutputRail3V3Volt Node2->Node17 Node18 psu_getOutputRail5VAmp Node2->Node18 Node19 psu_getOutputRail5VTemp Node2->Node19 Node20 psu_getOutputRail5VVolt Node2->Node20 Node21 psu_getOutputRailN12VAuxAmp Node2->Node21 Node22 psu_getOutputRailN12VAuxTemp Node2->Node22 Node23 psu_getOutputRailN12VAuxVolt Node2->Node23 Node24 psu_getOutputRailP12VAuxAmp Node2->Node24 Node25 psu_getOutputRailP12VAuxTemp Node2->Node25 Node26 psu_getOutputRailP12VAuxVolt Node2->Node26 Node27 psu_getPrimaryTransTemp Node2->Node27 Node3->Node3 Node4 modPsu_tempMonitor Node3->Node4 Node4->Node4 Node5->Node5 Node6 modPsu_currentMonitor Node5->Node6 Node6->Node6 Node7->Node7 Node8 modPsu_voltageMonitor Node7->Node8 Node8->Node8 Node9->Node6 Node9->Node9 Node10->Node4 Node10->Node10 Node11->Node8 Node11->Node11 Node12->Node6 Node12->Node12 Node13->Node6 Node13->Node13 Node14->Node4 Node14->Node14 Node15->Node8 Node15->Node15 Node16->Node4 Node16->Node16 Node17->Node8 Node17->Node17 Node18->Node6 Node18->Node18 Node19->Node4 Node19->Node19 Node20->Node8 Node20->Node20 Node21->Node6 Node21->Node21 Node22->Node4 Node22->Node22 Node23->Node8 Node23->Node23 Node24->Node6 Node24->Node24 Node25->Node4 Node25->Node25 Node26->Node8 Node26->Node26 Node27->Node4 Node27->Node27

◆ psu_getBoardTemp()

DriverStatus psu_getBoardTemp ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getBoardTemp.

Retrieves the board temperature (C) reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the board temperature reading in degree Celsius (C).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_READ_FAILED: Failed to read from the device.
DRV_INVALID_PARAM: Invalid address pointer.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getBoardTemp

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETBOARDTEMP_01 HLR_PSU_19913 WHEN the pointer valuePtr is NULL (invalid), the psu_getBoardTemp() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getBoardTemp() Test Closed
LLR_PSU_PSU_GETBOARDTEMP_02 HLR_PSU_19913 WHEN the pointer valuePtr is valid, the psu_getBoardTemp() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_BOARD_TEMP using readPsuReg(). psu.c:psu_getBoardTemp() Test Closed
LLR_PSU_PSU_GETBOARDTEMP_03 HLR_PSU_19913 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getBoardTemp() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getBoardTemp() Test Closed
LLR_PSU_PSU_GETBOARDTEMP_04 HLR_PSU_19913 WHEN the hardware register is read successfully, the psu_getBoardTemp() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_BOARD_TEMP to convert the lower 8-bit raw count into engineering temperature units. psu.c:psu_getBoardTemp() Test Closed
LLR_PSU_PSU_GETBOARDTEMP_05 HLR_PSU_19913 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getBoardTemp() function SHALL abort processing and return that conversion failure status. psu.c:psu_getBoardTemp() Test Closed
LLR_PSU_PSU_GETBOARDTEMP_06 HLR_PSU_19913 WHEN engineering value conversion completes successfully, the psu_getBoardTemp() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getBoardTemp() Test Closed
LLR_PSU_PSU_GETBOARDTEMP_07 HLR_PSU_19913 WHEN the rounded temperature value in *valuePtr is greater than 0, the psu_getBoardTemp() function SHALL add calibration offset PSU_OFFSET_READING_BOARD_TEMP to *valuePtr. psu.c:psu_getBoardTemp() Test Closed
LLR_PSU_PSU_GETBOARDTEMP_08 HLR_PSU_19913 WHEN all operational processing completes successfully, the psu_getBoardTemp() function SHALL return DRV_SUCCESS. psu.c:psu_getBoardTemp() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getBoardTemp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getBoardTemp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getBoardTemp start Entry: psu_getBoardTemp() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_BOARD_TEMP) at physical offset `0x0238` (`MMAP_PSU_READING_BOARD_TEMP`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getBoardTemp in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getBoardTemp Node1 psu_getBoardTemp Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getBoardTemp Node1 psu_getBoardTemp Node1->Node1 Node2 modPsu_tempMonitor Node1->Node2 Node2->Node2

◆ psu_getInputAmp()

DriverStatus psu_getInputAmp ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getInputAmp.

Retrieves the input current reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the PSU input current reading in Ampere (A).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_INVALID_PARAM: Invalid address pointer.
DRV_READ_FAILED: Failed to read from the device.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getInputAmp

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETINPUTAMP_01 HLR_PSU_19912 WHEN the pointer valuePtr is NULL (invalid), the psu_getInputAmp() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getInputAmp() Test Closed
LLR_PSU_PSU_GETINPUTAMP_02 HLR_PSU_19912 WHEN the pointer valuePtr is valid, the psu_getInputAmp() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_IN_AMP using readPsuReg(). psu.c:psu_getInputAmp() Test Closed
LLR_PSU_PSU_GETINPUTAMP_03 HLR_PSU_19912 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getInputAmp() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getInputAmp() Test Closed
LLR_PSU_PSU_GETINPUTAMP_04 HLR_PSU_19912 WHEN the hardware register is read successfully, the psu_getInputAmp() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_INPUT_CURRENT to convert the lower 8-bit raw count into engineering current units. psu.c:psu_getInputAmp() Test Closed
LLR_PSU_PSU_GETINPUTAMP_05 HLR_PSU_19912 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getInputAmp() function SHALL abort processing and return that conversion failure status. psu.c:psu_getInputAmp() Test Closed
LLR_PSU_PSU_GETINPUTAMP_06 HLR_PSU_19912 WHEN engineering value conversion completes successfully, the psu_getInputAmp() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getInputAmp() Test Closed
LLR_PSU_PSU_GETINPUTAMP_07 HLR_PSU_19912 WHEN the rounded current value in *valuePtr is greater than 0, the psu_getInputAmp() function SHALL add calibration offset PSU_OFFSET_READING_INPUT_AMP to *valuePtr. psu.c:psu_getInputAmp() Test Closed
LLR_PSU_PSU_GETINPUTAMP_08 HLR_PSU_19912 WHEN all operational processing completes successfully, the psu_getInputAmp() function SHALL return DRV_SUCCESS. psu.c:psu_getInputAmp() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getInputAmp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getInputAmp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getInputAmp start Entry: psu_getInputAmp() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_IN_AMP) at physical offset `0x021C` (`MMAP_PSU_READING_IN_AMP`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getInputAmp in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getInputAmp Node1 psu_getInputAmp Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getInputAmp Node1 psu_getInputAmp Node1->Node1 Node2 modPsu_currentMonitor Node1->Node2 Node2->Node2

◆ psu_getInputVolt()

DriverStatus psu_getInputVolt ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getInputVolt.

Retrieves the input voltage reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the PSU input voltage reading in Volt (V).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_INVALID_PARAM: Invalid address pointer.
DRV_READ_FAILED: Failed to read from the device.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getInputVolt

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETINPUTVOLT_01 HLR_PSU_329 WHEN the pointer valuePtr is NULL (invalid), the psu_getInputVolt() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getInputVolt() Test Closed
LLR_PSU_PSU_GETINPUTVOLT_02 HLR_PSU_329 WHEN the pointer valuePtr is valid, the psu_getInputVolt() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_IN_VOLT using readPsuReg(). psu.c:psu_getInputVolt() Test Closed
LLR_PSU_PSU_GETINPUTVOLT_03 HLR_PSU_329 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getInputVolt() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getInputVolt() Test Closed
LLR_PSU_PSU_GETINPUTVOLT_04 HLR_PSU_329 WHEN the hardware register is read successfully, the psu_getInputVolt() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_INPUT_VOLTAGE to convert the lower 8-bit raw count into engineering voltage units. psu.c:psu_getInputVolt() Test Closed
LLR_PSU_PSU_GETINPUTVOLT_05 HLR_PSU_329 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getInputVolt() function SHALL abort processing and return that conversion failure status. psu.c:psu_getInputVolt() Test Closed
LLR_PSU_PSU_GETINPUTVOLT_06 HLR_PSU_329 WHEN engineering value conversion completes successfully, the psu_getInputVolt() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getInputVolt() Test Closed
LLR_PSU_PSU_GETINPUTVOLT_07 HLR_PSU_329 WHEN the rounded voltage value in *valuePtr is greater than 0, the psu_getInputVolt() function SHALL add calibration offset PSU_OFFSET_READING_INPUT_VOLT to *valuePtr. psu.c:psu_getInputVolt() Test Closed
LLR_PSU_PSU_GETINPUTVOLT_08 HLR_PSU_329 WHEN all operational processing completes successfully, the psu_getInputVolt() function SHALL return DRV_SUCCESS. psu.c:psu_getInputVolt() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getInputVolt() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getInputVolt() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getInputVolt start Entry: psu_getInputVolt() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_IN_VOLT) at physical offset `0x0200` (`MMAP_PSU_READING_IN_VOLT`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getInputVolt in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getInputVolt Node1 psu_getInputVolt Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getInputVolt Node1 psu_getInputVolt Node1->Node1 Node2 modPsu_voltageMonitor Node1->Node2 Node2->Node2

◆ psu_getOutputRail12VAmp()

DriverStatus psu_getOutputRail12VAmp ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getOutputRail12VAmp.

Retrieves the 12V output rail current reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the PSU 12V output rail current reading in Ampere (A).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_INVALID_PARAM: Invalid address pointer.
DRV_READ_FAILED: Failed to read from the device.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getOutputRail12VAmp

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETOUTPUTRAIL12VAMP_01 HLR_PSU_19915 WHEN the pointer valuePtr is NULL (invalid), the psu_getOutputRail12VAmp() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getOutputRail12VAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VAMP_02 HLR_PSU_19915 WHEN the pointer valuePtr is valid, the psu_getOutputRail12VAmp() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_OUT_12V_AMP using readPsuReg(). psu.c:psu_getOutputRail12VAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VAMP_03 HLR_PSU_19915 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getOutputRail12VAmp() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getOutputRail12VAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VAMP_04 HLR_PSU_19915 WHEN the hardware register is read successfully, the psu_getOutputRail12VAmp() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_12V_CURRENT to convert the lower 8-bit raw count into engineering current units. psu.c:psu_getOutputRail12VAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VAMP_05 HLR_PSU_19915 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getOutputRail12VAmp() function SHALL abort processing and return that conversion failure status. psu.c:psu_getOutputRail12VAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VAMP_06 HLR_PSU_19915 WHEN engineering value conversion completes successfully, the psu_getOutputRail12VAmp() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getOutputRail12VAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VAMP_07 HLR_PSU_19915 WHEN the rounded current value in *valuePtr is greater than 0, the psu_getOutputRail12VAmp() function SHALL add calibration offset PSU_OFFSET_READING_12V_AMP to *valuePtr. psu.c:psu_getOutputRail12VAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VAMP_08 HLR_PSU_19915 WHEN all operational processing completes successfully, the psu_getOutputRail12VAmp() function SHALL return DRV_SUCCESS. psu.c:psu_getOutputRail12VAmp() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getOutputRail12VAmp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getOutputRail12VAmp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getOutputRail12VAmp start Entry: psu_getOutputRail12VAmp() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_OUT_12V_AMP) at physical offset `0x0220` (`MMAP_PSU_READING_OUT_12V_AMP`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getOutputRail12VAmp in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getOutputRail12VAmp Node1 psu_getOutputRail12VAmp Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getOutputRail12VAmp Node1 psu_getOutputRail12VAmp Node1->Node1 Node2 modPsu_currentMonitor Node1->Node2 Node2->Node2

◆ psu_getOutputRail12VTemp()

DriverStatus psu_getOutputRail12VTemp ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getOutputRail12VTemp.

Retrieves the 12V output rail temperature (C) reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the 12V output rail temperature reading in degree Celsius (C).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_READ_FAILED: Failed to read from the device.
DRV_INVALID_PARAM: Invalid address pointer.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getOutputRail12VTemp

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETOUTPUTRAIL12VTEMP_01 HLR_PSU_23251 WHEN the pointer valuePtr is NULL (invalid), the psu_getOutputRail12VTemp() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getOutputRail12VTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VTEMP_02 HLR_PSU_23251 WHEN the pointer valuePtr is valid, the psu_getOutputRail12VTemp() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_OUT_12V_TEMP using readPsuReg(). psu.c:psu_getOutputRail12VTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VTEMP_03 HLR_PSU_23251 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getOutputRail12VTemp() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getOutputRail12VTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VTEMP_04 HLR_PSU_23251 WHEN the hardware register is read successfully, the psu_getOutputRail12VTemp() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_12V_TEMP to convert the lower 8-bit raw count into engineering temperature units. psu.c:psu_getOutputRail12VTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VTEMP_05 HLR_PSU_23251 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getOutputRail12VTemp() function SHALL abort processing and return that conversion failure status. psu.c:psu_getOutputRail12VTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VTEMP_06 HLR_PSU_23251 WHEN engineering value conversion completes successfully, the psu_getOutputRail12VTemp() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getOutputRail12VTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VTEMP_07 HLR_PSU_23251 WHEN the rounded temperature value in *valuePtr is greater than 0, the psu_getOutputRail12VTemp() function SHALL add calibration offset PSU_OFFSET_READING_12V_TEMP to *valuePtr. psu.c:psu_getOutputRail12VTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VTEMP_08 HLR_PSU_23251 WHEN all operational processing completes successfully, the psu_getOutputRail12VTemp() function SHALL return DRV_SUCCESS. psu.c:psu_getOutputRail12VTemp() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getOutputRail12VTemp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getOutputRail12VTemp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getOutputRail12VTemp start Entry: psu_getOutputRail12VTemp() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_OUT_12V_TEMP) at physical offset `0x023C` (`MMAP_PSU_READING_OUT_12V_TEMP`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getOutputRail12VTemp in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getOutputRail12VTemp Node1 psu_getOutputRail12VTemp Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getOutputRail12VTemp Node1 psu_getOutputRail12VTemp Node1->Node1 Node2 modPsu_tempMonitor Node1->Node2 Node2->Node2

◆ psu_getOutputRail12VVolt()

DriverStatus psu_getOutputRail12VVolt ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getOutputRail12VVolt.

Retrieves the 12V output rail reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the PSU 12V output rail reading in Volt (V).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_INVALID_PARAM: Invalid address pointer.
DRV_READ_FAILED: Failed to read from the device.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getOutputRail12VVolt

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETOUTPUTRAIL12VVOLT_01 HLR_PSU_19914 WHEN the pointer valuePtr is NULL (invalid), the psu_getOutputRail12VVolt() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getOutputRail12VVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VVOLT_02 HLR_PSU_19914 WHEN the pointer valuePtr is valid, the psu_getOutputRail12VVolt() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_OUT_12V_VOLT using readPsuReg(). psu.c:psu_getOutputRail12VVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VVOLT_03 HLR_PSU_19914 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getOutputRail12VVolt() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getOutputRail12VVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VVOLT_04 HLR_PSU_19914 WHEN the hardware register is read successfully, the psu_getOutputRail12VVolt() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_12V_VOLTAGE to convert the lower 8-bit raw count into engineering voltage units. psu.c:psu_getOutputRail12VVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VVOLT_05 HLR_PSU_19914 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getOutputRail12VVolt() function SHALL abort processing and return that conversion failure status. psu.c:psu_getOutputRail12VVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VVOLT_06 HLR_PSU_19914 WHEN engineering value conversion completes successfully, the psu_getOutputRail12VVolt() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getOutputRail12VVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VVOLT_07 HLR_PSU_19914 WHEN the rounded voltage value in *valuePtr is greater than 0, the psu_getOutputRail12VVolt() function SHALL add calibration offset PSU_OFFSET_READING_12V_VOLT to *valuePtr. psu.c:psu_getOutputRail12VVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL12VVOLT_08 HLR_PSU_19914 WHEN all operational processing completes successfully, the psu_getOutputRail12VVolt() function SHALL return DRV_SUCCESS. psu.c:psu_getOutputRail12VVolt() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getOutputRail12VVolt() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getOutputRail12VVolt() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getOutputRail12VVolt start Entry: psu_getOutputRail12VVolt() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_OUT_12V_VOLT) at physical offset `0x0204` (`MMAP_PSU_READING_OUT_12V_VOLT`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getOutputRail12VVolt in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getOutputRail12VVolt Node1 psu_getOutputRail12VVolt Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getOutputRail12VVolt Node1 psu_getOutputRail12VVolt Node1->Node1 Node2 modPsu_voltageMonitor Node1->Node2 Node2->Node2

◆ psu_getOutputRail3V3Amp()

DriverStatus psu_getOutputRail3V3Amp ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getOutputRail3V3Amp.

Retrieves the 3V3 output rail current reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the PSU 3V3 output rail current reading in Ampere (A).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_INVALID_PARAM: Invalid address pointer.
DRV_READ_FAILED: Failed to read from the device.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getOutputRail3V3Amp

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETOUTPUTRAIL3V3AMP_01 HLR_PSU_23247 WHEN the pointer valuePtr is NULL (invalid), the psu_getOutputRail3V3Amp() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getOutputRail3V3Amp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AMP_02 HLR_PSU_23247 WHEN the pointer valuePtr is valid, the psu_getOutputRail3V3Amp() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_OUT_3V3_AMP using readPsuReg(). psu.c:psu_getOutputRail3V3Amp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AMP_03 HLR_PSU_23247 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getOutputRail3V3Amp() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getOutputRail3V3Amp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AMP_04 HLR_PSU_23247 WHEN the hardware register is read successfully, the psu_getOutputRail3V3Amp() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_3V3_CURRENT to convert the lower 8-bit raw count into engineering current units. psu.c:psu_getOutputRail3V3Amp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AMP_05 HLR_PSU_23247 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getOutputRail3V3Amp() function SHALL abort processing and return that conversion failure status. psu.c:psu_getOutputRail3V3Amp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AMP_06 HLR_PSU_23247 WHEN engineering value conversion completes successfully, the psu_getOutputRail3V3Amp() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getOutputRail3V3Amp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AMP_07 HLR_PSU_23247 WHEN the rounded current value in *valuePtr is greater than 0, the psu_getOutputRail3V3Amp() function SHALL add calibration offset PSU_OFFSET_READING_3V3_AMP to *valuePtr. psu.c:psu_getOutputRail3V3Amp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AMP_08 HLR_PSU_23247 WHEN all operational processing completes successfully, the psu_getOutputRail3V3Amp() function SHALL return DRV_SUCCESS. psu.c:psu_getOutputRail3V3Amp() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getOutputRail3V3Amp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getOutputRail3V3Amp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getOutputRail3V3Amp start Entry: psu_getOutputRail3V3Amp() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_OUT_3V3_AMP) at physical offset `0x0224` (`MMAP_PSU_READING_OUT_3V3_AMP`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getOutputRail3V3Amp in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getOutputRail3V3Amp Node1 psu_getOutputRail3V3Amp Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getOutputRail3V3Amp Node1 psu_getOutputRail3V3Amp Node1->Node1 Node2 modPsu_currentMonitor Node1->Node2 Node2->Node2

◆ psu_getOutputRail3V3AuxAmp()

DriverStatus psu_getOutputRail3V3AuxAmp ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getOutputRail3V3AuxAmp.

Retrieves the 3V3 aux output rail current reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the PSU 3V3 aux output rail current reading in Ampere (A).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_READ_FAILED: Failed to read from the device.
DRV_INVALID_PARAM: Invalid address pointer.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getOutputRail3V3AuxAmp

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXAMP_01 HLR_PSU_23250 WHEN the pointer valuePtr is NULL (invalid), the psu_getOutputRail3V3AuxAmp() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getOutputRail3V3AuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXAMP_02 HLR_PSU_23250 WHEN the pointer valuePtr is valid, the psu_getOutputRail3V3AuxAmp() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_OUT_3V3_AUX_AMP using readPsuReg(). psu.c:psu_getOutputRail3V3AuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXAMP_03 HLR_PSU_23250 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getOutputRail3V3AuxAmp() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getOutputRail3V3AuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXAMP_04 HLR_PSU_23250 WHEN the hardware register is read successfully, the psu_getOutputRail3V3AuxAmp() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_3V3_AUX_CURRENT to convert the lower 8-bit raw count into engineering current units. psu.c:psu_getOutputRail3V3AuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXAMP_05 HLR_PSU_23250 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getOutputRail3V3AuxAmp() function SHALL abort processing and return that conversion failure status. psu.c:psu_getOutputRail3V3AuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXAMP_06 HLR_PSU_23250 WHEN engineering value conversion completes successfully, the psu_getOutputRail3V3AuxAmp() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getOutputRail3V3AuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXAMP_07 HLR_PSU_23250 WHEN the rounded current value in *valuePtr is greater than 0, the psu_getOutputRail3V3AuxAmp() function SHALL add calibration offset PSU_OFFSET_READING_3V3_AUX_AMP to *valuePtr. psu.c:psu_getOutputRail3V3AuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXAMP_08 HLR_PSU_23250 WHEN all operational processing completes successfully, the psu_getOutputRail3V3AuxAmp() function SHALL return DRV_SUCCESS. psu.c:psu_getOutputRail3V3AuxAmp() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getOutputRail3V3AuxAmp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getOutputRail3V3AuxAmp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getOutputRail3V3AuxAmp start Entry: psu_getOutputRail3V3AuxAmp() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_OUT_3V3_AUX_AMP) at physical offset `0x0234` (`MMAP_PSU_READING_OUT_3V3_AUX_AMP`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getOutputRail3V3AuxAmp in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getOutputRail3V3AuxAmp Node1 psu_getOutputRail3V3AuxAmp Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getOutputRail3V3AuxAmp Node1 psu_getOutputRail3V3AuxAmp Node1->Node1 Node2 modPsu_currentMonitor Node1->Node2 Node2->Node2

◆ psu_getOutputRail3V3AuxTemp()

DriverStatus psu_getOutputRail3V3AuxTemp ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getOutputRail3V3AuxTemp.

Retrieves the 3V3 aux output rail temperature (C) reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the 3V3 aux output rail temperature reading in degree Celsius (C).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_READ_FAILED: Failed to read from the device.
DRV_INVALID_PARAM: Invalid address pointer.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getOutputRail3V3AuxTemp

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXTEMP_01 HLR_PSU_23256 WHEN the pointer valuePtr is NULL (invalid), the psu_getOutputRail3V3AuxTemp() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getOutputRail3V3AuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXTEMP_02 HLR_PSU_23256 WHEN the pointer valuePtr is valid, the psu_getOutputRail3V3AuxTemp() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_OUT_3V3_AUX_TEMP using readPsuReg(). psu.c:psu_getOutputRail3V3AuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXTEMP_03 HLR_PSU_23256 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getOutputRail3V3AuxTemp() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getOutputRail3V3AuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXTEMP_04 HLR_PSU_23256 WHEN the hardware register is read successfully, the psu_getOutputRail3V3AuxTemp() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_3V3_AUX_TEMP to convert the lower 8-bit raw count into engineering temperature units. psu.c:psu_getOutputRail3V3AuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXTEMP_05 HLR_PSU_23256 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getOutputRail3V3AuxTemp() function SHALL abort processing and return that conversion failure status. psu.c:psu_getOutputRail3V3AuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXTEMP_06 HLR_PSU_23256 WHEN engineering value conversion completes successfully, the psu_getOutputRail3V3AuxTemp() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getOutputRail3V3AuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXTEMP_07 HLR_PSU_23256 WHEN the rounded temperature value in *valuePtr is greater than 0, the psu_getOutputRail3V3AuxTemp() function SHALL add calibration offset PSU_OFFSET_READING_3V3_AUX_TEMP to *valuePtr. psu.c:psu_getOutputRail3V3AuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXTEMP_08 HLR_PSU_23256 WHEN all operational processing completes successfully, the psu_getOutputRail3V3AuxTemp() function SHALL return DRV_SUCCESS. psu.c:psu_getOutputRail3V3AuxTemp() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getOutputRail3V3AuxTemp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getOutputRail3V3AuxTemp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getOutputRail3V3AuxTemp start Entry: psu_getOutputRail3V3AuxTemp() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_OUT_3V3_AUX_TEMP) at physical offset `0x0250` (`MMAP_PSU_READING_OUT_3V3_AUX_TEMP`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getOutputRail3V3AuxTemp in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getOutputRail3V3AuxTemp Node1 psu_getOutputRail3V3AuxTemp Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getOutputRail3V3AuxTemp Node1 psu_getOutputRail3V3AuxTemp Node1->Node1 Node2 modPsu_tempMonitor Node1->Node2 Node2->Node2

◆ psu_getOutputRail3V3AuxVolt()

DriverStatus psu_getOutputRail3V3AuxVolt ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getOutputRail3V3AuxVolt.

Retrieves the 3V3 aux output rail reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the PSU 3V3 aux output rail reading in Volt (V).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_INVALID_PARAM: Invalid address pointer.
DRV_READ_FAILED: Failed to read from the device.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getOutputRail3V3AuxVolt

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXVOLT_01 HLR_PSU_23231 WHEN the pointer valuePtr is NULL (invalid), the psu_getOutputRail3V3AuxVolt() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getOutputRail3V3AuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXVOLT_02 HLR_PSU_23231 WHEN the pointer valuePtr is valid, the psu_getOutputRail3V3AuxVolt() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_OUT_3V3_AUX_VOLT using readPsuReg(). psu.c:psu_getOutputRail3V3AuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXVOLT_03 HLR_PSU_23231 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getOutputRail3V3AuxVolt() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getOutputRail3V3AuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXVOLT_04 HLR_PSU_23231 WHEN the hardware register is read successfully, the psu_getOutputRail3V3AuxVolt() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_3V3_AUX_VOLTAGE to convert the lower 8-bit raw count into engineering voltage units. psu.c:psu_getOutputRail3V3AuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXVOLT_05 HLR_PSU_23231 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getOutputRail3V3AuxVolt() function SHALL abort processing and return that conversion failure status. psu.c:psu_getOutputRail3V3AuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXVOLT_06 HLR_PSU_23231 WHEN engineering value conversion completes successfully, the psu_getOutputRail3V3AuxVolt() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getOutputRail3V3AuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXVOLT_07 HLR_PSU_23231 WHEN the rounded voltage value in *valuePtr is greater than 0, the psu_getOutputRail3V3AuxVolt() function SHALL add calibration offset PSU_OFFSET_READING_3V3_AUX_VOLT to *valuePtr. psu.c:psu_getOutputRail3V3AuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3AUXVOLT_08 HLR_PSU_23231 WHEN all operational processing completes successfully, the psu_getOutputRail3V3AuxVolt() function SHALL return DRV_SUCCESS. psu.c:psu_getOutputRail3V3AuxVolt() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getOutputRail3V3AuxVolt() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getOutputRail3V3AuxVolt() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getOutputRail3V3AuxVolt start Entry: psu_getOutputRail3V3AuxVolt() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_OUT_3V3_AUX_VOLT) at physical offset `0x0218` (`MMAP_PSU_READING_OUT_3V3_AUX_VOLT`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getOutputRail3V3AuxVolt in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getOutputRail3V3AuxVolt Node1 psu_getOutputRail3V3AuxVolt Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getOutputRail3V3AuxVolt Node1 psu_getOutputRail3V3AuxVolt Node1->Node1 Node2 modPsu_voltageMonitor Node1->Node2 Node2->Node2

◆ psu_getOutputRail3V3Temp()

DriverStatus psu_getOutputRail3V3Temp ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getOutputRail3V3Temp.

Retrieves the 3V3 output rail temperature (C) reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the 3V3 output rail temperature reading in degree Celsius (C).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_READ_FAILED: Failed to read from the device.
DRV_INVALID_PARAM: Invalid address pointer.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getOutputRail3V3Temp

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETOUTPUTRAIL3V3TEMP_01 HLR_PSU_23253 WHEN the pointer valuePtr is NULL (invalid), the psu_getOutputRail3V3Temp() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getOutputRail3V3Temp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3TEMP_02 HLR_PSU_23253 WHEN the pointer valuePtr is valid, the psu_getOutputRail3V3Temp() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_OUT_3V3_TEMP using readPsuReg(). psu.c:psu_getOutputRail3V3Temp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3TEMP_03 HLR_PSU_23253 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getOutputRail3V3Temp() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getOutputRail3V3Temp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3TEMP_04 HLR_PSU_23253 WHEN the hardware register is read successfully, the psu_getOutputRail3V3Temp() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_3V3_TEMP to convert the lower 8-bit raw count into engineering temperature units. psu.c:psu_getOutputRail3V3Temp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3TEMP_05 HLR_PSU_23253 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getOutputRail3V3Temp() function SHALL abort processing and return that conversion failure status. psu.c:psu_getOutputRail3V3Temp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3TEMP_06 HLR_PSU_23253 WHEN engineering value conversion completes successfully, the psu_getOutputRail3V3Temp() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getOutputRail3V3Temp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3TEMP_07 HLR_PSU_23253 WHEN the rounded temperature value in *valuePtr is greater than 0, the psu_getOutputRail3V3Temp() function SHALL add calibration offset PSU_OFFSET_READING_3V3_TEMP to *valuePtr. psu.c:psu_getOutputRail3V3Temp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3TEMP_08 HLR_PSU_23253 WHEN all operational processing completes successfully, the psu_getOutputRail3V3Temp() function SHALL return DRV_SUCCESS. psu.c:psu_getOutputRail3V3Temp() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getOutputRail3V3Temp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getOutputRail3V3Temp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getOutputRail3V3Temp start Entry: psu_getOutputRail3V3Temp() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_OUT_3V3_TEMP) at physical offset `0x0240` (`MMAP_PSU_READING_OUT_3V3_TEMP`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getOutputRail3V3Temp in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getOutputRail3V3Temp Node1 psu_getOutputRail3V3Temp Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getOutputRail3V3Temp Node1 psu_getOutputRail3V3Temp Node1->Node1 Node2 modPsu_tempMonitor Node1->Node2 Node2->Node2

◆ psu_getOutputRail3V3Volt()

DriverStatus psu_getOutputRail3V3Volt ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getOutputRail3V3Volt.

Retrieves the 3V3 output rail reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the PSU 3V3 output rail reading in Volt (V).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_INVALID_PARAM: Invalid address pointer.
DRV_READ_FAILED: Failed to read from the device.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getOutputRail3V3Volt

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETOUTPUTRAIL3V3VOLT_01 HLR_PSU_23226 WHEN the pointer valuePtr is NULL (invalid), the psu_getOutputRail3V3Volt() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getOutputRail3V3Volt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3VOLT_02 HLR_PSU_23226 WHEN the pointer valuePtr is valid, the psu_getOutputRail3V3Volt() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_OUT_3V3_VOLT using readPsuReg(). psu.c:psu_getOutputRail3V3Volt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3VOLT_03 HLR_PSU_23226 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getOutputRail3V3Volt() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getOutputRail3V3Volt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3VOLT_04 HLR_PSU_23226 WHEN the hardware register is read successfully, the psu_getOutputRail3V3Volt() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_3V3_VOLTAGE to convert the lower 8-bit raw count into engineering voltage units. psu.c:psu_getOutputRail3V3Volt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3VOLT_05 HLR_PSU_23226 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getOutputRail3V3Volt() function SHALL abort processing and return that conversion failure status. psu.c:psu_getOutputRail3V3Volt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3VOLT_06 HLR_PSU_23226 WHEN engineering value conversion completes successfully, the psu_getOutputRail3V3Volt() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getOutputRail3V3Volt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3VOLT_07 HLR_PSU_23226 WHEN the rounded voltage value in *valuePtr is greater than 0, the psu_getOutputRail3V3Volt() function SHALL add calibration offset PSU_OFFSET_READING_3V3_VOLT to *valuePtr. psu.c:psu_getOutputRail3V3Volt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL3V3VOLT_08 HLR_PSU_23226 WHEN all operational processing completes successfully, the psu_getOutputRail3V3Volt() function SHALL return DRV_SUCCESS. psu.c:psu_getOutputRail3V3Volt() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getOutputRail3V3Volt() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getOutputRail3V3Volt() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getOutputRail3V3Volt start Entry: psu_getOutputRail3V3Volt() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_OUT_3V3_VOLT) at physical offset `0x0208` (`MMAP_PSU_READING_OUT_3V3_VOLT`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getOutputRail3V3Volt in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getOutputRail3V3Volt Node1 psu_getOutputRail3V3Volt Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getOutputRail3V3Volt Node1 psu_getOutputRail3V3Volt Node1->Node1 Node2 modPsu_voltageMonitor Node1->Node2 Node2->Node2

◆ psu_getOutputRail5VAmp()

DriverStatus psu_getOutputRail5VAmp ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getOutputRail5VAmp.

Retrieves the 5V output rail current reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the PSU 5V output rail current reading in Ampere (A).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_READ_FAILED: Failed to read from the device.
DRV_INVALID_PARAM: Invalid address pointer.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getOutputRail5VAmp

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETOUTPUTRAIL5VAMP_01 HLR_PSU_23246 WHEN the pointer valuePtr is NULL (invalid), the psu_getOutputRail5VAmp() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getOutputRail5VAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VAMP_02 HLR_PSU_23246 WHEN the pointer valuePtr is valid, the psu_getOutputRail5VAmp() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_OUT_5V_AMP using readPsuReg(). psu.c:psu_getOutputRail5VAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VAMP_03 HLR_PSU_23246 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getOutputRail5VAmp() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getOutputRail5VAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VAMP_04 HLR_PSU_23246 WHEN the hardware register is read successfully, the psu_getOutputRail5VAmp() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_5V_CURRENT to convert the lower 8-bit raw count into engineering current units. psu.c:psu_getOutputRail5VAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VAMP_05 HLR_PSU_23246 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getOutputRail5VAmp() function SHALL abort processing and return that conversion failure status. psu.c:psu_getOutputRail5VAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VAMP_06 HLR_PSU_23246 WHEN engineering value conversion completes successfully, the psu_getOutputRail5VAmp() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getOutputRail5VAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VAMP_07 HLR_PSU_23246 WHEN the rounded current value in *valuePtr is greater than 0, the psu_getOutputRail5VAmp() function SHALL add calibration offset PSU_OFFSET_READING_5V_AMP to *valuePtr. psu.c:psu_getOutputRail5VAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VAMP_08 HLR_PSU_23246 WHEN all operational processing completes successfully, the psu_getOutputRail5VAmp() function SHALL return DRV_SUCCESS. psu.c:psu_getOutputRail5VAmp() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getOutputRail5VAmp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getOutputRail5VAmp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getOutputRail5VAmp start Entry: psu_getOutputRail5VAmp() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_OUT_5V_AMP) at physical offset `0x0228` (`MMAP_PSU_READING_OUT_5V_AMP`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getOutputRail5VAmp in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getOutputRail5VAmp Node1 psu_getOutputRail5VAmp Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getOutputRail5VAmp Node1 psu_getOutputRail5VAmp Node1->Node1 Node2 modPsu_currentMonitor Node1->Node2 Node2->Node2

◆ psu_getOutputRail5VTemp()

DriverStatus psu_getOutputRail5VTemp ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getOutputRail5VTemp.

Retrieves the 5V output rail temperature (C) reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the 5V output rail temperature reading in degree Celsius (C).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_READ_FAILED: Failed to read from the device.
DRV_INVALID_PARAM: Invalid address pointer.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getOutputRail5VTemp

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETOUTPUTRAIL5VTEMP_01 HLR_PSU_23252 WHEN the pointer valuePtr is NULL (invalid), the psu_getOutputRail5VTemp() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getOutputRail5VTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VTEMP_02 HLR_PSU_23252 WHEN the pointer valuePtr is valid, the psu_getOutputRail5VTemp() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_OUT_5V_TEMP using readPsuReg(). psu.c:psu_getOutputRail5VTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VTEMP_03 HLR_PSU_23252 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getOutputRail5VTemp() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getOutputRail5VTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VTEMP_04 HLR_PSU_23252 WHEN the hardware register is read successfully, the psu_getOutputRail5VTemp() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_5V_TEMP to convert the lower 8-bit raw count into engineering temperature units. psu.c:psu_getOutputRail5VTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VTEMP_05 HLR_PSU_23252 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getOutputRail5VTemp() function SHALL abort processing and return that conversion failure status. psu.c:psu_getOutputRail5VTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VTEMP_06 HLR_PSU_23252 WHEN engineering value conversion completes successfully, the psu_getOutputRail5VTemp() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getOutputRail5VTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VTEMP_07 HLR_PSU_23252 WHEN the rounded temperature value in *valuePtr is greater than 0, the psu_getOutputRail5VTemp() function SHALL add calibration offset PSU_OFFSET_READING_5V_TEMP to *valuePtr. psu.c:psu_getOutputRail5VTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VTEMP_08 HLR_PSU_23252 WHEN all operational processing completes successfully, the psu_getOutputRail5VTemp() function SHALL return DRV_SUCCESS. psu.c:psu_getOutputRail5VTemp() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getOutputRail5VTemp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getOutputRail5VTemp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getOutputRail5VTemp start Entry: psu_getOutputRail5VTemp() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_OUT_5V_TEMP) at physical offset `0x0244` (`MMAP_PSU_READING_OUT_5V_TEMP`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getOutputRail5VTemp in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getOutputRail5VTemp Node1 psu_getOutputRail5VTemp Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getOutputRail5VTemp Node1 psu_getOutputRail5VTemp Node1->Node1 Node2 modPsu_tempMonitor Node1->Node2 Node2->Node2

◆ psu_getOutputRail5VVolt()

DriverStatus psu_getOutputRail5VVolt ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getOutputRail5VVolt.

Retrieves the 5V output rail reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the PSU 5V output rail reading in Volt (V).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_INVALID_PARAM: Invalid address pointer.
DRV_READ_FAILED: Failed to read from the device.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getOutputRail5VVolt

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETOUTPUTRAIL5VVOLT_01 HLR_PSU_23225 WHEN the pointer valuePtr is NULL (invalid), the psu_getOutputRail5VVolt() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getOutputRail5VVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VVOLT_02 HLR_PSU_23225 WHEN the pointer valuePtr is valid, the psu_getOutputRail5VVolt() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_OUT_5V_VOLT using readPsuReg(). psu.c:psu_getOutputRail5VVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VVOLT_03 HLR_PSU_23225 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getOutputRail5VVolt() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getOutputRail5VVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VVOLT_04 HLR_PSU_23225 WHEN the hardware register is read successfully, the psu_getOutputRail5VVolt() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_5V_VOLTAGE to convert the lower 8-bit raw count into engineering voltage units. psu.c:psu_getOutputRail5VVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VVOLT_05 HLR_PSU_23225 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getOutputRail5VVolt() function SHALL abort processing and return that conversion failure status. psu.c:psu_getOutputRail5VVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VVOLT_06 HLR_PSU_23225 WHEN engineering value conversion completes successfully, the psu_getOutputRail5VVolt() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getOutputRail5VVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VVOLT_07 HLR_PSU_23225 WHEN the rounded voltage value in *valuePtr is greater than 0, the psu_getOutputRail5VVolt() function SHALL add calibration offset PSU_OFFSET_READING_5V_VOLT to *valuePtr. psu.c:psu_getOutputRail5VVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAIL5VVOLT_08 HLR_PSU_23225 WHEN all operational processing completes successfully, the psu_getOutputRail5VVolt() function SHALL return DRV_SUCCESS. psu.c:psu_getOutputRail5VVolt() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getOutputRail5VVolt() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getOutputRail5VVolt() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getOutputRail5VVolt start Entry: psu_getOutputRail5VVolt() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_OUT_5V_VOLT) at physical offset `0x020C` (`MMAP_PSU_READING_OUT_5V_VOLT`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getOutputRail5VVolt in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getOutputRail5VVolt Node1 psu_getOutputRail5VVolt Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getOutputRail5VVolt Node1 psu_getOutputRail5VVolt Node1->Node1 Node2 modPsu_voltageMonitor Node1->Node2 Node2->Node2

◆ psu_getOutputRailN12VAuxAmp()

DriverStatus psu_getOutputRailN12VAuxAmp ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getOutputRailN12VAuxAmp.

Retrieves the -12V aux output rail current reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the PSU -12V output rail current reading in Ampere (A).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_READ_FAILED: Failed to read from the device.
DRV_INVALID_PARAM: Invalid address pointer.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getOutputRailN12VAuxAmp

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXAMP_01 HLR_PSU_23248 WHEN the pointer valuePtr is NULL (invalid), the psu_getOutputRailN12VAuxAmp() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getOutputRailN12VAuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXAMP_02 HLR_PSU_23248 WHEN the pointer valuePtr is valid, the psu_getOutputRailN12VAuxAmp() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_OUT_N12V_AUX_AMP using readPsuReg(). psu.c:psu_getOutputRailN12VAuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXAMP_03 HLR_PSU_23248 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getOutputRailN12VAuxAmp() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getOutputRailN12VAuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXAMP_04 HLR_PSU_23248 WHEN the hardware register is read successfully, the psu_getOutputRailN12VAuxAmp() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_N12V_AUX_CURRENT to convert the lower 8-bit raw count into engineering current units. psu.c:psu_getOutputRailN12VAuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXAMP_05 HLR_PSU_23248 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getOutputRailN12VAuxAmp() function SHALL abort processing and return that conversion failure status. psu.c:psu_getOutputRailN12VAuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXAMP_06 HLR_PSU_23248 WHEN engineering value conversion completes successfully, the psu_getOutputRailN12VAuxAmp() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getOutputRailN12VAuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXAMP_07 HLR_PSU_23248 WHEN the rounded current value in *valuePtr is greater than 0, the psu_getOutputRailN12VAuxAmp() function SHALL add calibration offset PSU_OFFSET_READING_N12V_AUX_AMP to *valuePtr. psu.c:psu_getOutputRailN12VAuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXAMP_08 HLR_PSU_23248 WHEN all operational processing completes successfully, the psu_getOutputRailN12VAuxAmp() function SHALL return DRV_SUCCESS. psu.c:psu_getOutputRailN12VAuxAmp() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getOutputRailN12VAuxAmp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getOutputRailN12VAuxAmp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getOutputRailN12VAuxAmp start Entry: psu_getOutputRailN12VAuxAmp() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_OUT_N12V_AUX_AMP) at physical offset `0x022C` (`MMAP_PSU_READING_OUT_N12V_AUX_AMP`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getOutputRailN12VAuxAmp in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getOutputRailN12VAuxAmp Node1 psu_getOutputRailN12VAuxAmp Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getOutputRailN12VAuxAmp Node1 psu_getOutputRailN12VAuxAmp Node1->Node1 Node2 modPsu_currentMonitor Node1->Node2 Node2->Node2

◆ psu_getOutputRailN12VAuxTemp()

DriverStatus psu_getOutputRailN12VAuxTemp ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getOutputRailN12VAuxTemp.

Retrieves the -12V aux output rail temperature (C) reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the -12V aux output rail temperature reading in degree Celsius (C).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_READ_FAILED: Failed to read from the device.
DRV_INVALID_PARAM: Invalid address pointer.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getOutputRailN12VAuxTemp

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXTEMP_01 HLR_PSU_23254 WHEN the pointer valuePtr is NULL (invalid), the psu_getOutputRailN12VAuxTemp() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getOutputRailN12VAuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXTEMP_02 HLR_PSU_23254 WHEN the pointer valuePtr is valid, the psu_getOutputRailN12VAuxTemp() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_OUT_N12V_AUX_TEMP using readPsuReg(). psu.c:psu_getOutputRailN12VAuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXTEMP_03 HLR_PSU_23254 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getOutputRailN12VAuxTemp() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getOutputRailN12VAuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXTEMP_04 HLR_PSU_23254 WHEN the hardware register is read successfully, the psu_getOutputRailN12VAuxTemp() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_N12V_AUX_TEMP to convert the lower 8-bit raw count into engineering temperature units. psu.c:psu_getOutputRailN12VAuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXTEMP_05 HLR_PSU_23254 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getOutputRailN12VAuxTemp() function SHALL abort processing and return that conversion failure status. psu.c:psu_getOutputRailN12VAuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXTEMP_06 HLR_PSU_23254 WHEN engineering value conversion completes successfully, the psu_getOutputRailN12VAuxTemp() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getOutputRailN12VAuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXTEMP_07 HLR_PSU_23254 WHEN the rounded temperature value in *valuePtr is greater than 0, the psu_getOutputRailN12VAuxTemp() function SHALL add calibration offset PSU_OFFSET_READING_N12V_AUX_TEMP to *valuePtr. psu.c:psu_getOutputRailN12VAuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXTEMP_08 HLR_PSU_23254 WHEN all operational processing completes successfully, the psu_getOutputRailN12VAuxTemp() function SHALL return DRV_SUCCESS. psu.c:psu_getOutputRailN12VAuxTemp() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getOutputRailN12VAuxTemp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getOutputRailN12VAuxTemp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getOutputRailN12VAuxTemp start Entry: psu_getOutputRailN12VAuxTemp() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_OUT_N12V_AUX_TEMP) at physical offset `0x0248` (`MMAP_PSU_READING_OUT_N12V_AUX_TEMP`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getOutputRailN12VAuxTemp in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getOutputRailN12VAuxTemp Node1 psu_getOutputRailN12VAuxTemp Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getOutputRailN12VAuxTemp Node1 psu_getOutputRailN12VAuxTemp Node1->Node1 Node2 modPsu_tempMonitor Node1->Node2 Node2->Node2

◆ psu_getOutputRailN12VAuxVolt()

DriverStatus psu_getOutputRailN12VAuxVolt ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getOutputRailN12VAuxVolt.

Retrieves the -12V aux output rail reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the PSU -12V aux output rail reading in Volt (V).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_INVALID_PARAM: Invalid address pointer.
DRV_READ_FAILED: Failed to read from the device.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getOutputRailN12VAuxVolt

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXVOLT_01 HLR_PSU_23228 WHEN the pointer valuePtr is NULL (invalid), the psu_getOutputRailN12VAuxVolt() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getOutputRailN12VAuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXVOLT_02 HLR_PSU_23228 WHEN the pointer valuePtr is valid, the psu_getOutputRailN12VAuxVolt() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_OUT_N12V_AUX_VOLT using readPsuReg(). psu.c:psu_getOutputRailN12VAuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXVOLT_03 HLR_PSU_23228 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getOutputRailN12VAuxVolt() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getOutputRailN12VAuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXVOLT_04 HLR_PSU_23228 WHEN the hardware register is read successfully, the psu_getOutputRailN12VAuxVolt() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_N12V_AUX_VOLTAGE to convert the lower 8-bit raw count into engineering voltage units. psu.c:psu_getOutputRailN12VAuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXVOLT_05 HLR_PSU_23228 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getOutputRailN12VAuxVolt() function SHALL abort processing and return that conversion failure status. psu.c:psu_getOutputRailN12VAuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXVOLT_06 HLR_PSU_23228 WHEN engineering value conversion completes successfully, the psu_getOutputRailN12VAuxVolt() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getOutputRailN12VAuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXVOLT_07 HLR_PSU_23228 WHEN the rounded voltage value in *valuePtr is less than 0, the psu_getOutputRailN12VAuxVolt() function SHALL add calibration offset PSU_OFFSET_READING_N12V_AUX_VOLT to *valuePtr. psu.c:psu_getOutputRailN12VAuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILN12VAUXVOLT_08 HLR_PSU_23228 WHEN all operational processing completes successfully, the psu_getOutputRailN12VAuxVolt() function SHALL return DRV_SUCCESS. psu.c:psu_getOutputRailN12VAuxVolt() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getOutputRailN12VAuxVolt() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getOutputRailN12VAuxVolt() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getOutputRailN12VAuxVolt start Entry: psu_getOutputRailN12VAuxVolt() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is less than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_OUT_N12V_AUX_VOLT) at physical offset `0x0210` (`MMAP_PSU_READING_OUT_N12V_AUX_VOLT`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getOutputRailN12VAuxVolt in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getOutputRailN12VAuxVolt Node1 psu_getOutputRailN12VAuxVolt Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getOutputRailN12VAuxVolt Node1 psu_getOutputRailN12VAuxVolt Node1->Node1 Node2 modPsu_voltageMonitor Node1->Node2 Node2->Node2

◆ psu_getOutputRailP12VAuxAmp()

DriverStatus psu_getOutputRailP12VAuxAmp ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getOutputRailP12VAuxAmp.

Retrieves the 12V aux output rail current reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the PSU 12V output rail current reading in Ampere (A).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_READ_FAILED: Failed to read from the device.
DRV_INVALID_PARAM: Invalid address pointer.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getOutputRailP12VAuxAmp

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXAMP_01 HLR_PSU_23248 WHEN the pointer valuePtr is NULL (invalid), the psu_getOutputRailP12VAuxAmp() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getOutputRailP12VAuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXAMP_02 HLR_PSU_23248 WHEN the pointer valuePtr is valid, the psu_getOutputRailP12VAuxAmp() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_OUT_P12V_AUX_AMP using readPsuReg(). psu.c:psu_getOutputRailP12VAuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXAMP_03 HLR_PSU_23248 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getOutputRailP12VAuxAmp() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getOutputRailP12VAuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXAMP_04 HLR_PSU_23248 WHEN the hardware register is read successfully, the psu_getOutputRailP12VAuxAmp() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_P12V_AUX_CURRENT to convert the lower 8-bit raw count into engineering current units. psu.c:psu_getOutputRailP12VAuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXAMP_05 HLR_PSU_23248 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getOutputRailP12VAuxAmp() function SHALL abort processing and return that conversion failure status. psu.c:psu_getOutputRailP12VAuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXAMP_06 HLR_PSU_23248 WHEN engineering value conversion completes successfully, the psu_getOutputRailP12VAuxAmp() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getOutputRailP12VAuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXAMP_07 HLR_PSU_23248 WHEN the rounded current value in *valuePtr is greater than 0, the psu_getOutputRailP12VAuxAmp() function SHALL add calibration offset PSU_OFFSET_READING_P12V_AUX_AMP to *valuePtr. psu.c:psu_getOutputRailP12VAuxAmp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXAMP_08 HLR_PSU_23248 WHEN all operational processing completes successfully, the psu_getOutputRailP12VAuxAmp() function SHALL return DRV_SUCCESS. psu.c:psu_getOutputRailP12VAuxAmp() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getOutputRailP12VAuxAmp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getOutputRailP12VAuxAmp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getOutputRailP12VAuxAmp start Entry: psu_getOutputRailP12VAuxAmp() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_OUT_P12V_AUX_AMP) at physical offset `0x0230` (`MMAP_PSU_READING_OUT_P12V_AUX_AMP`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getOutputRailP12VAuxAmp in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getOutputRailP12VAuxAmp Node1 psu_getOutputRailP12VAuxAmp Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getOutputRailP12VAuxAmp Node1 psu_getOutputRailP12VAuxAmp Node1->Node1 Node2 modPsu_currentMonitor Node1->Node2 Node2->Node2

◆ psu_getOutputRailP12VAuxTemp()

DriverStatus psu_getOutputRailP12VAuxTemp ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getOutputRailP12VAuxTemp.

Retrieves the 12V aux output rail temperature (C) reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the 12V aux output rail temperature reading in degree Celsius (C).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_READ_FAILED: Failed to read from the device.
DRV_INVALID_PARAM: Invalid address pointer.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getOutputRailP12VAuxTemp

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXTEMP_01 HLR_PSU_23254 WHEN the pointer valuePtr is NULL (invalid), the psu_getOutputRailP12VAuxTemp() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getOutputRailP12VAuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXTEMP_02 HLR_PSU_23254 WHEN the pointer valuePtr is valid, the psu_getOutputRailP12VAuxTemp() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_OUT_P12V_AUX_TEMP using readPsuReg(). psu.c:psu_getOutputRailP12VAuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXTEMP_03 HLR_PSU_23254 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getOutputRailP12VAuxTemp() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getOutputRailP12VAuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXTEMP_04 HLR_PSU_23254 WHEN the hardware register is read successfully, the psu_getOutputRailP12VAuxTemp() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_P12V_AUX_TEMP to convert the lower 8-bit raw count into engineering temperature units. psu.c:psu_getOutputRailP12VAuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXTEMP_05 HLR_PSU_23254 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getOutputRailP12VAuxTemp() function SHALL abort processing and return that conversion failure status. psu.c:psu_getOutputRailP12VAuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXTEMP_06 HLR_PSU_23254 WHEN engineering value conversion completes successfully, the psu_getOutputRailP12VAuxTemp() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getOutputRailP12VAuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXTEMP_07 HLR_PSU_23254 WHEN the rounded temperature value in *valuePtr is greater than 0, the psu_getOutputRailP12VAuxTemp() function SHALL add calibration offset PSU_OFFSET_READING_P12V_AUX_TEMP to *valuePtr. psu.c:psu_getOutputRailP12VAuxTemp() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXTEMP_08 HLR_PSU_23254 WHEN all operational processing completes successfully, the psu_getOutputRailP12VAuxTemp() function SHALL return DRV_SUCCESS. psu.c:psu_getOutputRailP12VAuxTemp() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getOutputRailP12VAuxTemp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getOutputRailP12VAuxTemp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getOutputRailP12VAuxTemp start Entry: psu_getOutputRailP12VAuxTemp() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_OUT_P12V_AUX_TEMP) at physical offset `0x024C` (`MMAP_PSU_READING_OUT_P12V_AUX_TEMP`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getOutputRailP12VAuxTemp in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getOutputRailP12VAuxTemp Node1 psu_getOutputRailP12VAuxTemp Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getOutputRailP12VAuxTemp Node1 psu_getOutputRailP12VAuxTemp Node1->Node1 Node2 modPsu_tempMonitor Node1->Node2 Node2->Node2

◆ psu_getOutputRailP12VAuxVolt()

DriverStatus psu_getOutputRailP12VAuxVolt ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getOutputRailP12VAuxVolt.

Retrieves the +12V aux output rail reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the PSU +12V aux output rail reading in Volt (V).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_INVALID_PARAM: Invalid address pointer.
DRV_READ_FAILED: Failed to read from the device.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getOutputRailP12VAuxVolt

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXVOLT_01 HLR_PSU_23228 WHEN the pointer valuePtr is NULL (invalid), the psu_getOutputRailP12VAuxVolt() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getOutputRailP12VAuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXVOLT_02 HLR_PSU_23228 WHEN the pointer valuePtr is valid, the psu_getOutputRailP12VAuxVolt() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_OUT_P12V_AUX_VOLT using readPsuReg(). psu.c:psu_getOutputRailP12VAuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXVOLT_03 HLR_PSU_23228 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getOutputRailP12VAuxVolt() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getOutputRailP12VAuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXVOLT_04 HLR_PSU_23228 WHEN the hardware register is read successfully, the psu_getOutputRailP12VAuxVolt() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_P12V_AUX_VOLTAGE to convert the lower 8-bit raw count into engineering voltage units. psu.c:psu_getOutputRailP12VAuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXVOLT_05 HLR_PSU_23228 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getOutputRailP12VAuxVolt() function SHALL abort processing and return that conversion failure status. psu.c:psu_getOutputRailP12VAuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXVOLT_06 HLR_PSU_23228 WHEN engineering value conversion completes successfully, the psu_getOutputRailP12VAuxVolt() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getOutputRailP12VAuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXVOLT_07 HLR_PSU_23228 WHEN the rounded voltage value in *valuePtr is greater than 0, the psu_getOutputRailP12VAuxVolt() function SHALL add calibration offset PSU_OFFSET_READING_P12V_AUX_VOLT to *valuePtr. psu.c:psu_getOutputRailP12VAuxVolt() Test Closed
LLR_PSU_PSU_GETOUTPUTRAILP12VAUXVOLT_08 HLR_PSU_23228 WHEN all operational processing completes successfully, the psu_getOutputRailP12VAuxVolt() function SHALL return DRV_SUCCESS. psu.c:psu_getOutputRailP12VAuxVolt() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getOutputRailP12VAuxVolt() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getOutputRailP12VAuxVolt() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getOutputRailP12VAuxVolt start Entry: psu_getOutputRailP12VAuxVolt() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_OUT_P12V_AUX_VOLT) at physical offset `0x0214` (`MMAP_PSU_READING_OUT_P12V_AUX_VOLT`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getOutputRailP12VAuxVolt in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getOutputRailP12VAuxVolt Node1 psu_getOutputRailP12VAuxVolt Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getOutputRailP12VAuxVolt Node1 psu_getOutputRailP12VAuxVolt Node1->Node1 Node2 modPsu_voltageMonitor Node1->Node2 Node2->Node2

◆ psu_getPrimaryTransTemp()

DriverStatus psu_getPrimaryTransTemp ( const PSUDevHandler psuDevHdl,
Float32 * valuePtr )

psu_getPrimaryTransTemp.

Retrieves the primary transformer temperature (C) reading from the power supply unit (PSU).

Parameters
[in]psuDevHdlThe PSU device handler.
[out]valuePtrPointer to store the primary transformer temperature reading in degree Celsius (C).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_READ_FAILED: Failed to read from the device.
DRV_INVALID_PARAM: Invalid address pointer.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getPrimaryTransTemp

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETPRIMARYTRANSTEMP_01 HLR_PSU_329 WHEN the pointer valuePtr is NULL (invalid), the psu_getPrimaryTransTemp() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getPrimaryTransTemp() Test Closed
LLR_PSU_PSU_GETPRIMARYTRANSTEMP_02 HLR_PSU_329 WHEN the pointer valuePtr is valid, the psu_getPrimaryTransTemp() function SHALL read the raw hardware sensor count from register MMAP_PSU_READING_PRI_TRANS_TEMP using readPsuReg(). psu.c:psu_getPrimaryTransTemp() Test Closed
LLR_PSU_PSU_GETPRIMARYTRANSTEMP_03 HLR_PSU_329 WHEN the hardware register read operation fails (status not equal to DRV_SUCCESS), the psu_getPrimaryTransTemp() function SHALL clear *valuePtr to 0.0F and return that failure status. psu.c:psu_getPrimaryTransTemp() Test Closed
LLR_PSU_PSU_GETPRIMARYTRANSTEMP_04 HLR_PSU_329 WHEN the hardware register is read successfully, the psu_getPrimaryTransTemp() function SHALL invoke conversion routine valueConversion() with sensor identifier PSU_SENSOR_NUMBER_PRIMARY_TRANS_TEMP to convert the lower 8-bit raw count into engineering temperature units. psu.c:psu_getPrimaryTransTemp() Test Closed
LLR_PSU_PSU_GETPRIMARYTRANSTEMP_05 HLR_PSU_329 WHEN sensor value conversion fails (status not equal to DRV_SUCCESS), the psu_getPrimaryTransTemp() function SHALL abort processing and return that conversion failure status. psu.c:psu_getPrimaryTransTemp() Test Closed
LLR_PSU_PSU_GETPRIMARYTRANSTEMP_06 HLR_PSU_329 WHEN engineering value conversion completes successfully, the psu_getPrimaryTransTemp() function SHALL format the result to target decimal precision using numerical helper roundToDecimal(). psu.c:psu_getPrimaryTransTemp() Test Closed
LLR_PSU_PSU_GETPRIMARYTRANSTEMP_07 HLR_PSU_329 WHEN the rounded temperature value in *valuePtr is greater than 0, the psu_getPrimaryTransTemp() function SHALL add calibration offset PSU_OFFSET_READING_PRIMARY_TRANS_TEMP to *valuePtr. psu.c:psu_getPrimaryTransTemp() Test Closed
LLR_PSU_PSU_GETPRIMARYTRANSTEMP_08 HLR_PSU_329 WHEN all operational processing completes successfully, the psu_getPrimaryTransTemp() function SHALL return DRV_SUCCESS. psu.c:psu_getPrimaryTransTemp() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getPrimaryTransTemp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getPrimaryTransTemp() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getPrimaryTransTemp start Entry: psu_getPrimaryTransTemp() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is *`valuePtr` is greater than `0`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the mmap psu sensor reading value (PSU_READING_PRI_TRANS_TEMP) at physical offset `0x0254` (`MMAP_PSU_READING_PRI_TRANS_TEMP`) using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke conversion routine `valueConversion()` to scale hardware ADC raw counts into engineering units act_4->act_5 act_6 LLR_06: Action Step invoke numerical helper `roundToDecimal()` to format output payload to target precision act_5->act_6 success_exit LLR_07: Final Exit return `DRV_SUCCESS` act_6->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getPrimaryTransTemp in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: valuePtr proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via valueConversion() proc_4->proc_5 Data Payload (valueConversion) proc_6 LLR_06: Data Payload Transformation • Process payload via roundToDecimal() proc_5->proc_6 Data Payload (roundToDecimal) proc_7 LLR_07: Status Output Packaging • Format Return Payload: DriverStatus proc_6->proc_7 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_7->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getPrimaryTransTemp Node1 psu_getPrimaryTransTemp Node1->Node1 Node2 readPsuReg Node1->Node2 Node6 roundToDecimal Node1->Node6 Node7 valueConversion Node1->Node7 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7->Node7 Node8 formulaSensor Node7->Node8 Node8->Node8
Here is the caller graph for this function:
psu_getPrimaryTransTemp Node1 psu_getPrimaryTransTemp Node1->Node1 Node2 modPsu_tempMonitor Node1->Node2 Node2->Node2

◆ psu_getPsuCbit()

DriverStatus psu_getPsuCbit ( const PSUDevHandler psuDevHdl,
PsuCbitStatus * psuCbitPtr )

psu_getPsuCbit.

To get CBIT status for PSU.

Parameters
[in]psuDevHdlThe PSU device handler.
[out]psuCbitPtrThe pointer to a CBIT Status.
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_INVALID_PARAM: Invalid address pointer.
DRV_READ_FAILED: Failed to read from the device.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getPsuCbit

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETPSUCBIT_01 HLR_PSU_16742 WHEN the pointer psuCbitPtr is NULL (invalid), the psu_getPsuCbit() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getPsuCbit() Test Closed
LLR_PSU_PSU_GETPSUCBIT_02 HLR_PSU_16742 WHEN reading any of the PSU CBIT registers fails (reporting a status other than DRV_SUCCESS), the psu_getPsuCbit() function SHALL abort processing and return that driver failure status. psu.c:psu_getPsuCbit() Test Closed
LLR_PSU_PSU_GETPSUCBIT_03 HLR_PSU_16742 WHEN the destination pointer psuCbitPtr is valid, the psu_getPsuCbit() function SHALL read the Power Supply Unit (PSU) CBIT status telemetry registers for Voltage (MMAP_PSU_CBIT_STATE_VOLT), Current (MMAP_PSU_CBIT_STATE_AMP), Temperature (MMAP_PSU_CBIT_STATE_TEMP), and Communication (MMAP_PSU_CBIT_STATE_COMM) from the PSU peripheral base address. psu.c:psu_getPsuCbit() Test Closed
LLR_PSU_PSU_GETPSUCBIT_04 HLR_PSU_16742 WHEN the Voltage CBIT register (MMAP_PSU_CBIT_STATE_VOLT) is read successfully, the psu_getPsuCbit() function SHALL decode the over-voltage and under-voltage status flags for all monitored input and output voltage rails into @p psuCbitPtr->voltage. psu.c:psu_getPsuCbit() Test Closed
LLR_PSU_PSU_GETPSUCBIT_05 HLR_PSU_16742 WHEN the Current CBIT register (MMAP_PSU_CBIT_STATE_AMP) is read successfully, the psu_getPsuCbit() function SHALL decode the over-current status flags for all monitored input and output current rails into @p psuCbitPtr->current. psu.c:psu_getPsuCbit() Test Closed
LLR_PSU_PSU_GETPSUCBIT_06 HLR_PSU_16742 WHEN the Temperature CBIT register (MMAP_PSU_CBIT_STATE_TEMP) is read successfully, the psu_getPsuCbit() function SHALL decode the over-temperature status flags for all monitored thermal sensors into @p psuCbitPtr->temp. psu.c:psu_getPsuCbit() Test Closed
LLR_PSU_PSU_GETPSUCBIT_07 HLR_PSU_16742 WHEN the Communication CBIT register (MMAP_PSU_CBIT_STATE_COMM) is read successfully, the psu_getPsuCbit() function SHALL decode the communication fault status flag into @p psuCbitPtr->commStat. psu.c:psu_getPsuCbit() Test Closed
LLR_PSU_PSU_GETPSUCBIT_08 HLR_PSU_16742 WHEN all operational processing completes successfully, the psu_getPsuCbit() function SHALL return DRV_SUCCESS. psu.c:psu_getPsuCbit() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getPsuCbit() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getPsuCbit() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *psuCbitPtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getPsuCbit start Entry: psu_getPsuCbit() guard_1 LLR_01: Guard Check Is the pointer `psuCbitPtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is `cmdArray[count]` is not one of `MMAP_PSU_CBIT_STATE_VOLT through MMAP_PSU_CBIT_STATE_COMM`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit abort processing and return `error status` guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the hardware peripheral register at physical offset `cmdArray[count]` using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke routine `PSU_MASK_CBIT_IN_VOLT_OVER_VOLT()` to execute target subsystem hardware operation act_4->act_5 act_6 LLR_06: Action Step invoke routine `PSU_MASK_CBIT_IN_VOLT_UNDER_VOLT()` to execute target subsystem hardware operation act_5->act_6 act_7 LLR_07: Action Step invoke routine `PSU_MASK_CBIT_OUT_12V_OVER_VOLT()` to execute target subsystem hardware operation act_6->act_7 act_8 LLR_08: Action Step invoke routine `PSU_MASK_CBIT_OUT_12V_UNDER_VOLT()` to execute target subsystem hardware operation act_7->act_8 success_exit LLR_09: Final Exit return `DRV_SUCCESS` act_8->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getPsuCbit in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: psuCbitPtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: cmdArray[count] proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via PSU_MASK_CBIT_IN_VOLT_OVER_VOLT() proc_4->proc_5 Data Payload (PSU_MASK_CBIT_IN_VOLT_OVER_VOLT) proc_6 LLR_06: Data Payload Transformation • Process payload via PSU_MASK_CBIT_IN_VOLT_UNDER_VOLT() proc_5->proc_6 Data Payload (PSU_MASK_CBIT_IN_VOLT_UNDER_VOLT) proc_7 LLR_07: Data Payload Transformation • Process payload via PSU_MASK_CBIT_OUT_12V_OVER_VOLT() proc_6->proc_7 Data Payload (PSU_MASK_CBIT_OUT_12V_OVER_VOLT) proc_8 LLR_08: Data Payload Transformation • Process payload via PSU_MASK_CBIT_OUT_12V_UNDER_VOLT() proc_7->proc_8 Data Payload (PSU_MASK_CBIT_OUT_12V_UNDER_VOLT) proc_9 LLR_09: Status Output Packaging • Format Return Payload: DriverStatus proc_8->proc_9 Final Output Data out_sink Output Data Sinks & Status Return • psuCbitPtr (PsuCbitStatus) proc_9->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getPsuCbit Node1 psu_getPsuCbit Node1->Node1 Node2 readPsuReg Node1->Node2 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5
Here is the caller graph for this function:
psu_getPsuCbit Node1 psu_getPsuCbit Node1->Node1 Node2 modHsb_getPsuCbit Node1->Node2 Node2->Node2

◆ psu_getPsuDiag()

DriverStatus psu_getPsuDiag ( const PSUDevHandler psuDevHdl,
PsuDiagStatus * psuDiagPtr )

psu_getPsuDiag.

Get the diagnostic status for power supply unit.

Parameters
[in]psuDevHdlThe PSU device handler.
[out]psuDiagPtrPointer for PSU diagnostic Status.
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Operation successful.
DRV_INVALID_PARAM: Invalid address pointer.
DRV_READ_FAILED: Failed to read from the device.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: psu_getPsuDiag

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_PSU_GETPSUDIAG_01 HLR_PSU_329 WHEN the pointer psuDiagPtr is NULL (invalid), the psu_getPsuDiag() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:psu_getPsuDiag() Test Closed
LLR_PSU_PSU_GETPSUDIAG_02 HLR_PSU_329 WHEN reading any of the PSU diagnostic registers fails (reporting a status other than DRV_SUCCESS), the psu_getPsuDiag() function SHALL abort processing and return that driver failure status. psu.c:psu_getPsuDiag() Test Closed
LLR_PSU_PSU_GETPSUDIAG_03 HLR_PSU_329 WHEN the destination pointer psuDiagPtr is valid, the psu_getPsuDiag() function SHALL read the Power Supply Unit (PSU) diagnostic state registers for Voltage (MMAP_PSU_DIAG_STATE_VOLT), Current (MMAP_PSU_DIAG_STATE_AMP), and Temperature (MMAP_PSU_DIAG_STATE_TEMP) from the PSU peripheral base address. psu.c:psu_getPsuDiag() Test Closed
LLR_PSU_PSU_GETPSUDIAG_04 HLR_PSU_329 WHEN the Voltage Diagnostic register (MMAP_PSU_DIAG_STATE_VOLT) is read successfully, the psu_getPsuDiag() function SHALL decode the over-voltage fault threshold state for all monitored voltage rails into @p psuDiagPtr->overVoltage. psu.c:psu_getPsuDiag() Test Closed
LLR_PSU_PSU_GETPSUDIAG_05 HLR_PSU_329 WHEN the Current Diagnostic register (MMAP_PSU_DIAG_STATE_AMP) is read successfully, the psu_getPsuDiag() function SHALL decode the over-current fault threshold state for all monitored current rails into @p psuDiagPtr->overCurrent. psu.c:psu_getPsuDiag() Test Closed
LLR_PSU_PSU_GETPSUDIAG_06 HLR_PSU_329 WHEN the Temperature Diagnostic register (MMAP_PSU_DIAG_STATE_TEMP) is read successfully, the psu_getPsuDiag() function SHALL decode the over-temperature fault threshold state for all monitored thermal sensors into @p psuDiagPtr->overTemp. psu.c:psu_getPsuDiag() Test Closed
LLR_PSU_PSU_GETPSUDIAG_07 HLR_PSU_329 WHEN all operational processing completes successfully, the psu_getPsuDiag() function SHALL return DRV_SUCCESS. psu.c:psu_getPsuDiag() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller psu_getPsuDiag() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller psu_getPsuDiag() [Low-Level Device Drivers] Target readPsuReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   psuDevHdl (Payload) r_b0->r_t0   *psuDiagPtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_psu_getPsuDiag start Entry: psu_getPsuDiag() guard_1 LLR_01: Guard Check Is the pointer `psuDiagPtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `drvStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is `cmdArray[count]` is not one of `MMAP_PSU_DIAG_STATE_VOLT through MMAP_PSU_DIAG_STATE_TEMP`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit abort processing and return `error status` guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the hardware peripheral register at physical offset `cmdArray[count]` using `readPsuReg()` guard_3->act_4 NO (FALSE) act_5 LLR_05: Action Step invoke routine `PSU_MASK_DIAG_STATE_IN_VOLT()` to execute target subsystem hardware operation act_4->act_5 act_6 LLR_06: Action Step invoke routine `PSU_MASK_DIAG_STATE_OUT_12V_VOLT()` to execute target subsystem hardware operation act_5->act_6 act_7 LLR_07: Action Step invoke routine `PSU_MASK_DIAG_STATE_OUT_3V3_VOLT()` to execute target subsystem hardware operation act_6->act_7 act_8 LLR_08: Action Step invoke routine `PSU_MASK_DIAG_STATE_OUT_5V_VOLT()` to execute target subsystem hardware operation act_7->act_8 success_exit LLR_09: Final Exit return `DRV_SUCCESS` act_8->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_psu_getPsuDiag in_store Input Data Sources & Parameters • psuDevHdl (const PSUDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: psuDiagPtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: drvStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: cmdArray[count] proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readPsuReg() proc_3->proc_4 Data Payload (readPsuReg) proc_5 LLR_05: Data Payload Transformation • Process payload via PSU_MASK_DIAG_STATE_IN_VOLT() proc_4->proc_5 Data Payload (PSU_MASK_DIAG_STATE_IN_VOLT) proc_6 LLR_06: Data Payload Transformation • Process payload via PSU_MASK_DIAG_STATE_OUT_12V_VOLT() proc_5->proc_6 Data Payload (PSU_MASK_DIAG_STATE_OUT_12V_VOLT) proc_7 LLR_07: Data Payload Transformation • Process payload via PSU_MASK_DIAG_STATE_OUT_3V3_VOLT() proc_6->proc_7 Data Payload (PSU_MASK_DIAG_STATE_OUT_3V3_VOLT) proc_8 LLR_08: Data Payload Transformation • Process payload via PSU_MASK_DIAG_STATE_OUT_5V_VOLT() proc_7->proc_8 Data Payload (PSU_MASK_DIAG_STATE_OUT_5V_VOLT) proc_9 LLR_09: Status Output Packaging • Format Return Payload: DriverStatus proc_8->proc_9 Final Output Data out_sink Output Data Sinks & Status Return • psuDiagPtr (PsuDiagStatus) proc_9->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
psu_getPsuDiag Node1 psu_getPsuDiag Node1->Node1 Node2 readPsuReg Node1->Node2 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5
Here is the caller graph for this function:
psu_getPsuDiag Node1 psu_getPsuDiag Node1->Node1 Node2 modHsb_getPsuDiag Node1->Node2 Node2->Node2

◆ readPsuReg()

DriverStatus readPsuReg ( const UInt32 baseAddr,
const UInt32 offset,
UInt32 * data )
static

readPsuReg.

psu PCIe read function.

Parameters
[in]baseAddrThe base address of the module and device.
[in]offsetThe offset address from module base address.
[out]data32bit data to read from PCIe.
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Success.
DRV_READ_FAILED: PCIe failed to read value.
DRV_INVALID_PARAM: The provided address pointer is invalid.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: readPsuReg

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_READPSUREG_01 HLR_PSU_16742 WHEN the pointer data is NULL (invalid), the readPsuReg() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:readPsuReg() Test Closed
LLR_PSU_READPSUREG_02 HLR_PSU_16742 WHEN the pointer data is valid, the readPsuReg() function SHALL read a 32-bit register value from physical memory address (baseAddress + addrOffset) into *data using PCIe primitive interDrv_Read32(). psu.c:readPsuReg() Test Closed
LLR_PSU_READPSUREG_03 HLR_PSU_16742 WHEN memory access via interDrv_Read32() fails (status not equal to INTF_SUCCESS), the readPsuReg() function SHALL abort processing and return DRV_READ_FAILED. psu.c:readPsuReg() Test Closed
LLR_PSU_READPSUREG_04 HLR_PSU_16742 WHEN all operational processing completes successfully, the readPsuReg() function SHALL return DRV_SUCCESS. psu.c:readPsuReg() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller readPsuReg() [Low-Level Device Drivers] Target interDrv_Read32() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   baseAddr (Flag) l_t1->l_b1   offset (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller readPsuReg() [Low-Level Device Drivers] Target interDrv_Read32() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   baseAddr (Payload) l_t1->l_b1   offset (Payload) r_b0->r_t0   *data (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_readPsuReg start Entry: readPsuReg() guard_1 LLR_01: Guard Check Is the pointer `data` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `intStatus` is not equal to `INTF_SUCCESS`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `DRV_READ_FAILED` guard_2->err_exit_2 YES (TRUE) act_3 LLR_03: Action Step invoke PCIe primitive `interDrv_Read32()` to read 32-bit word from physical memory address `baseAddress + addrOffset` into `*data` guard_2->act_3 NO (FALSE) success_exit LLR_04: Final Exit return `DRV_SUCCESS` act_3->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_readPsuReg in_store Input Data Sources & Parameters • baseAddr (const UInt32) • offset (const UInt32) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: data in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: intStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Payload Transformation • Process payload via interDrv_Read32() proc_2->proc_3 Data Payload (interDrv_Read32) proc_4 LLR_04: Status Output Packaging • Format Return Payload: DriverStatus proc_3->proc_4 Final Output Data out_sink Output Data Sinks & Status Return • data (UInt32) proc_4->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
readPsuReg Node1 readPsuReg Node1->Node1 Node2 interDrv_Read32 Node1->Node2 Node2->Node2 Node3 interDrv_isAddressValid Node2->Node3 Node4 memoryMap_Read32 Node2->Node4 Node3->Node3 Node4->Node4
Here is the caller graph for this function:
readPsuReg Node1 readPsuReg Node1->Node1 Node2 psu_getBoardTemp Node1->Node2 Node4 psu_getInputAmp Node1->Node4 Node6 psu_getInputVolt Node1->Node6 Node8 psu_getOutputRail12VAmp Node1->Node8 Node9 psu_getOutputRail12VTemp Node1->Node9 Node10 psu_getOutputRail12VVolt Node1->Node10 Node11 psu_getOutputRail3V3Amp Node1->Node11 Node12 psu_getOutputRail3V3AuxAmp Node1->Node12 Node13 psu_getOutputRail3V3AuxTemp Node1->Node13 Node14 psu_getOutputRail3V3AuxVolt Node1->Node14 Node15 psu_getOutputRail3V3Temp Node1->Node15 Node16 psu_getOutputRail3V3Volt Node1->Node16 Node17 psu_getOutputRail5VAmp Node1->Node17 Node18 psu_getOutputRail5VTemp Node1->Node18 Node19 psu_getOutputRail5VVolt Node1->Node19 Node20 psu_getOutputRailN12VAuxAmp Node1->Node20 Node21 psu_getOutputRailN12VAuxTemp Node1->Node21 Node22 psu_getOutputRailN12VAuxVolt Node1->Node22 Node23 psu_getOutputRailP12VAuxAmp Node1->Node23 Node24 psu_getOutputRailP12VAuxTemp Node1->Node24 Node25 psu_getOutputRailP12VAuxVolt Node1->Node25 Node26 psu_getPrimaryTransTemp Node1->Node26 Node27 psu_getPsuCbit Node1->Node27 Node29 psu_getPsuDiag Node1->Node29 Node2->Node2 Node3 modPsu_tempMonitor Node2->Node3 Node3->Node3 Node4->Node4 Node5 modPsu_currentMonitor Node4->Node5 Node5->Node5 Node6->Node6 Node7 modPsu_voltageMonitor Node6->Node7 Node7->Node7 Node8->Node5 Node8->Node8 Node9->Node3 Node9->Node9 Node10->Node7 Node10->Node10 Node11->Node5 Node11->Node11 Node12->Node5 Node12->Node12 Node13->Node3 Node13->Node13 Node14->Node7 Node14->Node14 Node15->Node3 Node15->Node15 Node16->Node7 Node16->Node16 Node17->Node5 Node17->Node17 Node18->Node3 Node18->Node18 Node19->Node7 Node19->Node19 Node20->Node5 Node20->Node20 Node21->Node3 Node21->Node21 Node22->Node7 Node22->Node22 Node23->Node5 Node23->Node23 Node24->Node3 Node24->Node24 Node25->Node7 Node25->Node25 Node26->Node3 Node26->Node26 Node27->Node27 Node28 modHsb_getPsuCbit Node27->Node28 Node28->Node28 Node29->Node29 Node30 modHsb_getPsuDiag Node29->Node30 Node30->Node30

◆ roundToDecimal()

Float32 roundToDecimal ( const Float32 num)
static

roundToDecimal

Rounds a Float32 number to 2 decimal places.

Parameters
[in]numThe Float32 number to round.
Returns
The value rounded to 2 decimal places.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: roundToDecimal

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_ROUNDTODECIMAL_01 HLR_PSU_329 WHEN the third decimal fractional remainder (Int32)((num * 1000.0F) - (rounded * 1000.0F)) is greater than or equal to 5, the roundToDecimal() function SHALL round up by adding 0.01F to the two-decimal truncated value. psu.c:roundToDecimal() Test Closed
LLR_PSU_ROUNDTODECIMAL_02 HLR_PSU_329 WHEN the third decimal fractional remainder (Int32)((num * 1000.0F) - (rounded * 1000.0F)) is less than or equal to -5, the roundToDecimal() function SHALL round down by subtracting 0.01F from the two-decimal truncated value. psu.c:roundToDecimal() Test Closed
LLR_PSU_ROUNDTODECIMAL_03 HLR_PSU_329 WHEN the third decimal fractional remainder is strictly between -5 and 5, the roundToDecimal() function SHALL retain the two-decimal truncated value without adjustment. psu.c:roundToDecimal() Test Closed
LLR_PSU_ROUNDTODECIMAL_04 HLR_PSU_329 WHEN rounding evaluation completes, the roundToDecimal() function SHALL return the rounded Float32 value (rounded). psu.c:roundToDecimal() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller roundToDecimal() [Low-Level Device Drivers] Target interDrv_Write32() / MMIO [Hardware Abstraction Layer] Caller:s->Target:n l_t0->l_b0   num (Flag) r_b0->r_t0   statusCode (Float32)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller roundToDecimal() [Low-Level Device Drivers] Target interDrv_Write32() / MMIO [Hardware Abstraction Layer] Caller:s->Target:n l_t0->l_b0   num (Payload) r_b0->r_t0   stateTelemetry (Internal State)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_roundToDecimal start Entry: roundToDecimal() guard_1 LLR_01: Guard Check Is (Int32)((num * 1000.0F) - (rounded * 1000.0F)) >= 5? start->guard_1 err_exit_1 LLR_01 Error Exit execute conditional operational branch guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is (Int32)((num * 1000.0F) - (rounded * 1000.0F)) <= -5? guard_1->guard_2 err_exit_2 LLR_02 Error Exit execute conditional operational branch guard_2->err_exit_2 YES (TRUE) act_3 LLR_03: Action Step execute operational data processing and state transformations guard_2->act_3 NO (FALSE) success_exit LLR_04: Final Exit return `the computed result` act_3->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_roundToDecimal in_store Input Data Sources & Parameters • num (const Float32) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: Int32 in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: Int32 proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Mutation & Processing • Transformed Entity: roundToDecimal proc_2->proc_3 Transformed Data (roundToDecimal) proc_4 LLR_04: Status Output Packaging • Format Return Payload: Float32 proc_3->proc_4 Final Output Data out_sink Output Data Sinks & Status Return • Status Payload (Float32) proc_4->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
roundToDecimal Node1 roundToDecimal Node1->Node1
Here is the caller graph for this function:
roundToDecimal Node1 roundToDecimal Node1->Node1 Node2 psu_getBoardTemp Node1->Node2 Node4 psu_getInputAmp Node1->Node4 Node6 psu_getInputVolt Node1->Node6 Node8 psu_getOutputRail12VAmp Node1->Node8 Node9 psu_getOutputRail12VTemp Node1->Node9 Node10 psu_getOutputRail12VVolt Node1->Node10 Node11 psu_getOutputRail3V3Amp Node1->Node11 Node12 psu_getOutputRail3V3AuxAmp Node1->Node12 Node13 psu_getOutputRail3V3AuxTemp Node1->Node13 Node14 psu_getOutputRail3V3AuxVolt Node1->Node14 Node15 psu_getOutputRail3V3Temp Node1->Node15 Node16 psu_getOutputRail3V3Volt Node1->Node16 Node17 psu_getOutputRail5VAmp Node1->Node17 Node18 psu_getOutputRail5VTemp Node1->Node18 Node19 psu_getOutputRail5VVolt Node1->Node19 Node20 psu_getOutputRailN12VAuxAmp Node1->Node20 Node21 psu_getOutputRailN12VAuxTemp Node1->Node21 Node22 psu_getOutputRailN12VAuxVolt Node1->Node22 Node23 psu_getOutputRailP12VAuxAmp Node1->Node23 Node24 psu_getOutputRailP12VAuxTemp Node1->Node24 Node25 psu_getOutputRailP12VAuxVolt Node1->Node25 Node26 psu_getPrimaryTransTemp Node1->Node26 Node2->Node2 Node3 modPsu_tempMonitor Node2->Node3 Node3->Node3 Node4->Node4 Node5 modPsu_currentMonitor Node4->Node5 Node5->Node5 Node6->Node6 Node7 modPsu_voltageMonitor Node6->Node7 Node7->Node7 Node8->Node5 Node8->Node8 Node9->Node3 Node9->Node9 Node10->Node7 Node10->Node10 Node11->Node5 Node11->Node11 Node12->Node5 Node12->Node12 Node13->Node3 Node13->Node13 Node14->Node7 Node14->Node14 Node15->Node3 Node15->Node15 Node16->Node7 Node16->Node16 Node17->Node5 Node17->Node17 Node18->Node3 Node18->Node18 Node19->Node7 Node19->Node19 Node20->Node5 Node20->Node20 Node21->Node3 Node21->Node21 Node22->Node7 Node22->Node22 Node23->Node5 Node23->Node23 Node24->Node3 Node24->Node24 Node25->Node7 Node25->Node25 Node26->Node3 Node26->Node26

◆ valueConversion()

DriverStatus valueConversion ( const SensorNumber sensorNumber,
const UInt8 xValue,
Float32 * valuePtr )
static

valueConversion.

Performs value conversion using the given parameters.

Parameters
[in]sensorNumberThe number of the sensor.
[in]xValueRaw value to be convert.
[out]valuePtrPointer to store the converted value.
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Success.
DRV_INVALID_PARAM: The provided address pointer is invalid.
DRV_INVALID_VALUE: The provided sensor number is invalid.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: valueConversion

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_VALUECONVERSION_01 HLR_PSU_329 WHEN the pointer valuePtr is NULL (invalid), the valueConversion() function SHALL abort processing and return DRV_INVALID_PARAM. psu.c:valueConversion() Test Closed
LLR_PSU_VALUECONVERSION_02 HLR_PSU_329 WHEN sensorNumber is not one of PSU_SENSOR_NUMBER_BOARD_TEMP through PSU_SENSOR_NUMBER_3V3_AUX_TEMP, the valueConversion() function SHALL abort processing and return DRV_INVALID_VALUE. psu.c:valueConversion() Test Closed
LLR_PSU_VALUECONVERSION_03 HLR_PSU_329 WHEN preconditions are satisfied, the valueConversion() function SHALL invoke transfer function formulaSensor() to evaluate physical sensor calibration curve. psu.c:valueConversion() Test Closed
LLR_PSU_VALUECONVERSION_04 HLR_PSU_329 WHEN all operational processing completes successfully, the valueConversion() function SHALL return DRV_SUCCESS. psu.c:valueConversion() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller valueConversion() [Low-Level Device Drivers] Target formulaSensor() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   sensorNumber (Flag) l_t1->l_b1   xValue (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller valueConversion() [Low-Level Device Drivers] Target formulaSensor() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   sensorNumber (Payload) l_t1->l_b1   xValue (Payload) r_b0->r_t0   *valuePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_valueConversion start Entry: valueConversion() guard_1 LLR_01: Guard Check Is the pointer `valuePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `sensorNumber` is not one of `PSU_SENSOR_NUMBER_BOARD_TEMP through PSU_SENSOR_NUMBER_3V3_AUX_TEMP`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `DRV_INVALID_VALUE` guard_2->err_exit_2 YES (TRUE) act_3 LLR_03: Action Step invoke transfer function `formulaSensor()` to evaluate physical sensor calibration curve guard_2->act_3 NO (FALSE) success_exit LLR_04: Final Exit return `DRV_SUCCESS` act_3->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_valueConversion in_store Input Data Sources & Parameters • sensorNumber (const SensorNumber) • xValue (const UInt8) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: valuePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: sensorNumber proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Payload Transformation • Process payload via formulaSensor() proc_2->proc_3 Data Payload (formulaSensor) proc_4 LLR_04: Status Output Packaging • Format Return Payload: DriverStatus proc_3->proc_4 Final Output Data out_sink Output Data Sinks & Status Return • valuePtr (Float32) proc_4->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
valueConversion Node1 valueConversion Node1->Node1 Node2 formulaSensor Node1->Node2 Node2->Node2
Here is the caller graph for this function:
valueConversion Node1 valueConversion Node1->Node1 Node2 psu_getBoardTemp Node1->Node2 Node4 psu_getInputAmp Node1->Node4 Node6 psu_getInputVolt Node1->Node6 Node8 psu_getOutputRail12VAmp Node1->Node8 Node9 psu_getOutputRail12VTemp Node1->Node9 Node10 psu_getOutputRail12VVolt Node1->Node10 Node11 psu_getOutputRail3V3Amp Node1->Node11 Node12 psu_getOutputRail3V3AuxAmp Node1->Node12 Node13 psu_getOutputRail3V3AuxTemp Node1->Node13 Node14 psu_getOutputRail3V3AuxVolt Node1->Node14 Node15 psu_getOutputRail3V3Temp Node1->Node15 Node16 psu_getOutputRail3V3Volt Node1->Node16 Node17 psu_getOutputRail5VAmp Node1->Node17 Node18 psu_getOutputRail5VTemp Node1->Node18 Node19 psu_getOutputRail5VVolt Node1->Node19 Node20 psu_getOutputRailN12VAuxAmp Node1->Node20 Node21 psu_getOutputRailN12VAuxTemp Node1->Node21 Node22 psu_getOutputRailN12VAuxVolt Node1->Node22 Node23 psu_getOutputRailP12VAuxAmp Node1->Node23 Node24 psu_getOutputRailP12VAuxTemp Node1->Node24 Node25 psu_getOutputRailP12VAuxVolt Node1->Node25 Node26 psu_getPrimaryTransTemp Node1->Node26 Node2->Node2 Node3 modPsu_tempMonitor Node2->Node3 Node3->Node3 Node4->Node4 Node5 modPsu_currentMonitor Node4->Node5 Node5->Node5 Node6->Node6 Node7 modPsu_voltageMonitor Node6->Node7 Node7->Node7 Node8->Node5 Node8->Node8 Node9->Node3 Node9->Node9 Node10->Node7 Node10->Node10 Node11->Node5 Node11->Node11 Node12->Node5 Node12->Node12 Node13->Node3 Node13->Node13 Node14->Node7 Node14->Node14 Node15->Node3 Node15->Node15 Node16->Node7 Node16->Node16 Node17->Node5 Node17->Node17 Node18->Node3 Node18->Node18 Node19->Node7 Node19->Node19 Node20->Node5 Node20->Node20 Node21->Node3 Node21->Node21 Node22->Node7 Node22->Node22 Node23->Node5 Node23->Node23 Node24->Node3 Node24->Node24 Node25->Node7 Node25->Node25 Node26->Node3 Node26->Node26