areaDetector  3-5-0
EPICS areaDetector framework
camLinkSerial.h
Go to the documentation of this file.
1 
10 #ifndef camLinkSerial_H
11 #define camLinkSerial_H
12 
13 #include "asynPortDriver.h"
14 
15 #include "comportInterface.h"
16 #include "siswSerialPort.h"
17 #include "sw_com_port.h"
18 #include "logfile.h"
19 
20 #ifdef _WIN32
21 #include "cl_com_port2.h"
22 #endif
23 
24 #include <string.h>
25 #include <map>
26 
31 class epicsShareFunc camLinkSerial : public asynPortDriver {
32  public:
33  camLinkSerial(const char *portName, const char *comportname, int maxAddr,
34  int interfaceMask, int interruptMask, int asynFlags,
35  int autoConnect, int priority, int stackSize);
36 
37  /* These are the methods that we override from asynPortDriver */
38  virtual asynStatus readOctet(asynUser *pasynUser, char *value,
39  size_t maxChars, size_t *nActual,
40  int *eomReason);
41  virtual asynStatus writeOctet(asynUser *pasynUser, const char *value,
42  size_t maxChars, size_t *nActual);
43  virtual asynStatus flushOctet(asynUser *pasynUser);
44 
45  virtual void report(FILE *fp, int details);
46  void optionsToSerial(void);
47 
48  virtual asynStatus readOption(asynUser *pasynUser, const char *key,
49  char *value, int maxChars);
50  virtual asynStatus writeOption(asynUser *pasynUser, const char *key,
51  const char *value);
52 
53  protected:
54  // map for the option key val pairs
55  std::map<std::string, std::string> option_pairs;
56 
58  //
59  // params
60  //
62 #define FIRST_CLS_PARAM clser_first
63 
65 
67 #define LAST_CLS_PARAM clser_last
68 
69 
70  //
71  // End params
72  //
74 };
75 
76 #define NUM_CLS_PARAMS (&LAST_CLS_PARAM - &FIRST_CLS_PARAM + 1)
77 #endif
Base class for asyn port drivers; handles most of the bookkeeping for writing an asyn port driver wit...
Definition: asynPortDriver.h:41
Interface to a com port, on a grabber.
Definition: comportInterface.h:24
list value
Definition: makeDbAndEdl.py:234
virtual asynStatus flushOctet(asynUser *pasynUser)
Called when asyn clients call pasynOctet->flush().
Definition: asynPortDriver.cpp:2235
virtual void report(FILE *fp, int details)
Reports on status of the driver.
Definition: asynPortDriver.cpp:3035
virtual asynStatus writeOption(asynUser *pasynUser, const char *key, const char *value)
Called when asyn clients call pasynOption->write().
Definition: asynPortDriver.cpp:2813
virtual asynStatus readOption(asynUser *pasynUser, const char *key, char *value, int maxChars)
Called when asyn clients call pasynOption->read().
Definition: asynPortDriver.cpp:2789
Class LOG_FILE.
Definition: logfile.h:38
virtual asynStatus writeOctet(asynUser *pasynUser, const char *value, size_t maxChars, size_t *nActual)
Called when asyn clients call pasynOctet->write().
Definition: asynPortDriver.cpp:2188
virtual asynStatus readOctet(asynUser *pasynUser, char *value, size_t maxChars, size_t *nActual, int *eomReason)
Called when asyn clients call pasynOctet->read().
Definition: asynPortDriver.cpp:2134