master_board.h
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 
19 #pragma once
20 
21 #include <inttypes.h>
22 #include <bitset>
23 #include <cstddef>
25 #include "ur_modern_driver/types.h"
27 
29 {
30 public:
31  virtual bool parseWith(BinParser& bp);
32 
35  double analog_input0;
36  double analog_input1;
45 
47 
48  // euromap fields are dynamic so don't include in SIZE
51 
52  static const size_t SIZE = sizeof(double) * 4 + sizeof(int8_t) * 4 + sizeof(float) * 4 + sizeof(uint8_t);
53 
54  static const size_t EURO_SIZE = sizeof(int32_t) * 2;
55 };
56 
58 {
59 public:
60  virtual bool parseWith(BinParser& bp);
61  virtual bool consumeWith(URStatePacketConsumer& consumer);
62 
63  std::bitset<10> digital_input_bits;
64  std::bitset<10> digital_output_bits;
65 
68 
69  // euromap fields are dynamic so don't include in SIZE
70  int16_t euromap_voltage;
71  int16_t euromap_current;
72 
73  static const size_t SIZE = SharedMasterBoardData::SIZE + sizeof(int16_t) * 2 + sizeof(uint8_t) * 2;
74 
75  static const size_t EURO_SIZE = SharedMasterBoardData::EURO_SIZE + sizeof(int16_t) * 2;
76 };
77 
79 {
80 public:
81  virtual bool parseWith(BinParser& bp);
82  virtual bool consumeWith(URStatePacketConsumer& consumer);
83 
84  std::bitset<18> digital_input_bits;
85  std::bitset<18> digital_output_bits;
86 
87  uint8_t safety_mode;
89 
90  // euromap fields are dynamic so don't include in SIZE
93 
94  static const size_t SIZE = SharedMasterBoardData::SIZE + sizeof(int32_t) * 2 + sizeof(uint8_t) * 2 +
95  sizeof(uint32_t); // UR internal field we skip
96 
97  static const size_t EURO_SIZE = SharedMasterBoardData::EURO_SIZE + sizeof(float) * 2;
98 };
99 
101 {
102 public:
103  virtual bool parseWith(BinParser& bp);
104  virtual bool consumeWith(URStatePacketConsumer& consumer);
105 
108 
109  static const size_t SIZE = MasterBoardData_V3_0__1::SIZE + sizeof(uint8_t) * 2;
110 };
std::bitset< 10 > digital_output_bits
Definition: master_board.h:64
static const size_t SIZE
Definition: master_board.h:94
bool euromap67_interface_installed
Definition: master_board.h:46
uint8_t three_position_enabling_device_input
Definition: master_board.h:107
std::bitset< 10 > digital_input_bits
Definition: master_board.h:63
uint8_t operational_mode_selector_input
Definition: master_board.h:106
uint8_t master_safety_state
Definition: master_board.h:66
virtual bool parseWith(BinParser &bp)
static const size_t SIZE
Definition: master_board.h:52
std::bitset< 18 > digital_output_bits
Definition: master_board.h:85
std::bitset< 18 > digital_input_bits
Definition: master_board.h:84
static const size_t EURO_SIZE
Definition: master_board.h:54


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