tcMenu
Public Member Functions | List of all members
tcremote::TcMenuRemoteServer Class Reference

#include <BaseRemoteComponents.h>

Inheritance diagram for tcremote::TcMenuRemoteServer:

Public Member Functions

 TcMenuRemoteServer (const ConnectorLocalInfo &appInfo)
 
void clearRemotes ()
 
void exec () override
 
uint8_t addConnection (BaseRemoteServerConnection *toAdd)
 
uint8_t remoteCount () const
 
TagValueRemoteConnectorgetRemoteConnector (int num)
 
TagValueTransportgetTransport (int num)
 
BaseRemoteServerConnectiongetRemoteServerConnection (int num)
 

Detailed Description

This is the component that allows us to manage as many connections as needed using a single instance, it holds on to instances of RemoteServerConnection and services them all, it also provides the getter functions for acquiring the transport or connector for a given item.

Constructor & Destructor Documentation

◆ TcMenuRemoteServer()

tcremote::TcMenuRemoteServer::TcMenuRemoteServer ( const ConnectorLocalInfo appInfo)
inlineexplicit

Creates an instance of the remote server component that has no connections but is properly configured ready for connections to be added. You must provide the application information. The server is started when the first remote is added.

Parameters
appInfothe application information - uuid and name basically.

Member Function Documentation

◆ clearRemotes()

void tcremote::TcMenuRemoteServer::clearRemotes ( )
inline

Remove all current remotes

◆ addConnection()

uint8_t tcremote::TcMenuRemoteServer::addConnection ( tcremote::BaseRemoteServerConnection toAdd)

Adds a connection to the managed connections, this class will ensure that it is properly initialised, any authenticator on menuMgr added to it, and will call it's tick method frequently.

Parameters
toAddthe connection to add
Returns
a remote number of 0xff if it fails.

◆ remoteCount()

uint8_t tcremote::TcMenuRemoteServer::remoteCount ( ) const
inline
Returns
the number of remote connections added.

◆ getRemoteConnector()

TagValueRemoteConnector* tcremote::TcMenuRemoteServer::getRemoteConnector ( int  num)
inline

Gets the TagValueRemoteConnector at the given remoteNo, or nullptr if not available.

Parameters
numthe remote number
Returns
either a valid object or nullptr

◆ getTransport()

TagValueTransport* tcremote::TcMenuRemoteServer::getTransport ( int  num)
inline

Gets the TagValueTransport at the given remoteNo, or nullptr if not available.

Parameters
numthe remote number
Returns
either a valid object or nullptr

◆ getRemoteServerConnection()

BaseRemoteServerConnection* tcremote::TcMenuRemoteServer::getRemoteServerConnection ( int  num)
inline

Gets the underlying remote connection for external processing, this will be device specific and you should check the type using getRemoteServerType before doing anything with the connection.

Parameters
numthe remote number
Returns
either a pointer to a remote server, or nullptr if there is no such connection.

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