1
0
mirror of https://gitlab.com/obbart/universal_robots_ros_driver.git synced 2026-04-10 10:00:48 +02:00

Refactoring, improvements and fixes

This commit is contained in:
Simon Rasmussen
2017-02-09 12:16:51 +01:00
parent e94bbb5536
commit 43974dcbf2
10 changed files with 258 additions and 97 deletions

View File

@@ -1,6 +1,21 @@
#pragma once
#include <cstddef>
#include <inttypes.h>
#include "ur_modern_driver/packet.h"
class MessageBase {
enum class robot_message_type : uint8_t {
ROBOT_MESSAGE_TEXT = 0,
ROBOT_MESSAGE_PROGRAM_LABEL = 1,
PROGRAM_STATE_MESSAGE_VARIABLE_UPDATE = 2,
ROBOT_MESSAGE_VERSION = 3,
ROBOT_MESSAGE_SAFETY_MODE = 5,
ROBOT_MESSAGE_ERROR_CODE = 6,
ROBOT_MESSAGE_KEY = 7,
ROBOT_MESSAGE_REQUEST_VALUE = 9,
ROBOT_MESSAGE_RUNTIME_EXCEPTION = 10
};
class MessageBase : public Packet {
public:
virtual bool parse_with(BinParser &bp) = 0;
@@ -17,4 +32,4 @@ public:
uint8_t minor_version;
int32_t svn_version;
std::string build_date;
}
};