28 virtual void WriteDefinition(std::stringstream& stream,
bool forHash)
const override;
Field for dynamic arrays.
virtual uint32_t GetDefaultLength(const FieldStack &fieldStack) const override
Get the length of the default value.
virtual uint32_t DeserializeCount(ros::serialization::IStream &stream, const FieldStack &fieldStack) const
Deserialize the count of the array from a stream.
A Field represents an entry in a message reader that can read one of its fields.
virtual void Serialize(ros::serialization::OStream &stream, const swarmio::data::Variant &value, const FieldStack &fieldStack) const override
Serialize a variant onto a stream.
virtual swarmio::data::discovery::Field GetFieldDescriptor() const override
Build a field descriptor for the underlying type.
virtual void SerializeCount(ros::serialization::OStream &stream, uint32_t count, const FieldStack &fieldStack) const
Serialize the count of the array onto a stream.
virtual swarmio::data::Variant Deserialize(ros::serialization::IStream &stream, const FieldStack &fieldStack) const override
Deserialize a stream into a variant.
Field(const std::string &name, const Serializer &serializer)
Construct a new Field object.
virtual uint32_t CalculateSerializedLength(const swarmio::data::Variant &value, const FieldStack &fieldStack) const override
Calculate the length of a serialized message in bytes.
virtual void WriteDefinition(std::stringstream &stream, bool forHash) const override
Write the definition of this field to a string stream.
virtual void EmitDefault(ros::serialization::OStream &stream, const FieldStack &fieldStack) const override
Write the default value to the stream.