Commit Graph

171 Commits

Author SHA1 Message Date
Jason Watkins
1523405495 Fixed errors in MATLAB client and updated tests. 2015-04-21 15:21:05 -07:00
Jason Watkins
3ad2bb76cb Added selectDATA command to Java client and modified MATLAB client to use it. 2015-04-20 10:41:00 -07:00
Jason Watkins
fd96966911 Tweaked Java client docs and added readDATA command. 2015-04-18 09:16:23 -07:00
Jason Watkins
e191537bc9 Refactored MATLAB client to use the Java client internally.
- Still need to implement selectDATA for all languages.
2015-04-18 09:16:23 -07:00
Jason Watkins
8e6819b80b Added doc comments to C client. 2015-04-18 09:16:15 -07:00
Jason Watkins
ccc87f06f2 Updated Java client to conform to new API.
- Now uses a single socket.
 - Constructor parameter reordered to match C client.
 - Defaults to an OS assigned port instead of 49008.
2015-04-17 10:56:04 -07:00
Jason Watkins
5ee49c7d81 Updated plugin.
- Removed dependency on C client.
 - The plugin now responds to client requests on the same port used to establish the connection.
Removed C client dependency from plugin.
2015-04-17 10:56:03 -07:00
Jason Watkins
55f3953955 Fixed errors and removed unused code in the C client.
- Fixed a buffer overflow in sendCTRL.
 - Fixed incorrect inderection in readUDP.
 - Removed unused usleep function.
 - Removed redundant include of WS2tcpip.h
 - Fixed widespread error where sendUDP's return value was not being checked correctly.
 - Updated signature of openUDP to place optional parameters at the end
 - Fixed bug in CTRL command where the buffer length was not correctly set.
 - Fixed setCONN to correctlly reset the client's socket.
2015-04-17 10:56:03 -07:00
Jason Watkins
556b3622ee Fixed C client tests to work with new client version. 2015-04-17 10:56:02 -07:00
Jason Watkins
b7ace82649 Cleaned up drawing functions. 2015-04-17 10:56:02 -07:00
Jason Watkins
6ac20f0998 Cleaned up CTRL functions.
- Removed parseCTRL and readCTRL.
 - Tweaked variable type, order and naming.
 - Improved validation and error reporting.
 - Updated Interface Control Document to reflect adition of aircraft number to CTRL command.
2015-04-17 10:56:01 -07:00
Jason Watkins
0e6195c063 Cleaned up POSI functions.
- Removed readPOSI and parsePOSI functions. These were only used by the plugin, which no longer uses them.
 - Tweaked types, argument order, and names to improve concision and consistency with other functions.
 - Improved validation and error reporting.
2015-04-17 10:56:01 -07:00
Jason Watkins
80a1a2dcd2 Cleaned up DREF functions and tweaked printError.
- printError is now a varags function, and will print format strings for the message.
 - Removed several internal DREF functions from the header file.
 - Significantly improved error reporting in DREF functions.
 - Removed dynamic allocation for responses. Clients are now expected to provide fully allocated storage for getDREFs. An error message will be printed if the provided structure is too small.
 - Fixes nasa/XPlaneConnect#30
2015-04-17 10:56:00 -07:00
Jason Watkins
4e7e816da1 Cleaned up DATA related functions.
- Tweaked signatures to improve consistency and safety.
 - Improved error logging.
 - Removed parseDATA. When merged into readDATA, the meat of parseDATA is only a few lines of code.
2015-04-17 10:56:00 -07:00
Jason Watkins
9f670954cc Cleaned up setCONN and pauseSim functions.
- Tweaked function signatures to more accurately reflect internal behavior.
 - Changed behavior of setCONN to use the inbound port of the socket passed to it.
 - Greatly enhanced error reporting for setCONN and pauseSim.
2015-04-17 10:55:59 -07:00
Jason Watkins
1a8078af87 Various changes to improve consistency and readability of low level UDP functions.
- Tweaked variable names to be more concise.
 - Moved variable declarations from top of function to point of use.
 - Replaced memcpy with strncpy where appropriate.
 - Removed socket reuse options on *nix builds.
 - Improved error reporting.
 - Most failures when opening and closing sockets now cause the client to die.
 - sendUDP now ignores the length byte.
2015-04-17 10:55:59 -07:00
Jason Watkins
a6196dece9 C client style tweaks.
- Standardized C client to use tabs.
 - Improved consistency of indentation.
 - Updated copyright and description headers.
2015-04-17 10:54:55 -07:00
Jason Watkins
8591db96c0 Fixed various type inconsistencies to remove warning when building on Windows 2015-04-14 15:49:25 -07:00
Jason Watkins
118af68620 Tweaked log header to include compilation date and time. 2015-04-14 13:38:28 -07:00
Jason Watkins
5944fb5818 Expanded doc comments.
- Added doc comments to the DataManager class.
 - Added description of LOG_VERBOSITY levels and reset the value.
 - Added doc comment to DataMap.
 - Added doc comments to MessageHandlers class.
2015-04-14 13:36:43 -07:00
Jason Watkins
96d1d68123 Added X-Plane SDK copyright notice to Drawing.cpp 2015-04-14 12:02:18 -07:00
Jason Watkins
c0e7c1af13 Fixed MATLAB client implementation of setConn. 2015-04-14 11:59:04 -07:00
Jason Watkins
74dc2d22ed Cleaned up main file.
- Improved formatting in XPCPlugin.cpp to be consistent throughout the file.
 - Formatted copyright and license notices to be consistent with the rest of the codebase.
 - Replaced out of date documentation with a link to the GitHub wiki
 - Moved the writing of the log header to the Log class and expanded it to include useful information.
 - Updated Windows binaries
2015-04-14 11:46:48 -07:00
Jason Watkins
4927b6d1b8 Fixed Java client implementation of setCONN
- The Java client now reads the CONF message sent by the plugin in response to the CONN command.
2015-04-14 10:22:34 -07:00
Jason Watkins
fe88204b57 Fixed an issue where the recvaddr was not set on Windows
- Also improved logging in UDPSocket
 - Resolves nasa/XPlaneConnect#39
2015-04-14 10:22:34 -07:00
Jason Watkins
52bf998632 Refactored message handling code into the MessageHandlers class.
- Re-enabled CONF messages sent in response to CONN commands.
 - There was a bug in the construction of the CONF message.
 - Resolves nasa/XPlaneConnect#31
2015-04-14 10:21:34 -07:00
Jason Watkins
6c51fa476e Refactored dataref manipulation operations to the DataManager class. 2015-04-13 15:53:38 -07:00
Jason Watkins
547eb4de18 Refactored various message-related operations into the Message class.
- Replaces the XPCMessage struct.
 - Messages are now read from a UDPSocket by the Message class.
 - Printing messages to the log is now handled by the Message class.
 - In the future, may extend this class with command-specific subclasses that encapsulate additional message parsing functionality.
2015-04-13 09:42:29 -07:00
Jason Watkins
2736cd86de Refactored socket code into UDPSocket class. 2015-04-13 09:23:25 -07:00
Jason Watkins
aa74bc57f5 Refactored drawing code into Drawing class. 2015-04-12 11:09:27 -07:00
Jason Watkins
a3a82f4a71 Refactored logging functionality into Log class. 2015-04-12 11:09:19 -07:00
Jason Watkins
be9252ce25 Updated Readmes.
- Moved all information in Readme.txt into README.md.
 - Deleted Readme.txt.
 - Updated README.md to refer users to the XPC wiki for detailed information.
2015-04-11 09:13:45 -07:00
Chris Teubert
cf56955756 Removed Non-relevant copyright notice
This file doesn’t use the X-Plane API
2015-04-09 16:35:44 -07:00
Christopher Teubert
c893706f72 Merge pull request #47 from jason-watkins/feature/waypoints
Add support for rendering waypoints in the world
2015-04-09 13:13:00 -07:00
Chris Teubert
48007932e5 updated Mac Binary 2015-04-09 13:13:15 -07:00
Jason Watkins
edba5c18ec Updated Windows binaries 2015-04-09 12:17:59 -07:00
Jason Watkins
cfeb01fc02 Added MATLAB client support for WYPT command. 2015-04-09 12:17:58 -07:00
Jason Watkins
2e05f57baf Added Java client support for WYPT command. 2015-04-09 12:17:53 -07:00
Jason Watkins
6417822a75 Added C test for WYPT command and fixed bugs in parseWYPT and sendWYPT. 2015-04-09 12:17:52 -07:00
Jason Watkins
1a83517bee Implemented plugin support for handling WYPT commands. 2015-04-09 12:17:41 -07:00
Jason Watkins
8fed5d916c Updated Interface Control Document to reflect updated TEXT and WYPT commands. 2015-04-09 09:06:24 -07:00
Jason Watkins
97eb023df6 Added waypoint support to the plugin.
- The plugin now supports drawing a series of waypoints in the world.
 - The plugin supports add, remove, and clear operations
  - Add and remove take a list of waypoints
  - Clear removes all waypoints
2015-04-09 09:06:18 -07:00
Jason Watkins
001d5fd2d4 Quick fix to installation instructions in User Guide (C).txt 2015-04-08 09:37:19 -07:00
Christopher Teubert
b1f7c89d02 Merge pull request #46 from jason-watkins/feature/print-to-screen
Add the ability to print messages on screen
2015-04-08 09:26:50 -07:00
Chris Teubert
335570f34f Updated C User Guide 2015-04-08 09:26:56 -07:00
Chris Teubert
354f51771e Updated Mac Binary 2015-04-08 09:21:25 -07:00
Jason Watkins
c3e284fc02 Added support for newlines in TEXT command. 2015-04-08 09:13:57 -07:00
Chris Teubert
f8372f6f4d Updates for Mac 2015-04-08 09:12:56 -07:00
Chris Teubert
10bf4d63ac Small fixes 2015-04-08 09:12:56 -07:00
Chris Teubert
d18904bbe2 updates to Matlab Tests 2015-04-08 09:12:56 -07:00