CoLaCommand.h
Go to the documentation of this file.
1 // -- BEGIN LICENSE BLOCK ----------------------------------------------
20 // -- END LICENSE BLOCK ------------------------------------------------
21 
22 #pragma once
23 
24 #include "CoLaCommandType.h"
25 #include "CoLaError.h"
26 #include <cstdint>
27 #include <string>
28 #include <vector>
29 
30 namespace visionary {
31 
33 {
34 private:
35  std::vector<uint8_t> m_buffer;
37  std::string m_name;
40 
43  CoLaCommand(CoLaCommandType::Enum commandType, CoLaError::Enum error, const char* name);
44 
45 public:
47  CoLaCommand(std::vector<uint8_t> buffer);
48  ~CoLaCommand();
49 
51  const std::vector<uint8_t>& getBuffer();
52 
55 
57  const char* getName();
58 
60  size_t getParameterOffset();
61 
64 
67 };
68 
69 } // namespace visionary
visionary::CoLaCommand::networkErrorCommand
static CoLaCommand networkErrorCommand()
Create a command for network errors.
Definition: CoLaCommand.cpp:118
visionary
Definition: AuthenticationLegacy.h:25
visionary::CoLaCommand
Definition: CoLaCommand.h:32
visionary::CoLaCommand::CoLaCommand
CoLaCommand(CoLaCommandType::Enum commandType, CoLaError::Enum error, const char *name)
Construct a new CoLaCommand with the given command type, error, and name, but without any data.
Definition: CoLaCommand.cpp:29
visionary::CoLaCommand::getError
CoLaError::Enum getError()
Get error.
Definition: CoLaCommand.cpp:113
visionary::CoLaCommand::m_type
CoLaCommandType::Enum m_type
Definition: CoLaCommand.h:36
visionary::CoLaCommand::m_error
CoLaError::Enum m_error
Definition: CoLaCommand.h:39
visionary::CoLaError::Enum
Enum
Possible CoLa errors.
Definition: CoLaError.h:28
visionary::CoLaCommand::getBuffer
const std::vector< uint8_t > & getBuffer()
Get the binary data buffer.
Definition: CoLaCommand.cpp:93
CoLaCommandType.h
visionary::CoLaCommand::~CoLaCommand
~CoLaCommand()
Definition: CoLaCommand.cpp:91
visionary::CoLaCommand::getName
const char * getName()
Get the name of command.
Definition: CoLaCommand.cpp:103
visionary::CoLaCommand::getParameterOffset
size_t getParameterOffset()
Get offset in bytes to where first parameter starts.
Definition: CoLaCommand.cpp:108
visionary::CoLaCommandType::Enum
Enum
Definition: CoLaCommandType.h:28
CoLaError.h
visionary::CoLaCommand::m_name
std::string m_name
Definition: CoLaCommand.h:37
visionary::CoLaCommand::getType
CoLaCommandType::Enum getType()
Get the type of command.
Definition: CoLaCommand.cpp:98
visionary::CoLaCommand::m_parameterOffset
size_t m_parameterOffset
Definition: CoLaCommand.h:38
visionary::CoLaCommand::m_buffer
std::vector< uint8_t > m_buffer
Definition: CoLaCommand.h:35


sick_safevisionary_base
Author(s):
autogenerated on Sat Oct 21 2023 02:24:26