API Reference
This page contains comprehensive descriptions of the NOS-T tools library features and provides detailed documentation of their functions. The library offers robust support for both time-managed and time-agnostic applications within the Novel Observing Strategies Testbed (NOS-T) ecosystem. Before exploring the API, please complete the installation instructions.
The tools library implements the event-driven architecture described in the system documentation, organizing ten Python modules into three logical categories:
Message Schemas: Define the information carried in common message payloads and the format that information should take using the Pydantic data validation library.
Command messages: Used by the manager to control time-managed scenarios. These include
InitCommand,StartCommand,StopCommand,UpdateCommand,FreezeCommand, andResumeCommandclasses. Further described in this section of the Interface Control Document (ICD).Request messages: Used by managed applications to request freeze, resume, or time scale updates from the manager. These include
FreezeRequest,ResumeRequest, andUpdateRequestclasses.Status messages: Used by all constituent applications to update simulation time and modes. These include
ModeStatus,TimeStatus, andReadyStatusclasses. Further described in this section of the ICD.
Simulator Objects: Manage state changes and internal clocks for simulation applications.
Observer Objects: Implement patterns for loosely coupling observables and observers. The
Observablebase class allows objects to notify registeredObserverinstances of state changes, enabling decoupled event notification. Callback convenience classes includePropertyChangeCallback,ScenarioTimeIntervalCallback, andWallclockTimeIntervalCallback.Scenario Objects: Define states and methods for executing a simulation. The
Simulatorclass manages simulation state and entities, while theModeenumeration defines possible simulation states (IDLE, INIT, EXECUTE, etc.).
Applications Objects: Help constituent applications connect to the AMQP message broker and communicate with the AMQP messaging protocol.
Utilities: Monitor and report on application connections, modes, and time statuses. Includes
ConnectionConfigfor broker connection management,ModeStatusObserverfor tracking mode changes, andTimeStatusPublisherfor simulation time updates.Publishers: Define patterns for publishing messages on regularly spaced time-intervals. Includes
ScenarioTimeIntervalPublisherfor simulation-time-based intervals andWallclockTimeIntervalPublisherfor real-time intervals.Applications: Serve as templates or wrappers of basic MQTT client functionality and synchronization for simulation. The
Applicationbase class provides foundation functionality, whileManagedApplicationadds time management features andManagerorchestrates test execution.
Time Management
A key feature of the NOS-T tools library is its flexible time management system. Applications can operate in:
Real-time mode: Simulation time matches wall clock time
Scaled time mode: Simulation time runs faster or slower than wall clock time
Event-driven mode: Simulation advances based on events rather than continuous time flow
Integration with Test Suites
The NOS-T Example Test Suites feature many different implementations of the tools:
All Python FireSat+ applications utilize the NOS-T tools library for faster than real-time simulation with Manager coordination
The Downlink example demonstrates more complex applications with cost modeling
The Science Dashboard provides a simple unmanaged application pair
The Scalability tests demonstrate system performance under various loads
Furthermore, the example application templates include a collection of bare-bones templates, similar to FireSat+, with the tools functionality integrated.
Getting Started
For new users, we recommend:
Examine the application templates to understand basic patterns
Follow the tutorial to build a simple managed application
Explore the examples to see the tools in action