JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::midi_ci::DeviceOptions Class Reference

Configuration options for a Device. More...

#include <juce_CIDeviceOptions.h>

Collaboration diagram for juce::midi_ci::DeviceOptions:

Public Member Functions

const auto & getDeviceInfo () const
 
const auto & getFeatures () const
 
const auto & getFunctionBlock () const
 
const auto & getMaxSysExSize () const
 
const auto & getOutputs () const
 
const auto & getProductInstanceId () const
 
const auto & getProfileDelegate () const
 
const auto & getPropertyDelegate () const
 
DeviceOptions withDeviceInfo (const ump::DeviceInfo &x) const
 Basic information about the device used to determine manufacturer, model, etc.
 
DeviceOptions withFeatures (DeviceFeatures x) const
 The features that you want to enable on the device.
 
DeviceOptions withFunctionBlock (FunctionBlock x) const
 The function block layout of this device.
 
DeviceOptions withMaxSysExSize (size_t x) const
 The maximum size of sysex messages to accept and to produce.
 
DeviceOptions withOutputs (std::vector< DeviceMessageHandler * > x) const
 One or more DeviceMessageHandlers that should receive callbacks with any messages that the device wishes to send.
 
DeviceOptions withProductInstanceId (const std::array< char, 16 > &x) const
 Specifies a product instance ID that will be returned in endpoint response messages.
 
DeviceOptions withProfileDelegate (ProfileDelegate *x) const
 Specifies a profile delegate that can be used to respond to particular profile events.
 
DeviceOptions withPropertyDelegate (PropertyDelegate *x) const
 Specifies a property delegate that can be used to respond to particular property events.
 

Static Public Member Functions

static std::array< char, 16 > makeProductInstanceId (Random &random)
 Creates a random product instance ID.
 

Static Public Attributes

static constexpr auto beginValidAscii = 32
 
static constexpr auto endValidAscii = 127
 

Private Attributes

ump::DeviceInfo deviceInfo
 
DeviceFeatures features
 
FunctionBlock functionBlock
 
size_t maxSysExSize = 512
 
std::vector< DeviceMessageHandler * > outputs
 
std::array< char, 16 > productInstanceId {}
 
ProfileDelegateprofileDelegate = nullptr
 
PropertyDelegatepropertyDelegate = nullptr
 

Detailed Description

Configuration options for a Device.

The options set here will remain constant over the lifetime of a Device.

@tags{Audio}

Member Function Documentation

◆ getDeviceInfo()

const auto & juce::midi_ci::DeviceOptions::getDeviceInfo ( ) const
inline
See also
withDeviceInfo()

References deviceInfo.

◆ getFeatures()

const auto & juce::midi_ci::DeviceOptions::getFeatures ( ) const
inline
See also
withFeatures()

References features.

◆ getFunctionBlock()

const auto & juce::midi_ci::DeviceOptions::getFunctionBlock ( ) const
inline
See also
withFunctionBlock()

References functionBlock.

◆ getMaxSysExSize()

const auto & juce::midi_ci::DeviceOptions::getMaxSysExSize ( ) const
inline
See also
withMaxSysExSize()

References maxSysExSize.

◆ getOutputs()

const auto & juce::midi_ci::DeviceOptions::getOutputs ( ) const
inline
See also
withOutputs()

References outputs.

◆ getProductInstanceId()

const auto & juce::midi_ci::DeviceOptions::getProductInstanceId ( ) const
inline

◆ getProfileDelegate()

const auto & juce::midi_ci::DeviceOptions::getProfileDelegate ( ) const
inline

◆ getPropertyDelegate()

const auto & juce::midi_ci::DeviceOptions::getPropertyDelegate ( ) const
inline

◆ makeProductInstanceId()

static std::array< char, 16 > juce::midi_ci::DeviceOptions::makeProductInstanceId ( Random random)
inlinestatic

Creates a random product instance ID.

This isn't really recommended - it's probably better to have a unique ID that remains persistent after a restart.

References beginValidAscii, endValidAscii, and juce::Random::nextInt().

◆ withDeviceInfo()

DeviceOptions juce::midi_ci::DeviceOptions::withDeviceInfo ( const ump::DeviceInfo x) const
inline

Basic information about the device used to determine manufacturer, model, etc.

In order to populate this correctly, you'll need to register with the MIDI association - otherwise you might accidentally end up using IDs that are already assigned to other companies/individuals.

References deviceInfo, and juce::withMember().

◆ withFeatures()

DeviceOptions juce::midi_ci::DeviceOptions::withFeatures ( DeviceFeatures  x) const
inline

The features that you want to enable on the device.

If you enable property exchange, you may wish to supply a PropertyDelegate using withPropertyDelegate(). If you enable profile configuration, you may wish to supply a ProfileDelegate using withProfileDelegate(). Process inquiry is not currently supported.

References features, and juce::withMember().

◆ withFunctionBlock()

DeviceOptions juce::midi_ci::DeviceOptions::withFunctionBlock ( FunctionBlock  x) const
inline

The function block layout of this device.

References functionBlock, and juce::withMember().

◆ withMaxSysExSize()

DeviceOptions juce::midi_ci::DeviceOptions::withMaxSysExSize ( size_t  x) const
inline

The maximum size of sysex messages to accept and to produce.

References maxSysExSize, and juce::withMember().

◆ withOutputs()

DeviceOptions juce::midi_ci::DeviceOptions::withOutputs ( std::vector< DeviceMessageHandler * >  x) const
inline

One or more DeviceMessageHandlers that should receive callbacks with any messages that the device wishes to send.

Referenced DeviceMessageHandlers must outlive any Device constructed from these options.

References outputs, and juce::withMember().

◆ withProductInstanceId()

DeviceOptions juce::midi_ci::DeviceOptions::withProductInstanceId ( const std::array< char, 16 > &  x) const
inline

Specifies a product instance ID that will be returned in endpoint response messages.

References jassertfalse, productInstanceId, and juce::withMember().

◆ withProfileDelegate()

DeviceOptions juce::midi_ci::DeviceOptions::withProfileDelegate ( ProfileDelegate x) const
inline

Specifies a profile delegate that can be used to respond to particular profile events.

The referenced ProfileDelegate must outlive the Device.

References profileDelegate, and juce::withMember().

◆ withPropertyDelegate()

DeviceOptions juce::midi_ci::DeviceOptions::withPropertyDelegate ( PropertyDelegate x) const
inline

Specifies a property delegate that can be used to respond to particular property events.

The referenced PropertyDelegate must outlive the Device.

References propertyDelegate, and juce::withMember().

Member Data Documentation

◆ beginValidAscii

constexpr auto juce::midi_ci::DeviceOptions::beginValidAscii = 32
staticconstexpr

Referenced by makeProductInstanceId().

◆ deviceInfo

ump::DeviceInfo juce::midi_ci::DeviceOptions::deviceInfo
private

Referenced by getDeviceInfo(), and withDeviceInfo().

◆ endValidAscii

constexpr auto juce::midi_ci::DeviceOptions::endValidAscii = 127
staticconstexpr

Referenced by makeProductInstanceId().

◆ features

DeviceFeatures juce::midi_ci::DeviceOptions::features
private

Referenced by getFeatures(), and withFeatures().

◆ functionBlock

FunctionBlock juce::midi_ci::DeviceOptions::functionBlock
private

◆ maxSysExSize

size_t juce::midi_ci::DeviceOptions::maxSysExSize = 512
private

◆ outputs

std::vector<DeviceMessageHandler*> juce::midi_ci::DeviceOptions::outputs
private

Referenced by getOutputs(), and withOutputs().

◆ productInstanceId

std::array<char, 16> juce::midi_ci::DeviceOptions::productInstanceId {}
private

◆ profileDelegate

ProfileDelegate* juce::midi_ci::DeviceOptions::profileDelegate = nullptr
private

◆ propertyDelegate

PropertyDelegate* juce::midi_ci::DeviceOptions::propertyDelegate = nullptr
private

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