HiveMind
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
ApplicationInterface Class Reference

#include <ApplicationInterface.h>

Inheritance diagram for ApplicationInterface:
Inheritance graph
Collaboration diagram for ApplicationInterface:
Collaboration graph

Public Member Functions

 ApplicationInterface (IUserInterface &userInterface, IMutex &mutex)
 
 ~ApplicationInterface () override=default
 
void setSystemRemoteHandshaked (bool handshaked) override
 set the system Remote handshake and light the necessary LED More...
 
void setSystemHostHandshaked (bool handshaked) override
 set the system Host handshake and light the necessary LED More...
 
void setSystemConnectionState (ConnectionState state) override
 set the system Connection state and light the necessary LED the right color More...
 
void setSystemDeviceState (DeviceState state) override
 set the system Connection state and set the seven segment accordingly More...
 
void setSystemButtonCallback (Button button, buttonCallbackFunction_t callback, void *context) override
 set the systems button to a callback More...
 
void setUserLed (bool state) override
 set the user LED More...
 
void setUserSegment (UserSegment segment) override
 set the user seven segment More...
 
SystemStates getSystemStates () const override
 set the system states More...
 
UserStates getUserStates () const override
 get the user states More...
 
ApplicationStates getApplicationState () const override
 get the application states More...
 
- Public Member Functions inherited from IApplicationInterface
virtual ~IApplicationInterface ()=default
 

Static Public Attributes

static constexpr LED s_remoteLed = LED::LED_0
 
static constexpr LED s_hostLed = LED::LED_1
 
static constexpr LED s_userLed = LED::LED_2
 

Private Attributes

IUserInterfacem_userInterface
 
IMutex & m_mutex
 
ApplicationStates m_states
 

Constructor & Destructor Documentation

◆ ApplicationInterface()

ApplicationInterface::ApplicationInterface ( IUserInterface userInterface,
IMutex &  mutex 
)

◆ ~ApplicationInterface()

ApplicationInterface::~ApplicationInterface ( )
overridedefault

Member Function Documentation

◆ getApplicationState()

ApplicationStates ApplicationInterface::getApplicationState ( ) const
overridevirtual

get the application states

Implements IApplicationInterface.

◆ getSystemStates()

SystemStates ApplicationInterface::getSystemStates ( ) const
overridevirtual

set the system states

Implements IApplicationInterface.

◆ getUserStates()

UserStates ApplicationInterface::getUserStates ( ) const
overridevirtual

get the user states

Implements IApplicationInterface.

◆ setSystemButtonCallback()

void ApplicationInterface::setSystemButtonCallback ( Button  button,
buttonCallbackFunction_t  callback,
void *  context 
)
overridevirtual

set the systems button to a callback

Implements IApplicationInterface.

Here is the call graph for this function:

◆ setSystemConnectionState()

void ApplicationInterface::setSystemConnectionState ( ConnectionState  state)
overridevirtual

set the system Connection state and light the necessary LED the right color

Implements IApplicationInterface.

Here is the call graph for this function:

◆ setSystemDeviceState()

void ApplicationInterface::setSystemDeviceState ( DeviceState  state)
overridevirtual

set the system Connection state and set the seven segment accordingly

Implements IApplicationInterface.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSystemHostHandshaked()

void ApplicationInterface::setSystemHostHandshaked ( bool  handshaked)
overridevirtual

set the system Host handshake and light the necessary LED

Implements IApplicationInterface.

Here is the call graph for this function:

◆ setSystemRemoteHandshaked()

void ApplicationInterface::setSystemRemoteHandshaked ( bool  handshaked)
overridevirtual

set the system Remote handshake and light the necessary LED

Implements IApplicationInterface.

Here is the call graph for this function:

◆ setUserLed()

void ApplicationInterface::setUserLed ( bool  state)
overridevirtual

set the user LED

Implements IApplicationInterface.

Here is the call graph for this function:

◆ setUserSegment()

void ApplicationInterface::setUserSegment ( UserSegment  segment)
overridevirtual

set the user seven segment

Implements IApplicationInterface.

Here is the call graph for this function:

Member Data Documentation

◆ m_mutex

IMutex& ApplicationInterface::m_mutex
private

◆ m_states

ApplicationStates ApplicationInterface::m_states
private

◆ m_userInterface

IUserInterface& ApplicationInterface::m_userInterface
private

◆ s_hostLed

constexpr LED ApplicationInterface::s_hostLed = LED::LED_1
staticconstexpr

◆ s_remoteLed

constexpr LED ApplicationInterface::s_remoteLed = LED::LED_0
staticconstexpr

◆ s_userLed

constexpr LED ApplicationInterface::s_userLed = LED::LED_2
staticconstexpr

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