Page MenuHomePhabricator

IGTLDevice overwrites the device name set in the message
Closed, WontfixPublic

Description

I figured out that the IGTLDevice overwrites the device name set in the message itself. That was probably programmed by myself because I did not understand it better. There is no good reason why you should overwrite this.

Imagin you have two different kind of messages that you set different names ("TransformMessage1", "PositionMessage1"). The receiver will not see this names but the device that sent it, e.g. "IGTLServer".

I suggest that we adapt the current version from

// add the name of this device to the message
msg->SetDeviceName(this->GetName().c_str());

to something like this

std::string mergedNames = msg->GetDeviceName() + " sent by " + this->GetName());
msg->SetDeviceName( mergedNames.c_str() );

You find this in
unsigned int mitk::IGTLDevice::SendMessagePrivate(igtl::MessageBase::Pointer msg,

igtl::Socket::Pointer socket)

Event Timeline

kislinsk claimed this task.
kislinsk added a subscriber: kislinsk.
This task was automatically closed because it wasn't updated at least since July 2016 (over 2 years). Please re-open this task if you think that it is still relevant. This most probably means that you will resolve it.