7 #include "PlusConfigure.h" 16 static const std::string SHOW_CMD =
"ShowProbeDialog";
34 this->SetName(SHOW_CMD);
41 cmdNames.push_back(SHOW_CMD);
48 if (commandName.empty() || igsioCommon::IsEqualInsensitive(commandName, SHOW_CMD))
51 desc +=
": Opens the Probe Dialog part of the Optimet Smart32 SDK. ConoProbeDeviceId: ID of the ConoProbe device.";
92 if (dataCollector == NULL)
94 LOG_ERROR(
"Data collector is invalid");
98 if (!conoProbeDeviceID.empty())
104 LOG_ERROR(
"No OptimetConoProbe has been found by the name " << conoProbeDeviceID);
109 if (conoProbeDevice == NULL)
112 LOG_ERROR(
"The specified device " << conoProbeDeviceID <<
" is not VirtualStreamCapture");
122 if (conoProbeDevice != NULL)
128 if (conoProbeDevice == NULL)
130 LOG_ERROR(
"No OptimetConoProbe has been found");
134 return conoProbeDevice;
140 LOG_INFO(
"vtkPlusConoProbeLinkCommand::Execute:");
142 if (this->
Name.empty())
144 this->QueueStringResponse(
"Command failed, no command name specified",
PLUS_FAIL);
149 if (conoProbeDevice == NULL)
151 this->QueueStringResponse(std::string(
"OptimetConoProbe has not been found (")
156 std::string responseMessageBase = std::string(
"OptimetConoProbe (") + conoProbeDevice->
GetDeviceId() +
") " + this->
Name;
157 LOG_INFO(
"vtkPlusConoProbeLinkCommand::Execute: " << this->
Name);
158 if (igsioCommon::IsEqualInsensitive(this->
Name, SHOW_CMD))
160 if (conoProbeDevice->ShowProbeDialog())
162 this->QueueStringResponse(responseMessageBase +
" successful",
PLUS_SUCCESS);
165 this->QueueStringResponse(responseMessageBase +
" failed",
PLUS_FAIL);
169 this->QueueStringResponse(responseMessageBase +
" unknown command: " + this->
Name,
PLUS_FAIL);
virtual void PrintSelf(ostream &os, vtkIndent indent)
Abstract interface for tracker and video devices.
std::vector< vtkPlusDevice * >::const_iterator DeviceCollectionConstIterator
vtkPlusOptimetConoProbeMeasurer * GetConoProbeDevice(const std::string &conoProbeDeviceID)
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *aConfig)
PlusStatus GetDevice(vtkPlusDevice *&aDevice, const std::string &aDeviceId) const
vtkStandardNewMacro(vtkPlusConoProbeLinkCommand)
virtual PlusStatus Execute()
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *aConfig)
virtual std::string GetDeviceId() const
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *aConfig)
static vtkPlusOptimetConoProbeMeasurer * SafeDownCast(vtkObject *o)
DeviceCollectionConstIterator GetDeviceConstIteratorBegin() const
vtkPlusConoProbeLinkCommand()
DeviceCollectionConstIterator GetDeviceConstIteratorEnd() const
Manages devices that record image or positional data.
This command allows for communicating with the OptimetConoProbe device.
virtual std::string GetDescription(const std::string &commandName)
virtual vtkPlusDataCollector * GetDataCollector()
virtual void GetCommandNames(std::list< std::string > &cmdNames)
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual ~vtkPlusConoProbeLinkCommand()
Interface for the Optimet ConoProbe This class talks with Optimet ConoProbe over the Optimet Smart32 ...
std::string ConoProbeDeviceId
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *aConfig)