robot_state.h
Go to the documentation of this file.
1 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2 
3 // -- BEGIN LICENSE BLOCK ----------------------------------------------
4 // Copyright 2019 FZI Forschungszentrum Informatik
5 // Created on behalf of Universal Robots A/S
6 //
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 // http://www.apache.org/licenses/LICENSE-2.0
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 // -- END LICENSE BLOCK ------------------------------------------------
19 
20 //----------------------------------------------------------------------
27 //----------------------------------------------------------------------
28 
29 #ifndef UR_CLIENT_LIBRARY_ROBOT_STATE_H_INCLUDED
30 #define UR_CLIENT_LIBRARY_ROBOT_STATE_H_INCLUDED
31 
34 
35 namespace urcl
36 {
37 namespace primary_interface
38 {
42 enum class RobotStateType : uint8_t
43 {
44  ROBOT_MODE_DATA = 0,
45  JOINT_DATA = 1,
46  TOOL_DATA = 2,
47  MASTERBOARD_DATA = 3,
48  CARTESIAN_INFO = 4,
49  KINEMATICS_INFO = 5,
51  FORCE_MODE_DATA = 7,
52  ADDITIONAL_INFO = 8,
54 };
55 
59 class RobotState : public PrimaryPackage
60 {
61 public:
62  RobotState() = delete;
69  {
70  }
71  virtual ~RobotState() = default;
72 
81  virtual bool parseWith(comm::BinParser& bp);
82 
90  virtual bool consumeWith(AbstractPrimaryConsumer& consumer);
91 
97  virtual std::string toString() const;
98 
99 private:
101 };
102 
103 } // namespace primary_interface
104 } // namespace urcl
105 
106 #endif /* UR_CLIENT_LIBRARY_ROBOT_STATE_H_INCLUDED */
urcl::primary_interface::RobotStateType::MASTERBOARD_DATA
@ MASTERBOARD_DATA
urcl::primary_interface::RobotState::RobotState
RobotState(const RobotStateType type)
Creates a new RobotState object, setting the type of state message.
Definition: robot_state.h:68
urcl::primary_interface::RobotStateType::ADDITIONAL_INFO
@ ADDITIONAL_INFO
package_header.h
urcl
Definition: bin_parser.h:36
urcl::primary_interface::RobotStateType::CARTESIAN_INFO
@ CARTESIAN_INFO
primary_package.h
urcl::primary_interface::RobotState::~RobotState
virtual ~RobotState()=default
urcl::primary_interface::RobotStateType::KINEMATICS_INFO
@ KINEMATICS_INFO
urcl::primary_interface::RobotStateType::CONFIGURATION_DATA
@ CONFIGURATION_DATA
urcl::primary_interface::RobotState::toString
virtual std::string toString() const
Produces a human readable representation of the package object.
Definition: robot_state.cpp:47
urcl::primary_interface::RobotState::RobotState
RobotState()=delete
urcl::primary_interface::RobotStateType::ROBOT_MODE_DATA
@ ROBOT_MODE_DATA
urcl::primary_interface::RobotStateType
RobotStateType
Possible RobotState types.
Definition: robot_state.h:42
urcl::primary_interface::RobotStateType::JOINT_DATA
@ JOINT_DATA
urcl::primary_interface::RobotStateType::CALIBRATION_DATA
@ CALIBRATION_DATA
urcl::primary_interface::RobotState
Base class for a RobotState data packages will be used directly.
Definition: robot_state.h:59
urcl::primary_interface::RobotState::consumeWith
virtual bool consumeWith(AbstractPrimaryConsumer &consumer)
Consume this specific package with a specific consumer.
Definition: robot_state.cpp:42
urcl::comm::BinParser
The BinParser class handles a byte buffer and functionality to iteratively parse the content.
Definition: bin_parser.h:44
urcl::primary_interface::RobotStateType::FORCE_MODE_DATA
@ FORCE_MODE_DATA
urcl::primary_interface::PrimaryPackage
The PrimaryPackage is solely an abstraction level. It inherits form the URPackage and is also a paren...
Definition: primary_package.h:46
urcl::primary_interface::RobotStateType::TOOL_DATA
@ TOOL_DATA
urcl::primary_interface::RobotState::parseWith
virtual bool parseWith(comm::BinParser &bp)
Sets the attributes of the package by parsing a serialized representation of the package.
Definition: robot_state.cpp:37
urcl::primary_interface::AbstractPrimaryConsumer
Base consumer for primary packages.
Definition: abstract_primary_consumer.h:50
urcl::primary_interface::RobotState::state_type_
RobotStateType state_type_
Definition: robot_state.h:100


ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Mon May 26 2025 02:35:58