-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLocoNetKS.h
56 lines (49 loc) · 1.77 KB
/
LocoNetKS.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
||
|| @file LocoNetKS.h
|| @version 1.1
|| @author Michael Zimmermann
|| @contact [email protected]
||
|| @description
|| | additional functions for 'LocoNetClass' from Loconet-Library, published by MRRwA (previously EmbeddedLocoNet)
|| #
||
|| @license
|| | Copyright (c) 2021 Michael Zimmermann <http://www.kruemelsoft.privat.t-online.de>
|| | All rights reserved.
|| |
|| | This program is free software: you can redistribute it and/or modify
|| | it under the terms of the GNU General Public License as published by
|| | the Free Software Foundation, either version 3 of the License, or
|| | (at your option) any later version.
|| |
|| | This program is distributed in the hope that it will be useful,
|| | but WITHOUT ANY WARRANTY; without even the implied warranty of
|| | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|| | GNU General Public License for more details.
|| |
|| | You should have received a copy of the GNU General Public License
|| | along with this program. If not, see <http://www.gnu.org/licenses/>.
|| |
|| | (see also: licenseinformations in file 'loconet.h' published by MRRwA (previously EmbeddedLocoNet))
|| #
||
*/
#ifndef _KS_LOCONETKS_H
#define _KS_LOCONETKS_H
class LocoNetClassKS {
public:
LocoNetClassKS() {};
// send a loconetmessage with one-byte-length
LN_STATUS send(uint8_t OpCode);
// send switch data with the given OPCODE (B0, B1, B2)
LN_STATUS sendSwitchState(uint16_t ui16_swAdr, boolean b_swOn, boolean b_swDirection, uint8_t ui8_OPC);
protected:
// B1
LN_STATUS sendSwitchReport(uint16_t Address, uint8_t Output, uint8_t Direction);
// B2
LN_STATUS sendReportSensor(uint16_t Address, uint8_t State);
};
extern LocoNetClassKS LocoNetKS;
#endif