HAN-FUN API  1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
HF::Devices::Concentrator::AbstractBase Class Referenceabstract

This is the parent class for the HAN-FUN Concentrator devices implementation. More...

#include <devices.h>

+ Inheritance diagram for HF::Devices::Concentrator::AbstractBase:
+ Collaboration diagram for HF::Devices::Concentrator::AbstractBase:

Public Member Functions

uint16_t address () const
 Return the device address on the HAN-FUN network, when the device is registered, or HF_BROADCAST_ADDR otherwise. More...
 
void connected (HF::Transport::Link *link)
 Callback to report that a new transport link was been created to a remote device. More...
 
void disconnected (HF::Transport::Link *link)
 Callback to the report that the given transport link no longer is valid and MUST not be used to send messages to the corresponding end-point. More...
 
void receive (Protocol::Packet &packet, Common::ByteArray &payload, uint16_t offset)
 Callback to deliver a packet received from the transport layer. More...
 
- Public Member Functions inherited from HF::Devices::AbstractDevice
const IUnitsunits () const
 Return the list of units registered in this device. More...
 
void add (Units::IUnit *unit)
 Add unit to devices unit lists. More...
 
void remove (Units::IUnit *unit)
 Remove unit from device's unit list. More...
 
Units::IUnitunit (uint8_t id) const
 Return pointer to the unit with the given id. More...
 
void send (Protocol::Packet &packet)
 Send given packet into the HAN-FUN network. More...
 
void periodic (uint32_t time)
 Handle periodic processing. More...
 
Events

Protected Member Functions

HF::Transport::Linklink (uint16_t addr) const
 Return the link that can be used to send a packet to the device with the given address. More...
 
virtual void route_packet (Protocol::Packet &packet, Common::ByteArray &payload, uint16_t offset)
 Route the given packet to the corresponding device. More...
 
virtual Concentrator::IUnit0unit0 () const =0
 Get the unit 0 used by this concentrator device. More...
 
- Protected Member Functions inherited from HF::Devices::AbstractDevice
virtual bool to_local (const Protocol::Packet &packet) const
 Check if the given packet is for this device. More...
 
bool from_local (const Protocol::Packet &packet) const
 Check if the given packet is from the local device. More...
 
bool from_remote (const Protocol::Packet &packet)
 Check if the given packet is from the a remote device. More...
 
bool is_registered ()
 Check if the device has a valid, i.e. More...
 

Protected Attributes

Common::SimpleList< Transport::Link * > _links
 List of links present in this concentrator.
 
- Protected Attributes inherited from HF::Devices::AbstractDevice
uint8_t next_reference
 Last reference number used to send a packet.
 
IUnits _units
 List containing pointers to the units present in the device.
 
Protocol::Filters::ResponseRequired response_filter
 Support for generating missing responses for messages.
 

Detailed Description

This is the parent class for the HAN-FUN Concentrator devices implementation.

Definition at line 850 of file devices.h.

Member Function Documentation

◆ address()

uint16_t HF::Devices::Concentrator::AbstractBase::address ( ) const
inlinevirtual

Return the device address on the HAN-FUN network, when the device is registered, or HF_BROADCAST_ADDR otherwise.

Returns
the device address on the HAN-FUN network, HF_BROADCAST_ADDR otherwise.

Implements HF::IDevice.

Definition at line 858 of file devices.h.

859  {
860  return 0;
861  }

◆ connected()

void HF::Devices::Concentrator::AbstractBase::connected ( HF::Transport::Link link)
virtual

Callback to report that a new transport link was been created to a remote device.

This link can then be used by the local end-point to send messages to the remote end-point.

Parameters
[in]linkpointer to the created link.

Implements HF::Transport::Endpoint.

◆ disconnected()

void HF::Devices::Concentrator::AbstractBase::disconnected ( HF::Transport::Link link)
virtual

Callback to the report that the given transport link no longer is valid and MUST not be used to send messages to the corresponding end-point.

At the time of this method call the link MUST not be used to send any further messages to the remote end-point.

Parameters
[in]linkpointer to the link disconnected.

Implements HF::Transport::Endpoint.

◆ link()

HF::Transport::Link* HF::Devices::Concentrator::AbstractBase::link ( uint16_t  addr) const
protectedvirtual

Return the link that can be used to send a packet to the device with the given address.

Parameters
[in]addrthe address of the device to send the packet to.
Returns
a pointer to the link that can be used to send the packet, nullptr otherwise;

Implements HF::Devices::AbstractDevice.

◆ receive()

void HF::Devices::Concentrator::AbstractBase::receive ( Protocol::Packet packet,
Common::ByteArray payload,
uint16_t  offset 
)
virtual

Callback to deliver a packet received from the transport layer.

Parameters
[in]packetreference to the received packet.
[in]payloadreference a ByteArray containing the received data.
[in]offsetoffset from where the received data starts on the payload byte array buffer.

Reimplemented from HF::Devices::AbstractDevice.

Reimplemented in Base.

◆ route_packet()

virtual void HF::Devices::Concentrator::AbstractBase::route_packet ( Protocol::Packet packet,
Common::ByteArray payload,
uint16_t  offset 
)
protectedvirtual

Route the given packet to the corresponding device.

Parameters
[in]packetreference for the packet to route.
[in]payloadreference to the ByteArray containing the packet payload.
[in]offsetoffset from where the packet data starts.

◆ unit0()

virtual Concentrator::IUnit0* HF::Devices::Concentrator::AbstractBase::unit0 ( ) const
protectedpure virtual

Get the unit 0 used by this concentrator device.

Returns
pointer to the unit 0 used by this concentrator device.

Implements HF::IDevice.

Implemented in HF::Devices::Concentrator::Abstract< CoreServices >, HF::Devices::Concentrator::Abstract< Unit0 >, HF::Devices::Concentrator::Abstract< BaseUnit0 >, HF::Core::DeviceManagement::IServer, and HF::Core::BindManagement::IServer.


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