The xplane_io (X-Plane I/O) program is used to establish network communications, via UDP, with the X-Plane flight simulator running on a computer. The code consists of class libraries that abstract the lower-level UDP packet encoding and decoding details, according to the UDP protocol specifications in X-Plane version 9. Any X-Plane DATA packets can be sent and received, and any X-Plane DataRefs can be set by sending DREF packets to X-Plane.

Dependencies:   EthernetNetIf mbed ConfigFile

Committer:
bapowell
Date:
Wed Dec 21 22:29:59 2011 +0000
Revision:
0:a5d13af495af

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bapowell 0:a5d13af495af 1 #ifndef TIMEOUTPROMPT_H_INCLUDED
bapowell 0:a5d13af495af 2 #define TIMEOUTPROMPT_H_INCLUDED
bapowell 0:a5d13af495af 3
bapowell 0:a5d13af495af 4 #include "mbed.h"
bapowell 0:a5d13af495af 5
bapowell 0:a5d13af495af 6 class TimeoutPrompt {
bapowell 0:a5d13af495af 7 public:
bapowell 0:a5d13af495af 8
bapowell 0:a5d13af495af 9 TimeoutPrompt(Serial & serialInOut, int defaultTimeoutSeconds);
bapowell 0:a5d13af495af 10
bapowell 0:a5d13af495af 11 /**
bapowell 0:a5d13af495af 12 * Output the given prompt for timeoutSeconds. If a character is input that matches
bapowell 0:a5d13af495af 13 * one of the validChars, then return it. Otherwise, if no valid character is
bapowell 0:a5d13af495af 14 * pressed within the timeout, then return NULL.
bapowell 0:a5d13af495af 15 */
bapowell 0:a5d13af495af 16 char prompt(int timeoutSeconds, char *promptString, char* validChars);
bapowell 0:a5d13af495af 17
bapowell 0:a5d13af495af 18 /**
bapowell 0:a5d13af495af 19 * Overloaded method that uses defaultTimeoutSeconds.
bapowell 0:a5d13af495af 20 */
bapowell 0:a5d13af495af 21 char prompt(char *promptString, char* validChars);
bapowell 0:a5d13af495af 22
bapowell 0:a5d13af495af 23 private:
bapowell 0:a5d13af495af 24
bapowell 0:a5d13af495af 25 Serial & _serialInOut;
bapowell 0:a5d13af495af 26 int _defaultTimeoutSeconds;
bapowell 0:a5d13af495af 27 Timer _timer;
bapowell 0:a5d13af495af 28 };
bapowell 0:a5d13af495af 29
bapowell 0:a5d13af495af 30 #endif // TIMEOUTPROMPT_H_INCLUDED