template<size_t number_of_subscriptions, typename Allocator = std::allocator<uint8_t>>
connection class
Contents
- Reference
Connection class for static devices.
Public functions
- auto receive(uint8_t* src, uint8_t* src_end) -> bool virtual
- auto has_subscription(const OcaEvent& id) const -> bool virtual
- void remove_subscription(const OcaEvent& id) virtual
- auto add_subscription(const OcaEvent& id, const OcaMethod& method) -> bool virtual
Protected functions
- auto find_subscription(const OcaEvent& id) const -> const Subscription* override
Function documentation
template<size_tnumber_of_subscriptions, typenameAllocator>
bool aes70:: static_device:: connection<number_of_subscriptions, Allocator>:: receive(uint8_t* src,
uint8_t* src_end) virtual
Call this for incoming data. Will return false if something went wrong, e.g. the received data was illegal or on allocation failure.
template<size_tnumber_of_subscriptions, typenameAllocator>
bool aes70:: static_device:: connection<number_of_subscriptions, Allocator>:: has_subscription(const OcaEvent& id) const virtual
Returns true if this connection has a subscription for the given event.
template<size_tnumber_of_subscriptions, typenameAllocator>
void aes70:: static_device:: connection<number_of_subscriptions, Allocator>:: remove_subscription(const OcaEvent& id) virtual
Remove a subscription.
template<size_tnumber_of_subscriptions, typenameAllocator>
bool aes70:: static_device:: connection<number_of_subscriptions, Allocator>:: add_subscription(const OcaEvent& id,
const OcaMethod& method) virtual
Add a subscription.
template<size_tnumber_of_subscriptions, typenameAllocator>
const Subscription* aes70:: static_device:: connection<number_of_subscriptions, Allocator>:: find_subscription(const OcaEvent& id) const override protected
Returns a subscription for the given OcaEvent, or nullptr if no subscription exists.