MX Foundation 4
|
MIL 1553 Periodic Message Structure. More...
#include <mxf_class_mil1553.h>
Data Fields | |
HMXF_BUFFER | buffer |
uint32 | options |
uint32 | delay |
uint16 | command |
uint16 | command2 |
uint16 | retryHaltOptions |
uint16 | statusMask |
uint16 | condBranch |
uint16 | condMask |
uint16 | condData |
uint16 | branchMinorIndex |
uint16 | branchMsgIndex |
uint16 | modulo |
uint16 | reserved [2] |
Use to create or get the list of messages of a minor frame. Use with msg parameter of mxfTxPeriodicMajorFrameSet() and mxfTxPeriodicMajorFrameGet() function.
HMXF_BUFFER MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG::buffer |
Handle of TX Periodic data buffer to use with this message.
uint32 MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG::options |
This bit field gives information about the message.
Bit option | Description |
---|---|
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_OPT_RT_RT | This message is an RT-RT command. |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_OPT_BUS_B | This message will use the BUS B. |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_OPT_CHECKSUM_ENABLE | The checksum will be sent in place of the last data word. |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_OPT_GAP | Specifies to use the inter-message gap delay (see MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG.delay). The delay is computed between the end of the preceding message on the same bus and the beginning of this one (gap). See MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_OPT_BUS_GAP to use gap computed on both buses. |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_OPT_NOOP_AND_WAITONCOND | Specifies to not send any command and wait on the discrete input condition. A discrete condition must be set, refer to condBranch. |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_OPT_NEXTFRAME_NOW | Specifies to send the next minor frame immediately after this one (do not respect the minor frame rate). This is most useful with a condition branch to minor frame (branchMsgIndex set to 0xFFFF), since it allows to branch to the minor frame immediately, but this option can be used on any message of the minor frame. Supported on Enhanced BC only. |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_OPT_DELAY | Specifies to use the inter-message gap delay (see MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG.delay). The delay is computed between the beginning of the preceding message and the beginning of this one. |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_OPT_BUS_GAP | Specifies to use the inter-message gap delay (see MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG.delay). The delay is computed on both buses. |
uint32 MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG::delay |
Inter-message gap time delay. 19-bit expressed in ⅛ bit time, minimum of 16. (2 to 65535 bit time). On IPM-1553-MRT, the effective delay will be rounded down to the nearest bit time value. Used with MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_OPT_GAP, MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_OPT_BUS_GAP and MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_OPT_DELAY option. By default, the start between this message and the previous message on the bus is delayed by a minimum of 4 bit time as specified in the MIL-1553 specification. This can be changed by using MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_OPT_DELAY, MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_OPT_GAP and MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_OPT_BUS_GAP option. Note that with value smaller than 32, the module may not achieve inter-message gap that fast.
uint16 MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG::command |
MIL-STD-1553 Command (must be a RX command if in RT-RT transfer mode). You can use mxfMIL1553CommandCompose() function to help you set the command field.
uint16 MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG::command2 |
MIL-STD-1553 Command #2 for RT-RT transfer (must be a TX command). You can use mxfMIL1553CommandCompose() function to help you set the command2 field.
uint16 MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG::retryHaltOptions |
Retry and halt options.
Retry conditions has precedence over halt conditions.
Retry conditions:
Bit option | Description |
---|---|
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_RETRY_NORESPONSE_ENABLE | Forces the retry when the RT does not respond to the current command. |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_RETRY_ERROR_ENABLE | Forces the retry when the BC has detected an error. Errors are: Discontinuity of data words, improper number of data bits, invalid manchester, parity error, invalid sync, status address error and message length error. Errors are checked only on data and status received by the BC. |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_RETRY_SWITCH_ENABLE | Allows using the dynamic bus selection feature. This feature automatically switches to the alternate bus after a successful retry on that bus. If this option is not used, the active bus will not be changed after the retry. |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_RETRY_STATUSMASK_AND | Forces the retry of the major frame when the result of received RT status word AND statusMask is not equal to zero. For RT-RT transaction, both RT status must be received for the condition to be executed. If received status has an error, the condition will be ignored. This bit can't be used at the same time as MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_HALT_STATUSMASK_NOTEQUAL and MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_HALT_STATUSMASK_EQUAL. |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_RETRY_STATUSMASK_NOTEQUAL | Forces the retry of the major frame when the received RT status word is different than statusMask. For RT-RT transaction, both RT status must be received for the condition to be executed. If received status has an error, the condition will be ignored. This bit can't be used at the same time as MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_HALT_STATUSMASK_AND and MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_HALT_STATUSMASK_EQUAL. |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_RETRY_STATUSMASK_EQUAL | Forces the retry of the major frame when the received RT status word is equal to statusMask. For RT-RT transaction, both RT status must be received for the condition to be executed. If received status has an error, the condition will be ignored. This bit can't be used at the same time as MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_HALT_STATUSMASK_AND and MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_HALT_STATUSMASK_NOTEQUAL. |
Retry action:
Bit option | Description |
---|---|
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_RETRY_ACT_BUS | Forces the retry on the active bus (the same bus where the failure occurs). |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_RETRY_ALT_BUS | Forces the retry on the alternate bus. |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_RETRY_ACT_ALT_BUS | Forces the retry on the alternate bus and then on the active bus if necessary (up to 2 retries). |
Halt conditions:
Bit option | Description |
---|---|
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_HALT_ERROR_ENABLE | Forces the halt of the major frame when the BC has detected an error. Errors are: Discontinuity of data words, improper number of data bits, invalid manchester, parity error, invalid sync, status address error and message length error. Errors are checked only on data and status received by the BC. |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_HALT_STATUSMASK_AND | Forces the halt of the major frame when the result of received RT status word AND statusMask is not equal to zero. For RT-RT transaction, both RT status must be received for the condition to be executed. If received status has an error, the condition will be ignored. This bit can't be used at the same time as MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_HALT_STATUSMASK_NOTEQUAL and MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_HALT_STATUSMASK_EQUAL. |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_HALT_STATUSMASK_NOTEQUAL | Forces the halt of the major frame when the received RT status word is different than statusMask. For RT-RT transaction, both RT status must be received for the condition to be executed. If received status has an error, the condition will be ignored. This bit can't be used at the same time as MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_HALT_STATUSMASK_AND and MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_HALT_STATUSMASK_EQUAL. |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_HALT_STATUSMASK_EQUAL | Forces the halt of the major frame when the received RT status word is equal to statusMask. For RT-RT transaction, both RT status must be received for the condition to be executed. If received status has an error, the condition will be ignored. This bit can't be used at the same time as MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_HALT_STATUSMASK_AND and MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_HALT_STATUSMASK_NOTEQUAL. |
uint16 MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG::statusMask |
Status bit mask (see retry and halt options). (see the MIL-STD-1553 specification for details about the status bits).
- MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_STATUSMASK_ADDRESS - MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_STATUSMASK_MSGERR - MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_STATUSMASK_INST - MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_STATUSMASK_SRQ - MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_STATUSMASK_RESERVED_BITS - MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_STATUSMASK_BCST - MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_STATUSMASK_BUSY - MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_STATUSMASK_SSF - MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_STATUSMASK_DBCA - MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_STATUSMASK_TERMINAL_FLAG
uint16 MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG::condBranch |
Conditional branch option and word index.
Bit 0..1 : Conditional branch option
Bit 8..13 : Word index
mxfMIL1553ConditionalBranchCompose() or mxfMIL1553ConditionalBranchOnDiscreteCompose() can be used to help set the condBranch field.
Conditional branch option (bit 0..1):
Bit option | Description |
---|---|
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_CONDBRANCH_OPT_NONE | No condition. (No branch) |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_CONDBRANCH_OPT_AND | AND option: Branch if “condMask” AND “Received Word” AND “condData” is not equal to zero. |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_CONDBRANCH_OPT_NOTEQUAL | NOT EQUAL option: Branch if “condMask” AND “Received Word” is not equal to “condData”. |
MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_CONDBRANCH_OPT_EQUAL | EQUAL option: Branch if “condMask” AND “Received Word” is equal to “condData”. |
Word index (bit 8..13): On which word index we verify the condition (0-63). This index corresponds to the position index of the word in the message (0-35) or discrete input channel (63). Indexes 36-62 are not used.
Conditional branch cannot happen on data transmitted by the BC and does not count for the index position.
For example, for a BC to RT command with 3 data words, the index #0 corresponds to the RT status word.
For a RT to BC command with 3 data words, the index #0 corresponds to the RT status word, index #1 to the first RT data, and the index #3 corresponds to the last RT data word.
If received word corresponding to this word index has a bus error (discontinuity of data words, improper number of data bits, invalid manchester, parity error and invalid sync), the condition will be ignored.
For index 63, the condition is executed on the associated discrete input. condMask defines which discrete input pins to use.
uint16 MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG::condMask |
Condition mask. (See Conditional Branch options).
uint16 MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG::condData |
Condition data result. (See Conditional Branch options).
uint16 MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG::branchMinorIndex |
Minor frame index where to branch. If the minor frame index is different than the current minor frame and that branchMsgIndex is not 0xFFFF, when the conditional branch will be finished, the BC will continue with the next minor frame (skipping the commands after the conditional branch). If the minor frame index is the same as the current minor frame and that branchMsgIndex is not 0xFFFF, when the conditional branch will be finished, the BC will continue with the next command following the conditional branch.
uint16 MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG::branchMsgIndex |
Message index (in the specified branchMinorIndex minor frame) where to branch.
If branchMsgIndex is set to 0xFFFF, this will cause the condition to branch to the minor frame branchMinorIndex directly (Supported on Enhanced module only). The BC will wait for the minor frame rate before branching except if the MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG_OPT_NEXTFRAME_NOW option is specified (options).
uint16 MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG::modulo |
Allows to skip transmission of the message. Minimum is 1 and maximum is 256. A modulo of 1 sends the message each time the minor frame is executed. A modulo of 2 sends the message once and then skips the next time and so on. On IPM-1553-MRT, the modulo must be set to 1.
uint16 MXF_MIL1553_TXPERIODIC_MJRFRAME_MSG::reserved[2] |
Reserved for future use. Must be set to 0 when calling mxfTxPeriodicMajorFrameSet() function.