mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
Add Horizonal Navigation bars (breadcrumbs) to all documentation pages (#1328)
* Add breadcrumbs to all documentation pages, fix some links between pages
This commit is contained in:
parent
3e54516abb
commit
279d131a0a
@ -51,14 +51,14 @@ The user guide contains information pertinent to Trick users. These pages will h
|
|||||||
01. [Standard Template Library Checkpointing](simulation_capabilities/STL-Checkpointing)
|
01. [Standard Template Library Checkpointing](simulation_capabilities/STL-Checkpointing)
|
||||||
01. [Threads](simulation_capabilities/Threads)
|
01. [Threads](simulation_capabilities/Threads)
|
||||||
|
|
||||||
01. Web Server
|
01. [Web Server](web/Webserver)
|
||||||
01. [Adding a Web Server to Your Sim](web/Adding_a_Web_Server_to_Your_Sim)
|
01. [Configure Trick with Civetweb](web/Configure-Civetweb)
|
||||||
01. Web Server APIs
|
01. [Add SSL encryption to your webserver](web/SSL)
|
||||||
01. [HTTP-API_alloc_info](web/HTTP-API_alloc_info)
|
01. [Web Server APIs](web/Webserver-apis)
|
||||||
01. [WS-API_VariableServer](web/WS-API_VariableServer)
|
01. [HTTP alloc API](web/http-alloc-api.md)
|
||||||
01. Adding New Web Server APIs
|
01. [WS Variable Server API](web/ws-variable-server-api.md)
|
||||||
01. [Extending_the_HTTP-API](web/Extending_the_HTTP-API)
|
01. [Extend the HTTP API](web/Extend-http-api.md)
|
||||||
01. [Extending_the_WS-API](web/Extending_the_WS-API)
|
01. [Extend the WS API](web/Extend-ws-api.md)
|
||||||
|
|
||||||
01. [Simulation Utilities](simulation_utilities/Simulation-Utilities)
|
01. [Simulation Utilities](simulation_utilities/Simulation-Utilities)
|
||||||
01. [Trickcomm](simulation_utilities/Trickcomm)
|
01. [Trickcomm](simulation_utilities/Trickcomm)
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → Building a Simulation |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
The building blocks of a basic Trick simulation are C/C++ structures/classes (models), a Python input file and a Trick simulation definition file (S_define). The S_define contains simulation objects which offer a way to turn the C/C++ function/methods into simulation jobs. Trick generates the necessary Python glue code which makes the C/C++ structures/classes accessible by the Python input file. The input file configures the simulation and is a command-line argument to the simulation executable.
|
The building blocks of a basic Trick simulation are C/C++ structures/classes (models), a Python input file and a Trick simulation definition file (S_define). The S_define contains simulation objects which offer a way to turn the C/C++ function/methods into simulation jobs. Trick generates the necessary Python glue code which makes the C/C++ structures/classes accessible by the Python input file. The input file configures the simulation and is a command-line argument to the simulation executable.
|
||||||
|
|
||||||
... to be continued ...
|
... to be continued ...
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Building a Simulation](Building-a-Simulation) → Environment Variables |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
Trick uses a list of variables for building sims e.g. TRICK_CFLAGS and TRICK_CXXFLAGS. Each variable has a default value that may be overridden by setting the value in the environment. Trick resolves these variables by a call to a function called "trick-gte". Type in "${TRICK_HOME}/bin/trick-gte" on the command line to see what the "Trick environment" is.
|
Trick uses a list of variables for building sims e.g. TRICK_CFLAGS and TRICK_CXXFLAGS. Each variable has a default value that may be overridden by setting the value in the environment. Trick resolves these variables by a call to a function called "trick-gte". Type in "${TRICK_HOME}/bin/trick-gte" on the command line to see what the "Trick environment" is.
|
||||||
|
|
||||||
### Adding ${TRICK_HOME}/bin to PATH
|
### Adding ${TRICK_HOME}/bin to PATH
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Building a Simulation](Building-a-Simulation) → Making the Simulation |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
|
|
||||||
### Simulation Compilation Environment Variables
|
### Simulation Compilation Environment Variables
|
||||||
|
|
||||||
The -Ipaths in TRICK_CFLAGS and TRICK_CXXFLAGS tell Trick where to find model source files. The flags also can contain compiler settings, for instance the -g flag is used for compiling in debug mode. See section Trick_Environment for more detail and information on variables for linking in external libraries, setting the compiler etc.
|
The -Ipaths in TRICK_CFLAGS and TRICK_CXXFLAGS tell Trick where to find model source files. The flags also can contain compiler settings, for instance the -g flag is used for compiling in debug mode. See section Trick_Environment for more detail and information on variables for linking in external libraries, setting the compiler etc.
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Building a Simulation](Building-a-Simulation) → Model Source Code |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
This section details the syntax for creating headers and source code that Trick can process.
|
This section details the syntax for creating headers and source code that Trick can process.
|
||||||
|
|
||||||
It also details the operation of the Trick Interface Code Generator (ICG) that processes headers, and the Module Interface Specification Processor (MIS) that processes source code.
|
It also details the operation of the Trick Interface Code Generator (ICG) that processes headers, and the Module Interface Specification Processor (MIS) that processes source code.
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Building a Simulation](Building-a-Simulation) → Simulation Definition File |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
The Simulation Definition File or S_define is the file which lays out the architecture
|
The Simulation Definition File or S_define is the file which lays out the architecture
|
||||||
of the simulation. Details about job frequencies, job class, job data, importing/exporting
|
of the simulation. Details about job frequencies, job class, job data, importing/exporting
|
||||||
data to other simulations, freeze cycles, integration, etc. are all housed in this one file.
|
data to other simulations, freeze cycles, integration, etc. are all housed in this one file.
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Building a Simulation](Building-a-Simulation) → Trickified Project Libraries |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
|
|
||||||
During a simulation build, Trick generates several rounds of files to support data recording, checkpointing, and Python access:
|
During a simulation build, Trick generates several rounds of files to support data recording, checkpointing, and Python access:
|
||||||
|
|
||||||
* Trick generates `S_source.hh` from the `S_define`
|
* Trick generates `S_source.hh` from the `S_define`
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Data Products](Data-Products) → DP Product File Format |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
Since Trick 10, the DP Product Specification File Format is changed to XML. The DP Product XML file
|
Since Trick 10, the DP Product Specification File Format is changed to XML. The DP Product XML file
|
||||||
DTD is defined as following:
|
DTD is defined as following:
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Data Products](Data-Products) → DP Session File Format |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
Since Trick 10, the DP Session file is changed to XML format. The Session XML Document
|
Since Trick 10, the DP Session file is changed to XML format. The Session XML Document
|
||||||
Type Definitions(DTD) is defined as following:
|
Type Definitions(DTD) is defined as following:
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Data Products](Data-Products) → Data Products GUIs |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
There are two main GUIs for viewing Trick logged data:
|
There are two main GUIs for viewing Trick logged data:
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → Data Products |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
The Data Products (DP) is a simulation data post processor designed to allow visualization of data recorded in the Trick simulation.
|
The Data Products (DP) is a simulation data post processor designed to allow visualization of data recorded in the Trick simulation.
|
||||||
|
|
||||||
The data products can plot ASCII, Binary & HDF5 data. HDF5 is the new data format supported since Trick 10.
|
The data products can plot ASCII, Binary & HDF5 data. HDF5 is the new data format supported since Trick 10.
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Data Products](Data-Products) → Plot Printing |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
To print fermi plots, simply bring up the fermi plot, and press either the "Print" (printer icon) button or the individual "Print" (printer icon) buttons on the plots themselves. In order for this to work you should set two environment variables:
|
To print fermi plots, simply bring up the fermi plot, and press either the "Print" (printer icon) button or the individual "Print" (printer icon) buttons on the plots themselves. In order for this to work you should set two environment variables:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → Introduction |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
The responsibility for this document lies with the [Simulation and Graphics Branch (ER7)](https://er.jsc.nasa.gov/ER7/) of the [Automation, Robotics and Simulation Division](https://er.jsc.nasa.gov/) of the NASA JSC Engineering Directorate.
|
The responsibility for this document lies with the [Simulation and Graphics Branch (ER7)](https://er.jsc.nasa.gov/ER7/) of the [Automation, Robotics and Simulation Division](https://er.jsc.nasa.gov/) of the NASA JSC Engineering Directorate.
|
||||||
|
|
||||||
The purpose of this document is to provide Trick simulation developers and users with a detailed user’s reference guide on how to install Trick, use Trick processors and utilities, and how to operate a simulation from execution to data post processing.
|
The purpose of this document is to provide Trick simulation developers and users with a detailed user’s reference guide on how to install Trick, use Trick processors and utilities, and how to operate a simulation from execution to data post processing.
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → Miscellaneous Trick Tools |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
### Interface Code Generator - ICG
|
### Interface Code Generator - ICG
|
||||||
|
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Miscellaneous Trick Tools](Miscellaneous-Trick-Tools) → Python Variable Server Client |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
|
|
||||||
`variable_server.py` is a Python module for communicating with a sim's variable server from a Python program. Its primary purpose is to easily get and set variable values and units, but it also includes some additional convenience methods for affecting the sim's state. The code itself is well-commented, so I won't be reproducing the API here. Run `pydoc variable_server` (in the containing directory) for that.
|
`variable_server.py` is a Python module for communicating with a sim's variable server from a Python program. Its primary purpose is to easily get and set variable values and units, but it also includes some additional convenience methods for affecting the sim's state. The code itself is well-commented, so I won't be reproducing the API here. Run `pydoc variable_server` (in the containing directory) for that.
|
||||||
|
|
||||||
# Release Your Resources!
|
# Release Your Resources!
|
||||||
@ -384,4 +388,4 @@ class Variable(__builtin__.object)
|
|||||||
| should not directly change any part of this class.
|
| should not directly change any part of this class.
|
||||||
```
|
```
|
||||||
|
|
||||||
[Continue to Software Requirements](software_requirements_specification/SRS)
|
[Continue to Trick Ops](TrickOps)
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Miscellaneous Trick Tools](Miscellaneous-Trick-Tools) → Trick Ops |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
# Table of Contents
|
# Table of Contents
|
||||||
* [Requirements](#Requirements)
|
* [Requirements](#Requirements)
|
||||||
* [Features](#Features)
|
* [Features](#Features)
|
||||||
@ -292,3 +295,4 @@ This is purposeful -- handling every project-specific constraint is impossible.
|
|||||||
|
|
||||||
A lot of time was spent adding `python` docstrings to the `TrickWorkflow.py` and `WorkflowCommon.py` modules. This README does not cover all functionality, so please see the in-code documentation for more detailed information on the framework.
|
A lot of time was spent adding `python` docstrings to the `TrickWorkflow.py` and `WorkflowCommon.py` modules. This README does not cover all functionality, so please see the in-code documentation for more detailed information on the framework.
|
||||||
|
|
||||||
|
[Continue to Software Requirements](../software_requirements_specification/SRS)
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Running a Simulation](Running-a-Simulation) → Input File |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
The primary interface between the simulation executable and the user is the runstream
|
The primary interface between the simulation executable and the user is the runstream
|
||||||
input file. The Trick simulation input file syntax is Python. All Python syntax rules
|
input file. The Trick simulation input file syntax is Python. All Python syntax rules
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → Running a Simulation |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
S_main_${TRICK_HOST_CPU}.exe is generated by the CP and is the simulation main executable program.
|
S_main_${TRICK_HOST_CPU}.exe is generated by the CP and is the simulation main executable program.
|
||||||
|
|
||||||
The runtime configuration of the executive and its associated support utilities may be manipulated through entries in the simulation input file. The input file is described in detail in Input_File.
|
The runtime configuration of the executive and its associated support utilities may be manipulated through entries in the simulation input file. The input file is described in detail in Input_File.
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Running a Simulation](Running-a-Simulation) → Runtime Output|
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
Executing the simulation main executable S_main_${TRICK_HOST_CPU}.exe generates a handful of log files that document a simulation run.
|
Executing the simulation main executable S_main_${TRICK_HOST_CPU}.exe generates a handful of log files that document a simulation run.
|
||||||
|
|
||||||
The log files are written to the RUN_<name> directory by default. The destination can be redirected by specifying the -O or -OO option for the runtime executive. Two of the log files are described below.
|
The log files are written to the RUN_<name> directory by default. The destination can be redirected by specifying the -O or -OO option for the runtime executive. Two of the log files are described below.
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../../Documentation-Home) → [Running a Simulation](../Running-a-Simulation) → [Runtime GUIs](Runtime-GUIs) → Malfunctions |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
### Events/Malfunctions Trick View
|
### Events/Malfunctions Trick View
|
||||||
Events/Malfunctions Trick View (hereafter referred to as MTV) is a graphical user interface that has two main functions:
|
Events/Malfunctions Trick View (hereafter referred to as MTV) is a graphical user interface that has two main functions:
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../../Documentation-Home) → [Running a Simulation](../Running-a-Simulation) → [Runtime GUIs](Runtime-GUIs) → Monte Monitor |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
### Monte Monitor
|
### Monte Monitor
|
||||||
|
|
||||||
Monte Monitor (hereafter referred to as MM) is a graphical user interface that allows users to view and modify the states
|
Monte Monitor (hereafter referred to as MM) is a graphical user interface that allows users to view and modify the states
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../../Documentation-Home) → [Running a Simulation](../Running-a-Simulation) → Runtime GUIs |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
Trick provides the following graphical user interfaces:
|
Trick provides the following graphical user interfaces:
|
||||||
|
|
||||||
### Simulation Control Panel
|
### Simulation Control Panel
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../../Documentation-Home) → [Running a Simulation](../Running-a-Simulation) → [Runtime GUIs](Runtime-GUIs) → Trick View |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
Trick View (hereafter referred to as TV) is a graphical user interface that allows users to view and modify Trick-managed variables in a simulation while it is running. It also provides for the launching of integrated strip charts and can save and restore lists of variables and their associated strip charts.
|
Trick View (hereafter referred to as TV) is a graphical user interface that allows users to view and modify Trick-managed variables in a simulation while it is running. It also provides for the launching of integrated strip charts and can save and restore lists of variables and their associated strip charts.
|
||||||
|
|
||||||
#### Launching
|
#### Launching
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Checkpoints |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
The Trick CheckPointWriter is a C++ Class that implements checkpointing.
|
The Trick CheckPointWriter is a C++ Class that implements checkpointing.
|
||||||
|
|
||||||
## Checkpointing
|
## Checkpointing
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Command Line Arguments |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
|
|
||||||
The Trick::CommandLineArguments class stores the command line arguments specified
|
The Trick::CommandLineArguments class stores the command line arguments specified
|
||||||
by the user when starting the simulation. The class provides routines to
|
by the user when starting the simulation. The class provides routines to
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Data Record |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
Data Recording provides the capability to specify any number of data recording groups,
|
Data Recording provides the capability to specify any number of data recording groups,
|
||||||
each with an unlimited number of parameter references, and with each group recording
|
each with an unlimited number of parameter references, and with each group recording
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Debug Pause |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
Debug Pause is a debugging feature provided by Trick. When turned on, Debug Pause will print the current simulation time and
|
Debug Pause is a debugging feature provided by Trick. When turned on, Debug Pause will print the current simulation time and
|
||||||
the name of the current job, and pause the simulation @e before the job is executed. Debug Pause provides a way for the user to step
|
the name of the current job, and pause the simulation @e before the job is executed. Debug Pause provides a way for the user to step
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Echo Jobs |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
Echo Jobs is a handy debugging toggle provided by Trick. When turned on, Echo Jobs will print the current simulation time and
|
Echo Jobs is a handy debugging toggle provided by Trick. When turned on, Echo Jobs will print the current simulation time and
|
||||||
the name of the current job being executed. Echo Jobs is a convenient way to see the order of job execution and narrow down when
|
the name of the current job being executed. Echo Jobs is a convenient way to see the order of job execution and narrow down when
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Environment |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
This class saves the Trick environment variables at compile-time. The variables
|
This class saves the Trick environment variables at compile-time. The variables
|
||||||
are saved inside the S_main executable. These variables are read-only after they
|
are saved inside the S_main executable. These variables are read-only after they
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Event Manager |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
This page describes the methods available in the Trick::EventManager and Trick::EventProcessor class.
|
This page describes the methods available in the Trick::EventManager and Trick::EventProcessor class.
|
||||||
See [Input_File](/trick/documentation/running_a_simulation/Input-File) for detailed information on the syntax of the input processor file.
|
See [Input_File](/trick/documentation/running_a_simulation/Input-File) for detailed information on the syntax of the input processor file.
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Executive Scheduler |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
This scheduler or derivative of this class is required for Trick simulations to run.
|
This scheduler or derivative of this class is required for Trick simulations to run.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Frame Logging |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
Trick provides a means to gather simulation performance data and view it using Data Products (see [Data Products](Data-Products)).
|
Trick provides a means to gather simulation performance data and view it using Data Products (see [Data Products](Data-Products)).
|
||||||
When the user turns on the Frame Logging feature, Trick will use its Data Recording mechanism to track the following:
|
When the user turns on the Frame Logging feature, Trick will use its Data Recording mechanism to track the following:
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Input Processor |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
This page describes the methods available in the Trick::InputProcessor class.
|
This page describes the methods available in the Trick::InputProcessor class.
|
||||||
<b>See [Input File](../running_a_simulation/Input-File) for detailed information on the syntax of the input processor file.
|
<b>See [Input File](../running_a_simulation/Input-File) for detailed information on the syntax of the input processor file.
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Integrator |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
Trick provides a state integration capability described by the inputs below.
|
Trick provides a state integration capability described by the inputs below.
|
||||||
To use these options a developer must develop application code which interfaces the application states with
|
To use these options a developer must develop application code which interfaces the application states with
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → JIT Input Processor |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
A JIT input file is a C++ input file that can be used along side a python input file, or even replace the python input file. The JIT input file includes "S_source.hh" that gives it access to the entire simulation. The code in a JIT input file is compiled into a shared library during simulation initialization. The simulation dynamically opens the shared library and runs a specific function called "run_me" that must be defined in the JIT input file. There are a couple of advantages to this type of input file.
|
A JIT input file is a C++ input file that can be used along side a python input file, or even replace the python input file. The JIT input file includes "S_source.hh" that gives it access to the entire simulation. The code in a JIT input file is compiled into a shared library during simulation initialization. The simulation dynamically opens the shared library and runs a specific function called "run_me" that must be defined in the JIT input file. There are a couple of advantages to this type of input file.
|
||||||
|
|
||||||
1. Once compiled, a JIT input file is orders of magnitude faster to execute than a python equivalent. That is because there is no python is involved, everything is C++.
|
1. Once compiled, a JIT input file is orders of magnitude faster to execute than a python equivalent. That is because there is no python is involved, everything is C++.
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Master/Slave |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
Master/Slave is a way to do distributed processing in Trick using multiple simulations.
|
Master/Slave is a way to do distributed processing in Trick using multiple simulations.
|
||||||
Master/Slave synchronization synchronizes a master simulation to one or more slave
|
Master/Slave synchronization synchronizes a master simulation to one or more slave
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Realtime Clock |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
# Realtime-Clock
|
# Realtime-Clock
|
||||||
|
|
||||||
**Contents**
|
**Contents**
|
||||||
@ -194,6 +197,6 @@ double exec_get_sim_time(void) ;
|
|||||||
|
|
||||||
defined in ```exec_proto.h```.
|
defined in ```exec_proto.h```.
|
||||||
|
|
||||||
|
Continue to [Realtime Timer](Realtime-Timer)
|
||||||
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Realtime Injector |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
The Real Time Injector (RTI) allows the user to set simulation variables
|
The Real Time Injector (RTI) allows the user to set simulation variables
|
||||||
synchronously without impacting real-time performance. The RTI performs the injection
|
synchronously without impacting real-time performance. The RTI performs the injection
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Realtime Timer |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
A realtime sleep timer is an optional class for Trick simulations.
|
A realtime sleep timer is an optional class for Trick simulations.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Realtime |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
Trick provides a real-time processing capability which is different from many real-time
|
Trick provides a real-time processing capability which is different from many real-time
|
||||||
simulation capabilities. The Trick executive is a "time based" executive and can run in
|
simulation capabilities. The Trick executive is a "time based" executive and can run in
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → STL Checkpointing |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
Trick checkpoints the following STL types: array, vector, list, deque, set, multiset map, multimap, stack, queue, priority_queue, pair.
|
Trick checkpoints the following STL types: array, vector, list, deque, set, multiset map, multimap, stack, queue, priority_queue, pair.
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → Simulation Capabilities |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
This section details the runtime capabilities of Trick.
|
This section details the runtime capabilities of Trick.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Status Message System |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
The Message Publisher publishes executive and/or model messages. A Message Subscriber gets the messages published by the Publisher.
|
The Message Publisher publishes executive and/or model messages. A Message Subscriber gets the messages published by the Publisher.
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Threads |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
# The ThreadBase Class
|
# The ThreadBase Class
|
||||||
|
|
||||||
A trick sim is a multi-threaded process, and all of the threads that are created by Trick or Trick generated code inherit from the abstract class ThreadBase. ThreadBase classes have the capability to change the priority and cpu affinity of the thread. ThreadBase classes include trick_sys threads as well as user defined threads from the S_define:
|
A trick sim is a multi-threaded process, and all of the threads that are created by Trick or Trick generated code inherit from the abstract class ThreadBase. ThreadBase classes have the capability to change the priority and cpu affinity of the thread. ThreadBase classes include trick_sys threads as well as user defined threads from the S_define:
|
||||||
@ -70,4 +73,5 @@ Set the priority for the thread. See the man page for sched(7) for more details.
|
|||||||
```cpp
|
```cpp
|
||||||
int set_priority(unsigned int req_priority)
|
int set_priority(unsigned int req_priority)
|
||||||
```
|
```
|
||||||
[Continue to Simulation Utilities](/trick/documentation/simulation_utilities/Simulation-Utilities)
|
|
||||||
|
[Continue to Web Server](../web/Webserver)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
| [Home](Home) → [Documentation Home](Documentation-Home) → Monte Carlo |
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Monte Carlo |
|
||||||
|--------------------------------------------------------------------------------------|
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
# Introduction
|
# Introduction
|
||||||
Monte Carlo is an advanced simulation capability provided by Trick that allows users to repeatedly run copies of a simulation with different input values. Users can vary the input space of a simulation via input file, random value generation, or by calculating values from previous Monte Carlo runs in a process called optimization.
|
Monte Carlo is an advanced simulation capability provided by Trick that allows users to repeatedly run copies of a simulation with different input values. Users can vary the input space of a simulation via input file, random value generation, or by calculating values from previous Monte Carlo runs in a process called optimization.
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Variable Server |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
When running a Trick simulation, unless specifically turned off, a server called the
|
When running a Trick simulation, unless specifically turned off, a server called the
|
||||||
"variable server" is always up and listening in a separate thread of execution. The
|
"variable server" is always up and listening in a separate thread of execution. The
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../../Documentation-Home) → [Simulation Capabilities](../Simulation-Capabilities) → [Memory Manager](MemoryManager) → Declaration String|
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
|
|
||||||
### Memory Manager Declaration
|
### Memory Manager Declaration
|
||||||
A declaration provides a data type description of a chunk of memory.
|
A declaration provides a data type description of a chunk of memory.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../../Documentation-Home) → [Simulation Capabilities](../Simulation-Capabilities) → [Memory Manager](MemoryManager) → Trick Type|
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
- **TRICK_TYPE** is an enmeration type that specifies data types.
|
- **TRICK_TYPE** is an enmeration type that specifies data types.
|
||||||
Available types are provided in the following table.
|
Available types are provided in the following table.
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../../Documentation-Home) → [Simulation Capabilities](../Simulation-Capabilities) → Memory Manager |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
## Trick Memory Manager
|
## Trick Memory Manager
|
||||||
|
|
||||||
The Memory Manager
|
The Memory Manager
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Utilities](Simulation-Utilities) → Math Utilities |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
To be added.
|
To be added.
|
||||||
|
|
||||||
[Continue to Miscellaneous Trick Tools](../miscellaneous_trick_tools/Miscellaneous-Trick-Tools)
|
[Continue to Miscellaneous Trick Tools](../miscellaneous_trick_tools/Miscellaneous-Trick-Tools)
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → Simulation Utilities |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
This section details the simulation utilities of Trick. Simulation utilities provide a service to
|
This section details the simulation utilities of Trick. Simulation utilities provide a service to
|
||||||
user models. These included a socket communication library, Trickcomm, as well as math routines,
|
user models. These included a socket communication library, Trickcomm, as well as math routines,
|
||||||
units conversion routines, and some abstract data types written in C.
|
units conversion routines, and some abstract data types written in C.
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Utilities](Simulation-Utilities) → TrickComm |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
To be added.
|
To be added.
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Web Server](Webserver) → Configuring Trick with Civetweb |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
## Configuring Trick with Civetweb
|
## Configuring Trick with Civetweb
|
||||||
To configure Trick to support the civetweb web server, you'll need to
|
To configure Trick to support the civetweb web server, you'll need to
|
||||||
|
|
||||||
@ -19,3 +22,5 @@ cd $(TRICK_HOME)
|
|||||||
make clean
|
make clean
|
||||||
make
|
make
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Continue to [Adding SSL Encryption](SSL)
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Web Server](Webserver) → [APIs](WebServerAPIs) → Extending the HTTP API |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
## Extending the HTTP-API
|
## Extending the HTTP-API
|
||||||
|
|
||||||
The HTTP-API is implemented as a collection of ```httpMethodHandlers```. An ```httpMethodHandler``` is a pointer to a function that is expected to respond to an HTTP GET request, using the **CivetWeb** framework. An ```httpMethodHandler``` is defined (in ```trick/CivetWeb.hh```) as follows:
|
The HTTP-API is implemented as a collection of ```httpMethodHandlers```. An ```httpMethodHandler``` is a pointer to a function that is expected to respond to an HTTP GET request, using the **CivetWeb** framework. An ```httpMethodHandler``` is defined (in ```trick/CivetWeb.hh```) as follows:
|
||||||
@ -113,3 +116,5 @@ void create_connections() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Continue to [Extending the WS API](Extend-ws-api)
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Web Server](Webserver) → [APIs](WebServerAPIs) → Extend the WS API |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
## Extending the WebSocket-API
|
## Extending the WebSocket-API
|
||||||
|
|
||||||
## When You Create a WebSocket Connection
|
## When You Create a WebSocket Connection
|
||||||
@ -267,6 +270,4 @@ To test your new web socket interface, put the following ```time.html``` file in
|
|||||||
</html>
|
</html>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Continue to [Simulation Utilities](../simulation_utilities/Simulation-Utilities)
|
||||||
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Web Server](Webserver) → Adding SSL Encryption to your Webserver |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
# Adding SSL Encryption to Your Webserver
|
# Adding SSL Encryption to Your Webserver
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
@ -34,3 +37,5 @@ Where server.pem is the path to the server.pem file you created when creating a
|
|||||||
|
|
||||||
## Access your webserver
|
## Access your webserver
|
||||||
Now that ssl encryption is enabled, to access you webserver use https://localhost.ssl:8888 instead of http and wss://localhost.ssl:8888 for http and ws protocals respectively.
|
Now that ssl encryption is enabled, to access you webserver use https://localhost.ssl:8888 instead of http and wss://localhost.ssl:8888 for http and ws protocals respectively.
|
||||||
|
|
||||||
|
Continue to [Adding SSL Encryption](SSL)
|
12
docs/documentation/web/Webserver-apis.md
Normal file
12
docs/documentation/web/Webserver-apis.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Web Server](Webserver) → APIs |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
|
# Web Server APIs
|
||||||
|
|
||||||
|
The web server provides APIs over http and wss protocol. Both can be extended by a client developer if necessary.
|
||||||
|
|
||||||
|
API Documentation Pages
|
||||||
|
- [HTTP Alloc API](http-alloc-api)
|
||||||
|
- [WS Variable Server API](ws-variable-server-api)
|
||||||
|
- [Extending the HTTP API](Extend-http-api)
|
||||||
|
- [Extending the WS API](Extend-ws-api)
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → Web Server |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
# Adding a Web Server to Your Sim
|
# Adding a Web Server to Your Sim
|
||||||
|
|
||||||
If Trick is [configured with Civetweb](Configuring_TRICK_with_Civetweb.md),
|
If Trick is [configured with Civetweb](Configuring_TRICK_with_Civetweb.md),
|
||||||
@ -77,3 +80,4 @@ The **images** directory contains trick_icon.png.
|
|||||||
|
|
||||||
**You are encouraged to add to, modify, and/or delete these files and directories to best suite the needs of your project.**
|
**You are encouraged to add to, modify, and/or delete these files and directories to best suite the needs of your project.**
|
||||||
|
|
||||||
|
Continue to [Configuring Trick with Civetweb](Configure-Civetweb)
|
@ -1,16 +1,19 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Web Server](Webserver) → [APIs](WebServerAPIs) → HTTP Alloc API |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
# HTTP-API: alloc_info
|
# HTTP-API: alloc_info
|
||||||
|
|
||||||
```http://localhost:8888/api/http/alloc_info```
|
```http://localhost:8888/api/http/alloc_info```
|
||||||
|
|
||||||
## Purpose
|
## Purpose
|
||||||
|
|
||||||
Request a JSON encoded sub-list of allocation descriptors from the Memory Manager’s alloc_info list.
|
Request a JSON encoded sub-list of allocation descriptors from the Memory Manager’s alloc_info list.
|
||||||
|
|
||||||
## Query String Parameters
|
## Query String Parameters
|
||||||
| Parameter|Default|Description |
|
| Parameter|Default|Description |
|
||||||
|-------------|----|----------------------------------|
|
|-------------|----|----------------------------------|
|
||||||
| ```start``` | 0 | starting index of the sub-list. |
|
| ```start``` | 0 | starting index of the sub-list. |
|
||||||
| ```count``` | 20 | number of allocation descriptors.|
|
| ```count``` | 20 | number of allocation descriptors.|
|
||||||
|
|
||||||
### EXAMPLE:
|
### EXAMPLE:
|
||||||
|
|
||||||
@ -20,11 +23,11 @@ Request a JSON encoded sub-list of allocation descriptors from the Memory Manage
|
|||||||
|
|
||||||
Returns a JSON object containing four name-value pairs:
|
Returns a JSON object containing four name-value pairs:
|
||||||
|
|
||||||
### JSON Response Object
|
### JSON Response Object
|
||||||
|
|
||||||
| Name | Value Description |
|
| Name | Value Description |
|
||||||
|-------------------|-----------------------------------------|
|
|-------------------|-----------------------------------------|
|
||||||
| ```alloc_total``` | Total number allocations in the Memory Manager’s alloc_info list. |
|
| ```alloc_total``` | Total number allocations in the Memory Manager’s alloc_info list. |
|
||||||
| ```chunk_size``` | Number of allocation description objects in ```alloc_list```. |
|
| ```chunk_size``` | Number of allocation description objects in ```alloc_list```. |
|
||||||
| ```chunk_start``` | The Memory Manager alloc_info index of the first ```alloc_list``` element below|
|
| ```chunk_start``` | The Memory Manager alloc_info index of the first ```alloc_list``` element below|
|
||||||
| ```alloc_list``` | Array of JSON Allocation Description objects (described below). |
|
| ```alloc_list``` | Array of JSON Allocation Description objects (described below). |
|
||||||
@ -33,8 +36,8 @@ Returns a JSON object containing four name-value pairs:
|
|||||||
### JSON Allocation Description Object
|
### JSON Allocation Description Object
|
||||||
|
|
||||||
| Name | Value Description |
|
| Name | Value Description |
|
||||||
|---------------|---------------------------------------------------------------------------------|
|
|---------------|---------------------------------------------------------------------------------|
|
||||||
| ```name``` | Name of the allocation. May be ```Null``` |
|
| ```name``` | Name of the allocation. May be ```Null``` |
|
||||||
| ```start``` | Starting address of the allocation. |
|
| ```start``` | Starting address of the allocation. |
|
||||||
| ```end``` | Ending address of the allocation. |
|
| ```end``` | Ending address of the allocation. |
|
||||||
| ```num``` | |
|
| ```num``` | |
|
||||||
@ -56,32 +59,34 @@ In ```SIM_cannon_numeric``` (one of Trick's example sims) the following query re
|
|||||||
#### Response
|
#### Response
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{ "alloc_total":43,
|
{ "alloc_total":43,
|
||||||
"chunk_size":2,
|
"chunk_size":2,
|
||||||
"chunk_start":20,
|
"chunk_start":20,
|
||||||
"alloc_list":[
|
"alloc_list":[
|
||||||
{ "name":"dyn",
|
{ "name":"dyn",
|
||||||
"start":"0x101aa9900",
|
"start":"0x101aa9900",
|
||||||
"end":"0x101aa9b27",
|
"end":"0x101aa9b27",
|
||||||
"num":"1",
|
"num":"1",
|
||||||
"size":"552",
|
"size":"552",
|
||||||
"type":"CannonSimObject",
|
"type":"CannonSimObject",
|
||||||
"stcl":"TRICK_EXTERN",
|
"stcl":"TRICK_EXTERN",
|
||||||
"language":"Language_CPP",
|
"language":"Language_CPP",
|
||||||
"index": []
|
"index": []
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
{ "name":"web",
|
{ "name":"web",
|
||||||
"start":"0x101aa9610",
|
"start":"0x101aa9610",
|
||||||
"end":"0x101aa98ff",
|
"end":"0x101aa98ff",
|
||||||
"num":"1",
|
"num":"1",
|
||||||
"size":"752",
|
"size":"752",
|
||||||
"type":"WebServerSimObject",
|
"type":"WebServerSimObject",
|
||||||
"stcl":"TRICK_EXTERN",
|
"stcl":"TRICK_EXTERN",
|
||||||
"language":"Language_CPP",
|
"language":"Language_CPP",
|
||||||
"index": []
|
"index": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Continue to [WS Variable Server API](ws-variable-server-api)
|
@ -1,3 +1,6 @@
|
|||||||
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Web Server](Webserver) → [APIs](WebServerAPIs) → WS Variable Server API |
|
||||||
|
|------------------------------------------------------------------|
|
||||||
|
|
||||||
# WS-API: VariableServer
|
# WS-API: VariableServer
|
||||||
|
|
||||||
```ws://localhost:8888/api/ws/VariableServer```
|
```ws://localhost:8888/api/ws/VariableServer```
|
||||||
@ -18,62 +21,62 @@ Add a Trick Variable to the current session.
|
|||||||
Stop sending periodic ```var_list``` messages (*see below*) from the server.
|
Stop sending periodic ```var_list``` messages (*see below*) from the server.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{ "cmd" : "var_pause" }
|
{ "cmd" : "var_pause" }
|
||||||
```
|
```
|
||||||
|
|
||||||
Resume sending periodic ```var_list``` response messages from the server.
|
Resume sending periodic ```var_list``` response messages from the server.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{ "cmd" : "var_unpause" }
|
{ "cmd" : "var_unpause" }
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Send one ```var_list``` message from the server.
|
Send one ```var_list``` message from the server.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{ "cmd" : "var_send" }
|
{ "cmd" : "var_send" }
|
||||||
```
|
```
|
||||||
|
|
||||||
Clear all variables from the current session, that is: undo all of the ```var_add``` commands.
|
Clear all variables from the current session, that is: undo all of the ```var_add``` commands.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{ "cmd" : "var_clear" }
|
{ "cmd" : "var_clear" }
|
||||||
```
|
```
|
||||||
|
|
||||||
Disconnect from the variable server.
|
Disconnect from the variable server.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{ "cmd" : "var_exit" }
|
{ "cmd" : "var_exit" }
|
||||||
```
|
```
|
||||||
|
|
||||||
Set the period (in milliseconds) at which ```var_list``` messages are sent form the server.
|
Set the period (in milliseconds) at which ```var_list``` messages are sent form the server.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{ "cmd" : "var_cycle",
|
{ "cmd" : "var_cycle",
|
||||||
"period" : integer
|
"period" : integer
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Execute the given Python code in the host sim.
|
Execute the given Python code in the host sim.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{ "cmd" : "python",
|
{ "cmd" : "python",
|
||||||
"pycode" : string
|
"pycode" : string
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Send the sie structure from the server. Response will be the ```sie``` response message (*below*).
|
Send the sie structure from the server. Response will be the ```sie``` response message (*below*).
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{ "cmd" : "sie" }
|
{ "cmd" : "sie" }
|
||||||
```
|
```
|
||||||
|
|
||||||
Send the units for the given variable. Response will be the ```units``` response message (*below*).
|
Send the units for the given variable. Response will be the ```units``` response message (*below*).
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{ "cmd" : "units",
|
{ "cmd" : "units",
|
||||||
"var_name" : string
|
"var_name" : string
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Server to Client Response Messages
|
## Server to Client Response Messages
|
||||||
@ -81,34 +84,34 @@ Send the units for the given variable. Response will be the ```units``` response
|
|||||||
Error Response
|
Error Response
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{ "msg_type" : "error",
|
{ "msg_type" : "error",
|
||||||
"error_text" : string
|
"error_text" : string
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Periodic response containing the values of variables requested by ```var_add```.
|
Periodic response containing the values of variables requested by ```var_add```.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{ "msg_type" : "var_list"
|
{ "msg_type" : "var_list"
|
||||||
"time" : double
|
"time" : double
|
||||||
"values" : []
|
"values" : []
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Response to the ```sie``` command (*above*).
|
Response to the ```sie``` command (*above*).
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{ "msg_type" : "sie",
|
{ "msg_type" : "sie",
|
||||||
"data" : string
|
"data" : string
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Response to the ```units``` command (*above*).
|
Response to the ```units``` command (*above*).
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{ "msg_type" : "units",
|
{ "msg_type" : "units",
|
||||||
"var_name" : string,
|
"var_name" : string,
|
||||||
"data" : string
|
"data" : string
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -208,3 +211,5 @@ Response to the ```units``` command (*above*).
|
|||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Continue to [Extending the HTTP API](Extend-http-api)
|
Loading…
Reference in New Issue
Block a user