Software Library API naibrd 2.24.0
See all documentation at naii.docs.com
naibrd_rly.c File Reference

Functions

static int32_t GetChannelCount (uint32_t modId)
 
static int32_t GetGroupCount (uint32_t modId)
 
static int32_t GetGroupSize (uint32_t modId)
 
static nai_status_t naibrd_RLY_VerifyChannel (uint32_t modId, int32_t channel)
 
static nai_status_t naibrd_RLY_VerifyGroup (uint32_t modId, int32_t group)
 
static nai_status_t naibrd_RLY_VerifyRelayState (naibrd_rly_state_t state)
 
static nai_status_t naibrd_RLY_VerifyChanMappedStatusType (naibrd_rly_chan_mapped_status_type_t type)
 
static nai_status_t naibrd_RLY_VerifyChanMappedStatusLatchType (naibrd_rly_chan_mapped_status_type_t type)
 
static nai_status_t naibrd_RLY_VerifyBoolean (bool_t enable)
 
static nai_status_t naibrd_RLY_VerifyInterruptTriggerType (naibrd_int_trigger_type_t type)
 
static nai_status_t naibrd_RLY_VerifyInterruptSteeringType (naibrd_int_steering_t steering)
 
static nai_status_t naibrd_RLY_VerifyGroupRawType (naibrd_rly_raw_group_type_t type)
 
NAIBRDFUNC int32_t NAIAPI naibrd_RLY_GetChannelCount (uint32_t modId)
 Returns the number of channels for the specified RLY Module ID.
 
NAIBRDFUNC int32_t NAIAPI naibrd_RLY_GetGroupCount (uint32_t modId)
 Returns the number of channel groups for the specified RLY Module ID.
 
NAIBRDFUNC int32_t NAIAPI naibrd_RLY_GetGroupSize (uint32_t modId)
 Returns the number of channels in each group for the specified RLY Module ID.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_SetRelayState (int32_t cardIndex, int32_t module, int32_t channel, naibrd_rly_state_t state)
 Sets the relay control state for the specified RLY channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_GetRelayState (int32_t cardIndex, int32_t module, int32_t channel, naibrd_rly_state_t *p_outstate)
 Retrieves the control setting state for the specified RLY channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_GetRelayPosition (int32_t cardIndex, int32_t module, int32_t channel, naibrd_rly_state_t *p_outstate)
 Retrieves the physical relay position for the specified RLY channel, via reading of secondary pole contacts.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_GetChanMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_rly_chan_mapped_status_type_t type, nai_status_bit_t *p_outstatusBit)
 Retrieves the status for the specified status type and RLY channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_ClearChanMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_rly_chan_mapped_status_type_t type)
 Clears the latched status for the specified RLY channel and status type. (Applicable for latched status types only)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_SetChanMappedInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, naibrd_rly_chan_mapped_status_type_t type, bool_t enable)
 Sets the Interrupt Enable for the specified RLY channel and interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_GetChanMappedInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, naibrd_rly_chan_mapped_status_type_t type, bool_t *p_outenable)
 Retrieves the Interrupt Enable setting for the specified RLY channel and interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_SetChanMappedInterruptTriggerType (int32_t cardIndex, int32_t module, int32_t channel, naibrd_rly_chan_mapped_status_type_t type, naibrd_int_trigger_type_t interruptType)
 Sets the Interrupt Edge/Level property for the specified RLY channel and interrupt status type. Determines whether an interrupt condition can retrigger on the same occurrence without clearing first.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_GetChanMappedInterruptTriggerType (int32_t cardIndex, int32_t module, int32_t channel, naibrd_rly_chan_mapped_status_type_t type, naibrd_int_trigger_type_t *p_outinterruptType)
 Retrieves the Interrupt Edge/Level property for the specified RLY channel and interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_SetChanMappedInterruptVector (int32_t cardIndex, int32_t module, naibrd_rly_chan_mapped_status_type_t type, uint32_t vector)
 Sets the Interrupt Vector for the specified RLY interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_GetChanMappedInterruptVector (int32_t cardIndex, int32_t module, naibrd_rly_chan_mapped_status_type_t type, uint32_t *p_outvector)
 Retrieves the Interrupt Vector for the specified RLY interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_SetChanMappedInterruptSteering (int32_t cardIndex, int32_t module, naibrd_rly_chan_mapped_status_type_t type, naibrd_int_steering_t steering)
 Sets the Interrupt Steering which indicates the interrupt direction for the specified RLY interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_GetChanMappedInterruptSteering (int32_t cardIndex, int32_t module, naibrd_rly_chan_mapped_status_type_t type, naibrd_int_steering_t *p_outsteering)
 Retrieves the Interrupt Steering which indicates the interrupt direction for the specified RLY interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_SetGroupRaw (int32_t cardIndex, int32_t module, int32_t group, naibrd_rly_raw_group_type_t type, uint32_t rawData)
 Sets the raw data value in the register associated with the group and register type specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_GetGroupRaw (int32_t cardIndex, int32_t module, int32_t group, naibrd_rly_raw_group_type_t type, uint32_t *p_outrawData)
 Retrieves the raw data value in the register associated with the group and register type specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_SetInduceBIT (int32_t cardIndex, int32_t module, int32_t channel, naibrd_rly_state_t forceBIT)
 Induces a simulated BIT fault on the specified RLY channel, by inverting the readback from the secondary pole. forceBIT is set to zero under normal conditions, and set to one to force a BIT condition. For test purposes only.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_GetInduceBIT (int32_t cardIndex, int32_t module, int32_t channel, naibrd_rly_state_t *p_outforceBIT)
 Reads the Induce BIT configuration setting for the specified RLY channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_GetRelayType (int32_t cardIndex, int32_t module, naibrd_rly_relaytype_t *p_outtype)
 Returns the relay type designation for the specified RLY Module (fixed by hardware configuration). 0 denotes non-latching, 1 is latching type. For internal reference purposes only.
 

Variables

static const uint32_t RLY_GEN3_SetPositionRegAddr [] = { NAI_RLY_GEN3_REG_SET_POSITION_ADD }
 
static const uint32_t RLY_GEN3_ReadPositionRegAddr [] = { NAI_RLY_GEN3_REG_READ_POSITION_ADD }
 
static const uint32_t RLY_GEN3_BITLatchedStatusRegAddr [] = { NAI_RLY_GEN3_REG_BIT_LATCHED_STATUS_ADD }
 
static const uint32_t RLY_GEN3_BITIntEnableRegAddr [] = { NAI_RLY_GEN3_REG_BIT_INT_ENABLE_ADD }
 
static const uint32_t RLY_GEN3_InduceBITRegAddr [] = { NAI_RLY_GEN3_REG_BIT_INDUCE_ADD }
 
static const uint32_t RLY_GEN3_StatusRegAddr [NAIBRD_RLY_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
 
static const uint32_t RLY_GEN3_IntEnableRegAddr [NAIBRD_RLY_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
 
static const uint32_t RLY_GEN3_IntVectorRegAddr [NAIBRD_RLY_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
 
static const uint32_t *const RLY_GEN3_reg_group_raw [NAIBRD_RLY_RAW_GROUP_TYPE_ENUM_COUNT]
 
static const uint32_t RLY_GEN5_SetPositionRegAddr [] = { NAI_RLY_GEN5_REG_SET_POSITION_ADD }
 
static const uint32_t RLY_GEN5_ReadPositionRegAddr [] = { NAI_RLY_GEN5_REG_READ_POSITION_ADD }
 
static const uint32_t RLY_GEN5_BITLatchedStatusRegAddr [] = { NAI_RLY_GEN5_REG_BIT_LATCHED_STATUS_ADD }
 
static const uint32_t RLY_GEN5_BITRealTimeStatusRegAddr [] = { NAI_RLY_GEN5_REG_BIT_REALTIME_STATUS_ADD }
 
static const uint32_t RLY_GEN5_BITIntEnableRegAddr [] = { NAI_RLY_GEN5_REG_BIT_INT_ENABLE_ADD }
 
static const uint32_t RLY_GEN5_BITIntTypeRegAddr [] = { NAI_RLY_GEN5_REG_BIT_EDGE_LEVEL_INT_ADD }
 
static const uint32_t RLY_GEN5_InduceBITAddr [] = { NAI_RLY_GEN5_REG_BIT_INDUCE_ADD }
 
static const uint32_t RLY_GEN5_StatusRegAddr [NAIBRD_RLY_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
 
static const uint32_t RLY_GEN5_IntEnableRegAddr [NAIBRD_RLY_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
 
static const uint32_t RLY_GEN5_IntTypeRegAddr [NAIBRD_RLY_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
 
static const int32_t RLY_GEN5_InterruptNum [NAIBRD_RLY_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
 
static const uint32_t *const RLY_GEN5_reg_group_raw [NAIBRD_RLY_RAW_GROUP_TYPE_ENUM_COUNT]
 

Function Documentation

◆ GetChannelCount()

static int32_t GetChannelCount ( uint32_t modId)
static

◆ GetGroupCount()

static int32_t GetGroupCount ( uint32_t modId)
static

◆ GetGroupSize()

static int32_t GetGroupSize ( uint32_t modId)
static

◆ naibrd_RLY_VerifyBoolean()

static nai_status_t naibrd_RLY_VerifyBoolean ( bool_t enable)
static

◆ naibrd_RLY_VerifyChanMappedStatusLatchType()

static nai_status_t naibrd_RLY_VerifyChanMappedStatusLatchType ( naibrd_rly_chan_mapped_status_type_t type)
static

◆ naibrd_RLY_VerifyChanMappedStatusType()

static nai_status_t naibrd_RLY_VerifyChanMappedStatusType ( naibrd_rly_chan_mapped_status_type_t type)
static

◆ naibrd_RLY_VerifyChannel()

static nai_status_t naibrd_RLY_VerifyChannel ( uint32_t modId,
int32_t channel )
static

◆ naibrd_RLY_VerifyGroup()

static nai_status_t naibrd_RLY_VerifyGroup ( uint32_t modId,
int32_t group )
static

◆ naibrd_RLY_VerifyGroupRawType()

static nai_status_t naibrd_RLY_VerifyGroupRawType ( naibrd_rly_raw_group_type_t type)
static

◆ naibrd_RLY_VerifyInterruptSteeringType()

static nai_status_t naibrd_RLY_VerifyInterruptSteeringType ( naibrd_int_steering_t steering)
static

◆ naibrd_RLY_VerifyInterruptTriggerType()

static nai_status_t naibrd_RLY_VerifyInterruptTriggerType ( naibrd_int_trigger_type_t type)
static

◆ naibrd_RLY_VerifyRelayState()

static nai_status_t naibrd_RLY_VerifyRelayState ( naibrd_rly_state_t state)
static

Variable Documentation

◆ RLY_GEN3_BITIntEnableRegAddr

const uint32_t RLY_GEN3_BITIntEnableRegAddr[] = { NAI_RLY_GEN3_REG_BIT_INT_ENABLE_ADD }
static

◆ RLY_GEN3_BITLatchedStatusRegAddr

const uint32_t RLY_GEN3_BITLatchedStatusRegAddr[] = { NAI_RLY_GEN3_REG_BIT_LATCHED_STATUS_ADD }
static

◆ RLY_GEN3_InduceBITRegAddr

const uint32_t RLY_GEN3_InduceBITRegAddr[] = { NAI_RLY_GEN3_REG_BIT_INDUCE_ADD }
static

◆ RLY_GEN3_IntEnableRegAddr

const uint32_t RLY_GEN3_IntEnableRegAddr[NAIBRD_RLY_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
static
Initial value:
=
{
NAI_RLY_GEN3_REG_BIT_INT_ENABLE_ADD,
0
}

◆ RLY_GEN3_IntVectorRegAddr

const uint32_t RLY_GEN3_IntVectorRegAddr[NAIBRD_RLY_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
static
Initial value:
=
{
NAI_RLY_GEN3_REG_BIT_INT_VECTOR_ADD,
0
}

◆ RLY_GEN3_ReadPositionRegAddr

const uint32_t RLY_GEN3_ReadPositionRegAddr[] = { NAI_RLY_GEN3_REG_READ_POSITION_ADD }
static

◆ RLY_GEN3_reg_group_raw

const uint32_t* const RLY_GEN3_reg_group_raw[NAIBRD_RLY_RAW_GROUP_TYPE_ENUM_COUNT]
static
Initial value:
=
{
NULL,
NULL
}
static const uint32_t RLY_GEN3_InduceBITRegAddr[]
Definition naibrd_rly.c:31
static const uint32_t RLY_GEN3_BITIntEnableRegAddr[]
Definition naibrd_rly.c:30
static const uint32_t RLY_GEN3_BITLatchedStatusRegAddr[]
Definition naibrd_rly.c:29
static const uint32_t RLY_GEN3_ReadPositionRegAddr[]
Definition naibrd_rly.c:28
static const uint32_t RLY_GEN3_SetPositionRegAddr[]
Definition naibrd_rly.c:27

◆ RLY_GEN3_SetPositionRegAddr

const uint32_t RLY_GEN3_SetPositionRegAddr[] = { NAI_RLY_GEN3_REG_SET_POSITION_ADD }
static

◆ RLY_GEN3_StatusRegAddr

const uint32_t RLY_GEN3_StatusRegAddr[NAIBRD_RLY_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
static
Initial value:
=
{
NAI_RLY_GEN3_REG_BIT_LATCHED_STATUS_ADD,
0
}

◆ RLY_GEN5_BITIntEnableRegAddr

const uint32_t RLY_GEN5_BITIntEnableRegAddr[] = { NAI_RLY_GEN5_REG_BIT_INT_ENABLE_ADD }
static

◆ RLY_GEN5_BITIntTypeRegAddr

const uint32_t RLY_GEN5_BITIntTypeRegAddr[] = { NAI_RLY_GEN5_REG_BIT_EDGE_LEVEL_INT_ADD }
static

◆ RLY_GEN5_BITLatchedStatusRegAddr

const uint32_t RLY_GEN5_BITLatchedStatusRegAddr[] = { NAI_RLY_GEN5_REG_BIT_LATCHED_STATUS_ADD }
static

◆ RLY_GEN5_BITRealTimeStatusRegAddr

const uint32_t RLY_GEN5_BITRealTimeStatusRegAddr[] = { NAI_RLY_GEN5_REG_BIT_REALTIME_STATUS_ADD }
static

◆ RLY_GEN5_InduceBITAddr

const uint32_t RLY_GEN5_InduceBITAddr[] = { NAI_RLY_GEN5_REG_BIT_INDUCE_ADD }
static

◆ RLY_GEN5_IntEnableRegAddr

const uint32_t RLY_GEN5_IntEnableRegAddr[NAIBRD_RLY_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
static
Initial value:
=
{
NAI_RLY_GEN5_REG_BIT_INT_ENABLE_ADD,
NAI_RLY_GEN5_REG_BIT_INT_ENABLE_ADD
}

◆ RLY_GEN5_InterruptNum

const int32_t RLY_GEN5_InterruptNum[NAIBRD_RLY_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
static
Initial value:
=
{
NAI_RLY_GEN5_REG_BIT_INT_VECTOR_STEERING_INTNUM,
NAI_RLY_GEN5_REG_BIT_INT_VECTOR_STEERING_INTNUM
}

◆ RLY_GEN5_IntTypeRegAddr

const uint32_t RLY_GEN5_IntTypeRegAddr[NAIBRD_RLY_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
static
Initial value:
=
{
NAI_RLY_GEN5_REG_BIT_EDGE_LEVEL_INT_ADD,
NAI_RLY_GEN5_REG_BIT_EDGE_LEVEL_INT_ADD
}

◆ RLY_GEN5_ReadPositionRegAddr

const uint32_t RLY_GEN5_ReadPositionRegAddr[] = { NAI_RLY_GEN5_REG_READ_POSITION_ADD }
static

◆ RLY_GEN5_reg_group_raw

const uint32_t* const RLY_GEN5_reg_group_raw[NAIBRD_RLY_RAW_GROUP_TYPE_ENUM_COUNT]
static
Initial value:
=
{
}
static const uint32_t RLY_GEN5_BITRealTimeStatusRegAddr[]
Definition naibrd_rly.c:68
static const uint32_t RLY_GEN5_ReadPositionRegAddr[]
Definition naibrd_rly.c:66
static const uint32_t RLY_GEN5_SetPositionRegAddr[]
Definition naibrd_rly.c:65
static const uint32_t RLY_GEN5_BITIntTypeRegAddr[]
Definition naibrd_rly.c:70
static const uint32_t RLY_GEN5_InduceBITAddr[]
Definition naibrd_rly.c:71
static const uint32_t RLY_GEN5_BITLatchedStatusRegAddr[]
Definition naibrd_rly.c:67
static const uint32_t RLY_GEN5_BITIntEnableRegAddr[]
Definition naibrd_rly.c:69

◆ RLY_GEN5_SetPositionRegAddr

const uint32_t RLY_GEN5_SetPositionRegAddr[] = { NAI_RLY_GEN5_REG_SET_POSITION_ADD }
static

◆ RLY_GEN5_StatusRegAddr

const uint32_t RLY_GEN5_StatusRegAddr[NAIBRD_RLY_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
static
Initial value:
=
{
NAI_RLY_GEN5_REG_BIT_LATCHED_STATUS_ADD,
NAI_RLY_GEN5_REG_BIT_REALTIME_STATUS_ADD
}