As of SimSig v5.21, Sep 2022.
The SimSig Interface Gateway is a STOMP interface for SimSig. A client can subscribe to receive notification of in-game events, and send some commands back to the game.
[package] | |
name = "hello-rust" | |
version = "0.1.0" | |
edition = "2021" | |
[dependencies] | |
xplm = { git = "https://github.com/samcrow/rust-xplm", branch = "master" } | |
[profile.dev] | |
opt-level = 2 |
As of SimSig v5.21, Sep 2022.
The SimSig Interface Gateway is a STOMP interface for SimSig. A client can subscribe to receive notification of in-game events, and send some commands back to the game.
#pragma once | |
#include <Ticker.h> | |
class Blinker { | |
public: | |
Blinker(float freq) : _interval{freq / 2} {} | |
void setup() { | |
_ticker.attach(_interval, [this] { this->_toggle(); }); | |
} | |
bool blinkNow() const { return _lit; } |
import win32clipboard | |
def run(items = None): | |
"""Puts each (text) item onto the clipboard one by one | |
If items is not provided, will prompt for this to be pasted in | |
""" | |
if items is None: | |
items = [] |
https://www.pprune.org/atc-issues/59309-atc-humour-merged.html
ABC123: Maastricht, G'evenink. ABC123 FL330 to GMH (Germinghausen).
Maastricht: (With an obvious "Hmmmm...." tone) I show you routing (via) NOMKA??
ABC123: Yessir, last 'sektor' gave us GMH. >
// complete plugin using PPL | |
#include <cstring> | |
#include <memory> | |
#include <XPLMPlugin.h> | |
#include <XPLMUtilities.h> | |
#include <processor.h> | |
class Foo : PPL::Processor { |
#include "command.h" | |
Command::Command(XPLMCommandRef ref, | |
std::function<Outcome(Phase)> cb, | |
bool run_before_sim) | |
: ref_(ref), before_(run_before_sim ? 1 : 0), callback_(cb) { | |
XPLMRegisterCommandHandler( | |
ref_, | |
[](XPLMCommandRef, XPLMCommandPhase phase, void* vp) { | |
auto cmd = reinterpret_cast<Command*>(vp); |
#include "openglsnippet.h" | |
#include <cstring> | |
#if APL == 1 | |
#include <OpenGL/OpenGL.h> | |
#include <OpenGL/glu.h> | |
#elif IBM == 1 | |
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> |
// IIRC it's a bit vague when this DataRef registers and gets destructed | |
PPL::DataRef<std::string> sim_build{"sim/version/sim_build_string"}; | |
PLUGIN_API int XPluginStart(char *outName, char *outSig, char *outDesc) { | |
char name[] = "BadExample"; | |
strcpy(outName, name); strcpy(outSig, name); strcpy(outDesc, name); | |
return 1; | |
} |