Commit Graph

188 Commits

Author SHA1 Message Date
Chris Teubert
5ce94fe278 Mac Binary 2015-04-23 10:08:34 -07:00
Chris Teubert
41e72b81d2 Added a few comments 2015-04-23 10:08:17 -07:00
Chris Teubert
368c3bed20 fix- aopenUDP not returning socket 2015-04-23 10:08:05 -07:00
Chris Teubert
795e284ab2 A few mac fixes 2015-04-23 10:07:47 -07:00
Jason Watkins
83a010faa4 Fixed misnamed function in MATLAB client. 2015-04-22 15:07:09 -07:00
Jason Watkins
55feee68ed Tweaked XPCSocket in C client.
- Re-added xpcSocket name in the struct namespace
 - Removed unused open field.
2015-04-22 14:35:46 -07:00
Jason Watkins
8bbe3a0ec9 Fixed issues resolving Java classes.
- XPlaneConnect.jar is now only added once in openUDP.
 - Fully qualified all Java identifiers to resolve import issues.
2015-04-22 13:41:09 -07:00
Jason Watkins
6ecff63a61 Merge branch 'feature/linux' into develop 2015-04-22 10:17:23 -07:00
Jason Watkins
a6a99dc574 Updated plugin includes to build in gcc and added Linux binaries. 2015-04-22 10:16:34 -07:00
Jason Watkins
46fe5b0fe4 Updated plugin cmake file to actually work. 2015-04-22 10:16:11 -07:00
Jason Watkins
e5d7e8c442 Added a cmake file for the plugin. 2015-04-22 10:15:43 -07:00
Chris Teubert
85399365b1 Added OS-specific file separation in paths 2015-04-22 09:18:38 -07:00
Jason Watkins
bb5c6d8a28 Merge branch 'feature/consistency' into develop 2015-04-21 15:58:44 -07:00
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
db6180f1c9 Implemented std::hash<XPC::DREF> explicitly. 2015-04-16 15:01:34 -07:00
Chris Teubert
e60dde457c Changes to work with Mac
Changes include:
- Updating Project
- fixing sendto declaration
- Fixed some bugs in #if Mac sections
- Removed unneeded #includes (my compiler didn’t like them)
2015-04-16 12:58:49 -07:00
Jason Watkins
1a3f658774 Changed types from fixed width types in stdint to language primitive types guaranteed to be at least as big. 2015-04-16 10:13:18 -07:00
Jason Watkins
4fdc6939c8 Merge branch 'feature/architecture' into develop 2015-04-15 08:20:24 -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