24 std::string Adapt(
const bool i_Value )
26 return i_Value ?
"True" :
"False";
52 switch( i_DeviceType )
81 int main(
int argc,
char* argv[] )
84 bool TransmitMulticast =
false;
86 std::string HostName =
"localhost:801";
96 std::cout <<
"Connecting to " << HostName <<
" ..." << std::flush;
112 std::cout << std::endl;
139 std::cout <<
"Axis Mapping: X-" << Adapt( _Output_GetAxisMapping.
XAxis )
140 <<
" Y-" << Adapt( _Output_GetAxisMapping.
YAxis )
141 <<
" Z-" << Adapt( _Output_GetAxisMapping.
ZAxis ) << std::endl;
145 std::cout <<
"Version: " << _Output_GetVersion.
Major <<
"." 146 << _Output_GetVersion.
Minor <<
"." 147 << _Output_GetVersion.
Point << std::endl;
149 if( TransmitMulticast )
162 std::cout <<
"Waiting for new frame...";
174 std::cout << std::endl;
178 std::cout <<
"Frame Number: " << _Output_GetFrameNumber.
FrameNumber << std::endl;
183 std::cout <<
"Timecode: " 184 << _Output_GetTimecode.
Hours <<
"h " 185 << _Output_GetTimecode.
Minutes <<
"m " 186 << _Output_GetTimecode.
Seconds <<
"s " 187 << _Output_GetTimecode.
Frames <<
"f " 188 << _Output_GetTimecode.
SubFrame <<
"sf " 189 << Adapt( _Output_GetTimecode.
FieldFlag ) <<
" " 190 << _Output_GetTimecode.
Standard <<
" " 192 << _Output_GetTimecode.
UserBits << std::endl << std::endl;
197 for(
unsigned int LatencySampleIndex = 0 ; LatencySampleIndex < MyClient.
GetLatencySampleCount().
Count ; ++LatencySampleIndex )
202 std::cout <<
" " << SampleName <<
" " << SampleValue <<
"s" << std::endl;
204 std::cout << std::endl;
208 std::cout <<
"Subjects (" << SubjectCount <<
"):" << std::endl;
209 for(
unsigned int SubjectIndex = 0 ; SubjectIndex < SubjectCount ; ++SubjectIndex )
211 std::cout <<
" Subject #" << SubjectIndex << std::endl;
215 std::cout <<
" Name: " << SubjectName << std::endl;
219 std::cout <<
" Root Segment: " << RootSegment << std::endl;
223 std::cout <<
" Segments (" << SegmentCount <<
"):" << std::endl;
224 for(
unsigned int SegmentIndex = 0 ; SegmentIndex < SegmentCount ; ++SegmentIndex )
226 std::cout <<
" Segment #" << SegmentIndex << std::endl;
230 std::cout <<
" Name: " << SegmentName << std::endl;
234 std::cout <<
" Parent: " << SegmentParentName << std::endl;
238 std::cout <<
" Children (" << ChildCount <<
"):" << std::endl;
239 for(
unsigned int ChildIndex = 0 ; ChildIndex < ChildCount ; ++ChildIndex )
242 std::cout <<
" " << ChildName << std::endl;
248 std::cout <<
" Static Translation: (" << _Output_GetSegmentStaticTranslation.
Translation[ 0 ] <<
", " 249 << _Output_GetSegmentStaticTranslation.
Translation[ 1 ] <<
", " 250 << _Output_GetSegmentStaticTranslation.
Translation[ 2 ] <<
") " << std::endl;
255 std::cout <<
" Static Rotation Helical: (" << _Output_GetSegmentStaticRotationHelical.
Rotation[ 0 ] <<
", " 256 << _Output_GetSegmentStaticRotationHelical.
Rotation[ 1 ] <<
", " 257 << _Output_GetSegmentStaticRotationHelical.
Rotation[ 2 ] <<
") " << std::endl;
262 std::cout <<
" Static Rotation Matrix: (" << _Output_GetSegmentStaticRotationMatrix.
Rotation[ 0 ] <<
", " 263 << _Output_GetSegmentStaticRotationMatrix.
Rotation[ 1 ] <<
", " 264 << _Output_GetSegmentStaticRotationMatrix.
Rotation[ 2 ] <<
", " 265 << _Output_GetSegmentStaticRotationMatrix.
Rotation[ 3 ] <<
", " 266 << _Output_GetSegmentStaticRotationMatrix.
Rotation[ 4 ] <<
", " 267 << _Output_GetSegmentStaticRotationMatrix.
Rotation[ 5 ] <<
", " 268 << _Output_GetSegmentStaticRotationMatrix.
Rotation[ 6 ] <<
", " 269 << _Output_GetSegmentStaticRotationMatrix.
Rotation[ 7 ] <<
", " 270 << _Output_GetSegmentStaticRotationMatrix.
Rotation[ 8 ] <<
") " << std::endl;
275 std::cout <<
" Static Rotation Quaternion: (" << _Output_GetSegmentStaticRotationQuaternion.
Rotation[ 0 ] <<
", " 276 << _Output_GetSegmentStaticRotationQuaternion.
Rotation[ 1 ] <<
", " 277 << _Output_GetSegmentStaticRotationQuaternion.
Rotation[ 2 ] <<
", " 278 << _Output_GetSegmentStaticRotationQuaternion.
Rotation[ 3 ] <<
") " << std::endl;
283 std::cout <<
" Static Rotation EulerXYZ: (" << _Output_GetSegmentStaticRotationEulerXYZ.
Rotation[ 0 ] <<
", " 284 << _Output_GetSegmentStaticRotationEulerXYZ.
Rotation[ 1 ] <<
", " 285 << _Output_GetSegmentStaticRotationEulerXYZ.
Rotation[ 2 ] <<
") " << std::endl;
290 std::cout <<
" Global Translation: (" << _Output_GetSegmentGlobalTranslation.
Translation[ 0 ] <<
", " 291 << _Output_GetSegmentGlobalTranslation.
Translation[ 1 ] <<
", " 292 << _Output_GetSegmentGlobalTranslation.
Translation[ 2 ] <<
") " 293 << Adapt( _Output_GetSegmentGlobalTranslation.
Occluded ) << std::endl;
298 std::cout <<
" Global Rotation Helical: (" << _Output_GetSegmentGlobalRotationHelical.
Rotation[ 0 ] <<
", " 299 << _Output_GetSegmentGlobalRotationHelical.
Rotation[ 1 ] <<
", " 300 << _Output_GetSegmentGlobalRotationHelical.
Rotation[ 2 ] <<
") " 301 << Adapt( _Output_GetSegmentGlobalRotationHelical.
Occluded ) << std::endl;
306 std::cout <<
" Global Rotation Matrix: (" << _Output_GetSegmentGlobalRotationMatrix.
Rotation[ 0 ] <<
", " 307 << _Output_GetSegmentGlobalRotationMatrix.
Rotation[ 1 ] <<
", " 308 << _Output_GetSegmentGlobalRotationMatrix.
Rotation[ 2 ] <<
", " 309 << _Output_GetSegmentGlobalRotationMatrix.
Rotation[ 3 ] <<
", " 310 << _Output_GetSegmentGlobalRotationMatrix.
Rotation[ 4 ] <<
", " 311 << _Output_GetSegmentGlobalRotationMatrix.
Rotation[ 5 ] <<
", " 312 << _Output_GetSegmentGlobalRotationMatrix.
Rotation[ 6 ] <<
", " 313 << _Output_GetSegmentGlobalRotationMatrix.
Rotation[ 7 ] <<
", " 314 << _Output_GetSegmentGlobalRotationMatrix.
Rotation[ 8 ] <<
") " 315 << Adapt( _Output_GetSegmentGlobalRotationMatrix.
Occluded ) << std::endl;
320 std::cout <<
" Global Rotation Quaternion: (" << _Output_GetSegmentGlobalRotationQuaternion.
Rotation[ 0 ] <<
", " 321 << _Output_GetSegmentGlobalRotationQuaternion.
Rotation[ 1 ] <<
", " 322 << _Output_GetSegmentGlobalRotationQuaternion.
Rotation[ 2 ] <<
", " 323 << _Output_GetSegmentGlobalRotationQuaternion.
Rotation[ 3 ] <<
") " 324 << Adapt( _Output_GetSegmentGlobalRotationQuaternion.
Occluded ) << std::endl;
329 std::cout <<
" Global Rotation EulerXYZ: (" << _Output_GetSegmentGlobalRotationEulerXYZ.
Rotation[ 0 ] <<
", " 330 << _Output_GetSegmentGlobalRotationEulerXYZ.
Rotation[ 1 ] <<
", " 331 << _Output_GetSegmentGlobalRotationEulerXYZ.
Rotation[ 2 ] <<
") " 332 << Adapt( _Output_GetSegmentGlobalRotationEulerXYZ.
Occluded ) << std::endl;
337 std::cout <<
" Local Translation: (" << _Output_GetSegmentLocalTranslation.
Translation[ 0 ] <<
", " 338 << _Output_GetSegmentLocalTranslation.
Translation[ 1 ] <<
", " 339 << _Output_GetSegmentLocalTranslation.
Translation[ 2 ] <<
") " 340 << Adapt( _Output_GetSegmentLocalTranslation.
Occluded ) << std::endl;
345 std::cout <<
" Local Rotation Helical: (" << _Output_GetSegmentLocalRotationHelical.
Rotation[ 0 ] <<
", " 346 << _Output_GetSegmentLocalRotationHelical.
Rotation[ 1 ] <<
", " 347 << _Output_GetSegmentLocalRotationHelical.
Rotation[ 2 ] <<
") " 348 << Adapt( _Output_GetSegmentLocalRotationHelical.
Occluded ) << std::endl;
353 std::cout <<
" Local Rotation Matrix: (" << _Output_GetSegmentLocalRotationMatrix.
Rotation[ 0 ] <<
", " 354 << _Output_GetSegmentLocalRotationMatrix.
Rotation[ 1 ] <<
", " 355 << _Output_GetSegmentLocalRotationMatrix.
Rotation[ 2 ] <<
", " 356 << _Output_GetSegmentLocalRotationMatrix.
Rotation[ 3 ] <<
", " 357 << _Output_GetSegmentLocalRotationMatrix.
Rotation[ 4 ] <<
", " 358 << _Output_GetSegmentLocalRotationMatrix.
Rotation[ 5 ] <<
", " 359 << _Output_GetSegmentLocalRotationMatrix.
Rotation[ 6 ] <<
", " 360 << _Output_GetSegmentLocalRotationMatrix.
Rotation[ 7 ] <<
", " 361 << _Output_GetSegmentLocalRotationMatrix.
Rotation[ 8 ] <<
") " 362 << Adapt( _Output_GetSegmentLocalRotationMatrix.
Occluded ) << std::endl;
367 std::cout <<
" Local Rotation Quaternion: (" << _Output_GetSegmentLocalRotationQuaternion.
Rotation[ 0 ] <<
", " 368 << _Output_GetSegmentLocalRotationQuaternion.
Rotation[ 1 ] <<
", " 369 << _Output_GetSegmentLocalRotationQuaternion.
Rotation[ 2 ] <<
", " 370 << _Output_GetSegmentLocalRotationQuaternion.
Rotation[ 3 ] <<
") " 371 << Adapt( _Output_GetSegmentLocalRotationQuaternion.
Occluded ) << std::endl;
376 std::cout <<
" Local Rotation EulerXYZ: (" << _Output_GetSegmentLocalRotationEulerXYZ.
Rotation[ 0 ] <<
", " 377 << _Output_GetSegmentLocalRotationEulerXYZ.
Rotation[ 1 ] <<
", " 378 << _Output_GetSegmentLocalRotationEulerXYZ.
Rotation[ 2 ] <<
") " 379 << Adapt( _Output_GetSegmentLocalRotationEulerXYZ.
Occluded ) << std::endl;
384 std::cout <<
" Markers (" << MarkerCount <<
"):" << std::endl;
385 for(
unsigned int MarkerIndex = 0 ; MarkerIndex < MarkerCount ; ++MarkerIndex )
397 std::cout <<
" Marker #" << MarkerIndex <<
": " 398 << MarkerName <<
" (" 399 << _Output_GetMarkerGlobalTranslation.
Translation[ 0 ] <<
", " 400 << _Output_GetMarkerGlobalTranslation.
Translation[ 1 ] <<
", " 401 << _Output_GetMarkerGlobalTranslation.
Translation[ 2 ] <<
") " 402 << Adapt( _Output_GetMarkerGlobalTranslation.
Occluded ) << std::endl;
408 std::cout <<
" Unlabeled Markers (" << UnlabeledMarkerCount <<
"):" << std::endl;
409 for(
unsigned int UnlabeledMarkerIndex = 0 ; UnlabeledMarkerIndex < UnlabeledMarkerCount ; ++UnlabeledMarkerIndex )
415 std::cout <<
" Marker #" << UnlabeledMarkerIndex <<
": (" 416 << _Output_GetUnlabeledMarkerGlobalTranslation.
Translation[ 0 ] <<
", " 417 << _Output_GetUnlabeledMarkerGlobalTranslation.
Translation[ 1 ] <<
", " 418 << _Output_GetUnlabeledMarkerGlobalTranslation.
Translation[ 2 ] <<
") " << std::endl;
423 std::cout <<
" Devices (" << DeviceCount <<
"):" << std::endl;
424 for(
unsigned int DeviceIndex = 0 ; DeviceIndex < DeviceCount ; ++DeviceIndex )
426 std::cout <<
" Device #" << DeviceIndex <<
":" << std::endl;
430 std::cout <<
" Name: " << _Output_GetDeviceName.
DeviceName << std::endl;
431 std::cout <<
" Type: " << Adapt( _Output_GetDeviceName.
DeviceType ) << std::endl;
435 std::cout <<
" Device Outputs (" << DeviceOutputCount <<
"):" << std::endl;
436 for(
unsigned int DeviceOutputIndex = 0 ; DeviceOutputIndex < DeviceOutputCount ; ++DeviceOutputIndex )
446 std::cout <<
" Device Output #" << DeviceOutputIndex <<
": " 448 << _Output_GetDeviceOutputValue.
Value <<
" " 450 << Adapt( _Output_GetDeviceOutputValue.
Occluded ) << std::endl;
455 if( TransmitMulticast )
Output_EnableUnlabeledMarkerData EnableUnlabeledMarkerData()
Output_GetSegmentChildName GetSegmentChildName(const String &SubjectName, const String &SegmentName, const unsigned int SegmentIndex) const
Output_GetSegmentStaticRotationEulerXYZ GetSegmentStaticRotationEulerXYZ(const String &SubjectName, const String &SegmentName) const
Output_GetLatencyTotal GetLatencyTotal() const
Output_GetSegmentStaticRotationHelical GetSegmentStaticRotationHelical(const String &SubjectName, const String &SegmentName) const
Output_GetDeviceCount GetDeviceCount() const
Output_GetUnlabeledMarkerCount GetUnlabeledMarkerCount() const
Output_GetAxisMapping GetAxisMapping() const
Output_GetUnlabeledMarkerGlobalTranslation GetUnlabeledMarkerGlobalTranslation(const unsigned int MarkerIndex) const
Output_GetSegmentLocalRotationEulerXYZ GetSegmentLocalRotationEulerXYZ(const String &SubjectName, const String &SegmentName) const
Output_EnableSegmentData EnableSegmentData()
unsigned int SegmentCount
Output_GetSegmentParentName GetSegmentParentName(const String &SubjectName, const String &SegmentName) const
Output_IsUnlabeledMarkerDataEnabled IsUnlabeledMarkerDataEnabled() const
Output_GetLatencySampleName GetLatencySampleName(const unsigned int LatencySampleIndex) const
Output_IsMarkerDataEnabled IsMarkerDataEnabled() const
Output_GetDeviceOutputValue GetDeviceOutputValue(const String &DeviceName, const String &DeviceOutputName) const
Output_GetDeviceOutputCount GetDeviceOutputCount(const String &DeviceName) const
Output_GetSegmentStaticTranslation GetSegmentStaticTranslation(const String &SubjectName, const String &SegmentName) const
Unit::Enum DeviceOutputUnit
Output_GetFrameNumber GetFrameNumber() const
Output_GetSegmentCount GetSegmentCount(const String &SubjectName) const
Output_StartTransmittingMulticast StartTransmittingMulticast(const String &ServerIP, const String &MulticastIP)
Output_GetSegmentStaticRotationMatrix GetSegmentStaticRotationMatrix(const String &SubjectName, const String &SegmentName) const
DeviceType::Enum DeviceType
Output_EnableDeviceData EnableDeviceData()
Output_GetSegmentGlobalRotationMatrix GetSegmentGlobalRotationMatrix(const String &SubjectName, const String &SegmentName) const
Output_GetMarkerGlobalTranslation GetMarkerGlobalTranslation(const String &SubjectName, const String &MarkerName) const
Output_GetTimecode GetTimecode() const
TimecodeStandard::Enum Standard
Output_GetDeviceOutputName GetDeviceOutputName(const String &DeviceName, const unsigned int DeviceOutputIndex) const
Output_GetLatencySampleCount GetLatencySampleCount() const
Output_GetSegmentStaticRotationQuaternion GetSegmentStaticRotationQuaternion(const String &SubjectName, const String &SegmentName) const
Output_SetAxisMapping SetAxisMapping(const Direction::Enum XAxis, const Direction::Enum YAxis, const Direction::Enum ZAxis)
Output_GetDeviceName GetDeviceName(const unsigned int DeviceIndex) const
Output_GetSubjectRootSegmentName GetSubjectRootSegmentName(const String &SubjectName) const
Output_Disconnect Disconnect()
Output_IsConnected IsConnected() const
Output_GetSegmentChildCount GetSegmentChildCount(const String &SubjectName, const String &SegmentName) const
Output_GetSegmentGlobalRotationQuaternion GetSegmentGlobalRotationQuaternion(const String &SubjectName, const String &SegmentName) const
unsigned int DeviceOutputCount
Output_GetSegmentName GetSegmentName(const String &SubjectName, const unsigned int SegmentIndex) const
Output_GetMarkerName GetMarkerName(const String &SubjectName, const unsigned int MarkerIndex) const
Output_GetSegmentGlobalRotationEulerXYZ GetSegmentGlobalRotationEulerXYZ(const String &SubjectName, const String &SegmentName) const
Output_GetSegmentGlobalTranslation GetSegmentGlobalTranslation(const String &SubjectName, const String &SegmentName) const
Output_GetVersion GetVersion() const
Output_GetSegmentLocalRotationHelical GetSegmentLocalRotationHelical(const String &SubjectName, const String &SegmentName) const
Output_GetLatencySampleValue GetLatencySampleValue(const String &LatencySampleName) const
unsigned int SubjectCount
int main(int argc, char *argv[])
Output_IsDeviceDataEnabled IsDeviceDataEnabled() const
Output_Connect Connect(const String &HostName)
Output_GetSegmentGlobalRotationHelical GetSegmentGlobalRotationHelical(const String &SubjectName, const String &SegmentName) const
Output_GetSegmentLocalRotationMatrix GetSegmentLocalRotationMatrix(const String &SubjectName, const String &SegmentName) const
Output_StopTransmittingMulticast StopTransmittingMulticast()
Output_IsSegmentDataEnabled IsSegmentDataEnabled() const
Output_SetStreamMode SetStreamMode(const StreamMode::Enum Mode)
Output_GetSubjectName GetSubjectName(const unsigned int SubjectIndex) const
unsigned int SegmentCount
Output_GetMarkerParentName GetMarkerParentName(const String &SubjectName, const String &MarkerName) const
unsigned int SubFramesPerFrame
Output_GetSegmentLocalTranslation GetSegmentLocalTranslation(const String &SubjectName, const String &SegmentName) const
Output_GetSegmentLocalRotationQuaternion GetSegmentLocalRotationQuaternion(const String &SubjectName, const String &SegmentName) const
Output_EnableMarkerData EnableMarkerData()
Output_GetFrame GetFrame()
Output_GetSubjectCount GetSubjectCount() const
Output_GetMarkerCount GetMarkerCount(const String &SubjectName) const