7 #ifndef __VTKPLUSOPENIGTLINKCLIENT_H 8 #define __VTKPLUSOPENIGTLINKCLIENT_H 10 #include "vtkPlusServerExport.h" 17 #include <igtlClientSocket.h> 18 #include <igtlCommandMessage.h> 19 #include <igtlMessageHeader.h> 20 #include <igtlOSUtil.h> 23 #include <vtkObject.h> 29 class vtkMultiThreader;
30 class vtkIGSIORecursiveCriticalSection;
45 virtual void PrintSelf(ostream& os, vtkIndent indent);
47 vtkSetMacro(ServerPort,
int);
48 vtkGetMacroConst(ServerPort,
int);
50 vtkGetStdStringMacro(ServerHost);
51 vtkSetStdStringMacro(ServerHost);
53 vtkSetMacro(ServerIGTLVersion,
int);
54 vtkGetMacroConst(ServerIGTLVersion,
int);
66 PlusStatus SendMessage(igtl::MessageBase::Pointer packedMessage);
70 int32_t& outOriginalCommandId,
71 std::string& outErrorString,
72 std::string& outContent,
73 igtl::MessageBase::MetaDataMap& outParameters,
74 std::string& outCommandName,
75 double timeoutSec = 0);
98 igtlUint64 SocketReceive(
void*
data, igtlUint64 length);
101 static void* DataReceiverThread(vtkMultiThreader::ThreadInfo*
data);
115 vtkSmartPointer<vtkIGSIORecursiveCriticalSection>
Mutex;
122 std::deque<igtl::MessageBase::Pointer>
Replies;
This is an abstract superclass for commands in the OpenIGTLink network interface for Plus.
igtlUint32 LastGeneratedCommandId
vtkSmartPointer< vtkIGSIORecursiveCriticalSection > Mutex
virtual bool OnMessageReceived(igtl::MessageHeader::Pointer messageHeader)
vtkSmartPointer< vtkPlusIgtlMessageFactory > IgtlMessageFactory
static const float CLIENT_SOCKET_TIMEOUT_SEC
This class provides a network interface to access Plus functions as an OpenIGTLink client.
vtkSmartPointer< vtkIGSIORecursiveCriticalSection > SocketMutex
std::deque< igtl::MessageBase::Pointer > Replies
igtl::ClientSocket::Pointer ClientSocket
vtkSmartPointer< vtkMultiThreader > Threader
std::pair< bool, bool > DataReceiverActive