Control Surface pin-t-adl
MIDI Control Surface library for Arduino
Public Member Functions | Protected Attributes | Private Attributes | Static Private Attributes | List of all members
MatrixAddress< NumRows, NumCols > Class Template Reference

#include <Banks/BankAddresses.hpp>

Detailed Description

template<uint8_t NumRows, uint8_t NumCols>
class Bankable::MatrixAddress< NumRows, NumCols >

Definition at line 77 of file BankAddresses.hpp.

+ Inheritance diagram for MatrixAddress< NumRows, NumCols >:
+ Collaboration diagram for MatrixAddress< NumRows, NumCols >:

Public Member Functions

 MatrixAddress (BaseOutputBankConfig config, const AddressMatrix< NumRows, NumCols > &addresses, MIDIChannelCable channelCN)
 
uint8_t getBaseAddress (uint8_t row, uint8_t col) const
 
MIDIAddress getActiveAddress (uint8_t row, uint8_t col) const
 
RelativeMIDIAddress getAddressOffset (setting_t bankindex) const
 Get the offset relative to the base address. More...
 
RelativeMIDIAddress getAddressOffset () const
 Get the offset relative to the base address. More...
 
setting_t getRawBankSetting () const
 Get the actual bank setting (no matter whether the element is locked or not). More...
 
setting_t getSelection () const
 Get the bank setting. More...
 
void lock ()
 Lock the bank setting. More...
 
void unlock ()
 Unlock the bank setting. More...
 

Protected Attributes

const OutputBankbank
 

Private Attributes

AddressMatrix< NumRows, NumCols > addresses
 
MIDIChannelCable channelCN
 
const BankType type
 
setting_t lockedSetting = UNLOCKED
 

Static Private Attributes

static constexpr setting_t UNLOCKED = NO_SETTING
 

Constructor & Destructor Documentation

◆ MatrixAddress()

MatrixAddress ( BaseOutputBankConfig  config,
const AddressMatrix< NumRows, NumCols > &  addresses,
MIDIChannelCable  channelCN 
)
inline

Definition at line 79 of file BankAddresses.hpp.

Member Function Documentation

◆ getBaseAddress()

uint8_t getBaseAddress ( uint8_t  row,
uint8_t  col 
) const
inline

Definition at line 85 of file BankAddresses.hpp.

◆ getActiveAddress()

MIDIAddress getActiveAddress ( uint8_t  row,
uint8_t  col 
) const
inline

Definition at line 89 of file BankAddresses.hpp.

◆ getAddressOffset() [1/2]

RelativeMIDIAddress getAddressOffset ( setting_t  bankindex) const
inlineinherited

Get the offset relative to the base address.

Definition at line 112 of file BankableAddresses.hpp.

◆ getAddressOffset() [2/2]

RelativeMIDIAddress getAddressOffset ( ) const
inlineinherited

Get the offset relative to the base address.

Definition at line 122 of file BankableAddresses.hpp.

◆ getRawBankSetting()

setting_t getRawBankSetting ( ) const
inlineinherited

Get the actual bank setting (no matter whether the element is locked or not).

Definition at line 30 of file BankableAddresses.hpp.

◆ getSelection()

setting_t getSelection ( ) const
inlineinherited

Get the bank setting.

If the element is locked, the bank setting from the moment it was locked is returned.

Definition at line 38 of file BankableAddresses.hpp.

◆ lock()

void lock ( )
inlineinherited

Lock the bank setting.

As long as it's locked, getSelection will return the current setting, independent from the actual bank setting.

Definition at line 48 of file BankableAddresses.hpp.

◆ unlock()

void unlock ( )
inlineinherited

Unlock the bank setting.

After unlocking, getSelection will return the actual bank setting again.

Definition at line 59 of file BankableAddresses.hpp.

Member Data Documentation

◆ addresses

AddressMatrix<NumRows, NumCols> addresses
private

Definition at line 95 of file BankAddresses.hpp.

◆ channelCN

MIDIChannelCable channelCN
private

Definition at line 96 of file BankAddresses.hpp.

◆ type

const BankType type
privateinherited

Definition at line 127 of file BankableAddresses.hpp.

◆ bank

const OutputBank& bank
protectedinherited

Definition at line 62 of file BankableAddresses.hpp.

◆ UNLOCKED

constexpr setting_t UNLOCKED = NO_SETTING
staticconstexprprivateinherited

Definition at line 65 of file BankableAddresses.hpp.

◆ lockedSetting

setting_t lockedSetting = UNLOCKED
privateinherited

Definition at line 66 of file BankableAddresses.hpp.


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