HAN-FUN API  1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
HF::Core::SessionManagement::Server< _Entries > Struct Template Reference

Helper template to inject session management functionality into services requiring it - Server side. More...

#include <session_management.h>

+ Inheritance diagram for HF::Core::SessionManagement::Server< _Entries >:
+ Collaboration diagram for HF::Core::SessionManagement::Server< _Entries >:

Public Member Functions

Container & entries () const
 Return the container for the service entries. More...
 
- Public Member Functions inherited from HF::Core::SessionManagement::AbstractServer
 AbstractServer ()
 Constructor.
 
void start_session (uint16_t address)
 Start a session for the device with the given address. More...
 
void end_session (uint16_t address)
 Terminate the session associated with the device with the given address. More...
 
bool exists (uint16_t address) const
 Check if a session for the device with the given address exists. More...
 
bool is_valid (uint16_t address) const
 Check if the session for the device with the given address is valid, i.e., the underling entries have not been modified since the start of the session. More...
 
void invalidate ()
 Invalidate all sessions.
 

Protected Member Functions

 Server (const Server &other)
 Copy-Constructor. More...
 
uint16_t entries_size () const
 Get the number of entries present in the container. More...
 
Common::Result entries (uint16_t offset, uint8_t count, Common::ByteArray &payload)
 Create a GetEntriesResponse message message with, count entries starting from the given offset and serialize the created message into the given byte array in payload. More...
 
- Protected Member Functions inherited from HF::Core::SessionManagement::AbstractServer
Common::Result handle_command (CMD cmd, Protocol::Packet &packet, Common::ByteArray &payload, uint16_t offset=0)
 Handle command request/response messages. More...
 
iterator find (uint16_t address)
 Find the session associated with the given device address. More...
 
const_iterator find (uint16_t address) const
 Find the session associated with the given device address. More...
 
uint16_t payload_size (CMD cmd) const
 Get the minimum number of bytes necessary to pack/unpack a message of the given command. More...
 
Common::Result check_offset (uint16_t offset, uint8_t &count, uint16_t size) const
 Check if the given offset is valid and adjust the count value if necessary. More...
 
virtual void send (const Protocol::Address &addr, Protocol::Message &message)=0
 Send message msg to the network address given by addr. More...
 
Common::Result check_session (uint16_t address, Common::ByteArray &payload) const
 Check if a session for the given device address exists and if it is valid. More...
 

Additional Inherited Members

- Protected Attributes inherited from HF::Core::SessionManagement::AbstractServer
Container sessions
 Session's database.
 

Detailed Description

template<typename _Entries>
struct HF::Core::SessionManagement::Server< _Entries >

Helper template to inject session management functionality into services requiring it - Server side.

Definition at line 598 of file session_management.h.


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