9 template <
typename ControlDataStruct>
17 const ControlDataStruct& initialCommands = ControlDataStruct()) :
18 controlDataTripleBuffer{initialCommands}
24 const IceUtil::Time& timeSinceLastIteration)
override
27 rtRun(sensorValuesTimestamp, timeSinceLastIteration);
31 const ControlDataStruct&
34 return controlDataTripleBuffer.getReadBuffer();
40 return controlDataTripleBuffer.updateReadBuffer();
50 controlDataTripleBuffer.commitWrite();
56 return controlDataTripleBuffer.getWriteBuffer();
70 controlDataTripleBuffer.reinitAllBuffers(initial);
79 template <
typename ControlDataStruct>
const ControlDataStruct & rtGetControlStruct() const
void rtSwapBufferAndRun(const IceUtil::Time &sensorValuesTimestamp, const IceUtil::Time &timeSinceLastIteration) override
MutexType controlDataMutex
std::lock_guard< std::recursive_mutex > LockGuardType
void writeControlStruct()
bool rtUpdateControlStruct()
ControlDataStruct & getWriterControlStruct()
void setControlStruct(const ControlDataStruct &newStruct)
NJointControllerWithTripleBuffer(const ControlDataStruct &initialCommands=ControlDataStruct())
std::recursive_mutex MutexType
void reinitTripleBuffer(const ControlDataStruct &initial)
virtual void rtRun(const IceUtil::Time &sensorValuesTimestamp, const IceUtil::Time &timeSinceLastIteration)=0
TODO make protected and use attorneys.
Same as the TripleBuffer, but partial writes of the data structure are ok. The write operation may be...
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceInternal::Handle< NJointControllerWithTripleBuffer< ControlDataStruct > > NJointControllerWithTripleBufferPtr