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