/// <summary> /// Raises the synchronization message recieved event. /// </summary> /// <param name="source">The source.</param> /// <param name="packet">The packet.</param> protected virtual void RaiseNewSynchronize(IPEndPoint source, StreamingAcnSynchronizationPacket packet) { if (NewSynchronize != null) { NewSynchronize(this, new NewPacketEventArgs <StreamingAcnSynchronizationPacket>(source, packet)); } }
/// <summary> /// Sends a DMX synchronization message to all interested parties. /// </summary> /// <remarks> /// This should be sent after every DMX frame to indicate to listeners that the DMX data is ready /// to be sent. /// </remarks> public void SendSynchronize() { if (SynchronizationAddress == 0) { throw new InvalidOperationException("An attempt was made to send a synchronize message on an sACN socket not configured for synchronization. Please set SynchronizationAddress on the socket to a non zero universe."); } StreamingAcnSynchronizationPacket packet = new StreamingAcnSynchronizationPacket(); if (OverrideRootLayer) { packet.Root = GetRootLayer(); } packet.Framing.SequenceNumber = (byte)GetSequenceNumber(SynchronizationAddress); packet.Framing.SynchronizationAddress = (short)SynchronizationAddress; SendPacket(packet, GetUniverseEndPoint(SynchronizationAddress)); }