package.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 #ifndef UR_CLIENT_LIBRARY_PACKAGE_H_INCLUDED
29 #define UR_CLIENT_LIBRARY_PACKAGE_H_INCLUDED
30 
32 
33 namespace urcl
34 {
35 namespace comm
36 {
42 template <typename HeaderT>
43 class URPackage
44 {
45 public:
50  URPackage() = default;
51  virtual ~URPackage() = default;
52 
61  virtual bool parseWith(BinParser& bp) = 0;
62 
68  virtual std::string toString() const = 0;
69 
70  using HeaderType = HeaderT;
71 
72 private:
73  HeaderT header_;
74 };
75 } // namespace comm
76 } // namespace urcl
77 #endif // ifndef UR_CLIENT_LIBRARY_PACKAGE_H_INCLUDED
urcl::comm::URPackage::URPackage
URPackage()=default
Creates a new URPackage object.
bin_parser.h
urcl::comm::URPackage::header_
HeaderT header_
Definition: package.h:73
urcl
Definition: bin_parser.h:36
urcl::comm::URPackage::toString
virtual std::string toString() const =0
Produces a human readable representation of the package object.
urcl::comm::URPackage::~URPackage
virtual ~URPackage()=default
urcl::comm::URPackage::parseWith
virtual bool parseWith(BinParser &bp)=0
Sets the attributes of the package by parsing a serialized representation of the package.
urcl::comm::URPackage
The URPackage a parent class. From that two implementations are inherited, one for the primary,...
Definition: package.h:43
urcl::comm::BinParser
The BinParser class handles a byte buffer and functionality to iteratively parse the content.
Definition: bin_parser.h:44
urcl::comm::URPackage< PackageHeader >::HeaderType
PackageHeader HeaderType
Definition: package.h:70


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