version_information.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_UR_VERSION_INFORMATION_H_INCLUDED
30 #define UR_CLIENT_LIBRARY_UR_VERSION_INFORMATION_H_INCLUDED
31 
32 #include <string>
33 #include <vector>
34 
36 
37 namespace urcl
38 {
43 {
44 public:
46  ~VersionInformation() = default;
47 
55  static VersionInformation fromString(const std::string& str);
56 
57  bool isESeries() const;
58 
59  friend bool operator==(const VersionInformation& v1, const VersionInformation& v2);
60  friend bool operator!=(const VersionInformation& v1, const VersionInformation& v2);
61  friend bool operator<(const VersionInformation& v1, const VersionInformation& v2);
62  friend bool operator<=(const VersionInformation& v1, const VersionInformation& v2);
63  friend bool operator>(const VersionInformation& v1, const VersionInformation& v2);
64  friend bool operator>=(const VersionInformation& v1, const VersionInformation& v2);
65 
66  friend std::ostream& operator<<(std::ostream& os, const VersionInformation& version_info)
67  {
68  os << version_info.major << "." << version_info.minor << "." << version_info.bugfix << "-" << version_info.build;
69  return os;
70  }
71  uint32_t major;
72  uint32_t minor;
73  uint32_t bugfix;
74  uint32_t build;
75 };
76 
77 std::vector<std::string> splitString(std::string input, const std::string& delimiter = ".");
78 } // namespace urcl
79 
80 #endif // ifndef UR_CLIENT_LIBRARY_UR_VERSION_INFORMATION_H_INCLUDED
uint32_t minor
Minor version number.
friend bool operator==(const VersionInformation &v1, const VersionInformation &v2)
friend bool operator>=(const VersionInformation &v1, const VersionInformation &v2)
uint32_t bugfix
Bugfix version number.
Struct containing a robot&#39;s version information.
friend bool operator<=(const VersionInformation &v1, const VersionInformation &v2)
std::vector< std::string > splitString(std::string input, const std::string &delimiter=".")
friend bool operator>(const VersionInformation &v1, const VersionInformation &v2)
friend bool operator!=(const VersionInformation &v1, const VersionInformation &v2)
uint32_t major
Major version number.
uint32_t build
Build number.
friend bool operator<(const VersionInformation &v1, const VersionInformation &v2)
friend std::ostream & operator<<(std::ostream &os, const VersionInformation &version_info)
static VersionInformation fromString(const std::string &str)
Parses a version string into a VersionInformation object.


ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Tue Jul 4 2023 02:09:47