📄
SPAD.neXt
  • SPAD.neXt Manual
  • About SPAD.neXt
  • Getting Started
    • System Requirements
    • Supported hardware
      • Check Hardware
    • Installation
      • Simulation Specifc Steps
        • SimConnect Configuration
        • MSFS: Enable PMDG data access
        • X-Plane Configuration
    • First Start
      • Configuration Wizard
    • Common Tasks and Issues
      • SPAD
        • Online Services
        • Fresh reinstall
        • Move SPAD.neXt to new Computer
        • License Issues
      • MSFS Specific Topics
      • X-Plane specific Topics
      • Saitek/Logitech MP/RP blinking
      • USB Powermanagement
  • Guides and Videos
    • New User Series
    • MSFS SimConnect
    • L:Vars / H:Events and B:Events
    • Features & Functions
    • Device Specific
      • Arduino / SPAD Serial
      • Authentikit
      • Cockpit Simulator CDU
      • Honeycomb
      • Joystick (Generic HID)
      • miniCockpit
      • RealSimGear
      • Saitek/Logitech
      • Script Panel
      • Stream Deck
      • Thrustmaster TCA
      • vFIP
      • Virtual Avionics
      • vJoy
      • VRinsight
      • X-Touch MC Mode
      • X-Touch Midi Mode
    • Simulation Specific
      • ATR 600 (MSFS)
      • AS CRJ 550/700/900/1000 (MSFS)
      • FBW A32NX (MSFS)
      • FFX/MG HJet (MSFS)
      • FFX Vision Jet (MSFS)
      • FSW C414AW (MSFS)
      • PMDG 737 (MSFS)
      • PMDG 777 (MSFS)
      • SWS Kodiak (MSFS)
      • WT CJ4 (MSFS)
      • WT G1000 NXi (MSFS)
      • PMDG 777 (P3D)
  • User Interface
    • UI Familiarization
      • Home Page
      • Profiles Page
  • Features
    • Expressions
      • Values
      • Referencing Simulation Data
      • Operators
      • Functions
      • Examples
    • Tuner Acceleration
    • Event Execution Order
  • Simulations
    • MSFS 2024
    • MSFS 2020
    • X-Plane
      • Pre-Requisites
      • Dataref Tool
      • Helping Spad Help You
      • Dataref vs. Command: Know Your Copilots
      • Basic Flight Controls – Axis Setup
    • P3d and FSX
    • Other
  • Hardware specific
    • USB HUB Requirements
    • CPFlight Devices
    • Saitek FIP (Flight Instrument Panel)
      • Saitek FIP: Driver & Function Check
    • Loupedeck Image Devices
    • Midi Devices
      • X-Touch Mini
    • Serial (COM) Devices
    • Skalarki
    • VRInsight Overhead
  • Extending and API's
    • Gauges and Extensions
      • SPAD Gauges: GaugeSettings
    • C# Scripting Interface
      • C# Scripting: ScriptStub
      • C# Scripting: Provide Values
      • C# Scripting: PreCompile
    • Device Interface
      • Device Communication Flow
        • Device INIT-Phase
        • Device CONFIG-Phase
          • Device options
          • Device COLORSET configuration
          • Device PROFILE configuration
          • Device OUTPUT Configuration
          • Device INPUT configuration
            • Device input AXIS
            • Device input ENCODER
            • Device input PUSHBUTTON
            • Device input ROTARY
            • Device input SWITCH
            • Device input SWITCH3
            • Device LABEL
          • Device config: Advanced topics
        • Device STATESCAN-Phase
      • Device General Commands
      • Device commands
        • Page-Control
      • Device SPAD.neXt Events (2)
      • Device Simulation Events (Channel 4)
      • Device Data (Channel 5)
      • Device LED Update (Channel 6)
      • Device Display Update (Channel 7)
      • Device Input Updates (Channel 8)
      • Device Virtual Power
      • Device Custom UI
      • Device HTML UI
      • Device preconfigured definition
      • Serial V2
        • Command 1,RAISE
        • Command: 0,AUTH
    • X-Plane Datarefs & Commands
    • FSUIPC: Custom Offsets
    • RestAPI
    • HTML Rendering API
    • Other API's
  • FAQ
    • General FAQ
    • MSFS: Lost profile aircraft assigments
  • Changes
    • 0.9.21
    • 0.9.14.0
    • 0.9.13.39
  • Glossar
  • Old-Docs
    • Old-Getting-Started-Guide
Powered by GitBook
On this page
  • Provide Data to SPAD.neXt
  • Getting and setting
  • Examples
  • Subscribe to a data
  • Unsubscribe from a data
  • Emulate an event on a diffrent device
  • Update the labeltext of an input/output or label
  • Ask SPAD.neXt to resend all subscribed data

Was this helpful?

  1. Extending and API's
  2. Device Interface

Device commands

The 1-Command is used by the device to send commands to SPAD.neXt.

Request: 1,<SUBCOMMAND>,...; Reply: none or 2,ERROR

Provide Data to SPAD.neXt

The subcommand ADD informs SPAD.neXt about a data value the device will provide. This data can be used in events or expressions like any simulation data in the SPAD.neXt UI.

1,ADD,<CHANNELID>,<path>,<valuetype>,<access>,<name>[[,description][,options]];

Parameter
Description
Limits

<CHANNELID>

the Channel the device/SPAD.neXt will use to send updates for that data

>= 10

<path>

name of the data value. To place it in a tree "//" can be used to separate the nodes. e.g. buttons//button1 (note the escaped "/" !! If using CmdMessenger-Lib the escaping will be done automatically for you)

name must not start with /

<valuetype>

type of the data (Signed/Unsigned)

S8 S16 S32 S64 U8 U16 U32 U64 FLT32 FLT64 ASCIIZ

<acces>

RO for readonly, RW for readwrite

<name>

human readable name of the data for the UI

<description>

optional description for the UI

Supported options

PERSIST

0|1

0 create LOCAL variable (default)

1 Create a persistent DEVICE variable

PERSIST=1

Within SPAD.neXt the data will be available in Device->Devicename. Internally the Data is referenced as DEVICE:{DeviceId}/<path> e.g. DEVICE:A8AA15C5-7BB6-4AC6-A558-A88CAFB78729/buttons/button1

Device Data is only available within the profile of the device.

Getting and setting

SPAD.neXt will send data updates to the device and expect data using the given CHANNELID channel using the 5-Channel: 5,<CHANNELID>,<value>;

Examples

Persitent Device Variable

1,ADD,11,pages//activepage,U8,RW,Active device page,My cool description,PERSIST=1;

creates a variable DEVICE:VID/PID/pages/activepage available only within the deviceperofile of the device. outside of the deviceprofile this variable will always have the value 0

Normal non-persistent local variable

1,ADD,11,pages//activepage,U8,RW,Active device page;

creates a variable LOCAL:VID/PID/SERIAL/pages/activepage available to all deviceprofiles within SPAD.neXt

DEVICE variables are persitent per connected devices and the values will be loaded and saved from/to the profile.

LOCAL variables will not be saved and default to 0

Subscribe to a data

the subcommand SUBSCRIBE with subscribe the device to a data value from SPAD.neXt or the simulation

1,SUBSCRIBE,<index>,<path>[,<unit>[,<epsilon>]];

<index>

the index associated with the data

<path>

internal name of the data value to subscribe to. E.g. SIMCONNECT:AUTOPILOT HEADING LOCK DIR XPLANE:SIM/COCKPIT/AUTOPILOT/HEADING_MAG

<unit>

desired unit, if not default (e.g. 'degrees','radians','Hz','kHz','MHz')

<epsilon>

minimum change that must happen before an update will be sent to the device. If it's omitted the default value for the data will be used

SPAD.neXt will send the subscribed data on the 5-Channel in the format

5,<index>,<value>;

Example 1,SUBSCRIBE,12,SIMCONNECT:AUTOPILOT HEADING LOCK DIR 1,SUBSCRIBE,12,SIMCONNECT:AUTOPILOT HEADING LOCK DIR,radians 1,SUBSCRIBE,12,XPLANE:sim//cockpit//autopilot//heading_mag,,5

You can get the internal name of a data value, by selecting it in the data browser and pressing CTRL-C or clicking on "book"-icon in the data monitor. It will be copied to the clipboard

Unsubscribe from a data

The subcommand UNSUBSCRIBE will unsubscribe from a previously subscribed data value Syntax: 1,UNSUBSCRIBE,<index>;

Emulate an event on a diffrent device

The subcommand EMULATE will emulate an event from another device. (E.g. a dial turned on radio panel)

1,EMULATE,<TARGET_DEVICE>,<TARGET_SWITCH>,<TARGET_EVENT>;

<TARGET_DEVICE> is either the internal id VID:PID:COUNTER or VID:PID:SERIAL <TARGET_SWITCH> is the internal name of the switch/dial/led etc (e.g. FIP_LEFTDIAL) <TARGET_EVENT> is name of the event to emulate (e.g. TUNER_CLOCKWISE)

To get the TARGET_SWITCH and TARGET_EVENT you can program the event in the UI and then copy the complete event to the clipboard, pasting to a texteditor. The TARGET_SWITCH will be the "BOUNDTO" and the TARGET_EVENT the "Trigger"

Alternatively you can get a list of all devices and events at Settings->Application->Expert->Available Remote Events

Update the labeltext of an input/output or label

1,LABEL,<index>,<newlabel>;

Updates the labeltext of a input/led (DYNLABEL=1 !) or a label pseudo input

Ask SPAD.neXt to resend all subscribed data

1,REFRESHDATA;

SPAD.neXt will send all currently subscribed data

PreviousDevice General CommandsNextPage-Control

Last updated 2 years ago

Was this helpful?