JUCE: juce::midi_ci::Parser Class Reference

JUCE

- Main Page
- Related Pages
- Topics
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
juce::midi_ci::Parser Class Reference
juce_midi_ci » ci

Parses CI messages. More...

`#include <juce_CIParser.h>`

## Public Types
enum class | Status { noError , mismatchedMUID , collidingMUID , unrecognisedMessage , reservedVersion , malformed }

## Public Member Functions
| Parser ()=delete

## Static Public Member Functions
static std::optional< Message::Parsed > | parse (MUID ourMUID, Span< const std::byte > message, Status *=nullptr)
| Parses the provided message;.
static std::optional< Message::Parsed > | parse (Span< const std::byte > message, Status *=nullptr)
| Parses the provided message;.
static String | getMessageDescription (const Message::Parsed &message)
| Returns a human-readable string describing the message.

## Detailed Description

Parses CI messages.

## Member Enumeration Documentation

## ◆ Status

enum class juce::midi_ci::Parser::Status
| strong

Enumerator
noError | Parsing was successful.
mismatchedMUID | The message destination MUID doesn't match the provided MUID.
collidingMUID | The message source MUID matches the provided MUID.
unrecognisedMessage | The message ID doesn't correspond to a known message.
reservedVersion | The MIDI CI version uses an unrecognised major version.
malformed | The message (whole message, or just body) could not be parsed.

## Constructor & Destructor Documentation

## ◆ Parser()

juce::midi_ci::Parser::Parser | ( |  | ) |
| delete

## Member Function Documentation

## ◆ parse() [1/2]

static std::optional< Message::Parsed > juce::midi_ci::Parser::parse | ( | MUID | ourMUID,
|  | Span< const std::byte > | message,
|  | Status * | = `nullptr`
| ) |  |
| static

Parses the provided message;.

Call this with a full CI message. Don't include any "extra" bytes such as the leading/trailing 0xf0/0xf7 for messages that were originally in bytestream midi format, or the packet-header bytes from UMP-formatted sysex messages.

Returns nullopt if the message doesn't need to be acknowledged by the entity with the provided MUID, or if the message is malformed. Otherwise, returns a parsed header, and optionally a body. If the body is std::monostate, then something went wrong while parsing. For example, the body may be malformed, or the CI version might be unrecognised.

## ◆ parse() [2/2]

static std::optional< Message::Parsed > juce::midi_ci::Parser::parse | ( | Span< const std::byte > | message,
|  | Status * | = `nullptr`
| ) |  |
| static

Parses the provided message;.

Call this with a full CI message. Don't include any "extra" bytes such as the leading/trailing 0xf0/0xf7 for messages that were originally in bytestream midi format, or the packet-header bytes from UMP-formatted sysex messages.

Returns nullopt if the message is malformed. Otherwise, returns a parsed header, and optionally a body. If the body is std::monostate, then something went wrong while parsing. For example, the body may be malformed, or the CI version might be unrecognised.

## ◆ getMessageDescription()

static String juce::midi_ci::Parser::getMessageDescription | ( | const Message::Parsed & | message | ) |
| static

Returns a human-readable string describing the message.

The documentation for this class was generated from the following file:

- juce_CIParser.h