base
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
#ifndef _SOLARISCOMM_H_
|
||||
#define _SOLARISCOMM_H_
|
||||
|
||||
#include "commdef.h"
|
||||
#include "interface.h"
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
class SolarisCommInterface : public ArcInterface
|
||||
{
|
||||
public:
|
||||
SolarisCommInterface();
|
||||
~SolarisCommInterface();
|
||||
bool init(const char nPortNum, char nBaudRate = 7, char nStopBit = 0);
|
||||
int send(sIF_CMD_BLOCK *ifData);
|
||||
int recv(sIF_CMD_BLOCK *ifData);
|
||||
int syncSend(sIF_CMD_BLOCK *ifData);
|
||||
void requirelock();
|
||||
void releaselock();
|
||||
int getMTU();
|
||||
void *getDeviceHandle();
|
||||
BOOL ClearReadBuffer();
|
||||
BOOL ClearWriteBuffer();
|
||||
BOOL ClearReadWriteBuffer();
|
||||
|
||||
private:
|
||||
int m_hComm;
|
||||
int fd;
|
||||
pthread_mutex_t mut;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user