JUCE  v5.2.0-514-g49784a029
JUCE API
juce::littlefoot::LittleFootRemoteHeap< ImplementationClass > Struct Template Reference

This class manages the synchronisation of a remote block of heap memory used by a littlefoot program running on a block. More...

#include <juce_blocks_basics.h>

Collaboration diagram for juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >:

Classes

struct  ChangeMessage
 
struct  Diff
 

Public Member Functions

 LittleFootRemoteHeap (uint32 blockSizeToUse) noexcept
 
void clear () noexcept
 
uint8 getByte (size_t offset) noexcept
 
void handleACKFromDevice (ImplementationClass &bi, uint32 packetIndex) noexcept
 
void invalidateData () noexcept
 
bool isFullySynced () const noexcept
 
bool isProgramLoaded () noexcept
 
void resetDataRangeToUnknown (size_t offset, size_t size) noexcept
 
void resetDeviceStateToUnknown ()
 
void sendChanges (ImplementationClass &bi, bool forceSend)
 
void setBits (uint32 startBit, uint32 numBits, uint32 value) noexcept
 
void setByte (size_t offset, uint8 value) noexcept
 
void setBytes (size_t offset, const uint8 *data, size_t num) noexcept
 

Static Public Member Functions

static bool isAllZero (const uint8 *data, size_t size) noexcept
 

Public Attributes

const size_t blockSize
 

Static Public Attributes

static constexpr uint16 unknownByte = 0x100
 

Private Member Functions

void dumpStatus ()
 
uint16getLatestExpectedDataState () noexcept
 
int getTotalSizeOfMessagesSent () const noexcept
 

Private Attributes

uint16 deviceState [ImplementationClass::maxBlockSize] = { 0 }
 
uint32 lastPacketIndexReceived = 0
 
OwnedArray< ChangeMessagemessagesSent
 
bool needsSyncing = true
 
bool programLoaded = false
 
uint32 programSize = 0
 
bool programStateKnown = true
 
uint8 targetData [ImplementationClass::maxBlockSize] = { 0 }
 

Detailed Description

template<typename ImplementationClass>
struct juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >

This class manages the synchronisation of a remote block of heap memory used by a littlefoot program running on a block.

Data in the block can be changed by calling setByte, setBytes, setBits etc, and these changes will be flushed to the device when sendChanges is called.

Constructor & Destructor Documentation

◆ LittleFootRemoteHeap()

template<typename ImplementationClass >
juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::LittleFootRemoteHeap ( uint32  blockSizeToUse)
inlinenoexcept

Member Function Documentation

◆ clear()

template<typename ImplementationClass >
void juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::clear ( )
inlinenoexcept

◆ dumpStatus()

template<typename ImplementationClass >
void juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::dumpStatus ( )
inlineprivate

◆ getByte()

template<typename ImplementationClass >
uint8 juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::getByte ( size_t  offset)
inlinenoexcept

◆ getLatestExpectedDataState()

template<typename ImplementationClass >
uint16* juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::getLatestExpectedDataState ( )
inlineprivatenoexcept

◆ getTotalSizeOfMessagesSent()

template<typename ImplementationClass >
int juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::getTotalSizeOfMessagesSent ( ) const
inlineprivatenoexcept

◆ handleACKFromDevice()

template<typename ImplementationClass >
void juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::handleACKFromDevice ( ImplementationClass &  bi,
uint32  packetIndex 
)
inlinenoexcept

◆ invalidateData()

template<typename ImplementationClass >
void juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::invalidateData ( )
inlinenoexcept

◆ isAllZero()

template<typename ImplementationClass >
static bool juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::isAllZero ( const uint8 data,
size_t  size 
)
inlinestaticnoexcept

◆ isFullySynced()

template<typename ImplementationClass >
bool juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::isFullySynced ( ) const
inlinenoexcept

◆ isProgramLoaded()

template<typename ImplementationClass >
bool juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::isProgramLoaded ( )
inlinenoexcept

◆ resetDataRangeToUnknown()

template<typename ImplementationClass >
void juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::resetDataRangeToUnknown ( size_t  offset,
size_t  size 
)
inlinenoexcept

◆ resetDeviceStateToUnknown()

template<typename ImplementationClass >
void juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::resetDeviceStateToUnknown ( )
inline

◆ sendChanges()

template<typename ImplementationClass >
void juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::sendChanges ( ImplementationClass &  bi,
bool  forceSend 
)
inline

◆ setBits()

template<typename ImplementationClass >
void juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::setBits ( uint32  startBit,
uint32  numBits,
uint32  value 
)
inlinenoexcept

◆ setByte()

template<typename ImplementationClass >
void juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::setByte ( size_t  offset,
uint8  value 
)
inlinenoexcept

◆ setBytes()

template<typename ImplementationClass >
void juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::setBytes ( size_t  offset,
const uint8 data,
size_t  num 
)
inlinenoexcept

Member Data Documentation

◆ blockSize

template<typename ImplementationClass >
const size_t juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::blockSize

◆ deviceState

template<typename ImplementationClass >
uint16 juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::deviceState[ImplementationClass::maxBlockSize] = { 0 }
private

◆ lastPacketIndexReceived

template<typename ImplementationClass >
uint32 juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::lastPacketIndexReceived = 0
private

◆ messagesSent

template<typename ImplementationClass >
OwnedArray<ChangeMessage> juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::messagesSent
private

◆ needsSyncing

template<typename ImplementationClass >
bool juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::needsSyncing = true
private

◆ programLoaded

template<typename ImplementationClass >
bool juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::programLoaded = false
private

◆ programSize

template<typename ImplementationClass >
uint32 juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::programSize = 0
private

◆ programStateKnown

template<typename ImplementationClass >
bool juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::programStateKnown = true
private

◆ targetData

template<typename ImplementationClass >
uint8 juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::targetData[ImplementationClass::maxBlockSize] = { 0 }
private

◆ unknownByte

template<typename ImplementationClass >
constexpr uint16 juce::littlefoot::LittleFootRemoteHeap< ImplementationClass >::unknownByte = 0x100
static

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