|
rllib
1
|
00001 /*************************************************************************** 00002 rlhilschercif.h - description 00003 ------------------- 00004 begin : Tue Feb 13 2007 00005 copyright : (C) 2007 by Rainer Lehrig 00006 email : lehrig@t-online.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This library is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as * 00013 * published by the Free Software Foundation * 00014 * * 00015 ***************************************************************************/ 00016 #ifndef _RL_HILSCHER_CIF_H_ 00017 #define _RL_HILSCHER_CIF_H_ 00018 00019 #include "rldefine.h" 00020 #include "rlthread.h" 00021 #ifdef RLUNIX 00022 #include "cif_user.h" /* Include file for device driver API */ 00023 #else 00024 #include "CIFUSER.h" 00025 #endif 00026 #include "rcs_user.h" /* Include file for RCS definition */ 00027 #include "asc_user.h" /* Include file for ASCII protocols */ 00028 #include "nvr_user.h" /* Include file for 3964R protocol */ 00029 00038 class rlHilscherCIF 00039 { 00040 public: 00041 rlHilscherCIF(); 00042 virtual ~rlHilscherCIF(); 00043 int debug; 00044 00045 int open(); // convenience method 00046 int close(); // convenience method 00047 00048 int devGetMessage(int timeout); // use mailbox, uses tMessage 00049 int devPutMessage(int timeout); // use mailbox, please set tMessage 00050 int devExchangeIO(int sendOffset, int sendSize, unsigned char *sendData, 00051 int receiveOffset, int receiveSize, unsigned char *receiveData, 00052 int timeout); 00053 00054 int devOpenDriver(); 00055 int devInitBoard(); 00056 int devGetInfo(int info); // info = GET_FIRMWARE_INFO | GET_IO_INFO 00057 int devSetHostState(int mode); // mode = HOST_READY | HOST_NOT_READY 00058 int devPutTaskParameter(); 00059 int devReset(); 00060 int devExitBoard(); 00061 int devCloseDriver(); 00062 void printFirmwareInfo(); 00063 00064 unsigned short usBoardNumber; // Board number, 0-3 00065 unsigned short usDevState, usHostState; 00066 unsigned char abInfo[300]; // Buffer for various information 00067 ASC_PARAMETER aParameter; // Parameters for ASCII protocolls 00068 IOINFO tIoInfo; // IO information structure 00069 RCS_MESSAGETELEGRAM_10 tMessage; 00070 00071 rlMutex mutex; 00072 00073 private: 00074 int isOpen; 00075 }; 00076 #endif
1.7.5.1