Gazebo Sim

API Reference

8.9.0
gz::sim::serializers Namespace Reference

A Serializer class is used to serialize and deserialize a component. It is passed in as the third template parameter to components::Component. Eg. More...

Classes

class  AnimationTimeSerializer
 
class  ComponentToMsgSerializer
 Serialization for that converts components data types to gz::msgs. This assumes that convert<DataType> is defined. More...
 
class  DefaultSerializer
 Default serializer template to call stream operators only on types that support them. If the stream operator is not available, a warning message is printed. More...
 
class  DefaultSerializer< components::NoData >
 Specialization of DefaultSerializer for NoData. More...
 
class  DefaultSerializer< components::RaycastDataInfo >
 Specialization of DefaultSerializer for RaycastDataInfo. More...
 
class  DefaultSerializer< sdf::World >
 Specialize the DefaultSerializer on sdf::World so we can skip serialization TODO(azeey) Do we ever want to serialize this component? More...
 
class  DetachableJointInfoSerializer
 Serializer for DetachableJointInfo object. More...
 
class  JointTypeSerializer
 
class  LevelEntityNamesSerializer
 
class  LogicalAudioSourcePlayInfoSerializer
 Serializer for components::LogicalAudioSourcePlayInfo object. More...
 
class  LogicalAudioSourceSerializer
 Serializer for components::LogicalAudioSource object. More...
 
class  LogicalMicrophoneSerializer
 Serializer for components::LogicalMicrophone object. More...
 
class  MsgSerializer
 Serializer for components that hold protobuf messages. More...
 
class  PerformerLevelsSerializer
 
class  SdfElementSerializer
 
class  SdfModelSerializer
 
class  StringSerializer
 Serializer for components that hold std::string. More...
 
class  TemperatureRangeInfoSerializer
 Serializer for components::TemperatureRangeInfo object. More...
 
class  VectorDoubleSerializer
 Serializer for components that hold std::vector<double>. More...
 
class  VectorSerializer
 

Typedefs

using ActorSerializer = serializers::ComponentToMsgSerializer< sdf::Actor, msgs::Actor >
 
using AtmosphereSerializer = serializers::ComponentToMsgSerializer< sdf::Atmosphere, msgs::Atmosphere >
 
using AxisAlignedBoxSerializer = serializers::ComponentToMsgSerializer< math::AxisAlignedBox, msgs::AxisAlignedBox >
 
using CollisionElementSerializer = serializers::ComponentToMsgSerializer< sdf::Collision, msgs::Collision >
 
using GeometrySerializer = serializers::ComponentToMsgSerializer< sdf::Geometry, msgs::Geometry >
 
using InertialSerializer = serializers::ComponentToMsgSerializer< math::Inertiald, msgs::Inertial >
 
using JointAxisSerializer = serializers::ComponentToMsgSerializer< sdf::JointAxis, msgs::Axis >
 
using LightSerializer = serializers::ComponentToMsgSerializer< sdf::Light, msgs::Light >
 
using MaterialSerializer = serializers::ComponentToMsgSerializer< sdf::Material, msgs::Material >
 
using PhysicsSerializer = serializers::ComponentToMsgSerializer< sdf::Physics, msgs::Physics >
 
using ProjectorSerializer = serializers::ComponentToMsgSerializer< sdf::Projector, msgs::Projector >
 
using SceneSerializer = serializers::ComponentToMsgSerializer< sdf::Scene, msgs::Scene >
 
using SensorSerializer = ComponentToMsgSerializer< sdf::Sensor, msgs::Sensor >
 Common serializer for sensors. More...
 
using SphericalCoordinatesSerializer = serializers::ComponentToMsgSerializer< math::SphericalCoordinates, msgs::SphericalCoordinates >
 

Functions

std::ostreamoperator<< (std::ostream &_out, const logical_audio::AttenuationFunction &_func)
 Output stream overload for logical_audio::AttenuationFunction. More...
 
std::ostreamoperator<< (std::ostream &_out, const logical_audio::AttenuationShape &_shape)
 Output stream overload for logical_audio::AttenuationShape. More...
 
std::ostreamoperator<< (std::ostream &_out, const std::chrono::steady_clock::duration &_dur)
 Output stream overload for std::chrono::steady_clock::duration. More...
 
std::istreamoperator>> (std::istream &_in, logical_audio::AttenuationFunction &_func)
 Input stream overload for logical_audio::AttenuationFunction. More...
 
std::istreamoperator>> (std::istream &_in, logical_audio::AttenuationShape &_shape)
 Input stream overload for logical_audio::AttenuationShape. More...
 
std::istreamoperator>> (std::istream &_in, std::chrono::steady_clock::duration &_dur)
 Input stream overload for std::chrono::steady_clock::duration. More...
 

Detailed Description

A Serializer class is used to serialize and deserialize a component. It is passed in as the third template parameter to components::Component. Eg.

using Geometry = components::Component<sdf::Geometry, GeometryTag,

A serializer class implements two static functions: Serialize and Deserialize with the following signatures

class ExampleSerializer
{
public: static std::ostream &Serialize(std::ostream &_out,
const DataType &_data);
public: static std::istream &Deserialize(std::istream &_in,
DataType &_data)
};

Typedef Documentation

◆ ActorSerializer

using ActorSerializer = serializers::ComponentToMsgSerializer<sdf::Actor, msgs::Actor>

◆ AtmosphereSerializer

using AtmosphereSerializer = serializers::ComponentToMsgSerializer<sdf::Atmosphere, msgs::Atmosphere>

◆ AxisAlignedBoxSerializer

◆ CollisionElementSerializer

using CollisionElementSerializer = serializers::ComponentToMsgSerializer<sdf::Collision, msgs::Collision>

◆ GeometrySerializer

using GeometrySerializer = serializers::ComponentToMsgSerializer<sdf::Geometry, msgs::Geometry>

◆ InertialSerializer

◆ JointAxisSerializer

using JointAxisSerializer = serializers::ComponentToMsgSerializer<sdf::JointAxis, msgs::Axis>

◆ LightSerializer

using LightSerializer = serializers::ComponentToMsgSerializer<sdf::Light, msgs::Light>

◆ MaterialSerializer

using MaterialSerializer = serializers::ComponentToMsgSerializer<sdf::Material, msgs::Material>

◆ PhysicsSerializer

using PhysicsSerializer = serializers::ComponentToMsgSerializer<sdf::Physics, msgs::Physics>

◆ ProjectorSerializer

using ProjectorSerializer = serializers::ComponentToMsgSerializer<sdf::Projector, msgs::Projector>

◆ SceneSerializer

using SceneSerializer = serializers::ComponentToMsgSerializer<sdf::Scene, msgs::Scene>

◆ SensorSerializer

using SensorSerializer = ComponentToMsgSerializer<sdf::Sensor, msgs::Sensor>

Common serializer for sensors.

◆ SphericalCoordinatesSerializer

Function Documentation

◆ operator<<() [1/3]

std::ostream& gz::sim::serializers::operator<< ( std::ostream _out,
const logical_audio::AttenuationFunction _func 
)
inline

Output stream overload for logical_audio::AttenuationFunction.

◆ operator<<() [2/3]

std::ostream& gz::sim::serializers::operator<< ( std::ostream _out,
const logical_audio::AttenuationShape _shape 
)
inline

Output stream overload for logical_audio::AttenuationShape.

◆ operator<<() [3/3]

std::ostream& gz::sim::serializers::operator<< ( std::ostream _out,
const std::chrono::steady_clock::duration &  _dur 
)
inline

Output stream overload for std::chrono::steady_clock::duration.

◆ operator>>() [1/3]

std::istream& gz::sim::serializers::operator>> ( std::istream _in,
logical_audio::AttenuationFunction _func 
)
inline

Input stream overload for logical_audio::AttenuationFunction.

◆ operator>>() [2/3]

std::istream& gz::sim::serializers::operator>> ( std::istream _in,
logical_audio::AttenuationShape _shape 
)
inline

Input stream overload for logical_audio::AttenuationShape.

◆ operator>>() [3/3]

std::istream& gz::sim::serializers::operator>> ( std::istream _in,
std::chrono::steady_clock::duration &  _dur 
)
inline

Input stream overload for std::chrono::steady_clock::duration.