HAN-FUN API  1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
HF::Core::SessionManagement::AbstractServer Class Referenceabstract

Parent class for session management functionality - Server side. More...

#include <session_management.h>

+ Inheritance diagram for HF::Core::SessionManagement::AbstractServer:
+ Collaboration diagram for HF::Core::SessionManagement::AbstractServer:

Data Structures

struct  Session
 Session database entry. More...
 

Public Member Functions

 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

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...
 
virtual uint16_t entries_size () const =0
 Get the number of entries present in the container. More...
 
virtual Common::Result entries (uint16_t offset, uint8_t count, Common::ByteArray &payload)=0
 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...
 
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...
 

Protected Attributes

Container sessions
 Session's database.
 

Detailed Description

Parent class for session management functionality - Server side.

Definition at line 309 of file session_management.h.


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