|
HFCC-01 Low-Level Software (LLSW) Rel_6802_HFCC-01-RP-CSAR-CB
|
Go to the source code of this file.
Enumerations | |
| enum | DInLogic { DI_DEFAULT = (0U) , DI_OG_GND = (1U) , DI_OG_OPEN = (2U) , DI_SO_SPLY = (3U) , DI_SO_OPEN = (4U) , DI_SG_SPLY = (5U) , DI_SG_GND = (6U) } |
| This is enum definition for the state logic of discrete input. More... | |
Functions | |
| ModStatus | modDiscreteIn_read (const DInChannelNum channelNum, DInLogic *pDiscreteValue) |
| modDiscreteIn_read. | |
Discrete Input Module
| enum DInLogic |
This is enum definition for the state logic of discrete input.
| ModStatus modDiscreteIn_read | ( | const DInChannelNum | channelNum, |
| DInLogic * | pDiscreteValue ) |
modDiscreteIn_read.
Read discrete input value from the specified channel.
| [in] | channelNum | Discrete input channel to access. |
| [out] | pDiscreteValue | Discrete input read value. |
| MD_SUCCESS | : Success. |
| MD_INVALID_PARAM | : The provided address pointer is invalid. |
| MD_INVALID_INIT | : The module has not been initialized. |
| MD_INVALID_CHANNEL | : The channel number is invalid. |
| MD_INVALID_VALUE | : Channel type is not valid. |
| MD_READ_ERR | : The module is failed to read. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_DISCRETEIN_MODDISCRETEIN_READ_01 | HLR_DIN_23258 | WHEN channel validation fails (validateChannel() returns FALSE), the modDiscreteIn_read() function SHALL abort processing and return MD_INVALID_CHANNEL. | modDiscreteIn.c:modDiscreteIn_read() | Test | Closed |
| LLR_DISCRETEIN_MODDISCRETEIN_READ_02 | HLR_DIN_23258 | WHEN the pointer pDiscreteValue is NULL (invalid), the modDiscreteIn_read() function SHALL abort processing and return MD_INVALID_PARAM. | modDiscreteIn.c:modDiscreteIn_read() | Test | Closed |
| LLR_DISCRETEIN_MODDISCRETEIN_READ_03 | HLR_DIN_23258 | WHEN the target card module state is not INIT, the modDiscreteIn_read() function SHALL abort processing and return MD_INVALID_INIT. | modDiscreteIn.c:modDiscreteIn_read() | Test | Closed |
| LLR_DISCRETEIN_MODDISCRETEIN_READ_04 | HLR_DIN_23258 | WHEN preconditions are satisfied, the modDiscreteIn_read() function SHALL read the hardware channel states into devState using discreteIn_getChSense(). | modDiscreteIn.c:modDiscreteIn_read() | Test | Closed |
| LLR_DISCRETEIN_MODDISCRETEIN_READ_05 | HLR_DIN_23258 | WHEN the channel bank is BANK0, the modDiscreteIn_read() function SHALL sample the discrete state from devState.chState at index chanNum + DIN_BANK_OFFSET_0. | modDiscreteIn.c:modDiscreteIn_read() | Test | Closed |
| LLR_DISCRETEIN_MODDISCRETEIN_READ_06 | HLR_DIN_23258 | WHEN the channel bank is BANK1, the modDiscreteIn_read() function SHALL sample the discrete state from devState.chState at index chanNum + DIN_BANK_OFFSET_1. | modDiscreteIn.c:modDiscreteIn_read() | Test | Closed |
| LLR_DISCRETEIN_MODDISCRETEIN_READ_07 | HLR_DIN_23258 | WHEN the channel bank is BANK2, the modDiscreteIn_read() function SHALL sample the discrete state from devState.chState at index chanNum + DIN_BANK_OFFSET_2. | modDiscreteIn.c:modDiscreteIn_read() | Test | Closed |
| LLR_DISCRETEIN_MODDISCRETEIN_READ_08 | HLR_DIN_23258 | WHEN the channel bank is BANK3, the modDiscreteIn_read() function SHALL sample the discrete state from devState.chState at index chanNum + DIN_BANK_OFFSET_3. | modDiscreteIn.c:modDiscreteIn_read() | Test | Closed |
| LLR_DISCRETEIN_MODDISCRETEIN_READ_09 | HLR_DIN_23258 | WHEN the channel type is Ground/Open (DIN_GND_OPEN) and the sampled state is TRUE, the modDiscreteIn_read() function SHALL set *pDiscreteValue to DI_OG_GND. | modDiscreteIn.c:modDiscreteIn_read() | Test | Closed |
| LLR_DISCRETEIN_MODDISCRETEIN_READ_10 | HLR_DIN_23258 | WHEN the channel type is Ground/Open (DIN_GND_OPEN) and the sampled state is FALSE, the modDiscreteIn_read() function SHALL set *pDiscreteValue to DI_OG_OPEN. | modDiscreteIn.c:modDiscreteIn_read() | Test | Closed |
| LLR_DISCRETEIN_MODDISCRETEIN_READ_11 | HLR_DIN_23258 | WHEN the channel type is Supply/Open (DIN_SUPPLY_OPEN) and the sampled state is TRUE, the modDiscreteIn_read() function SHALL set *pDiscreteValue to DI_SO_OPEN. | modDiscreteIn.c:modDiscreteIn_read() | Test | Closed |
| LLR_DISCRETEIN_MODDISCRETEIN_READ_12 | HLR_DIN_23258 | WHEN the channel type is Supply/Open (DIN_SUPPLY_OPEN) and the sampled state is FALSE, the modDiscreteIn_read() function SHALL set *pDiscreteValue to DI_SO_SPLY. | modDiscreteIn.c:modDiscreteIn_read() | Test | Closed |
| LLR_DISCRETEIN_MODDISCRETEIN_READ_13 | HLR_DIN_23258 | WHEN all operational processing completes successfully, the modDiscreteIn_read() function SHALL return MD_SUCCESS. | modDiscreteIn.c:modDiscreteIn_read() | Test | Closed |