aboutsummaryrefslogtreecommitdiffstats
path: root/daemon/src/message.h
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/src/message.h')
-rw-r--r--daemon/src/message.h27
1 files changed, 5 insertions, 22 deletions
diff --git a/daemon/src/message.h b/daemon/src/message.h
index 9339118..4668e0c 100644
--- a/daemon/src/message.h
+++ b/daemon/src/message.h
@@ -11,31 +11,14 @@ namespace midi_router
struct Message
{
- enum class Type
- {
- NOTE_OFF = 0x8u,
- NOTE_ON = 0x9u,
- POLY_AT = 0xAu,
- CONTROL_CHANGE = 0xBu,
- PROGRAM_CHANGE = 0xCu,
- CHANNEL_AT = 0xDu,
- PITCH_WHEEL = 0xEu,
-
- CLOCK = 0xF8u,
- MEAS_END = 0xF9u,
- START = 0xFAu,
- CONTINUE = 0xFBu,
- STOP = 0xFCu,
- };
-
- Device_Id const & source_id;
- std::array<std::uint8_t, 3> const bytes;
+ Device_Id const * source_id;
+ std::array<std::uint8_t, 3> bytes;
- Type
+ Message_Type
type() const
{
- if (bytes[0] & 0xF0 == 0xF0) return static_cast<Type>(bytes[0]);
- else return static_cast<Type>(bytes[0] >> 4);
+ if (bytes[0] & 0xF0 == 0xF0) return static_cast<Message_Type>(bytes[0]);
+ else return static_cast<Message_Type>(bytes[0] >> 4);
}
};