diff options
Diffstat (limited to 'examples/IPC_SAP/DEV_SAP/writer')
-rw-r--r-- | examples/IPC_SAP/DEV_SAP/writer/Makefile | 72 | ||||
-rw-r--r-- | examples/IPC_SAP/DEV_SAP/writer/writer.cpp | 54 |
2 files changed, 0 insertions, 126 deletions
diff --git a/examples/IPC_SAP/DEV_SAP/writer/Makefile b/examples/IPC_SAP/DEV_SAP/writer/Makefile deleted file mode 100644 index 891a7dd49a0..00000000000 --- a/examples/IPC_SAP/DEV_SAP/writer/Makefile +++ /dev/null @@ -1,72 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the simple DEV writer test file -# for serial devices -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = writer - -SRC = $(addsuffix .cpp,$(BIN)) -OBJ = $(SRC:%.cpp=$(VDIR)%.o) - -LSRC = $(addsuffix .cpp,$(FILES)) -LOBJ = $(addsuffix .o,$(FILES)) -SHOBJ = $(addsuffix .so,$(FILES)) - -LIBS = -lACE - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/writer.o .shobj/writer.so: writer.cpp \ - $(WRAPPER_ROOT)/ace/DEV_Connector.h \ - $(WRAPPER_ROOT)/ace/DEV_IO.h \ - $(WRAPPER_ROOT)/ace/DEV.h \ - $(WRAPPER_ROOT)/ace/IO_SAP.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IO_SAP.i \ - $(WRAPPER_ROOT)/ace/DEV_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/DEV.i \ - $(WRAPPER_ROOT)/ace/DEV_IO.i \ - $(WRAPPER_ROOT)/ace/DEV_Connector.i \ - $(WRAPPER_ROOT)/ace/TTY_IO.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/IPC_SAP/DEV_SAP/writer/writer.cpp b/examples/IPC_SAP/DEV_SAP/writer/writer.cpp deleted file mode 100644 index 2f0216c2c25..00000000000 --- a/examples/IPC_SAP/DEV_SAP/writer/writer.cpp +++ /dev/null @@ -1,54 +0,0 @@ - -// $Id$ - -#include "ace/DEV_Connector.h" -#include "ace/TTY_IO.h" - -int -main (int argc, char *argv[]) -{ - if (argc < 2) - ACE_ERROR_RETURN ((LM_ERROR, "usage: %s device-filename\n", argv[0]), 1); - - ACE_TTY_IO write_dev; - - ACE_DEV_Connector con; - - if (con.connect (write_dev, ACE_DEV_Addr (argv[1])) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", argv[1]), 1); - - ACE_TTY_IO::Serial_Params myparams; - myparams.baudrate = 9600; - myparams.parityenb = 1; - myparams.paritymode = "EVEN"; - myparams.databits = 8; - myparams.stopbits = 1; - myparams.readtimeoutmsec = 200; - myparams.ctsenb = 0; - myparams.rcvenb = 1; - - int ret = write_dev.control (ACE_TTY_IO::SETPARAMS, &myparams); - - if (ret == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "control"), 1); - - ACE_DEBUG ((LM_DEBUG, "enter character to send, q terminates :\n")); - - for (char writeto = 'x'; - ACE_OS::read (ACE_STDIN, &writeto, 1) != -1; - ) - { - ssize_t bytes_written = write_dev.send_n ((void *)&writeto, 1); - - if (bytes_written != 1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send"), 1); - - if (writeto == 'q') - break; - } - - if (write_dev.close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), 1); - - return 0; -} |