Main Page
+
Namespaces
Namespace List
+
Namespace Members
All
Functions
Enumerations
Enumerator
+
Classes
Class List
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
w
~
+
Variables
a
b
c
d
e
f
h
i
l
m
n
p
q
r
s
t
u
v
w
Typedefs
Enumerations
Enumerator
+
Files
File List
+
File Members
All
Functions
Typedefs
Enumerations
Enumerator
Macros
src
pf
pf_packet
pf_r2000_packet_a.cpp
Go to the documentation of this file.
1
#include "
pf_driver/pf/pf_packet/pf_r2000_packet_a.h
"
2
#include "
pf_driver/pf/pf_packet_reader.h
"
3
4
void
PFR2000Packet_A::read_with
(
PFPacketReader
& reader)
5
{
6
reader.
read
(*
this
);
7
}
8
9
void
PFR2000Packet_A::get_type
(
char
* c)
10
{
11
c[0] = 0x41;
12
c[1] = 0x00;
13
}
14
15
void
PFR2000Packet_A::read_data
(uint8_t* buf,
size_t
num)
16
{
17
Data
* data =
reinterpret_cast<
Data
*
>
(buf);
18
distance
.resize(num);
19
for
(
int
i = 0; i < num; i++)
20
{
21
distance
[i] = data[i].
distance
;
22
}
23
}
PFR2000Packet_A::get_type
virtual void get_type(char *c)
Definition:
pf_r2000_packet_a.cpp:9
PFPacketReader::read
virtual void read(std::shared_ptr< PFPacket > packet)
Definition:
pf_packet_reader.cpp:3
PFPacketReader
Definition:
pf_packet_reader.h:11
PFR2000Packet_A::Data::distance
uint32_t distance
Definition:
pf_r2000_packet_a.h:11
PFR2000Packet_A::read_with
virtual void read_with(PFPacketReader &reader)
Definition:
pf_r2000_packet_a.cpp:4
pf_packet_reader.h
pf_r2000_packet_a.h
PFR2000Packet_A::read_data
virtual void read_data(uint8_t *buf, size_t num)
Definition:
pf_r2000_packet_a.cpp:15
PFPacket::distance
std::vector< uint32_t > distance
Definition:
pf_packet.h:13
PFR2000Packet_A::Data
Definition:
pf_r2000_packet_a.h:9
pf_driver
Author(s): Harsh Deshpande
autogenerated on Fri Feb 24 2023 03:59:35