8 #include "PlusConfigure.h" 13 #include <igtl_header.h> 14 #include <igtl_util.h> 21 this->m_SendMessageType =
"CLIENTINFO";
32 igtl::MessageBase::Pointer clone;
34 vtkSmartPointer<vtkPlusIgtlMessageFactory> factory = vtkSmartPointer<vtkPlusIgtlMessageFactory>::New();
35 clone = dynamic_cast<igtl::MessageBase*>(factory->CreateSendMessage(this->GetMessageType(), this->GetHeaderVersion()).GetPointer());
38 igtl::PlusClientInfoMessage::Pointer msg = dynamic_cast<igtl::PlusClientInfoMessage*>(clone.GetPointer());
40 int bodySize = this->m_MessageSize - IGTL_HEADER_SIZE;
42 msg->CopyHeader(
this);
43 msg->AllocateBuffer(bodySize);
49 #if OpenIGTLink_HEADER_VERSION >= 2 50 msg->m_MetaDataHeader = this->m_MetaDataHeader;
51 msg->m_MetaDataMap = this->m_MetaDataMap;
52 msg->m_IsExtendedHeaderUnpacked = this->m_IsExtendedHeaderUnpacked;
62 std::string clientInfoXmlData;
64 this->SetString(clientInfoXmlData);
72 LOG_ERROR(
"Failed to set Plus client info from received message!");
PlusIgtlClientInfo GetClientInfo()
PlusStatus SetClientInfoFromXmlData(const char *strXmlData)
void SetClientInfo(const PlusIgtlClientInfo &clientInfo)
PlusIgtlClientInfo m_ClientInfo
virtual igtl::MessageBase::Pointer Clone()
This class provides client information for vtkPlusOpenIGTLinkServer.
void GetClientInfoInXmlData(std::string &strXmlData)