HFCC-01 Low-Level Software (LLSW) Rel_6802_HFCC-01-RP-CSAR-CB
Loading...
Searching...
No Matches
modStatus.c File Reference
#include "modStatus.h"
#include "driverStatus.h"
Include dependency graph for modStatus.c:
modStatus.c Node1 modStatus.c Node2 modStatus.h Node1->Node2 Node3 driverStatus.h Node1->Node3

Functions

ModStatus errCheck (const DriverStatus status)
 errCheck.

Detailed Description

Function Documentation

◆ errCheck()

ModStatus errCheck ( const DriverStatus status)

errCheck.

Check the driver status and convert it to the module status.

Parameters
[in]statusStatus from driver.
Returns
ModStatus - Module status return code. If no error occurs during the operation of the function, it returns MD_SUCCESS. Otherwise, a related error message is returned.
Return values
MD_SUCCESS: The module operation is successful.
MD_INVALID_ADDRESS: The module base memory address is not valid.
MD_INVALID_CHANNEL: The passing argument for channel number is not valid.
MD_READ_ERR: The module is unable to read from a certain register.
MD_WRITE_ERR: The module is unable to write to a certain register.
MD_FIFO_EMPTY: The module FIFO is empty.
MD_FIFO_FULL: The module FIFO is full.
MD_INVALID_PARAM: The provided address pointer is invalid.
MD_INVALID_VALUE: The passing argument is invalid or not within range.
MD_INVALID_CONFIG: The module is not yet configured.
MD_INVALID_INIT: The module is not initialized.
MD_OP_ALREADY_PERFORMED: The module operation has already been performed.
MD_OPEN_FAILED: The module is unable to open.
MD_FAILED: The module operation has failed.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: errCheck

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_STATUS_ERRCHECK_01 HLR_HM_79450 WHEN the driver status parameter is equal to DRV_SUCCESS, the errCheck() function SHALL return MD_SUCCESS. modStatus.c:errCheck() Test Closed
LLR_STATUS_ERRCHECK_02 HLR_HM_79450 WHEN the driver status parameter is equal to DRV_INVALID_ADDRESS, the errCheck() function SHALL return MD_INVALID_ADDRESS. modStatus.c:errCheck() Test Closed
LLR_STATUS_ERRCHECK_03 HLR_HM_79450 WHEN the driver status parameter is equal to DRV_INVALID_CHANNEL, the errCheck() function SHALL return MD_INVALID_CHANNEL. modStatus.c:errCheck() Test Closed
LLR_STATUS_ERRCHECK_04 HLR_HM_79450 WHEN the driver status parameter is equal to DRV_INVALID_DEVICE, the errCheck() function SHALL return MD_INVALID_DEVICE. modStatus.c:errCheck() Test Closed
LLR_STATUS_ERRCHECK_05 HLR_HM_79450 WHEN the driver status parameter is equal to DRV_READ_FAILED, the errCheck() function SHALL return MD_READ_ERR. modStatus.c:errCheck() Test Closed
LLR_STATUS_ERRCHECK_06 HLR_HM_79450 WHEN the driver status parameter is equal to DRV_WRITE_FAILED, the errCheck() function SHALL return MD_WRITE_ERR. modStatus.c:errCheck() Test Closed
LLR_STATUS_ERRCHECK_07 HLR_HM_79450 WHEN the driver status parameter is equal to DRV_FIFO_EMPTY, the errCheck() function SHALL return MD_FIFO_EMPTY. modStatus.c:errCheck() Test Closed
LLR_STATUS_ERRCHECK_08 HLR_HM_79450 WHEN the driver status parameter is equal to DRV_FIFO_FULL, the errCheck() function SHALL return MD_FIFO_FULL. modStatus.c:errCheck() Test Closed
LLR_STATUS_ERRCHECK_09 HLR_HM_79450 WHEN the driver status parameter is equal to DRV_INVALID_PARAM, the errCheck() function SHALL return MD_INVALID_PARAM. modStatus.c:errCheck() Test Closed
LLR_STATUS_ERRCHECK_10 HLR_HM_79450 WHEN the driver status parameter is equal to DRV_INVALID_VALUE, the errCheck() function SHALL return MD_INVALID_VALUE. modStatus.c:errCheck() Test Closed
LLR_STATUS_ERRCHECK_11 HLR_HM_79450 WHEN the driver status parameter is equal to DRV_INVALID_CONFIG, the errCheck() function SHALL return MD_INVALID_CONFIG. modStatus.c:errCheck() Test Closed
LLR_STATUS_ERRCHECK_12 HLR_HM_79450 WHEN the driver status parameter is equal to DRV_NOT_INITIALIZED, the errCheck() function SHALL return MD_INVALID_INIT. modStatus.c:errCheck() Test Closed
LLR_STATUS_ERRCHECK_13 HLR_HM_79450 WHEN the driver status parameter is equal to DRV_OP_ALREADY_PERFORMED, the errCheck() function SHALL return MD_OP_ALREADY_PERFORMED. modStatus.c:errCheck() Test Closed
LLR_STATUS_ERRCHECK_14 HLR_HM_79450 WHEN the driver status parameter is equal to DRV_OPEN_FAILED, the errCheck() function SHALL return MD_OPEN_FAILED. modStatus.c:errCheck() Test Closed
LLR_STATUS_ERRCHECK_15 HLR_HM_79450 WHEN the driver status parameter does not match any recognized driver error condition, the errCheck() function SHALL return MD_FAILED. modStatus.c:errCheck() Test Closed

Control Coupling Diagram (CCD)

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

Data Coupling Diagram (DCD)

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

Control Flow Diagram (CFD)

cfd_errCheck start Entry: errCheck() guard_1 LLR_01: Guard Check Is `status` is not equal to `DRV_SUCCESS`? 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 execute operational data processing and state transformations guard_1->act_2 NO (FALSE) success_exit LLR_03: Final Exit return `MD_SUCCESS` act_2->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_errCheck in_store Input Data Sources & Parameters • status (const DriverStatus) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: status in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Mutation & Processing • Transformed Entity: errCheck proc_1->proc_2 Transformed Data (errCheck) proc_3 LLR_03: Status Output Packaging • Format Return Payload: ModStatus proc_2->proc_3 Final Output Data out_sink Output Data Sinks & Status Return • Status Payload (ModStatus) proc_3->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
errCheck Node1 errCheck Node1->Node1
Here is the caller graph for this function:
errCheck Node1 errCheck Node1->Node1 Node2 modA429_initReset Node1->Node2 Node6 modA429_recvChDisable Node1->Node6 Node7 modA429_recvChEnable Node1->Node7 Node8 modA429_recvConfig Node1->Node8 Node9 modA429_recvFIFO Node1->Node9 Node10 modA429_recvSetLabelFilter Node1->Node10 Node11 modA429_recvSetSDIFilter Node1->Node11 Node12 modA429_send Node1->Node12 Node13 modA429_sendChDisable Node1->Node13 Node14 modA429_sendChEnable Node1->Node14 Node15 modA429_sendConfig Node1->Node15 Node16 modAnalogIn_disableRead Node1->Node16 Node17 modAnalogIn_initReset Node1->Node17 Node18 modAnalogIn_enableRead Node1->Node18 Node19 modAnalogIn_read Node1->Node19 Node20 modConfig_coreChasisLEDSet Node1->Node20 Node21 modConfig_coreRegister Node1->Node21 Node22 modConfig_open Node1->Node22 Node23 modDiscreteIn_read Node1->Node23 Node24 modDiscreteOut_devicesConfig Node1->Node24 Node25 modDiscreteOut_initReset Node1->Node25 Node26 modDiscreteOut_write Node1->Node26 Node27 modHeartbeat_disableHeartbeat Node1->Node27 Node28 modHeartbeat_enableHeartbeat Node1->Node28 Node29 modHeartbeat_feedHeartbeat Node1->Node29 Node30 modHeartbeat_getElapsedTime Node1->Node30 Node31 modHeartbeat_setTimeout Node1->Node31 Node32 modHsb_getA429Cbit Node1->Node32 Node33 modHsb_getA429Pbit Node1->Node33 Node34 modHsb_getAnalogInCbit Node1->Node34 Node35 modHsb_getAnalogInPbit Node1->Node35 Node36 modHsb_getDiscreteInCbit Node1->Node36 Node37 modHsb_getDiscreteInPbit Node1->Node37 Node38 modHsb_getDiscreteOutCbit Node1->Node38 Node39 modHsb_getDiscreteOutPbit Node1->Node39 Node40 modHsb_getMfbCbit Node1->Node40 Node41 modHsb_getMfbPbit Node1->Node41 Node42 modHsb_getPowerFail Node1->Node42 Node43 modHsb_getPsuCbit Node1->Node43 Node44 modHsb_getPsuDiag Node1->Node44 Node45 modHsb_getPwmCbit Node1->Node45 Node46 modHsb_getPwmPbit Node1->Node46 Node47 modHsb_getRvdtCbit Node1->Node47 Node48 modHsb_getRvdtPbit Node1->Node48 Node49 modInfo_getBrdInfo Node1->Node49 Node50 modPsu_currentMonitor Node1->Node50 Node51 modPsu_tempMonitor Node1->Node51 Node52 modPsu_voltageMonitor Node1->Node52 Node53 modPwm_disable Node1->Node53 Node55 modPwm_enable Node1->Node55 Node56 modPwm_setFrequencyDutycycle Node1->Node56 Node57 modRvdt_initReset Node1->Node57 Node58 modRvdt_RefDisable Node1->Node58 Node59 modRvdt_RefEnable Node1->Node59 Node60 modRvdt_SenseDisable Node1->Node60 Node61 modRvdt_SenseEnable Node1->Node61 Node62 modRvdt_SenseRead Node1->Node62 Node63 modRvdt_SetRefConfig Node1->Node63 Node64 modRvdt_SetSenseConfig Node1->Node64 Node65 modRvdt_SetSenseFilter Node1->Node65 Node66 nvsramReadBIT Node1->Node66 Node81 nvsramWriteBIT Node1->Node81 Node2->Node2 Node3 modConfig_init Node2->Node3 Node4 modConfig_reset Node2->Node4 Node3->Node3 Node4->Node4 Node5 modConfig_close Node4->Node5 Node5->Node5 Node6->Node2 Node6->Node6 Node7->Node7 Node8->Node8 Node9->Node9 Node10->Node10 Node11->Node11 Node12->Node12 Node13->Node2 Node13->Node13 Node14->Node14 Node15->Node15 Node16->Node16 Node16->Node17 Node17->Node3 Node17->Node4 Node17->Node17 Node18->Node18 Node19->Node19 Node20->Node20 Node21->Node21 Node22->Node22 Node23->Node23 Node24->Node24 Node25->Node3 Node25->Node4 Node25->Node25 Node26->Node25 Node26->Node26 Node27->Node5 Node27->Node27 Node28->Node28 Node29->Node29 Node30->Node30 Node31->Node31 Node32->Node32 Node33->Node33 Node34->Node34 Node35->Node35 Node36->Node36 Node37->Node37 Node38->Node38 Node39->Node39 Node40->Node40 Node41->Node41 Node42->Node42 Node43->Node43 Node44->Node44 Node45->Node45 Node46->Node46 Node47->Node47 Node48->Node48 Node49->Node49 Node50->Node50 Node51->Node51 Node52->Node52 Node53->Node53 Node54 modPwm_initReset Node53->Node54 Node54->Node3 Node54->Node4 Node54->Node54 Node55->Node55 Node56->Node56 Node57->Node3 Node57->Node4 Node57->Node57 Node58->Node57 Node58->Node58 Node59->Node59 Node60->Node57 Node60->Node60 Node61->Node61 Node62->Node62 Node63->Node63 Node64->Node64 Node65->Node65 Node66->Node66 Node67 modHsb_readA429Cbit Node66->Node67 Node68 modHsb_readA429Pbit Node66->Node68 Node69 modHsb_readAnalogInCbit Node66->Node69 Node70 modHsb_readAnalogInPbit Node66->Node70 Node71 modHsb_readDiscreteInCbit Node66->Node71 Node72 modHsb_readDiscreteInPbit Node66->Node72 Node73 modHsb_readDiscreteOutCbit Node66->Node73 Node74 modHsb_readDiscreteOutPbit Node66->Node74 Node75 modHsb_readPowerFail Node66->Node75 Node76 modHsb_readPsuCbit Node66->Node76 Node77 modHsb_readPwmCbit Node66->Node77 Node78 modHsb_readPwmPbit Node66->Node78 Node79 modHsb_readRvdtCbit Node66->Node79 Node80 modHsb_readRvdtPbit Node66->Node80 Node67->Node67 Node68->Node68 Node69->Node69 Node70->Node70 Node71->Node71 Node72->Node72 Node73->Node73 Node74->Node74 Node75->Node75 Node76->Node76 Node77->Node77 Node78->Node78 Node79->Node79 Node80->Node80 Node81->Node81 Node82 modHsb_writeA429Cbit Node81->Node82 Node83 modHsb_writeA429Pbit Node81->Node83 Node84 modHsb_writeAnalogInCbit Node81->Node84 Node85 modHsb_writeAnalogInPbit Node81->Node85 Node86 modHsb_writeDiscreteInCbit Node81->Node86 Node87 modHsb_writeDiscreteInPbit Node81->Node87 Node88 modHsb_writeDiscreteOutCbit Node81->Node88 Node89 modHsb_writeDiscreteOutPbit Node81->Node89 Node90 modHsb_writePowerFail Node81->Node90 Node91 modHsb_writePsuCbit Node81->Node91 Node92 modHsb_writePwmCbit Node81->Node92 Node93 modHsb_writePwmPbit Node81->Node93 Node94 modHsb_writeRvdtCbit Node81->Node94 Node95 modHsb_writeRvdtPbit Node81->Node95 Node82->Node82 Node83->Node83 Node84->Node84 Node85->Node85 Node86->Node86 Node87->Node87 Node88->Node88 Node89->Node89 Node90->Node90 Node91->Node91 Node92->Node92 Node93->Node93 Node94->Node94 Node95->Node95