Arduino C++ Library for VLCB
Loading...
Searching...
No Matches
Service.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 <Arduino.h>
9
#include <
vlcbdefs.hpp
>
10
11
namespace
VLCB
12
{
13
14
class
Controller;
15
struct
Action;
16
24
class
Service
25
{
27
protected
:
29
bool
isThisNodeNumber(
unsigned
int
nodeNumber);
30
32
Controller * controller;
33
34
public
:
36
void
setController(Controller * ctrl) { this->controller = ctrl; }
37
40
virtual
void
begin
() {}
41
46
virtual
VlcbServiceTypes
getServiceID()
const
= 0;
47
52
virtual
byte
getServiceVersionID()
const
= 0;
53
59
virtual
void
process
() {}
60
66
virtual
void
processAction(
const
Action & action) {};
67
72
virtual
void
reportDiagnostics(
byte
serviceIndex,
byte
diagnosticsCode);
73
75
virtual
int
getDiagnosticCount() {
return
0; }
76
78
struct
Data {
byte
data1, data2, data3; };
79
82
virtual
Data getServiceData();
84
};
85
86
}
VLCB::Service
Interface base class for all VLCB services.
Definition
Service.h:25
VLCB
Definition
VLCB.h:50
VLCB::begin
void begin()
VLCB::process
void process()
vlcbdefs.hpp
VlcbServiceTypes
VlcbServiceTypes
Definition
vlcbdefs.hpp:487
src
Service.h
Generated by
1.16.1