openMSX
|
Pluggable that connects an MSX MIDI out port to a host MIDI device. More...
#include <MidiOutDevice.hh>
Public Member Functions | |
std::string_view | getClass () const final |
A pluggable belongs to a certain class. | |
void | recvByte (byte value, EmuTime::param time) override |
void | setDataBits (DataBits bits) override |
void | setStopBits (StopBits bits) override |
void | setParityBit (bool enable, Parity parity) override |
Public Member Functions inherited from openmsx::Pluggable | |
virtual | ~Pluggable ()=default |
virtual std::string_view | getName () const |
Name used to identify this pluggable. | |
virtual std::string_view | getDescription () const =0 |
Description for this pluggable. | |
void | plug (Connector &connector, EmuTime::param time) |
This method is called when this pluggable is inserted in a connector. | |
void | unplug (EmuTime::param time) |
This method is called when this pluggable is removed from a connector. | |
Connector * | getConnector () const |
Get the connector this Pluggable is plugged into. | |
bool | isPluggedIn () const |
Returns true if this pluggable is currently plugged into a connector. | |
Static Public Attributes | |
static constexpr size_t | MAX_MESSAGE_SIZE = 256 |
The limit for the amount of data we'll put into one MIDI message. | |
Protected Member Functions | |
MidiOutDevice ()=default | |
void | clearBuffer () |
Discard any buffered partial MIDI message. | |
virtual void | recvMessage (const std::vector< uint8_t > &message, EmuTime::param time) |
Called when a full MIDI message is ready to be sent. | |
Protected Member Functions inherited from openmsx::Pluggable | |
Pluggable () | |
virtual void | plugHelper (Connector &newConnector, EmuTime::param time)=0 |
virtual void | unplugHelper (EmuTime::param time)=0 |
void | setConnector (Connector *conn) |
Protected Member Functions inherited from openmsx::SerialDataInterface | |
~SerialDataInterface ()=default | |
Additional Inherited Members | |
Public Types inherited from openmsx::SerialDataInterface | |
enum class | DataBits { D5 = 5 , D6 = 6 , D7 = 7 , D8 = 8 } |
enum class | StopBits { INV = 0 , S1 = 2 , S1_5 = 3 , S2 = 4 } |
enum class | Parity { EVEN = 0 , ODD = 1 } |
Pluggable that connects an MSX MIDI out port to a host MIDI device.
Implementations must override either recvByte(), if they can handle raw data, or recvMessage(), if they handle MIDI messages.
Definition at line 15 of file MidiOutDevice.hh.
|
explicitprotecteddefault |
|
protected |
Discard any buffered partial MIDI message.
Definition at line 54 of file MidiOutDevice.cc.
|
finalvirtual |
A pluggable belongs to a certain class.
A pluggable only fits in connectors of the same class.
Implements openmsx::Pluggable.
Definition at line 49 of file MidiOutDevice.cc.
|
overridevirtual |
Implements openmsx::SerialDataInterface.
Reimplemented in openmsx::MidiOutLogger.
Definition at line 60 of file MidiOutDevice.cc.
References recvMessage().
Referenced by openmsx::MidiOutConnector::recvByte().
|
protectedvirtual |
Called when a full MIDI message is ready to be sent.
Implementations that can handle raw bytes can override recvByte() instead, in which case this method will not be called.
Reimplemented in openmsx::MidiOutALSA.
Definition at line 119 of file MidiOutDevice.cc.
References UNREACHABLE.
Referenced by recvByte().
|
overridevirtual |
Implements openmsx::SerialDataInterface.
Definition at line 125 of file MidiOutDevice.cc.
Referenced by openmsx::MidiOutConnector::setDataBits().
|
overridevirtual |
Implements openmsx::SerialDataInterface.
Definition at line 135 of file MidiOutDevice.cc.
Referenced by openmsx::MidiOutConnector::setParityBit().
|
overridevirtual |
Implements openmsx::SerialDataInterface.
Definition at line 130 of file MidiOutDevice.cc.
Referenced by openmsx::MidiOutConnector::setStopBits().
|
staticconstexpr |
The limit for the amount of data we'll put into one MIDI message.
The value of 256 comes from the data limit for a MIDIPacket in CoreMIDI.
Definition at line 21 of file MidiOutDevice.hh.