[][src]Function sacn_unofficial::receive::htp_dmx_merge

pub fn htp_dmx_merge(i: &DMXData, n: &DMXData) -> Result<DMXData>

Performs a highest takes priority (HTP) (per byte) DMX merge of data.

Note this merge is done within the explicit priority, if i or n has an explicitly higher priority it will always take precedence before this HTP merge is attempted. If either data has the preview flag set then the result will have the preview flag set.

Given as an example of a possible merge algorithm.

The first argument (i) is the existing data, n is the new data.

This function is only valid if both inputs have the same universe, sync addr, start_code and the data contains at least the first value (the start code). If this doesn't hold an error will be returned. Other merge functions may allow merging different start codes or not check for them.