-
Notifications
You must be signed in to change notification settings - Fork 275
Migrating to 1.0 MATLAB
Jason Watkins edited this page Apr 24, 2015
·
2 revisions
Several changes have been made to the MATLAB client to improve compatability with clients written in other languages.
The MATLAB client now utilizes the Java client internally. The client is located
int the XPlaneConnect.jar
file now stored in the +XPlaneConnect
directory.
With the exception of item number 1 on the list below, this change should be
transparent to you, the user.
The following list enumerates breaking changes and provides specific instructions on how to fix your code to work with version 1.0 of the X-Plane Connect Toolbox.
- For all functions, the
IP
andPORT
parameters have been replaced with a singlesocket
parameter.
- The
socket
is an object returned by theopenUDP
function. - Fix: Instead of passing an IP and port directly to each function, first optain an open socket by calling
openUDP
, then pass that socket to each command function. - Ex:
pauseSim(1, "127.0.0.1", 49009);
becomessocket = openUDP("127.0.0.1", 49009); pauseSim(1, socket);
- The
readUDP
andsendUDP
functions have been removed.
- These functions are now handled internally by the Java client
- Fix: Use The pulic client functions to send and receive data. If no existing function meets your needs, submit an issue to GitHub.
- The
clearUDPBuffer
function has been removed.
- This function is a hack that should not be necessary. If applying the fixed below causes problems, please openn an issue on GitHub or email us (christopher.a.teubert@nasa.gov or jason.w.watkins@nasa.gov) and we will work with you to resolve the issue.
- Fix: Remove all calls to
clearUDPBuffer
from your code.
- The
sendSTRU
function has been removed.
- This function is no longer used internally and is not directly related to the XPC toolbox.
- If you desperately need this functionality, please email us and we will assist you in setting up an equivelent function that does not rely on XPC.
- Fix: Remove all calls to
sendSTRU
from your code.
- Removed largely unused return values from several functions.
- If an error occurs, and exception will be thrown. Send only commands that return normally are successful to the best of the clients ability to determine.
- Fix: Call send only commands without assigning the result.
- Ex:
status = pauseSim(1);
becomespauseSim(1);
- Renamed
requestDREF
andsendDREF
togetDREFs
andsetDREF
respectively.
- Fix: Replace all instances of
requestDREf
withgetDREFs
and replace all instances ofsendDREF
withsetDREF
.