TFDi Design Icon
TFDi Design

Development Guide

All of the files mentioned below can be downloaded here

Using the PACX File I/O System

PACX will read and write several files to allow other applications to interact with it easily. There are currently three files supported by this system. They exist in the %localappdata%\PACX\IO folder.

FlightConfiguration.xml When this file is written to, it can be used to pre-populate the Start Flight popup in PACX. This can be done either before PACX is opened or while it is running (PACX will detect the change in the file and re-load it). This information can also be saved to this file by pressing CTRL+S on the Start Flight popup.

Manifest.xml The Manifest.xml file is written by PACX when a flight begins. It will contain all passenger information, as well as the flight itinerary.

FlightReport.xml The FlightReport.xml file is written after a flight is completed. This can be used to gather information about the result of the flight (such as satisfaction or events that occurred).

Using the PACX Web XMl System When a flight is submitted to our server, the original XML version is stored as well. Adding "/xml" to the flight report URL will cause the system to serve the report in raw XML form. For example, if the report was https://pacx.online/flight/TEST123, you could access the XML format of that flight by requesting https://pacx.online/flight/TEST123/xml.

Using the PACX Network API

PACX also hosts a server that allows for two-way, real-time communication. By default, it is hosted on port 9000. To simply usage of this system, we have provided a C++ and C# wrapper class. The class will attempt to read the Settings.xml file to determine the address and port of the PACX server and manages the socket code for you. You will provide two event handler functions, one for connection change notifications, and one for data receipt. The classes are below.

C#

PACXConnection.cs

C++

PACXConnection.h

PACXConnection.cpp

A breakdown of the network commands and responses are below.

The get commands will return an XML structure for the requested information.

get manifest
get events
get event <eventid>
get report
get inputeventmap

The subscription commands begin or end receipt of a particular data stream. The data will be provided in XML format once the appropriate event has occurred in PACX.

subscription <add/remove> <newevent/flightinformation/flightreport/usermessage/manifest/huddata/inputeventmap>

The invoke commands allow a network client to call various PACX functions/features or fire interaction events. This feature is what we use to allow in-cockpit controls to begin vocal interaction on PACX.

invoke <activatevocalinteraction/openinteractionmenu/summon>
fire <event string>

PACX Event Types and Parameters

Event (All Events) ID, int Type, enum Active, bool Significant, bool FriendlyString, string

Turbulence TurbulenceSeverity, enum

ServiceSuspension CancellationReason, enum CancellationDisregarded, enum

PublicAddress PublicAddressType, enum PublicAddressSkipped, bool

NoticeableLanding

MedicalIssue MedicalIssueType, enum IsSevere, bool

InFlightService InFlightServiceType, enum InFlightServiceMeal, enum InFlightServiceAborted, bool

ExtremeFlying ExtremeFlyingSeverity, enum ExtremeFlyingType, enum

UnsafeHandling UnsafeHandlingType, enum

Diversion DiversionReason, enum DiversionDisregarded, bool

Delay DelayReason, enum DelayLength, enum DelayAnnounced, bool DelayOutcome, enum

BoardingIncident BoardingIncidentType, enum BoardingIncidentPassengerIndex, int

AircraftProblem AircraftProblemType, enum AircraftProblemAnnounced, bool AircraftProblemComplete, bool

AheadOfSchedule AheadOfScheduleAmount, enum AheadOfScheduleAnnounced, bool AheadOfScheduleDisregarded, bool

Crash