Loading...
Searching...
No Matches
Public Member Functions | List of all members
midi_ci::ProfileHost Class Referencefinal

Acting as a ResponderListener, instances of this class can formulate appropriate replies to profile transactions initiated by remote devices. More...

#include <juce_CIProfileHost.h>

Inheritance diagram for midi_ci::ProfileHost:

Public Member Functions

 ProfileHost (FunctionBlock fb, ProfileDelegate &d, BufferOutput &o)
 
void addProfile (ProfileAtAddress, int maxNumChannels=1)
 Adds support for a profile on the specified group/channel with a maximum number of channels that may be activated.
 
void removeProfile (ProfileAtAddress)
 Removes support for a profile on the specified group/channel.
 
void setProfileEnablement (ProfileAtAddress, int numChannels)
 Activates or deactivates a profile on the specified group/channel.
 
const BlockProfileStatesgetProfileStates () const
 Returns the profile states (supported/active) for all groups and channels.
 
SupportedAndActive getState (ProfileAtAddress profileAtAddress) const
 Returns the number of supported and active channels for the given profile on the specified group/channel.
 
bool tryRespond (ResponderOutput &, const Message::Parsed &) override
 If the message is processed successfully, and a response sent, then this returns true.
 
- Public Member Functions inherited from midi_ci::ResponderDelegate
 ResponderDelegate ()=default
 
virtual ~ResponderDelegate ()=default
 

Detailed Description

Acting as a ResponderListener, instances of this class can formulate appropriate replies to profile transactions initiated by remote devices.

ProfileHost instances also contains methods to inform remote devices about changes to local profile state.

Stores the current state of profiles on the local device.

Constructor & Destructor Documentation

◆ ProfileHost()

midi_ci::ProfileHost::ProfileHost ( FunctionBlock fb,
ProfileDelegate & d,
BufferOutput & o )

Member Function Documentation

◆ addProfile()

void midi_ci::ProfileHost::addProfile ( ProfileAtAddress ,
int maxNumChannels = 1 )

Adds support for a profile on the specified group/channel with a maximum number of channels that may be activated.

◆ removeProfile()

void midi_ci::ProfileHost::removeProfile ( ProfileAtAddress )

Removes support for a profile on the specified group/channel.

◆ setProfileEnablement()

void midi_ci::ProfileHost::setProfileEnablement ( ProfileAtAddress ,
int numChannels )

Activates or deactivates a profile on the specified group/channel.

The profile should previously have been added with addProfile(). A positive value of numChannels will enable the profile, and a non-positive value will disable it. This includes group and function-block profiles; passing any positive value will enable the profile on the entire group or block.

◆ getProfileStates()

const BlockProfileStates & midi_ci::ProfileHost::getProfileStates ( ) const

Returns the profile states (supported/active) for all groups and channels.

◆ getState()

SupportedAndActive midi_ci::ProfileHost::getState ( ProfileAtAddress profileAtAddress) const

Returns the number of supported and active channels for the given profile on the specified group/channel.

If the supported channels is 0, then the profile is not supported on the group/channel.

If the active channels is 0, then the profile is inactive on the group/channel.

References midi_ci::ProfileAtAddress::address, midi_ci::BlockProfileStates::getStateForDestination(), and midi_ci::ProfileAtAddress::profile.

◆ tryRespond()

bool midi_ci::ProfileHost::tryRespond ( ResponderOutput & output,
const Message::Parsed & message )
overridevirtual

If the message is processed successfully, and a response sent, then this returns true.

Otherwise, returns false, allowing other ResponderDelegates to attempt to handle the message if necessary.

Implements midi_ci::ResponderDelegate.


The documentation for this class was generated from the following file:
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram