VLCB
Toggle main menu visibility
Loading...
Searching...
No Matches
LEDUserInterface.h
Go to the documentation of this file.
1
// Copyright (C) Sven Rosvall (sven@rosvall.ie)
2
// This file is part of VLCB-Arduino project on https://github.com/SvenRosvall/VLCB-Arduino
3
// Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
4
// The full licence can be found at: http://creativecommons.org/licenses/by-nc-sa/4.0/
5
6
#pragma once
7
8
#include "
LED.h
"
9
#include "
Switch.h
"
10
#include "
Service.h
"
11
#include "
vlcbdefs.hpp
"
12
13
namespace
VLCB
14
{
22
class
LEDUserInterface
:
public
Service
23
{
24
public
:
25
LEDUserInterface
(
byte
greenLedPin,
byte
yellowLedPin,
byte
pushButtonPin);
26
28
virtual
VlcbServiceTypes
getServiceID
()
const override
{
return
SERVICE_ID_NONE
; };
29
virtual
byte
getServiceVersionID
()
const override
{
return
1; };
30
31
bool
isButtonPressed
();
32
virtual
void
process
()
override
;
33
virtual
void
processAction
(
const
Action
&action)
override
;
35
36
private
:
37
LED
greenLed;
38
LED
yellowLed;
39
Switch
pushButton;
40
41
bool
resetRequested();
42
void
handleAction(
const
Action
&action);
43
void
checkRequestedAction();
44
45
void
indicateMode(
VlcbModeParams
mode);
46
};
47
48
}
LED.h
Service.h
Switch.h
VLCB::LEDUserInterface::processAction
virtual void processAction(const Action &action) override
Called when there is an action available.
Definition
LEDUserInterface.cpp:46
VLCB::LEDUserInterface::getServiceID
virtual VlcbServiceTypes getServiceID() const override
Return a unique ID for this service.
Definition
LEDUserInterface.h:28
VLCB::LEDUserInterface::isButtonPressed
bool isButtonPressed()
Definition
LEDUserInterface.cpp:26
VLCB::LEDUserInterface::LEDUserInterface
LEDUserInterface(byte greenLedPin, byte yellowLedPin, byte pushButtonPin)
Definition
LEDUserInterface.cpp:20
VLCB::LEDUserInterface::getServiceVersionID
virtual byte getServiceVersionID() const override
Return the version of the service specification implemented by this service.
Definition
LEDUserInterface.h:29
VLCB::LED
class to encapsulate a non-blocking LED
Definition
LED.h:29
VLCB::Service
Interface base class for all VLCB services.
Definition
Service.h:25
VLCB::Switch
Definition
Switch.h:20
VLCB
Definition
AbstractEventTeachingService.cpp:13
VLCB::process
void process()
Definition
VLCB.cpp:192
VLCB::Action
An action to be performed.
Definition
Controller.h:86
vlcbdefs.hpp
VlcbModeParams
VlcbModeParams
Definition
vlcbdefs.hpp:562
VlcbServiceTypes
VlcbServiceTypes
Definition
vlcbdefs.hpp:487
SERVICE_ID_NONE
@ SERVICE_ID_NONE
Definition
vlcbdefs.hpp:491
src
LEDUserInterface.h
Generated by
1.18.0