-
Notifications
You must be signed in to change notification settings - Fork 277
pauseSim
Pauses or un-pauses the physics simulation engine in X-Plane.
Language | Signature |
---|---|
C | int pauseSim(XPCSocket sock, char pause) |
MATLAB | pauseSim( pause, socket ) |
Java |
void pauseSim(boolean pause) OR void pauseSim(int pause)
|
Python | pauseSim(self, pause) |
sock (C): The socket used to send the command.
pause: true
(or 1
) to pause the simulation; false
(or 0
) to resume. As
of version 1.1, passing 2
will switch the pause state. That is, it will
unpause a paused sim, and pause an unpaused sim.
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.
The pauseSim
command varies from the built-in pause functionality of X-Plane.
pauseSim
only pauses the physics simulation, without affecting the rest of the
X-Plane interface. This means that all planes will freeze in place, but many
other functions of the simulator will still function. For example, it is still
possible to raise or lower the landing gear while "paused".
C Error Code | Java Exception | Python Error | Description |
---|---|---|---|
-1 | IOException | OSError | The client is unable to send the command. |
#include "xplaneConnect.h"
sock = aopenUDP("127.0.0.1", 49007);
pauseSim(sock, 1); // Pause simulation
pauseSim(sock, 0); // Unpause simulation
closeUDP(sock);
import XPlaneConnect.*;
pauseSim(1); % Pause simulation
pauseSim(0); % Unpause simulation
import gov.nasa.xpc.XPlaneConnect;
try(XPlaneConnect xpc = new XPlaneConnect())
{
xpc.pauseSim(true); // Pause simulation
xpc.pauseSim(false); // Unpause simulation
}
import xpc
with xpc.XPlaneConnect() as client:
client.pauseSim(true) # Pause simulation
client.pauseSim(false) # Unpause simulation