30#include <netinet/in.h>
34#include <RobotAPI/interface/units/ATINetFTUnit.h>
35#include <RobotAPI/interface/units/UnitInterface.h>
51 "ATINetFT host name and port, usually i61ATINetFT1:801 or i61ATINetFT2:801");
53 "DatabasePathName",
"",
"Path name to motion database on receiving ATINetFT host");
55 "CaptureName",
"Trial01",
"Custom name of first trial in motion recording session");
57 "ATINetFTReceiveHostName",
59 "ATINetFT host name and port, usually i61ATINetFT1:801 or i61ATINetFT2:801");
63 "Offset along x axis from VirtualRobot origin to ATINetFT reference marker");
67 "Offset along y axis from VirtualRobot origin to ATINetFT reference marker");
71 "Offset along z axis from VirtualRobot origin to ATINetFT reference marker");
92 return "ATINetFTUnit";
95 void startRecording(
const std::string& customName,
const Ice::Current&
c)
override;
103 return remoteTriggerEnabled;
114 init(
const Ice::Current&
c)
override
124 stop(
const Ice::Current&
c)
override
128 armarx::UnitExecutionState
131 return armarx::eUndefinedUnitExecutionState;
168 void establishATINetFTReceiveHostConnection(std::string receiverHostName);
169 bool sendPacket(
char* bytePacket,
int bpSize);
170 bool receivePacket(
char* bytePacket);
171 void convertToFTValues(
char* receiveBuf,
float* ftdata,
int ftdataSize);
172 void writeFTValuesToFile(
float* ftdata,
int ftdataSize);
174 std::ofstream recordingFile;
176 bool remoteTriggerEnabled;
177 bool recordingStarted;
178 bool recordingStopped;
179 bool recordingCompleted;
184 int receivePacketSize;
190 std::string captureNamePrefix;
191 std::string databasePathName;
192 struct sockaddr_in receiveHostAddr;
193 struct sockaddr_in senderHostAddr;
ATINetFTUnitPropertyDefinitions(std::string prefix)
ArmarX wrapper of the ATINetFT DataStream SDK.
void onInitComponent() override
void onDisconnectComponent() override
void stop(const Ice::Current &c) override
void request(const Ice::Current &c) override
void release(const Ice::Current &c) override
armarx::UnitExecutionState getExecutionState(const Ice::Current &c) override
void start(const Ice::Current &c) override
void stopRecording(const Ice::Current &c) override
bool isComponentOnline(const Ice::Current &c) override
void onConnectComponent() override
PropertyDefinitionsPtr createPropertyDefinitions() override
void startRecording(const std::string &customName, const Ice::Current &c) override
void init(const Ice::Current &c) override
void onExitComponent() override
std::string getDefaultName() const override
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Baseclass for all ArmarX ManagedIceObjects requiring properties.
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.