-
Notifications
You must be signed in to change notification settings - Fork 277
getCTRL
Jason Watkins edited this page Jun 2, 2015
·
1 revision
Get control surface information for an aircraft.
Language | Signature |
---|---|
C | int getCTRL(XPCSocket sock, float values[7], char ac); |
MATLAB | ctrl = getCTRL(ac, socket) |
Java | float[] getCTRL(int ac) |
Python | getCTRL(self, ac = 0) |
sock
(C): The socket used to send the command.
values
(C): The array in which the resulting values should be stored.
socket
(MATLAB): An optional reference to a socket opened with openUDP
that
should be used to send the command.
C: A negative value if an error occurs, otherwise 0.
All others: An array that matches the format of the array passed into sendCTRL.
C Error Code | Java Exception | Python Error | Description |
---|---|---|---|
-1 | -- | OSError | The request could not be sent |
-2 | IOException | OSError | No response was received |
-3 | IOException | ValueError | A response was received, but the length was incorrect |
-- | -- | ValueError | The response header was incorrect |
#include "xplaneConnect.h"
XPCSocket sock = openUDP(IP);
// Get the current control surface info for the player aircraft
float ctrl[7];
getCTRL(sock, ctrl, 0);
closeUDP(sock);
import XPlaneConnect.*;
% Get the current control surface info for the player aircraft
ctrl = getCTRL(0);
import gov.nasa.xpc.XPlaneConnect;
try(XPlaneConnect xpc = new XPlaneConnect())
{
// Get the current control surface info for the player aircraft
float[] ctrl = xpc.getCTRL(0);
}
import xpc
with xpc.XPlaneConnect() as client:
# Get the current control surface info for the player aircraft
ctrl = client.getCTRL(0);