|
void | for_each (std::function< void(HF::Interface &)> func) const |
| Call the given function for all the interfaces. More...
|
|
void | for_each (std::function< void(HF::Interface &)> func) |
| Call the given function for all the interfaces. More...
|
|
template<uint8_t N, typename Head , typename... Tail> |
HF::Interface * | find (uint16_t itf_uid) const |
| Find the interface with the given UID. More...
|
|
template<uint8_t N> |
HF::Interface * | find (uint16_t itf_uid) const |
| Final template instantiation that finds the wrapped interface with the given UID. More...
|
|
template<uint8_t N, typename Head , typename... Tail> |
void | for_each (std::function< void(HF::Interface &)> func) const |
| Helper template function to implement the HF::Units::Unit::for_each functionality. More...
|
|
template<uint8_t N> |
void | for_each (std::function< void(HF::Interface &)> func) const |
| Helper template function to implement the HF::Units::Unit::for_each functionality. More...
|
|
template<uint8_t N, typename Head , typename... Tail> |
void | attributes_itf (HF::Attributes::List &attrs, Common::Interface itf, uint8_t pack_id, const HF::Attributes::UIDS &uids) const |
| Helper function used to provide HF::Units::Unit::attributes functionality. More...
|
|
template<uint8_t N> |
void | attributes_itf (HF::Attributes::List &attrs, Common::Interface itf, uint8_t pack_id, const HF::Attributes::UIDS &uids) const |
| Helper function used to provide HF::Units::Unit::attributes functionality. More...
|
|
template<typename Base, typename... Proxies>
class HF::Interfaces::Container< Base, Proxies >
Helper class to add optional interfaces to other classes.
Definition at line 445 of file interface.h.
template<typename Base, typename... Proxies>
template<uint8_t N, typename Head , typename... Tail>
Helper function used to provide HF::Units::Unit::attributes functionality.
- Parameters
-
[out] | attrs | attribute list to append the attributes for the interface to. |
[in] | itf | interface to get the attributes for. |
[in] | pack_id | attributes pack id to use when retrieving the attributes. |
[in] | uids | list of attribute uids to get attributes for if pack_id is HF::Attributes::Pack::DYNAMIC. |
- Template Parameters
-
N | index in the wrapped interfaces tuple to check if UID matches. |
Head | class for the wrapped interface at the given index. |
Tail | the classes associated with the remaining wrapped interfaces. |
Definition at line 653 of file interface.h.
Referenced by HF::Interfaces::Container< HF::Units::Unit< HF::Profiles::SimpleOnOffSwitch, ITF... >, Proxy< ITF, HF::Units::Unit< HF::Profiles::SimpleOnOffSwitch, ITF... > >... >::attributes(), and HF::Interfaces::Container< HF::Units::Unit< HF::Profiles::SimpleOnOffSwitch, ITF... >, Proxy< ITF, HF::Units::Unit< HF::Profiles::SimpleOnOffSwitch, ITF... > >... >::attributes_itf().
656 const auto &head = std::get<N>(this->_interfaces);
658 if (head.uid() == itf.id)
List get(const HF::Interface &itf, uint8_t pack_id, const UIDS &uids)
Get a list with the attributes for the given interface, pack id or the uids passed in...
void attributes_itf(HF::Attributes::List &attrs, Common::Interface itf, uint8_t pack_id, const HF::Attributes::UIDS &uids) const
Helper function used to provide HF::Units::Unit::attributes functionality.
template<typename Base, typename... Proxies>
template<uint8_t N, typename Head , typename... Tail>
Find the interface with the given UID.
- Parameters
-
itf_uid | the interface UID to search for in the wrapped interfaces. |
- Template Parameters
-
N | index in the interfaces tuple to check if UID matches. |
Head | class for the interface at the given index. |
Tail | the classes associated with the remaining optional interfaces. |
- Returns
- a pointer to the interface or
nullptr
if the interface is not present.
Definition at line 570 of file interface.h.
Referenced by HF::Interfaces::Container< HF::Units::Unit< HF::Profiles::SimpleOnOffSwitch, ITF... >, Proxy< ITF, HF::Units::Unit< HF::Profiles::SimpleOnOffSwitch, ITF... > >... >::find(), and HF::Interfaces::Container< HF::Units::Unit< HF::Profiles::SimpleOnOffSwitch, ITF... >, Proxy< ITF, HF::Units::Unit< HF::Profiles::SimpleOnOffSwitch, ITF... > >... >::handle().
572 static_assert(std::is_base_of<HF::Interface, Head>::value,
573 "Head must be of type HF::Interface");
575 const Head &head = std::get<N>(_interfaces);
577 if (head.uid() == itf_uid)
579 return const_cast<Head *
>(&head);
583 return find<N + 1, Tail...>(itf_uid);
HF::Interface * find(uint16_t itf_uid) const
Find the interface with the given UID.