$darkmode
cloe::PowertrainSensor Class Referenceabstract
Inheritance diagram for cloe::PowertrainSensor:
Collaboration diagram for cloe::PowertrainSensor:

Public Member Functions

virtual double pedal_position_acceleration () const =0
 
virtual int gear_transmission () const =0
 
fable::Json active_state () const override
 
 Component (const std::string &name, const std::string &description="")
 
 Component (std::string &&name, std::string &&description="")
 
- Public Member Functions inherited from cloe::Component
 Component (const std::string &name, const std::string &description="")
 
 Component (std::string &&name, std::string &&description="")
 
uint64_t id () const
 
template<typename T >
T * as ()
 
Duration process (const Sync &sync) override
 
void reset () override
 
void abort () override
 
- Public Member Functions inherited from cloe::Model
virtual ~Model () noexcept=default
 
virtual Duration resolution () const
 
virtual bool is_connected () const
 
virtual bool is_operational () const
 
virtual void connect ()
 
virtual void disconnect ()
 
virtual void enroll (Registrar &)
 
virtual void start (const Sync &)
 
virtual void pause (const Sync &)
 
virtual void resume (const Sync &)
 
virtual void stop (const Sync &)
 
 Entity (std::string name)
 
 Entity (std::string name, std::string desc)
 
- Public Member Functions inherited from cloe::Entity
 Entity (std::string name)
 
 Entity (std::string name, std::string desc)
 
const std::string & name () const
 
void set_name (std::string name)
 
const std::string & description () const
 
void set_description (std::string desc)
 

Additional Inherited Members

- Protected Member Functions inherited from cloe::Entity
virtual Logger logger () const
 
- Protected Attributes inherited from cloe::Model
bool connected_ {false}
 
bool operational_ {false}
 
- Protected Attributes inherited from cloe::Entity
std::string name_
 
std::string desc_
 

Member Function Documentation

◆ active_state()

fable::Json cloe::PowertrainSensor::active_state ( ) const
inlineoverridevirtual

Return sensor state as JSON.

Implements cloe::Component.

Here is the call graph for this function:

◆ gear_transmission()

virtual int cloe::PowertrainSensor::gear_transmission ( ) const
pure virtual

Return the gear transmission.

The sign of this field is linked to the mode of the gear

  • positive: driving forward (e.g. a value of 3 means the third gear in driving forward mode)
  • 0: means that the gear lever is in neutral position
  • negative: reverse mode (e.g. a value of -1 means the first gear in reverse mode)
  • int max: means that the transmission is in parking position (can be accessed via std::numeric_limits<int>::max())

Implemented in cloe::NopPowertrainSensor.

Here is the caller graph for this function:

◆ pedal_position_acceleration()

virtual double cloe::PowertrainSensor::pedal_position_acceleration ( ) const
pure virtual

Return the position of the acceleration pedal with no unit.

The range goes from 0 (unpressed) to 1 (fully pressed).

Implemented in cloe::NopPowertrainSensor.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: