Loading...
Searching...
No Matches
juce::midi_ci::Parser Class Reference

## Detailed Description

Parses CI messages.

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

- juce_midi_ci/ci/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.

## Member Enums

## 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.

## Constructors and Destructors

## Parser()

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

delete

## Member Functions

## parse() [1/2]

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]

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()

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

static

Returns a human-readable string describing the message.

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited