numass-framework/site/content/docs/shards/control/control.md

1.2 KiB

content_type title ordering label version date published
doc_shard Control plugin
2000
control 1.0 08.02.2016 true

DataForge control subsystem defines a general api for data acquisition processes. It could be used to issue commands to devices, read data and communicate with storage system or other devices.

The center of control API is a Device class. The device has following important features:

  • States: each device has a number of states that could be accessed by `getStatus` method. States could be either stored as some internal variables or calculated on demand. States calculation is synchronous!
  • Listeners: some external class which listens device state changes and events. By default listeners are represented by weak references so they could be finalized any time if not used.
  • Connections: any external device connectors which are used by device. The difference between listener and connection is that device is obligated to notify all registered listeners about all changes, but connection is used by device at its own discretion. Also usually only one connection is used for each single purpose.