Represents a single MIDI endpoint, which may have up to one input and up to one output. More...
Public Member Functions | |
Endpoint ()=default | |
Endpoint | withName (String x) const |
Endpoint | withProtocol (std::optional< PacketProtocol > x) const |
Endpoint | withDeviceInfo (DeviceInfo x) const |
Endpoint | withProductInstanceId (String x) const |
Endpoint | withUMPVersion (uint8_t major, uint8_t minor) const |
Endpoint | withStaticBlocks (bool x=true) const |
Endpoint | withMidi1Support (bool x=true) const |
Endpoint | withMidi2Support (bool x=true) const |
Endpoint | withReceiveJRSupport (bool x=true) const |
Endpoint | withTransmitJRSupport (bool x=true) const |
Endpoint | withReceiveJREnabled (bool x=true) const |
Endpoint | withTransmitJREnabled (bool x=true) const |
Endpoint | withBlocks (Span< const Block > x) const |
The block index is used to uniquely identify the block, so be sure to always declare blocks in a consistent order. | |
Endpoint | withNumBlocks (size_t x) const |
The number of blocks on this endpoint. | |
String | getName () const |
Returns the name of this endpoint. | |
DeviceInfo | getDeviceInfo () const |
Returns properties of the device that owns the endpoint. | |
String | getProductInstanceId () const |
Returns the product instance ID if available, or an empty string otherwise. | |
std::optional< PacketProtocol > | getProtocol () const |
The protocol that the endpoint currently expects to send and receive; endpoints are allowed to switch protocols, so this won't always return the same value. | |
uint8_t | getUMPVersionMajor () const |
uint8_t | getUMPVersionMinor () const |
bool | hasStaticBlocks () const |
bool | hasMidi1Support () const |
bool | hasMidi2Support () const |
bool | hasReceiveJRSupport () const |
bool | hasTransmitJRSupport () const |
bool | isReceiveJREnabled () const |
bool | isTransmitJREnabled () const |
Span< const Block > | getBlocks () const & |
There can be a maximum of 32 blocks. | |
Span< Block > | getBlocks () & |
Returns a mutable view over the blocks in this endpoint. | |
Span< const Block > | getBlocks () const &&=delete |
Span< Block > | getBlocks () &&=delete |
Represents a single MIDI endpoint, which may have up to one input and up to one output.
An Endpoint object just holds a snapshot of the physical endpoint's last known state at the point when the Endpoint instance was created. Instead of storing Endpoint instances, it's a better idea to store an EndpointId, and to call Endpoints::getEndpoint() to get an up-to-date snapshot.
To connect to an endpoint, use Session::connectInput() or Session::connectOutput() to create a connection in the context of a particular session.
|
default |
References Endpoint(), withMember(), and x.
|
nodiscard |
References Endpoint(), withMember(), and x.
|
nodiscard |
References Endpoint(), withMember(), and x.
References Endpoint(), withMember(), and x.
|
nodiscard |
References Endpoint(), and withMember().
|
nodiscard |
References Endpoint(), withMember(), and x.
|
nodiscard |
References Endpoint(), withMember(), and x.
|
nodiscard |
References Endpoint(), withMember(), and x.
|
nodiscard |
References Endpoint(), withMember(), and x.
|
nodiscard |
References Endpoint(), withMember(), and x.
|
nodiscard |
References Endpoint(), withMember(), and x.
|
nodiscard |
References Endpoint(), withMember(), and x.
The block index is used to uniquely identify the block, so be sure to always declare blocks in a consistent order.
References Endpoint(), withNumBlocks(), and x.
|
nodiscard |
The number of blocks on this endpoint.
References Endpoint(), jassert, and x.
Referenced by withBlocks().
String universal_midi_packets::Endpoint::getName | ( | ) | const |
Returns the name of this endpoint.
DeviceInfo universal_midi_packets::Endpoint::getDeviceInfo | ( | ) | const |
Returns properties of the device that owns the endpoint.
String universal_midi_packets::Endpoint::getProductInstanceId | ( | ) | const |
Returns the product instance ID if available, or an empty string otherwise.
The product instance ID should match the device serial number, and should be unique per manufacturer, family, and model.
This ID can be used to distinguish between separate devices that have the same DeviceInfo. It can also be used to determine whether separate endpoints are associated with the same device.
std::optional< PacketProtocol > universal_midi_packets::Endpoint::getProtocol | ( | ) | const |
The protocol that the endpoint currently expects to send and receive; endpoints are allowed to switch protocols, so this won't always return the same value.
May return nullopt if the protocol is unknown, perhaps because negotiation has not taken place.
uint8_t universal_midi_packets::Endpoint::getUMPVersionMajor | ( | ) | const |
uint8_t universal_midi_packets::Endpoint::getUMPVersionMinor | ( | ) | const |
bool universal_midi_packets::Endpoint::hasStaticBlocks | ( | ) | const |
bool universal_midi_packets::Endpoint::hasMidi1Support | ( | ) | const |
bool universal_midi_packets::Endpoint::hasMidi2Support | ( | ) | const |
bool universal_midi_packets::Endpoint::hasReceiveJRSupport | ( | ) | const |
bool universal_midi_packets::Endpoint::hasTransmitJRSupport | ( | ) | const |
bool universal_midi_packets::Endpoint::isReceiveJREnabled | ( | ) | const |
bool universal_midi_packets::Endpoint::isTransmitJREnabled | ( | ) | const |
There can be a maximum of 32 blocks.
This may return an empty span if the endpoint has neither function blocks nor group terminal blocks.
Referenced by getBlocks().
Returns a mutable view over the blocks in this endpoint.
References getBlocks().