7 #ifndef __vtkPlusGenericSerialDevice_h 8 #define __vtkPlusGenericSerialDevice_h 10 #include "vtkPlusDataCollectionExport.h" 31 void PrintSelf(ostream& os, vtkIndent indent);
58 vtkSetMacro(SerialPort,
unsigned long);
59 vtkSetMacro(BaudRate,
unsigned long);
60 vtkSetMacro(MaximumReplyDelaySec,
double);
61 vtkSetMacro(MaximumReplyDurationSec,
double);
64 void SetLineEnding(
const char* lineEndingHex);
65 vtkGetMacro(LineEnding, std::string);
70 REQUIRE_LINE_ENDING = 0,
71 REQUIRE_NOT_EMPTY = 1,
85 virtual PlusStatus SendText(
const std::string& textToSend, std::string* textReceived, ReplyTermination acceptReply);
93 virtual PlusStatus ReceiveResponse(std::string& textReceived, ReplyTermination acceptReply = REQUIRE_LINE_ENDING);
101 vtkGetMacro(DTR,
bool);
107 vtkGetMacro(RTS,
bool);
120 virtual bool WaitForResponse();
158 vtkSmartPointer<vtkIGSIORecursiveCriticalSection>
Mutex;
virtual void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual bool IsTracker() const
Abstract interface for tracker and video devices.
static const char * SERIAL_COMMAND_GET_CTS
virtual PlusStatus InternalConnect()
std::string LineEndingBin
Class for reading and writing data through the serial (RS-232) port.
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *)
double MaximumReplyDurationSec
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *)
static const char * SERIAL_COMMAND_GET_RTS
vtkPlusDataSource * FieldDataSource
double MaximumReplyDelaySec
vtkSmartPointer< vtkIGSIORecursiveCriticalSection > Mutex
virtual PlusStatus NotifyConfigured()
static const char * SERIAL_COMMAND_SET_RTS
virtual PlusStatus SendText(const std::string &textToSend, std::string *textReceived=NULL) VTK_OVERRIDE
virtual PlusStatus InternalDisconnect()
Generic interface for communicating with a serial device.
virtual PlusStatus SendText(const std::string &textToSend, std::string *textReceived=NULL)
virtual PlusStatus InternalUpdate()
static vtkPlusDevice * New()
Interface to a 3D positioning tool, video source, or generalized data stream.