include
omron_os32c_driver
measurement_report_header.h
Go to the documentation of this file.
1
26
#ifndef OMRON_OS32C_DRIVER_MEASUREMENT_REPORT_HEADER_H
27
#define OMRON_OS32C_DRIVER_MEASUREMENT_REPORT_HEADER_H
28
29
#include <string>
30
31
#include "
odva_ethernetip/eip_types.h
"
32
#include "
odva_ethernetip/serialization/reader.h
"
33
#include "
odva_ethernetip/serialization/writer.h
"
34
#include "
odva_ethernetip/serialization/serializable.h
"
35
36
using
std::string;
37
using
eip::serialization::Serializable
;
38
using
eip::serialization::Reader
;
39
using
eip::serialization::Writer
;
40
41
namespace
omron_os32c_driver
{
42
47
class
MeasurementReportHeader
:
public
Serializable
48
{
49
public
:
50
EIP_UDINT
scan_count
;
51
EIP_UDINT
scan_rate
;
52
EIP_UDINT
scan_timestamp
;
53
EIP_UDINT
scan_beam_period
;
54
EIP_UINT
machine_state
;
55
EIP_UINT
machine_stop_reasons
;
56
EIP_UINT
active_zone_set
;
57
EIP_WORD
zone_inputs
;
58
EIP_WORD
detection_zone_status
;
59
EIP_WORD
output_status
;
60
EIP_WORD
input_status
;
61
EIP_UINT
display_status
;
62
EIP_UINT
non_safety_config_checksum
;
63
EIP_UINT
safety_config_checksum
;
64
EIP_UINT
range_report_format
;
65
EIP_UINT
refletivity_report_format
;
66
EIP_UINT
num_beams
;
67
71
virtual
size_t
getLength
()
const
72
{
73
return
56;
74
}
75
82
virtual
Writer
&
serialize
(
Writer
& writer)
const
83
{
84
EIP_UINT
reserved = 0;
85
writer.
write
(
scan_count
);
86
writer.
write
(
scan_rate
);
87
writer.
write
(
scan_timestamp
);
88
writer.
write
(
scan_beam_period
);
89
writer.
write
(
machine_state
);
90
writer.
write
(
machine_stop_reasons
);
91
writer.
write
(
active_zone_set
);
92
writer.
write
(
zone_inputs
);
93
writer.
write
(
detection_zone_status
);
94
writer.
write
(
output_status
);
95
writer.
write
(
input_status
);
96
writer.
write
(
display_status
);
97
writer.
write
(
non_safety_config_checksum
);
98
writer.
write
(
safety_config_checksum
);
99
writer.
write
(reserved);
100
writer.
write
(reserved);
101
writer.
write
(reserved);
102
writer.
write
(reserved);
103
writer.
write
(reserved);
104
writer.
write
(reserved);
105
writer.
write
(
range_report_format
);
106
writer.
write
(
refletivity_report_format
);
107
writer.
write
(reserved);
108
writer.
write
(
num_beams
);
109
return
writer;
110
}
111
115
virtual
Reader
&
deserialize
(
Reader
& reader,
size_t
length)
116
{
117
deserialize
(reader);
118
return
reader;
119
}
120
127
virtual
Reader
&
deserialize
(
Reader
& reader)
128
{
129
reader.
read
(
scan_count
);
130
reader.
read
(
scan_rate
);
131
reader.
read
(
scan_timestamp
);
132
reader.
read
(
scan_beam_period
);
133
reader.
read
(
machine_state
);
134
reader.
read
(
machine_stop_reasons
);
135
reader.
read
(
active_zone_set
);
136
reader.
read
(
zone_inputs
);
137
reader.
read
(
detection_zone_status
);
138
reader.
read
(
output_status
);
139
reader.
read
(
input_status
);
140
reader.
read
(
display_status
);
141
reader.
read
(
non_safety_config_checksum
);
142
reader.
read
(
safety_config_checksum
);
143
reader.
skip
(6 *
sizeof
(
EIP_UINT
));
144
reader.
read
(
range_report_format
);
145
reader.
read
(
refletivity_report_format
);
146
reader.
skip
(
sizeof
(
EIP_UINT
));
147
reader.
read
(
num_beams
);
148
return
reader;
149
}
150
};
151
152
}
// namespace omron_os32c_driver
153
154
#endif // OMRON_OS32C_DRIVER_MEASUREMENT_REPORT_HEADER_H
omron_os32c_driver::MeasurementReportHeader::getLength
virtual size_t getLength() const
Definition:
measurement_report_header.h:71
omron_os32c_driver::MeasurementReportHeader::scan_count
EIP_UDINT scan_count
Definition:
measurement_report_header.h:50
eip::serialization::Writer
omron_os32c_driver::MeasurementReportHeader::active_zone_set
EIP_UINT active_zone_set
Definition:
measurement_report_header.h:56
omron_os32c_driver::MeasurementReportHeader::num_beams
EIP_UINT num_beams
Definition:
measurement_report_header.h:66
omron_os32c_driver::MeasurementReportHeader::machine_state
EIP_UINT machine_state
Definition:
measurement_report_header.h:54
eip::serialization::Reader
omron_os32c_driver::MeasurementReportHeader::scan_rate
EIP_UDINT scan_rate
Definition:
measurement_report_header.h:51
EIP_WORD
uint16_t EIP_WORD
omron_os32c_driver::MeasurementReportHeader::output_status
EIP_WORD output_status
Definition:
measurement_report_header.h:59
eip::serialization::Writer::write
void write(const T &v)
EIP_UINT
uint16_t EIP_UINT
reader.h
omron_os32c_driver::MeasurementReportHeader::scan_beam_period
EIP_UDINT scan_beam_period
Definition:
measurement_report_header.h:53
eip_types.h
omron_os32c_driver::MeasurementReportHeader::machine_stop_reasons
EIP_UINT machine_stop_reasons
Definition:
measurement_report_header.h:55
eip::serialization::Reader::read
void read(T &v)
eip::serialization::Reader::skip
virtual void skip(size_t n)=0
eip::serialization::Serializable
omron_os32c_driver::MeasurementReportHeader::zone_inputs
EIP_WORD zone_inputs
Definition:
measurement_report_header.h:57
omron_os32c_driver::MeasurementReportHeader::non_safety_config_checksum
EIP_UINT non_safety_config_checksum
Definition:
measurement_report_header.h:62
omron_os32c_driver
Definition:
measurement_report.h:43
omron_os32c_driver::MeasurementReportHeader::safety_config_checksum
EIP_UINT safety_config_checksum
Definition:
measurement_report_header.h:63
omron_os32c_driver::MeasurementReportHeader::range_report_format
EIP_UINT range_report_format
Definition:
measurement_report_header.h:64
omron_os32c_driver::MeasurementReportHeader
Definition:
measurement_report_header.h:47
omron_os32c_driver::MeasurementReportHeader::refletivity_report_format
EIP_UINT refletivity_report_format
Definition:
measurement_report_header.h:65
omron_os32c_driver::MeasurementReportHeader::serialize
virtual Writer & serialize(Writer &writer) const
Definition:
measurement_report_header.h:82
serializable.h
omron_os32c_driver::MeasurementReportHeader::deserialize
virtual Reader & deserialize(Reader &reader, size_t length)
Definition:
measurement_report_header.h:115
omron_os32c_driver::MeasurementReportHeader::deserialize
virtual Reader & deserialize(Reader &reader)
Definition:
measurement_report_header.h:127
omron_os32c_driver::MeasurementReportHeader::detection_zone_status
EIP_WORD detection_zone_status
Definition:
measurement_report_header.h:58
omron_os32c_driver::MeasurementReportHeader::display_status
EIP_UINT display_status
Definition:
measurement_report_header.h:61
omron_os32c_driver::MeasurementReportHeader::scan_timestamp
EIP_UDINT scan_timestamp
Definition:
measurement_report_header.h:52
omron_os32c_driver::MeasurementReportHeader::input_status
EIP_WORD input_status
Definition:
measurement_report_header.h:60
EIP_UDINT
uint32_t EIP_UDINT
writer.h
omron_os32c_driver
Author(s): Kareem Shehata
autogenerated on Wed Mar 2 2022 00:39:14