mirror of
https://github.com/halleysfifthinc/AVCLAN-Mockingboard.git
synced 2026-08-06 17:03:17 +00:00
Move Error::Parse enum into avclan.h
This commit is contained in:
@@ -151,6 +151,12 @@ struct Error {
|
||||
MUTED,
|
||||
};
|
||||
|
||||
enum AVCLAN_ENUM_CLASS Parse : uint8_t {
|
||||
TOO_SHORT = 0x01,
|
||||
MISMATCH_LENGTH,
|
||||
LENGTH_TOO_BIG,
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
#include "frame.hpp"
|
||||
|
||||
namespace {
|
||||
using Error = avclan::Frame::Error;
|
||||
using Error = avclan::detail::Error;
|
||||
using enum Error::Parse;
|
||||
} // namespace
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include "avclan.h"
|
||||
|
||||
namespace avclan {
|
||||
enum class Device : uint8_t;
|
||||
|
||||
@@ -16,13 +18,7 @@ struct Frame {
|
||||
bool binary : 1 = false; // if printing, format as binary instead of text
|
||||
bool verbose : 1 = false; // include extra context in error reports
|
||||
};
|
||||
struct Error {
|
||||
enum class Parse : uint8_t {
|
||||
TOO_SHORT = 0x01,
|
||||
MISMATCH_LENGTH,
|
||||
LENGTH_TOO_BIG,
|
||||
};
|
||||
};
|
||||
using Error = detail::Error;
|
||||
static constexpr int MAXLENGTH = 32;
|
||||
|
||||
Error::Parse parse(const uint8_t *bytes, uint8_t len);
|
||||
|
||||
Reference in New Issue
Block a user