From f8b3b3b854ad05329c73d5b98fa24916a270de65 Mon Sep 17 00:00:00 2001 From: Manuel Traut Date: Mon, 14 Jan 2013 10:38:45 +0100 Subject: add direction attribute to IOs is quiet useful to get an idea via IDL if it's an input or output Signed-off-by: Manuel Traut --- interfaces/distrio_io.idl | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'interfaces') diff --git a/interfaces/distrio_io.idl b/interfaces/distrio_io.idl index 42da67d..67e6d9c 100644 --- a/interfaces/distrio_io.idl +++ b/interfaces/distrio_io.idl @@ -22,6 +22,11 @@ module Distrio { TRIGGER_FALLING_EDGE }; + enum Direction { + INPUT, + OUTPUT + }; + /** a digital input or output pin */ interface Digital { /** get the name of the hardware which is connected to this pin */ @@ -34,6 +39,8 @@ module Distrio { Distrio::Error get (out long value); /** register a callback that is called if the state of the pin changes */ Distrio::Error register_callback (in Device dev, in Digital_trigger trigger); + /** returns direction of digital IO */ + Distrio::Direction direction (); /** stores a timestamp of the last update of the referenced value */ attribute Distrio::Timestamp last_update; /** the id is given by Distrio::Manager during registration */ @@ -64,6 +71,8 @@ module Distrio { Distrio::Error get (out long value); /** register a callback that is called if the trigger matches */ Distrio::Error register_callback (in Device dev, in Analog_trigger trigger); + /** returns direction of analog IO */ + Distrio::Direction direction (); /** stores a timestamp of the last update of the referenced value */ attribute Distrio::Timestamp last_update; /** the id is given by Distrio::Manager during registration */ -- cgit v1.2.3