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

Windows MIDI Services client device: one UMP endpoint. More...

#include <dx_midi_services_device.h>

Inheritance diagram for dx::midi::services::_device< desc_t, preference_t, stream_t >:
Collaboration diagram for dx::midi::services::_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::stream::control< dx::device< std::string, preference_t > >::preference)> source_t

Public Member Functions

 __dx_catchall (std::cerr<< dx::exception(&exception, exception.error, __PRETTY_FUNCTION__, __FILE__, __LINE__)<< std::endl;,) void conclude() noexcept
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
virtual bool hw_clock () const noexcept
virtual void hw_clock (abstract::event *hw_clock, uint32_t iosize)
group_toperator[] (const typename desc_t::stream::desc &stream)
 the stream's group, created on first use
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
void wake () override

Public Attributes

dx::shared::guard< std::map< abstract::event *, dx::stream::clock::consumer > > clock
 event -> its own iosize and sample counter
promoted< uint32_t >::preference< decltype(dx::stream::control< dx::device< std::string, preference_t > >::preference)> clocksource
std::map< decltype(desc_t::stream::group), group_tgroup
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(dx::stream::control< dx::device< std::string, preference_t > >::preference)> icon
promoted< uint32_t >::preference< decltype(dx::stream::control< dx::device< std::string, preference_t > >::preference)> iosize
uint32_t iosize
 staging value for registration paths without their own iosize argument (macOS CF property bridge)
dx::stream::device::monitor monitor
promoted< uint32_t >::preference< decltype(dx::stream::control< dx::device< std::string, preference_t > >::preference)> samplerate
std::map< decltype(desc_t::stream::target.idx()), source_tsources
promoted< uint32_tstart {0}
promoted< bool > started {false}
promoted< structdesc_t::stream * >::template preference< decltype(dx::stream::control< dx::device< std::string, preference_t > >::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

dx_catchall_rethrow() public _device (decltype(super::driver)&driver, decltype(super::id)&id, const desc_t &desc)
 the Windows MIDI Services device class constructor
void connect (stream_t &stream) try
 the session and the connection made by the first stream to run, the callback set ahead of Open()
 dx_catchall_handler (this,) std
 dx_catchall_handler (this,) void send(int64_t timestamp
 whole packets to the endpoint, at the moment given - the service schedules them - or at once for 0
 dx_catchall_rethrow () void disconnect(stream_t &stream) noexcept
 the last stream to halt closes the connection
 dx_catchall_rethrow () ~_device() override
 dx_pass (raw->SendMidiMessagesRaw(timestamp? static_cast< uint64_t >(dx::qpc(timestamp).QuadPart):api::MidiClock::TimestampConstantSendImmediately(), count, words))
void info (std::ostream &os) noexcept override try
void release () noexcept try
void updated (const enumeration::MidiEndpointDeviceInformationUpdatedEventArgs &args) try
 what the watcher says changed at the endpoint: logged

Protected Attributes

uint32_t count
std::function< void()> flush_hook = []{}
std::function< void()> halt_hook = []{}
uint32_t maximum {}
 words a transmission takes, read when the connection opens
std::function< void()> run_hook = []{}
uint32_t const uint32_t *words try

Detailed Description

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

Windows MIDI Services client device: one UMP endpoint.

Identified by its endpoint device id; what the service says of it - the transport's name, maker, serial and USB ids, the declared endpoint info, the group terminal blocks - read at construction. Its streams are the driver's desc - an in and an out of one pin each - over the one connection the device makes, in a session of its own, while a stream runs.

Member Typedef Documentation

◆ desc_t

typedef desc_t dx::stream::device< dx::stream::control< dx::device< std::string, preference_t > >, desc_t, stream_t, void >::desc_t
inherited

◆ event_t

typedef event dx::stream::device< dx::stream::control< dx::device< std::string, 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::stream::control< dx::device< std::string, 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::stream::control< dx::device< std::string, preference_t > >::preference)> dx::stream::device< dx::stream::control< dx::device< std::string, preference_t > >, desc_t, stream_t, void >::source_t
inherited

Constructor & Destructor Documentation

◆ _device()

template<typename desc_t, typename preference_t, typename stream_t>
dx_catchall_rethrow() public dx::midi::services::_device< desc_t, preference_t, stream_t >::_device ( decltype(super::driver)& driver,
decltype(super::id)& id,
const desc_t & desc )
inlineprotected

the Windows MIDI Services device class constructor

Member Function Documentation

◆ __dx_catchall()

template<typename object_t>
dx::stream::control< object_t >::__dx_catchall ( std::cerr<< dx::exception &,.,,, __LINE__<< std::endl; )
inlinenoexceptinherited

◆ attach()

void dx::stream::device< dx::stream::control< dx::device< std::string, 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::stream::control< dx::device< std::string, preference_t > >, desc_t, stream_t, void >::conclude ( )
inlineoverridenoexceptinherited

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

◆ connect()

template<typename desc_t, typename preference_t, typename stream_t>
void dx::midi::services::_device< desc_t, preference_t, stream_t >::connect ( stream_t & stream)
inlineprotected

the session and the connection made by the first stream to run, the callback set ahead of Open()

◆ dx_catchall_handler() [1/2]

template<typename desc_t, typename preference_t, typename stream_t>
dx::midi::services::_device< desc_t, preference_t, stream_t >::dx_catchall_handler ( this )
inlineprotected

◆ dx_catchall_handler() [2/2]

template<typename desc_t, typename preference_t, typename stream_t>
dx::midi::services::_device< desc_t, preference_t, stream_t >::dx_catchall_handler ( this )
protected

whole packets to the endpoint, at the moment given - the service schedules them - or at once for 0

◆ dx_catchall_rethrow() [1/2]

template<typename desc_t, typename preference_t, typename stream_t>
dx::midi::services::_device< desc_t, preference_t, stream_t >::dx_catchall_rethrow ( ) &
inlineprotectednoexcept

the last stream to halt closes the connection

◆ dx_catchall_rethrow() [2/2]

template<typename desc_t, typename preference_t, typename stream_t>
dx::midi::services::_device< desc_t, preference_t, stream_t >::dx_catchall_rethrow ( )
inlineoverrideprotected

◆ dx_pass()

template<typename desc_t, typename preference_t, typename stream_t>
dx::midi::services::_device< desc_t, preference_t, stream_t >::dx_pass ( raw-> SendMidiMessagesRawtimestamp? static_cast< uint64_t >(dx::qpc(timestamp).QuadPart):api::MidiClock::TimestampConstantSendImmediately(), count, words)
protected

◆ hw_clock() [1/2]

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

◆ hw_clock() [2/2]

virtual void dx::stream::device< dx::stream::control< dx::device< std::string, 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::midi::services::_device< desc_t, preference_t, stream_t >::info ( std::ostream & os)
inlineoverrideprotectednoexcept

◆ operator[]()

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

the stream's group, created on first use

◆ release()

template<typename desc_t, typename preference_t, typename stream_t>
void dx::midi::services::_device< desc_t, preference_t, stream_t >::release ( )
inlineprotectednoexcept
Here is the caller graph for this function:

◆ source()

virtual std::pair< source_t &, bool > dx::stream::device< dx::stream::control< dx::device< std::string, 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

◆ updated()

template<typename desc_t, typename preference_t, typename stream_t>
void dx::midi::services::_device< desc_t, preference_t, stream_t >::updated ( const enumeration::MidiEndpointDeviceInformationUpdatedEventArgs & args)
inlineprotected

what the watcher says changed at the endpoint: logged

Here is the caller graph for this function:

◆ wake()

void dx::stream::device< dx::stream::control< dx::device< std::string, preference_t > >, desc_t, stream_t, void >::wake ( )
inlineoverrideinherited

Member Data Documentation

◆ clock

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

event -> its own iosize and sample counter

◆ clocksource

promoted<uint32_t>::preference<decltype(dx::stream::control< dx::device< std::string, preference_t > >::preference)> dx::stream::device< dx::stream::control< dx::device< std::string, preference_t > >, desc_t, stream_t, void >::clocksource
inherited

◆ count

template<typename desc_t, typename preference_t, typename stream_t>
uint32_t dx::midi::services::_device< desc_t, preference_t, stream_t >::count
protected

◆ flush_hook

template<typename object_t>
std::function<void()> dx::stream::control< object_t >::flush_hook = []{}
protectedinherited

◆ group

std::map<decltype(desc_t::stream::group), group_t> dx::stream::device< dx::stream::control< dx::device< std::string, 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

◆ halt_hook

template<typename object_t>
std::function<void()> dx::stream::control< object_t >::halt_hook = []{}
protectedinherited

◆ hosted

bool dx::stream::device< dx::stream::control< dx::device< std::string, 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::stream::control< dx::device< std::string, 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(dx::stream::control< dx::device< std::string, preference_t > >::preference)> dx::stream::device< dx::stream::control< dx::device< std::string, preference_t > >, desc_t, stream_t, void >::icon
inherited

◆ iosize [1/2]

promoted<uint32_t>::preference<decltype(dx::stream::control< dx::device< std::string, preference_t > >::preference)> dx::stream::device< dx::stream::control< dx::device< std::string, preference_t > >, desc_t, stream_t, void >::iosize
inherited

◆ iosize [2/2]

uint32_t dx::stream::device< dx::stream::control< dx::device< std::string, preference_t > >, desc_t, stream_t, void >::iosize
inherited

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

◆ maximum

template<typename desc_t, typename preference_t, typename stream_t>
uint32_t dx::midi::services::_device< desc_t, preference_t, stream_t >::maximum {}
protected

words a transmission takes, read when the connection opens

◆ monitor

dx::stream::device::monitor dx::stream::device< dx::stream::control< dx::device< std::string, preference_t > >, desc_t, stream_t, void >::monitor
inherited

◆ run_hook

template<typename object_t>
std::function<void()> dx::stream::control< object_t >::run_hook = []{}
protectedinherited

◆ samplerate

promoted<uint32_t>::preference<decltype(dx::stream::control< dx::device< std::string, preference_t > >::preference)> dx::stream::device< dx::stream::control< dx::device< std::string, preference_t > >, desc_t, stream_t, void >::samplerate
inherited

◆ sources

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

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

◆ start

template<typename object_t>
promoted<uint32_t> dx::stream::control< object_t >::start {0}
inherited

◆ started

template<typename object_t>
promoted<bool> dx::stream::control< object_t >::started {false}
inherited

◆ sync_reference

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

◆ try

template<typename desc_t, typename preference_t, typename stream_t>
uint32_t const uint32_t* words dx::midi::services::_device< desc_t, preference_t, stream_t >::try
protected
Initial value:
{
#define dx_pass(test,...)
Definition dx_exception.h:55
@ ok
Definition macOS/dx_platform.h:180
@ not_initialized
Definition macOS/dx_platform.h:181

◆ version

dx::stream::device::monitor dx::stream::device< dx::stream::control< dx::device< std::string, 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.