6 #ifndef MOTORCORTEX_CORE_PS_PARAMTYPE_H 
    7 #define MOTORCORTEX_CORE_PS_PARAMTYPE_H 
   15 namespace parameter_server {
 
   20   static constexpr uint32_t FULL_LENGTH{std::numeric_limits<uint32_t>::max()};
 
   35   ParameterPath(std::string path, Type type) : path_{std::move(path)}, type_{type} {
 
   38   ParameterPath(std::string path, uint32_t element_offset) : path_{std::move(path)},
 
   39                                                              element_offset_{element_offset}, length_{1} {
 
   42   ParameterPath(std::string path, Type type, uint32_t element_offset) : path_{std::move(path)}, type_{type},
 
   43                                                                         element_offset_{element_offset}, length_{1} {
 
   46   ParameterPath(std::string path, uint32_t element_offset, uint32_t length) : path_{std::move(path)},
 
   47                                                                               element_offset_{element_offset},
 
   52                 uint32_t element_offset, uint32_t length) : path_{std::move(path)}, type_{type},
 
   53                                                             element_offset_{element_offset}, length_{length} {
 
   57   uint32_t getElementOffset()
 const {
 
   58     return element_offset_;
 
   61   uint32_t getLength()
 const {
 
   65   const char* getPath()
 const {
 
   69   bool isRelative()
 const {
 
   70     return type_ == Type::RELATIVE;
 
   76   Type type_{Type::ABSOLUTE};
 
   77   uint32_t element_offset_{0};
 
   78   uint32_t length_{FULL_LENGTH};
 
   85 #endif //MOTORCORTEX_CORE_PS_PARAMTYPE_H