summaryrefslogtreecommitdiff
path: root/interfaces/controller.idl
blob: 6ae1c8c6b46eadefd36cd3a5ecf2eea7fbfcfc70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef DISTRIO_CONTROLLER_IDL
#define DISTRIO_CONTROLLER_IDL

#include "common.idl"
#include "io.idl"

/**
 * @brief logical view of IO's and Devices (not HW specific)
 *
 * @author Manuel Traut <manut@mecka.net>
 * @copyright GPLv2
 */

module Controller {

/**
 * @brief manage io/device lists, error handling
 *
 * - all modules need to register their IOs and devices
 * - registered IOs and devices can be obtained
 */
	interface Manager {
		/** returns list of registered digital IOs */
		Common::Error digital (out IO::Digital_list io_list);
		/** returns list of registered analog IOs */
		Common::Error analog (out IO::Analog_list io_list);
		/** returns list of registered devices */
		Common::Error device (out IO::Device_list dev_list);
		/** register a digital IO */
		Common::Error register_io_digital (in IO::Analog io_ana);
		/** register a analog IO */
		Common::Error register_io_analog (in IO::Digital io_dig);
		/** register a device */
		Common::Error register_io_device (in IO::Device io_dev);
		/** unregister a digital IO */
		Common::Error unregister_io_digital (in IO::Digital io_dig);
		/** unregister a analog IO */
		Common::Error unregister_io_analog (in IO::Analog io_ana);
		/** unregister a device */
		Common::Error unregister_io_device (in IO::Device io_dev);
		/** used by modules to send errors to a central point
		 *   The implementation of this function could:
		 *    - thispatch errors to a GUI
		 *    - log the errors e.g. with log4*
		 */
		void log_error (in Common::Error error);
	};

};

#endif