User Tools

Site Tools


eeros_architecture:hal:configuration_file

This is an old revision of the document!


Configuration File

The external hardware is decribed by means of a configuration file in JSON format. Every available hardware must be grouped into device, subdevice and channel. A device could be a data acquisition card, an external FPGA, or a pointing device such as a mouse. The subdevice denotes a certain function such as a group of digital-to-analog outputs or a bank of digital inputs. Finally, a channel is one of such a group of inputs or outputs.
Let's consider a first example

{
  "device0": {
    "library": "libcomedieeros.so",
      "devHandle": "/dev/comedi0",
      "subdevice1": {
        "type": "DigIn",
        "channel0": {
          "signalId": "emergency"
          "inverted": true
        }
      },
      "subdevice5": {
        "type": "AnalogOut",
        "channel0": {
          "signalId": "aOut0",
          "scale": [ { "id" :    "aOut0",
                       "minIn":      0, "maxIn":  65535,
                       "minOut": -10.0, "maxOut":  10.0 },
                   ],
          "range": [ { "id" :   "aOut0",
                       "minIn":      0, "maxIn":  65536,
                       "minOut": -10.0,	"maxOut":  10.0 },
                   ],
          "unit": "V"
        }
      }
    }
  }
}

Every element is composed of a key / value pair. The key must be unique for every hierachy level. A device must contain a library key. The system can then search for the necessary library. This library must be present in the system and will be loaded dynamically upon parsing the configuration file. For available libraries check Hardware Libraries

eeros_architecture/hal/configuration_file.1493359629.txt.gz · Last modified: 2017/04/28 08:07 (external edit)