Control Surface stm32
MIDI Control Surface library for Arduino
Public Member Functions | Private Attributes | List of all members
OutputBank Class Reference

#include <Banks/Bank.hpp>

Detailed Description

A class for changing the address of BankableMIDIOutputs.

Definition at line 16 of file Bank.hpp.

+ Inheritance diagram for OutputBank:
+ Collaboration diagram for OutputBank:

Public Member Functions

 OutputBank (uint8_t tracksPerBank=1, setting_t initialSelection=0, int8_t selectionOffset=0)
 Create a new OutputBank object. More...
 
void select (setting_t setting)
 Select the given bank setting. More...
 
setting_t getSelection () const
 Get the current bank setting (zero-based). More...
 
int8_t getSelectionOffset () const
 Get the offset of the bank setting. More...
 
uint8_t getTracksPerBank () const
 Get the number of tracks per bank. More...
 
int8_t getOffsetOfSetting (setting_t s) const
 The same as getOffset, but for a given setting. More...
 
int8_t getOffset () const
 Get the address offset (number of banks times the index of the selected bank after applying the offset) More...
 

Private Attributes

uint8_t tracksPerBank
 
setting_t bankSetting
 
int8_t selectionOffset
 

Constructor & Destructor Documentation

◆ OutputBank()

OutputBank ( uint8_t  tracksPerBank = 1,
setting_t  initialSelection = 0,
int8_t  selectionOffset = 0 
)
inline

Create a new OutputBank object.

Parameters
tracksPerBankThe number of addresses/tracks to skip for each bank setting. Must be strictly positive.
initialSelectionThe initial bank setting.
selectionOffsetThe offset added to the bank setting before computing the actual address offset.

Definition at line 28 of file Bank.hpp.

Member Function Documentation

◆ select()

void select ( setting_t  setting)
inline

Select the given bank setting.

Parameters
settingThe new setting to select (zero-based).

Definition at line 41 of file Bank.hpp.

◆ getSelection()

setting_t getSelection ( ) const
inline

Get the current bank setting (zero-based).

Definition at line 44 of file Bank.hpp.

◆ getSelectionOffset()

int8_t getSelectionOffset ( ) const
inline

Get the offset of the bank setting.

Definition at line 46 of file Bank.hpp.

◆ getTracksPerBank()

uint8_t getTracksPerBank ( ) const
inline

Get the number of tracks per bank.

This is the number of addresses/tracks to skip for each bank setting.

Definition at line 50 of file Bank.hpp.

◆ getOffsetOfSetting()

int8_t getOffsetOfSetting ( setting_t  s) const
inline

The same as getOffset, but for a given setting.

Definition at line 53 of file Bank.hpp.

◆ getOffset()

int8_t getOffset ( ) const
inline

Get the address offset (number of banks times the index of the selected bank after applying the offset)

Definition at line 58 of file Bank.hpp.

Member Data Documentation

◆ tracksPerBank

uint8_t tracksPerBank
private

Definition at line 61 of file Bank.hpp.

◆ bankSetting

setting_t bankSetting
private

Definition at line 62 of file Bank.hpp.

◆ selectionOffset

int8_t selectionOffset
private

Definition at line 63 of file Bank.hpp.


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