ICAROUS
All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Modules Pages
apInterface.h
Go to the documentation of this file.
1
5#ifndef _apInterface_h_
6#define _apInterface_h_
7
8#include "cfe.h"
9#include "cfe_error.h"
10#include "cfe_evs.h"
11#include "cfe_sb.h"
12#include "cfe_es.h"
13
14#include <string.h>
15#include <errno.h>
16#include <unistd.h>
17#include "network_includes.h"
18#include "apInterface_events.h"
19#include "Icarous_msg.h"
20#include "traffic_msg.h"
21#include "Icarous_msgids.h"
22#include "sch_msgids.h"
23#include "traffic_msgids.h"
24#include "port_lib.h"
25
26#define APINTERFACE_PIPE_NAME "APFLTPLAN"
27#define APINTERFACE_PIPE_DEPTH 100
28
29#define SCH_APINTERFACE_PIPE1_NAME "SCH_AUTOPILOT"
30
47typedef struct{
48 CFE_SB_PipeId_t INTERFACE_Pipe;
49 CFE_SB_PipeId_t SchInterface_Pipe;
50 CFE_SB_MsgPtr_t INTERFACEMsgPtr;
51 CFE_SB_MsgPtr_t Sch_MsgPtr;
52 CFE_TBL_Handle_t INTERFACE_tblHandle;
59 flightplan_t flightplan;
60
61 // You may need additional ports if data is obtained from other sensors
62 // (e.g ADSB)
63 //port_t sensor1;
65
66
71void APINTERFACE_AppMain(void);
72
77void APINTERFACE_AppInit(void);
78
82void APINTERFACE_AppCleanUp(void);
83
89
95
101
107
112int32_t ApInterfaceTableValidationFunc(void *TblPtr);
113
114appdataInt_t appdataApIntf;
115
116#endif /* _apInterface_h_ */
Icarous common message definitions.
Message ID definition of common icarous messages.
void APINTERFACE_AppMain(void)
This is the main entry point for your application that will be used by cFS.
Definition: apInterface.c:19
void APINTERFACE_InitializeAPPorts()
Open ports to autopilot and intialize ports here.
Definition: apInterface.c:152
void APINTERFACE_AppCleanUp(void)
Definition: apInterface.c:331
void APINTERFACE_ProcessSBData(void)
Read data from software bus and send data to autopilot.
Definition: apInterface.c:211
void APINTERFACE_ProcessAPData(void)
Read data from the autopilot and construct software bus messages.
Definition: apInterface.c:162
void APINTERFACE_AppInit(void)
Initialize app data: set up pipes, subscribe to messages, read table, initialize data.
Definition: apInterface.c:68
void APINTERFACE_GetADSBData()
Read ADSB data from ADSB transponder and publish traffic data on software bus.
Definition: apInterface.c:202
int32_t ApInterfaceTableValidationFunc(void *TblPtr)
Definition: apInterface.c:335
Event definitions for autopilot interface app.
serial/socket port library
Structure to hold app data.
Definition: apInterface.h:47
CFE_SB_PipeId_t SchInterface_Pipe
pipe variable
Definition: apInterface.h:49
CFE_SB_MsgPtr_t Sch_MsgPtr
msg pointer to SB message
Definition: apInterface.h:51
CFE_SB_PipeId_t INTERFACE_Pipe
pipe variable
Definition: apInterface.h:48
int currentWP
autopilot's current waypoint
Definition: apInterface.h:58
port_t ap
autopilot port
Definition: apInterface.h:53
object_t traffic
traffic message
Definition: apInterface.h:56
position_t position
position message
Definition: apInterface.h:54
CFE_SB_MsgPtr_t INTERFACEMsgPtr
msg pointer to SB message
Definition: apInterface.h:50
attitude_t attitude
attitude message
Definition: apInterface.h:55
missionItemReached_t wpReached
waypoint reached feedback message
Definition: apInterface.h:57
CFE_TBL_Handle_t INTERFACE_tblHandle
table handle
Definition: apInterface.h:52
aircraft attitude information.
Definition: Icarous_msg.h:219
message encoding flight plan information
message indicating a specific waypoint has been reached.
Definition: Icarous_msg.h:127
message to represent information about an static/dynamic object
Definition: Icarous_msg.h:154
Structure to hold port attributes.
Definition: port_lib.h:37
position information of aircraft.
Definition: Icarous_msg.h:174
Traffic message definition.
Traffic message id definitions.