$darkmode
cloe::utility::ContactMap< D > Class Template Reference

#include <hmi_contact.hpp>

Inheritance diagram for cloe::utility::ContactMap< D >:
Collaboration diagram for cloe::utility::ContactMap< D >:

Public Member Functions

void add (const std::string &key, std::shared_ptr< Contact< D >> c)
 
void add_new (const std::string &key, Contact< D > *c)
 
void update (D time)
 
Schema schema ()
 
void to_json (Json &j) const override
 
void from_conf (const Conf &c) override
 
- Public Member Functions inherited from fable::Confable
 Confable (const Confable &) noexcept
 
 Confable (Confable &&) noexcept=default
 
Confableoperator= (const Confable &other) noexcept
 
Confableoperator= (Confable &&other) noexcept
 
virtual void reset_schema ()
 
Schemaschema ()
 
const Schemaschema () const
 
virtual void validate_or_throw (const Conf &c) const
 
virtual bool validate (const Conf &c, std::optional< SchemaError > &err) const
 
virtual void to_json (Json &j) const
 
Json to_json () const
 

Additional Inherited Members

- Protected Member Functions inherited from fable::Confable
virtual Schema schema_impl ()
 

Detailed Description

template<typename D = Duration>
class cloe::utility::ContactMap< D >

ContactMap is a convenient way to bundle multiple contacts, as is commonly the case in a Vehicle HMI.

All Contacts are added to the matrix, which then takes care of updating the values are the right times and representing their state in JSON.

Member Function Documentation

◆ add()

template<typename D = Duration>
void cloe::utility::ContactMap< D >::add ( const std::string &  key,
std::shared_ptr< Contact< D >>  c 
)
inline

Add a Contact to the matrix.

Here is the call graph for this function:

◆ from_conf()

template<typename D = Duration>
void cloe::utility::ContactMap< D >::from_conf ( const Conf c)
inlineoverridevirtual

Deserialize a Confable from a Conf.

Unless you have special needs, it is recommended to implement

Schema schema_impl()

and use the default implementation of this.

Reimplemented from fable::Confable.

Here is the call graph for this function:

◆ update()

template<typename D = Duration>
void cloe::utility::ContactMap< D >::update ( time)
inline

Update all Contacts in the matrix with the current time.

Any from_json set up till this point will then take effect.

Here is the caller graph for this function:

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