src/ur/robot_mode.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2017, 2018 Simon Rasmussen (refactor)
3  *
4  * Copyright 2015, 2016 Thomas Timm Andersen (original version)
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
21 
23 {
24  bp.parse(timestamp);
32  return true;
33 }
34 
36 {
37  if (!bp.checkSize<RobotModeData_V1_X>())
38  return false;
39 
41 
42  bp.parse(robot_mode);
43  bp.parse(speed_fraction);
44 
45  return true;
46 }
47 
49 {
51  return false;
52 
54 
55  bp.parse(robot_mode);
56  bp.parse(control_mode);
57  bp.parse(target_speed_fraction);
58  bp.parse(speed_scaling);
59 
60  return true;
61 }
62 
64 {
65  if (!bp.checkSize<RobotModeData_V3_2>())
66  return false;
67 
69 
70  bp.parse(target_speed_fraction_limit);
71 
72  return true;
73 }
74 
76 {
77  if (!bp.checkSize<RobotModeData_V3_5>())
78  return false;
79 
81 
82  bp.parse(unknown_internal_use);
83 
84  return true;
85 }
86 
88 {
89  return consumer.consume(*this);
90 }
92 {
93  return consumer.consume(*this);
94 }
96 {
97  return consumer.consume(*this);
98 }
100 {
101  return consumer.consume(*this);
102 }
virtual bool parseWith(BinParser &bp)
virtual bool parseWith(BinParser &bp)
uint64_t timestamp
Definition: robot_mode.h:32
virtual bool consume(shared_ptr< StatePacket > packet)
Definition: consumer.h:45
virtual bool consumeWith(URStatePacketConsumer &consumer)
virtual bool consumeWith(URStatePacketConsumer &consumer)
virtual bool parseWith(BinParser &bp)
bool checkSize(size_t bytes)
Definition: bin_parser.h:184
void parse(T &val)
Definition: bin_parser.h:96
virtual bool consumeWith(URStatePacketConsumer &consumer)
virtual bool parseWith(BinParser &bp)
virtual bool consumeWith(URStatePacketConsumer &consumer)
bool physical_robot_connected
Definition: robot_mode.h:33
virtual bool parseWith(BinParser &bp)


ur_modern_driver
Author(s): Thomas Timm Andersen, Simon Rasmussen
autogenerated on Fri Jun 26 2020 03:37:00