dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::coremidi::_device< desc_t, preference_t, stream_t > Class Template Reference

CoreMIDI client device. More...

#include <dx_coremidi_device.h>

Inheritance diagram for dx::coremidi::_device< desc_t, preference_t, stream_t >:
Collaboration diagram for dx::coremidi::_device< desc_t, preference_t, stream_t >:

Public Types

typedef desc_t desc_t
typedef event event_t
typedef std::conditional_t< std::is_void_v< void >, dx::stream::group< device >, void > group_t
 bus devices driving their groups' tick pass their own group type
typedef promoted< uint32_t >::template preference< decltype(dx::device<::MIDIDeviceRef, preference_t >::preference)> source_t
typedef stream_t stream_t

Public Member Functions

 _device (decltype(super::driver)&driver, decltype(super::id)&id)
void attach (channel_t **io[dx::stream::direction::directions][2], const std::vector< bool >(&channel_map)[2])
void conclude () noexcept override
 ends every group's session before the device's resources go; the start counts stay with their holders
void exception (const dx::exception &exception, bool filtered=false) const noexcept override
 notification exception handler
virtual uint64_t frame () const
virtual bool hw_clock () const noexcept
virtual void hw_clock (abstract::event *hw_clock, uint32_t iosize)
void info (std::ostream &os) noexcept override
 log object class information
virtual deviceoperator>> (std::ostream &) const
group_toperator[] (const typename desc_t::stream::desc &stream)
 the stream's group, created on first use
virtual _devicereset ()
virtual void sleep ()
 notify system will sleep stub
virtual std::pair< source_t &, bool > source (const struct desc_t::stream &stream)
 the stream's source selector, created on first use: the preference by stream target, the value an index into the stream's sources
bool try_conclude () noexcept
 atomically conclude()s if currently launched; returns whether this call did it
bool try_launch ()
 atomically launch()es if not already launched; returns whether this call did it
void wake () override
 ~_device () override

Public Attributes

::MIDIClientRef client {}
dx::shared::guard< std::map< abstract::event *, dx::stream::clock::consumer > > clock
 event -> its own iosize and sample counter
promoted< uint32_t >::preference< decltype(super::preference)> clocksource
dx::driver< decltype(id), preference_t > & driver
std::map< decltype(desc_t::stream::group), group_tgroup
 streaming groups by desc::stream::group id: every stream of this device is registered with its group - behind the settings its groups listen to, so they go first
struct { 
   dx::shared::guard< std::map< abstract::event *, dx::stream::clock::consumer > >   clock 
 event -> its own iosize and sample counter More...
   uint32_t   iosize 
 staging value for registration paths without their own iosize argument (macOS CF property bridge) More...
hw
promoted< std::string >::preference< decltype(super::preference)> icon
const id_t id
promoted< uint32_t >::preference< decltype(super::preference)> iosize
uint32_t iosize
 staging value for registration paths without their own iosize argument (macOS CF property bridge)
std::atomic< bool > launched {}
dx::stream::device::monitor monitor
preference_t preference {driver.preference[puuid]}
std::string puid
 persistent UID - system unique - could change with location
std::string puuid
 persistent universal UID - universally unique ID (i.e. serial number)
promoted< uint32_t >::preference< decltype(super::preference)> samplerate
std::map< decltype(desc_t::stream::target.idx()), source_tsources
promoted< structdesc_t::stream * >::template preference< decltype(super::preference), uint32_tsync_reference
dx::stream::device::monitor version

Static Public Attributes

static constexpr bool hosted
 the transport's settings belong to another process' device: a hosted device mirrors them through its chains, it keeps no store of them

Protected Member Functions

virtual void grouped (group_t &)
 operator[](): a group just came into existence, a host wires its per-group transports here
virtual void launch ()
 launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy.

Detailed Description

template<typename desc_t, typename preference_t, typename stream_t>
class dx::coremidi::_device< desc_t, preference_t, stream_t >

CoreMIDI client device.

Member Typedef Documentation

◆ desc_t

typedef desc_t dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::desc_t
inherited

◆ event_t

typedef event dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::event_t
inherited

◆ group_t

typedef std::conditional_t<std::is_void_v<void>, dx::stream::group<device>, void> dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::group_t
inherited

bus devices driving their groups' tick pass their own group type

◆ source_t

typedef promoted<uint32_t>::template preference<decltype(dx::device<::MIDIDeviceRef, preference_t >::preference)> dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::source_t
inherited

◆ stream_t

typedef stream_t dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::stream_t
inherited

Constructor & Destructor Documentation

◆ _device()

template<typename desc_t, typename preference_t, typename stream_t>
dx::coremidi::_device< desc_t, preference_t, stream_t >::_device ( decltype(super::driver)& driver,
decltype(super::id)& id )
inline

◆ ~_device()

template<typename desc_t, typename preference_t, typename stream_t>
dx::coremidi::_device< desc_t, preference_t, stream_t >::~_device ( )
inlineoverride

Member Function Documentation

◆ attach()

void dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::attach ( channel_t ** io[dx::stream::direction::directions][2],
const std::vector< bool >(&) channel_map[2] )
inlineinherited

◆ conclude()

void dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::conclude ( )
inlineoverridevirtualnoexceptinherited

ends every group's session before the device's resources go; the start counts stay with their holders

Reimplemented from dx::object.

◆ exception()

template<typename id_t, typename preference_t = dx::preference>
void dx::device< id_t, preference_t >::exception ( const dx::exception & exception,
bool filtered = false ) const
inlineoverridevirtualnoexceptinherited

notification exception handler

Implements dx::object.

Reimplemented in dx::proxy::device< preference_t >, dx::proxy::device< preference_t >, dx::proxy::device< dx::preference >, dx::proxy::device<>, dx::service::client::_device< desc_t, preference_t, stream_t, group_t >, dx::service::client::_device< desc, preference, stream< device< desc, preference, stream, group > >, group< device< desc, preference, stream, group > > >, dx::service::client::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t, group_t > >, group_t< device< desc_t, preference_t, stream_t, group_t > > >, dx::service::device< preference_t >, dx::service::device< dx::preference >, dx::service::device< super_device_t >, dx::usb::device< preference_t >, dx::usb::device< dx::preference >, dx::usb::platform::device< preference_t >, dx::usb::platform::device< preference_t >, dx::usb::platform::device< dx::preference >, dx::usb::platform::device< preference_t >, dx::usb::platform::device< preference_t >, dx::virtuel::stream::_device< desc_t, preference_t, stream_t, group_t >, dx::virtuel::stream::_device< desc, dx::preference, dx::stream::shared::stream< device< desc, dx::preference, dx::stream::shared::stream, group > >, group< device< desc, dx::preference, dx::stream::shared::stream, group > > >, dx::virtuel::stream::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t, group_t > >, group_t< device< desc_t, preference_t, stream_t, group_t > > >, and dx::wasapi::client::_device< desc, preference, stream< device< desc, preference, stream, group > >, group< device< desc, preference, stream, group > > >.

◆ frame()

template<typename desc_t, typename preference_t, typename stream_t>
virtual uint64_t dx::coremidi::_device< desc_t, preference_t, stream_t >::frame ( ) const
inlinevirtual

◆ grouped()

virtual void dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::grouped ( group_t & )
inlineprotectedvirtualinherited

operator[](): a group just came into existence, a host wires its per-group transports here

◆ hw_clock() [1/2]

virtual bool dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::hw_clock ( ) const
inlinevirtualnoexceptinherited

◆ hw_clock() [2/2]

virtual void dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::hw_clock ( abstract::event * hw_clock,
uint32_t iosize )
inlinevirtualinherited

◆ info()

template<typename desc_t, typename preference_t, typename stream_t>
void dx::coremidi::_device< desc_t, preference_t, stream_t >::info ( std::ostream & os)
inlineoverridevirtualnoexcept

log object class information

Reimplemented from dx::object.

◆ launch()

virtual void dx::object::launch ( )
inlineprotectedvirtualinherited

launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy.

Reimplemented in dx::asio::client::driver< device_t, devices >, dx::asio::service::device< super_device_t >, dx::coreaudio::driver< device_t >, dx::coremidi::driver< device_t >, dx::map::driver< _device_t, holder_t >, dx::map::driver< device<> >, dx::map::driver< device_t >, dx::map::driver< device_t, dx::apartment< device_t > >, dx::midi::services::driver< device_t >, dx::proxy::driver< device_t >, dx::proxy::driver< device_t >, dx::service::app, dx::service::client::_device< desc_t, preference_t, stream_t, group_t >, dx::service::client::_device< desc, preference, stream< device< desc, preference, stream, group > >, group< device< desc, preference, stream, group > > >, dx::service::client::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t, group_t > >, group_t< device< desc_t, preference_t, stream_t, group_t > > >, dx::service::client::driver< device_t >, dx::service::device< preference_t >, dx::service::device< dx::preference >, dx::service::device< super_device_t >, dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >, dx::usb::stream::_device< desc_t, preference_t, stream_t, group_t >, dx::usb::stream::_device< desc_t, dx::preference, pipe< device< desc_t, dx::preference, pipe, group > >, group< device< desc_t, dx::preference, pipe, group > > >, dx::usb::stream::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t, group_t > >, group_t< device< desc_t, preference_t, stream_t, group_t > > >, dx::virtuel::driver< device_t >, dx::virtuel::driver< device<> >, and dx::wasapi::client::driver< device_t >.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator>>()

template<typename id_t, typename preference_t = dx::preference>
virtual device & dx::device< id_t, preference_t >::operator>> ( std::ostream & ) const
inlinevirtualinherited

◆ operator[]()

group_t & dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::operator[] ( const typename desc_t::stream::desc & stream)
inlineinherited

the stream's group, created on first use

◆ reset()

template<typename desc_t, typename preference_t, typename stream_t>
virtual _device & dx::coremidi::_device< desc_t, preference_t, stream_t >::reset ( )
inlinevirtual

◆ sleep()

template<typename id_t, typename preference_t = dx::preference>
virtual void dx::device< id_t, preference_t >::sleep ( )
inlinevirtualinherited

notify system will sleep stub

◆ source()

virtual std::pair< source_t &, bool > dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::source ( const struct desc_t::stream & stream)
inlinevirtualinherited

the stream's source selector, created on first use: the preference by stream target, the value an index into the stream's sources

◆ try_conclude()

bool dx::object::try_conclude ( )
inlinenoexceptinherited

atomically conclude()s if currently launched; returns whether this call did it

Here is the call graph for this function:
Here is the caller graph for this function:

◆ try_launch()

bool dx::object::try_launch ( )
inlineinherited

atomically launch()es if not already launched; returns whether this call did it

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wake()

void dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::wake ( )
inlineoverridevirtualinherited

Reimplemented from dx::device< id_t, preference_t >.

Member Data Documentation

◆ client

template<typename desc_t, typename preference_t, typename stream_t>
::MIDIClientRef dx::coremidi::_device< desc_t, preference_t, stream_t >::client {}

◆ clock

dx::shared::guard<std::map<abstract::event*, dx::stream::clock::consumer> > dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::clock
inherited

event -> its own iosize and sample counter

◆ clocksource

promoted<uint32_t>::preference<decltype(super::preference)> dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::clocksource
inherited

◆ driver

template<typename id_t, typename preference_t = dx::preference>
dx::driver<decltype(id), preference_t>& dx::device< id_t, preference_t >::driver
inherited

◆ group

std::map<decltype(desc_t::stream::group), group_t> dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::group
inherited

streaming groups by desc::stream::group id: every stream of this device is registered with its group - behind the settings its groups listen to, so they go first

◆ hosted

bool dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::hosted
staticconstexprinherited

the transport's settings belong to another process' device: a hosted device mirrors them through its chains, it keeps no store of them

◆ [struct]

struct { ... } dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::hw
Todo
migrate hw clock generation/distribution into a dedicated clock class

◆ icon

promoted<std::string>::preference<decltype(super::preference)> dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::icon
inherited

◆ id

template<typename id_t, typename preference_t = dx::preference>
const id_t dx::device< id_t, preference_t >::id
inherited

◆ iosize [1/2]

promoted<uint32_t>::preference<decltype(super::preference)> dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::iosize
inherited

◆ iosize [2/2]

uint32_t dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::iosize
inherited

staging value for registration paths without their own iosize argument (macOS CF property bridge)

◆ launched

std::atomic<bool> dx::object::launched {}
inherited

◆ monitor

dx::stream::device::monitor dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::monitor
inherited

◆ preference

template<typename id_t, typename preference_t = dx::preference>
preference_t dx::device< id_t, preference_t >::preference {driver.preference[puuid]}
inherited

◆ puid

template<typename id_t, typename preference_t = dx::preference>
std::string dx::device< id_t, preference_t >::puid
inherited

persistent UID - system unique - could change with location

◆ puuid

template<typename id_t, typename preference_t = dx::preference>
std::string dx::device< id_t, preference_t >::puuid
inherited

persistent universal UID - universally unique ID (i.e. serial number)

◆ samplerate

promoted<uint32_t>::preference<decltype(super::preference)> dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::samplerate
inherited

◆ sources

std::map<decltype(desc_t::stream::target.idx()), source_t> dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::sources
inherited

source selectors by stream target: a stream with sources gets its own on first use

◆ sync_reference

promoted<structdesc_t::stream*>::template preference<decltype(super::preference), uint32_t> dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::sync_reference
inherited

◆ version

dx::stream::device::monitor dx::stream::device< dx::device<::MIDIDeviceRef, preference_t >, desc_t, stream_t, void >::version
inherited

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

(c) copyright 2009 dynamic acoustics e.U. generated on

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.