JUCE
Loading...
Searching...
No Matches
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_LittleFootRemoteHeap.h>

Public Member Functions

 LittleFootRemoteHeap (uint32 blockSizeToUse) noexcept
 
void reset ()
 
void clearTargetData () noexcept
 
void resetDeviceStateToUnknown ()
 
void resetDataRangeToUnknown (size_t offset, size_t size) noexcept
 
void setByte (size_t offset, uint8 value) noexcept
 
void setBytes (size_t offset, const uint8 *data, size_t num) noexcept
 
void setBits (uint32 startBit, uint32 numBits, uint32 value) noexcept
 
uint8 getByte (size_t offset) noexcept
 
bool isFullySynced () const noexcept
 
void sendChanges (ImplementationClass &bi, bool forceSend)
 
void handleACKFromDevice (ImplementationClass &bi, uint32 packetIndex) noexcept
 
bool isProgramLoaded () 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
 

Detailed Description

template<typename ImplementationClass>
struct 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>
littlefoot::LittleFootRemoteHeap< ImplementationClass >::LittleFootRemoteHeap ( uint32 blockSizeToUse)
noexcept

Member Function Documentation

◆ reset()

template<typename ImplementationClass>
void littlefoot::LittleFootRemoteHeap< ImplementationClass >::reset ( )

◆ clearTargetData()

template<typename ImplementationClass>
void littlefoot::LittleFootRemoteHeap< ImplementationClass >::clearTargetData ( )
noexcept

References JUCE_LOG_LITTLEFOOT_HEAP, and zeromem().

Referenced by reset().

◆ resetDeviceStateToUnknown()

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

◆ resetDataRangeToUnknown()

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

References unknownByte.

Referenced by resetDeviceStateToUnknown().

◆ setByte()

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

References blockSize, and jassertfalse.

Referenced by setBytes().

◆ setBytes()

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

References setByte().

◆ setBits()

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

◆ getByte()

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

References blockSize, and jassertfalse.

◆ isFullySynced()

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

◆ isAllZero()

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

Referenced by sendChanges().

◆ sendChanges()

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

◆ handleACKFromDevice()

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

◆ isProgramLoaded()

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

Member Data Documentation

◆ blockSize

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

◆ unknownByte

template<typename ImplementationClass>
uint16 littlefoot::LittleFootRemoteHeap< ImplementationClass >::unknownByte = 0x100
staticconstexpr

Referenced by resetDataRangeToUnknown().


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