Go to the documentation of this file.
29 #include <RobotAPI/interface/units/ATINetFTUnit.h>
30 #include <RobotAPI/interface/units/UnitInterface.h>
31 #include <netinet/in.h>
47 defineOptionalProperty<std::string>(
50 "ATINetFT host name and port, usually i61ATINetFT1:801 or i61ATINetFT2:801");
51 defineOptionalProperty<std::string>(
54 "Path name to motion database on receiving ATINetFT host");
55 defineOptionalProperty<std::string>(
58 "Custom name of first trial in motion recording session");
59 defineOptionalProperty<std::string>(
60 "ATINetFTReceiveHostName",
62 "ATINetFT host name and port, usually i61ATINetFT1:801 or i61ATINetFT2:801");
63 defineOptionalProperty<float>(
66 "Offset along x axis from VirtualRobot origin to ATINetFT reference marker");
67 defineOptionalProperty<float>(
70 "Offset along y axis from VirtualRobot origin to ATINetFT reference marker");
71 defineOptionalProperty<float>(
74 "Offset along z axis from VirtualRobot origin to ATINetFT reference marker");
88 virtual public ATINetFTUnitInterface
96 return "ATINetFTUnit";
99 void startRecording(
const std::string& customName,
const Ice::Current&
c)
override;
106 return remoteTriggerEnabled;
114 void init(
const Ice::Current&
c)
override { }
116 void start(
const Ice::Current&
c)
override { }
118 void stop(
const Ice::Current&
c)
override { }
122 return armarx::eUndefinedUnitExecutionState;
158 void establishATINetFTReceiveHostConnection(std::string receiverHostName);
159 bool sendPacket(
char* bytePacket,
int bpSize);
160 bool receivePacket(
char* bytePacket);
161 void convertToFTValues(
char* receiveBuf,
float* ftdata,
int ftdataSize);
162 void writeFTValuesToFile(
float* ftdata,
int ftdataSize);
164 std::ofstream recordingFile;
166 bool remoteTriggerEnabled;
167 bool recordingStarted;
168 bool recordingStopped;
169 bool recordingCompleted;
174 int receivePacketSize;
180 std::string captureNamePrefix;
181 std::string databasePathName;
182 struct sockaddr_in receiveHostAddr;
183 struct sockaddr_in senderHostAddr;
void startRecording(const std::string &customName, const Ice::Current &c) override
void start(const Ice::Current &c) override
void release(const Ice::Current &c) override
PropertyDefinitionsPtr createPropertyDefinitions() override
void onInitComponent() override
void onDisconnectComponent() override
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
void onExitComponent() override
armarx::UnitExecutionState getExecutionState(const Ice::Current &c) override
ArmarX wrapper of the ATINetFT DataStream SDK.
bool isComponentOnline(const Ice::Current &c) override
void onConnectComponent() override
Baseclass for all ArmarX ManagedIceObjects requiring properties.
void stopRecording(const Ice::Current &c) override
ATINetFTUnitPropertyDefinitions(std::string prefix)
std::string getDefaultName() const override
Default component property definition container.
void init(const Ice::Current &c) override
void stop(const Ice::Current &c) override
void request(const Ice::Current &c) override
This file offers overloads of toIce() and fromIce() functions for STL container types.