/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* PORTLIST.HPP by Alan Partis, Copyright (C) */ /* International Trade Systems, Inc. */ /* 1993 All rights reserved. */ /* */ /* Description: Class definition for the Port List class. */ /* */ /* Contents: PortList */ /* */ /* Date Initials Comments */ /* ----------------------------------------------------------------------- */ /* 14 Sep 93 acp Initial Creation */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _PORTLIST_HPP #define _PORTLIST_HPP // // supporting types and constants // typedef struct { int port; // com port number (COM1, COM2, etc.) word address; // I/O address (03f8, 02f8, etc.) } PORT; #define BIOS_SERIAL_DATA (word far *)(0x00000400) #define COM_PORTS 4 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* PortList by Alan Partis, Copyright (C) */ /* International Trade Systems, Inc. */ /* 1993 All rights reserved. */ /* */ /* Description: Class defining the behavior of a PortList. */ /* */ /* Parents: none */ /* */ /* Public Members: PortList() */ /* ~PortList() */ /* Next() gets next port in list */ /* Reset() resets current pointer to start */ /* */ /* Date Initials Comments */ /* ----------------------------------------------------------------------- */ /* 14 Sep 93 acp Initial Creation */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ class PortList { private: protected: PORT ports[COM_PORTS]; //list of active ports int current; //current working port public: // // constructor/deconstructor // PortList(); ~PortList(); // // class member functions // void Next(PORT *NewPort); void Reset(); }; /* end of class PortList */ #endif
Copyright © Thundernet Development Group Inc., 2003. All rights reserved. |