knx
ETS configurable knx-stack
npdu.cpp
Go to the documentation of this file.
1
#include "
npdu.h
"
2
#include "
cemi_frame.h
"
3
#include <string.h>
4
5
6
NPDU::NPDU
(uint8_t* data,
CemiFrame
& frame): _data(data), _frame(frame)
7
{
8
}
9
10
11
uint8_t
NPDU::octetCount
()
const
12
{
13
return
_data[0];
14
}
15
16
void
NPDU::octetCount
(uint8_t value)
17
{
18
_data[0] = value;
19
}
20
21
uint8_t
NPDU::length
()
const
22
{
23
return
_data[0] + 2;
// +1 for length field, +1 for TCPI
24
}
25
26
uint8_t
NPDU::hopCount
()
const
27
{
28
return
_frame.
hopCount
();
29
}
30
31
void
NPDU::hopCount
(uint8_t value)
32
{
33
_frame.
hopCount
(value);
34
}
35
36
CemiFrame
&
NPDU::frame
()
37
{
38
return
_frame;
39
}
40
41
TPDU
&
NPDU::tpdu
()
42
{
43
return
_frame.
tpdu
();
44
}
cemi_frame.h
CemiFrame
Definition:
cemi_frame.h:20
CemiFrame::tpdu
TPDU & tpdu()
Definition:
cemi_frame.cpp:362
CemiFrame::hopCount
uint8_t hopCount() const
Definition:
cemi_frame.cpp:292
NPDU::NPDU
NPDU(uint8_t *data, CemiFrame &frame)
Definition:
npdu.cpp:6
NPDU::octetCount
uint8_t octetCount() const
Definition:
npdu.cpp:11
NPDU::tpdu
TPDU & tpdu()
Definition:
npdu.cpp:41
NPDU::frame
CemiFrame & frame()
Definition:
npdu.cpp:36
NPDU::length
uint8_t length() const
Definition:
npdu.cpp:21
NPDU::hopCount
uint8_t hopCount() const
Definition:
npdu.cpp:26
TPDU
Definition:
tpdu.h:9
npdu.h
src
knx
npdu.cpp
Generated by
1.9.1