/// <summary> /// Enqueues the ASDU to the transmission queue. /// </summary> /// If an active connection exists the ASDU will be sent to the active client immediately. Otherwhise /// the ASDU will be added to the transmission queue for later transmission. /// <param name="asdu">ASDU to be sent</param> public void EnqueueASDU(ASDU asdu) { if (serverMode == ServerMode.SINGLE_REDUNDANCY_GROUP) { asduQueue.EnqueueAsdu(asdu); foreach (ClientConnection connection in allOpenConnections) { if (connection.IsActive) { connection.ASDUReadyToSend(); } } } else { foreach (ClientConnection connection in allOpenConnections) { if (connection.IsActive) { connection.GetASDUQueue().EnqueueAsdu(asdu); connection.ASDUReadyToSend(); } } } }
/// <summary> /// Enqueues the ASDU to the redundancy group specific message queue. /// This function is called by <see cref="lib60870.CS104.Server.EnqueueASDU"/>. If the Server.EnqueuASDU method /// is used this method should not be called! /// </summary> /// <param name="asdu">The ASDU to enqueue.</param> public void EnqueueASDU(ASDU asdu) { if (asduQueue != null) { asduQueue.EnqueueAsdu(asdu); } }