Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/QNX4/Train/Train.hpp

Go to the documentation of this file.
00001 #ifndef __J2K__Train__Train_HPP__
00002 #define __J2K__Train__Train_HPP__
00003 
00004 #include <j2k/Fred/Boolean.hpp>
00005 #include <i86.h>
00006 
00007 #define     NSEG    16      // * This is the number of segments
00008 #define     NSW     4           // * This is the number of switches
00009 
00010 #define     CW      1       // * This is the train direction
00011 #define     CCW     0       //
00012 
00013 
00014 #define     ELAN104_SERIAL  "//2/dev/ser1"
00015 
00016 
00017 /*
00018               ---------------------
00019              |                #####|____
00020              |                           :
00021             _|                 2299      |)
00022            |     _____          _____    |
00023             ---- oo oo -------- oo oo ---
00024 ------------------------------------------------------------------
00025 
00026 */
00027 
00028 
00029 class Train
00030 {
00031     int TrainID;                // * Train ID
00032     int Position;               // * Current train position
00033     int Velocity;               // * Current (logical) velocity
00034     int BufferZone;             // * Buffer zone
00035     int Output;
00036     int Direction;
00037 
00038  public:
00039     Train();
00040 //  virtual ~Train();
00041     
00042     void setTrainID(int ID);    
00043     int  getTrainID();
00044     
00045     int  getDirection();
00046 
00047     void setPosition(int X);
00048     int  getPosition();
00049 
00050     void setVelocity(int V);
00051     int  getVelocity();
00052 
00053     void setBufferZone(int B);
00054     int  getBufferZone();
00055 
00056     
00057     void setOutput(int OutP);
00058 };
00059 
00060 #endif

Generated on Sun Oct 14 18:46:38 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001