# ARINC 429¶

ARINC 429 is a data transfer standard widely used in avionics applications. This library section includes components for encoding and decoding ARINC 429 words. The implementations of these components make heavy use of the components from the Bitwise section of this library for manipulating the binary structure representing a message.

## ARINC 429 Decode and ARINC 429 Encode¶

The **ARINC 429 Decode** component splits apart a 32-bit ARINC word into individual fields. The **ARINC 429 Encode**
component does the opposite, assembling a 32-bit ARINC word out of individual fields. The 32-bit word consumed by the
Decode component and produced by the Encode component is represented as a *UInt32* value, with the bit labeled *Bit 1*
in the ARINC 429 standard treated as the lowest-order bit and the bit labeled *Bit 32* treated as the highest-order bit.
The fields produced by the Decode component and consumed by the Encode component are as follows:

- label
- Represented as a
UInt8value. The bit order of this field is reversed relative to the bit order in the 32-bit word, so that checking the label for equality with an octal constant in CertSAFE works correctly.- SDI
- Represented as an enumeration with values of
`00`

,`01`

,`10`

, and`11`

. Bit 10 is first and and Bit 9 is second.- data
- Represented as the low-order 19 bits of a
UInt32value, with Bit 11 being the lowest-order and Bit 29 the highest-order.- SSM
- Represented as an enumeration with values of
`00`

,`01`

,`10`

, and`11`

. Bit 31 is first and and Bit 30 is second.- valid parity
- A Boolean flag that is
`True`

when the parity of the ARINC word is valid. Unlike the other fields, this value is not directly extracted from the message, but is computed by checking whether the parity of the message is odd. Therefore, when encoding, this value should normally always be set to`True`

so that the resulting message is valid.

The Decode component is implemented primarily using Extract Field to break out the necessary bits from the input word. The Encode component is implemented by shifting the bits of the fields to the appropriate positions and bitwise-ORing them all together.

## Parity (UInt32), Parity Round, Reverse (UInt8), and Reverse Round¶

These components are used internally in the ARINC 429 Decode and ARINC 429 Encode components to implement parity computation and bitwise reversing. Since these operations are not available as primitives in CertSAFE, the example components use standard bit-twiddling hacks to implement these functions out of simpler bitwise manipulations.

## SDI Decode, SDI Encode, SSM Decode, and SSM Encode¶

These case tables are used internally in the ARINC 429 Decode and ARINC 429 Encode components to convert between bitfields and SDI/SSM enum values. Using enum types instead of integer types for the SDI and SSM fields makes the range of possible values clearer.