diff options
| author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-12-30 06:50:29 +0000 |
|---|---|---|
| committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-12-30 06:50:29 +0000 |
| commit | a4a7690c336d4c8a16b3041c86d501ba38226e96 (patch) | |
| tree | 9e9f93a98edd2591453f092d178ad29a1c5fb519 /examples/IPC_SAP/DEV_SAP | |
| parent | a5c4d8047ab58df5c45092e18ae503ad40518f0e (diff) | |
| download | ATCD-unlabeled-4.1.2.tar.gz | |
This commit was manufactured by cvs2svn to create branchunlabeled-4.1.2
'unlabeled-4.1.2'.
Diffstat (limited to 'examples/IPC_SAP/DEV_SAP')
| -rw-r--r-- | examples/IPC_SAP/DEV_SAP/Makefile | 22 | ||||
| -rw-r--r-- | examples/IPC_SAP/DEV_SAP/README | 23 | ||||
| -rw-r--r-- | examples/IPC_SAP/DEV_SAP/reader/Makefile | 72 | ||||
| -rw-r--r-- | examples/IPC_SAP/DEV_SAP/reader/reader.cpp | 49 | ||||
| -rw-r--r-- | examples/IPC_SAP/DEV_SAP/writer/Makefile | 72 | ||||
| -rw-r--r-- | examples/IPC_SAP/DEV_SAP/writer/writer.cpp | 54 |
6 files changed, 0 insertions, 292 deletions
diff --git a/examples/IPC_SAP/DEV_SAP/Makefile b/examples/IPC_SAP/DEV_SAP/Makefile deleted file mode 100644 index d596bd3d53c..00000000000 --- a/examples/IPC_SAP/DEV_SAP/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the DEV_SAP test directory -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -DIRS = reader \ - writer - -#---------------------------------------------------------------------------- -# 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.nested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nolocal.GNU diff --git a/examples/IPC_SAP/DEV_SAP/README b/examples/IPC_SAP/DEV_SAP/README deleted file mode 100644 index 8e47d8c5cec..00000000000 --- a/examples/IPC_SAP/DEV_SAP/README +++ /dev/null @@ -1,23 +0,0 @@ -This directory contains a test example for the DEV_SAP -class category. It implements a class TTY_IO that is -derived from ACE_DEV_IO and adds a control method -with specific features for a serial line connection -(e.g. /dev/ttya and /dev/ttyb on UNIX systems). - -The reader/reader executable initializes its -device-special file (given as command-line parameter), -reads characters from it (until it recognizes character 'q') -ands sends the characters read to stdout. - -The writer/writer executable also initializes its -device-special file (given as command-line parameter), -reads characters from stdin (until'q') and sends them -to the device. - -To run the tests I connect /dev/ttya and /dev/ttyb (with a -zero modem cable) and start the reader with "reader /dev/ttya" -and the writer (in a different window) with "writer /dev/ttyb". - -Characters typed in the writer window should now appear as output -in the reader window. Note that characters are buffered till EOL. - diff --git a/examples/IPC_SAP/DEV_SAP/reader/Makefile b/examples/IPC_SAP/DEV_SAP/reader/Makefile deleted file mode 100644 index fb56477c9b1..00000000000 --- a/examples/IPC_SAP/DEV_SAP/reader/Makefile +++ /dev/null @@ -1,72 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the simple DEV reader test file -# for serial devices -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = reader - -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/reader.o .shobj/reader.so: reader.cpp \ - $(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/ACE.h \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/DEV_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(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/IO_SAP.i \ - $(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/reader/reader.cpp b/examples/IPC_SAP/DEV_SAP/reader/reader.cpp deleted file mode 100644 index 1741c209c13..00000000000 --- a/examples/IPC_SAP/DEV_SAP/reader/reader.cpp +++ /dev/null @@ -1,49 +0,0 @@ - -// $Id$ - -#include "ace/OS.h" -#include "ace/DEV_Addr.h" -#include "ace/DEV_Connector.h" -#include "ace/DEV_IO.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 read_dev; - ACE_DEV_Connector con; - - if (con.connect (read_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 = 10000; - myparams.ctsenb = 0; - myparams.rcvenb = 1; - - int ret = read_dev.control (ACE_TTY_IO::SETPARAMS, &myparams); - - if (ret == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p control\n", argv[1]), 1); - - // Read till character 'q'. - for (char readback = 'x'; readback != 'q'; ) - { - ssize_t bytes_read = read_dev.recv_n ((void *) &readback, 1); - - if (bytes_read == 1) - ACE_DEBUG ((LM_DEBUG, "read: %c\n", readback)); - else if (bytes_read == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p recv\n", argv[1]), 1); - } - - return 0; -} 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; -} |
