BlocksProtocol::HostPacketDecoder< Handler > Struct Template Reference

Parses data packets from a BLOCKS device, and translates them into callbacks on a handler object. More...

Static Public Member Functions

static void processNextPacket (Handler &handler, TopologyIndex deviceIndex, const void *data, int size)
 
static bool processNextMessage (Handler &handler, Packed7BitArrayReader &reader, TopologyIndex deviceIndex, PacketTimestamp packetTimestamp)
 
static bool handleTopology (Handler &handler, Packed7BitArrayReader &reader, bool newTopology)
 
static bool handleTopologyEnd (Handler &handler, Packed7BitArrayReader &reader)
 
static void handleTopologyDevice (Handler &handler, Packed7BitArrayReader &reader)
 
static void handleTopologyConnection (Handler &handler, Packed7BitArrayReader &reader)
 
static bool handleVersion (Handler &handler, Packed7BitArrayReader &reader)
 
static bool handleName (Handler &handler, Packed7BitArrayReader &reader)
 
static bool handleTouch (Handler &handler, Packed7BitArrayReader &reader, TopologyIndex deviceIndex, PacketTimestamp packetTimestamp, bool isStart, bool isEnd)
 
static bool handleTouchWithVelocity (Handler &handler, Packed7BitArrayReader &reader, TopologyIndex deviceIndex, PacketTimestamp packetTimestamp, bool isStart, bool isEnd)
 
static void handleTouch (Handler &handler, TopologyIndex deviceIndex, uint32 timestamp, TouchIndex touchIndex, TouchPosition position, TouchVelocity velocity, bool isStart, bool isEnd)
 
static bool handleButtonDownOrUp (Handler &handler, Packed7BitArrayReader &reader, TopologyIndex deviceIndex, PacketTimestamp packetTimestamp, bool isDown)
 
static bool handleCustomMessage (Handler &handler, Packed7BitArrayReader &reader, TopologyIndex deviceIndex, PacketTimestamp packetTimestamp)
 
static bool handlePacketACK (Handler &handler, Packed7BitArrayReader &reader, TopologyIndex deviceIndex)
 
static bool handleFirmwareUpdateACK (Handler &handler, Packed7BitArrayReader &reader, TopologyIndex deviceIndex)
 
static bool handleConfigMessage (Handler &handler, Packed7BitArrayReader &reader, TopologyIndex deviceIndex)
 
static bool handleLogMessage (Handler &handler, Packed7BitArrayReader &reader, TopologyIndex deviceIndex)
 

Detailed Description

template<typename Handler>
struct BlocksProtocol::HostPacketDecoder< Handler >

Parses data packets from a BLOCKS device, and translates them into callbacks on a handler object.

Member Function Documentation

◆ processNextPacket()

◆ processNextMessage()

template<typename Handler >
static bool BlocksProtocol::HostPacketDecoder< Handler >::processNextMessage ( Handler &  handler,
Packed7BitArrayReader reader,
TopologyIndex  deviceIndex,
PacketTimestamp  packetTimestamp 
)
static

References BlocksProtocol::IntegerWithBitSize< numBits >::bits, BlocksProtocol::configMessage, BlocksProtocol::controlButtonDown, BlocksProtocol::controlButtonUp, BlocksProtocol::deviceNameList, BlocksProtocol::deviceTopology, BlocksProtocol::deviceTopologyEnd, BlocksProtocol::deviceTopologyExtend, BlocksProtocol::deviceVersionList, BlocksProtocol::firmwareUpdateACK, BlocksProtocol::Packed7BitArrayReader::getRemainingBits(), BlocksProtocol::HostPacketDecoder< Handler >::handleButtonDownOrUp(), BlocksProtocol::HostPacketDecoder< Handler >::handleConfigMessage(), BlocksProtocol::HostPacketDecoder< Handler >::handleCustomMessage(), BlocksProtocol::HostPacketDecoder< Handler >::handleFirmwareUpdateACK(), BlocksProtocol::HostPacketDecoder< Handler >::handleLogMessage(), BlocksProtocol::HostPacketDecoder< Handler >::handleName(), BlocksProtocol::HostPacketDecoder< Handler >::handlePacketACK(), BlocksProtocol::HostPacketDecoder< Handler >::handleTopology(), BlocksProtocol::HostPacketDecoder< Handler >::handleTopologyEnd(), BlocksProtocol::HostPacketDecoder< Handler >::handleTouch(), BlocksProtocol::HostPacketDecoder< Handler >::handleTouchWithVelocity(), BlocksProtocol::HostPacketDecoder< Handler >::handleVersion(), jassertfalse, BlocksProtocol::logMessage, BlocksProtocol::packetACK, BlocksProtocol::programEventMessage, BlocksProtocol::Packed7BitArrayReader::read(), BlocksProtocol::touchEnd, BlocksProtocol::touchEndWithVelocity, BlocksProtocol::touchMove, BlocksProtocol::touchMoveWithVelocity, BlocksProtocol::touchStart, and BlocksProtocol::touchStartWithVelocity.

Referenced by BlocksProtocol::HostPacketDecoder< Handler >::processNextPacket().

◆ handleTopology()

◆ handleTopologyEnd()

template<typename Handler >
static bool BlocksProtocol::HostPacketDecoder< Handler >::handleTopologyEnd ( Handler &  handler,
Packed7BitArrayReader reader 
)
static

◆ handleTopologyDevice()

◆ handleTopologyConnection()

◆ handleVersion()

◆ handleName()

◆ handleTouch() [1/2]

◆ handleTouchWithVelocity()

◆ handleTouch() [2/2]

template<typename Handler >
static void BlocksProtocol::HostPacketDecoder< Handler >::handleTouch ( Handler &  handler,
TopologyIndex  deviceIndex,
uint32  timestamp,
TouchIndex  touchIndex,
TouchPosition  position,
TouchVelocity  velocity,
bool  isStart,
bool  isEnd 
)
static

◆ handleButtonDownOrUp()

◆ handleCustomMessage()

◆ handlePacketACK()

◆ handleFirmwareUpdateACK()

◆ handleConfigMessage()

◆ handleLogMessage()

template<typename Handler >
static bool BlocksProtocol::HostPacketDecoder< Handler >::handleLogMessage ( Handler &  handler,
Packed7BitArrayReader reader,
TopologyIndex  deviceIndex 
)
static

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