#include <MIDI_Interfaces/BLEMIDI/PollingBLEMIDISender.hpp>
template<class Derived>
class PollingBLEMIDISender< Derived >
Class that buffers MIDI BLE packets.
Definition at line 14 of file PollingBLEMIDISender.hpp.
|
BLEMIDIPacketBuilder | packet |
| View of the data to send.
|
|
unsigned long | timeout {10} |
| Timeout before the sender thread sends a packet.
|
|
unsigned long | packet_start_time {0} |
| Time point when the packet was started.
|
|
uint16_t | min_mtu {23} |
| The minimum MTU of all connected clients.
|
|
uint16_t | force_min_mtu {515} |
| Override the minimum MTU (0 means don't override, nonzero overrides if it's smaller than the minimum MTU of the clients).
|
|
◆ PollingBLEMIDISender() [1/2]
◆ PollingBLEMIDISender() [2/2]
◆ ~PollingBLEMIDISender()
◆ operator=()
◆ begin()
◆ acquirePacket()
Acquire exclusive access to the buffer.
- Returns
- A RAII wrapper that automatically releases the buffer upon destruction. Just make sure you don't keep any pointers to the
packet
member.
◆ releasePacketAndNotify()
Release exclusive access to the buffer and notify the sender thread that data is available.
◆ sendNow()
Sends the data immediately without waiting for the timeout.
◆ updateMTU()
template<class Derived >
void updateMTU |
( |
uint16_t | mtu | ) |
|
Set the maximum transmission unit of the Bluetooth link.
Used to compute the MIDI BLE packet size.
◆ getMinMTU()
template<class Derived >
uint16_t getMinMTU |
( |
| ) |
const |
|
inline |
◆ forceMinMTU()
template<class Derived >
void forceMinMTU |
( |
uint16_t | mtu | ) |
|
Force the MTU to an artificially small value (used for testing).
◆ setTimeout()
template<class Derived >
void setTimeout |
( |
std::chrono::milliseconds | timeout | ) |
|
Set the timeout, the number of milliseconds to buffer the outgoing MIDI messages.
◆ sendData()
Actually perform the BLE notification with the given data.
◆ packet
◆ timeout
template<class Derived >
unsigned long timeout {10} |
|
private |
◆ packet_start_time
template<class Derived >
unsigned long packet_start_time {0} |
|
private |
◆ min_mtu
◆ force_min_mtu
template<class Derived >
uint16_t force_min_mtu {515} |
|
private |
Override the minimum MTU (0 means don't override, nonzero overrides if it's smaller than the minimum MTU of the clients).
- See also
- forceMinMTU()
Definition at line 69 of file PollingBLEMIDISender.hpp.
The documentation for this class was generated from the following file: