00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef ARLOGFILECONNECTION_H
00027 #define ARLOGFILECONNECTION_H
00028
00029 #include "ArDeviceConnection.h"
00030 #include <string>
00031 #include <stdio.h>
00032
00033 #include "ariaTypedefs.h"
00034
00036 class ArLogFileConnection: public ArDeviceConnection
00037 {
00038 public:
00040 AREXPORT ArLogFileConnection();
00042 AREXPORT virtual ~ArLogFileConnection();
00043
00045 AREXPORT int open(const char * fname = NULL);
00046
00047 AREXPORT void setLogFile(const char *fname = NULL);
00048 AREXPORT virtual bool openSimple(void);
00049 AREXPORT virtual int getStatus(void);
00050 AREXPORT virtual bool close(void);
00051 AREXPORT virtual int read(const char *data, unsigned int size,
00052 unsigned int msWait = 0);
00053 AREXPORT virtual int write(const char *data, unsigned int size);
00054 AREXPORT virtual const char * getOpenMessage(int messageNumber);
00055 AREXPORT virtual ArTime getTimeRead(int index);
00056 AREXPORT virtual bool isTimeStamping(void);
00057
00059 AREXPORT const char *getLogFile(void);
00060
00061
00063
00064
00065
00067 AREXPORT int internalOpen(void);
00068
00069 enum Open {
00070 OPEN_FILE_NOT_FOUND = 1,
00071 OPEN_NOT_A_LOG_FILE
00072 };
00073
00074
00075 ArPose myPose;
00076 bool havePose;
00077 char myName[100];
00078 char myType[20];
00079 char mySubtype[20];
00080
00081 protected:
00082 void buildStrMap(void);
00083 ArStrMap myStrMap;
00084
00085 int myStatus;
00086 int stopAfter;
00087
00088 const char *myLogFile;
00089 FILE *myFD;
00090
00091 };
00092
00093 #endif //ARLOGFILECONNECTION_H