Jump to content

PACX Development Guide


Fabio Almeida

Recommended Posts

PACX Development Guide (since Version 1.0.4.0a3)

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).

 

All downloads are also bundled here:

 

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>

Below is the list of different event types and parameters for each event.

PACX Event Types and Parameters.txt

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.