84 template<
Field... field>
143 virtual
void result( const
CallbackData& data ) override;
144 virtual
void cleanup() override;
152 size_t m_elementSize{ 0u };
153 bool m_hasUnreadData{
false };
154 BinaryOutputBuffer m_output{};
162 ( this->
add( field ), ... );
168 struct PositionSpeedValue
172 inline PositionSpeedValue() {}
173 inline PositionSpeedValue(
const agx::Vec2& v)
178 inline PositionSpeedValue(
const PositionSpeedValue&) =
default;
179 inline PositionSpeedValue& operator=(
const PositionSpeedValue&) =
default;
188 EncoderOutputPosition();
194 EncoderOutputSpeed();
200 EncoderOutputPositionSpeed();
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Buffer used for sensor output of a wide range of output element types.
Encoder sensor output data where EncoderOutput::Field is used to define the data available.
virtual bool hasUnreadData(bool markAsRead=true) override
EncoderOutput()=default
Default constructor.
EncoderOutput & add(Field field)
Add new field.
@ POSITION_F64
1x 64-bit floating point encoder output position.
@ SPEED_F64
1x 64-bit floating point encoder output position change speed.
std::vector< Field > FieldVector
virtual size_t getElementSize() const override
"Element size" is the summed data size of the currently added fields.
static size_t sizeOf(Field field)
static const char * getFieldName(Field field)
void build()
Add one or more fields, build a matching data structure.
const FieldVector & getFields() const
size_t getOffset(Field field) const
Offset in bytes of the first entry of field in the pack of fields.
virtual const BinaryOutputBuffer & getData() override
bool contains(Field field) const
agx::Vec2 computeCovariance() const
Computes and returns the encoder signal value covariance.
Common interface for sensor output data.
System node is a separate step/operation in an execution tree representing a sensor (or such) in a se...
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
The agxSensor namespace contains components to model real-time sensors connected to the physics of AG...
Vec2T< Real > Vec2
The object holding 2 dimensional vectors and providing basic arithmetic.