Skip to main content

State Machine

This section provides an overview of possible operating states of the smartCORE edge device software and their interrelationships.

Motivation

The smartCORE software usually runs through different operating states during a runtime.

Start of measurement mode

To successfully start measuring mode, the following states are run through in succession.

StateMeaning
1.ReadyInitial state after starting the application
2.LoadSystemConfigLoading the system configuration /sdi/config/smartcore.json
3.LoadSystemModulesLoad the modules specified within the system configuration
4.InitSystemModulesInitialization of the modules specified within the system configuration
5.InitSystemProducerChannelsCreation of the channels to be produced for all modules specified within the system configuration
6.InitSystemConsumerChannelsSelection of the channels to be consumed for all modules specified within the system configuration
7.ReadyTransit state after successful processing of the system configuration
8.LoadMeasurementConfigLoad the measurement configuration /sdi/config/smartcore_dynamic.json
9.LoadMeasurementModulesLoad the modules specified within the measurement configuration
10.InitMeasurementModulesInitialization of the modules specified within the measurement configuration
11.InitMeasurementProducerChannelsCreating the channels to be produced for all modules specified within the measurement configuration
12.InitMeasurementConsumerChannelsSelection of the channels to be consumed for all modules specified within the measurement configuration
13.StartConsumeStart the consuming functionality of all modules
14.StartProduceStart of the producing functionality all modules
15.RunningState after reaching the measuring mode
info

Channels created in system modules can be selected and consumed in both system and measurement modules, while channels created in measurement modules CANNOT be selected in system modules and therefore CANNOT be consumed.

info

The producer channels are created first so that the consumer channels can then be selected from them.

info

In contrast, the consumption mechanisms of all modules are started first and only then the production mechanisms in order to avoid overflows.

info

While (producer) channels can ONLY be created in the states intended for the creation (initialization) of these channels, there are states for the selection for consumption (also referred to as initialization), but a new selection of channels to be consumed can be made at any time. This is particularly the case in scenarios with interactive selection (such as data consumption/provision via SCPI).

Explicit shutdown/restart

The smartCORE is shut down only if the user explicitly requests it (e.g. as part of a configuration update).

The following mechanisms exist

  • to stop the measurement mode
  • to stop the complete smartCORE measurement and system operation

and also to restart the meter.

Explicit shutdown of the measurement mode

The following states are run through sequentially during measurement mode shutdown.

State / ProcessMeaning
1.RunningInitial state (measurement mode)
2.StopProduceStop the producing functionality of all modules
3.StopConsumeStop consuming functionality all modules
4.CleanupMeasurementModulesDestruction of the modules specified within the measurement configuration
5.ReadyState after successful shutdown of measurement operation

An optional restart is carried out as described above under System start (Part II).

Explicit shutdown of system operation

During the shutdown of system operation (or the complete smartCORE), the following states are run through sequentially.

State / ProcessMeaning
1.RunningInitial state (measurement mode)
2.StopProduceStop the producing functionality of all modules
3.StopConsumeStop consuming functionality all modules
4.CleanupMeasurementModulesDestruction of the modules specified within the measurement configuration
5.CleanupSystemModulesDestruction of the modules specified within the measurement configuration
5.ReadyState after successful shutdown of measurement operation

An optional restart is carried out as described above under System start (Part I) followed by System start (Part II).

info

The difference between shutting down the measurement or system operation is therefore only in the destruction of all system modules. Consequently, it makes sense to include modules in the system configuration that are to be persistent with regard to a restart of measurement operation.

Device restart

The device restart results in a shutdown of system operation with subsequent start of measurement operation after restarting the measuring device.