DTrackSDK
v2.9.0
|
DTrack SDK main class derived from DTrackParser. More...
#include <DTrackSDK.hpp>
Public Types | |
enum | RemoteSystemType { SYS_DTRACK_UNKNOWN = 0, SYS_DTRACK, SYS_DTRACK_2 } |
Compatibility modes for older DTrack systems. More... | |
enum | Errors { ERR_NONE = 0, ERR_TIMEOUT, ERR_NET, ERR_PARSE } |
Error codes. More... | |
Public Member Functions | |
DTrackSDK (const std::string &connection) | |
Universal constructor. Can be used for any mode. Recommended for new applications. More... | |
DTrackSDK (unsigned short data_port) | |
Constructor. Use for pure listening mode. More... | |
DTrackSDK (const std::string &server_host, unsigned short data_port) | |
Constructor. Use for communicating mode with DTrack2/DTRACK3. More... | |
DTrackSDK (const std::string &server_host, unsigned short server_port, unsigned short data_port) | |
Constructor. Use for communicating mode with DTrack1. More... | |
DTrackSDK (const std::string &server_host, unsigned short server_port, unsigned short data_port, RemoteSystemType remote_type, int data_bufsize=0, int data_timeout_us=0, int srv_timeout_us=0) | |
General constructor. DEPRECATED. More... | |
~DTrackSDK () | |
Destructor. | |
bool | isValid () |
Returns if constructor was successful due to the wanted mode. More... | |
bool | isDataInterfaceValid () const |
Returns if UDP socket is open to receive tracking data on local machine. More... | |
bool | isUDPValid () const |
Alias for isDataInterfaceValid(). DEPRECATED. More... | |
bool | isLocalDataPortValid () const |
Alias for isDataInterfaceValid(). DEPRECATED. More... | |
unsigned short | getDataPort () const |
Get UDP data port where tracking data is received. More... | |
bool | isCommandInterfaceValid () const |
Returns if TCP connection for DTrack2/DTRACK3 commands is active. More... | |
bool | isTCPValid () const |
Alias for isCommandInterfaceValid(). DEPRECATED. More... | |
bool | isCommandInterfaceFullAccess () |
Returns if TCP connection has full access for DTrack2/DTRACK3 commands. More... | |
RemoteSystemType | getRemoteSystemType () const |
Get current remote system type (e.g. DTrack1, DTrack2/DTRACK3). More... | |
bool | setDataTimeoutUS (int timeout) |
Set UDP timeout for receiving tracking data. More... | |
bool | setCommandTimeoutUS (int timeout) |
Set TCP timeout for exchanging commands with Controller. More... | |
bool | setControllerTimeoutUS (int timeout) |
Alias for setCommandTimeoutUS(). DEPRECATED. More... | |
bool | setDataBufferSize (int bufSize) |
Set UDP buffer size for receiving tracking data. More... | |
bool | enableStatefulFirewallConnection (const std::string &senderHost, unsigned short senderPort=DTRACK2_PORT_UDPSENDER) |
Enable UDP connection through a stateful firewall. More... | |
bool | receive () |
Receive and process one tracking data packet. More... | |
bool | processPacket (const std::string &data) |
Process one tracking packet manually. More... | |
std::string | getBuf () const |
Get content of the UDP buffer. More... | |
Errors | getLastDataError () const |
Get last error at receiving tracking data (data transmission). More... | |
Errors | getLastServerError () const |
Get last error at exchanging commands with Controller (command transmission). More... | |
int | getLastDTrackError () const |
Get last DTrack2/DTRACK3 command error code. More... | |
std::string | getLastDTrackErrorDescription () const |
Get last DTrack2/DTRACK3 command error description. More... | |
bool | startMeasurement () |
Start measurement. More... | |
bool | stopMeasurement () |
Stop measurement. More... | |
bool | sendDTrack1Command (const std::string &command) |
Send DTrack1 command via UDP. More... | |
bool | sendCommand (const std::string &command) |
Alias for sendDTrack1Command(). DEPRECATED. More... | |
int | sendDTrack2Command (const std::string &command, std::string *answer=NULL) |
Send DTrack2/DTRACK3 command to DTrack and receive answer (TCP command interface). More... | |
bool | setParam (const std::string &category, const std::string &name, const std::string &value) |
Set DTrack2/DTRACK3 parameter. More... | |
bool | setParam (const std::string ¶meter) |
Set DTrack2/DTRACK3 parameter using a string containing parameter category, name and new value. More... | |
bool | getParam (const std::string &category, const std::string &name, std::string &value) |
Get DTrack2/DTRACK3 parameter. More... | |
bool | getParam (const std::string ¶meter, std::string &value) |
Get DTrack2/DTRACK3 parameter using a string containing parameter category and name. More... | |
bool | getMessage () |
Get DTrack2/DTRACK3 event message from the Controller. More... | |
unsigned int | getMessageFrameNr () const |
Get frame counter of last DTrack2/DTRACK3 event message. More... | |
unsigned int | getMessageErrorId () const |
Get error id of last DTrack2/DTRACK3 event message. More... | |
std::string | getMessageOrigin () const |
Get origin of last DTrack2/DTRACK3 event message. More... | |
std::string | getMessageStatus () const |
Get status of last DTrack2/DTRACK3 event message. More... | |
std::string | getMessageMsg () const |
Get message text of last DTrack2/DTRACK3 event message. More... | |
bool | tactileFinger (int handId, int fingerId, double strength) |
Send tactile FINGERTRACKING command to set feedback on a specific finger of a specific hand. More... | |
bool | tactileHand (int handId, const std::vector< double > &strength) |
Send tactile FINGERTRACKING command to set tactile feedback on all fingers of a specific hand. More... | |
bool | tactileHandOff (int handId, int numFinger) |
Send tactile FINGERTRACKING command to turn off tactile feedback on all fingers of a specific hand. More... | |
bool | flystickBeep (int flystickId, double durationMs, double frequencyHz) |
Send Flystick feedback command to start a beep on a specific Flystick. More... | |
bool | flystickVibration (int flystickId, int vibrationPattern) |
Send Flystick feedback command to start a vibration pattern on a specific Flystick. More... | |
![]() | |
unsigned int | getFrameCounter () const |
Get frame counter. More... | |
double | getTimeStamp () const |
Get timestamp since midnight. More... | |
unsigned int | getTimeStampSec () const |
Get timestamp since Unix epoch (1970-01-01 00:00:00), seconds. More... | |
unsigned int | getTimeStampUsec () const |
Get timestamp since Unix epoch (1970-01-01 00:00:00), microseconds. More... | |
unsigned int | getLatencyUsec () const |
Get latency (delay between exposure and sending UDP data in Controller). More... | |
int | getNumBody () const |
Get number of calibrated standard bodies (as far as known). More... | |
const DTrackBody * | getBody (int id) const |
Get standard body data. More... | |
int | getNumFlyStick () const |
Get number of calibrated Flysticks. More... | |
const DTrackFlyStick * | getFlyStick (int id) const |
Get Flystick data. More... | |
int | getNumMeaTool () const |
Get number of calibrated Measurement Tools. More... | |
const DTrackMeaTool * | getMeaTool (int id) const |
Get Measurement Tool data. More... | |
int | getNumMeaRef () const |
Get number of calibrated Measurement Tool references. More... | |
const DTrackMeaRef * | getMeaRef (int id) const |
Get Measurement Tool reference data. More... | |
int | getNumHand () const |
Get number of calibrated A.R.T. FINGERTRACKING hands (as far as known). More... | |
const DTrackHand * | getHand (int id) const |
Get A.R.T. FINGERTRACKING hand data. More... | |
int | getNumHuman () const |
Get number of calibrated ART-Human models. More... | |
const DTrackHuman * | getHuman (int id) const |
Get ART-Human model data. More... | |
int | getNumInertial () const |
Get number of calibrated hybrid (optical-inertial) bodies. More... | |
const DTrackInertial * | getInertial (int id) const |
Get hybrid (optical-inertial) data. More... | |
int | getNumMarker () const |
Get number of tracked single markers. More... | |
const DTrackMarker * | getMarker (int index) const |
Get single marker data. More... | |
bool | isStatusAvailable () const |
Returns if system status data is available. More... | |
const DTrackStatus * | getStatus () const |
Get system status data. More... | |
Static Public Attributes | |
static const int | DTRACK2_PROT_MAXLEN = 200 |
max. length of 'dtrack2' command | |
Additional Inherited Members | |
![]() | |
DTrackParser () | |
Constructor. | |
virtual | ~DTrackParser () |
Destructor. | |
void | startFrame () |
Set default values at start of a new frame. | |
void | endFrame () |
Final adjustments after processing all data for a frame. | |
bool | parseLine (char **line) |
Parses a single line of data in one tracking data packet. More... | |
DTrack SDK main class derived from DTrackParser.
All methods to access tracking data are located in DTrackParser.
Definition at line 77 of file DTrackSDK.hpp.
enum DTrackSDK::Errors |
Error codes.
Enumerator | |
---|---|
ERR_NONE | No error. |
ERR_TIMEOUT | Timeout occured. |
ERR_NET | Network error. |
ERR_PARSE | Error while parsing command. |
Definition at line 91 of file DTrackSDK.hpp.
Compatibility modes for older DTrack systems.
Enumerator | |
---|---|
SYS_DTRACK_UNKNOWN | Unknown system. |
SYS_DTRACK | DTrack1 system. |
SYS_DTRACK_2 | DTrack2/DTRACK3 system. |
Definition at line 84 of file DTrackSDK.hpp.
DTrackSDK::DTrackSDK | ( | const std::string & | connection | ) |
Universal constructor. Can be used for any mode. Recommended for new applications.
Refer to other constructors for details. Communicating mode just for DTrack2/DTRACK3.
Examples for connection string:
[in] | connection | Connection string ("<data port>" or "<ip/host>:<data port>" or "<ip/host>:<data port>:fw") |
Definition at line 60 of file DTrackSDK.cpp.
DTrackSDK::DTrackSDK | ( | unsigned short | data_port | ) |
Constructor. Use for pure listening mode.
Using this constructor, only a UDP receiver to get tracking data from the Controller will be established. Please start measurement manually.
[in] | data_port | Port number (UDP) to receive tracking data from DTrack (0 if to be chosen by SDK) |
Definition at line 136 of file DTrackSDK.cpp.
References SYS_DTRACK_UNKNOWN.
DTrackSDK::DTrackSDK | ( | const std::string & | server_host, |
unsigned short | data_port | ||
) |
Constructor. Use for communicating mode with DTrack2/DTRACK3.
Using this constructor, a UDP receiver to get tracking data from the Controller as well as a TCP connection with the Controller will be established. Automatically starts and stops measurement.
Can also be used for multicast listening mode. In this case only a UDP receiver to get tracking data from the Controller will be established. Please start measurement manually.
[in] | server_host | Hostname or IP address of Controller, or multicast IP address |
[in] | data_port | Port number (UDP) to receive tracking data from DTrack (0 if to be chosen by SDK) |
Definition at line 146 of file DTrackSDK.cpp.
References SYS_DTRACK_2.
DTrackSDK::DTrackSDK | ( | const std::string & | server_host, |
unsigned short | server_port, | ||
unsigned short | data_port | ||
) |
Constructor. Use for communicating mode with DTrack1.
[in] | server_host | Hostname or IP address of DTrack1 PC |
[in] | server_port | Port number (UDP) of DTrack1 PC to send commands to |
[in] | data_port | Port number (UDP) to receive tracking data from DTrack1 (0 if to be chosen by SDK) |
Definition at line 156 of file DTrackSDK.cpp.
References SYS_DTRACK, and SYS_DTRACK_UNKNOWN.
DTrackSDK::DTrackSDK | ( | const std::string & | server_host, |
unsigned short | server_port, | ||
unsigned short | data_port, | ||
RemoteSystemType | remote_type, | ||
int | data_bufsize = 0 , |
||
int | data_timeout_us = 0 , |
||
int | srv_timeout_us = 0 |
||
) |
General constructor. DEPRECATED.
[in] | server_host | Hostname/IP of Controller/DTrack1 PC, or multicast IP (empty string if not used) |
[in] | server_port | Port number (UDP) of DTrack1 PC to send commands to (0 if not used) |
[in] | data_port | Port number (UDP) to receive tracking data from DTrack (0 if to be chosen) |
[in] | remote_type | Type of system to connect to |
[in] | data_bufsize | Buffer size for receiving tracking data in bytes; 0 to set default (32768) |
[in] | data_timeout_us | Timeout for receiving tracking data in us; 0 to set default (1.0 s) |
[in] | srv_timeout_us | Timeout for reply of Controller in us; 0 to set default (10.0 s) |
Definition at line 173 of file DTrackSDK.cpp.
References setCommandTimeoutUS(), setDataBufferSize(), and setDataTimeoutUS().
bool DTrackSDK::enableStatefulFirewallConnection | ( | const std::string & | senderHost, |
unsigned short | senderPort = DTRACK2_PORT_UDPSENDER |
||
) |
Enable UDP connection through a stateful firewall.
In order to enable UDP traffic through a stateful firewall. Just necessary for listening modes, will be done automatically for communicating mode. Default port is working just for DTrack3 v3.1.1 or newer.
[in] | senderHost | Hostname or IP address of Controller |
[in] | senderPort | Port number from which Controller is sending tracking data |
Definition at line 425 of file DTrackSDK.cpp.
bool DTrackSDK::flystickBeep | ( | int | flystickId, |
double | durationMs, | ||
double | frequencyHz | ||
) |
Send Flystick feedback command to start a beep on a specific Flystick.
Sends command to the sender IP address of the latest received UDP data, if no hostname or IP address of a Controller is defined.
[in] | flystickId | Flystick id, range 0 .. |
[in] | durationMs | Time duration of the beep (in milliseconds) |
[in] | frequencyHz | Frequency of the beep (in Hertz) |
Definition at line 1025 of file DTrackSDK.cpp.
bool DTrackSDK::flystickVibration | ( | int | flystickId, |
int | vibrationPattern | ||
) |
Send Flystick feedback command to start a vibration pattern on a specific Flystick.
Sends command to the sender IP address of the latest received UDP data, if no hostname or IP address of a Controller is defined.
[in] | flystickId | Flystick id, range 0 .. |
[in] | vibrationPattern | Vibration pattern id, range 1 .. |
Definition at line 1040 of file DTrackSDK.cpp.
std::string DTrackSDK::getBuf | ( | ) | const |
Get content of the UDP buffer.
Definition at line 537 of file DTrackSDK.cpp.
unsigned short DTrackSDK::getDataPort | ( | ) | const |
Get UDP data port where tracking data is received.
Definition at line 321 of file DTrackSDK.cpp.
References DTrackNet::UDP::getPort().
DTrackSDK::Errors DTrackSDK::getLastDataError | ( | ) | const |
Get last error at receiving tracking data (data transmission).
Definition at line 549 of file DTrackSDK.cpp.
int DTrackSDK::getLastDTrackError | ( | ) | const |
Get last DTrack2/DTRACK3 command error code.
Definition at line 567 of file DTrackSDK.cpp.
std::string DTrackSDK::getLastDTrackErrorDescription | ( | ) | const |
Get last DTrack2/DTRACK3 command error description.
Definition at line 576 of file DTrackSDK.cpp.
DTrackSDK::Errors DTrackSDK::getLastServerError | ( | ) | const |
Get last error at exchanging commands with Controller (command transmission).
Definition at line 558 of file DTrackSDK.cpp.
bool DTrackSDK::getMessage | ( | ) |
Get DTrack2/DTRACK3 event message from the Controller.
Updates internal message structures. Use the appropriate methods to get the contents of the message.
Definition at line 864 of file DTrackSDK.cpp.
References sendDTrack2Command(), and SYS_DTRACK_2.
unsigned int DTrackSDK::getMessageErrorId | ( | ) | const |
Get error id of last DTrack2/DTRACK3 event message.
Definition at line 931 of file DTrackSDK.cpp.
unsigned int DTrackSDK::getMessageFrameNr | ( | ) | const |
Get frame counter of last DTrack2/DTRACK3 event message.
Definition at line 922 of file DTrackSDK.cpp.
std::string DTrackSDK::getMessageMsg | ( | ) | const |
Get message text of last DTrack2/DTRACK3 event message.
Definition at line 958 of file DTrackSDK.cpp.
std::string DTrackSDK::getMessageOrigin | ( | ) | const |
Get origin of last DTrack2/DTRACK3 event message.
Definition at line 940 of file DTrackSDK.cpp.
std::string DTrackSDK::getMessageStatus | ( | ) | const |
Get status of last DTrack2/DTRACK3 event message.
Definition at line 949 of file DTrackSDK.cpp.
bool DTrackSDK::getParam | ( | const std::string & | category, |
const std::string & | name, | ||
std::string & | value | ||
) |
Get DTrack2/DTRACK3 parameter.
[in] | category | Parameter category |
[in] | name | Parameter name |
[out] | value | Parameter value |
Definition at line 826 of file DTrackSDK.cpp.
Referenced by isCommandInterfaceFullAccess().
bool DTrackSDK::getParam | ( | const std::string & | parameter, |
std::string & | value | ||
) |
Get DTrack2/DTRACK3 parameter using a string containing parameter category and name.
[in] | parameter | Complete parameter string without starting "dtrack get " |
[out] | value | Parameter value |
Definition at line 835 of file DTrackSDK.cpp.
References ERR_PARSE, and sendDTrack2Command().
DTrackSDK::RemoteSystemType DTrackSDK::getRemoteSystemType | ( | ) | const |
Get current remote system type (e.g. DTrack1, DTrack2/DTRACK3).
Definition at line 356 of file DTrackSDK.cpp.
bool DTrackSDK::isCommandInterfaceFullAccess | ( | ) |
Returns if TCP connection has full access for DTrack2/DTRACK3 commands.
Definition at line 341 of file DTrackSDK.cpp.
References getParam(), and isCommandInterfaceValid().
Referenced by isValid().
bool DTrackSDK::isCommandInterfaceValid | ( | ) | const |
Returns if TCP connection for DTrack2/DTRACK3 commands is active.
Definition at line 330 of file DTrackSDK.cpp.
References DTrackNet::TCP::isValid().
Referenced by isCommandInterfaceFullAccess(), isTCPValid(), and sendDTrack2Command().
bool DTrackSDK::isDataInterfaceValid | ( | ) | const |
Returns if UDP socket is open to receive tracking data on local machine.
Needed to receive DTrack UDP data, but does not guarantee this. Especially in case no data is sent to this port.
Definition at line 310 of file DTrackSDK.cpp.
References DTrackNet::UDP::isValid().
Referenced by isLocalDataPortValid(), isUDPValid(), isValid(), receive(), and sendDTrack1Command().
|
inline |
Alias for isDataInterfaceValid(). DEPRECATED.
Due to compatibility to DTrackSDK v2.0.0 - v2.5.0.
Definition at line 214 of file DTrackSDK.hpp.
References isDataInterfaceValid().
|
inline |
Alias for isCommandInterfaceValid(). DEPRECATED.
Due to compatibility to DTrackSDK v2.0.0.
Definition at line 237 of file DTrackSDK.hpp.
References isCommandInterfaceValid().
|
inline |
Alias for isDataInterfaceValid(). DEPRECATED.
Due to compatibility to DTrackSDK v2.0.0.
Definition at line 205 of file DTrackSDK.hpp.
References isDataInterfaceValid().
bool DTrackSDK::isValid | ( | ) |
Returns if constructor was successful due to the wanted mode.
Convenience routine, checks:
To get more information about a failure call above routines separately.
Definition at line 294 of file DTrackSDK.cpp.
References isCommandInterfaceFullAccess(), isDataInterfaceValid(), and SYS_DTRACK_2.
bool DTrackSDK::processPacket | ( | const std::string & | data | ) |
Process one tracking packet manually.
This requires no connection to a Controller. Updates internal data structures.
[in] | data | Data packet to be processed |
Definition at line 493 of file DTrackSDK.cpp.
References DTrackParser::endFrame(), ERR_NONE, ERR_PARSE, DTrackParser::parseLine(), and DTrackParser::startFrame().
bool DTrackSDK::receive | ( | ) |
Receive and process one tracking data packet.
This method waits until a data packet becomes available, but no longer than the timeout. Updates internal data structures.
Definition at line 441 of file DTrackSDK.cpp.
References DTrackParser::endFrame(), ERR_NET, ERR_NONE, ERR_PARSE, ERR_TIMEOUT, isDataInterfaceValid(), DTrackParser::parseLine(), DTrackNet::UDP::receive(), and DTrackParser::startFrame().
|
inline |
Alias for sendDTrack1Command(). DEPRECATED.
Due to compatibility to DTrackSDK v2.0.0 - v2.6.0.
[in] | command | Command string |
Definition at line 392 of file DTrackSDK.hpp.
References sendDTrack1Command().
bool DTrackSDK::sendDTrack1Command | ( | const std::string & | command | ) |
Send DTrack1 command via UDP.
Answer is not received and therefore not processed.
[in] | command | Command string |
Definition at line 633 of file DTrackSDK.cpp.
References ERR_NET, ERR_NONE, isDataInterfaceValid(), DTrackNet::UDP::send(), startMeasurement(), stopMeasurement(), and SYS_DTRACK_2.
Referenced by sendCommand(), startMeasurement(), and stopMeasurement().
int DTrackSDK::sendDTrack2Command | ( | const std::string & | command, |
std::string * | answer = NULL |
||
) |
Send DTrack2/DTRACK3 command to DTrack and receive answer (TCP command interface).
Answers like "dtrack2 ok" and "dtrack2 err .." are processed. Both cases are reflected in the return value. getLastDTrackError() and getLastDTrackErrorDescription() will return more information.
[in] | command | DTrack2 command string |
[out] | answer | Buffer for answer; NULL if specific answer is not needed |
Definition at line 685 of file DTrackSDK.cpp.
References DTRACK2_PROT_MAXLEN, ERR_NET, ERR_NONE, ERR_PARSE, ERR_TIMEOUT, isCommandInterfaceValid(), DTrackNet::TCP::receive(), DTrackNet::TCP::send(), and SYS_DTRACK_2.
Referenced by getMessage(), getParam(), setParam(), startMeasurement(), and stopMeasurement().
bool DTrackSDK::setCommandTimeoutUS | ( | int | timeout | ) |
Set TCP timeout for exchanging commands with Controller.
[in] | timeout | Timeout for reply of Controller in us; 0 to set default (10.0 s) |
Definition at line 382 of file DTrackSDK.cpp.
Referenced by DTrackSDK(), and setControllerTimeoutUS().
|
inline |
Alias for setCommandTimeoutUS(). DEPRECATED.
Due to compatibility to DTrackSDK v2.0.0 - v2.5.0.
[in] | timeout | Timeout for reply of Controller in us; 0 to set default (10.0 s) |
Definition at line 277 of file DTrackSDK.hpp.
References setCommandTimeoutUS().
bool DTrackSDK::setDataBufferSize | ( | int | bufSize | ) |
Set UDP buffer size for receiving tracking data.
[in] | bufSize | Buffer size for receiving tracking data in bytes; 0 to set default (32768) |
Definition at line 399 of file DTrackSDK.cpp.
Referenced by DTrackSDK().
bool DTrackSDK::setDataTimeoutUS | ( | int | timeout | ) |
Set UDP timeout for receiving tracking data.
[in] | timeout | Timeout for receiving tracking data in us; 0 to set default (1.0 s) |
Definition at line 365 of file DTrackSDK.cpp.
Referenced by DTrackSDK().
bool DTrackSDK::setParam | ( | const std::string & | category, |
const std::string & | name, | ||
const std::string & | value | ||
) |
Set DTrack2/DTRACK3 parameter.
[in] | category | Parameter category |
[in] | name | Parameter name |
[in] | value | Parameter value |
Definition at line 807 of file DTrackSDK.cpp.
bool DTrackSDK::setParam | ( | const std::string & | parameter | ) |
Set DTrack2/DTRACK3 parameter using a string containing parameter category, name and new value.
[in] | parameter | Complete parameter string without starting "dtrack set " |
Definition at line 816 of file DTrackSDK.cpp.
References sendDTrack2Command().
bool DTrackSDK::startMeasurement | ( | ) |
Start measurement.
Ensure via DTrack frontend that tracking data is sent to correct UDP data port.
Definition at line 595 of file DTrackSDK.cpp.
References sendDTrack1Command(), sendDTrack2Command(), and SYS_DTRACK.
Referenced by sendDTrack1Command().
bool DTrackSDK::stopMeasurement | ( | ) |
Stop measurement.
Definition at line 615 of file DTrackSDK.cpp.
References sendDTrack1Command(), sendDTrack2Command(), and SYS_DTRACK.
Referenced by sendDTrack1Command().
bool DTrackSDK::tactileFinger | ( | int | handId, |
int | fingerId, | ||
double | strength | ||
) |
Send tactile FINGERTRACKING command to set feedback on a specific finger of a specific hand.
Has to be repeated at least every second; otherwise a timeout mechanism will turn off any feedback.
Sends command to the sender IP address of the latest received UDP data, if no hostname or IP address of a Controller is defined.
[in] | handId | Hand id, range 0 .. |
[in] | fingerId | Finger id, range 0 .. |
[in] | strength | Strength of feedback, between 0.0 and 1.0 |
Definition at line 967 of file DTrackSDK.cpp.
References ERR_NET.
bool DTrackSDK::tactileHand | ( | int | handId, |
const std::vector< double > & | strength | ||
) |
Send tactile FINGERTRACKING command to set tactile feedback on all fingers of a specific hand.
Has to be repeated at least every second; otherwise a timeout mechanism will turn off any feedback.
Sends command to the sender IP address of the latest received UDP data, if no hostname or IP address of a Controller is defined.
[in] | handId | Hand id, range 0 .. |
[in] | strength | Strength of feedback on all fingers, between 0.0 and 1.0 |
Definition at line 987 of file DTrackSDK.cpp.
References ERR_NET.
Referenced by tactileHandOff().
bool DTrackSDK::tactileHandOff | ( | int | handId, |
int | numFinger | ||
) |
Send tactile FINGERTRACKING command to turn off tactile feedback on all fingers of a specific hand.
Sends command to the sender IP address of the latest received UDP data, if no hostname or IP address of a Controller is defined.
[in] | handId | Hand id, range 0 .. |
[in] | numFinger | Number of fingers |
Definition at line 1012 of file DTrackSDK.cpp.
References tactileHand().