--- before/src/Dynamo.dsp Sat Mar 1 01:08:43 2003 +++ after/src/Dynamo.dsp Fri Feb 28 23:33:49 2003 @@ -127,10 +127,6 @@ # End Source File # Begin Source File -SOURCE=.\IOPortPipe.cpp -# End Source File -# Begin Source File - SOURCE=.\IOPortTCP.cpp # End Source File # Begin Source File --- before/src/GalileoApp.cpp Sat Mar 1 01:08:47 2003 +++ after/src/GalileoApp.cpp Sat Mar 1 21:18:09 2003 @@ -1,3 +1,22 @@ +/* ######################################################################### */ +/* ## ## */ +/* ## Iometer / GalileoApp.cpp ## */ +/* ## ## */ +/* ## ------------------------------------------------------------------- ## */ +/* ## ## */ +/* ## Job .......: The central class of the Iometer application. ## */ +/* ## ## */ +/* ## ------------------------------------------------------------------- ## */ +/* ## ## */ +/* ## Remarks ...: ## */ +/* ## ## */ +/* ## ------------------------------------------------------------------- ## */ +/* ## ## */ +/* ## Changes ...: 2003-03-01 (daniel.scheibli@edelbyte.org) ## */ +/* ## - Cut out the Windows Pipes support for ## */ +/* ## communication efforts. ## */ +/* ## ## */ +/* ######################################################################### */ /* Intel Open Source License @@ -42,6 +61,7 @@ // start-up and shut-down code, for Iometer. // ////////////////////////////////////////////////////////////////////// +/* ######################################################################### */ #include "stdafx.h" #include "GalileoDefs.h" @@ -52,7 +72,6 @@ #include "ManagerList.h" #include "Legalbox.h" #include "IOPortTCP.h" -#include "IOPortPipe.h" #ifdef _DEBUG #define new DEBUG_NEW @@ -520,18 +539,9 @@ login_port = new PortTCP( FALSE ); // asynchronous port if ( !login_port->Create( NULL, NULL, 0, WELL_KNOWN_TCP_PORT ) ) { -#ifdef _DEBUG - ErrorMessage("Could not create TCP/IP port for Dynamo login, trying named pipe instead"); -#endif - - delete login_port; - login_port = new PortPipe( FALSE ); // asynchronous port - if ( !login_port->Create( WELL_KNOWN_PIPE ) ) - { - ErrorMessage("Could not create TCP/IP port or named pipe for Dynamo login!"); - login_state = failed; - return FALSE; // go away and don't come back (for a while) - } + ErrorMessage("Could not create TCP/IP port for Dynamo login!"); + login_state = failed; + return FALSE; // go away and don't come back (for a while) } login_state = open; --- before/src/IOManager.cpp Sat Mar 1 01:09:07 2003 +++ after/src/IOManager.cpp Sat Mar 1 21:18:32 2003 @@ -13,7 +13,10 @@ /* ## ## */ /* ## ------------------------------------------------------------------- ## */ /* ## ## */ -/* ## Changes ...: 2003-02-04 (daniel.scheibli@edelbyte.org) ## */ +/* ## Changes ...: 2003-03-01 (daniel.scheibli@edelbyte.org) ## */ +/* ## - Cut out the Windows Pipes support for ## */ +/* ## communication efforts. ## */ +/* ## 2003-02-04 (daniel.scheibli@edelbyte.org) ## */ /* ## - Added new header holding the changelog. ## */ /* ## - Applied proc-speed-fix.txt patch file ## */ /* ## (dropping a type cast in the Login() method). ## */ @@ -85,9 +88,6 @@ #endif #include "IOPortTCP.h" -#ifndef UNIX -#include "IOPortPipe.h" -#endif #include "IOTargetDisk.h" #include "IOTargetVI.h" @@ -109,19 +109,8 @@ prt = new PortTCP; if ( !prt->Create() ) { -#ifndef UNIX - cout << "*** Could not create TCP/IP port, trying named pipe instead." << endl; - delete prt; - prt = new PortPipe; - if ( !prt->Create() ) - { - cout << "*** Could not create named pipe, giving up." << endl; - exit( 1 ); - } -#else // UNIX cout << "*** Could not create a TCP/IP Port. exiting....." << endl; exit(1); -#endif } record = FALSE; @@ -246,30 +235,6 @@ return FALSE; } } -#ifndef UNIX - else if ( prt->type == PORT_TYPE_PIPE ) - { - login_port = new PortPipe; - - // Seeing if the name of the computer running Iometer was provided. - char iometer[MAX_NETWORK_NAME]; // Name of Iometer machine. - - if ( strlen(port_name) ) - { - strcpy( iometer, "" ); - strcat( iometer, port_name ); - strcat( iometer, KNOWN_PIPE ); - } - else - strcpy( iometer, WELL_KNOWN_PIPE ); - - if ( !login_port->Connect( iometer ) ) - { - cout << "*** Could not create named pipe to connect with Iometer!" << endl; - return FALSE; - } - } -#endif // !UNIX else { cout << "*** Invalid port type in Manager::Login()" << endl; @@ -309,10 +274,6 @@ // Waiting for login to be accepted. if ( prt->Accept() ) cout << " Login accepted." << endl << flush; -#if defined (_WIN32) || defined (_WIN64) - else if ( GetLastError() == ERROR_PIPE_CONNECTED ) - cout << " Login accepted. Port already connected." << endl << flush; -#endif return TRUE; default: cout << endl << "*** Bad login status reply received - don't know what to do" << endl; --- before/src/IOPort.cpp Sat Mar 1 01:09:13 2003 +++ after/src/IOPort.cpp Sat Mar 1 21:19:21 2003 @@ -13,7 +13,10 @@ /* ## ## */ /* ## ------------------------------------------------------------------- ## */ /* ## ## */ -/* ## Changes ...: 2003-02-15 (daniel.scheibli@edelbyte.org) ## */ +/* ## Changes ...: 2003-03-01 (daniel.scheibli@edelbyte.org) ## */ +/* ## - Cut out the Windows Pipes support for ## */ +/* ## communication efforts. ## */ +/* ## 2003-02-15 (daniel.scheibli@edelbyte.org) ## */ /* ## - Added new header holding the changelog. ## */ /* ## - Different changes to support compilation with ## */ /* ## gcc 3.2 (known as cout << hex error). ## */ @@ -63,8 +66,8 @@ // // Port objects are used for communication between Dynamo and Iometer. The // Port class is an abstract (pure virtual) class that defines the interface -// and includes code common to all implementations. The classes PortTCP and -// PortPipe provide socket-based and pipe-based implementations of Port. +// and includes code common to all implementations. The class PortTCP +// provides a socket-based implementations of Port. // // This file is used by both Iometer and Dynamo. // --- before/src/IOPort.h Sat Mar 1 01:09:13 2003 +++ after/src/IOPort.h Sat Mar 1 21:19:51 2003 @@ -14,7 +14,10 @@ /* ## ## */ /* ## ------------------------------------------------------------------- ## */ /* ## ## */ -/* ## Changes ...: 2003-02-15 (daniel.scheibli@edelbyte.org) ## */ +/* ## Changes ...: 2003-03-01 (daniel.scheibli@edelbyte.org) ## */ +/* ## - Cut out the Windows Pipes support for ## */ +/* ## communication efforts. ## */ +/* ## 2003-02-15 (daniel.scheibli@edelbyte.org) ## */ /* ## - Added new header holding the changelog. ## */ /* ## - Different changes to support compilation with ## */ /* ## gcc 3.2 (known as cout << hex error). ## */ @@ -64,8 +67,8 @@ // // Port objects are used for communication between Dynamo and Iometer. The // Port class is an abstract (pure virtual) class that defines the interface -// and includes code common to all implementations. The classes PortTCP and -// PortPipe provide socket-based and pipe-based implementations of Port. +// and includes code common to all implementations. The class PortTCP +// provides a socket-based implementations of Port. // // This file is used by both Iometer and Dynamo. // @@ -89,10 +92,7 @@ #define PORT_TYPE_INVALID 0 #define PORT_TYPE_TCP 1 -#define PORT_TYPE_PIPE 2 -#define WELL_KNOWN_PIPE "\\\\.\\pipe\\iometer" -#define KNOWN_PIPE "\\pipe\\iometer" #define WELL_KNOWN_TCP_PORT 1066 #define MESSAGE_PORT_SIZE MESSAGE_SIZE * 3 // make pipe buffer big enough for 3 messages (arbitrary number?) @@ -109,7 +109,7 @@ // public functions common to all Ports (pure virtual, not implemented by Port) virtual BOOL Create( char* port_name = NULL, char* remote_name = NULL, DWORD size = MESSAGE_PORT_SIZE, unsigned short port_number = 0 ) = NULL; - virtual BOOL Connect( char* port_name = WELL_KNOWN_PIPE, + virtual BOOL Connect( char* port_name = NULL, unsigned short port_number = WELL_KNOWN_TCP_PORT ) = NULL; virtual BOOL Accept() = NULL; virtual BOOL Disconnect() = NULL; @@ -130,8 +130,8 @@ // public data members common to all Ports char network_name[MAX_NETWORK_NAME]; - unsigned short network_port; // used only by PortTCP, ignored by PortPipe - int type; // PORT_TYPE_INVALID, PORT_TYPE_TCP, or PORT_TYPE_PIPE + unsigned short network_port; // used only by PortTCP (was ignored by PortPipe) + int type; // PORT_TYPE_INVALID or PORT_TYPE_TCP protected: // private data members common to all Ports --- before/src/IOPortTCP.cpp Sat Mar 1 01:09:13 2003 +++ after/src/IOPortTCP.cpp Sat Mar 1 21:21:16 2003 @@ -1,3 +1,23 @@ +/* ######################################################################### */ +/* ## ## */ +/* ## (Iometer & Dynamo) / IOPortTCP.cpp ## */ +/* ## ## */ +/* ## ------------------------------------------------------------------- ## */ +/* ## ## */ +/* ## Job .......: This class covers the communication between Iometer ## */ +/* ## and Dynamo (implementing the TCP/IP transport). ## */ +/* ## ## */ +/* ## ------------------------------------------------------------------- ## */ +/* ## ## */ +/* ## Remarks ...: ## */ +/* ## ## */ +/* ## ------------------------------------------------------------------- ## */ +/* ## ## */ +/* ## Changes ...: 2003-03-01 (daniel.scheibli@edelbyte.org) ## */ +/* ## - Cut out the Windows Pipes support for ## */ +/* ## communication efforts. ## */ +/* ## ## */ +/* ######################################################################### */ /* Intel Open Source License @@ -42,12 +62,13 @@ // // Port objects are used for communication between Dynamo and Iometer. The // Port class is an abstract (pure virtual) class that defines the interface -// and includes code common to all implementations. The classes PortTCP and -// PortPipe provide socket-based and pipe-based implementations of Port. +// and includes code common to all implementations. The class PortTCP +// provides a socket-based implementation of Port. // // This file is used by both Iometer and Dynamo. // ////////////////////////////////////////////////////////////////////// +/* ######################################################################### */ #if defined (_WIN32) || defined (_WIN64) #include @@ -154,6 +175,7 @@ // // Creates a TCP socket for communication. Used by server. // "size" argument is ignored, but accepted for compatibility with PortPipe. +// (PortPipe does no longer exists, but one day there might be an successor) // BOOL PortTCP::Create( char* port_name, char* remote_name, DWORD size, unsigned short port_number ) { --- before/src/IOPortTCP.h Sat Mar 1 01:09:13 2003 +++ after/src/IOPortTCP.h Sat Mar 1 21:22:41 2003 @@ -1,3 +1,24 @@ +/* ######################################################################### */ +/* ## ## */ +/* ## (Iometer & Dynamo) / IOPortTCP.h ## */ +/* ## ## */ +/* ## ------------------------------------------------------------------- ## */ +/* ## ## */ +/* ## Job .......: Contains the class definition of the Port class, ## */ +/* ## which covers the communication between Iometer ## */ +/* ## and Dynamo (implementing the TCP/IP transport). ## */ +/* ## ## */ +/* ## ------------------------------------------------------------------- ## */ +/* ## ## */ +/* ## Remarks ...: ## */ +/* ## ## */ +/* ## ------------------------------------------------------------------- ## */ +/* ## ## */ +/* ## Changes ...: 2003-03-01 (daniel.scheibli@edelbyte.org) ## */ +/* ## - Cut out the Windows Pipes support for ## */ +/* ## communication efforts. ## */ +/* ## ## */ +/* ######################################################################### */ /* Intel Open Source License @@ -43,12 +64,13 @@ // // Port objects are used for communication between Dynamo and Iometer. The // Port class is an abstract (pure virtual) class that defines the interface -// and includes code common to all implementations. The classes PortTCP and -// PortPipe provide socket-based and pipe-based implementations of Port. +// and includes code common to all implementations. The class PortTCP +// provides a socket-based implementation of Port. // // This file is used by both Iometer and Dynamo. // ////////////////////////////////////////////////////////////////////// +/* ######################################################################### */ #ifndef PORTTCP_DEFINED #define PORTTCP_DEFINED @@ -82,7 +104,7 @@ // public functions common to all Ports (implemented here, pure virtual in Port) virtual BOOL Create( char* port_name = NULL, char* remote_name = NULL, DWORD size = MESSAGE_PORT_SIZE, unsigned short port_number = 0 ); - virtual BOOL Connect( char* port_name = WELL_KNOWN_PIPE, + virtual BOOL Connect( char* port_name = NULL, unsigned short port_number = WELL_KNOWN_TCP_PORT ); virtual BOOL Accept(); virtual BOOL Disconnect(); --- before/src/Iometer.dsp Sat Mar 1 01:09:22 2003 +++ after/src/Iometer.dsp Fri Feb 28 23:49:22 2003 @@ -151,10 +151,6 @@ # End Source File # Begin Source File -SOURCE=.\IOPortPipe.cpp -# End Source File -# Begin Source File - SOURCE=.\IOPortTCP.cpp # End Source File # Begin Source File @@ -284,10 +280,6 @@ # Begin Source File SOURCE=.\IOPort.h -# End Source File -# Begin Source File - -SOURCE=.\IOPortPipe.h # End Source File # Begin Source File --- before/src/Makefile-Solaris Sat Mar 1 01:09:22 2003 +++ after/src/Makefile-Solaris Sat Mar 1 21:24:57 2003 @@ -1,3 +1,22 @@ +############################################################################### +## ## +## Dynamo / Makefile-Solaris ## +## ## +## ------------------------------------------------------------------------- ## +## ## +## Job .......: The Makefile for the Sun Solaris variant. ## +## ## +## ------------------------------------------------------------------------- ## +## ## +## Remarks ...: ## +## ## +## ------------------------------------------------------------------------- ## +## ## +## Changes ...: 2003-03-01 (daniel.scheibli@edelbyte.org) ## +## - Cut out the Windows Pipes support for ## +## communication efforts. ## +## ## +############################################################################### # ========================================================================== # Copyright (C) 1998 - 1999 Intel Corporation # All rights reserved @@ -19,6 +38,7 @@ # $ make clean # # +############################################################################### .MAKE_VERSION: VERSION-1.0 # un-comment out .IGNORE to suppress error messages and not stop make on errors. @@ -117,8 +137,6 @@ IOManager.o: IOCQAIO.h IOTargetVI.h NetVI.h IOCQVI.h Network.h IOPerformance.o: IOPerformance.h IOCommon.h IOTime.h IOPort.o: IOPort.h IOCommon.h IOMessage.h IOTest.h IOAccess.h vipl.h -IOPortPipe.o: IOPortPipe.h IOPort.h IOCommon.h IOMessage.h IOTest.h -IOPortPipe.o: IOAccess.h vipl.h IOPortTCP.o: IOPortTCP.h IOPort.h IOCommon.h IOMessage.h IOTest.h IOAccess.h IOPortTCP.o: vipl.h IOTarget.o: IOTarget.h IOCommon.h IOTest.h IOAccess.h vipl.h IOCQ.h --- before/src/Manager.h Sat Mar 1 01:09:25 2003 +++ after/src/Manager.h Sat Mar 1 21:27:44 2003 @@ -1,3 +1,22 @@ +/* ######################################################################### */ +/* ## ## */ +/* ## Iometer / Manager.h ## */ +/* ## ## */ +/* ## ------------------------------------------------------------------- ## */ +/* ## ## */ +/* ## Job .......: ## */ +/* ## ## */ +/* ## ------------------------------------------------------------------- ## */ +/* ## ## */ +/* ## Remarks ...: ## */ +/* ## ## */ +/* ## ------------------------------------------------------------------- ## */ +/* ## ## */ +/* ## Changes ...: 2003-03-01 (daniel.scheibli@edelbyte.org) ## */ +/* ## - Cut out the Windows Pipes support for ## */ +/* ## communication efforts. ## */ +/* ## ## */ +/* ######################################################################### */ /* Intel Open Source License @@ -42,6 +61,7 @@ // workers and provides functions for manager-level actions. // ////////////////////////////////////////////////////////////////////// +/* ######################################################################### */ #ifndef MANAGER_DEFINED #define MANAGER_DEFINED @@ -68,9 +88,7 @@ char network_name[MAX_NETWORK_NAME]; // Network address of the computer. // // Note that network_name is derived from the address Dynamo is connecting from, - // but it should NOT be used to refer to the Dynamo link. In the case of a pipe - // connection, the Dynamo address contains specific pipe number information that - // is not stored in network_name. + // but it should NOT be used to refer to the Dynamo link. // // Uniquely distinguishes managers with the same name. // To fill in this value, call ManagerList::IndexManagers(). --- before/src/ManagerList.cpp Sat Mar 1 01:09:28 2003 +++ after/src/ManagerList.cpp Sat Mar 1 21:28:17 2003 @@ -1,3 +1,22 @@ +/* ######################################################################### */ +/* ## ## */ +/* ## Iometer / ManagerList.cpp ## */ +/* ## ## */ +/* ## ------------------------------------------------------------------- ## */ +/* ## ## */ +/* ## Job .......: ## */ +/* ## ## */ +/* ## ------------------------------------------------------------------- ## */ +/* ## ## */ +/* ## Remarks ...: ## */ +/* ## ## */ +/* ## ------------------------------------------------------------------- ## */ +/* ## ## */ +/* ## Changes ...: 2003-03-01 (daniel.scheibli@edelbyte.org) ## */ +/* ## - Cut out the Windows Pipes support for ## */ +/* ## communication efforts. ## */ +/* ## ## */ +/* ######################################################################### */ /* Intel Open Source License @@ -45,12 +64,12 @@ // object in an instance of Iometer (CGalileoApp::manager_list). // ////////////////////////////////////////////////////////////////////// +/* ######################################################################### */ #include "stdafx.h" #include "ManagerList.h" #include "GalileoView.h" #include "IOPortTCP.h" -#include "IOPortPipe.h" #ifdef _DEBUG #define new DEBUG_NEW @@ -148,7 +167,7 @@ manager->processors = manager_info->processors; manager->processor_speed = (double)manager_info->processor_speed; - // Connect to the new manager using TCP/IP or named pipe as appropriate + // Connect to the new manager using TCP/IP as appropriate if ( theApp.login_port->type == PORT_TYPE_TCP ) { strcpy(manager->network_name, manager_info->names[1]); @@ -161,52 +180,6 @@ ErrorMessage( "Could not connect to new manager using " "TCP/IP port in ManagerList::AddManager" ); return NULL; - } - } - else if ( theApp.login_port->type == PORT_TYPE_PIPE ) - { - CString temp_computer_name; - CString temp_network_name; - - temp_network_name = "\\\\" + (CString)manager->computer_name + "\\"; - strcpy( manager->network_name, (LPCTSTR)temp_network_name ); - - manager->port = new PortPipe; - - // Compare the network name to the Iometer machine name. - unsigned long computer_name_length = MAX_COMPUTERNAME_LENGTH + 1; - GetComputerName( temp_computer_name.GetBuffer( MAX_COMPUTERNAME_LENGTH ), - &computer_name_length ); - temp_computer_name.ReleaseBuffer(); - temp_computer_name = "\\\\" + temp_computer_name + "\\"; - - // See if Dynamo logged in from another machine or on same - // machine as Iometer. - if ( CompareNames( (char*)(LPCTSTR)temp_computer_name, manager_info->names[1] ) ) - { - // Dynamo is on same machine. Connect back without using - // the network. - temp_computer_name = manager_info->names[1]; - temp_computer_name = temp_computer_name.Mid( 2 ); - temp_computer_name = "\\\\." + temp_computer_name.Mid( - temp_computer_name.Find( '\\' ) ); - if ( !manager->port->Connect( (char*)(LPCTSTR)temp_computer_name ) ) - { - ErrorMessage( "Could not connect to new manager using " - "local named pipe in ManagerList::AddManager" ); - return NULL; - } - } - else - { - // Connecting to network attached manager to signify successful login. - // Do not connect to "network_name". See Manager.h for detailed comments. - if ( !manager->port->Connect( manager_info->names[1] ) ) - { - ErrorMessage( "Could not connect to new manager using " - "network named pipe in ManagerList::AddManager" ); - return NULL; - } } } else --- before/README Fri Feb 28 19:54:04 2003 +++ after/README Sat Mar 1 21:30:14 2003 @@ -214,8 +214,6 @@ - IOGlobals.cpp - IOPort.h - IOPort.cpp - - IOPortPipe.h - - IOPortPipe.cpp - IOPortTCP.h - IOPortTCP.cpp - IOSTREAM @@ -336,15 +334,12 @@ - IOPort.h (Port) - IOPort.cpp (Port) - - IOPortPipe.h (PortPipe) - - IOPortPipe.cpp (PortPipe) - IOPortTCP.h (PortTCP) - IOPortTCP.cpp (PortTCP) The job of the Port class is to handle the communication between - Iometer and Dynamo. PortTCP and PortPipe (only supported on the - Windows platform) are implementing the two supported to do so. - Instantiation is done by the Manager class. + Iometer and Dynamo. PortTCP is implementing the supported to do + so. Instantiation is done by the Manager class. - IOMessage.h () - IOTest.h ()