Hardware Simulator

The simulator offers digital and analog inputs and outputs. It offers to run simple example and test programs without the need of external hardware, see Tutorials. The wrapper library can be found in https://github.com/eeros-project/sim-eeros.
Currently the simulator encompasses a reflect device:

The available subdevices of the simulator

The input channels of Subdevice Digital Input are output on the channels of Subdevice Digital Output and similarly the same is true for the input channels of Subdevice Analog Input which are output on Subdevice Analog Output. Every signal on input channel 0 to 10 is “reflected” onto its corresponding output channel 0 to 10.

Available Subdevices

Function Description Subdevice available Channels
Digital Output Outputs 0 0-10
Digital Input Inputs reflected from outputs of subdevice 0 1 0-10
Analog Output Outputs 2 0-10
Analog Input Inputs reflected from outputs of subdevice 2 3 0-10

Configuration File

The possible configuration file for the initialization of the Hardware Abstraction Layer might be as follows:

{
  "device0": {
    "library": "libsimeeros.so",
    "devHandle": "reflect",
    "subdevice0": {
      "type": "DigOut",
      "channel1": {
        "signalId": "dout0"
      }
    },
    "subdevice1": {
      "type": "DigIn",
      "channel1": {
        "signalId": "din0"
      }
    },
    "subdevice2": {
      "type": "AnalogOut",
      "channel7": {
        "signalId": "aout1"
      }
    },
    "subdevice3": {
      "type": "AnalogIn",
      "channel7": {
        "signalId": "ain1"
      }
    }
  }
}

Digital output on dout0 can be read at input din0, analog output on aout1 can be read at input ain1. The configuration could include scaling and range limiting for the analog channels as described in Configuration File.