esp::metadata::attributes::AbstractSensorAttributes class

Attributes object holding the descriptions of a Sensor object.

Base classes

class AbstractAttributes
Base class for all implemented attributes. Inherits from esp::core::managedContainers::AbstractFileBasedManagedObject so the attributes can be managed by a esp::core::managedContainers::ManagedContainer.

Derived classes

class AbstractVisualSensorAttributes
Class to suppoort creating visual sensors by providing common attributes.
class AudioSensorAttributes
Class to support creating audio sensors.
class CustomSensorAttributes
Class to support creating custom sensors via python that will be managed in Sim.

Constructors, destructors, conversion operators

AbstractSensorAttributes(const std::string& classKey, const std::string& handle)

Public functions

void populateWithSensorSpec(const sensor::SensorSpec::ptr& spec) virtual
Populate this attributes from an appropriate sensor::SensorSpec.
void setPosition(const Magnum::Vector3& position)
Set the position of the sensor.
auto getPosition() const -> Magnum::Vector3
Get the position of the sensor.
void setOrientation(const Magnum::Vector3& orientation)
Set the position of the sensor.
auto getOrientation() const -> Magnum::Vector3
Get the position of the sensor.
void setNoiseModel(const std::string& noise_model)
Sets the noise model to use for this sensor.
auto getNoiseModel() const -> std::string
Gets the noise model to use for this sensor.
void setSensorType(const std::string& sensorType)
Set the sensor type for this sensor.
void setSensorTypeEnum(sensor::SensorType sensorTypeEnum)
Set the sensor type for this sensor as specified by given SensorType.
auto getSensorType() const -> sensor::SensorType
Get the sensor type for this sensor.
void setSensorSubType(const std::string& sensorSubType)
Set the sensor type for this sensor.
void setSensorSubTypeEnum(sensor::SensorSubType sensorSubTypeEnum)
Set the sensor subtype for this sensor as specified by given SensorSubType.
auto getSensorSubType() const -> sensor::SensorSubType
Get the sensor subtype for this sensor.
void writeValuesToJson(io::JsonGenericValue& jsonObj, io::JsonAllocator& allocator) const override
Populate a json object with all the first-level values held in this configuration. Default is overridden to handle special cases for AbstractSensorAttributes and deriving (i.e. AudioSensorAttributes or VisualSensorAttributes) classes.

Protected functions

void writeValuesToJsonInternal(io::JsonGenericValue& jsonObj, io::JsonAllocator& allocator) const virtual
Write child-class-specific values to json object.
auto getObjectInfoHeaderInternal() const -> std::string override
Retrieve a comma-separated string holding the header values for the info returned for this managed object, type-specific.
auto getAbstractSensorInfoHeaderInternal() const -> std::string virtual
get AbstractSensorAttributes-specific info header
auto getObjectInfoInternal() const -> std::string override
Retrieve a comma-separated informational string about the contents of this managed object.
auto getAbstractSensorInfoInternal() const -> std::string virtual
get AbstractSensorAttributes specific info for csv string