HAN-FUN API  1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
HF::Core::Service< _uid, Parent > Struct Template Reference

Class template for all core services implementations. More...

#include <core.h>

Inherits Parent.

+ Collaboration diagram for HF::Core::Service< _uid, Parent >:

Public Member Functions

uint16_t uid () const
 This method returns the interface UID. More...
 

Protected Member Functions

 Service (Unit0 &unit)
 Constructor. More...
 
bool check_uid (uint16_t uid) const
 Check if the given uid value matches the service's UID value. More...
 

Detailed Description

template<Interface::UID _uid, typename Parent = AbstractService>
struct HF::Core::Service< _uid, Parent >

Class template for all core services implementations.

Definition at line 188 of file core.h.

Constructor & Destructor Documentation

◆ Service()

template<Interface::UID _uid, typename Parent = AbstractService>
HF::Core::Service< _uid, Parent >::Service ( Unit0 unit)
inlineprotected

Constructor.

Parameters
[in]unitreference to the unit that holds this service.

Definition at line 203 of file core.h.

203  :
204  Parent(unit)
205  {}

Member Function Documentation

◆ check_uid()

template<Interface::UID _uid, typename Parent = AbstractService>
bool HF::Core::Service< _uid, Parent >::check_uid ( uint16_t  uid) const
inlineprotected

Check if the given uid value matches the service's UID value.

Parameters
[in]uidUID value to check against.
Return values
trueif the values match.
falseotherwise.

Definition at line 215 of file core.h.

216  {
217  return Service::uid() == uid;
218  }
uint16_t uid() const
This method returns the interface UID.
Definition: core.h:191

◆ uid()

template<Interface::UID _uid, typename Parent = AbstractService>
uint16_t HF::Core::Service< _uid, Parent >::uid ( ) const
inline

This method returns the interface UID.

Subclasses MUST override this method to provide a valid value for the interface being implemented.

This method returns a uint16_t and not a Interface::UID, to provide support for proprietary interfaces.

Returns
the UID for the interface.

Definition at line 191 of file core.h.

Referenced by HF::Core::Service< HF::Interface::TIME >::check_uid().

192  {
193  return _uid;
194  }
+ Here is the caller graph for this function:

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