HFCC-01 Low-Level Software (LLSW) Rel_6802_HFCC-01-RP-CSAR-CB
Loading...
Searching...
No Matches
modPsu.h File Reference
#include "modStatus.h"
#include "commonDataTypes.h"
Include dependency graph for modPsu.h:
modPsu.h Node1 modPsu.h Node2 modStatus.h Node1->Node2 Node3 commonDataTypes.h Node1->Node3
This graph shows which files directly or indirectly include this file:
modPsu.h Node1 modPsu.h Node2 deviceLibModule.h Node1->Node2 Node3 modPsu.c Node1->Node3

Go to the source code of this file.

Enumerations

enum  PSUVoltageType {
  INPUT_VOLT , OUTPUT_12VVOLT , OUTPUT_3V3VOLT , OUTPUT_5VVOLT ,
  OUTPUT_N12VVOLT_AUX , OUTPUT_P12VVOLT_AUX , OUTPUT_3V3VOLT_AUX , TOTAL_VOLTAGE_TYPE
}
 This is enum definition for PSU voltage type. More...
enum  PSUCurrentType {
  INPUT_AMP , OUTPUT_12VAMP , OUTPUT_3V3AMP , OUTPUT_5VAMP ,
  OUTPUT_N12VAMP_AUX , OUTPUT_P12VAMP_AUX , OUTPUT_3V3AMP_AUX , TOTAL_CURRENT_TYPE
}
 This is enum definition for PSU current type. More...
enum  PSUTemperatureType {
  BOARD_TEMP , OUTPUT_12V_TEMP , OUTPUT_3V3_TEMP , OUTPUT_5V_TEMP ,
  OUTPUT_N12V_AUX_TEMP , OUTPUT_P12V_AUX_TEMP , OUTPUT_3V3_AUX_TEMP , PRIM_TRANS_TEMP ,
  TOTAL_TEMPERATURE_TYPE
}
 This is enum definition for PSU temperature type. More...

Functions

ModStatus modPsu_voltageMonitor (Float32 *psuVoltagePtr, const PSUVoltageType psuVoltageType)
 modPsu_voltageMonitor.
ModStatus modPsu_currentMonitor (Float32 *psuCurrentPtr, const PSUCurrentType psuCurrentType)
 modPsu_currentMonitor.
ModStatus modPsu_tempMonitor (Float32 *psuTempPtr, const PSUTemperatureType psuTempType)
 modPsu_tempMonitor.

Detailed Description

Enumeration Type Documentation

◆ PSUCurrentType

This is enum definition for PSU current type.

Enumerator
INPUT_AMP 

PSU input current type.

OUTPUT_12VAMP 

PSU output rail 12V current type.

OUTPUT_3V3AMP 

PSU output rail 3.3V current type.

OUTPUT_5VAMP 

PSU output rail 5V current type.

OUTPUT_N12VAMP_AUX 

PSU output rail -12V AUX current type.

OUTPUT_P12VAMP_AUX 

PSU output rail +12V AUX current type.

OUTPUT_3V3AMP_AUX 

PSU output rail 3.3V AUX current type.

TOTAL_CURRENT_TYPE 

PSU total current type.

◆ PSUTemperatureType

This is enum definition for PSU temperature type.

Enumerator
BOARD_TEMP 

PSU board temperature type.

OUTPUT_12V_TEMP 

PSU output rail 12V board temperature type.

OUTPUT_3V3_TEMP 

PSU output rail 3.3V board temperature type.

OUTPUT_5V_TEMP 

PSU output rail 5V board temperature type.

OUTPUT_N12V_AUX_TEMP 

PSU output rail -12V AUX board temperature type.

OUTPUT_P12V_AUX_TEMP 

PSU output rail +12V AUX board temperature type.

OUTPUT_3V3_AUX_TEMP 

PSU output rail 3.3V AUX board temperature type.

PRIM_TRANS_TEMP 

PSU primary transformer temperature type.

TOTAL_TEMPERATURE_TYPE 

PSU total temperature type.

◆ PSUVoltageType

This is enum definition for PSU voltage type.

Enumerator
INPUT_VOLT 

PSU input voltage type.

OUTPUT_12VVOLT 

PSU output rail 12V voltage type.

OUTPUT_3V3VOLT 

PSU output rail 3.3V voltage type.

OUTPUT_5VVOLT 

PSU output rail 5V voltage type.

OUTPUT_N12VVOLT_AUX 

PSU output rail -12V AUX voltage type.

OUTPUT_P12VVOLT_AUX 

PSU output rail +12V AUX voltage type.

OUTPUT_3V3VOLT_AUX 

PSU output rail 3.3V AUX voltage type.

TOTAL_VOLTAGE_TYPE 

PSU total voltage type.

Function Documentation

◆ modPsu_currentMonitor()

ModStatus modPsu_currentMonitor ( Float32 * psuCurrentPtr,
const PSUCurrentType psuCurrentType )

modPsu_currentMonitor.

Get Current Monitor on PSU power input and output rail.

Parameters
[out]psuCurrentPtrCurrent reading of PSU in Ampere (A).
[in]psuCurrentTypePSU current type.
Returns
ModStatus - Module status return code, If no error occurs during the operation of the function, it returns MD_SUCCESS. Otherwise related error message is returned.
Return values
MD_SUCCESS: Success.
MD_INVALID_PARAM: The provided address pointer is invalid.
MD_INVALID_VALUE: The current type is out of range.
MD_INVALID_INIT: The module has not been initialized.
MD_READ_ERR: Failed to read from the module.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: modPsu_currentMonitor

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_MODPSU_CURRENTMONITOR_01 HLR_PSU_19912 WHEN the pointer psuCurrentPtr is NULL (invalid), the modPsu_currentMonitor() function SHALL abort processing and return MD_INVALID_PARAM. modPsu.c:modPsu_currentMonitor() Test Closed
LLR_PSU_MODPSU_CURRENTMONITOR_02 HLR_PSU_19912 WHEN the module initialization state is not initialized (INIT), the modPsu_currentMonitor() function SHALL abort processing and return MD_INVALID_INIT. modPsu.c:modPsu_currentMonitor() Test Closed
LLR_PSU_MODPSU_CURRENTMONITOR_03 HLR_PSU_19912 WHEN a driver operation reports a failure status other than DRV_SUCCESS, the modPsu_currentMonitor() function SHALL abort processing and return the module error code produced by errCheck() for the reported driver status. modPsu.c:modPsu_currentMonitor() Test Closed
LLR_PSU_MODPSU_CURRENTMONITOR_04 HLR_PSU_19912 WHEN psuCurrentType is not one of INPUT_AMP through OUTPUT_3V3AMP_AUX, the modPsu_currentMonitor() function SHALL abort processing and return MD_INVALID_VALUE. modPsu.c:modPsu_currentMonitor() Test Closed
LLR_PSU_MODPSU_CURRENTMONITOR_05 HLR_PSU_19912 WHEN preconditions are satisfied, the modPsu_currentMonitor() function SHALL invoke routine psu_getInputAmp() to execute target subsystem hardware operation. modPsu.c:modPsu_currentMonitor() Test Closed
LLR_PSU_MODPSU_CURRENTMONITOR_06 HLR_PSU_19912 WHEN preconditions are satisfied, the modPsu_currentMonitor() function SHALL invoke routine psu_getOutputRail12VAmp() to execute target subsystem hardware operation. modPsu.c:modPsu_currentMonitor() Test Closed
LLR_PSU_MODPSU_CURRENTMONITOR_07 HLR_PSU_19912 WHEN preconditions are satisfied, the modPsu_currentMonitor() function SHALL invoke routine psu_getOutputRail3V3Amp() to execute target subsystem hardware operation. modPsu.c:modPsu_currentMonitor() Test Closed
LLR_PSU_MODPSU_CURRENTMONITOR_08 HLR_PSU_19912 WHEN preconditions are satisfied, the modPsu_currentMonitor() function SHALL invoke routine psu_getOutputRail5VAmp() to execute target subsystem hardware operation. modPsu.c:modPsu_currentMonitor() Test Closed
LLR_PSU_MODPSU_CURRENTMONITOR_09 HLR_PSU_19912 WHEN preconditions are satisfied, the modPsu_currentMonitor() function SHALL invoke routine psu_getOutputRailN12VAuxAmp() to execute target subsystem hardware operation. modPsu.c:modPsu_currentMonitor() Test Closed
LLR_PSU_MODPSU_CURRENTMONITOR_10 HLR_PSU_19912 WHEN all operational processing completes successfully, the modPsu_currentMonitor() function SHALL return MD_SUCCESS. modPsu.c:modPsu_currentMonitor() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller modPsu_currentMonitor() [Device Library Modules] Target psu_getInputAmp() [Subordinate Routine] Caller:s->Target:n l_t0->l_b0   psuCurrentType (Flag) r_b0->r_t0   statusCode (ModStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller modPsu_currentMonitor() [Device Library Modules] Target psu_getInputAmp() [Subordinate Routine] Caller:s->Target:n l_t0->l_b0   psuCurrentType (Payload) r_b0->r_t0   *psuCurrentPtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_modPsu_currentMonitor start Entry: modPsu_currentMonitor() guard_1 LLR_01: Guard Check Is the pointer `psuCurrentPtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `MD_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is the module initialization state is not initialized (INIT)? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `MD_INVALID_INIT` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is a driver operation reports a failure status other than DRV_SUCCESS? guard_2->guard_3 err_exit_3 LLR_03 Error Exit abort processing and return the module error code produced by errCheck(retStatus) guard_3->err_exit_3 YES (TRUE) guard_4 LLR_04: Guard Check Is `psuCurrentType` is not one of `INPUT_AMP through OUTPUT_3V3AMP_AUX`? guard_3->guard_4 err_exit_4 LLR_04 Error Exit abort processing and return `MD_INVALID_VALUE` guard_4->err_exit_4 YES (TRUE) act_5 LLR_05: Action Step invoke routine `psu_getInputAmp()` to execute target subsystem hardware operation guard_4->act_5 NO (FALSE) act_6 LLR_06: Action Step invoke routine `psu_getOutputRail12VAmp()` to execute target subsystem hardware operation act_5->act_6 act_7 LLR_07: Action Step invoke routine `psu_getOutputRail3V3Amp()` to execute target subsystem hardware operation act_6->act_7 act_8 LLR_08: Action Step invoke routine `psu_getOutputRail5VAmp()` to execute target subsystem hardware operation act_7->act_8 act_9 LLR_09: Action Step invoke routine `psu_getOutputRailN12VAuxAmp()` to execute target subsystem hardware operation act_8->act_9 success_exit LLR_10: Final Exit return `MD_SUCCESS` act_9->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_modPsu_currentMonitor in_store Input Data Sources & Parameters • psuCurrentType (const PSUCurrentType) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: psuCurrentPtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: psuModHdl proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: retStatus proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Validation Check • Evaluate Parameter / State: psuCurrentType proc_3->proc_4 Validated Input Data proc_5 LLR_05: Data Payload Transformation • Process payload via psu_getInputAmp() proc_4->proc_5 Data Payload (psu_getInputAmp) proc_6 LLR_06: Data Payload Transformation • Process payload via psu_getOutputRail12VAmp() proc_5->proc_6 Data Payload (psu_getOutputRail12VAmp) proc_7 LLR_07: Data Payload Transformation • Process payload via psu_getOutputRail3V3Amp() proc_6->proc_7 Data Payload (psu_getOutputRail3V3Amp) proc_8 LLR_08: Data Payload Transformation • Process payload via psu_getOutputRail5VAmp() proc_7->proc_8 Data Payload (psu_getOutputRail5VAmp) proc_9 LLR_09: Data Payload Transformation • Process payload via psu_getOutputRailN12VAuxAmp() proc_8->proc_9 Data Payload (psu_getOutputRailN12VAuxAmp) proc_10 LLR_10: Status Output Packaging • Format Return Payload: ModStatus proc_9->proc_10 Final Output Data out_sink Output Data Sinks & Status Return • psuCurrentPtr (Float32) proc_10->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
modPsu_currentMonitor Node1 modPsu_currentMonitor Node1->Node1 Node2 errCheck Node1->Node2 Node3 psu_getInputAmp Node1->Node3 Node11 psu_getOutputRail12VAmp Node1->Node11 Node12 psu_getOutputRail3V3Amp Node1->Node12 Node13 psu_getOutputRail3V3AuxAmp Node1->Node13 Node14 psu_getOutputRail5VAmp Node1->Node14 Node15 psu_getOutputRailN12VAuxAmp Node1->Node15 Node16 psu_getOutputRailP12VAuxAmp Node1->Node16 Node2->Node2 Node3->Node3 Node4 readPsuReg Node3->Node4 Node8 roundToDecimal Node3->Node8 Node9 valueConversion Node3->Node9 Node4->Node4 Node5 interDrv_Read32 Node4->Node5 Node5->Node5 Node6 interDrv_isAddressValid Node5->Node6 Node7 memoryMap_Read32 Node5->Node7 Node6->Node6 Node7->Node7 Node8->Node8 Node9->Node9 Node10 formulaSensor Node9->Node10 Node10->Node10 Node11->Node4 Node11->Node8 Node11->Node9 Node11->Node11 Node12->Node4 Node12->Node8 Node12->Node9 Node12->Node12 Node13->Node4 Node13->Node8 Node13->Node9 Node13->Node13 Node14->Node4 Node14->Node8 Node14->Node9 Node14->Node14 Node15->Node4 Node15->Node8 Node15->Node9 Node15->Node15 Node16->Node4 Node16->Node8 Node16->Node9 Node16->Node16
Here is the caller graph for this function:
modPsu_currentMonitor Node1 modPsu_currentMonitor Node1->Node1

◆ modPsu_tempMonitor()

ModStatus modPsu_tempMonitor ( Float32 * psuTempPtr,
const PSUTemperatureType psuTempType )

modPsu_tempMonitor.

Get Temperature Monitor on PSU power input and output rail.

Parameters
[out]psuTempPtrTemperature reading of PSU in degree Celsius (C).
[in]psuTempTypePSU temperature type.
Returns
ModStatus - Module status return code, If no error occurs during the operation of the function, it returns MD_SUCCESS. Otherwise related error message is returned.
Return values
MD_SUCCESS: Success.
MD_INVALID_PARAM: The provided address pointer is invalid.
MD_INVALID_VALUE: The temperature type is out of range.
MD_INVALID_INIT: The module has not been initialized.
MD_READ_ERR: Failed to read from the module.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: modPsu_tempMonitor

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_MODPSU_TEMPMONITOR_01 HLR_PSU_19913 WHEN the pointer psuTempPtr is NULL (invalid), the modPsu_tempMonitor() function SHALL abort processing and return MD_INVALID_PARAM. modPsu.c:modPsu_tempMonitor() Test Closed
LLR_PSU_MODPSU_TEMPMONITOR_02 HLR_PSU_19913 WHEN the module initialization state is not initialized (INIT), the modPsu_tempMonitor() function SHALL abort processing and return MD_INVALID_INIT. modPsu.c:modPsu_tempMonitor() Test Closed
LLR_PSU_MODPSU_TEMPMONITOR_03 HLR_PSU_19913 WHEN a driver operation reports a failure status other than DRV_SUCCESS, the modPsu_tempMonitor() function SHALL abort processing and return the module error code produced by errCheck() for the reported driver status. modPsu.c:modPsu_tempMonitor() Test Closed
LLR_PSU_MODPSU_TEMPMONITOR_04 HLR_PSU_19913 WHEN psuTempType is not one of BOARD_TEMP through PRIM_TRANS_TEMP, the modPsu_tempMonitor() function SHALL abort processing and return MD_INVALID_VALUE. modPsu.c:modPsu_tempMonitor() Test Closed
LLR_PSU_MODPSU_TEMPMONITOR_05 HLR_PSU_19913 WHEN preconditions are satisfied, the modPsu_tempMonitor() function SHALL invoke routine psu_getBoardTemp() to execute target subsystem hardware operation. modPsu.c:modPsu_tempMonitor() Test Closed
LLR_PSU_MODPSU_TEMPMONITOR_06 HLR_PSU_19913 WHEN preconditions are satisfied, the modPsu_tempMonitor() function SHALL invoke routine psu_getOutputRail12VTemp() to execute target subsystem hardware operation. modPsu.c:modPsu_tempMonitor() Test Closed
LLR_PSU_MODPSU_TEMPMONITOR_07 HLR_PSU_19913 WHEN preconditions are satisfied, the modPsu_tempMonitor() function SHALL invoke routine psu_getOutputRail3V3Temp() to execute target subsystem hardware operation. modPsu.c:modPsu_tempMonitor() Test Closed
LLR_PSU_MODPSU_TEMPMONITOR_08 HLR_PSU_19913 WHEN preconditions are satisfied, the modPsu_tempMonitor() function SHALL invoke routine psu_getOutputRail5VTemp() to execute target subsystem hardware operation. modPsu.c:modPsu_tempMonitor() Test Closed
LLR_PSU_MODPSU_TEMPMONITOR_09 HLR_PSU_19913 WHEN preconditions are satisfied, the modPsu_tempMonitor() function SHALL invoke routine psu_getOutputRailN12VAuxTemp() to execute target subsystem hardware operation. modPsu.c:modPsu_tempMonitor() Test Closed
LLR_PSU_MODPSU_TEMPMONITOR_10 HLR_PSU_19913 WHEN all operational processing completes successfully, the modPsu_tempMonitor() function SHALL return MD_SUCCESS. modPsu.c:modPsu_tempMonitor() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller modPsu_tempMonitor() [Device Library Modules] Target psu_getBoardTemp() [Subordinate Routine] Caller:s->Target:n l_t0->l_b0   psuTempType (Flag) r_b0->r_t0   statusCode (ModStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller modPsu_tempMonitor() [Device Library Modules] Target psu_getBoardTemp() [Subordinate Routine] Caller:s->Target:n l_t0->l_b0   psuTempType (Payload) r_b0->r_t0   *psuTempPtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_modPsu_tempMonitor start Entry: modPsu_tempMonitor() guard_1 LLR_01: Guard Check Is the pointer `psuTempPtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `MD_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is the module initialization state is not initialized (INIT)? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `MD_INVALID_INIT` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is a driver operation reports a failure status other than DRV_SUCCESS? guard_2->guard_3 err_exit_3 LLR_03 Error Exit abort processing and return the module error code produced by errCheck(retStatus) guard_3->err_exit_3 YES (TRUE) guard_4 LLR_04: Guard Check Is `psuTempType` is not one of `BOARD_TEMP through PRIM_TRANS_TEMP`? guard_3->guard_4 err_exit_4 LLR_04 Error Exit abort processing and return `MD_INVALID_VALUE` guard_4->err_exit_4 YES (TRUE) act_5 LLR_05: Action Step invoke routine `psu_getBoardTemp()` to execute target subsystem hardware operation guard_4->act_5 NO (FALSE) act_6 LLR_06: Action Step invoke routine `psu_getOutputRail12VTemp()` to execute target subsystem hardware operation act_5->act_6 act_7 LLR_07: Action Step invoke routine `psu_getOutputRail3V3Temp()` to execute target subsystem hardware operation act_6->act_7 act_8 LLR_08: Action Step invoke routine `psu_getOutputRail5VTemp()` to execute target subsystem hardware operation act_7->act_8 act_9 LLR_09: Action Step invoke routine `psu_getOutputRailN12VAuxTemp()` to execute target subsystem hardware operation act_8->act_9 success_exit LLR_10: Final Exit return `MD_SUCCESS` act_9->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_modPsu_tempMonitor in_store Input Data Sources & Parameters • psuTempType (const PSUTemperatureType) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: psuTempPtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: psuModHdl proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: retStatus proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Validation Check • Evaluate Parameter / State: psuTempType proc_3->proc_4 Validated Input Data proc_5 LLR_05: Data Payload Transformation • Process payload via psu_getBoardTemp() proc_4->proc_5 Data Payload (psu_getBoardTemp) proc_6 LLR_06: Data Payload Transformation • Process payload via psu_getOutputRail12VTemp() proc_5->proc_6 Data Payload (psu_getOutputRail12VTemp) proc_7 LLR_07: Data Payload Transformation • Process payload via psu_getOutputRail3V3Temp() proc_6->proc_7 Data Payload (psu_getOutputRail3V3Temp) proc_8 LLR_08: Data Payload Transformation • Process payload via psu_getOutputRail5VTemp() proc_7->proc_8 Data Payload (psu_getOutputRail5VTemp) proc_9 LLR_09: Data Payload Transformation • Process payload via psu_getOutputRailN12VAuxTemp() proc_8->proc_9 Data Payload (psu_getOutputRailN12VAuxTemp) proc_10 LLR_10: Status Output Packaging • Format Return Payload: ModStatus proc_9->proc_10 Final Output Data out_sink Output Data Sinks & Status Return • psuTempPtr (Float32) proc_10->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
modPsu_tempMonitor Node1 modPsu_tempMonitor Node1->Node1 Node2 errCheck Node1->Node2 Node3 psu_getBoardTemp Node1->Node3 Node11 psu_getOutputRail12VTemp Node1->Node11 Node12 psu_getOutputRail3V3AuxTemp Node1->Node12 Node13 psu_getOutputRail3V3Temp Node1->Node13 Node14 psu_getOutputRail5VTemp Node1->Node14 Node15 psu_getOutputRailN12VAuxTemp Node1->Node15 Node16 psu_getOutputRailP12VAuxTemp Node1->Node16 Node17 psu_getPrimaryTransTemp Node1->Node17 Node2->Node2 Node3->Node3 Node4 readPsuReg Node3->Node4 Node8 roundToDecimal Node3->Node8 Node9 valueConversion Node3->Node9 Node4->Node4 Node5 interDrv_Read32 Node4->Node5 Node5->Node5 Node6 interDrv_isAddressValid Node5->Node6 Node7 memoryMap_Read32 Node5->Node7 Node6->Node6 Node7->Node7 Node8->Node8 Node9->Node9 Node10 formulaSensor Node9->Node10 Node10->Node10 Node11->Node4 Node11->Node8 Node11->Node9 Node11->Node11 Node12->Node4 Node12->Node8 Node12->Node9 Node12->Node12 Node13->Node4 Node13->Node8 Node13->Node9 Node13->Node13 Node14->Node4 Node14->Node8 Node14->Node9 Node14->Node14 Node15->Node4 Node15->Node8 Node15->Node9 Node15->Node15 Node16->Node4 Node16->Node8 Node16->Node9 Node16->Node16 Node17->Node4 Node17->Node8 Node17->Node9 Node17->Node17
Here is the caller graph for this function:
modPsu_tempMonitor Node1 modPsu_tempMonitor Node1->Node1

◆ modPsu_voltageMonitor()

ModStatus modPsu_voltageMonitor ( Float32 * psuVoltagePtr,
const PSUVoltageType psuVoltageType )

modPsu_voltageMonitor.

Get Voltage Monitor on PSU power input and output rail.

Parameters
[out]psuVoltagePtrVoltage reading of PSU in Volt (V).
[in]psuVoltageTypePSU voltage type.
Returns
ModStatus - Module status return code, If no error occurs during the operation of the function, it returns MD_SUCCESS. Otherwise related error message is returned.
Return values
MD_SUCCESS: Success.
MD_INVALID_PARAM: The provided address pointer is invalid.
MD_INVALID_VALUE: The voltage type is out of range.
MD_INVALID_INIT: The module has not been initialized.
MD_READ_ERR: Failed to read from the module.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: modPsu_voltageMonitor

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_PSU_MODPSU_VOLTAGEMONITOR_01 HLR_PSU_329 WHEN the pointer psuVoltagePtr is NULL (invalid), the modPsu_voltageMonitor() function SHALL abort processing and return MD_INVALID_PARAM. modPsu.c:modPsu_voltageMonitor() Test Closed
LLR_PSU_MODPSU_VOLTAGEMONITOR_02 HLR_PSU_329 WHEN the module initialization state is not initialized (INIT), the modPsu_voltageMonitor() function SHALL abort processing and return MD_INVALID_INIT. modPsu.c:modPsu_voltageMonitor() Test Closed
LLR_PSU_MODPSU_VOLTAGEMONITOR_03 HLR_PSU_329 WHEN a driver operation reports a failure status other than DRV_SUCCESS, the modPsu_voltageMonitor() function SHALL abort processing and return the module error code produced by errCheck() for the reported driver status. modPsu.c:modPsu_voltageMonitor() Test Closed
LLR_PSU_MODPSU_VOLTAGEMONITOR_04 HLR_PSU_329 WHEN psuVoltageType is not one of INPUT_VOLT through OUTPUT_3V3VOLT_AUX, the modPsu_voltageMonitor() function SHALL abort processing and return MD_INVALID_VALUE. modPsu.c:modPsu_voltageMonitor() Test Closed
LLR_PSU_MODPSU_VOLTAGEMONITOR_05 HLR_PSU_329 WHEN preconditions are satisfied, the modPsu_voltageMonitor() function SHALL invoke routine psu_getInputVolt() to execute target subsystem hardware operation. modPsu.c:modPsu_voltageMonitor() Test Closed
LLR_PSU_MODPSU_VOLTAGEMONITOR_06 HLR_PSU_329 WHEN preconditions are satisfied, the modPsu_voltageMonitor() function SHALL invoke routine psu_getOutputRail12VVolt() to execute target subsystem hardware operation. modPsu.c:modPsu_voltageMonitor() Test Closed
LLR_PSU_MODPSU_VOLTAGEMONITOR_07 HLR_PSU_329 WHEN preconditions are satisfied, the modPsu_voltageMonitor() function SHALL invoke routine psu_getOutputRail3V3Volt() to execute target subsystem hardware operation. modPsu.c:modPsu_voltageMonitor() Test Closed
LLR_PSU_MODPSU_VOLTAGEMONITOR_08 HLR_PSU_329 WHEN preconditions are satisfied, the modPsu_voltageMonitor() function SHALL invoke routine psu_getOutputRail5VVolt() to execute target subsystem hardware operation. modPsu.c:modPsu_voltageMonitor() Test Closed
LLR_PSU_MODPSU_VOLTAGEMONITOR_09 HLR_PSU_329 WHEN preconditions are satisfied, the modPsu_voltageMonitor() function SHALL invoke routine psu_getOutputRailN12VAuxVolt() to execute target subsystem hardware operation. modPsu.c:modPsu_voltageMonitor() Test Closed
LLR_PSU_MODPSU_VOLTAGEMONITOR_10 HLR_PSU_329 WHEN all operational processing completes successfully, the modPsu_voltageMonitor() function SHALL return MD_SUCCESS. modPsu.c:modPsu_voltageMonitor() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller modPsu_voltageMonitor() [Device Library Modules] Target psu_getInputVolt() [Subordinate Routine] Caller:s->Target:n l_t0->l_b0   psuVoltageType (Flag) r_b0->r_t0   statusCode (ModStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller modPsu_voltageMonitor() [Device Library Modules] Target psu_getInputVolt() [Subordinate Routine] Caller:s->Target:n l_t0->l_b0   psuVoltageType (Payload) r_b0->r_t0   *psuVoltagePtr (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_modPsu_voltageMonitor start Entry: modPsu_voltageMonitor() guard_1 LLR_01: Guard Check Is the pointer `psuVoltagePtr` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `MD_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is the module initialization state is not initialized (INIT)? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `MD_INVALID_INIT` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is a driver operation reports a failure status other than DRV_SUCCESS? guard_2->guard_3 err_exit_3 LLR_03 Error Exit abort processing and return the module error code produced by errCheck(retStatus) guard_3->err_exit_3 YES (TRUE) guard_4 LLR_04: Guard Check Is `psuVoltageType` is not one of `INPUT_VOLT through OUTPUT_3V3VOLT_AUX`? guard_3->guard_4 err_exit_4 LLR_04 Error Exit abort processing and return `MD_INVALID_VALUE` guard_4->err_exit_4 YES (TRUE) act_5 LLR_05: Action Step invoke routine `psu_getInputVolt()` to execute target subsystem hardware operation guard_4->act_5 NO (FALSE) act_6 LLR_06: Action Step invoke routine `psu_getOutputRail12VVolt()` to execute target subsystem hardware operation act_5->act_6 act_7 LLR_07: Action Step invoke routine `psu_getOutputRail3V3Volt()` to execute target subsystem hardware operation act_6->act_7 act_8 LLR_08: Action Step invoke routine `psu_getOutputRail5VVolt()` to execute target subsystem hardware operation act_7->act_8 act_9 LLR_09: Action Step invoke routine `psu_getOutputRailN12VAuxVolt()` to execute target subsystem hardware operation act_8->act_9 success_exit LLR_10: Final Exit return `MD_SUCCESS` act_9->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_modPsu_voltageMonitor in_store Input Data Sources & Parameters • psuVoltageType (const PSUVoltageType) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: psuVoltagePtr in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: psuModHdl proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: retStatus proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Validation Check • Evaluate Parameter / State: psuVoltageType proc_3->proc_4 Validated Input Data proc_5 LLR_05: Data Payload Transformation • Process payload via psu_getInputVolt() proc_4->proc_5 Data Payload (psu_getInputVolt) proc_6 LLR_06: Data Payload Transformation • Process payload via psu_getOutputRail12VVolt() proc_5->proc_6 Data Payload (psu_getOutputRail12VVolt) proc_7 LLR_07: Data Payload Transformation • Process payload via psu_getOutputRail3V3Volt() proc_6->proc_7 Data Payload (psu_getOutputRail3V3Volt) proc_8 LLR_08: Data Payload Transformation • Process payload via psu_getOutputRail5VVolt() proc_7->proc_8 Data Payload (psu_getOutputRail5VVolt) proc_9 LLR_09: Data Payload Transformation • Process payload via psu_getOutputRailN12VAuxVolt() proc_8->proc_9 Data Payload (psu_getOutputRailN12VAuxVolt) proc_10 LLR_10: Status Output Packaging • Format Return Payload: ModStatus proc_9->proc_10 Final Output Data out_sink Output Data Sinks & Status Return • psuVoltagePtr (Float32) proc_10->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
modPsu_voltageMonitor Node1 modPsu_voltageMonitor Node1->Node1 Node2 errCheck Node1->Node2 Node3 psu_getInputVolt Node1->Node3 Node11 psu_getOutputRail12VVolt Node1->Node11 Node12 psu_getOutputRail3V3AuxVolt Node1->Node12 Node13 psu_getOutputRail3V3Volt Node1->Node13 Node14 psu_getOutputRail5VVolt Node1->Node14 Node15 psu_getOutputRailN12VAuxVolt Node1->Node15 Node16 psu_getOutputRailP12VAuxVolt Node1->Node16 Node2->Node2 Node3->Node3 Node4 readPsuReg Node3->Node4 Node8 roundToDecimal Node3->Node8 Node9 valueConversion Node3->Node9 Node4->Node4 Node5 interDrv_Read32 Node4->Node5 Node5->Node5 Node6 interDrv_isAddressValid Node5->Node6 Node7 memoryMap_Read32 Node5->Node7 Node6->Node6 Node7->Node7 Node8->Node8 Node9->Node9 Node10 formulaSensor Node9->Node10 Node10->Node10 Node11->Node4 Node11->Node8 Node11->Node9 Node11->Node11 Node12->Node4 Node12->Node8 Node12->Node9 Node12->Node12 Node13->Node4 Node13->Node8 Node13->Node9 Node13->Node13 Node14->Node4 Node14->Node8 Node14->Node9 Node14->Node14 Node15->Node4 Node15->Node8 Node15->Node9 Node15->Node15 Node16->Node4 Node16->Node8 Node16->Node9 Node16->Node16
Here is the caller graph for this function:
modPsu_voltageMonitor Node1 modPsu_voltageMonitor Node1->Node1