/// <summary> /// Notify the listeners of the departure event /// </summary> /// <param name="address"> Vector of Long objects representing the address of /// departed devices. </param> protected internal virtual void fireDepartureEvent(DSPortAdapter adapter, List <long> address) { DeviceMonitorEvent dme = new DeviceMonitorEvent(DeviceMonitorEvent.DEPARTURE, this, adapter, address); for (int i = 0; i < listeners.Count; i++) { DeviceMonitorEventListener listener = (DeviceMonitorEventListener)listeners[i]; listener.deviceDeparture(dme); } }
/// <summary> /// Notify the listeners of the arrival event /// </summary> /// <param name="address"> Vector of Long objects representing the address of new /// arrivals. </param> protected internal virtual void fireArrivalEvent(DSPortAdapter adapter, List <long> address) { DeviceMonitorEvent dme = new DeviceMonitorEvent(DeviceMonitorEvent.ARRIVAL, this, adapter, address); for (int i = 0; i < listeners.Count; i++) { DeviceMonitorEventListener listener = (DeviceMonitorEventListener)listeners[i]; listener.deviceArrival(dme); } }