From 89e787c826890aed88f632b1fd5cf4f65541067f Mon Sep 17 00:00:00 2001 From: Manuel Traut Date: Sat, 2 Jun 2012 18:40:19 +0200 Subject: fix includes paths, etc common, io, manager can be build now Signed-off-by: Manuel Traut --- interfaces/distrio_common.idl | 59 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 interfaces/distrio_common.idl (limited to 'interfaces/distrio_common.idl') diff --git a/interfaces/distrio_common.idl b/interfaces/distrio_common.idl new file mode 100644 index 0000000..8756732 --- /dev/null +++ b/interfaces/distrio_common.idl @@ -0,0 +1,59 @@ +#ifndef DISTRIO_COMMON_IDL +#define DISTRIO_COMMON_IDL + +/** + * @brief shared between different modules + * + * - definitions for error handling + * + * @author Manuel Traut + * @copyright GPLv2 + * + */ +module Distrio { + +/** + * @brief kind of error + */ + enum Error_code { + SUCCESS, + E_INVAL, + E_NOTSUPPORTED + }; + +/** + * @brief used for filtering and classification + */ + enum Error_level { + L_DEBUG, + L_INFO, + L_WARNING, + L_NORMAL, + L_CRITICAL + }; + +/** + * @brief describes when the error was detected + * (it's helpful to sync all boards with ntp) + */ + struct Error_timestamp { + long seconds; + long nanoseconds; + }; + +/** + * @brief description of an error + */ + struct Error { + Error_code code; + Error_level level; + Error_timestamp time; + /** id of the digital/analog IO or the IO device */ + long module_id; + /** a human readable description which can be displayed in GUIs */ + string description; + }; + +}; + +#endif -- cgit v1.2.3