├── ARINC429 Device Driver.xcodeproj
├── xcuserdata
│ └── e11337.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints.xcbkptlist
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ ├── test.xcscheme
│ │ ├── msq_reader.xcscheme
│ │ ├── ARINC429rcvUDP.xcscheme
│ │ ├── ARINC429subUDP.xcscheme
│ │ └── ARINC429sndUDP.xcscheme
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── e11337.xcuserdatad
│ │ ├── UserInterfaceState.xcuserstate
│ │ └── WorkspaceSettings.xcsettings
└── project.pbxproj
├── README.md
├── ARINC429rcvUDP
├── xplanetransform.h
├── simmsq.h
├── xplanetransform.c
├── simmsq.c
├── ARINC429rcvUDP.1
└── ARINC429rcvUDP.c
├── msq_reader
├── msq_reader.c
└── msq_reader.1
└── ARINC429sndUDP
├── simmsq.h
├── arinctransform.h
├── simmsq.c
├── ARINC429sndUDP.1
├── arinctransform.c
└── ARINC429sndUDP.c
/ARINC429 Device Driver.xcodeproj/xcuserdata/e11337.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/ARINC429 Device Driver.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ARINC429 Device Driver.xcodeproj/project.xcworkspace/xcuserdata/e11337.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CurdZechmeister/ARINC429DeviceDriver/HEAD/ARINC429 Device Driver.xcodeproj/project.xcworkspace/xcuserdata/e11337.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/ARINC429 Device Driver.xcodeproj/project.xcworkspace/xcuserdata/e11337.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges
6 |
7 | SnapshotAutomaticallyBeforeSignificantChanges
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ARINC429DeviceDriver
2 | ====================
3 |
4 | Version 0.1
5 |
6 | ARINC 429 Device Driver for Flight Simulator Integration. The current version integrates with the Laminar Research X-Plane flight simulator only.
7 |
8 | Software Components
9 | ===================
10 |
11 | ARINC429rcvUDP -> UDP Driver for receiving ARINC 429 data over Ethernet from an ARINC 429 interface.
12 | ARINC429sndUDP -> UDP Driver for sending ARINC 429 data over Ethernet to an ARINC 429 interface.
13 |
14 |
15 |
--------------------------------------------------------------------------------
/ARINC429rcvUDP/xplanetransform.h:
--------------------------------------------------------------------------------
1 | //
2 | // xplanetransform.h
3 | // ARINC429rcvUDP
4 | //
5 | // Created by Curd Zechmeister on 12/12/12.
6 | // Copyright (c) 2012 Curd Zechmeister. All rights reserved.
7 | //
8 |
9 | #ifndef ARINC429rcvUDP_xplanetransform_h
10 | #define ARINC429rcvUDP_xplanetransform_h
11 |
12 | unsigned int vhf030ToSim( unsigned int value );
13 | int getARINCsdi( unsigned int value );
14 |
15 | unsigned int hf205ToSim( unsigned int value );
16 | int getARINChfWord( unsigned int value );
17 |
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/msq_reader/msq_reader.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | struct my_msgbuf {
9 | long mtype;
10 | unsigned int label;
11 | unsigned int value;
12 | };
13 |
14 | int main(void)
15 | {
16 | struct my_msgbuf buf;
17 | int msqid;
18 | key_t key;
19 |
20 | key = 5789;
21 |
22 | if ((msqid = msgget(key, 0644)) == -1) { /* connect to the queue */
23 | perror("msgget");
24 | exit(1);
25 | }
26 |
27 | printf("Dump the TAP queue elements.\n");
28 |
29 | /* Read the message queue until force quit */
30 | for(;;) {
31 |
32 | memset( &buf, '\0', sizeof(struct my_msgbuf));
33 | if (msgrcv(msqid, &buf, 8, 0, 0) == -1) {
34 | perror("msgrcv");
35 | exit(1);
36 | }
37 | printf("Queue element: Type %li Label %o Value %i\n",
38 | buf.mtype, buf.label, buf.value);
39 | }
40 |
41 | return 0;
42 | }
43 |
44 |
45 |
--------------------------------------------------------------------------------
/ARINC429 Device Driver.xcodeproj/xcuserdata/e11337.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | ARINC429rcvUDP.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 | ARINC429sndUDP.xcscheme
13 |
14 | orderHint
15 | 4
16 |
17 | ARINC429subUDP.xcscheme
18 |
19 | orderHint
20 | 3
21 |
22 | msq_reader.xcscheme
23 |
24 | orderHint
25 | 2
26 |
27 | test.xcscheme
28 |
29 | orderHint
30 | 1
31 |
32 |
33 | SuppressBuildableAutocreation
34 |
35 | 6C9A5B061678226D00703C16
36 |
37 | primary
38 |
39 |
40 | 6CB1AE31167BB86300FB4F9C
41 |
42 | primary
43 |
44 |
45 | 6CB1AE3F167BB98D00FB4F9C
46 |
47 | primary
48 |
49 |
50 | 6CB1AE51167BBAFF00FB4F9C
51 |
52 | primary
53 |
54 |
55 | 6CB1AE89167BC06900FB4F9C
56 |
57 | primary
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/ARINC429sndUDP/simmsq.h:
--------------------------------------------------------------------------------
1 | /*
2 | * ARINC 429 Subsystem With UDP
3 | *
4 | * This subsytem reads flight simulator exported data from a defined
5 | * IPC Message Queue, performs ARINC 429 compliant data transformation
6 | * to the BNR and BCD formats required by specific labels and sends the
7 | * ARINC 429 payload data to a device driver via UDP.
8 | *
9 | * Disclaimer: This software is not DO-178B/C certified and is not for use
10 | * in actual flight training devices. The code and methos used for data
11 | * transfer are not in full compliance with any standards based on ARINC
12 | * 419 and/or ARINC 429. For more information on DO-178B and the
13 | * ARINC 419/429 standards please visit http://www.rtca.org and
14 | * http://www.arinc.com
15 | *
16 | * Copyright (C) 2012 Curd S. Zechmeister
17 | *
18 | * This program is free software: you can redistribute it and/or modify
19 | * it under the terms of the GNU General Public License as published by
20 | * the Free Software Foundation, either version 3 of the License, or
21 | * any later version.
22 | *
23 | * This program is distributed in the hope that it will be useful,
24 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 | * GNU General Public License for more details.
27 | *
28 | * You should have received a copy of the GNU General Public License
29 | * along with this program. If not, see .
30 | *
31 | */
32 |
33 | #ifndef ARINC429SubUDP_simmsq_h
34 | #define ARINC429SubUDP_simmsq_h
35 |
36 | int simMessageQ( key_t key );
37 | int simRXMessage( int msqid, char* rxBuffer, int size );
38 |
39 |
40 | #endif
41 |
--------------------------------------------------------------------------------
/ARINC429rcvUDP/simmsq.h:
--------------------------------------------------------------------------------
1 | /*
2 | * ARINC 429 Subsystem With UDP
3 | *
4 | * This subsytem reads flight simulator exported data from a defined
5 | * IPC Message Queue, performs ARINC 429 compliant data transformation
6 | * to the BNR and BCD formats required by specific labels and sends the
7 | * ARINC 429 payload data to a device driver via UDP.
8 | *
9 | * Disclaimer: This software is not DO-178B/C certified and is not for use
10 | * in actual flight training devices. The code and methos used for data
11 | * transfer are not in full compliance with any standards based on ARINC
12 | * 419 and/or ARINC 429. For more information on DO-178B and the
13 | * ARINC 419/429 standards please visit http://www.rtca.org and
14 | * http://www.arinc.com
15 | *
16 | * Copyright (C) 2012 Curd S. Zechmeister
17 | *
18 | * This program is free software: you can redistribute it and/or modify
19 | * it under the terms of the GNU General Public License as published by
20 | * the Free Software Foundation, either version 3 of the License, or
21 | * any later version.
22 | *
23 | * This program is distributed in the hope that it will be useful,
24 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 | * GNU General Public License for more details.
27 | *
28 | * You should have received a copy of the GNU General Public License
29 | * along with this program. If not, see .
30 | *
31 | */
32 |
33 | #ifndef ARINC429SubUDP_simmsq_h
34 | #define ARINC429SubUDP_simmsq_h
35 |
36 | int simMessageQ( key_t key );
37 | int simRXMessage( int msqid, char* rxBuffer, int size );
38 | int simTXMessage( int msqid, char* rxBuffer, int size );
39 |
40 | #endif
41 |
--------------------------------------------------------------------------------
/ARINC429sndUDP/arinctransform.h:
--------------------------------------------------------------------------------
1 | /*
2 | * ARINC 429 Subsystem With UDP
3 | *
4 | * This subsytem reads flight simulator exported data from a defined
5 | * IPC Message Queue, performs ARINC 429 compliant data transformation
6 | * to the BNR and BCD formats required by specific labels and sends the
7 | * ARINC 429 payload data to a device driver via UDP.
8 | *
9 | * Disclaimer: This software is not DO-178B/C certified and is not for use
10 | * in actual flight training devices. The code and methos used for data
11 | * transfer are not in full compliance with any standards based on ARINC
12 | * 419 and/or ARINC 429. For more information on DO-178B and the
13 | * ARINC 419/429 standards please visit http://www.rtca.org and
14 | * http://www.arinc.com
15 | *
16 | * Copyright (C) 2012 Curd S. Zechmeister
17 | *
18 | * This program is free software: you can redistribute it and/or modify
19 | * it under the terms of the GNU General Public License as published by
20 | * the Free Software Foundation, either version 3 of the License, or
21 | * any later version.
22 | *
23 | * This program is distributed in the hope that it will be useful,
24 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 | * GNU General Public License for more details.
27 | *
28 | * You should have received a copy of the GNU General Public License
29 | * along with this program. If not, see .
30 | *
31 | */
32 |
33 | #ifndef ARINC429SubUDP_arinctransform_h
34 | #define ARINC429SubUDP_arinctransform_h
35 |
36 | /* Floating Point to BNR Conversions */
37 | unsigned int float2BNR ( float value );
38 | unsigned int floatDEG2BNR ( float value );
39 |
40 | /* Floating Point to BCD Conversions */
41 | unsigned int float2BCD3 ( float value, int numberDigits, int numberDecimal );
42 | unsigned int float2BCD4 ( float value, int numberDigits, int numberDecimal );
43 |
44 | void parityOdd( unsigned int *value, unsigned int *label );
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/ARINC429rcvUDP/xplanetransform.c:
--------------------------------------------------------------------------------
1 | //
2 | // xplanetransform.c
3 | // ARINC429rcvUDP
4 | //
5 | // Created by Curd Zechmeister on 12/12/12.
6 | // Copyright (c) 2012 Curd Zechmeister. All rights reserved.
7 | //
8 |
9 | #include
10 |
11 | /*
12 | * Extract the SDI from the provided 24bit ARINC 429 data value.
13 | */
14 | int getARINCsdi( unsigned int value ) {
15 |
16 | int sdi;
17 | sdi = (value & 0x3);
18 |
19 | return( sdi );
20 |
21 | } // end getARINCsdi
22 |
23 | /*
24 | * LABEL 030 - VHF Communcations
25 | * BNC and special data decode from the ARINC 429 data field to the simulator
26 | * compatible data format as an integer representation in Hz.
27 | */
28 | unsigned int vhf030ToSim( unsigned int value ) {
29 |
30 | unsigned int bncData;
31 | unsigned int simData;
32 |
33 | bncData = value;
34 | simData = ((bncData>>2) & 0xF);
35 | bncData = value;
36 | simData += ((bncData>>6) & 0xF) * 10;
37 | bncData = value;
38 | simData += ((bncData>>10) & 0xF) * 100;
39 | bncData = value;
40 | simData += ((bncData>>14) & 0xF) * 1000;
41 | bncData = value;
42 | simData += ((bncData>>18) & 0x7) * 10000;
43 | simData += 100000;
44 |
45 | return ( simData );
46 |
47 | } // end vhf030ToSim
48 |
49 | /*
50 | * Get the word number from the LABEL 205 HF word field.
51 | */
52 | int getARINChfWord( unsigned int value ) {
53 |
54 | int hfWord;
55 | hfWord = ((value>>2) & 0x1);
56 |
57 | return (hfWord);
58 | }
59 |
60 | /*
61 | * LABEL 205 - HF Communications
62 | * BNC and special data decode from the ARINC 429 data field to the simulator
63 | * compatible data format as an integer representation in Hz.
64 | */
65 | unsigned int hf205ToSim( unsigned int value ) {
66 |
67 | unsigned int bncData;
68 | unsigned int simData;
69 |
70 | bncData = value;
71 | simData = ((bncData>>3) & 0xF);
72 | bncData = value;
73 | simData += ((bncData>>7) & 0xF) * 10;
74 | bncData = value;
75 | simData += ((bncData>>11) & 0xF) * 100;
76 | bncData = value;
77 | simData += ((bncData>>15) & 0xF) * 1000;
78 | bncData = value;
79 | simData += ((bncData>>19) & 0x3) * 10000;
80 |
81 | return ( simData );
82 |
83 | } // end hf205ToSim
84 |
85 |
86 |
--------------------------------------------------------------------------------
/ARINC429sndUDP/simmsq.c:
--------------------------------------------------------------------------------
1 | /*
2 | * ARINC 429 Subsystem With UDP
3 | *
4 | * This subsytem reads flight simulator exported data from a defined
5 | * IPC Message Queue, performs ARINC 429 compliant data transformation
6 | * to the BNR and BCD formats required by specific labels and sends the
7 | * ARINC 429 payload data to a device driver via UDP.
8 | *
9 | * Disclaimer: This software is not DO-178B/C certified and is not for use
10 | * in actual flight training devices. The code and methos used for data
11 | * transfer are not in full compliance with any standards based on ARINC
12 | * 419 and/or ARINC 429. For more information on DO-178B and the
13 | * ARINC 419/429 standards please visit http://www.rtca.org and
14 | * http://www.arinc.com
15 | *
16 | * Copyright (C) 2012 Curd S. Zechmeister
17 | *
18 | * This program is free software: you can redistribute it and/or modify
19 | * it under the terms of the GNU General Public License as published by
20 | * the Free Software Foundation, either version 3 of the License, or
21 | * any later version.
22 | *
23 | * This program is distributed in the hope that it will be useful,
24 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 | * GNU General Public License for more details.
27 | *
28 | * You should have received a copy of the GNU General Public License
29 | * along with this program. If not, see .
30 | *
31 | */
32 |
33 | #include
34 | #include
35 | #include
36 | #include
37 | #include
38 |
39 | /*
40 | * Attach to the message queue run by TAP
41 | */
42 | int simMessageQ( key_t key ) {
43 |
44 | int msqid;
45 |
46 | /* Attach to the queue with the IPC key */
47 | if ( (msqid = msgget( key, IPC_CREAT | 0666 )) < 0) {
48 | printf("TAP Queue not available.\n");
49 | return( -1 );
50 | }
51 |
52 | return( msqid );
53 |
54 | } // end simMessage
55 |
56 | /*
57 | * Read a message from the queue
58 | */
59 | int simRXMessage( int msqid, void* rxBuffer, int size ) {
60 |
61 | if( msgrcv( msqid, rxBuffer, size, 1, 0) < 0 )
62 | return -1;
63 |
64 | return 0;
65 |
66 | } // end simRXMessage
--------------------------------------------------------------------------------
/ARINC429rcvUDP/simmsq.c:
--------------------------------------------------------------------------------
1 | /*
2 | * ARINC 429 Subsystem With UDP
3 | *
4 | * This subsytem reads flight simulator exported data from a defined
5 | * IPC Message Queue, performs ARINC 429 compliant data transformation
6 | * to the BNR and BCD formats required by specific labels and sends the
7 | * ARINC 429 payload data to a device driver via UDP.
8 | *
9 | * Disclaimer: This software is not DO-178B/C certified and is not for use
10 | * in actual flight training devices. The code and methos used for data
11 | * transfer are not in full compliance with any standards based on ARINC
12 | * 419 and/or ARINC 429. For more information on DO-178B and the
13 | * ARINC 419/429 standards please visit http://www.rtca.org and
14 | * http://www.arinc.com
15 | *
16 | * Copyright (C) 2012 Curd S. Zechmeister
17 | *
18 | * This program is free software: you can redistribute it and/or modify
19 | * it under the terms of the GNU General Public License as published by
20 | * the Free Software Foundation, either version 3 of the License, or
21 | * any later version.
22 | *
23 | * This program is distributed in the hope that it will be useful,
24 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 | * GNU General Public License for more details.
27 | *
28 | * You should have received a copy of the GNU General Public License
29 | * along with this program. If not, see .
30 | *
31 | */
32 |
33 | #include
34 | #include
35 | #include
36 | #include
37 | #include
38 |
39 | /*
40 | * Attach to the message queue run by TAP
41 | */
42 | int simMessageQ( key_t key ) {
43 |
44 | int msqid;
45 |
46 | /* Attach to the queue with the IPC key */
47 | if ( (msqid = msgget( key, IPC_CREAT | 0666 )) < 0) {
48 | printf("TAP Queue not available.\n");
49 | return( -1 );
50 | }
51 |
52 | return( msqid );
53 |
54 | } // end simMessage
55 |
56 | /*
57 | * Read a simulator message from the queue
58 | */
59 | int simRXMessage( int msqid, void* rxBuffer, int size ) {
60 |
61 | if( msgrcv( msqid, rxBuffer, size, 1, 0) < 0 )
62 | return -1;
63 |
64 | return 0;
65 |
66 | } // end simRXMessage
67 |
68 | /*
69 | * Read a message for the simulator to the queue
70 | */
71 | int simTXMessage( int msqid, void* txBuffer, int size ) {
72 |
73 | if( msgsnd( msqid, txBuffer, size, 0) == -1 )
74 | return -1;
75 |
76 | return 0;
77 |
78 | } // end simRTMessage
--------------------------------------------------------------------------------
/msq_reader/msq_reader.1:
--------------------------------------------------------------------------------
1 | .\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples.
2 | .\"See Also:
3 | .\"man mdoc.samples for a complete listing of options
4 | .\"man mdoc for the short list of editing options
5 | .\"/usr/share/misc/mdoc.template
6 | .Dd 12/14/12 \" DATE
7 | .Dt msq_reader 1 \" Program name and manual section number
8 | .Os Darwin
9 | .Sh NAME \" Section Header - required - don't modify
10 | .Nm msq_reader,
11 | .\" The following lines are read in generating the apropos(man -k) database. Use only key
12 | .\" words here as the database is built based on the words here and in the .ND line.
13 | .Nm Other_name_for_same_program(),
14 | .Nm Yet another name for the same program.
15 | .\" Use .Nm macro to designate other names for the documented program.
16 | .Nd This line parsed for whatis database.
17 | .Sh SYNOPSIS \" Section Header - required - don't modify
18 | .Nm
19 | .Op Fl abcd \" [-abcd]
20 | .Op Fl a Ar path \" [-a path]
21 | .Op Ar file \" [file]
22 | .Op Ar \" [file ...]
23 | .Ar arg0 \" Underlined argument - use .Ar anywhere to underline
24 | arg2 ... \" Arguments
25 | .Sh DESCRIPTION \" Section Header - required - don't modify
26 | Use the .Nm macro to refer to your program throughout the man page like such:
27 | .Nm
28 | Underlining is accomplished with the .Ar macro like this:
29 | .Ar underlined text .
30 | .Pp \" Inserts a space
31 | A list of items with descriptions:
32 | .Bl -tag -width -indent \" Begins a tagged list
33 | .It item a \" Each item preceded by .It macro
34 | Description of item a
35 | .It item b
36 | Description of item b
37 | .El \" Ends the list
38 | .Pp
39 | A list of flags and their descriptions:
40 | .Bl -tag -width -indent \" Differs from above in tag removed
41 | .It Fl a \"-a flag as a list item
42 | Description of -a flag
43 | .It Fl b
44 | Description of -b flag
45 | .El \" Ends the list
46 | .Pp
47 | .\" .Sh ENVIRONMENT \" May not be needed
48 | .\" .Bl -tag -width "ENV_VAR_1" -indent \" ENV_VAR_1 is width of the string ENV_VAR_1
49 | .\" .It Ev ENV_VAR_1
50 | .\" Description of ENV_VAR_1
51 | .\" .It Ev ENV_VAR_2
52 | .\" Description of ENV_VAR_2
53 | .\" .El
54 | .Sh FILES \" File used or created by the topic of the man page
55 | .Bl -tag -width "/Users/joeuser/Library/really_long_file_name" -compact
56 | .It Pa /usr/share/file_name
57 | FILE_1 description
58 | .It Pa /Users/joeuser/Library/really_long_file_name
59 | FILE_2 description
60 | .El \" Ends the list
61 | .\" .Sh DIAGNOSTICS \" May not be needed
62 | .\" .Bl -diag
63 | .\" .It Diagnostic Tag
64 | .\" Diagnostic informtion here.
65 | .\" .It Diagnostic Tag
66 | .\" Diagnostic informtion here.
67 | .\" .El
68 | .Sh SEE ALSO
69 | .\" List links in ascending order by section, alphabetically within a section.
70 | .\" Please do not reference files that do not exist without filing a bug report
71 | .Xr a 1 ,
72 | .Xr b 1 ,
73 | .Xr c 1 ,
74 | .Xr a 2 ,
75 | .Xr b 2 ,
76 | .Xr a 3 ,
77 | .Xr b 3
78 | .\" .Sh BUGS \" Document known, unremedied bugs
79 | .\" .Sh HISTORY \" Document history if command behaves in a unique manner
--------------------------------------------------------------------------------
/ARINC429rcvUDP/ARINC429rcvUDP.1:
--------------------------------------------------------------------------------
1 | .\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples.
2 | .\"See Also:
3 | .\"man mdoc.samples for a complete listing of options
4 | .\"man mdoc for the short list of editing options
5 | .\"/usr/share/misc/mdoc.template
6 | .Dd 12/11/12 \" DATE
7 | .Dt ARINC429rcvUDP 1 \" Program name and manual section number
8 | .Os Darwin
9 | .Sh NAME \" Section Header - required - don't modify
10 | .Nm ARINC429rcvUDP,
11 | .\" The following lines are read in generating the apropos(man -k) database. Use only key
12 | .\" words here as the database is built based on the words here and in the .ND line.
13 | .Nm Other_name_for_same_program(),
14 | .Nm Yet another name for the same program.
15 | .\" Use .Nm macro to designate other names for the documented program.
16 | .Nd This line parsed for whatis database.
17 | .Sh SYNOPSIS \" Section Header - required - don't modify
18 | .Nm
19 | .Op Fl abcd \" [-abcd]
20 | .Op Fl a Ar path \" [-a path]
21 | .Op Ar file \" [file]
22 | .Op Ar \" [file ...]
23 | .Ar arg0 \" Underlined argument - use .Ar anywhere to underline
24 | arg2 ... \" Arguments
25 | .Sh DESCRIPTION \" Section Header - required - don't modify
26 | Use the .Nm macro to refer to your program throughout the man page like such:
27 | .Nm
28 | Underlining is accomplished with the .Ar macro like this:
29 | .Ar underlined text .
30 | .Pp \" Inserts a space
31 | A list of items with descriptions:
32 | .Bl -tag -width -indent \" Begins a tagged list
33 | .It item a \" Each item preceded by .It macro
34 | Description of item a
35 | .It item b
36 | Description of item b
37 | .El \" Ends the list
38 | .Pp
39 | A list of flags and their descriptions:
40 | .Bl -tag -width -indent \" Differs from above in tag removed
41 | .It Fl a \"-a flag as a list item
42 | Description of -a flag
43 | .It Fl b
44 | Description of -b flag
45 | .El \" Ends the list
46 | .Pp
47 | .\" .Sh ENVIRONMENT \" May not be needed
48 | .\" .Bl -tag -width "ENV_VAR_1" -indent \" ENV_VAR_1 is width of the string ENV_VAR_1
49 | .\" .It Ev ENV_VAR_1
50 | .\" Description of ENV_VAR_1
51 | .\" .It Ev ENV_VAR_2
52 | .\" Description of ENV_VAR_2
53 | .\" .El
54 | .Sh FILES \" File used or created by the topic of the man page
55 | .Bl -tag -width "/Users/joeuser/Library/really_long_file_name" -compact
56 | .It Pa /usr/share/file_name
57 | FILE_1 description
58 | .It Pa /Users/joeuser/Library/really_long_file_name
59 | FILE_2 description
60 | .El \" Ends the list
61 | .\" .Sh DIAGNOSTICS \" May not be needed
62 | .\" .Bl -diag
63 | .\" .It Diagnostic Tag
64 | .\" Diagnostic informtion here.
65 | .\" .It Diagnostic Tag
66 | .\" Diagnostic informtion here.
67 | .\" .El
68 | .Sh SEE ALSO
69 | .\" List links in ascending order by section, alphabetically within a section.
70 | .\" Please do not reference files that do not exist without filing a bug report
71 | .Xr a 1 ,
72 | .Xr b 1 ,
73 | .Xr c 1 ,
74 | .Xr a 2 ,
75 | .Xr b 2 ,
76 | .Xr a 3 ,
77 | .Xr b 3
78 | .\" .Sh BUGS \" Document known, unremedied bugs
79 | .\" .Sh HISTORY \" Document history if command behaves in a unique manner
--------------------------------------------------------------------------------
/ARINC429sndUDP/ARINC429sndUDP.1:
--------------------------------------------------------------------------------
1 | .\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples.
2 | .\"See Also:
3 | .\"man mdoc.samples for a complete listing of options
4 | .\"man mdoc for the short list of editing options
5 | .\"/usr/share/misc/mdoc.template
6 | .Dd 12/14/12 \" DATE
7 | .Dt ARINC429sndUDP 1 \" Program name and manual section number
8 | .Os Darwin
9 | .Sh NAME \" Section Header - required - don't modify
10 | .Nm ARINC429sndUDP,
11 | .\" The following lines are read in generating the apropos(man -k) database. Use only key
12 | .\" words here as the database is built based on the words here and in the .ND line.
13 | .Nm Other_name_for_same_program(),
14 | .Nm Yet another name for the same program.
15 | .\" Use .Nm macro to designate other names for the documented program.
16 | .Nd This line parsed for whatis database.
17 | .Sh SYNOPSIS \" Section Header - required - don't modify
18 | .Nm
19 | .Op Fl abcd \" [-abcd]
20 | .Op Fl a Ar path \" [-a path]
21 | .Op Ar file \" [file]
22 | .Op Ar \" [file ...]
23 | .Ar arg0 \" Underlined argument - use .Ar anywhere to underline
24 | arg2 ... \" Arguments
25 | .Sh DESCRIPTION \" Section Header - required - don't modify
26 | Use the .Nm macro to refer to your program throughout the man page like such:
27 | .Nm
28 | Underlining is accomplished with the .Ar macro like this:
29 | .Ar underlined text .
30 | .Pp \" Inserts a space
31 | A list of items with descriptions:
32 | .Bl -tag -width -indent \" Begins a tagged list
33 | .It item a \" Each item preceded by .It macro
34 | Description of item a
35 | .It item b
36 | Description of item b
37 | .El \" Ends the list
38 | .Pp
39 | A list of flags and their descriptions:
40 | .Bl -tag -width -indent \" Differs from above in tag removed
41 | .It Fl a \"-a flag as a list item
42 | Description of -a flag
43 | .It Fl b
44 | Description of -b flag
45 | .El \" Ends the list
46 | .Pp
47 | .\" .Sh ENVIRONMENT \" May not be needed
48 | .\" .Bl -tag -width "ENV_VAR_1" -indent \" ENV_VAR_1 is width of the string ENV_VAR_1
49 | .\" .It Ev ENV_VAR_1
50 | .\" Description of ENV_VAR_1
51 | .\" .It Ev ENV_VAR_2
52 | .\" Description of ENV_VAR_2
53 | .\" .El
54 | .Sh FILES \" File used or created by the topic of the man page
55 | .Bl -tag -width "/Users/joeuser/Library/really_long_file_name" -compact
56 | .It Pa /usr/share/file_name
57 | FILE_1 description
58 | .It Pa /Users/joeuser/Library/really_long_file_name
59 | FILE_2 description
60 | .El \" Ends the list
61 | .\" .Sh DIAGNOSTICS \" May not be needed
62 | .\" .Bl -diag
63 | .\" .It Diagnostic Tag
64 | .\" Diagnostic informtion here.
65 | .\" .It Diagnostic Tag
66 | .\" Diagnostic informtion here.
67 | .\" .El
68 | .Sh SEE ALSO
69 | .\" List links in ascending order by section, alphabetically within a section.
70 | .\" Please do not reference files that do not exist without filing a bug report
71 | .Xr a 1 ,
72 | .Xr b 1 ,
73 | .Xr c 1 ,
74 | .Xr a 2 ,
75 | .Xr b 2 ,
76 | .Xr a 3 ,
77 | .Xr b 3
78 | .\" .Sh BUGS \" Document known, unremedied bugs
79 | .\" .Sh HISTORY \" Document history if command behaves in a unique manner
--------------------------------------------------------------------------------
/ARINC429 Device Driver.xcodeproj/xcuserdata/e11337.xcuserdatad/xcschemes/test.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/ARINC429 Device Driver.xcodeproj/xcuserdata/e11337.xcuserdatad/xcschemes/msq_reader.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/ARINC429 Device Driver.xcodeproj/xcuserdata/e11337.xcuserdatad/xcschemes/ARINC429rcvUDP.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/ARINC429 Device Driver.xcodeproj/xcuserdata/e11337.xcuserdatad/xcschemes/ARINC429subUDP.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/ARINC429 Device Driver.xcodeproj/xcuserdata/e11337.xcuserdatad/xcschemes/ARINC429sndUDP.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
64 |
65 |
68 |
69 |
70 |
71 |
72 |
73 |
79 |
80 |
86 |
87 |
88 |
89 |
91 |
92 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/ARINC429rcvUDP/ARINC429rcvUDP.c:
--------------------------------------------------------------------------------
1 |
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include "xplanetransform.h"
9 | #include "simmsq.h"
10 |
11 | #define NPACK 10000
12 | #define PORT 25002
13 | #define PAYLOAD_SIZE 9
14 | #define MSQSZ 8
15 | #define MSQKEY 5789 // Queue key for TAP
16 | #define COM_RADIO 0
17 | #define NAV_RADIO 1
18 |
19 | /* UDP Packet Payload */
20 | struct _payload {
21 | unsigned int label;
22 | unsigned int value;
23 | };
24 |
25 |
26 | /* Message Queue Format */
27 | struct _msqstruct {
28 | long mtype;
29 | unsigned int label;
30 | unsigned int value;
31 | };
32 |
33 | void diep(char *s)
34 | {
35 | perror(s);
36 | printf("Error: %s", s);
37 | exit(1);
38 |
39 | }
40 |
41 |
42 | /*
43 | * Main Function
44 | */
45 | int main(void)
46 | {
47 |
48 | /* UDP Variable Setup */
49 | struct sockaddr_in si_me, si_other;
50 | socklen_t slen;
51 | int s;
52 | struct _payload *payload;
53 |
54 | /* MSQ Varible Setup */
55 | int key = MSQKEY;
56 | int msqid = 0;
57 | struct _msqstruct *msq = NULL;
58 |
59 |
60 | /* Assign Memory to the UDP payload */
61 | if ( (payload = (struct _payload *)malloc(sizeof(*payload))) == 0 ) {
62 | printf("payload memory allocation failed.\n");
63 | exit( -1 );
64 | }
65 | memset(payload,'\0',sizeof(*payload));
66 |
67 | /* Allocate Message Queue structure memory */
68 | if ((msq = malloc(sizeof(struct _msqstruct))) == 0) {
69 | printf("TAP message memory allocation failed.\n");
70 | exit( EXIT_FAILURE );
71 | }
72 | memset(msq, '\0', sizeof(struct _msqstruct));
73 |
74 | /* Attach to IPC message queue */
75 | if ( (msqid = simMessageQ( key )) == 0 ) {
76 | printf("TAP message queue not avilable.");
77 | exit( EXIT_FAILURE );
78 | } else {
79 | printf("TAP Queue Ready for Data\n");
80 | }
81 |
82 | /* Create the UDP Socket */
83 | if ((s=socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP))==-1)
84 | diep("socket");
85 |
86 | memset((char *) &si_me, 0, sizeof(si_me));
87 | si_me.sin_family = AF_INET;
88 | si_me.sin_port = htons(PORT);
89 | si_me.sin_addr.s_addr = htonl(INADDR_ANY);
90 | if (bind(s, (const struct sockaddr *) &si_me, sizeof(si_me))==-1)
91 | diep("bind");
92 |
93 |
94 | /*
95 | * Main program executio nloop. UDP packets will be received until an ARINC
96 | * label of 000 is sent, which will end the execution loop and close down
97 | * the device driver.
98 | */
99 | printf("ARINC429rcvUDP ready for traffic.\n");
100 | do {
101 |
102 | /* Clear UDP Payload */
103 | memset(payload,'\0',sizeof(*payload));
104 |
105 | if (recvfrom(s, payload, sizeof(*payload), 0,
106 | (struct sockaddr *)&si_other, &slen)==-1)
107 | diep("recvfrom()");
108 | printf("Received packet from %s:%d - Label %03o Value 0x%06X\n",
109 | inet_ntoa(si_other.sin_addr), ntohs(si_other.sin_port),
110 | payload->label, payload->value);
111 |
112 | msq->label = payload->label;
113 |
114 | /* Label Switchboard */
115 | switch (msq->label) {
116 |
117 | case 030:
118 | msq->mtype = getARINCsdi(payload->value);
119 | msq->value = vhf030ToSim(payload->value)/10;
120 | printf(" ↳ VHF Radio %li: %i\n",
121 | msq->mtype,
122 | msq->value);
123 | break;
124 | case 0205:
125 | if ( getARINChfWord(payload->value) == 0 ) {
126 | msq->mtype = getARINCsdi(payload->value);
127 | msq->value = hf205ToSim(payload->value);
128 | printf(" ↳ HF Radio %i Word %i: %i \n",
129 | getARINCsdi(payload->value),
130 | getARINChfWord(payload->value),
131 | msq->value );
132 | }
133 | break;
134 | default:
135 | printf("No rule found for Label %3o - Label Ignored\n",
136 | msq->label);
137 | break;
138 | }
139 |
140 | /* Write the new label and value into the queue to the simulator */
141 | if ( (simTXMessage(msqid, (void *)msq,
142 | sizeof(struct _msqstruct)-8)) != 0 ) {
143 | printf("IPC Queue Write Failed.\n");
144 | }
145 |
146 | } while ( payload->label != 0 );
147 |
148 | /* Close the UDP Socket Server down */
149 | close(s);
150 |
151 | /* Free memory allocations */
152 | free( payload );
153 | free( msq );
154 |
155 | printf("ARINC429rcv429 driver is exiting.\n");
156 | return 0;
157 |
158 | } // End ARINC429rcvUDP
159 |
--------------------------------------------------------------------------------
/ARINC429sndUDP/arinctransform.c:
--------------------------------------------------------------------------------
1 | /*
2 | * ARINC 429 Subsystem With UDP
3 | *
4 | * This subsytem reads flight simulator exported data from a defined
5 | * IPC Message Queue, performs ARINC 429 compliant data transformation
6 | * to the BNR and BCD formats required by specific labels and sends the
7 | * ARINC 429 payload data to a device driver via UDP.
8 | *
9 | * Disclaimer: This software is not DO-178B/C certified and is not for use
10 | * in actual flight training devices. The code and methos used for data
11 | * transfer are not in full compliance with any standards based on ARINC
12 | * 419 and/or ARINC 429. For more information on DO-178B and the
13 | * ARINC 419/429 standards please visit http://www.rtca.org and
14 | * http://www.arinc.com
15 | *
16 | * Copyright (C) 2012 Curd S. Zechmeister
17 | *
18 | * This program is free software: you can redistribute it and/or modify
19 | * it under the terms of the GNU General Public License as published by
20 | * the Free Software Foundation, either version 3 of the License, or
21 | * any later version.
22 | *
23 | * This program is distributed in the hope that it will be useful,
24 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 | * GNU General Public License for more details.
27 | *
28 | * You should have received a copy of the GNU General Public License
29 | * along with this program. If not, see .
30 | *
31 | */
32 |
33 | #include
34 | #include
35 |
36 | #define DEGFACTOR 0.000686644
37 |
38 | /*
39 | * Convert a floating point number ot a BNR without format
40 | * correction.
41 | */
42 | unsigned int float2BNR ( float value ) {
43 |
44 | unsigned int work = 0;
45 |
46 | /*ARINC 429 Adjustment*/
47 | work = ( (int) value)<<2 | 0x600000;
48 |
49 | return( work );
50 |
51 | } // End float2BNR
52 |
53 | /*
54 | * Convert a floating point Degree number to a BNR without format
55 | * correction.
56 | */
57 | unsigned int floatDEG2BNR ( float value ) {
58 |
59 | unsigned int work = 0;
60 | value = ( value / DEGFACTOR);
61 | work = 0x600000 | ( (int) value )<<2;
62 | return( work );
63 |
64 | } // End floatDEG2BNR
65 |
66 | /*
67 | * Convert an Integer to ARINC 429 BCD format with 3 digits output. If a decimal
68 | * number are to be displayed in BCD encoding, the input number has to be
69 | * multiplied by 10 to encode the digits to the right of the decimal point. This
70 | * function performs full 4 bit BCD encoding and will not work for certain
71 | * ARINC 429 words such as the BCD encoding for the ATC Transponer code.
72 | *
73 | * numberDigtis - number of BCDs to the left of the decimal
74 | * numberDecimal - number of BCDs to the right of the decimal
75 | */
76 | unsigned int float2BCD3 ( float value, int numberDigits, int numberDecimal ) {
77 |
78 | /* BCD Conversion */
79 | unsigned int bcdField = 0x00;
80 | int work = 0;
81 | char digit = 0x00;
82 | int bcdDigits = 0;
83 |
84 | if ( numberDecimal ) {
85 | work = (int) (value*pow(10,numberDecimal));
86 | } else {
87 | work = (int) value;
88 | }
89 |
90 | do {
91 |
92 | digit = work%10;
93 | bcdField |= (digit&0x0F)<<(bcdDigits*4);
94 |
95 | work /= 10;
96 | bcdDigits++;
97 |
98 | } while ( bcdDigits != (numberDigits+numberDecimal) );
99 |
100 | /* ARINC 429 Adjustment */
101 | bcdField = (bcdField<<6) & 0x1FFFFC;
102 | return( bcdField );
103 |
104 | } // end integer2BCD3
105 |
106 | /*
107 | * Convert an Integer to ARINC 429 BCD format with 4 digits output. If a decimal
108 | * number are to be displayed in BCD encoding, the input number has to be
109 | * multiplied by 10 to encode the digits to the right of the decimal point. This
110 | * function performs full 4 bit BCD encoding and will not work for certain
111 | * ARINC 429 words such as the BCD encoding for the ATC Transponer code.
112 | *
113 | * numberDigtis - number of BCDs to the left of the decimal
114 | * numberDecimal - number of BCDs to the right of the decimal
115 | */
116 | unsigned int float2BCD4 ( float value, int numberDigits, int numberDecimal ) {
117 |
118 | /* BCD Conversion */
119 | unsigned int bcdField = 0x00;
120 | int work = 0;
121 | char digit = 0x00;
122 | int bcdDigits = 0;
123 |
124 | if ( numberDecimal ) {
125 | work = (int) (value*pow(10,numberDecimal));
126 | } else {
127 | work = (int) value;
128 | }
129 |
130 | do {
131 |
132 | digit = work%10;
133 | bcdField |= (digit&0x0F)<<(bcdDigits*4);
134 |
135 | work /= 10;
136 | bcdDigits++;
137 |
138 | } while ( bcdDigits != (numberDigits+numberDecimal) );
139 |
140 | /* ARINC 429 Adjustment */
141 | bcdField = (bcdField<<2) & 0x1FFFFC;
142 | return( bcdField );
143 |
144 | } // end integer2BCD4
145 |
146 | /*
147 | * Compute odd partity and set MSB of the ARINC429 word as the odd parity bit
148 | */
149 | void parityOdd( unsigned int *value, unsigned int *label ) {
150 |
151 | unsigned int x;
152 | unsigned int parity = 0;
153 |
154 | for (x=0;x<8;x++)
155 | if ( *label & 0x1<.
30 | *
31 | */
32 |
33 | #include
34 | #include
35 | #include
36 | #include
37 | #include
38 | #include "simmsq.h"
39 | #include "arinctransform.h"
40 | #include
41 |
42 | #define MSGSZ 9 // Each message is 9 bytes long
43 | #define MSQKEY 5678 // Queue key for TAP
44 | #define METERS_PER_SEC 1.943844924406 // For meters/sec to KT convert
45 |
46 | /* UDP Payload Structure */
47 | struct _payload {
48 | unsigned int label;
49 | unsigned int value;
50 | };
51 |
52 | /* IPC Message Structure */
53 | struct _msqstruct {
54 | long mtype;
55 | unsigned int label;
56 | float value;
57 | };
58 |
59 |
60 | int main(int argc, char**argv)
61 | {
62 | int sockfd; // UDP Socket Handle
63 | struct sockaddr_in servaddr; // UDP Server Address structure
64 | struct _payload *payload = NULL; // UDP Packet Payload Structure
65 | int key = MSQKEY; // IPC Message Queue Key
66 | int msqid = 0; // IPC Message Queue ID
67 | struct _msqstruct *msq = NULL; // IPC Message Queue Structure
68 | char *argumentIP; // UDP Interface IP
69 | unsigned int argumentPort; // UDP Port
70 |
71 | int transmit = 0; // Transmit Flag
72 |
73 | float value001 = 0.0; // FMC DISTANCE TO-GO BCD √
74 | float value012 = 0.0; // IRS/FMC GROUND SPEED BCD √
75 | float value100 = 0.0; // VOR SELECTED RADIAL BNR √
76 | float value101 = 0.0; // APFDS HDG SELECT BNR √
77 | float value105 = 0.0; // ILS QFU BNR √
78 | float value114 = 0.0; // FMC NAV COURSE BNR √
79 | float value116 = 0.0; // FMC CROSS TRACK DISTANCE BNR
80 | float value117 = 0.0; // FMC NAV VERTICAL DEVIATION BNR
81 | float value162 = 0.0; // ADF BEARING BNR √
82 | float value173 = 0.0; // ILS LOCALIZER BNR
83 | float value174 = 0.0; // GLIDE SLOPE BNR
84 | float value222 = 0.0; // VOR Omniearing BNR √
85 | float value251 = 0.0; // VOR DME in 4096 increments BNR
86 | float value270 = 0.0; // FMC ALERT AND TO/FROM DISCRETE
87 | float value314 = 0.0; // FMC TRUE HEADING BNR
88 | float value320 = 0.0; // IRS MAGNETIC HEADING BNR √
89 | float value324 = 0.0; // ADI Pitch Angle BNR
90 | float value325 = 0.0; // ADI Roll Angle BNR
91 | float value321 = 0.0; // IRS DRIFT BNR
92 |
93 |
94 | /* Check for input values */
95 | if ( argc < 2 ) {
96 | printf("\nInvalid number of arguments.\n");
97 | printf("format: ARINC429subUDP device-IP udp-port\n");
98 | exit( EXIT_FAILURE );
99 | } else {
100 | printf("+----------------------------------------------------+\n");
101 | printf("| ARINC429SubUDP Starting in Foreground Mode |\n");
102 | printf("+----------------------------------------------------+\n");
103 | argumentIP = argv[1];
104 | argumentPort = atoi(argv[2]);
105 | }
106 |
107 |
108 | /* Allocate UDP payload memory */
109 | if ( (payload = (struct _payload *)malloc(MSGSZ)) == 0 ) {
110 | printf("payload memory allocation failed.\n");
111 | exit( EXIT_FAILURE );
112 | }
113 | memset(payload, '\0', MSGSZ);
114 |
115 | /* Allocate Message Queue structure memory */
116 | if ((msq = malloc(MSGSZ)) == 0) {
117 | printf("TAP message memory allocation failed.\n");
118 | exit( EXIT_FAILURE );
119 | }
120 | memset(msq, '\0', MSGSZ);
121 |
122 | /* Attach to IPC message queue */
123 | if ( (msqid = simMessageQ( key )) == 0 ) {
124 | printf("TAP message queue not avilable.");
125 | exit( EXIT_FAILURE );
126 | } else {
127 | printf("TAP Queue Ready for Data\n");
128 | }
129 |
130 | /* Create and attach to UDP Socket */
131 | sockfd=socket(AF_INET,SOCK_DGRAM,0);
132 |
133 | printf("Connecting to %s on port %i\n", argumentIP, argumentPort);
134 |
135 | bzero(&servaddr,sizeof(servaddr));
136 | servaddr.sin_family = AF_INET;
137 | servaddr.sin_addr.s_addr=inet_addr(argumentIP);
138 | servaddr.sin_port=htons(argumentPort);
139 |
140 | /*
141 | * Main program processing loop. Here we pull updates from the FIFO IPC
142 | * message queue, format the message value to ARINC 429 and send the
143 | * Label/Data combination on via UDP to a hardware driver running on another
144 | * hardare platform. Sending Label 000 to the susystem requests the sub-
145 | * system to stop. (Per ARINC 429 Att 11 System Label 000 is not used by
146 | * ARINC 429)
147 | */
148 | unsigned int *dataPayload = NULL;
149 | dataPayload = (unsigned int *)malloc(sizeof(unsigned int));
150 |
151 |
152 | /* Read a message from the IPC queue or wait for one to arrive since this is
153 | * a blocking read, messages are stored as a FIFO queue in two 32 bit words,
154 | * format: LSB |_Lablel_|_Data_| MSB
155 | */
156 | if ( (simRXMessage(msqid, (void *)msq, MSGSZ)) != 0 ) {
157 | printf("IPC Queue Read Failed.\n");
158 | }
159 |
160 | while ( msq->label )
161 | {
162 |
163 | /* DEBUG only */
164 | printf("Q-ID %li Label %03o Value %f\n",
165 | msq->mtype, msq->label, msq->value);
166 | payload->label = msq->label;
167 |
168 | transmit = 0;
169 |
170 | /* Switch label to the right processing method and ready the data to be
171 | transmitted */
172 | switch ( payload->label ) {
173 |
174 | case 01:
175 | if ( value001 != msq->value ) {
176 | *dataPayload = float2BCD4( msq->value, 3, 1 );
177 | parityOdd( dataPayload, &payload->label );
178 | value001 = msq->value;
179 | transmit = 1;
180 | }
181 | break;
182 | case 012:
183 | if ( value012 != (int) msq->value ) {
184 | *dataPayload = float2BCD3( (msq->value*METERS_PER_SEC),
185 | 3, 0 );
186 | parityOdd( dataPayload, &payload->label );
187 | value012 = (int) msq->value;
188 | transmit = 1;
189 | }
190 | break;
191 | case 0100:
192 | if ( value100 != msq->value ) {
193 | *dataPayload = floatDEG2BNR( msq->value );
194 | parityOdd( dataPayload, &payload->label );
195 | value100 = msq->value;
196 | transmit = 1;
197 | }
198 | break;
199 | case 0101:
200 | if ( value101 != msq->value ) {
201 | *dataPayload = floatDEG2BNR( msq->value );
202 | parityOdd( dataPayload, &payload->label );
203 | value101 = msq->value;
204 | transmit = 1;
205 | }
206 | break;
207 | case 0105:
208 | if ( value105 != msq->value ) {
209 | *dataPayload = floatDEG2BNR( msq->value );
210 | parityOdd( dataPayload, &payload->label );
211 | value105 = msq->value;
212 | transmit = 1;
213 | }
214 | break;
215 | case 0114:
216 | if ( value114 != msq->value ) {
217 | *dataPayload = floatDEG2BNR( msq->value );
218 | parityOdd( dataPayload, &payload->label );
219 | value114 = msq->value;
220 | transmit = 1;
221 | }
222 | break;
223 | case 0116:
224 | if ( value116 != msq->value ) {
225 | *dataPayload = 0x600000 |
226 | ((unsigned int)(msq->value*250.0))<<7;
227 | parityOdd( dataPayload, &payload->label );
228 | value116 = msq->value;
229 | transmit = 1;
230 | }
231 | break;
232 | case 0117:
233 | if ( value117 != msq->value ) {
234 | *dataPayload = 0x600000 |
235 | ((unsigned int)(msq->value*275.0))<<7;
236 | parityOdd( dataPayload, &payload->label );
237 | value117 = msq->value;
238 | transmit = 1;
239 | }
240 | break;
241 | case 0162:
242 | if ( value162 != msq->value ) {
243 | *dataPayload = floatDEG2BNR( msq->value );
244 | parityOdd( dataPayload, &payload->label );
245 | value162 = msq->value;
246 | transmit = 1;
247 | }
248 | break;
249 | case 0173:
250 | if ( value173 != msq->value ) {
251 | *dataPayload = floatDEG2BNR( msq->value );
252 | parityOdd( dataPayload, &payload->label );
253 | value173 = msq->value;
254 | transmit = 1;
255 | }
256 | break;
257 | case 0174:
258 | if ( value174 != msq->value ) {
259 | *dataPayload = 0x600000 |
260 | ((unsigned int)(msq->value*1000.0))<<7;
261 | parityOdd( dataPayload, &payload->label );
262 | value174 = msq->value;
263 | transmit = 1;
264 | }
265 | break;
266 | case 0222:
267 | if ( value222 != msq->value ) {
268 | *dataPayload = floatDEG2BNR( msq->value );
269 | parityOdd( dataPayload, &payload->label );
270 | value222 = msq->value;
271 | transmit = 1;
272 | }
273 | break;
274 | case 0251:
275 | if ( value251 != msq->value ) {
276 | *dataPayload = floatDEG2BNR( msq->value );
277 | parityOdd( dataPayload, &payload->label );
278 | value251 = msq->value;
279 | transmit = 1;
280 | }
281 | break;
282 | case 0270:
283 | if ( value270 != msq->value ) {
284 | if ( msq->value ) {
285 | *dataPayload = 0x680000;
286 | } else {
287 | *dataPayload = 0xE00000;
288 | }
289 | value270 = msq->value;
290 | transmit = 1;
291 | }
292 | break;
293 | case 0314:
294 | if ( value314 != msq->value ) {
295 | *dataPayload = floatDEG2BNR( msq->value );
296 | parityOdd( dataPayload, &payload->label );
297 | value314 = msq->value;
298 | transmit = 1;
299 | }
300 | break;
301 | case 0320:
302 | if ( value320 != msq->value ) {
303 | *dataPayload = floatDEG2BNR( msq->value );
304 | parityOdd( dataPayload, &payload->label);
305 | value320 = msq->value;
306 | transmit = 1;
307 | }
308 | break;
309 | case 0321:
310 | if ( value321 != msq->value ) {
311 | *dataPayload = floatDEG2BNR( msq->value );
312 | parityOdd( dataPayload, &payload->label );
313 | value100 = msq->value;
314 | transmit = 1;
315 | }
316 | break;
317 | case 0324:
318 | if ( value324 != msq->value ) {
319 | *dataPayload = floatDEG2BNR( msq->value );
320 | parityOdd( dataPayload, &payload->label);
321 | value324 = msq->value;
322 | transmit = 1;
323 | }
324 | break;
325 | case 0325:
326 | if ( value325 != msq->value ) {
327 | *dataPayload = floatDEG2BNR( msq->value );
328 | parityOdd( dataPayload, &payload->label);
329 | value325 = msq->value;
330 | transmit = 1;
331 | }
332 | break;
333 | case 0377:
334 | *dataPayload = 0x00;
335 | value100 = msq->value;
336 | transmit = 1;
337 | break;
338 | default:
339 | printf("No rule found for Label %03o. Label ignored.\n",
340 | payload->label);
341 | break;
342 |
343 | }
344 |
345 | /* Only transmit if the current label value has changed */
346 | if ( transmit ) {
347 |
348 | // Debug Message
349 | printf(" ↳ 24bit ARINC429 data 0x%06X\n",
350 | *dataPayload);
351 | payload->value = *dataPayload;
352 |
353 | if ( (sendto(sockfd,payload,
354 | sizeof(payload->value)+sizeof(payload->label),0,
355 | (struct sockaddr *)&servaddr,sizeof(servaddr))) == 0 )
356 | {
357 | printf("Send to UDP server failed.\n");
358 | exit( EXIT_FAILURE );
359 | }
360 |
361 | }
362 |
363 | /* Read next message from the IPC queue or wait for one to arrive since
364 | * this is a blocking read, messages are stored as a FIFO queue in two
365 | * 32 bit words, format: LSB |_Lablel_|_Data_| MSB
366 | */
367 | if ( (simRXMessage(msqid, (void *)msq, MSGSZ)) != 0 ) {
368 | printf("IPC Queue Read Failed.\n");
369 | }
370 |
371 | } // end main processing loop. ARINC Label o000 exits
372 |
373 | /* Cleanup */
374 | free(payload);
375 | free(msq);
376 | free(dataPayload);
377 |
378 | printf("ARINC 429 Subsystem for UDP Exiting.\n");
379 | return( EXIT_SUCCESS );
380 |
381 | } // End Main
--------------------------------------------------------------------------------
/ARINC429 Device Driver.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 6C84E2ED1678D93100AE4FE6 /* simmsq.c in Sources */ = {isa = PBXBuildFile; fileRef = 6C84E2EC1678D93100AE4FE6 /* simmsq.c */; };
11 | 6C84E2F01678DABE00AE4FE6 /* xplanetransform.c in Sources */ = {isa = PBXBuildFile; fileRef = 6C84E2EF1678DABE00AE4FE6 /* xplanetransform.c */; };
12 | 6C9A5B0C1678226E00703C16 /* ARINC429rcvUDP.c in Sources */ = {isa = PBXBuildFile; fileRef = 6C9A5B0B1678226E00703C16 /* ARINC429rcvUDP.c */; };
13 | 6C9A5B0E1678226E00703C16 /* ARINC429rcvUDP.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6C9A5B0D1678226E00703C16 /* ARINC429rcvUDP.1 */; };
14 | 6CB1AE44167BB98D00FB4F9C /* msq_reader.c in Sources */ = {isa = PBXBuildFile; fileRef = 6CB1AE43167BB98D00FB4F9C /* msq_reader.c */; };
15 | 6CB1AE46167BB98D00FB4F9C /* msq_reader.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6CB1AE45167BB98D00FB4F9C /* msq_reader.1 */; };
16 | 6CB1AE90167BC06900FB4F9C /* ARINC429sndUDP.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6CB1AE8F167BC06900FB4F9C /* ARINC429sndUDP.1 */; };
17 | 6CB1AE99167BC0AB00FB4F9C /* arinctransform.c in Sources */ = {isa = PBXBuildFile; fileRef = 6CB1AE94167BC0AB00FB4F9C /* arinctransform.c */; };
18 | 6CB1AE9A167BC0AB00FB4F9C /* ARINC429sndUDP.c in Sources */ = {isa = PBXBuildFile; fileRef = 6CB1AE96167BC0AB00FB4F9C /* ARINC429sndUDP.c */; };
19 | 6CB1AE9B167BC0AB00FB4F9C /* simmsq.c in Sources */ = {isa = PBXBuildFile; fileRef = 6CB1AE97167BC0AB00FB4F9C /* simmsq.c */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXCopyFilesBuildPhase section */
23 | 6C9A5B051678226D00703C16 /* CopyFiles */ = {
24 | isa = PBXCopyFilesBuildPhase;
25 | buildActionMask = 2147483647;
26 | dstPath = /usr/share/man/man1/;
27 | dstSubfolderSpec = 0;
28 | files = (
29 | 6C9A5B0E1678226E00703C16 /* ARINC429rcvUDP.1 in CopyFiles */,
30 | );
31 | runOnlyForDeploymentPostprocessing = 1;
32 | };
33 | 6CB1AE3E167BB98D00FB4F9C /* CopyFiles */ = {
34 | isa = PBXCopyFilesBuildPhase;
35 | buildActionMask = 2147483647;
36 | dstPath = /usr/share/man/man1/;
37 | dstSubfolderSpec = 0;
38 | files = (
39 | 6CB1AE46167BB98D00FB4F9C /* msq_reader.1 in CopyFiles */,
40 | );
41 | runOnlyForDeploymentPostprocessing = 1;
42 | };
43 | 6CB1AE88167BC06900FB4F9C /* CopyFiles */ = {
44 | isa = PBXCopyFilesBuildPhase;
45 | buildActionMask = 2147483647;
46 | dstPath = /usr/share/man/man1/;
47 | dstSubfolderSpec = 0;
48 | files = (
49 | 6CB1AE90167BC06900FB4F9C /* ARINC429sndUDP.1 in CopyFiles */,
50 | );
51 | runOnlyForDeploymentPostprocessing = 1;
52 | };
53 | /* End PBXCopyFilesBuildPhase section */
54 |
55 | /* Begin PBXFileReference section */
56 | 6C84E2EC1678D93100AE4FE6 /* simmsq.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = simmsq.c; sourceTree = ""; };
57 | 6C84E2EE1678D96000AE4FE6 /* simmsq.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = simmsq.h; sourceTree = ""; };
58 | 6C84E2EF1678DABE00AE4FE6 /* xplanetransform.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xplanetransform.c; sourceTree = ""; };
59 | 6C84E2F11678DAD300AE4FE6 /* xplanetransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xplanetransform.h; sourceTree = ""; };
60 | 6C9A5B071678226D00703C16 /* ARINC429rcvUDP */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ARINC429rcvUDP; sourceTree = BUILT_PRODUCTS_DIR; };
61 | 6C9A5B0B1678226E00703C16 /* ARINC429rcvUDP.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ARINC429rcvUDP.c; sourceTree = ""; };
62 | 6C9A5B0D1678226E00703C16 /* ARINC429rcvUDP.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = ARINC429rcvUDP.1; sourceTree = ""; };
63 | 6CB1AE40167BB98D00FB4F9C /* msq_reader */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = msq_reader; sourceTree = BUILT_PRODUCTS_DIR; };
64 | 6CB1AE43167BB98D00FB4F9C /* msq_reader.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = msq_reader.c; sourceTree = ""; };
65 | 6CB1AE45167BB98D00FB4F9C /* msq_reader.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = msq_reader.1; sourceTree = ""; };
66 | 6CB1AE8A167BC06900FB4F9C /* ARINC429sndUDP */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ARINC429sndUDP; sourceTree = BUILT_PRODUCTS_DIR; };
67 | 6CB1AE8F167BC06900FB4F9C /* ARINC429sndUDP.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = ARINC429sndUDP.1; sourceTree = ""; };
68 | 6CB1AE94167BC0AB00FB4F9C /* arinctransform.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = arinctransform.c; sourceTree = ""; };
69 | 6CB1AE95167BC0AB00FB4F9C /* arinctransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = arinctransform.h; sourceTree = ""; };
70 | 6CB1AE96167BC0AB00FB4F9C /* ARINC429sndUDP.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ARINC429sndUDP.c; sourceTree = ""; };
71 | 6CB1AE97167BC0AB00FB4F9C /* simmsq.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = simmsq.c; sourceTree = ""; };
72 | 6CB1AE98167BC0AB00FB4F9C /* simmsq.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = simmsq.h; sourceTree = ""; };
73 | /* End PBXFileReference section */
74 |
75 | /* Begin PBXFrameworksBuildPhase section */
76 | 6C9A5B041678226D00703C16 /* Frameworks */ = {
77 | isa = PBXFrameworksBuildPhase;
78 | buildActionMask = 2147483647;
79 | files = (
80 | );
81 | runOnlyForDeploymentPostprocessing = 0;
82 | };
83 | 6CB1AE3D167BB98D00FB4F9C /* Frameworks */ = {
84 | isa = PBXFrameworksBuildPhase;
85 | buildActionMask = 2147483647;
86 | files = (
87 | );
88 | runOnlyForDeploymentPostprocessing = 0;
89 | };
90 | 6CB1AE87167BC06900FB4F9C /* Frameworks */ = {
91 | isa = PBXFrameworksBuildPhase;
92 | buildActionMask = 2147483647;
93 | files = (
94 | );
95 | runOnlyForDeploymentPostprocessing = 0;
96 | };
97 | /* End PBXFrameworksBuildPhase section */
98 |
99 | /* Begin PBXGroup section */
100 | 6C9A5AFC1678226D00703C16 = {
101 | isa = PBXGroup;
102 | children = (
103 | 6C9A5B0A1678226D00703C16 /* ARINC429rcvUDP */,
104 | 6CB1AE42167BB98D00FB4F9C /* msq_reader */,
105 | 6CB1AE8C167BC06900FB4F9C /* ARINC429sndUDP */,
106 | 6C9A5B081678226D00703C16 /* Products */,
107 | );
108 | sourceTree = "";
109 | };
110 | 6C9A5B081678226D00703C16 /* Products */ = {
111 | isa = PBXGroup;
112 | children = (
113 | 6C9A5B071678226D00703C16 /* ARINC429rcvUDP */,
114 | 6CB1AE40167BB98D00FB4F9C /* msq_reader */,
115 | 6CB1AE8A167BC06900FB4F9C /* ARINC429sndUDP */,
116 | );
117 | name = Products;
118 | sourceTree = "";
119 | };
120 | 6C9A5B0A1678226D00703C16 /* ARINC429rcvUDP */ = {
121 | isa = PBXGroup;
122 | children = (
123 | 6C9A5B0B1678226E00703C16 /* ARINC429rcvUDP.c */,
124 | 6C9A5B0D1678226E00703C16 /* ARINC429rcvUDP.1 */,
125 | 6C84E2EC1678D93100AE4FE6 /* simmsq.c */,
126 | 6C84E2EE1678D96000AE4FE6 /* simmsq.h */,
127 | 6C84E2EF1678DABE00AE4FE6 /* xplanetransform.c */,
128 | 6C84E2F11678DAD300AE4FE6 /* xplanetransform.h */,
129 | );
130 | path = ARINC429rcvUDP;
131 | sourceTree = "";
132 | };
133 | 6CB1AE42167BB98D00FB4F9C /* msq_reader */ = {
134 | isa = PBXGroup;
135 | children = (
136 | 6CB1AE43167BB98D00FB4F9C /* msq_reader.c */,
137 | 6CB1AE45167BB98D00FB4F9C /* msq_reader.1 */,
138 | );
139 | path = msq_reader;
140 | sourceTree = "";
141 | };
142 | 6CB1AE8C167BC06900FB4F9C /* ARINC429sndUDP */ = {
143 | isa = PBXGroup;
144 | children = (
145 | 6CB1AE94167BC0AB00FB4F9C /* arinctransform.c */,
146 | 6CB1AE95167BC0AB00FB4F9C /* arinctransform.h */,
147 | 6CB1AE96167BC0AB00FB4F9C /* ARINC429sndUDP.c */,
148 | 6CB1AE97167BC0AB00FB4F9C /* simmsq.c */,
149 | 6CB1AE98167BC0AB00FB4F9C /* simmsq.h */,
150 | 6CB1AE8F167BC06900FB4F9C /* ARINC429sndUDP.1 */,
151 | );
152 | path = ARINC429sndUDP;
153 | sourceTree = "";
154 | };
155 | /* End PBXGroup section */
156 |
157 | /* Begin PBXNativeTarget section */
158 | 6C9A5B061678226D00703C16 /* ARINC429rcvUDP */ = {
159 | isa = PBXNativeTarget;
160 | buildConfigurationList = 6C9A5B111678226E00703C16 /* Build configuration list for PBXNativeTarget "ARINC429rcvUDP" */;
161 | buildPhases = (
162 | 6C9A5B031678226D00703C16 /* Sources */,
163 | 6C9A5B041678226D00703C16 /* Frameworks */,
164 | 6C9A5B051678226D00703C16 /* CopyFiles */,
165 | );
166 | buildRules = (
167 | );
168 | dependencies = (
169 | );
170 | name = ARINC429rcvUDP;
171 | productName = ARINC429rcvUDP;
172 | productReference = 6C9A5B071678226D00703C16 /* ARINC429rcvUDP */;
173 | productType = "com.apple.product-type.tool";
174 | };
175 | 6CB1AE3F167BB98D00FB4F9C /* msq_reader */ = {
176 | isa = PBXNativeTarget;
177 | buildConfigurationList = 6CB1AE47167BB98D00FB4F9C /* Build configuration list for PBXNativeTarget "msq_reader" */;
178 | buildPhases = (
179 | 6CB1AE3C167BB98D00FB4F9C /* Sources */,
180 | 6CB1AE3D167BB98D00FB4F9C /* Frameworks */,
181 | 6CB1AE3E167BB98D00FB4F9C /* CopyFiles */,
182 | );
183 | buildRules = (
184 | );
185 | dependencies = (
186 | );
187 | name = msq_reader;
188 | productName = msq_reader;
189 | productReference = 6CB1AE40167BB98D00FB4F9C /* msq_reader */;
190 | productType = "com.apple.product-type.tool";
191 | };
192 | 6CB1AE89167BC06900FB4F9C /* ARINC429sndUDP */ = {
193 | isa = PBXNativeTarget;
194 | buildConfigurationList = 6CB1AE91167BC06900FB4F9C /* Build configuration list for PBXNativeTarget "ARINC429sndUDP" */;
195 | buildPhases = (
196 | 6CB1AE86167BC06900FB4F9C /* Sources */,
197 | 6CB1AE87167BC06900FB4F9C /* Frameworks */,
198 | 6CB1AE88167BC06900FB4F9C /* CopyFiles */,
199 | );
200 | buildRules = (
201 | );
202 | dependencies = (
203 | );
204 | name = ARINC429sndUDP;
205 | productName = ARINC429sndUDP;
206 | productReference = 6CB1AE8A167BC06900FB4F9C /* ARINC429sndUDP */;
207 | productType = "com.apple.product-type.tool";
208 | };
209 | /* End PBXNativeTarget section */
210 |
211 | /* Begin PBXProject section */
212 | 6C9A5AFE1678226D00703C16 /* Project object */ = {
213 | isa = PBXProject;
214 | attributes = {
215 | LastUpgradeCheck = 0450;
216 | ORGANIZATIONNAME = "Curd Zechmeister";
217 | };
218 | buildConfigurationList = 6C9A5B011678226D00703C16 /* Build configuration list for PBXProject "ARINC429 Device Driver" */;
219 | compatibilityVersion = "Xcode 3.2";
220 | developmentRegion = English;
221 | hasScannedForEncodings = 0;
222 | knownRegions = (
223 | en,
224 | );
225 | mainGroup = 6C9A5AFC1678226D00703C16;
226 | productRefGroup = 6C9A5B081678226D00703C16 /* Products */;
227 | projectDirPath = "";
228 | projectRoot = "";
229 | targets = (
230 | 6C9A5B061678226D00703C16 /* ARINC429rcvUDP */,
231 | 6CB1AE3F167BB98D00FB4F9C /* msq_reader */,
232 | 6CB1AE89167BC06900FB4F9C /* ARINC429sndUDP */,
233 | );
234 | };
235 | /* End PBXProject section */
236 |
237 | /* Begin PBXSourcesBuildPhase section */
238 | 6C9A5B031678226D00703C16 /* Sources */ = {
239 | isa = PBXSourcesBuildPhase;
240 | buildActionMask = 2147483647;
241 | files = (
242 | 6C9A5B0C1678226E00703C16 /* ARINC429rcvUDP.c in Sources */,
243 | 6C84E2ED1678D93100AE4FE6 /* simmsq.c in Sources */,
244 | 6C84E2F01678DABE00AE4FE6 /* xplanetransform.c in Sources */,
245 | );
246 | runOnlyForDeploymentPostprocessing = 0;
247 | };
248 | 6CB1AE3C167BB98D00FB4F9C /* Sources */ = {
249 | isa = PBXSourcesBuildPhase;
250 | buildActionMask = 2147483647;
251 | files = (
252 | 6CB1AE44167BB98D00FB4F9C /* msq_reader.c in Sources */,
253 | );
254 | runOnlyForDeploymentPostprocessing = 0;
255 | };
256 | 6CB1AE86167BC06900FB4F9C /* Sources */ = {
257 | isa = PBXSourcesBuildPhase;
258 | buildActionMask = 2147483647;
259 | files = (
260 | 6CB1AE99167BC0AB00FB4F9C /* arinctransform.c in Sources */,
261 | 6CB1AE9A167BC0AB00FB4F9C /* ARINC429sndUDP.c in Sources */,
262 | 6CB1AE9B167BC0AB00FB4F9C /* simmsq.c in Sources */,
263 | );
264 | runOnlyForDeploymentPostprocessing = 0;
265 | };
266 | /* End PBXSourcesBuildPhase section */
267 |
268 | /* Begin XCBuildConfiguration section */
269 | 6C9A5B0F1678226E00703C16 /* Debug */ = {
270 | isa = XCBuildConfiguration;
271 | buildSettings = {
272 | ALWAYS_SEARCH_USER_PATHS = NO;
273 | ARCHS = "$(ARCHS_STANDARD_64_BIT)";
274 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
275 | CLANG_CXX_LIBRARY = "libc++";
276 | CLANG_ENABLE_OBJC_ARC = YES;
277 | CLANG_WARN_EMPTY_BODY = YES;
278 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
279 | COPY_PHASE_STRIP = NO;
280 | GCC_C_LANGUAGE_STANDARD = gnu99;
281 | GCC_DYNAMIC_NO_PIC = NO;
282 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
283 | GCC_OPTIMIZATION_LEVEL = 0;
284 | GCC_PREPROCESSOR_DEFINITIONS = (
285 | "DEBUG=1",
286 | "$(inherited)",
287 | );
288 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
289 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
290 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
291 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
292 | GCC_WARN_UNUSED_VARIABLE = YES;
293 | MACOSX_DEPLOYMENT_TARGET = 10.6;
294 | ONLY_ACTIVE_ARCH = YES;
295 | SDKROOT = macosx;
296 | };
297 | name = Debug;
298 | };
299 | 6C9A5B101678226E00703C16 /* Release */ = {
300 | isa = XCBuildConfiguration;
301 | buildSettings = {
302 | ALWAYS_SEARCH_USER_PATHS = NO;
303 | ARCHS = "$(ARCHS_STANDARD_64_BIT)";
304 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
305 | CLANG_CXX_LIBRARY = "libc++";
306 | CLANG_ENABLE_OBJC_ARC = YES;
307 | CLANG_WARN_EMPTY_BODY = YES;
308 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
309 | COPY_PHASE_STRIP = YES;
310 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
311 | GCC_C_LANGUAGE_STANDARD = gnu99;
312 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
313 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
314 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
315 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
316 | GCC_WARN_UNUSED_VARIABLE = YES;
317 | MACOSX_DEPLOYMENT_TARGET = 10.6;
318 | SDKROOT = macosx;
319 | };
320 | name = Release;
321 | };
322 | 6C9A5B121678226E00703C16 /* Debug */ = {
323 | isa = XCBuildConfiguration;
324 | buildSettings = {
325 | PRODUCT_NAME = "$(TARGET_NAME)";
326 | };
327 | name = Debug;
328 | };
329 | 6C9A5B131678226E00703C16 /* Release */ = {
330 | isa = XCBuildConfiguration;
331 | buildSettings = {
332 | PRODUCT_NAME = "$(TARGET_NAME)";
333 | };
334 | name = Release;
335 | };
336 | 6CB1AE48167BB98D00FB4F9C /* Debug */ = {
337 | isa = XCBuildConfiguration;
338 | buildSettings = {
339 | PRODUCT_NAME = "$(TARGET_NAME)";
340 | };
341 | name = Debug;
342 | };
343 | 6CB1AE49167BB98D00FB4F9C /* Release */ = {
344 | isa = XCBuildConfiguration;
345 | buildSettings = {
346 | PRODUCT_NAME = "$(TARGET_NAME)";
347 | };
348 | name = Release;
349 | };
350 | 6CB1AE92167BC06900FB4F9C /* Debug */ = {
351 | isa = XCBuildConfiguration;
352 | buildSettings = {
353 | PRODUCT_NAME = "$(TARGET_NAME)";
354 | };
355 | name = Debug;
356 | };
357 | 6CB1AE93167BC06900FB4F9C /* Release */ = {
358 | isa = XCBuildConfiguration;
359 | buildSettings = {
360 | PRODUCT_NAME = "$(TARGET_NAME)";
361 | };
362 | name = Release;
363 | };
364 | /* End XCBuildConfiguration section */
365 |
366 | /* Begin XCConfigurationList section */
367 | 6C9A5B011678226D00703C16 /* Build configuration list for PBXProject "ARINC429 Device Driver" */ = {
368 | isa = XCConfigurationList;
369 | buildConfigurations = (
370 | 6C9A5B0F1678226E00703C16 /* Debug */,
371 | 6C9A5B101678226E00703C16 /* Release */,
372 | );
373 | defaultConfigurationIsVisible = 0;
374 | defaultConfigurationName = Release;
375 | };
376 | 6C9A5B111678226E00703C16 /* Build configuration list for PBXNativeTarget "ARINC429rcvUDP" */ = {
377 | isa = XCConfigurationList;
378 | buildConfigurations = (
379 | 6C9A5B121678226E00703C16 /* Debug */,
380 | 6C9A5B131678226E00703C16 /* Release */,
381 | );
382 | defaultConfigurationIsVisible = 0;
383 | defaultConfigurationName = Release;
384 | };
385 | 6CB1AE47167BB98D00FB4F9C /* Build configuration list for PBXNativeTarget "msq_reader" */ = {
386 | isa = XCConfigurationList;
387 | buildConfigurations = (
388 | 6CB1AE48167BB98D00FB4F9C /* Debug */,
389 | 6CB1AE49167BB98D00FB4F9C /* Release */,
390 | );
391 | defaultConfigurationIsVisible = 0;
392 | defaultConfigurationName = Release;
393 | };
394 | 6CB1AE91167BC06900FB4F9C /* Build configuration list for PBXNativeTarget "ARINC429sndUDP" */ = {
395 | isa = XCConfigurationList;
396 | buildConfigurations = (
397 | 6CB1AE92167BC06900FB4F9C /* Debug */,
398 | 6CB1AE93167BC06900FB4F9C /* Release */,
399 | );
400 | defaultConfigurationIsVisible = 0;
401 | defaultConfigurationName = Release;
402 | };
403 | /* End XCConfigurationList section */
404 | };
405 | rootObject = 6C9A5AFE1678226D00703C16 /* Project object */;
406 | }
407 |
--------------------------------------------------------------------------------