Loading...
Searching...
No Matches
universal_midi_packets::Block Class Reference

Represents a Function Block (FB) or Group Terminal Block (GTB). More...

Public Member Functions

 Block ()=default
Block withName (const String &x) const
Block withFirstGroup (uint8_t x) const
Block withNumGroups (uint8_t x) const
Block withMaxSysex8Streams (uint8_t x) const
Block withEnabled (bool x=true) const
Block withUiHint (BlockUiHint x) const
Block withMIDI1ProxyKind (BlockMIDI1ProxyKind x) const
Block withDirection (BlockDirection x) const
String getName () const
 The name of the block, if any.
BlockInfo getInfo () const
 All info relating to this block.
uint8_t getFirstGroup () const
 In the range 0x0 to 0xF inclusive.
uint8_t getNumGroups () const
 In the range 0x01 to 0x10 inclusive.
uint8_t getMaxSysex8Streams () const
 The number of simultaneous Sysex8 streams that are supported.
BlockUiHint getUiHint () const
 Some blocks may support bidirectional communication (e.g.
BlockMIDI1ProxyKind getMIDI1ProxyKind () const
 If this block is a proxy for a MIDI 1.0 stream, describes the capabilities of that stream.
BlockDirection getDirection () const
 Returns the message transmission directions that are supported by this block.
bool isEnabled () const
 True if this block is enabled.
bool nameMatches (const Block &other) const
 True if the names of the two blocks match.
bool infoMatches (const Block &other) const
 True if the BlockInfo of the two blocks match.
bool operator== (const Block &other) const
bool operator!= (const Block &other) const

Detailed Description

Represents a Function Block (FB) or Group Terminal Block (GTB).

GTBs are only available in USB MIDI, so devices on non-USB transports will not expose GTB information. In the case that a device only exposes GTBs and not FBs, default values will be used for any fields that are unavailable in the GTB definition.

See also
BlockInfo

Constructor & Destructor Documentation

◆ Block()

Member Function Documentation

◆ withName()

Block universal_midi_packets::Block::withName ( const String & x) const
nodiscard

References Block(), withMember(), and x.

◆ withFirstGroup()

Block universal_midi_packets::Block::withFirstGroup ( uint8_t x) const
nodiscard

References Block(), withMember(), and x.

◆ withNumGroups()

Block universal_midi_packets::Block::withNumGroups ( uint8_t x) const
nodiscard

References Block(), withMember(), and x.

◆ withMaxSysex8Streams()

Block universal_midi_packets::Block::withMaxSysex8Streams ( uint8_t x) const
nodiscard

References Block(), withMember(), and x.

◆ withEnabled()

Block universal_midi_packets::Block::withEnabled ( bool x = true) const
nodiscard

References Block(), withMember(), and x.

◆ withUiHint()

Block universal_midi_packets::Block::withUiHint ( BlockUiHint x) const
nodiscard

References Block(), withMember(), and x.

◆ withMIDI1ProxyKind()

Block universal_midi_packets::Block::withMIDI1ProxyKind ( BlockMIDI1ProxyKind x) const
nodiscard

References Block(), withMember(), and x.

◆ withDirection()

Block universal_midi_packets::Block::withDirection ( BlockDirection x) const
nodiscard

References Block(), withMember(), and x.

◆ getName()

String universal_midi_packets::Block::getName ( ) const

The name of the block, if any.

◆ getInfo()

BlockInfo universal_midi_packets::Block::getInfo ( ) const

All info relating to this block.

◆ getFirstGroup()

uint8_t universal_midi_packets::Block::getFirstGroup ( ) const

In the range 0x0 to 0xF inclusive.

◆ getNumGroups()

uint8_t universal_midi_packets::Block::getNumGroups ( ) const

In the range 0x01 to 0x10 inclusive.

◆ getMaxSysex8Streams()

uint8_t universal_midi_packets::Block::getMaxSysex8Streams ( ) const

The number of simultaneous Sysex8 streams that are supported.

◆ getUiHint()

BlockUiHint universal_midi_packets::Block::getUiHint ( ) const

Some blocks may support bidirectional communication (e.g.

for CI) but function predominantly as a sender or receiver. The direction returned here is a hint to the user that doesn't necessarily reflect the hardware capabilities.

◆ getMIDI1ProxyKind()

BlockMIDI1ProxyKind universal_midi_packets::Block::getMIDI1ProxyKind ( ) const

If this block is a proxy for a MIDI 1.0 stream, describes the capabilities of that stream.

◆ getDirection()

BlockDirection universal_midi_packets::Block::getDirection ( ) const

Returns the message transmission directions that are supported by this block.

Use this to determine block capabilities. For information that will be displayed to the user, prefer getUIHint().

◆ isEnabled()

bool universal_midi_packets::Block::isEnabled ( ) const

True if this block is enabled.

◆ nameMatches()

bool universal_midi_packets::Block::nameMatches ( const Block & other) const

True if the names of the two blocks match.

References Block().

◆ infoMatches()

bool universal_midi_packets::Block::infoMatches ( const Block & other) const

True if the BlockInfo of the two blocks match.

References Block().

◆ operator==()

bool universal_midi_packets::Block::operator== ( const Block & other) const

References Block(), and x.

Referenced by operator!=().

◆ operator!=()

bool universal_midi_packets::Block::operator!= ( const Block & other) const

References Block(), and operator==().

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram