The BLOCKS SDK
BlocksProtocol::HostPacketDecoder< Handler > Struct Template Reference

Description

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

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

Static Public Member Functions

static void processNextPacket (Handler &handler, TopologyIndex deviceIndex, const void *data, int size)
 
static juce::uint32 getMessageType (Packed7BitArrayReader &reader)
 
static bool processNextMessage (Handler &handler, Packed7BitArrayReader &reader, MessageFromDevice messageType, 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, juce::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)
 

Member Function Documentation

◆ processNextPacket()

◆ getMessageType()

◆ processNextMessage()

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

◆ 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,
juce::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: