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

Go to the source code of this file.

Functions

ModStatus modAnalogIn_enableRead (const AInChannelNum channelNum)
 modAnalogIn_enableRead.
ModStatus modAnalogIn_disableRead (const AInChannelNum channelNum)
 modAnalogIn_disableRead.
ModStatus modAnalogIn_read (const AInChannelNum channelNum, Float32 *readVal)
 modAnalogIn_read.

Detailed Description

Author
Ramza Anuar ramza.nosp@m..anu.nosp@m.ar@tu.nosp@m.sas..nosp@m.my

AnalogIn Module

Function Documentation

◆ modAnalogIn_disableRead()

ModStatus modAnalogIn_disableRead ( const AInChannelNum channelNum)

modAnalogIn_disableRead.

Disable analog input to stop AIN conversion for specific channel.

Parameters
[in]channelNumAnalog input channel to access.
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_INIT: The module has not been initialized.
MD_INVALID_CHANNEL: The channel number is invalid.
MD_OP_ALREADY_PERFORMED: The channel state is already disabled.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: modAnalogIn_disableRead

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_ANALOGIN_MODANALOGIN_DISABLEREAD_01 HLR_AIN_16934 WHEN channelNum is not one of the defined analog input channel identifiers (AIN_5V_CH1, AIN_5V_CH2, AIN_5V_CH3, AIN_5V_CH4, AIN_10V_CH1, AIN_10V_CH2, AIN_10V_CH3, AIN_10V_CH4), the modAnalogIn_disableRead() function SHALL abort processing and return MD_INVALID_CHANNEL. modAnalogIn.c:modAnalogIn_disableRead() Test Closed
LLR_ANALOGIN_MODANALOGIN_DISABLEREAD_02 HLR_AIN_16934 WHEN the module initialization state is not initialized (INIT), the modAnalogIn_disableRead() function SHALL abort processing and return MD_INVALID_INIT. modAnalogIn.c:modAnalogIn_disableRead() Test Closed
LLR_ANALOGIN_MODANALOGIN_DISABLEREAD_03 HLR_AIN_16934 WHEN the driver status is not equal to DRV_SUCCESS, the modAnalogIn_disableRead() function SHALL abort processing and return the module error code produced by errCheck() for the reported driver status. modAnalogIn.c:modAnalogIn_disableRead() Test Closed
LLR_ANALOGIN_MODANALOGIN_DISABLEREAD_04 HLR_AIN_16934 WHEN the target analog input channel is already disabled (channel enable status is FALSE), the modAnalogIn_disableRead() function SHALL abort processing and return MD_OP_ALREADY_PERFORMED. modAnalogIn.c:modAnalogIn_disableRead() Test Closed
LLR_ANALOGIN_MODANALOGIN_DISABLEREAD_05 HLR_AIN_16934 WHEN preconditions are satisfied, the modAnalogIn_disableRead() function SHALL invoke routine analogIn_getChannelStatus() to execute target subsystem hardware operation. modAnalogIn.c:modAnalogIn_disableRead() Test Closed
LLR_ANALOGIN_MODANALOGIN_DISABLEREAD_06 HLR_AIN_16934 WHEN preconditions are satisfied, the modAnalogIn_disableRead() function SHALL evaluate the driver return status using errCheck(). modAnalogIn.c:modAnalogIn_disableRead() Test Closed
LLR_ANALOGIN_MODANALOGIN_DISABLEREAD_07 HLR_AIN_16934 WHEN preconditions are satisfied, the modAnalogIn_disableRead() function SHALL invoke routine analogIn_enableDisableCh() to execute target subsystem hardware operation. modAnalogIn.c:modAnalogIn_disableRead() Test Closed
LLR_ANALOGIN_MODANALOGIN_DISABLEREAD_08 HLR_AIN_16934 WHEN all operational processing completes successfully, the modAnalogIn_disableRead() function SHALL return MD_SUCCESS. modAnalogIn.c:modAnalogIn_disableRead() Test Closed

Control Coupling Diagram (CCD)

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

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller modAnalogIn_disableRead() [Device Library Modules] Target analogIn_getChannelStatus() [Subordinate Routine] Caller:s->Target:n l_t0->l_b0   channelNum (Payload) r_b0->r_t0   stateTelemetry (Internal State)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_modAnalogIn_disableRead start Entry: modAnalogIn_disableRead() guard_1 LLR_01: Guard Check Is the analog input channel validation check returns FALSE (invalid channel)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `MD_INVALID_CHANNEL` 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 `drvStatus` is not equal to `DRV_SUCCESS`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit abort processing and return `errCheck(drvStatus)` guard_3->err_exit_3 YES (TRUE) guard_4 LLR_04: Guard Check Is `chStatus` is equal to `FALSE`? guard_3->guard_4 err_exit_4 LLR_04 Error Exit abort processing and return `MD_OP_ALREADY_PERFORMED` guard_4->err_exit_4 YES (TRUE) act_5 LLR_05: Action Step invoke routine `analogIn_getChannelStatus()` to execute target subsystem hardware operation guard_4->act_5 NO (FALSE) act_6 LLR_06: Action Step evaluate the driver return status using `errCheck()` act_5->act_6 act_7 LLR_07: Action Step invoke routine `analogIn_enableDisableCh()` to execute target subsystem hardware operation act_6->act_7 success_exit LLR_08: Final Exit return `MD_SUCCESS` act_7->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_modAnalogIn_disableRead in_store Input Data Sources & Parameters • channelNum (const AInChannelNum) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: validateAnInCh in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: analogInModHdl proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: drvStatus proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Validation Check • Evaluate Parameter / State: chStatus proc_3->proc_4 Validated Input Data proc_5 LLR_05: Data Payload Transformation • Process payload via analogIn_getChannelStatus() proc_4->proc_5 Data Payload (analogIn_getChannelStatus) proc_6 LLR_06: Data Payload Transformation • Process payload via errCheck() proc_5->proc_6 Data Payload (errCheck) proc_7 LLR_07: Data Payload Transformation • Process payload via analogIn_enableDisableCh() proc_6->proc_7 Data Payload (analogIn_enableDisableCh) proc_8 LLR_08: Status Output Packaging • Format Return Payload: ModStatus proc_7->proc_8 Final Output Data out_sink Output Data Sinks & Status Return • Status Payload (ModStatus) proc_8->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
modAnalogIn_disableRead Node1 modAnalogIn_disableRead Node1->Node1 Node2 analogIn_enableDisableCh Node1->Node2 Node10 analogIn_getChannelStatus Node1->Node10 Node11 errCheck Node1->Node11 Node12 validateAnInCh Node1->Node12 Node2->Node2 Node3 readAnInReg Node2->Node3 Node7 writeAnInReg Node2->Node7 Node3->Node3 Node4 interDrv_Read32 Node3->Node4 Node4->Node4 Node5 interDrv_isAddressValid Node4->Node5 Node6 memoryMap_Read32 Node4->Node6 Node5->Node5 Node6->Node6 Node7->Node7 Node8 interDrv_Write32 Node7->Node8 Node8->Node5 Node8->Node8 Node9 memoryMap_Write32 Node8->Node9 Node9->Node9 Node10->Node3 Node10->Node10 Node11->Node11 Node12->Node12
Here is the caller graph for this function:
modAnalogIn_disableRead Node1 modAnalogIn_disableRead Node1->Node1 Node2 modAnalogIn_initReset Node1->Node2 Node2->Node2 Node3 modConfig_init Node2->Node3 Node4 modConfig_reset Node2->Node4 Node3->Node3 Node4->Node4 Node5 modConfig_close Node4->Node5 Node5->Node5

◆ modAnalogIn_enableRead()

ModStatus modAnalogIn_enableRead ( const AInChannelNum channelNum)

modAnalogIn_enableRead.

Enable analog input to start AIN conversion for specific channel.

Parameters
[in]channelNumAnalog input channel to access.
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_INIT: The module has not been initialized.
MD_INVALID_CHANNEL: The channel number is invalid.
MD_OP_ALREADY_PERFORMED: The channel state is already enabled.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: modAnalogIn_enableRead

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_ANALOGIN_MODANALOGIN_ENABLEREAD_01 HLR_AIN_16934 WHEN channelNum is not one of the defined analog input channel identifiers (AIN_5V_CH1, AIN_5V_CH2, AIN_5V_CH3, AIN_5V_CH4, AIN_10V_CH1, AIN_10V_CH2, AIN_10V_CH3, AIN_10V_CH4), the modAnalogIn_enableRead() function SHALL abort processing and return MD_INVALID_CHANNEL. modAnalogIn.c:modAnalogIn_enableRead() Test Closed
LLR_ANALOGIN_MODANALOGIN_ENABLEREAD_02 HLR_AIN_16934 WHEN the module initialization state is not initialized (INIT), the modAnalogIn_enableRead() function SHALL abort processing and return MD_INVALID_INIT. modAnalogIn.c:modAnalogIn_enableRead() Test Closed
LLR_ANALOGIN_MODANALOGIN_ENABLEREAD_03 HLR_AIN_16934 WHEN the driver status is not equal to DRV_SUCCESS, the modAnalogIn_enableRead() function SHALL abort processing and return the module error code produced by errCheck() for the reported driver status. modAnalogIn.c:modAnalogIn_enableRead() Test Closed
LLR_ANALOGIN_MODANALOGIN_ENABLEREAD_04 HLR_AIN_16934 WHEN the target analog input channel is already enabled (channel enable status is TRUE), the modAnalogIn_enableRead() function SHALL abort processing and return MD_OP_ALREADY_PERFORMED. modAnalogIn.c:modAnalogIn_enableRead() Test Closed
LLR_ANALOGIN_MODANALOGIN_ENABLEREAD_05 HLR_AIN_16934 WHEN preconditions are satisfied, the modAnalogIn_enableRead() function SHALL invoke routine analogIn_getChannelStatus() to execute target subsystem hardware operation. modAnalogIn.c:modAnalogIn_enableRead() Test Closed
LLR_ANALOGIN_MODANALOGIN_ENABLEREAD_06 HLR_AIN_16934 WHEN preconditions are satisfied, the modAnalogIn_enableRead() function SHALL evaluate the driver return status using errCheck(). modAnalogIn.c:modAnalogIn_enableRead() Test Closed
LLR_ANALOGIN_MODANALOGIN_ENABLEREAD_07 HLR_AIN_16934 WHEN preconditions are satisfied, the modAnalogIn_enableRead() function SHALL invoke routine analogIn_enableDisableCh() to execute target subsystem hardware operation. modAnalogIn.c:modAnalogIn_enableRead() Test Closed
LLR_ANALOGIN_MODANALOGIN_ENABLEREAD_08 HLR_AIN_16934 WHEN all operational processing completes successfully, the modAnalogIn_enableRead() function SHALL return MD_SUCCESS. modAnalogIn.c:modAnalogIn_enableRead() Test Closed

Control Coupling Diagram (CCD)

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

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller modAnalogIn_enableRead() [Device Library Modules] Target analogIn_getChannelStatus() [Subordinate Routine] Caller:s->Target:n l_t0->l_b0   channelNum (Payload) r_b0->r_t0   stateTelemetry (Internal State)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_modAnalogIn_enableRead start Entry: modAnalogIn_enableRead() guard_1 LLR_01: Guard Check Is the analog input channel validation check returns FALSE (invalid channel)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `MD_INVALID_CHANNEL` 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 `drvStatus` is not equal to `DRV_SUCCESS`? guard_2->guard_3 err_exit_3 LLR_03 Error Exit abort processing and return `errCheck(drvStatus)` guard_3->err_exit_3 YES (TRUE) guard_4 LLR_04: Guard Check Is `chStatus` is equal to `TRUE`? guard_3->guard_4 err_exit_4 LLR_04 Error Exit abort processing and return `MD_OP_ALREADY_PERFORMED` guard_4->err_exit_4 YES (TRUE) act_5 LLR_05: Action Step invoke routine `analogIn_getChannelStatus()` to execute target subsystem hardware operation guard_4->act_5 NO (FALSE) act_6 LLR_06: Action Step evaluate the driver return status using `errCheck()` act_5->act_6 act_7 LLR_07: Action Step invoke routine `analogIn_enableDisableCh()` to execute target subsystem hardware operation act_6->act_7 success_exit LLR_08: Final Exit return `MD_SUCCESS` act_7->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_modAnalogIn_enableRead in_store Input Data Sources & Parameters • channelNum (const AInChannelNum) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: validateAnInCh in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: analogInModHdl proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: drvStatus proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Validation Check • Evaluate Parameter / State: chStatus proc_3->proc_4 Validated Input Data proc_5 LLR_05: Data Payload Transformation • Process payload via analogIn_getChannelStatus() proc_4->proc_5 Data Payload (analogIn_getChannelStatus) proc_6 LLR_06: Data Payload Transformation • Process payload via errCheck() proc_5->proc_6 Data Payload (errCheck) proc_7 LLR_07: Data Payload Transformation • Process payload via analogIn_enableDisableCh() proc_6->proc_7 Data Payload (analogIn_enableDisableCh) proc_8 LLR_08: Status Output Packaging • Format Return Payload: ModStatus proc_7->proc_8 Final Output Data out_sink Output Data Sinks & Status Return • Status Payload (ModStatus) proc_8->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
modAnalogIn_enableRead Node1 modAnalogIn_enableRead Node1->Node1 Node2 analogIn_enableDisableCh Node1->Node2 Node10 analogIn_getChannelStatus Node1->Node10 Node11 errCheck Node1->Node11 Node12 validateAnInCh Node1->Node12 Node2->Node2 Node3 readAnInReg Node2->Node3 Node7 writeAnInReg Node2->Node7 Node3->Node3 Node4 interDrv_Read32 Node3->Node4 Node4->Node4 Node5 interDrv_isAddressValid Node4->Node5 Node6 memoryMap_Read32 Node4->Node6 Node5->Node5 Node6->Node6 Node7->Node7 Node8 interDrv_Write32 Node7->Node8 Node8->Node5 Node8->Node8 Node9 memoryMap_Write32 Node8->Node9 Node9->Node9 Node10->Node3 Node10->Node10 Node11->Node11 Node12->Node12
Here is the caller graph for this function:
modAnalogIn_enableRead Node1 modAnalogIn_enableRead Node1->Node1

◆ modAnalogIn_read()

ModStatus modAnalogIn_read ( const AInChannelNum channelNum,
Float32 * readVal )

modAnalogIn_read.

Read analog input from specific channel.

Parameters
[in]channelNumAnalog input channel to access.
[out]readValAnalog read value 0V to 5V for 5V channels and 0V to 10V for 10V channels with tolerance of 1E-6.
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_INIT: The module has not been initialized.
MD_INVALID_PARAM: The provided address pointer is invalid.
MD_INVALID_CHANNEL: The channel number is invalid.
MD_CHANNEL_DISABLED: Channel is disabled.
MD_INVALID_VALUE: Analog read value is out of range.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: modAnalogIn_read

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_ANALOGIN_MODANALOGIN_READ_01 HLR_AIN_21627 WHEN channelNum is not one of the defined analog input channel identifiers (AIN_5V_CH1, AIN_5V_CH2, AIN_5V_CH3, AIN_5V_CH4, AIN_10V_CH1, AIN_10V_CH2, AIN_10V_CH3, AIN_10V_CH4), the modAnalogIn_read() function SHALL abort processing and return MD_INVALID_CHANNEL. modAnalogIn.c:modAnalogIn_read() Test Closed
LLR_ANALOGIN_MODANALOGIN_READ_02 HLR_AIN_21627 WHEN the pointer readVal is NULL (invalid), the modAnalogIn_read() function SHALL abort processing and return MD_INVALID_PARAM. modAnalogIn.c:modAnalogIn_read() Test Closed
LLR_ANALOGIN_MODANALOGIN_READ_03 HLR_AIN_21627 WHEN the module initialization state is not initialized (INIT), the modAnalogIn_read() function SHALL abort processing and return MD_INVALID_INIT. modAnalogIn.c:modAnalogIn_read() Test Closed
LLR_ANALOGIN_MODANALOGIN_READ_04 HLR_AIN_21627 WHEN the driver status is not equal to DRV_SUCCESS, the modAnalogIn_read() function SHALL abort processing and return the module error code produced by errCheck() for the reported driver status. modAnalogIn.c:modAnalogIn_read() Test Closed
LLR_ANALOGIN_MODANALOGIN_READ_05 HLR_AIN_21627 WHEN the target analog input channel is disabled (channel enable status is FALSE), the modAnalogIn_read() function SHALL abort processing and return MD_CHANNEL_DISABLED. modAnalogIn.c:modAnalogIn_read() Test Closed
LLR_ANALOGIN_MODANALOGIN_READ_06 HLR_AIN_21627 WHEN MOD_CONFIG_AIN_5V_BANK is equal to the bank identifier, the modAnalogIn_read() function SHALL abort processing and return MD_INVALID_VALUE. modAnalogIn.c:modAnalogIn_read() Test Closed
LLR_ANALOGIN_MODANALOGIN_READ_07 HLR_AIN_21627 WHEN the converted analog input voltage reading pointed to by readVal is outside the valid range of 0.0 V (MOD_CONFIG_AIN_0V_RANGE) to 10.0 V (MOD_CONFIG_AIN_10V_RANGE) (less than 0.0 V or greater than 10.0 V), the modAnalogIn_read() function SHALL abort processing and return MD_INVALID_VALUE. modAnalogIn.c:modAnalogIn_read() Test Closed
LLR_ANALOGIN_MODANALOGIN_READ_08 HLR_AIN_21627 WHEN preconditions are satisfied, the modAnalogIn_read() function SHALL invoke routine status() to execute target subsystem hardware operation. modAnalogIn.c:modAnalogIn_read() Test Closed
LLR_ANALOGIN_MODANALOGIN_READ_09 HLR_AIN_21627 WHEN preconditions are satisfied, the modAnalogIn_read() function SHALL evaluate the driver return status using errCheck(). modAnalogIn.c:modAnalogIn_read() Test Closed
LLR_ANALOGIN_MODANALOGIN_READ_10 HLR_AIN_21627 WHEN preconditions are satisfied, the modAnalogIn_read() function SHALL invoke routine analogIn_getAdcReading() to execute target subsystem hardware operation. modAnalogIn.c:modAnalogIn_read() Test Closed
LLR_ANALOGIN_MODANALOGIN_READ_11 HLR_AIN_21627 WHEN all operational processing completes successfully, the modAnalogIn_read() function SHALL return MD_SUCCESS. modAnalogIn.c:modAnalogIn_read() Test Closed

Control Coupling Diagram (CCD)

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

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller modAnalogIn_read() [Device Library Modules] Target status() [Subordinate Routine] Caller:s->Target:n l_t0->l_b0   channelNum (Payload) r_b0->r_t0   *readVal (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_modAnalogIn_read start Entry: modAnalogIn_read() guard_1 LLR_01: Guard Check Is the analog input channel validation check returns FALSE (invalid channel)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `MD_INVALID_CHANNEL` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is the pointer `readVal` is NULL (invalid)? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `MD_INVALID_PARAM` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is the module initialization state is not initialized (INIT)? guard_2->guard_3 err_exit_3 LLR_03 Error Exit abort processing and return `MD_INVALID_INIT` guard_3->err_exit_3 YES (TRUE) guard_4 LLR_04: Guard Check Is `drvStatus` is not equal to `DRV_SUCCESS`? guard_3->guard_4 err_exit_4 LLR_04 Error Exit abort processing and return `errCheck(drvStatus)` guard_4->err_exit_4 YES (TRUE) guard_5 LLR_05: Guard Check Is `chStatus` is equal to `FALSE`? guard_4->guard_5 err_exit_5 LLR_05 Error Exit abort processing and return `MD_CHANNEL_DISABLED` guard_5->err_exit_5 YES (TRUE) guard_6 LLR_06: Guard Check Is `MOD_CONFIG_AIN_5V_BANK` is equal to the bank identifier? guard_5->guard_6 err_exit_6 LLR_06 Error Exit abort processing and return `MD_INVALID_VALUE` guard_6->err_exit_6 YES (TRUE) guard_7 LLR_07: Guard Check Is !RANGE_CHECK_FLOAT(*readVal, MOD_CONFIG_AIN_0V_RANGE, MOD_CONFIG_AIN_10V_RANGE)? guard_6->guard_7 err_exit_7 LLR_07 Error Exit abort processing and return `MD_INVALID_VALUE` guard_7->err_exit_7 YES (TRUE) act_8 LLR_08: Action Step invoke routine `status()` to execute target subsystem hardware operation guard_7->act_8 NO (FALSE) act_9 LLR_09: Action Step evaluate the driver return status using `errCheck()` act_8->act_9 act_10 LLR_10: Action Step invoke routine `analogIn_getAdcReading()` to execute target subsystem hardware operation act_9->act_10 success_exit LLR_11: Final Exit return `MD_SUCCESS` act_10->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_modAnalogIn_read in_store Input Data Sources & Parameters • channelNum (const AInChannelNum) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: validateAnInCh in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: readVal proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: analogInModHdl proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Validation Check • Evaluate Parameter / State: drvStatus proc_3->proc_4 Validated Input Data proc_5 LLR_05: Data Validation Check • Evaluate Parameter / State: chStatus proc_4->proc_5 Validated Input Data proc_6 LLR_06: Data Validation Check • Evaluate Parameter / State: MOD_CONFIG_AIN_5V_BANK proc_5->proc_6 Validated Input Data proc_7 LLR_07: Data Validation Check • Evaluate Parameter / State: RANGE_CHECK_FLOAT proc_6->proc_7 Validated Input Data proc_8 LLR_08: Data Payload Transformation • Process payload via status() proc_7->proc_8 Data Payload (status) proc_9 LLR_09: Data Payload Transformation • Process payload via errCheck() proc_8->proc_9 Data Payload (errCheck) proc_10 LLR_10: Data Payload Transformation • Process payload via analogIn_getAdcReading() proc_9->proc_10 Data Payload (analogIn_getAdcReading) proc_11 LLR_11: Status Output Packaging • Format Return Payload: ModStatus proc_10->proc_11 Final Output Data out_sink Output Data Sinks & Status Return • readVal (Float32) proc_11->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
modAnalogIn_read Node1 modAnalogIn_read Node1->Node1 Node2 analogIn_getAdcReading Node1->Node2 Node7 analogIn_getChannelStatus Node1->Node7 Node8 errCheck Node1->Node8 Node9 validateAnInCh Node1->Node9 Node2->Node2 Node3 readAnInReg Node2->Node3 Node3->Node3 Node4 interDrv_Read32 Node3->Node4 Node4->Node4 Node5 interDrv_isAddressValid Node4->Node5 Node6 memoryMap_Read32 Node4->Node6 Node5->Node5 Node6->Node6 Node7->Node3 Node7->Node7 Node8->Node8 Node9->Node9
Here is the caller graph for this function:
modAnalogIn_read Node1 modAnalogIn_read Node1->Node1