diff options
| author | Manuel Traut <manut@mecka.net> | 2012-05-29 02:10:20 +0200 |
|---|---|---|
| committer | Manuel Traut <manut@mecka.net> | 2012-05-29 02:10:20 +0200 |
| commit | f791f02b89efc984b40b922ed53ff6cb76e3e829 (patch) | |
| tree | 0eaa04c79c493d7815dc2de9a3c4eefb18e85081 /interfaces/io.idl | |
| parent | 379492ff3c10eef6479fd85418b797f97889d3f9 (diff) | |
improve interfaces and fix typos
- added timestamp for error
- added log function to collect errors in controller
- merged device.idl into io.idl
- fixed typos in io
- added callbacks to digital/analog io
Signed-off-by: Manuel Traut <manut@mecka.net>
Diffstat (limited to 'interfaces/io.idl')
| -rw-r--r-- | interfaces/io.idl | 78 |
1 files changed, 64 insertions, 14 deletions
diff --git a/interfaces/io.idl b/interfaces/io.idl index d2f95f8..435ea01 100644 --- a/interfaces/io.idl +++ b/interfaces/io.idl @@ -1,22 +1,72 @@ +#ifndef DISTIO_IO_IDL +#define DISTIO_IO_IDL + #include "common.idl" -module io { +module IO { + + interface Device; - interface digital { - common.error name (out string name); - common.error set (); - common.error reset (); - common.error get (out int value); - attribute Int id; + enum Digital_trigger { + TRIGGER_EDGE, + TRIGGER_RISING_EDGE, + TRIGGER_FALLING_EDGE }; - interface analog { - common.error name (out string name); - common.error min (out int min); - common.error max (out int max); - common.error set (in int value); - common.error get (out int value); - attribute Integer id; + interface Digital { + Common::Error name (out string name); + Common::Error set (); + Common::Error reset (); + Common::Error get (out long value); + Common::Error register_callback (in Device dev, in Digital_trigger trigger); + attribute long id; + }; + + typedef sequence<Digital> Digital_list; + + struct Analog_trigger { + long last_value; + long jitter; }; + interface Analog { + Common::Error name (out string name); + Common::Error min (out long min); + Common::Error max (out long max); + Common::Error set (in long value); + Common::Error get (out long value); + Common::Error register_callback (in Device dev, in Analog_trigger trigger); + attribute long id; + }; + + typedef sequence<Analog> Analog_list; + + enum Dev_function_id { + DEV_START, + DEV_STOP + }; + + struct Dev_function { + string description; + long value; + Dev_function_id id; + }; + + typedef sequence<Dev_function> Dev_function_list; + + interface Device { + Common::Error name (out string name); + Common::Error execute (in Dev_function func); + Common::Error functions (out Dev_function_list funcs); + Common::Error callback_digital (in Digital io_dig); + Common::Error callback_analog (in Analog io_ana); + attribute Analog_list io_ana; + attribute Digital_list io_dig; + attribute long id; + }; + + typedef sequence<Device> Device_list; + }; + +#endif |
