asyn  4-31
asynPortClient.h
Go to the documentation of this file.
1 #ifndef asynPortClient_H
2 #define asynPortClient_H
3 
4 #include <stdexcept>
5 #include <string>
6 
7 #include <epicsString.h>
8 
9 #include <asynDriver.h>
10 #include <asynInt32.h>
11 #include <asynInt32SyncIO.h>
12 #include <asynUInt32Digital.h>
13 #include <asynUInt32DigitalSyncIO.h>
14 #include <asynFloat64.h>
15 #include <asynFloat64SyncIO.h>
16 #include <asynOctet.h>
17 #include <asynOctetSyncIO.h>
18 #include <asynInt8Array.h>
19 #include <asynInt8ArraySyncIO.h>
20 #include <asynInt16Array.h>
21 #include <asynInt16ArraySyncIO.h>
22 #include <asynInt32Array.h>
23 #include <asynInt32ArraySyncIO.h>
24 #include <asynFloat32Array.h>
25 #include <asynFloat32ArraySyncIO.h>
26 #include <asynFloat64Array.h>
27 #include <asynFloat64ArraySyncIO.h>
28 #include <asynGenericPointer.h>
29 #include <asynGenericPointerSyncIO.h>
30 #include <asynEnum.h>
31 #include <asynEnumSyncIO.h>
32 #include <asynOption.h>
33 #include <asynOptionSyncIO.h>
34 #include <asynCommonSyncIO.h>
35 #include <asynDrvUser.h>
36 
37 #define DEFAULT_TIMEOUT 1.0
38 
39 
42 class epicsShareClass asynPortClient {
43 public:
44  asynPortClient(const char *portName, int addr, const char* asynInterfaceType, const char *drvInfo, double timeout);
45  virtual ~asynPortClient();
46  void setTimeout(double timeout)
47  { timeout_ = timeout; };
48  void report(FILE *fp, int details);
49 protected:
50  asynUser *pasynUser_;
51  asynUser *pasynUserSyncIO_;
52  asynInterface *pasynInterface_;
53  double timeout_;
54  char *portName_;
55  int addr_;
57  char *drvInfo_;
58  void *drvPvt;
60 };
61 
62 
64 class epicsShareClass asynInt32Client : public asynPortClient {
65 public:
72  asynInt32Client(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
73  : asynPortClient(portName, addr, asynInt32Type, drvInfo, timeout) {
74  pInterface_ = (asynInt32 *)pasynInterface_->pinterface;
75  if (pasynInt32SyncIO->connect(portName, addr, &pasynUserSyncIO_, drvInfo))
76  throw std::runtime_error(std::string("pasynInt32SyncIO->connect failed"));
77  };
79  virtual ~asynInt32Client() {
80  if (pInterface_ && interruptPvt_)
81  pInterface_->cancelInterruptUser(pasynInterface_->drvPvt, pasynUser_, interruptPvt_);
82  pasynInt32SyncIO->disconnect(pasynUserSyncIO_);
83  };
86  virtual asynStatus read(epicsInt32 *value) {
87  return pasynInt32SyncIO->read(pasynUserSyncIO_, value, timeout_);
88  };
91  virtual asynStatus write(epicsInt32 value) {
92  return pasynInt32SyncIO->write(pasynUserSyncIO_, value, timeout_);
93  };
97  virtual asynStatus getBounds(epicsInt32 *low, epicsInt32 *high) {
98  return pasynInt32SyncIO->getBounds(pasynUserSyncIO_, low, high);
99  };
102  virtual asynStatus registerInterruptUser(interruptCallbackInt32 pCallback) {
103  if(interruptPvt_!=NULL) return asynError;
104  return pInterface_->registerInterruptUser(pasynInterface_->drvPvt, pasynUser_,
105  pCallback, this, &interruptPvt_);
106  };
107 private:
108  asynInt32 *pInterface_;
109 };
110 
111 
113 class epicsShareClass asynUInt32DigitalClient : public asynPortClient {
114 public:
121  asynUInt32DigitalClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
122  : asynPortClient(portName, addr, asynUInt32DigitalType, drvInfo, timeout) {
123  pInterface_ = (asynUInt32Digital *)pasynInterface_->pinterface;
124  if (pasynInt32SyncIO->connect(portName, addr, &pasynUserSyncIO_, drvInfo))
125  throw std::runtime_error(std::string("pasynInt32SyncIO->connect failed"));
126  };
129  pasynUInt32DigitalSyncIO->disconnect(pasynUserSyncIO_);
130  };
134  virtual asynStatus read(epicsUInt32 *value, epicsUInt32 mask) {
135  return pasynUInt32DigitalSyncIO->read(pasynUserSyncIO_, value, mask, timeout_);
136  };
140  virtual asynStatus write(epicsUInt32 value, epicsUInt32 mask){
141  return pasynUInt32DigitalSyncIO->write(pasynUserSyncIO_, value, mask, timeout_);
142  };
146  virtual asynStatus setInterrupt(epicsUInt32 mask, interruptReason reason) {
147  return pasynUInt32DigitalSyncIO->setInterrupt(pasynUserSyncIO_, mask, reason, timeout_);
148  };
151  virtual asynStatus clearInterrupt(epicsUInt32 mask) {
152  return pasynUInt32DigitalSyncIO->clearInterrupt(pasynUserSyncIO_, mask, timeout_);
153  };
157  virtual asynStatus getInterrupt(epicsUInt32 *mask, interruptReason reason) {
158  return pasynUInt32DigitalSyncIO->getInterrupt(pasynUserSyncIO_, mask, reason, timeout_);
159  };
163  virtual asynStatus registerInterruptUser(interruptCallbackUInt32Digital pCallback, epicsUInt32 mask) {
164  return pInterface_->registerInterruptUser(pasynInterface_->drvPvt, pasynUser_,
165  pCallback, this, mask, &interruptPvt_);
166  };
167 private:
168  asynUInt32Digital *pInterface_;
169 };
170 
171 
173 class epicsShareClass asynFloat64Client : public asynPortClient {
174 public:
181  asynFloat64Client(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
182  : asynPortClient(portName, addr, asynFloat64Type, drvInfo, timeout) {
183  pInterface_ = (asynFloat64 *)pasynInterface_->pinterface;
184  if (pasynFloat64SyncIO->connect(portName, addr, &pasynUserSyncIO_, drvInfo))
185  throw std::runtime_error(std::string("pasynFloat64SyncIO->connect failed"));
186  };
188  virtual ~asynFloat64Client() {
189  pasynFloat64SyncIO->disconnect(pasynUserSyncIO_);
190  };
193  virtual asynStatus read(epicsFloat64 *value) {
194  return pasynFloat64SyncIO->read(pasynUserSyncIO_, value, timeout_);
195  };
198  virtual asynStatus write(epicsFloat64 value) {
199  return pasynFloat64SyncIO->write(pasynUserSyncIO_, value, timeout_);
200  };
203  virtual asynStatus registerInterruptUser(interruptCallbackFloat64 pCallback) {
204  return pInterface_->registerInterruptUser(pasynInterface_->drvPvt, pasynUser_,
205  pCallback, this, &interruptPvt_);
206  };
207 private:
208  asynFloat64 *pInterface_;
209 };
210 
211 
213 class epicsShareClass asynOctetClient : public asynPortClient {
214 public:
221  asynOctetClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
222  : asynPortClient(portName, addr, asynOctetType, drvInfo, timeout) {
223  pInterface_ = (asynOctet *)pasynInterface_->pinterface;
224  if (pasynOctetSyncIO->connect(portName, addr, &pasynUserSyncIO_, drvInfo))
225  throw std::runtime_error(std::string("pasynOctetSyncIO->connect failed"));
226  };
228  virtual ~asynOctetClient() {
229  pasynOctetSyncIO->disconnect(pasynUserSyncIO_);
230  };
235  virtual asynStatus write(const char *buffer, size_t bufferLen, size_t *nActual) {
236  return pasynOctetSyncIO->write(pasynUserSyncIO_, buffer, bufferLen, timeout_, nActual);
237  };
243  virtual asynStatus read(char *buffer, size_t bufferLen, size_t *nActual, int *eomReason) {
244  return pasynOctetSyncIO->read(pasynUserSyncIO_, buffer, bufferLen, timeout_, nActual, eomReason);
245  };
254  virtual asynStatus writeRead(const char *writeBuffer, size_t writeBufferLen, char *readBuffer, size_t readBufferLen,
255  size_t *nBytesOut, size_t *nBytesIn, int *eomReason) {
256  return pasynOctetSyncIO->writeRead(pasynUserSyncIO_, writeBuffer, writeBufferLen, readBuffer, readBufferLen,
257  timeout_, nBytesOut, nBytesIn, eomReason);
258  };
260  virtual asynStatus flush() {
261  return pasynOctetSyncIO->flush(pasynUserSyncIO_);
262  };
266  virtual asynStatus setInputEos(const char *eos, int eosLen) {
267  return pasynOctetSyncIO->setInputEos(pasynUserSyncIO_, eos, eosLen);
268  };
273  virtual asynStatus getInputEos(char *eos, int eosSize, int *eosLen) {
274  return pasynOctetSyncIO->getInputEos(pasynUserSyncIO_, eos, eosSize, eosLen);
275  };
279  virtual asynStatus setOutputEos(const char *eos, int eosLen) {
280  return pasynOctetSyncIO->setOutputEos(pasynUserSyncIO_, eos, eosLen);
281  };
286  virtual asynStatus getOutputEos(char *eos, int eosSize, int *eosLen) {
287  return pasynOctetSyncIO->getOutputEos(pasynUserSyncIO_, eos, eosSize, eosLen);
288  };
291  virtual asynStatus registerInterruptUser(interruptCallbackOctet pCallback) {
292  return pInterface_->registerInterruptUser(pasynInterface_->drvPvt, pasynUser_,
293  pCallback, this, &interruptPvt_);
294  };
295 private:
296  asynOctet *pInterface_;
297 };
298 
299 
301 class epicsShareClass asynInt8ArrayClient : public asynPortClient {
302 public:
309  asynInt8ArrayClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
310  : asynPortClient(portName, addr, asynInt8ArrayType, drvInfo, timeout) {
311  pInterface_ = (asynInt8Array *)pasynInterface_->pinterface;
312  if (pasynInt8ArraySyncIO->connect(portName, addr, &pasynUserSyncIO_, drvInfo))
313  throw std::runtime_error(std::string("pasynInt8ArraySyncIO->connect failed"));
314  };
317  pasynInt8ArraySyncIO->disconnect(pasynUserSyncIO_);
318  };
323  virtual asynStatus read(epicsInt8 *value, size_t nElements, size_t *nIn) {
324  return pasynInt8ArraySyncIO->read(pasynUserSyncIO_, value, nElements, nIn, timeout_);
325  };
329  virtual asynStatus write(epicsInt8 *value, size_t nElements) {
330  return pasynInt8ArraySyncIO->write(pasynUserSyncIO_, value, nElements, timeout_);
331  };
334  virtual asynStatus registerInterruptUser(interruptCallbackInt8Array pCallback) {
335  return pInterface_->registerInterruptUser(pasynInterface_->drvPvt, pasynUser_,
336  pCallback, this, &interruptPvt_);
337  };
338 private:
339  asynInt8Array *pInterface_;
340 };
341 
342 
344 class epicsShareClass asynInt16ArrayClient : public asynPortClient {
345 public:
352  asynInt16ArrayClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
353  : asynPortClient(portName, addr, asynInt16ArrayType, drvInfo, timeout) {
354  pInterface_ = (asynInt16Array *)pasynInterface_->pinterface;
355  if (pasynInt16ArraySyncIO->connect(portName, addr, &pasynUserSyncIO_, drvInfo))
356  throw std::runtime_error(std::string("pasynInt16ArraySyncIO->connect failed"));
357  };
360  pasynInt16ArraySyncIO->disconnect(pasynUserSyncIO_);
361  };
366  virtual asynStatus read(epicsInt16 *value, size_t nElements, size_t *nIn) {
367  return pasynInt16ArraySyncIO->read(pasynUserSyncIO_, value, nElements, nIn, timeout_);
368  };
372  virtual asynStatus write(epicsInt16 *value, size_t nElements) {
373  return pasynInt16ArraySyncIO->write(pasynUserSyncIO_, value, nElements, timeout_);
374  };
377  virtual asynStatus registerInterruptUser(interruptCallbackInt16Array pCallback) {
378  return pInterface_->registerInterruptUser(pasynInterface_->drvPvt, pasynUser_,
379  pCallback, this, &interruptPvt_);
380  };
381 private:
382  asynInt16Array *pInterface_;
383 };
384 
385 
387 class epicsShareClass asynInt32ArrayClient : public asynPortClient {
388 public:
395  asynInt32ArrayClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
396  : asynPortClient(portName, addr, asynInt32ArrayType, drvInfo, timeout) {
397  pInterface_ = (asynInt32Array *)pasynInterface_->pinterface;
398  if (pasynInt32ArraySyncIO->connect(portName, addr, &pasynUserSyncIO_, drvInfo))
399  throw std::runtime_error(std::string("pasynInt32ArraySyncIO->connect failed"));
400  };
403  pasynInt32ArraySyncIO->disconnect(pasynUserSyncIO_);
404  };
409  virtual asynStatus read(epicsInt32 *value, size_t nElements, size_t *nIn) {
410  return pasynInt32ArraySyncIO->read(pasynUserSyncIO_, value, nElements, nIn, timeout_);
411  };
415  virtual asynStatus write(epicsInt32 *value, size_t nElements) {
416  return pasynInt32ArraySyncIO->write(pasynUserSyncIO_, value, nElements, timeout_);
417  };
420  virtual asynStatus registerInterruptUser(interruptCallbackInt32Array pCallback) {
421  return pInterface_->registerInterruptUser(pasynInterface_->drvPvt, pasynUser_,
422  pCallback, this, &interruptPvt_);
423  };
424 private:
425  asynInt32Array *pInterface_;
426 };
427 
428 
430 class epicsShareClass asynFloat32ArrayClient : public asynPortClient {
431 public:
438  asynFloat32ArrayClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
439  : asynPortClient(portName, addr, asynFloat32ArrayType, drvInfo, timeout) {
440  pInterface_ = (asynFloat32Array *)pasynInterface_->pinterface;
441  if (pasynFloat32ArraySyncIO->connect(portName, addr, &pasynUserSyncIO_, drvInfo))
442  throw std::runtime_error(std::string("pasynFloat64ArraySyncIO->connect failed"));
443  };
446  pasynFloat32ArraySyncIO->disconnect(pasynUserSyncIO_);
447  };
452  virtual asynStatus read(epicsFloat32 *value, size_t nElements, size_t *nIn) {
453  return pasynFloat32ArraySyncIO->read(pasynUserSyncIO_, value, nElements, nIn, timeout_);
454  };
458  virtual asynStatus write(epicsFloat32 *value, size_t nElements) {
459  return pasynFloat32ArraySyncIO->write(pasynUserSyncIO_, value, nElements, timeout_);
460  };
463  virtual asynStatus registerInterruptUser(interruptCallbackFloat32Array pCallback) {
464  return pInterface_->registerInterruptUser(pasynInterface_->drvPvt, pasynUser_,
465  pCallback, this, &interruptPvt_);
466  };
467 private:
468  asynFloat32Array *pInterface_;
469 };
470 
471 
473 class epicsShareClass asynFloat64ArrayClient : public asynPortClient {
474 public:
481  asynFloat64ArrayClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
482  : asynPortClient(portName, addr, asynFloat64ArrayType, drvInfo, timeout) {
483  pInterface_ = (asynFloat64Array *)pasynInterface_->pinterface;
484  if (pasynFloat64ArraySyncIO->connect(portName, addr, &pasynUserSyncIO_, drvInfo))
485  throw std::runtime_error(std::string("pasynFloat64ArraySyncIO->connect failed"));
486  };
489  pasynFloat64ArraySyncIO->disconnect(pasynUserSyncIO_);
490  };
495  virtual asynStatus read(epicsFloat64 *value, size_t nElements, size_t *nIn) {
496  return pasynFloat64ArraySyncIO->read(pasynUserSyncIO_, value, nElements, nIn, timeout_);
497  };
501  virtual asynStatus write(epicsFloat64 *value, size_t nElements) {
502  return pasynFloat64ArraySyncIO->write(pasynUserSyncIO_, value, nElements, timeout_);
503  };
506  virtual asynStatus registerInterruptUser(interruptCallbackFloat64Array pCallback) {
507  return pInterface_->registerInterruptUser(pasynInterface_->drvPvt, pasynUser_,
508  pCallback, this, &interruptPvt_);
509  };
510 private:
511  asynFloat64Array *pInterface_;
512 };
513 
514 
516 class epicsShareClass asynGenericPointerClient : public asynPortClient {
517 public:
524  asynGenericPointerClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
525  : asynPortClient(portName, addr, asynGenericPointerType, drvInfo, timeout) {
526  pInterface_ = (asynGenericPointer *)pasynInterface_->pinterface;
527  if (pasynGenericPointerSyncIO->connect(portName, addr, &pasynUserSyncIO_, drvInfo))
528  throw std::runtime_error(std::string("pasynGenericPointerSyncIO->connect failed"));
529  };
532  pasynGenericPointerSyncIO->disconnect(pasynUserSyncIO_);
533  };
536  virtual asynStatus read(void *pointer) {
537  return pasynGenericPointerSyncIO->read(pasynUserSyncIO_, pointer, timeout_);
538  };
541  virtual asynStatus write(void *pointer) {
542  return pasynGenericPointerSyncIO->write(pasynUserSyncIO_, pointer, timeout_);
543  };
546  virtual asynStatus registerInterruptUser(interruptCallbackGenericPointer pCallback) {
547  return pInterface_->registerInterruptUser(pasynInterface_->drvPvt, pasynUser_,
548  pCallback, this, &interruptPvt_);
549  };
550 private:
551  asynGenericPointer *pInterface_;
552 };
553 
554 
556 class epicsShareClass asynOptionClient : public asynPortClient {
557 public:
564  asynOptionClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
565  : asynPortClient(portName, addr, asynOptionType, drvInfo, timeout) {
566  pInterface_ = (asynOption *)pasynInterface_->pinterface;
567  if (pasynOptionSyncIO->connect(portName, addr, &pasynUserSyncIO_, drvInfo))
568  throw std::runtime_error(std::string("pasynOptionSyncIO->connect failed"));
569  };
571  virtual ~asynOptionClient() {
572  pasynOptionSyncIO->disconnect(pasynUserSyncIO_);
573  };
578  virtual asynStatus getOption(const char *key, char *value, int maxChars) {
579  return pasynOptionSyncIO->getOption(pasynUserSyncIO_, key, value, maxChars, timeout_);
580  };
584  virtual asynStatus setOption(const char *key, const char *value) {
585  return pasynOptionSyncIO->setOption(pasynUserSyncIO_, key, value, timeout_);
586  };
587 private:
588  asynOption *pInterface_;
589 };
590 
591 
593 class epicsShareClass asynEnumClient : public asynPortClient {
594 public:
601  asynEnumClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
602  : asynPortClient(portName, addr, asynEnumType, drvInfo, timeout) {
603  pInterface_ = (asynEnum *)pasynInterface_->pinterface;
604  if (pasynEnumSyncIO->connect(portName, addr, &pasynUserSyncIO_, drvInfo))
605  throw std::runtime_error(std::string("pasynEnumSyncIO->connect failed"));
606  };
608  virtual ~asynEnumClient() {
609  pasynEnumSyncIO->disconnect(pasynUserSyncIO_);
610  };
617  virtual asynStatus read(char *strings[], int values[], int severities[], size_t nElements, size_t *nIn) {
618  return pasynEnumSyncIO->read(pasynUserSyncIO_, strings, values, severities, nElements, nIn, timeout_);
619  };
625  virtual asynStatus write(char *strings[], int values[], int severities[], size_t nElements) {
626  return pasynEnumSyncIO->write(pasynUserSyncIO_, strings, values, severities, nElements, timeout_);
627  };
628 private:
629  asynEnum *pInterface_;
630 };
631 
632 
634 class epicsShareClass asynCommonClient : public asynPortClient {
635 public:
642  asynCommonClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
643  : asynPortClient(portName, addr, asynCommonType, drvInfo, timeout) {
644  pInterface_ = (asynCommon *)pasynInterface_->pinterface;
645  if (pasynCommonSyncIO->connect(portName, addr, &pasynUserSyncIO_, drvInfo))
646  throw std::runtime_error(std::string("pasynCommonSyncIO->connect failed"));
647  };
649  virtual ~asynCommonClient() {
650  pasynCommonSyncIO->disconnect(pasynUserSyncIO_);
651  };
655  virtual void report(FILE *fp, int details) {
656  pasynCommonSyncIO->report(pasynUserSyncIO_, fp, details);
657  };
659  virtual asynStatus connect() {
660  return pasynCommonSyncIO->connectDevice(pasynUserSyncIO_);
661  };
663  virtual asynStatus disconnect() {
664  return pasynCommonSyncIO->disconnectDevice(pasynUserSyncIO_);
665  };
666 private:
667  asynCommon *pInterface_;
668 };
669 
670 #endif
Class for asyn port clients to communicate on the asynCommon interface.
Definition: asynPortClient.h:634
virtual asynStatus getOption(const char *key, char *value, int maxChars)
Get an option from the port driver.
Definition: asynPortClient.h:578
asynUInt32DigitalClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
Constructor for asynUInt32DigitalClient class.
Definition: asynPortClient.h:121
int addr_
Definition: asynPortClient.h:55
virtual asynStatus read(epicsFloat32 *value, size_t nElements, size_t *nIn)
Reads an epicsFloat32 array from the port driver.
Definition: asynPortClient.h:452
Class for asyn port clients to communicate on the asynInt32 interface.
Definition: asynPortClient.h:64
virtual asynStatus write(epicsInt32 *value, size_t nElements)
Writes an epicsInt32 array to the port driver.
Definition: asynPortClient.h:415
Class for asyn port clients to communicate on the asynInt16Array interface.
Definition: asynPortClient.h:344
virtual asynStatus read(epicsFloat64 *value, size_t nElements, size_t *nIn)
Reads an epicsFloat64 array from the port driver.
Definition: asynPortClient.h:495
virtual asynStatus read(epicsInt16 *value, size_t nElements, size_t *nIn)
Reads an epicsInt16 array from the port driver.
Definition: asynPortClient.h:366
void setTimeout(double timeout)
Definition: asynPortClient.h:46
virtual asynStatus write(epicsFloat64 *value, size_t nElements)
Writes an epicsFloat64 array to the port driver.
Definition: asynPortClient.h:501
virtual asynStatus registerInterruptUser(interruptCallbackInt32Array pCallback)
Registers an interruptCallbackInt32Array function that the driver will call when there is a new value...
Definition: asynPortClient.h:420
virtual asynStatus getInterrupt(epicsUInt32 *mask, interruptReason reason)
Gets the current interrupt mask for the specified reason from the driver.
Definition: asynPortClient.h:157
virtual asynStatus registerInterruptUser(interruptCallbackFloat64 pCallback)
Registers an interruptCallbackFloat64 function that the driver will call when there is a new value...
Definition: asynPortClient.h:203
virtual asynStatus disconnect()
Calls the disconnect method in the driver disconnects from the port device.
Definition: asynPortClient.h:663
virtual ~asynInt32ArrayClient()
Destructor for asynInt32Array class.
Definition: asynPortClient.h:402
virtual ~asynGenericPointerClient()
Destructor for asynGenericPointer class.
Definition: asynPortClient.h:531
virtual ~asynInt32Client()
Destructor for asynInt32Client class.
Definition: asynPortClient.h:79
virtual asynStatus write(epicsInt16 *value, size_t nElements)
Writes an epicsInt16 array to the port driver.
Definition: asynPortClient.h:372
Class for asyn port clients to communicate on the asynInt8Array interface.
Definition: asynPortClient.h:301
virtual asynStatus registerInterruptUser(interruptCallbackInt16Array pCallback)
Registers an interruptCallbackInt16Array function that the driver will call when there is a new value...
Definition: asynPortClient.h:377
char * drvInfo_
Definition: asynPortClient.h:57
Class for asyn port clients to communicate on the asynFloat32Array interface.
Definition: asynPortClient.h:430
Class for asyn port clients to communicate on the asynInt32Array interface.
Definition: asynPortClient.h:387
virtual void report(FILE *fp, int details)
Calls the report method in the driver.
Definition: asynPortClient.h:655
virtual asynStatus registerInterruptUser(interruptCallbackFloat64Array pCallback)
Registers an interruptCallbackFloat64Array function that the driver will call when there is a new val...
Definition: asynPortClient.h:506
char * portName_
Definition: asynPortClient.h:54
virtual asynStatus getOutputEos(char *eos, int eosSize, int *eosLen)
Gets the output end-of-string terminator from the driver.
Definition: asynPortClient.h:286
asynFloat32ArrayClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
Constructor for asynFloat32Array class.
Definition: asynPortClient.h:438
virtual ~asynUInt32DigitalClient()
Destructor for asynInt32Client class.
Definition: asynPortClient.h:128
virtual asynStatus read(epicsFloat64 *value)
Reads an epicsFloat64 value from the port driver.
Definition: asynPortClient.h:193
asynInt8ArrayClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
Constructor for asynInt8Array class.
Definition: asynPortClient.h:309
virtual ~asynEnumClient()
Destructor for asynEnum class.
Definition: asynPortClient.h:608
virtual asynStatus registerInterruptUser(interruptCallbackOctet pCallback)
Registers an interruptCallbackOctet function that the driver will call when there is a new value...
Definition: asynPortClient.h:291
virtual asynStatus write(epicsUInt32 value, epicsUInt32 mask)
Writes an epicsUInt32 value to the port driver.
Definition: asynPortClient.h:140
Class for asyn port clients to communicate on the asynEnum interface.
Definition: asynPortClient.h:593
Class for asyn port clients to communicate on the asynFloat64Array interface.
Definition: asynPortClient.h:473
Class for asyn port clients to communicate on the asynGenericPointer interface.
Definition: asynPortClient.h:516
virtual asynStatus read(epicsInt32 *value)
Reads an epicsInt32 value from the port driver.
Definition: asynPortClient.h:86
virtual asynStatus read(epicsUInt32 *value, epicsUInt32 mask)
Reads an epicsUInt32 value from the port driver.
Definition: asynPortClient.h:134
virtual asynStatus connect()
Calls the connect method in the driver which attempts to connect to the port device.
Definition: asynPortClient.h:659
virtual asynStatus write(void *pointer)
Writes a generic pointer to the port driver.
Definition: asynPortClient.h:541
asynInterface * pasynInterface_
Definition: asynPortClient.h:52
virtual asynStatus read(epicsInt32 *value, size_t nElements, size_t *nIn)
Reads an epicsInt32 array from the port driver.
Definition: asynPortClient.h:409
virtual ~asynOctetClient()
Destructor for asynOctetClient class.
Definition: asynPortClient.h:228
virtual asynStatus setOption(const char *key, const char *value)
Sets an option in the port driver.
Definition: asynPortClient.h:584
asynInt32Client(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
Constructor for asynInt32Client class.
Definition: asynPortClient.h:72
virtual ~asynFloat64ArrayClient()
Destructor for asynFloat64Array class.
Definition: asynPortClient.h:488
virtual ~asynOptionClient()
Destructor for asynOption class.
Definition: asynPortClient.h:571
void * interruptPvt_
Definition: asynPortClient.h:59
virtual asynStatus registerInterruptUser(interruptCallbackUInt32Digital pCallback, epicsUInt32 mask)
Registers an interruptCallbackUInt32Digital function that the driver will call when there is a new va...
Definition: asynPortClient.h:163
asynEnumClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
Constructor for asynEnum class.
Definition: asynPortClient.h:601
asynUser * pasynUserSyncIO_
Definition: asynPortClient.h:51
virtual ~asynFloat32ArrayClient()
Destructor for asynFloat32Array class.
Definition: asynPortClient.h:445
virtual asynStatus registerInterruptUser(interruptCallbackInt8Array pCallback)
Registers an interruptCallbackInt8Array function that the driver will call when there is a new value...
Definition: asynPortClient.h:334
virtual asynStatus registerInterruptUser(interruptCallbackInt32 pCallback)
Registers an interruptCallbackInt32 function that the driver will call when there is a new value...
Definition: asynPortClient.h:102
virtual ~asynInt16ArrayClient()
Destructor for asynInt16Array class.
Definition: asynPortClient.h:359
Base class for asyn port clients; handles most of the bookkeeping for writing an asyn port client wit...
Definition: asynPortClient.h:42
Class for asyn port clients to communicate on the asynFloat64 interface.
Definition: asynPortClient.h:173
asynFloat64ArrayClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
Constructor for asynFloat64Array class.
Definition: asynPortClient.h:481
Class for asyn port clients to communicate on the asynUInt32Digital interface.
Definition: asynPortClient.h:113
virtual asynStatus writeRead(const char *writeBuffer, size_t writeBufferLen, char *readBuffer, size_t readBufferLen, size_t *nBytesOut, size_t *nBytesIn, int *eomReason)
Writes a char buffer to the port driver and reads the response as an atomic operation.
Definition: asynPortClient.h:254
virtual asynStatus write(epicsInt32 value)
Writes an epicsInt32 value to the port driver.
Definition: asynPortClient.h:91
asynInt32ArrayClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
Constructor for asynInt32Array class.
Definition: asynPortClient.h:395
virtual asynStatus read(epicsInt8 *value, size_t nElements, size_t *nIn)
Reads an epicsInt8 array from the port driver.
Definition: asynPortClient.h:323
asynGenericPointerClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
Constructor for asynGenericPointer class.
Definition: asynPortClient.h:524
virtual asynStatus write(const char *buffer, size_t bufferLen, size_t *nActual)
Writes a char buffer to the port driver.
Definition: asynPortClient.h:235
virtual ~asynCommonClient()
Destructor for asynCommon class.
Definition: asynPortClient.h:649
virtual asynStatus getInputEos(char *eos, int eosSize, int *eosLen)
Gets the input end-of-string terminator from the driver.
Definition: asynPortClient.h:273
double timeout_
Definition: asynPortClient.h:53
virtual ~asynInt8ArrayClient()
Destructor for asynInt8Array class.
Definition: asynPortClient.h:316
asynOptionClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
Constructor for asynOption class.
Definition: asynPortClient.h:564
virtual asynStatus write(char *strings[], int values[], int severities[], size_t nElements)
Writes enum strings, values, and severities to the port driver.
Definition: asynPortClient.h:625
asynUser * pasynUser_
Definition: asynPortClient.h:50
virtual asynStatus setInputEos(const char *eos, int eosLen)
Sets the input end-of-string terminator in the driver.
Definition: asynPortClient.h:266
virtual asynStatus registerInterruptUser(interruptCallbackGenericPointer pCallback)
Registers an interruptCallbackGenericPointer function that the driver will call when there is a new v...
Definition: asynPortClient.h:546
virtual asynStatus write(epicsFloat32 *value, size_t nElements)
Writes an epicsFloat32 array to the port driver.
Definition: asynPortClient.h:458
virtual asynStatus read(void *pointer)
Reads an generic pointer from the port driver.
Definition: asynPortClient.h:536
asynOctetClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
Constructor for asynOctetClient class.
Definition: asynPortClient.h:221
asynCommonClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
Constructor for asynCommon class.
Definition: asynPortClient.h:642
virtual asynStatus write(epicsFloat64 value)
Writes an epicsFloat64 value to the port driver.
Definition: asynPortClient.h:198
virtual ~asynFloat64Client()
Destructor for asynFloat64Client class.
Definition: asynPortClient.h:188
char * asynInterfaceType_
Definition: asynPortClient.h:56
#define DEFAULT_TIMEOUT
Definition: asynPortClient.h:37
asynInt16ArrayClient(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
Constructor for asynInt16Array class.
Definition: asynPortClient.h:352
virtual asynStatus setInterrupt(epicsUInt32 mask, interruptReason reason)
Sets the interrupt mask for the specified interrupt reason in the driver.
Definition: asynPortClient.h:146
virtual asynStatus flush()
Flushes the input buffer in the port driver.
Definition: asynPortClient.h:260
virtual asynStatus read(char *strings[], int values[], int severities[], size_t nElements, size_t *nIn)
Reads enum strings, values, and severities from the port driver.
Definition: asynPortClient.h:617
virtual asynStatus write(epicsInt8 *value, size_t nElements)
Writes an epicsInt8 array to the port driver.
Definition: asynPortClient.h:329
virtual asynStatus registerInterruptUser(interruptCallbackFloat32Array pCallback)
Registers an interruptCallbackFloat32Array function that the driver will call when there is a new val...
Definition: asynPortClient.h:463
Class for asyn port clients to communicate on the asynOctet interface.
Definition: asynPortClient.h:213
Class for asyn port clients to communicate on the asynOption interface.
Definition: asynPortClient.h:556
asynFloat64Client(const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT)
Constructor for asynFloat64Client class.
Definition: asynPortClient.h:181
virtual asynStatus getBounds(epicsInt32 *low, epicsInt32 *high)
Returns the lower and upper limits of the range of values from the port driver.
Definition: asynPortClient.h:97
void * drvPvt
Definition: asynPortClient.h:58
virtual asynStatus clearInterrupt(epicsUInt32 mask)
Clears the interrupt mask in the driver.
Definition: asynPortClient.h:151
virtual asynStatus setOutputEos(const char *eos, int eosLen)
Sets the output end-of-string terminator in the driver.
Definition: asynPortClient.h:279
virtual asynStatus read(char *buffer, size_t bufferLen, size_t *nActual, int *eomReason)
Reads a char buffer from the port driver.
Definition: asynPortClient.h:243