예제 #1
0
        }                               //constructor without argument is not allowed (each dummy must know its simulator object to which it is assigned to)

        /// <summary>
        ///
        /// </summary>
        /// <param name="simulatorId">The device id of the simulator to which this display belongs to.</param>
        /// <param name="simulator">The simulator object to which this dummy is assigend to.</param>
        public StatusDisplayDummy(string simulatorId, CBaseSimulator simulator)
        {
            mySimulatorId = simulatorId;

            ActivitiesStatusDisplay.Instance.RegisterNewDummy(simulatorId);
            myDevice = simulator;
            myDevice.ErrorOccuredEvent += MyDevice_ErrorOccuredEvent;
        }
 /// <summary>
 /// If the connection to the hardware device cannot be established or if the connection is interrupted during communication, this method is invoked.
 /// </summary>
 protected abstract void Simulator_NoConnectionError(CBaseSimulator sender, Exception exception);
 /// <summary>
 /// A generic error handler for any device-related errors.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected abstract void DeviceError(CBaseSimulator sender, Exception exception);
 protected virtual void OnDisconnectOccured(CBaseSimulator device)
 {
     DisconnectOccuredEvent?.Invoke(this, device ?? this);
 }
        protected virtual void OnPreparedForPressureMappingOccured(CBaseSimulator s)
        {
            EventHandler <CBaseSimulator> handler = PreparedForPressureMappingEvent;

            handler?.Invoke(this, s);
        }