3. States and possible state switches#
The TOPOFLIGHT universal protocol offers two control interfaces: a web browser-based graphical user interface and a TCP-based interface. The web interface will enable the operator to invoke all state-switching methods. As a result, from TOPOFLIGHT side, it should not be assumed that the state cannot change unless requested via TCP.
Current implementations of the TOPOFLIGHT universal protocol will have these possible states:
|
“CONNECTED” |
The TOPOFLIGHT universal protocol is activated, the TCP server is running and ready to listen for requests. It is awaiting the |
|
“STARTING” |
This state indicates that there was a recent request for the TOPOFLIGHT universal protocol to perform |
|
“NOT_LOGGING” |
The TOPOFLIGHT universal protocol is ready for data collection. Once |
|
“LOGGING” |
The TOPOFLIGHT universal protocol is currently collecting data. Once |
|
“STOPPING” |
This state indicates that a recent request for the TOPOFLIGHT universal protocol to perform |
|
undefined |
reserved for later use |
|
“ERROR” |
Some error has occurred in the TOPOFLIGHT universal protocol, and the self-diagnostics have identified the issue. The TOPOFLIGHT universal protocol is unable to continue functioning. Transitioning to this state can occur at any point during the workflow. |
The following simplified state diagram excludes the ERROR state for visual clarity. The complete version is provided at the end of the chapter.
When TOPOFLIGHT first connects to the TOPOFLIGHT universal protocol, it is generally expected to be in the CONNECTED state.
While in the CONNECTED state, the only request that can be made is "SystemStart"
, which switches the state to STARTING. Once the sensor startup sequence is complete, the TOPOFLIGHT universal protocol will transition to NOT_LOGGING.
When the TOPOFLIGHT universal protocol is in the NOT_LOGGING state, "StartLogging"
can be called, which will transition it to LOGGING and initiate data collection with minimal delay (the exact delay will need to be determined through testing). Additionally, "SystemStop"
can be invoked while in the NOT_LOGGING state, which will switch the TOPOFLIGHT universal protocol to STOPPING, and subsequently to CONNECTED.
When the TOPOFLIGHT universal protocol is in the LOGGING state, "StopLogging"
can be called to swiftly halt data collection and transition the state to NOT_LOGGING with minimal delay. This action does not initiate any stopping sequence for the sensors, allowing them to remain prepared for a quick return to LOGGING.
When ending work with the TOPOFLIGHT universal protocol, "SystemStop"
should be called. This can be done from both the LOGGING and NOT_LOGGING states. It will transition the state to STOPPING, initiate the sensor stopping sequence, and then switch back to CONNECTED.
The following full state diagram includes the ERROR state, which can be transitioned to from any state. This state will be visible to TOPOFLIGHT through the "GetState"
request and error details will be provided in the "message"
field.