src/ur/master_board.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 {
26  bp.parse(analog_input0);
27  bp.parse(analog_input1);
34  bp.parse(robot_current);
36  return true;
37 }
38 
40 {
42  return false;
43 
44  bp.parse<uint16_t, 10>(digital_input_bits);
45  bp.parse<uint16_t, 10>(digital_output_bits);
46 
48 
49  bp.parse(master_safety_state);
50  bp.parse(master_on_off_state);
52 
54  {
56  return false;
57 
60  bp.parse(euromap_voltage);
61  bp.parse(euromap_current);
62  }
63 
64  return true;
65 }
66 
68 {
70  return false;
71 
72  bp.parse<uint32_t, 18>(digital_input_bits);
73  bp.parse<uint32_t, 18>(digital_output_bits);
74 
76 
77  bp.parse(safety_mode);
78  bp.parse(in_reduced_mode);
80 
82  {
84  return false;
85 
88  bp.parse(euromap_voltage);
89  bp.parse(euromap_current);
90  }
91 
92  bp.consume(sizeof(uint32_t));
93 
94  return true;
95 }
96 
98 {
100  return false;
101 
103 
104  bp.parse(operational_mode_selector_input);
105  bp.parse(three_position_enabling_device_input);
106 
107  return true;
108 }
109 
111 {
112  return consumer.consume(*this);
113 }
115 {
116  return consumer.consume(*this);
117 }
119 {
120  return consumer.consume(*this);
121 }
virtual bool consumeWith(URStatePacketConsumer &consumer)
virtual bool consume(shared_ptr< StatePacket > packet)
Definition: consumer.h:45
bool euromap67_interface_installed
Definition: master_board.h:46
static const size_t EURO_SIZE
Definition: master_board.h:75
static const size_t EURO_SIZE
Definition: master_board.h:97
virtual bool consumeWith(URStatePacketConsumer &consumer)
virtual bool parseWith(BinParser &bp)
virtual bool consumeWith(URStatePacketConsumer &consumer)
virtual bool parseWith(BinParser &bp)
virtual bool parseWith(BinParser &bp)
virtual bool parseWith(BinParser &bp)
bool checkSize(size_t bytes)
Definition: bin_parser.h:184
void parse(T &val)
Definition: bin_parser.h:96
void consume()
Definition: bin_parser.h:175


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