SeqZap manages devices to make it easier to discover, use and monitor devices.
The device system in SeqZap is very flexible, and ZapTools can define any kind of device class and device entity.
Device Entities
For some devices the device itsels represents a single functional unit. Other devices are devided into several separate and maybe different entities.
For example a digital IO device typically have one or more ports, and each port having several individual channels/lines.
A device could have 3 bidirectional ports with 8 bidirectional channels each. That device therefor have 3 + 3*8 = 27 entities.
The different types of device entities are defined in different ZapTools. The digital input port entity type is defined in the Digital IO tool.
Standard tools using device entities are:
- Analog IO tool
- Digital IO tool (port and channel)
- Timer/Counter tool
- CAN tool
Virtual Devices
Virtual devices can be defined to abstract the local selection of hardware devices. A script can define as many virtual devices as needed.
When defining a virtual device the device entities can be given the same name as the system signal.
Using virtual devices in scripts instead of using the physical devices directly improves the readability and maintenance of the scripts.
In the definition of the virtual device, one or more configurations can be created to map the virtual device entities to the physical device entities to use.
Custom ZapTools can also create a virtual device, and the script must then make the mapping to the physical device entities to use.
