MX Foundation 4
|
MIL 1553 Transmit / Receive (Acquisition) Record. More...
#include <mxf_class_mil1553.h>
Data Structures | |
union | service |
Data Fields | |
uint64 | timeTag |
uint32 | control |
uint32 | dataSize |
uint32 | repeatCount |
uint32 | reserved |
uint16 | data [36] |
This MIL 1553 record structure is needed when sending (transmission) and receiving (acquisition). In transmission, it is used by mxfTxPeriodicUpdateMsgWrite() function to update data of messages for BC and RT channel. It is also used by mxfTxAperiodicWrite() function to transmit BC aperiodic messages. In acquisition, it is used by mxfMIL1553RxAcqRead() function to read the received messages of BM, BC and RT channel.
uint64 MXF_MIL1553_DATAREC::timeTag |
Acquisition mode: Specifies the time when the data record has been received by the device. It is an absolute time expressed on the time base set for the device.
Transmission Mode: For aperiodic transmit operation, the time tag allows the application to specify the time at which the data is to be transmitted. Depending on the usage the time tag can be optional.
For periodic transmit operation, the time tag is not used and must be set to 0.
uint32 MXF_MIL1553_DATAREC::control |
For transmission, this is a bit field that enables the caller to override the current transmitter settings when transmitting the specified data records. A control of zero will transmit using the current channel setting. For acquisition, this bit field gives information about the receive record.
Receive control bit - message mode:
Bit option | Description |
---|---|
MXF_MIL1553_RX_REC_CTRL_MSG_BUS_B | The message was received on bus B, otherwise, the message was received on bus A. |
MXF_MIL1553_RX_REC_CTRL_MSG_MANCHESTER_ERROR | Manchester error detected. |
MXF_MIL1553_RX_REC_CTRL_MSG_CHECKSUM_ERROR | A message was received with a bad checksum word. (Available on module with 1760 option only). See mxfMsgAttributeUint64Set() function to enable the Checksum error detection. |
MXF_MIL1553_RX_REC_CTRL_MSG_PARITY_ERROR | Parity error detected. |
MXF_MIL1553_RX_REC_CTRL_MSG_EXTRA_BIT_ERROR | Extra bit error detected. |
MXF_MIL1553_RX_REC_CTRL_MSG_STATUS1_TOOFAST_ERROR | RT responded too fast. See KMXF_MIL1553_BM_MIN_RESPONSE_TIME attribute. |
MXF_MIL1553_RX_REC_CTRL_MSG_RT_RT | Indicates RT-RT command. |
MXF_MIL1553_RX_REC_CTRL_MSG_UNEXPECTED_ERROR | This data was unexpected. Examples of unexpected data are: data received without a command or command with an error. |
MXF_MIL1553_RX_REC_CTRL_MSG_STATUS2_TOOFAST_ERROR | The second RT of a RT-RT message responded too fast. See KMXF_MIL1553_BM_MIN_RESPONSE_TIME attribute. |
MXF_MIL1553_RX_REC_CTRL_MSG_STATUS_BADSYNC_ERROR | At least one of the data following a RT TX status has an invalid sync (normally an inverted sync). |
MXF_MIL1553_RX_REC_CTRL_MSG_STATUS1_RCV | Indicates that the status word was received and is included in the record. |
MXF_MIL1553_RX_REC_CTRL_MSG_STATUS2_RCV | Indicates that the second status word of the RT-RT message was received and is included in the record. |
MXF_MIL1553_RX_REC_CTRL_MSG_DATA_RCV | Indicates that data words were received and are included in the record. |
MXF_MIL1553_RX_REC_CTRL_MSG_MODECODE | Indicates Mode Code message. |
MXF_MIL1553_RX_REC_CTRL_MSG_BCST | Indicates Broadcast message. |
MXF_MIL1553_RX_REC_CTRL_MSG_DATA_LENGTH_ERROR | A message was received with a bad number of data words. |
MXF_MIL1553_RX_REC_CTRL_MSG_COMMAND | Indicates that the message has a command (or two if MXF_MIL1553_RX_REC_CTRL_MSG_RT_RT is set). |
MXF_MIL1553_RX_REC_CTRL_MSG_STATUS1_ADDRESS_ERROR | A message was received with a bad RT address in the status word. |
MXF_MIL1553_RX_REC_CTRL_MSG_STATUS2_ADDRESS_ERROR | A message was received with a bad RT address in the second RT-RT status word. |
MXF_MIL1553_RX_REC_CTRL_MSG_STATUS2_DATA_ERROR | The second RT-RT status was received with a data. |
MXF_MIL1553_RX_REC_CTRL_MSG_NO_RESPONSE | Indicates that a RT did not respond to the command. |
Receive control bit - string mode:
Bit option | Description |
---|---|
MXF_MIL1553_RX_REC_CTRL_STRING_BUS_B | The string was received on bus B, otherwise, the string was received on bus A. |
MXF_MIL1553_RX_REC_CTRL_STRING_MANCHESTER_ERROR | Manchester error detected. |
MXF_MIL1553_RX_REC_CTRL_STRING_PARITY_ERROR | Parity error detected. |
MXF_MIL1553_RX_REC_CTRL_STRING_CHECKSUM_ERROR | A string was received with a bad checksum word. (Available on module with 1760 option only). See mxfMsgAttributeUint64Set() function to enable the Checksum error detection. |
MXF_MIL1553_RX_REC_CTRL_STRING_EXTRA_BIT_ERROR | Extra bit error detected. |
MXF_MIL1553_RX_REC_CTRL_STRING_STATUS_TOOFAST_ERROR | RT responded too fast. See KMXF_MIL1553_BM_MIN_RESPONSE_TIME attribute. |
MXF_MIL1553_RX_REC_CTRL_STRING_RT_RT | Indicates RT-RT command. |
MXF_MIL1553_RX_REC_CTRL_STRING_UNEXPECTED_ERROR | This data was unexpected. Examples of unexpected data are: data received without a command or command with an error. |
MXF_MIL1553_RX_REC_CTRL_STRING_STATUS_BADSYNC_ERROR | At least one of the data following a RT TX status has an invalid sync (normally an inverted sync). |
MXF_MIL1553_RX_REC_CTRL_STRING_COMMAND | Indicates that the string has a command (or two if MXF_MIL1553_RX_REC_CTRL_STRING_RT_RT is set). |
Receive control bit - word mode:
Bit option | Description |
---|---|
MXF_MIL1553_RX_REC_CTRL_WORD_BUS_B | The word was received on bus B, otherwise, the word was received on bus A. |
MXF_MIL1553_RX_REC_CTRL_WORD_MSGTYPE (mask 2-bit) | Message type. - 0x00: Data word - 0x02: Word is an external command or status - 0x04: Word is a command - 0x06: Word is a status |
MXF_MIL1553_RX_REC_CTRL_WORD_MANCHESTER_ERROR | Manchester error detected. |
MXF_MIL1553_RX_REC_CTRL_WORD_PARITY_ERROR | Parity error detected. |
MXF_MIL1553_RX_REC_CTRL_WORD_CHECKSUM_ERROR | A word was received with a bad checksum word. Significant only when MXF_MIL1553_RX_REC_CTRL_WORD_EOS is also set. See mxfMsgAttributeUint64Set() function to enable the Checksum error detection. |
MXF_MIL1553_RX_REC_CTRL_WORD_EXTRA_BIT_ERROR | Extra bit error detected. |
MXF_MIL1553_RX_REC_CTRL_WORD_EOS | Indicates end of string. |
MXF_MIL1553_RX_REC_CTRL_WORD_GAP (mask 9-bit) | Gap, in ⅛ bit time, between the current and the preceding word received on the same bus. |
Transmit control bit - aperiodic mode:
Bit option | Description |
---|---|
MXF_MIL1553_TXAPERIODIC_REC_CTRL_RT_RT | Specifies that the message is a RT-RT command. |
MXF_MIL1553_TXAPERIODIC_REC_CTRL_BUS_B | Send this message on BUS B. Else, send it on BUS A. |
MXF_MIL1553_TXAPERIODIC_REC_CTRL_CHECKSUM_ENABLE | The checksum will be sent in place of the last data word. |
MXF_MIL1553_TXAPERIODIC_REC_CTRL_ERROR_INJ | The error injection will be used (errorIndex field must be initialized). |
MXF_MIL1553_TXAPERIODIC_REC_CTRL_GAP | Waits MXF_MIL1553_DATAREC.service.txAperiodic.delay, before transmitting. The delay is computed between the end of the preceding message on the same bus and the beginning of this one (gap). |
Transmit control bit - periodic mode:
Bit option | Description |
---|---|
MXF_MIL1553_TXPERIODIC_REC_CTRL_ERROR_INJ | The error injection will be used (errorIndex field must be initialized). |
MXF_MIL1553_TXPERIODIC_REC_CTRL_UPDATE_COMMAND | Overrides the command to send with the one given in data[0] (or commands in data[0] and data[1] for RT-RT command). |
uint32 MXF_MIL1553_DATAREC::dataSize |
Acquisition mode: Number of bytes received in data array.
Transmission Mode: Number of bytes to transmit from data array. For BC periodic update operation, dataSize can be 0 to inject an error without changing the data (useful, for example, to inject an error on a TX command).
uint32 MXF_MIL1553_DATAREC::repeatCount |
Acquisition mode: Not used.
Transmission Mode: Number of times to repeat the transmission of the record. For periodic operation, repeatCount must be greater than 0. For aperiodic operation, repeatCount is not used and must be set to 1.
uint32 MXF_MIL1553_DATAREC::reserved |
Reserved for future use. Must be set to 0 for transmit operation.
uint16 MXF_MIL1553_DATAREC::data[36] |
MIL-STD-1553 data array.
Acquisition mode: Data received.
Transmission Mode: For periodic transmission, the first datum (data[0]) is not used unless MXF_MIL1553_TXPERIODIC_REC_CTRL_UPDATE_COMMAND is specified in control field (BC only), but dataSize field must always include it. For aperiodic transmission, the first datum (data[0]) contains the command to transmit, followed by the data when necesssary (RX command). For RT-RT command, the first two datums contain the command.