sACN  3.0.0
Implementation of ANSI E1.31 (Streaming ACN)
View other versions:
Loading...
Searching...
No Matches
MergeReceiver::NotifyHandler Class Referenceabstract

A base class for a class that receives notification callbacks from a sACN merge receiver. More...

#include <merge_receiver.h>

Public Member Functions

virtual void HandleMergedData (Handle handle, const SacnRecvMergedData &merged_data)=0
 Notify that a new data packet has been received and merged.
 
virtual void HandleNonDmxData (Handle receiver_handle, const etcpal::SockAddr &source_addr, const SacnRemoteSource &source_info, const SacnRecvUniverseData &universe_data)
 Notify that a non-data packet has been received.
 
virtual void HandleSourcesLost (Handle handle, uint16_t universe, const std::vector< SacnLostSource > &lost_sources)
 Notify that one or more sources have entered a source loss state.
 
virtual void HandleSamplingPeriodStarted (Handle handle, uint16_t universe)
 Notify that a merge receiver's sampling period has begun.
 
virtual void HandleSamplingPeriodEnded (Handle handle, uint16_t universe)
 Notify that a merge receiver's sampling period has ended.
 
virtual void HandleSourcePapLost (Handle handle, uint16_t universe, const SacnRemoteSource &source)
 Notify that a source has stopped transmission of per-address priority packets.
 
virtual void HandleSourceLimitExceeded (Handle handle, uint16_t universe)
 Notify that more than the configured maximum number of sources are currently sending on the universe being listened to.
 

Detailed Description

A base class for a class that receives notification callbacks from a sACN merge receiver.

Member Function Documentation

◆ HandleMergedData()

virtual void HandleMergedData ( Handle handle,
const SacnRecvMergedData & merged_data )
pure virtual

Notify that a new data packet has been received and merged.

This callback will be called in multiple ways:

  1. When a new non-preview data packet or per-address priority packet is received from the sACN Receiver module, it is immediately and synchronously passed to a DMX Merger. If the sampling period has not ended for the source, the merged result is not passed to this callback until the sampling period ends. Otherwise, it is immediately and synchronously passed to this callback.
  2. When a sACN source is no longer sending non-preview data or per-address priority packets, the lost source callback from the sACN Receiver module will be passed to a merger, after which the merged result is passed to this callback pending the sampling period.

After a networking reset, some of the sources on the universe may not be included in the resulting sampling period. Therefore, expect this to continue to be called during said sampling period.

This callback should be processed quickly, since it will interfere with the receipt and processing of other sACN packets on the universe.

Parameters
[in]handleThe merge receiver's handle.
[in]merged_dataThe merged data (and relevant information about that data), starting from the first slot of the currently configured footprint. Only sources that are not currently part of a sampling period are part of the merged result.

◆ HandleNonDmxData()

virtual void HandleNonDmxData ( Handle receiver_handle,
const etcpal::SockAddr & source_addr,
const SacnRemoteSource & source_info,
const SacnRecvUniverseData & universe_data )
inlinevirtual

Notify that a non-data packet has been received.

When an established source sends a sACN data packet that doesn't contain DMX values or priorities, the raw data within the configured footprint is immediately and synchronously passed to this callback.

This callback should be processed quickly, since it will interfere with the receipt and processing of other sACN packets on the universe.

If the source is sending sACN Sync packets, this callback will only be called when the sync packet is received, if the source forces the packet, or if the source sends a data packet without a sync universe. TODO: this version of the sACN library does not support sACN Sync. This paragraph will be valid in the future.

Parameters
[in]receiver_handleThe merge receiver's handle.
[in]source_addrThe network address from which the sACN packet originated.
[in]source_infoInformation about the source that sent this data.
[in]universe_dataThe universe data (and relevant information about that data), starting from the first slot of the currently configured footprint.

◆ HandleSamplingPeriodEnded()

virtual void HandleSamplingPeriodEnded ( Handle handle,
uint16_t universe )
inlinevirtual

Notify that a merge receiver's sampling period has ended.

All sources that were included in this sampling period will now officially be included in merged data notifications. If there was a networking reset during this sampling period, another sampling period may have been scheduled, in which case this will be immediately followed by a sampling period started notification.

If there were any active levels received during the sampling period, they were factored into the merged data notification called immediately before this notification. If the merged data notification wasn't called before this notification, that means there currently isn't any active data on the universe.

Parameters
handleThe merge receiver's handle.
universeThe universe the merge receiver is monitoring.

◆ HandleSamplingPeriodStarted()

virtual void HandleSamplingPeriodStarted ( Handle handle,
uint16_t universe )
inlinevirtual

Notify that a merge receiver's sampling period has begun.

If this sampling period was due to a networking reset, some sources may not be included in it. The sources that are not part of the sampling period will continue to be included in merged data notifications.

Parameters
handleThe merge receiver's handle.
universeThe universe the merge receiver is monitoring.

◆ HandleSourceLimitExceeded()

virtual void HandleSourceLimitExceeded ( Handle handle,
uint16_t universe )
inlinevirtual

Notify that more than the configured maximum number of sources are currently sending on the universe being listened to.

This is a notification that is directly forwarded from the sACN Receiver module.

Parameters
[in]handleThe merge receiver's handle.
[in]universeThe universe this merge receiver is monitoring.

◆ HandleSourcePapLost()

virtual void HandleSourcePapLost ( Handle handle,
uint16_t universe,
const SacnRemoteSource & source )
inlinevirtual

Notify that a source has stopped transmission of per-address priority packets.

Parameters
handleThe merge receiver's handle.
universeThe universe this merge receiver is monitoring.
sourceInformation about the source that has stopped transmission of per-address priority.

◆ HandleSourcesLost()

virtual void HandleSourcesLost ( Handle handle,
uint16_t universe,
const std::vector< SacnLostSource > & lost_sources )
inlinevirtual

Notify that one or more sources have entered a source loss state.

Parameters
handleThe merge receiver's handle.
universeThe universe this merge receiver is monitoring.
lost_sourcesVector of structs describing the source or sources that have been lost.

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