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 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, cf::preference >::preference)> source_t
typedef stream< device< desc, cf::preference, stream > > stream_t
typedef desc value_t

Public Member Functions

struct streamalign (struct stream *sync_reference)
uint32_t align (uint32_t sync_reference) const
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
uint32_t enumerate (const format &format=any) const
 enumerate typified pins
void exception (const dx::exception &exception, bool filtered=false) const noexcept override
 notification exception handler
struct streamfind (const decltype(stream::target.idx())&target)
struct streamfind (const format &format=any, enum direction::direction direction=direction::any)
struct streamfind (const target_t &target)
struct streamfind (uint32_t &pin, const format &format=any, enum direction::direction direction=direction::any)
 finds and returns the stream description and pin idx into this stream
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
bool operator== (const desc &desc) const
virtual deviceoperator>> (std::ostream &) const
group_toperator[] (const typename desc::stream::desc &stream)
 the stream's group, created on first use
group_toperator[] (const typename desc::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::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
virtual std::pair< source_t &, bool > source (const struct desc::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
uint32_t sync_reference (struct stream *sync_reference)
struct streamsync_reference (uint32_t sync_reference)
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

Public Attributes

dx::stream::bus::bus bus {}
 the bus this device hangs on
::MIDIClientRef client
dx::shared::guard< std::map< abstract::event *, dx::stream::clock::consumer > > clock
 event -> its own iosize and sample counter
uint32_t clocks {}
 number of independent clocks [currenlty only single clock support]
promoted< uint32_t >::preference< decltype(super::preference)> clocksource
bool dflt {}
 can be selected as default (OS audio) device
dx::driver< decltype(id), cf::preference > & driver
bool editable {}
 can be edited
struct dx::stream::desc::firmware firmware
std::map< decltype(desc::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
bool hidden {}
 hide device
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
struct dx::stream::desc::name_id model
dx::stream::device::monitor monitor
bool persistence {}
 device has capability to store persistent settings (i.e. sample rate; clock source; etc.)
cf::preference preference
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::stream::target.idx()), source_tsources
direction::direction start_stop_order {direction::any}
struct dx::stream::desc::stream stream [max_streams]
uint32_t streams {}
 number of streams
promoted< structdesc_t::stream * >::template preference< decltype(super::preference), uint32_tsync_reference
struct dx::stream::desc::name_id vendor
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 = desc, typename preference_t = cf::preference, template< typename ... > typename stream_t = stream>
class dx::coremidi::device< desc_t, preference_t, stream_t >

CoreMIDI client device.

Member Typedef Documentation

◆ desc_t

typedef desc dx::stream::device< dx::device<::MIDIDeviceRef, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, void >::desc
inherited

◆ event_t

typedef event dx::stream::device< dx::device<::MIDIDeviceRef, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, 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, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, 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, cf::preference >::preference)> dx::stream::device< dx::device<::MIDIDeviceRef, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, void >::source_t
inherited

◆ stream_t

◆ value_t

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
typedef desc dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::value_t
inherited

Member Function Documentation

◆ align() [1/2]

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct stream * dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::align ( struct stream * sync_reference)
inlineinherited

◆ align() [2/2]

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
uint32_t dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::align ( uint32_t sync_reference) const
inlineinherited

◆ attach()

void dx::stream::device< dx::device<::MIDIDeviceRef, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, 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, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, void >::conclude ( )
inlineoverridenoexceptinherited

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

◆ enumerate()

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
uint32_t dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::enumerate ( const format & format = any) const
inlineinherited

enumerate typified pins

Here is the caller graph for this function:

◆ exception()

void dx::device< id_t, cf::preference >::exception ( const dx::exception & exception,
bool filtered = false ) const
inlineoverridenoexceptinherited

notification exception handler

◆ find() [1/4]

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct stream * dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::find ( const decltype(stream::target.idx())& target)
inlineinherited

◆ find() [2/4]

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct stream * dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::find ( const format & format = any,
enum direction::direction direction = direction::any )
inlineinherited
Parameters
formatsearch stream format filter
directionsearch stream direction filter

◆ find() [3/4]

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct stream * dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::find ( const target_t & target)
inlineinherited

◆ find() [4/4]

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct stream * dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::find ( uint32_t & pin,
const format & format = any,
enum direction::direction direction = direction::any )
inlineinherited

finds and returns the stream description and pin idx into this stream

Returns
stream description of indexed pin, pin idx will be altered on return!
Parameters
pinin: global pin index, out: pin index into returned stream description
formatsearch stream format filter
directionsearch stream direction filter
Here is the caller graph for this function:

◆ frame()

virtual uint64_t dx::coremidi::_device< desc, cf::preference, stream< device< desc, cf::preference, stream > > >::frame ( ) const
inlinevirtualinherited

◆ grouped()

virtual void dx::stream::device< dx::device<::MIDIDeviceRef, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, 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, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, void >::hw_clock ( ) const
inlinevirtualnoexceptinherited

◆ hw_clock() [2/2]

virtual void dx::stream::device< dx::device<::MIDIDeviceRef, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, void >::hw_clock ( abstract::event * hw_clock,
uint32_t iosize )
inlinevirtualinherited

◆ info()

void dx::coremidi::_device< desc, cf::preference, stream< device< desc, cf::preference, stream > > >::info ( std::ostream & os)
inlineoverridevirtualnoexceptinherited

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.

◆ operator==()

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
bool dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::operator== ( const desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources > & desc) const
inlineinherited

◆ operator>>()

virtual device & dx::device< id_t, cf::preference >::operator>> ( std::ostream & ) const
inlinevirtualinherited

◆ operator[]() [1/2]

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

the stream's group, created on first use

◆ operator[]() [2/2]

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

the stream's group, created on first use

◆ reset()

virtual _device & dx::coremidi::_device< desc, cf::preference, stream< device< desc, cf::preference, stream > > >::reset ( )
inlinevirtualinherited

◆ sleep()

virtual void dx::device< id_t, cf::preference >::sleep ( )
inlinevirtualinherited

notify system will sleep stub

◆ source() [1/2]

virtual std::pair< source_t &, bool > dx::stream::device< dx::device<::MIDIDeviceRef, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, void >::source ( const struct desc::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

◆ source() [2/2]

virtual std::pair< source_t &, bool > dx::stream::device< dx::device<::MIDIDeviceRef, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, void >::source ( const struct desc::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

◆ sync_reference() [1/2]

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
uint32_t dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::sync_reference ( struct stream * sync_reference)
inlineinherited

◆ sync_reference() [2/2]

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct stream * dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::sync_reference ( uint32_t sync_reference)
inlineinherited

◆ try_conclude()

bool dx::object::try_conclude ( )
inlinenoexceptinherited

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

◆ try_launch()

bool dx::object::try_launch ( )
inlineinherited

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

◆ wake()

void dx::stream::device< dx::device<::MIDIDeviceRef, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, void >::wake ( )
inlineoverrideinherited

Member Data Documentation

◆ bus

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
dx::stream::bus::bus dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::bus {}
inherited

the bus this device hangs on

◆ client

::MIDIClientRef dx::coremidi::_device< desc, cf::preference, stream< device< desc, cf::preference, stream > > >::client
inherited

◆ clock

event -> its own iosize and sample counter

◆ clocks

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
uint32_t dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::clocks {}
inherited

number of independent clocks [currenlty only single clock support]

◆ clocksource

promoted<uint32_t>::preference<decltype(super::preference)> dx::stream::device< dx::device<::MIDIDeviceRef, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, void >::clocksource
inherited

◆ dflt

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
bool dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::dflt {}
inherited

can be selected as default (OS audio) device

◆ driver

dx::driver<decltype(id), cf::preference>& dx::device< id_t, cf::preference >::driver
inherited

◆ editable

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
bool dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::editable {}
inherited

can be edited

◆ firmware

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct dx::stream::desc::firmware dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::firmware
inherited

◆ group

std::map<decltype(desc::stream::group), group_t> dx::stream::device< dx::device<::MIDIDeviceRef, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, 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

◆ hidden

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
bool dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::hidden {}
inherited

hide device

◆ hosted

bool dx::stream::device< dx::device<::MIDIDeviceRef, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, 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, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, 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, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, void >::icon
inherited

◆ id

const id_t dx::device< id_t, cf::preference >::id
inherited

◆ iosize [1/2]

◆ iosize [2/2]

uint32_t dx::stream::device< dx::device<::MIDIDeviceRef, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, 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

◆ model

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct dx::stream::desc::name_id dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::model
inherited

◆ monitor

◆ persistence

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
bool dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::persistence {}
inherited

device has capability to store persistent settings (i.e. sample rate; clock source; etc.)

◆ preference

cf::preference dx::device< id_t, cf::preference >::preference
inherited

◆ puid

std::string dx::device< id_t, cf::preference >::puid
inherited

persistent UID - system unique - could change with location

◆ puuid

std::string dx::device< id_t, cf::preference >::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, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, void >::samplerate
inherited

◆ sources

std::map<decltype(desc::stream::target.idx()), source_t> dx::stream::device< dx::device<::MIDIDeviceRef, cf::preference >, desc, stream< device< desc, cf::preference, stream > >, void >::sources
inherited

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

◆ start_stop_order

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
direction::direction dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::start_stop_order {direction::any}
inherited

◆ stream

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct dx::stream::desc::stream dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::stream[max_streams]
inherited

◆ streams

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
uint32_t dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::streams {}
inherited

number of streams

◆ sync_reference

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

◆ vendor

template<typename target_t = void_struct, int max_streams = 2, int max_pins = 1, int max_clock_settings = 1, int max_clocks = 1, int max_configurations = 1, int max_sources = 1>
struct dx::stream::desc::name_id dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::vendor
inherited

◆ version


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.