Monday, 12 July 2010

An ARINC 661 tutorial: communication

A recent comment on my blog leads me to the necessity of continuing my list of tutorials about ARINC 661 development. Today will be about communication. hmm at least it will be the first of a list of posts on the subject, because if ARINC 661 XML definition is easy to grasp, I can't say the same thing about communications in the ARINC 661 world.

Don't be afraid. It's not because it's particularly complicated, but just because it's a binary communication protocol, so looking at the message can be a little cryptic.

Let's first say that ARINC 661 communication goes both ways: User Applications can ask for widgets (or even Layers) modifications, and the CDS Server will notify the relevant UA of any User event only on the Definition File it manages (remember the part about ApplicationI in my Hello World tutorial). Now you understand why this ApplicationId tag is very important.

Another important thing is that the standard does not mandate any transport protocol. The ARINC 661 communication protocol is just living on any transport protocol we choose. For example, ARINC 661 messages can be transmitted on the very simple UDP protocol, or TCP, or even complex avionics protocols like AFDX for example. On another point of view, one can encapsulate the ARINC 661 messages binary content, for example to add a checksum function to the transmission. ARINC 661 is agnostic on the way datas are transmitted. The only thing that matters is that you have to find somewhere on the network (in a way understood both by the UA and the CDS) the same array of datas.

Before going into the gory binary details, let's categorize what can goes from/to User Applications and CDS. ARINC 661 messages are composed of several binary blocks juxtaposed together called run-time commands (for UA to CDS communication) or Request/Notifications (from CDS to UA communication).

From UA to CDS:

  • A661_CMD_SET_PARAMETER: This is the basic command to change the value of one parameter of one widget in the widgets tree (for example, in the my Hello World tutorial, we would be able to change the color of the A661_LABEL widget, or it's text content, etc...).

  • A661_CMD_UA_REQUEST: A request from UA to CDS, about a Layer in general (for example activate or inactivate a layer, or render the Layer visible if it was not visible before)

From CDS to UA:

  • A661_NOTIFY_WIDGET_EVENT: To notify the UA that a user event has occurred on a widget

  • A661_NOTIFY_LAYER_EVENT: To notify the UA that an event has occurred on a Layer

  • A661_NOTIFY_EXCEPTION: To notify the UA of any exception occurring for the CDS

Do you want more? More on this in a few days, it's a promise!!