MidiOutputPort Class Reference

#include <midioutputport.h>

Public Member Functions

 MidiOutputPort ()=default
 MidiOutputPort (MidiService &service)
virtual bool start (utility::ErrorState &errorState) override
virtual void stop () override
MidiServicegetService ()
void sendEvent (const MidiEvent &event)
int getPortNumber () const
- Public Member Functions inherited from Resource
 Resource ()
- Public Member Functions inherited from Object
 Object ()
virtual ~Object ()
virtual bool init (utility::ErrorState &errorState)
virtual void onDestroy ()
 Object (Object &)=delete
Objectoperator= (const Object &)=delete
 Object (Object &&)=delete
Objectoperator= (Object &&)=delete

Public Attributes

std::string mPortName = ""
 Property: 'Port' The name of the port that midi messages will be sent through. More...
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)

Detailed Description

Opens and manages a midi output port that midi messages can be sent to.

Inheritance diagram for MidiOutputPort:
Collaboration diagram for MidiOutputPort:

Constructor & Destructor Documentation

◆ MidiOutputPort() [1/2]

MidiOutputPort ( )

◆ MidiOutputPort() [2/2]

MidiOutputPort ( MidiService service)

Member Function Documentation

◆ getPortNumber()

int getPortNumber ( ) const
: the number of the midi port that messages will be sent through by this object

◆ getService()

MidiService& getService ( )
the midi device service.

◆ sendEvent()

void sendEvent ( const MidiEvent event)

Sends a midi event through this output port.

eventthe event to send.

◆ start()

virtual bool start ( utility::ErrorState errorState)

Starts the midi output port.

errorStatecontains the reason why the port could not be opened.
if the midi output port opened successfully.

Reimplemented from Device.

◆ stop()

virtual void stop ( )

Stops the midi output port.

Reimplemented from Device.

Member Data Documentation

◆ mPortName

std::string mPortName = ""

Property: 'Port' The name of the port that midi messages will be sent through.