Define composable command interface
This commit is contained in:
parent
2c6396fbf5
commit
0af1561820
1 changed files with 12 additions and 0 deletions
|
@ -1,9 +1,21 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "Protocol.h"
|
#include "Protocol.h"
|
||||||
|
#include <etl/optional.h>
|
||||||
|
#include <etl/span.h>
|
||||||
#include <etl/string.h>
|
#include <etl/string.h>
|
||||||
|
|
||||||
namespace message {
|
namespace message {
|
||||||
namespace composer {
|
namespace composer {
|
||||||
|
enum class ComposableType {
|
||||||
|
MESSAGE_LIGHTDATA,
|
||||||
|
MESSAGE_INFO,
|
||||||
|
MESSAGE_WARNING,
|
||||||
|
MESSAGE_ERROR,
|
||||||
|
MESSAGE_SUCCESS,
|
||||||
|
COMMAND_HELP,
|
||||||
|
COMMAND_VERSION,
|
||||||
|
};
|
||||||
|
using Composable = etl::pair<ComposableType, etl::optional<etl::span<uint8_t>>>;
|
||||||
bool sendMessage(protocol::Message type, etl::string_view content);
|
bool sendMessage(protocol::Message type, etl::string_view content);
|
||||||
} // namespace composer
|
} // namespace composer
|
||||||
} // namespace message
|
} // namespace message
|
||||||
|
|
Reference in a new issue