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
00022
00023
00024
00025
00026
00027
00028
00029 class Train
00030 {
00031 int TrainID;
00032 int Position;
00033 int Velocity;
00034 int BufferZone;
00035 int Output;
00036 int Direction;
00037
00038 public:
00039 Train();
00040
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