Public Types | Public Member Functions | List of all members
universal_midi_packets::Packet< numWords > Class Template Reference

Holds a single Universal MIDI Packet. More...

Public Types

using Contents = std::array< uint32_t, numWords >
 
using const_iterator = typename Contents::const_iterator
 

Public Member Functions

 Packet ()=default
 
template<size_t w = numWords, typename std::enable_if< w==1, int >::type = 0>
 Packet (uint32_t a)
 
template<size_t w = numWords, typename std::enable_if< w==2, int >::type = 0>
 Packet (uint32_t a, uint32_t b)
 
template<size_t w = numWords, typename std::enable_if< w==3, int >::type = 0>
 Packet (uint32_t a, uint32_t b, uint32_t c)
 
template<size_t w = numWords, typename std::enable_if< w==4, int >::type = 0>
 Packet (uint32_t a, uint32_t b, uint32_t c, uint32_t d)
 
template<size_t w, typename std::enable_if< w==numWords, int >::type = 0>
 Packet (const std::array< uint32_t, w > &fullPacket)
 
Packet withMessageType (uint8_t type) const noexcept
 
Packet withGroup (uint8_t group) const noexcept
 
Packet withStatus (uint8_t status) const noexcept
 
Packet withChannel (uint8_t channel) const noexcept
 
uint8_t getMessageType () const noexcept
 
uint8_t getGroup () const noexcept
 
uint8_t getStatus () const noexcept
 
uint8_t getChannel () const noexcept
 
template<size_t index>
Packet withU4 (uint8_t value) const noexcept
 
template<size_t index>
Packet withU8 (uint8_t value) const noexcept
 
template<size_t index>
Packet withU16 (uint16_t value) const noexcept
 
template<size_t index>
Packet withU32 (uint32_t value) const noexcept
 
template<size_t index>
uint8_t getU4 () const noexcept
 
template<size_t index>
uint8_t getU8 () const noexcept
 
template<size_t index>
uint16_t getU16 () const noexcept
 
template<size_t index>
uint32_t getU32 () const noexcept
 
const_iterator begin () const noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator end () const noexcept
 
const_iterator cend () const noexcept
 
const uint32_t * data () const noexcept
 
const uint32_t & front () const noexcept
 
const uint32_t & back () const noexcept
 
const uint32_t & operator[] (size_t index) const noexcept
 

Detailed Description

template<size_t numWords>
class universal_midi_packets::Packet< numWords >

Holds a single Universal MIDI Packet.

Member Typedef Documentation

◆ Contents

template<size_t numWords>
using universal_midi_packets::Packet< numWords >::Contents = std::array<uint32_t, numWords>

◆ const_iterator

template<size_t numWords>
using universal_midi_packets::Packet< numWords >::const_iterator = typename Contents::const_iterator

Constructor & Destructor Documentation

◆ Packet() [1/6]

template<size_t numWords>
universal_midi_packets::Packet< numWords >::Packet ( )
default

◆ Packet() [2/6]

template<size_t numWords>
template<size_t w = numWords, typename std::enable_if< w==1, int >::type = 0>
universal_midi_packets::Packet< numWords >::Packet ( uint32_t  a)

References gl::a.

◆ Packet() [3/6]

template<size_t numWords>
template<size_t w = numWords, typename std::enable_if< w==2, int >::type = 0>
universal_midi_packets::Packet< numWords >::Packet ( uint32_t  a,
uint32_t  b 
)

References gl::a, and gl::b.

◆ Packet() [4/6]

template<size_t numWords>
template<size_t w = numWords, typename std::enable_if< w==3, int >::type = 0>
universal_midi_packets::Packet< numWords >::Packet ( uint32_t  a,
uint32_t  b,
uint32_t  c 
)

References gl::a, gl::b, and gl::c.

◆ Packet() [5/6]

template<size_t numWords>
template<size_t w = numWords, typename std::enable_if< w==4, int >::type = 0>
universal_midi_packets::Packet< numWords >::Packet ( uint32_t  a,
uint32_t  b,
uint32_t  c,
uint32_t  d 
)

References gl::a, gl::b, and gl::c.

◆ Packet() [6/6]

template<size_t numWords>
template<size_t w, typename std::enable_if< w==numWords, int >::type = 0>
universal_midi_packets::Packet< numWords >::Packet ( const std::array< uint32_t, w > &  fullPacket)
explicit

Member Function Documentation

◆ withMessageType()

template<size_t numWords>
Packet universal_midi_packets::Packet< numWords >::withMessageType ( uint8_t  type) const
noexcept

◆ withGroup()

template<size_t numWords>
Packet universal_midi_packets::Packet< numWords >::withGroup ( uint8_t  group) const
noexcept

Referenced by universal_midi_packets::Factory::makeActiveSensing(), universal_midi_packets::Factory::makeAssignableControllerV2(), universal_midi_packets::Factory::makeAssignablePerNoteControllerV2(), universal_midi_packets::Factory::makeChannelPressureV1(), universal_midi_packets::Factory::makeChannelPressureV2(), universal_midi_packets::Factory::makeContinue(), universal_midi_packets::Factory::makeControlChangeV1(), universal_midi_packets::Factory::makeControlChangeV2(), universal_midi_packets::Factory::makeNoop(), universal_midi_packets::Factory::makeNoteOffV1(), universal_midi_packets::Factory::makeNoteOffV2(), universal_midi_packets::Factory::makeNoteOnV1(), universal_midi_packets::Factory::makeNoteOnV2(), universal_midi_packets::Factory::makePerNoteManagementV2(), universal_midi_packets::Factory::makePerNotePitchBendV2(), universal_midi_packets::Factory::makePitchBend(), universal_midi_packets::Factory::makePitchBendV2(), universal_midi_packets::Factory::makePolyPressureV1(), universal_midi_packets::Factory::makePolyPressureV2(), universal_midi_packets::Factory::makeProgramChangeV1(), universal_midi_packets::Factory::makeProgramChangeV2(), universal_midi_packets::Factory::makeRegisteredControllerV2(), universal_midi_packets::Factory::makeRegisteredPerNoteControllerV2(), universal_midi_packets::Factory::makeRelativeAssignableControllerV2(), universal_midi_packets::Factory::makeRelativeRegisteredControllerV2(), universal_midi_packets::Factory::makeReset(), universal_midi_packets::Factory::makeSongPositionPointer(), universal_midi_packets::Factory::makeSongSelect(), universal_midi_packets::Factory::makeStart(), universal_midi_packets::Factory::makeStop(), universal_midi_packets::Factory::makeTimeCode(), universal_midi_packets::Factory::makeTimingClock(), and universal_midi_packets::Factory::makeTuneRequest().

◆ withStatus()

template<size_t numWords>
Packet universal_midi_packets::Packet< numWords >::withStatus ( uint8_t  status) const
noexcept

◆ withChannel()

template<size_t numWords>
Packet universal_midi_packets::Packet< numWords >::withChannel ( uint8_t  channel) const
noexcept

◆ getMessageType()

template<size_t numWords>
uint8_t universal_midi_packets::Packet< numWords >::getMessageType ( ) const
noexcept

◆ getGroup()

template<size_t numWords>
uint8_t universal_midi_packets::Packet< numWords >::getGroup ( ) const
noexcept

◆ getStatus()

template<size_t numWords>
uint8_t universal_midi_packets::Packet< numWords >::getStatus ( ) const
noexcept

◆ getChannel()

template<size_t numWords>
uint8_t universal_midi_packets::Packet< numWords >::getChannel ( ) const
noexcept

◆ withU4()

template<size_t numWords>
template<size_t index>
Packet universal_midi_packets::Packet< numWords >::withU4 ( uint8_t  value) const
noexcept

◆ withU8()

template<size_t numWords>
template<size_t index>
Packet universal_midi_packets::Packet< numWords >::withU8 ( uint8_t  value) const
noexcept

References StandardApplicationCommandIDs::copy, gl::index, universal_midi_packets::Utils::U8< Index >::set(), and gl::value.

Referenced by universal_midi_packets::Factory::makeActiveSensing(), universal_midi_packets::Factory::makeAssignableControllerV2(), universal_midi_packets::Factory::makeAssignablePerNoteControllerV2(), universal_midi_packets::Factory::makeChannelPressureV1(), universal_midi_packets::Factory::makeContinue(), universal_midi_packets::Factory::makeControlChangeV1(), universal_midi_packets::Factory::makeControlChangeV2(), universal_midi_packets::Factory::makeNoteOffV1(), universal_midi_packets::Factory::makeNoteOffV2(), universal_midi_packets::Factory::makeNoteOnV1(), universal_midi_packets::Factory::makeNoteOnV2(), universal_midi_packets::Factory::makePerNoteManagementV2(), universal_midi_packets::Factory::makePerNotePitchBendV2(), universal_midi_packets::Factory::makePitchBend(), universal_midi_packets::Factory::makePolyPressureV1(), universal_midi_packets::Factory::makePolyPressureV2(), universal_midi_packets::Factory::makeProgramChangeV1(), universal_midi_packets::Factory::makeProgramChangeV2(), universal_midi_packets::Factory::makeRegisteredControllerV2(), universal_midi_packets::Factory::makeRegisteredPerNoteControllerV2(), universal_midi_packets::Factory::makeRelativeAssignableControllerV2(), universal_midi_packets::Factory::makeRelativeRegisteredControllerV2(), universal_midi_packets::Factory::makeReset(), universal_midi_packets::Factory::makeSongPositionPointer(), universal_midi_packets::Factory::makeSongSelect(), universal_midi_packets::Factory::makeStart(), universal_midi_packets::Factory::makeStop(), universal_midi_packets::Factory::makeSysEx8Continue(), universal_midi_packets::Factory::makeSysEx8End(), universal_midi_packets::Factory::makeSysEx8in1Packet(), universal_midi_packets::Factory::makeSysEx8Start(), universal_midi_packets::Factory::makeTimeCode(), universal_midi_packets::Factory::makeTimingClock(), and universal_midi_packets::Factory::makeTuneRequest().

◆ withU16()

template<size_t numWords>
template<size_t index>
Packet universal_midi_packets::Packet< numWords >::withU16 ( uint16_t  value) const
noexcept

◆ withU32()

template<size_t numWords>
template<size_t index>
Packet universal_midi_packets::Packet< numWords >::withU32 ( uint32_t  value) const
noexcept

◆ getU4()

template<size_t numWords>
template<size_t index>
uint8_t universal_midi_packets::Packet< numWords >::getU4 ( ) const
noexcept

◆ getU8()

template<size_t numWords>
template<size_t index>
uint8_t universal_midi_packets::Packet< numWords >::getU8 ( ) const
noexcept

◆ getU16()

template<size_t numWords>
template<size_t index>
uint16_t universal_midi_packets::Packet< numWords >::getU16 ( ) const
noexcept

◆ getU32()

template<size_t numWords>
template<size_t index>
uint32_t universal_midi_packets::Packet< numWords >::getU32 ( ) const
noexcept

◆ begin()

template<size_t numWords>
const_iterator universal_midi_packets::Packet< numWords >::begin ( ) const
noexcept

◆ cbegin()

template<size_t numWords>
const_iterator universal_midi_packets::Packet< numWords >::cbegin ( ) const
noexcept

◆ end()

template<size_t numWords>
const_iterator universal_midi_packets::Packet< numWords >::end ( ) const
noexcept

◆ cend()

template<size_t numWords>
const_iterator universal_midi_packets::Packet< numWords >::cend ( ) const
noexcept

◆ data()

template<size_t numWords>
const uint32_t* universal_midi_packets::Packet< numWords >::data ( ) const
noexcept

◆ front()

template<size_t numWords>
const uint32_t& universal_midi_packets::Packet< numWords >::front ( ) const
noexcept

◆ back()

template<size_t numWords>
const uint32_t& universal_midi_packets::Packet< numWords >::back ( ) const
noexcept

◆ operator[]()

template<size_t numWords>
const uint32_t& universal_midi_packets::Packet< numWords >::operator[] ( size_t  index) const
noexcept

References gl::index.


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