Device simulation framework Plankton and all its dependencies.
1.3K
Renamed to dmscid/lewis. Please use that image.
Plankton is a Python framework for simulating hardware devices. It is compatible with both Python 2 and 3.
Plankton can be run directly using Python 2.7 or >= 3.4, or using a prepackaged Docker image that includes all dependencies. See relevant usage sections for details.
Resources:
Plankton is being developed in the context of instrument control at the ESS, but it is general enough to be used in many other contexts that require detailed, stateful software simulations of hardware devices.
We consider a detailed device simulation to be one that can communicate using the same protocol as the real device, and that can very closely approximate real device behaviour in terms of what is seen through this protocol. This includes gradual processes, side-effects and error conditions.
The purpose of Plankton is to provide a common framework to facilitate the development of such simulators. The framework provides a common set of tools and abstracts away protocol adapters, which helps minimize code replication and allows the developer of a simulated device to focus on capturing device behaviour.
Potential use cases for detailed device simulators include:
Using a simulation for the above has the added benefit that, unlike most real devices, a simulation may be sped up / fast-forwarded past any lengthy delays or processes that occur in the device.
Devices and Interfaces are two independent concepts in Plankton. The Device is model for the device behaviour and internal memory. A Device can be represented using a StateMachine, but it does not have to be. A Device does not include anything specific to the communication protocol with the Device. An Interface provides a protocol binding to a Device. The Device and Interface are created as part of a Simulation that provides a "heart beat" and other environmental aspects.
Devices to closely imitate the internal behaviour and memory of somethingDevice work as a StateMachine via StateMachineDevice to to give rich behavioursInterfaces over your Device to expose it as an EPICS IOC, a TCP listener, or on any other bespoke protocol you likeDevice while it is running via a "back door"Simulation while it is running via a "back door"Details on running Plankton, working with Plankton as a device developer, and framework internals are described in the following documents:
Content type
Image
Digest
Size
16.6 MB
Last updated
almost 10 years ago
docker pull dmscid/plankton