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 --- Makefile | 3 +- common/Makefile | 22 +++-- common/common.cpp | 32 ------- common/distrio_common.cpp | 32 +++++++ interfaces/common.idl | 59 ------------- interfaces/distrio_common.idl | 59 +++++++++++++ interfaces/distrio_io.idl | 111 +++++++++++++++++++++++ interfaces/distrio_manager.idl | 51 +++++++++++ interfaces/io.idl | 111 ----------------------- interfaces/manager.idl | 51 ----------- io/Makefile | 42 +++++++++ io/distrio_io.cpp | 196 +++++++++++++++++++++++++++++++++++++++++ manager/Makefile | 26 ++++-- manager/distrio_manager.cpp | 106 ++++++++++++++++++++++ manager/manager.cpp | 102 --------------------- 15 files changed, 632 insertions(+), 371 deletions(-) delete mode 100644 common/common.cpp create mode 100644 common/distrio_common.cpp delete mode 100644 interfaces/common.idl create mode 100644 interfaces/distrio_common.idl create mode 100644 interfaces/distrio_io.idl create mode 100644 interfaces/distrio_manager.idl delete mode 100644 interfaces/io.idl delete mode 100644 interfaces/manager.idl create mode 100644 io/Makefile create mode 100644 io/distrio_io.cpp create mode 100644 manager/distrio_manager.cpp delete mode 100644 manager/manager.cpp diff --git a/Makefile b/Makefile index 56a94fb..9b89793 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ -MAKE_DIRECTORIES = common manager +MAKE_DIRECTORIES = common io manager .PHONY: all +idl: $(MAKE_DIRECTORIES) all: $(MAKE_DIRECTORIES) .PHONY: $(MAKE_DIRECTORIES) diff --git a/common/Makefile b/common/Makefile index d4f0594..441b13f 100644 --- a/common/Makefile +++ b/common/Makefile @@ -2,27 +2,35 @@ CC := $(CROSS_COMPILE)gcc CXX := $(CROSS_COMPILE)g++ LD := $(CROSS_COMPILE)g++ +CFLAGS += -fPIC +CXXFLAGS += $(CFLAGS) + TAO_IDL := tao_idl DESTDIR := /usr -LIB = libdistrio_common.so -OBJ = commonC.o common.o commonS.o +COMPONENT = distrio_common +LIB = lib$(COMPONENT).so +OBJ = $(COMPONENT)C.o $(COMPONENT).o $(COMPONENT)S.o -IDL_CLEANFILES = commonC.cpp commonC.inl commonI.h commonS.h commonC.h \ - commonS.cpp +IDL_CLEANFILES = $(COMPONENT)C.cpp $(COMPONENT)C.inl $(COMPONENT)I.h \ + $(COMPONENT)S.h $(COMPONENT)C.h $(COMPONENT)S.cpp -all: idl $(OBJ) +all: $(OBJ) $(LD) -shared -o $(LIB) $(OBJ) +.PHONY: idl idl: - $(TAO_IDL) -GI -I../interfaces ../interfaces/common.idl - rm -f commonI.cpp + $(TAO_IDL) -GI -I../interfaces ../interfaces/$(COMPONENT).idl + rm -f $(COMPONENT)I.cpp +.PHONY: idl_clean idl_clean: rm -f $(IDL_CLEANFILES) +.PHONY: clean clean: idl_clean + rm -f *.o rm -f $(LIB) install: all diff --git a/common/common.cpp b/common/common.cpp deleted file mode 100644 index cea3ed2..0000000 --- a/common/common.cpp +++ /dev/null @@ -1,32 +0,0 @@ -// -*- C++ -*- -// $Id$ - -/** - * Code generated by the The ACE ORB (TAO) IDL Compiler v2.1.2 - * TAO and the TAO IDL Compiler have been developed by: - * Center for Distributed Object Computing - * Washington University - * St. Louis, MO - * USA - * http://www.cs.wustl.edu/~schmidt/doc-center.html - * and - * Distributed Object Computing Laboratory - * University of California at Irvine - * Irvine, CA - * USA - * and - * Institute for Software Integrated Systems - * Vanderbilt University - * Nashville, TN - * USA - * http://www.isis.vanderbilt.edu/ - * - * Information about TAO is available at: - * http://www.cs.wustl.edu/~schmidt/TAO.html - **/ - -// TAO_IDL - Generated from -// be/be_codegen.cpp:1673 - -#include "commonI.h" - diff --git a/common/distrio_common.cpp b/common/distrio_common.cpp new file mode 100644 index 0000000..56631ce --- /dev/null +++ b/common/distrio_common.cpp @@ -0,0 +1,32 @@ +// -*- C++ -*- +// $Id$ + +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v2.1.2 + * TAO and the TAO IDL Compiler have been developed by: + * Center for Distributed Object Computing + * Washington University + * St. Louis, MO + * USA + * http://www.cs.wustl.edu/~schmidt/doc-center.html + * and + * Distributed Object Computing Laboratory + * University of California at Irvine + * Irvine, CA + * USA + * and + * Institute for Software Integrated Systems + * Vanderbilt University + * Nashville, TN + * USA + * http://www.isis.vanderbilt.edu/ + * + * Information about TAO is available at: + * http://www.cs.wustl.edu/~schmidt/TAO.html + **/ + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1673 + +#include "distrio_commonI.h" + diff --git a/interfaces/common.idl b/interfaces/common.idl deleted file mode 100644 index ded0d1e..0000000 --- a/interfaces/common.idl +++ /dev/null @@ -1,59 +0,0 @@ -#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, - EINVAL, - ENOTSUPPORTED - }; - -/** - * @brief used for filtering and classification - */ - enum Error_level { - DEBUG, - INFO, - WARNING, - NORMAL, - 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 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 diff --git a/interfaces/distrio_io.idl b/interfaces/distrio_io.idl new file mode 100644 index 0000000..25d69a8 --- /dev/null +++ b/interfaces/distrio_io.idl @@ -0,0 +1,111 @@ +#ifndef DISTRIO_IO_IDL +#define DISTRIO_IO_IDL + +#include "distrio_common.idl" + +/** + * @brief the implementation of these interfaces are responsible for + * controlling the I/O hardware + * + * @author Manuel Traut + * @copyright GPLv2 + */ + +module Distrio { + + interface Device; + + /** what should trigger a callback? */ + enum Digital_trigger { + TRIGGER_EDGE, + TRIGGER_RISING_EDGE, + TRIGGER_FALLING_EDGE + }; + + /** a digital input or output pin */ + interface Digital { + /** get the name of the hardware which is connected to this pin */ + Distrio::Error name (out string name); + /** set this pin (fails if it's a digital input) */ + Distrio::Error set (); + /** reset this pin (fails if it's a digital input) */ + Distrio::Error reset (); + /** get the value of the pin ( 0 = reset, rest = set */ + 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); + /** the id is given by Controller::Manager during registration */ + attribute long id; + }; + + typedef sequence Digital_list; + + /** what should trigger a callback? */ + struct Analog_trigger { + /** used internal to store analog value of the last trigger */ + long last_value; + /** e.g. if current_value > last_value + jitter -> execute callback */ + long jitter; + }; + + /** an analog input or output pin */ + interface Analog { + /** name of the hardware which is connected to the pin */ + Distrio::Error name (out string name); + /** minimum allowed value */ + Distrio::Error min (out long min); + /** maximum allowd value */ + Distrio::Error max (out long max); + /** set new value (may fail if out of range or pin is an input) */ + Distrio::Error set (in long value); + /** get analog value of the pin */ + 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); + attribute long id; + }; + + typedef sequence Analog_list; + + /** list of functions of all devices - new ones can be added if needed */ + enum Dev_function_id { + DEV_START, + DEV_STOP + }; + + /** definition to control the device, e.g. start or stop it */ + struct Dev_function { + string description; + long value; + Dev_function_id id; + }; + + typedef sequence Dev_function_list; + + /** a device could have several io's and can export functions which can be + * controlled by a HID device or GUI + */ + interface Device { + /** name of the device */ + Distrio::Error name (out string name); + /** to execute a device specific function pass the Dev_function descriotion + * (retrived by (functions ()) as parameter + */ + Distrio::Error execute (in Dev_function func); + /** returns all device specific function descriptions */ + Distrio::Error functions (out Dev_function_list funcs); + /** called by the Digital object if this object is registered as a + * callback and the trigger hits */ + Distrio::Error callback_digital (in Digital io_dig); + /** called by the Digital object if this object is registered as a + * callback and the trigger hits */ + Distrio::Error callback_analog (in Analog io_ana); + /** ID is given by Controller::Manager during registration */ + attribute long id; + }; + + typedef sequence Device_list; + +}; + +#endif diff --git a/interfaces/distrio_manager.idl b/interfaces/distrio_manager.idl new file mode 100644 index 0000000..83ab13e --- /dev/null +++ b/interfaces/distrio_manager.idl @@ -0,0 +1,51 @@ +#ifndef DISTRDistrio_CONTROLLER_IDL +#define DISTRDistrio_CONTROLLER_IDL + +#include "distrio_common.idl" +#include "distrio_io.idl" + +/** + * @brief logical view of IO's and Devices (not HW specific) + * + * @author Manuel Traut + * @copyright GPLv2 + */ + +module Distrio { + +/** + * @brief manage io/device lists, error handling + * + * - all modules need to register their IO's and devices + * - registered IO's and devices can be obtained + */ + interface Manager { + /** returns list of registered digital IO's */ + Distrio::Error digital (out Distrio::Digital_list io_list); + /** returns list of registered analog IO's */ + Distrio::Error analog (out Distrio::Analog_list io_list); + /** returns list of registered devices */ + Distrio::Error device (out Distrio::Device_list dev_list); + /** register a digital io */ + Distrio::Error register_io_digital (in Distrio::Analog io_ana); + /** register a analog io */ + Distrio::Error register_io_analog (in Distrio::Digital io_dig); + /** register a device */ + Distrio::Error register_io_device (in Distrio::Device io_dev); + /** unregister a digital io */ + Distrio::Error unregister_io_digital (in Distrio::Digital io_dig); + /** unregister a analog io */ + Distrio::Error unregister_io_analog (in Distrio::Analog io_ana); + /** unregister a device */ + Distrio::Error unregister_io_device (in Distrio::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 Distrio::Error error); + }; + +}; + +#endif diff --git a/interfaces/io.idl b/interfaces/io.idl deleted file mode 100644 index 27f9ae8..0000000 --- a/interfaces/io.idl +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef DISTRIO_IO_IDL -#define DISTRIO_IO_IDL - -#include "common.idl" - -/** - * @brief the implementation of these interfaces are responsible for - * controlling the I/O hardware - * - * @author Manuel Traut - * @copyright GPLv2 - */ - -module Distrio { - - interface Device; - - /** what should trigger a callback? */ - enum Digital_trigger { - TRIGGER_EDGE, - TRIGGER_RISING_EDGE, - TRIGGER_FALLING_EDGE - }; - - /** a digital input or output pin */ - interface Digital { - /** get the name of the hardware which is connected to this pin */ - Distrio::Error name (out string name); - /** set this pin (fails if it's a digital input) */ - Distrio::Error set (); - /** reset this pin (fails if it's a digital input) */ - Distrio::Error reset (); - /** get the value of the pin ( 0 = reset, rest = set */ - 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); - /** the id is given by Controller::Manager during registration */ - attribute long id; - }; - - typedef sequence Digital_list; - - /** what should trigger a callback? */ - struct Analog_trigger { - /** used internal to store analog value of the last trigger */ - long last_value; - /** e.g. if current_value > last_value + jitter -> execute callback */ - long jitter; - }; - - /** an analog input or output pin */ - interface Analog { - /** name of the hardware which is connected to the pin */ - Distrio::Error name (out string name); - /** minimum allowed value */ - Distrio::Error min (out long min); - /** maximum allowd value */ - Distrio::Error max (out long max); - /** set new value (may fail if out of range or pin is an input) */ - Distrio::Error set (in long value); - /** get analog value of the pin */ - 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); - attribute long id; - }; - - typedef sequence Analog_list; - - /** list of functions of all devices - new ones can be added if needed */ - enum Dev_function_id { - DEV_START, - DEV_STOP - }; - - /** definition to control the device, e.g. start or stop it */ - struct Dev_function { - string description; - long value; - Dev_function_id id; - }; - - typedef sequence Dev_function_list; - - /** a device could have several io's and can export functions which can be - * controlled by a HID device or GUI - */ - interface Device { - /** name of the device */ - Distrio::Error name (out string name); - /** to execute a device specific function pass the Dev_function descriotion - * (retrived by (functions ()) as parameter - */ - Distrio::Error execute (in Dev_function func); - /** returns all device specific function descriptions */ - Distrio::Error functions (out Dev_function_list funcs); - /** called by the Digital object if this object is registered as a - * callback and the trigger hits */ - Distrio::Error callback_digital (in Digital io_dig); - /** called by the Digital object if this object is registered as a - * callback and the trigger hits */ - Distrio::Error callback_analog (in Analog io_ana); - /** ID is given by Controller::Manager during registration */ - attribute long id; - }; - - typedef sequence Device_list; - -}; - -#endif diff --git a/interfaces/manager.idl b/interfaces/manager.idl deleted file mode 100644 index f1dffa1..0000000 --- a/interfaces/manager.idl +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef DISTRDistrio_CONTROLLER_IDL -#define DISTRDistrio_CONTROLLER_IDL - -#include "common.idl" -#include "io.idl" - -/** - * @brief logical view of IO's and Devices (not HW specific) - * - * @author Manuel Traut - * @copyright GPLv2 - */ - -module Distrio { - -/** - * @brief manage io/device lists, error handling - * - * - all modules need to register their IO's and devices - * - registered IO's and devices can be obtained - */ - interface Manager { - /** returns list of registered digital IO's */ - Distrio::Error digital (out Distrio::Digital_list io_list); - /** returns list of registered analog IO's */ - Distrio::Error analog (out Distrio::Analog_list io_list); - /** returns list of registered devices */ - Distrio::Error device (out Distrio::Device_list dev_list); - /** register a digital io */ - Distrio::Error register_io_digital (in Distrio::Analog io_ana); - /** register a analog io */ - Distrio::Error register_io_analog (in Distrio::Digital io_dig); - /** register a device */ - Distrio::Error register_io_device (in Distrio::Device io_dev); - /** unregister a digital io */ - Distrio::Error unregister_io_digital (in Distrio::Digital io_dig); - /** unregister a analog io */ - Distrio::Error unregister_io_analog (in Distrio::Analog io_ana); - /** unregister a device */ - Distrio::Error unregister_io_device (in Distrio::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 Distrio::Error error); - }; - -}; - -#endif diff --git a/io/Makefile b/io/Makefile new file mode 100644 index 0000000..e609b7f --- /dev/null +++ b/io/Makefile @@ -0,0 +1,42 @@ +CC := $(CROSS_COMPILE)gcc +CXX := $(CROSS_COMPILE)g++ +LD := $(CROSS_COMPILE)g++ + +DISTRIO_COMMON := ../common + +CFLAGS += -fPIC -I$(DISTRIO_COMMON) +CXXFLAGS += $(CFLAGS) + +TAO_IDL := tao_idl + +DESTDIR := /usr + +COMPONENT = distrio_io +LIB = lib$(COMPONENT).so +OBJ = $(COMPONENT)C.o $(COMPONENT).o $(COMPONENT)S.o + +IDL_CLEANFILES = $(COMPONENT)C.cpp $(COMPONENT)C.inl $(COMPONENT)I.h \ + $(COMPONENT)S.h $(COMPONENT)C.h $(COMPONENT)S.cpp + +all: $(OBJ) + $(LD) -shared -o $(LIB) $(OBJ) + +.PHONY: idl +idl: + $(TAO_IDL) -GI -I../interfaces ../interfaces/$(COMPONENT).idl + rm -f $(COMPONENT)I.cpp + +.PHONY: idl_clean +idl_clean: + rm -f $(IDL_CLEANFILES) + +.PHONY: clean +clean: idl_clean + rm -f *.o + rm -f $(LIB) + +install: all + cp -a $(LIB) $(DESTDIR)/lib + +uninstall: + rm -f $(DESTDIR)/lib/$(LIB) diff --git a/io/distrio_io.cpp b/io/distrio_io.cpp new file mode 100644 index 0000000..e102dbd --- /dev/null +++ b/io/distrio_io.cpp @@ -0,0 +1,196 @@ +// -*- C++ -*- +// $Id$ + +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v2.1.2 + * TAO and the TAO IDL Compiler have been developed by: + * Center for Distributed Object Computing + * Washington University + * St. Louis, MO + * USA + * http://www.cs.wustl.edu/~schmidt/doc-center.html + * and + * Distributed Object Computing Laboratory + * University of California at Irvine + * Irvine, CA + * USA + * and + * Institute for Software Integrated Systems + * Vanderbilt University + * Nashville, TN + * USA + * http://www.isis.vanderbilt.edu/ + * + * Information about TAO is available at: + * http://www.cs.wustl.edu/~schmidt/TAO.html + **/ + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1673 + +#include "distrio_ioI.h" + +// Implementation skeleton constructor +Distrio_Digital_i::Distrio_Digital_i (void) +{ +} + +// Implementation skeleton destructor +Distrio_Digital_i::~Distrio_Digital_i (void) +{ +} + +::Distrio::Error * Distrio_Digital_i::name ( + ::CORBA::String_out name) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Digital_i::set ( + void) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Digital_i::reset ( + void) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Digital_i::get ( + ::CORBA::Long_out value) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Digital_i::register_callback ( + ::Distrio::Device_ptr dev, + ::Distrio::Digital_trigger trigger) +{ + // Add your implementation here +} + +::CORBA::Long Distrio_Digital_i::id ( + void) +{ + // Add your implementation here +} + +void Distrio_Digital_i::id ( + ::CORBA::Long id) +{ + // Add your implementation here +} + +// Implementation skeleton constructor +Distrio_Analog_i::Distrio_Analog_i (void) +{ +} + +// Implementation skeleton destructor +Distrio_Analog_i::~Distrio_Analog_i (void) +{ +} + +::Distrio::Error * Distrio_Analog_i::name ( + ::CORBA::String_out name) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Analog_i::min ( + ::CORBA::Long_out min) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Analog_i::max ( + ::CORBA::Long_out max) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Analog_i::set ( + ::CORBA::Long value) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Analog_i::get ( + ::CORBA::Long_out value) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Analog_i::register_callback ( + ::Distrio::Device_ptr dev, + const ::Distrio::Analog_trigger & trigger) +{ + // Add your implementation here +} + +::CORBA::Long Distrio_Analog_i::id ( + void) +{ + // Add your implementation here +} + +void Distrio_Analog_i::id ( + ::CORBA::Long id) +{ + // Add your implementation here +} + +// Implementation skeleton constructor +Distrio_Device_i::Distrio_Device_i (void) +{ +} + +// Implementation skeleton destructor +Distrio_Device_i::~Distrio_Device_i (void) +{ +} + +::Distrio::Error * Distrio_Device_i::name ( + ::CORBA::String_out name) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Device_i::execute ( + const ::Distrio::Dev_function & func) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Device_i::functions ( + ::Distrio::Dev_function_list_out funcs) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Device_i::callback_digital ( + ::Distrio::Digital_ptr io_dig) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Device_i::callback_analog ( + ::Distrio::Analog_ptr io_ana) +{ + // Add your implementation here +} + +::CORBA::Long Distrio_Device_i::id ( + void) +{ + // Add your implementation here +} + +void Distrio_Device_i::id ( + ::CORBA::Long id) +{ + // Add your implementation here +} + diff --git a/manager/Makefile b/manager/Makefile index da7fd9b..28f7421 100644 --- a/manager/Makefile +++ b/manager/Makefile @@ -2,26 +2,36 @@ CC := $(CROSS_COMPILE)gcc CXX := $(CROSS_COMPILE)g++ LD := $(CROSS_COMPILE)g++ +DISTRIO_COMMON := ../common +DISTRIO_IO := ../io + +LDFLAGS += -L$(DISTRIO_COMMON) -ldistrio_common -L$(DISTRIO_IO) -ldistrio_io \ + -lACE -lTAO -lTAO_AnyTypeCode -lTAO_PortableServer +CFLAGS += -fPIC -I$(DISTRIO_COMMON) -I$(DISTRIO_IO) +CXXFLAGS += $(CFLAGS) + TAO_IDL := tao_idl DESTDIR := /usr -EXEC = distrio-manager -OBJ = managerC.o managerS.o manager.o -IDL_CLEANFILES = managerC.cpp managerC.h managerI.h managerS.cpp managerS.h \ - managerC.inl +COMPONENT = distrio_manager +EXEC = $(COMPONENT) +OBJ = $(COMPONENT)C.o $(COMPONENT)S.o $(COMPONENT).o +IDL_CLEANFILES = $(COMPONENT)C.cpp $(COMPONENT)C.h $(COMPONENT)I.h \ + $(COMPONENT)S.cpp $(COMPONENT)S.h $(COMPONENT)C.inl -all: idl $(OBJ) - $(LD) -o $(EXEC) $(OBJ) +all: $(OBJ) + $(LD) $(LDFLAGS) -o $(EXEC) $(OBJ) idl: - $(TAO_IDL) -GI -I../interfaces ../interfaces/manager.idl - rm -f managerI.cpp + $(TAO_IDL) -GI -I../interfaces ../interfaces/$(COMPONENT).idl + rm -f $(COMPONENT)I.cpp idl_clean: rm -f $(IDL_CLEANFILES) clean: idl_clean + rm *.o rm -f $(EXEC) install: all diff --git a/manager/distrio_manager.cpp b/manager/distrio_manager.cpp new file mode 100644 index 0000000..8cd2f03 --- /dev/null +++ b/manager/distrio_manager.cpp @@ -0,0 +1,106 @@ +// -*- C++ -*- +// $Id$ + +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v2.1.2 + * TAO and the TAO IDL Compiler have been developed by: + * Center for Distributed Object Computing + * Washington University + * St. Louis, MO + * USA + * http://www.cs.wustl.edu/~schmidt/doc-center.html + * and + * Distributed Object Computing Laboratory + * University of California at Irvine + * Irvine, CA + * USA + * and + * Institute for Software Integrated Systems + * Vanderbilt University + * Nashville, TN + * USA + * http://www.isis.vanderbilt.edu/ + * + * Information about TAO is available at: + * http://www.cs.wustl.edu/~schmidt/TAO.html + **/ + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1673 + +#include "distrio_managerI.h" + +// Implementation skeleton constructor +Distrio_Manager_i::Distrio_Manager_i (void) +{ +} + +// Implementation skeleton destructor +Distrio_Manager_i::~Distrio_Manager_i (void) +{ +} + +::Distrio::Error * Distrio_Manager_i::digital ( + ::Distrio::Digital_list_out io_list) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Manager_i::analog ( + ::Distrio::Analog_list_out io_list) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Manager_i::device ( + ::Distrio::Device_list_out dev_list) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Manager_i::register_io_digital ( + ::Distrio::Analog_ptr io_ana) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Manager_i::register_io_analog ( + ::Distrio::Digital_ptr io_dig) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Manager_i::register_io_device ( + ::Distrio::Device_ptr io_dev) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Manager_i::unregister_io_digital ( + ::Distrio::Digital_ptr io_dig) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Manager_i::unregister_io_analog ( + ::Distrio::Analog_ptr io_ana) +{ + // Add your implementation here +} + +::Distrio::Error * Distrio_Manager_i::unregister_io_device ( + ::Distrio::Device_ptr io_dev) +{ + // Add your implementation here +} + +void Distrio_Manager_i::log_error ( + const ::Distrio::Error & error) +{ + // Add your implementation here +} + +int main (int argc, char **argv) +{ + return 0; +} diff --git a/manager/manager.cpp b/manager/manager.cpp deleted file mode 100644 index c6964e3..0000000 --- a/manager/manager.cpp +++ /dev/null @@ -1,102 +0,0 @@ -// -*- C++ -*- -// $Id$ - -/** - * Code generated by the The ACE ORB (TAO) IDL Compiler v2.1.2 - * TAO and the TAO IDL Compiler have been developed by: - * Center for Distributed Object Computing - * Washington University - * St. Louis, MO - * USA - * http://www.cs.wustl.edu/~schmidt/doc-center.html - * and - * Distributed Object Computing Laboratory - * University of California at Irvine - * Irvine, CA - * USA - * and - * Institute for Software Integrated Systems - * Vanderbilt University - * Nashville, TN - * USA - * http://www.isis.vanderbilt.edu/ - * - * Information about TAO is available at: - * http://www.cs.wustl.edu/~schmidt/TAO.html - **/ - -// TAO_IDL - Generated from -// be/be_codegen.cpp:1673 - -#include "managerI.h" - -// Implementation skeleton constructor -Distrio_Manager_i::Distrio_Manager_i (void) -{ -} - -// Implementation skeleton destructor -Distrio_Manager_i::~Distrio_Manager_i (void) -{ -} - -::Distrio::Error * Distrio_Manager_i::digital ( - ::Distrio::Digital_list_out io_list) -{ - // Add your implementation here -} - -::Distrio::Error * Distrio_Manager_i::analog ( - ::Distrio::Analog_list_out io_list) -{ - // Add your implementation here -} - -::Distrio::Error * Distrio_Manager_i::device ( - ::Distrio::Device_list_out dev_list) -{ - // Add your implementation here -} - -::Distrio::Error * Distrio_Manager_i::register_io_digital ( - ::Distrio::Analog_ptr io_ana) -{ - // Add your implementation here -} - -::Distrio::Error * Distrio_Manager_i::register_io_analog ( - ::Distrio::Digital_ptr io_dig) -{ - // Add your implementation here -} - -::Distrio::Error * Distrio_Manager_i::register_io_device ( - ::Distrio::Device_ptr io_dev) -{ - // Add your implementation here -} - -::Distrio::Error * Distrio_Manager_i::unregister_io_digital ( - ::Distrio::Digital_ptr io_dig) -{ - // Add your implementation here -} - -::Distrio::Error * Distrio_Manager_i::unregister_io_analog ( - ::Distrio::Analog_ptr io_ana) -{ - // Add your implementation here -} - -::Distrio::Error * Distrio_Manager_i::unregister_io_device ( - ::Distrio::Device_ptr io_dev) -{ - // Add your implementation here -} - -void Distrio_Manager_i::log_error ( - const ::Distrio::Error & error) -{ - // Add your implementation here -} - -- cgit v1.2.3