Implementation of a PT buffer (linear interpolation).
#include <InterpolatedPositionBuffer.hpp>
|
std::uint16_t | getBufferSize () const override |
| Get PT/PVT buffer size.
|
|
std::int16_t | getSubMode () const override |
| Generate interpolation submode register value (object 60C0h).
|
|
| InterpolatedPositionBuffer (double samplingPeriod, double interpolationPeriod) |
| Constructor, sets internal invariable parameters.
|
|
| InterpolatedPositionBuffer (double samplingPeriod, double interpolationPeriod) |
| Constructor, sets internal invariable parameters.
|
|
virtual | ~InterpolatedPositionBuffer ()=default |
| Virtual destructor.
|
|
void | setInitial (int initialTarget) |
| Store initial position (internal units).
|
|
int | getPeriodMs () const |
| Get PT/PVT period if fixed (synchronous), zero otherwise (asynchronous).
|
|
std::uint16_t | getBufferConfig () const |
| Get buffer configuration (object 2074h).
|
|
void | addSetpoint (int target) |
| Place a new setpoint (internal units) at the end of the queue.
|
|
std::vector< std::uint64_t > | popBatch (bool fullBuffer) |
| Generate next batch of setpoints popped from the front of the queue.
|
|
int | getPrevTarget () const |
| Retrieve last point loaded into the buffer (internal units).
|
|
bool | isQueueReady () const |
| Report whether there are enough points in the queue to fill the buffer.
|
|
bool | isQueueEmpty () const |
| Report whether there are no more points in the queue.
|
|
void | clearQueue () |
| Clear internal queue.
|
|
|
std::uint64_t | makeDataRecord (const ip_record &previous, const ip_record ¤t, const ip_record &next) override |
| Generate interpolation data record given three contiguous position target (object 60C1h).
|
|
std::uint8_t | getIntegrityCounter () const |
| Retrieve current integrity counter value.
|
|
virtual std::size_t | getOffset () const |
| Determine how many points should be left in the queue on each non-final batch update.
|
|
std::uint16_t | getSampledTime (double currentTimestamp) |
| Obtain time samples (internal units) for current segment, update internal counters.
|
|
double | getMeanVelocity (const ip_record &earliest, const ip_record &latest) const |
| Compute mean velocity (internal units) between two setpoints.
|
|
|
using | ip_record = std::pair< int, double > |
|
const double | samplingPeriod |
|
The documentation for this class was generated from the following files:
- libraries/YarpPlugins/TechnosoftIpos/embedded-pid/InterpolatedPositionBuffer.hpp
- libraries/YarpPlugins/TechnosoftIpos/embedded-pid/InterpolatedPositionBuffer.cpp