Пример #1
0
 protected virtual void onDeviceStateChanged(SWIGTYPE_p_XsDevice dev, XsDeviceState newState, XsDeviceState oldState)
 {
     if (SwigDerivedClassHasMethod("onDeviceStateChanged", swigMethodTypes0))
     {
         xsensdeviceapiPINVOKE.XsCallback_onDeviceStateChangedSwigExplicitXsCallback(swigCPtr, SWIGTYPE_p_XsDevice.getCPtr(dev), (int)newState, (int)oldState);
     }
     else
     {
         xsensdeviceapiPINVOKE.XsCallback_onDeviceStateChanged(swigCPtr, SWIGTYPE_p_XsDevice.getCPtr(dev), (int)newState, (int)oldState);
     }
 }
Пример #2
0
        protected override void onDeviceStateChanged(SWIGTYPE_p_XsDevice dev, XsDeviceState newState, XsDeviceState oldState)
        {
            XsDevice device = new XsDevice(dev);

            switch (newState)
            {
            case XsDeviceState.XDS_Config:
                if (oldState != XsDeviceState.XDS_Initial)
                {
                    if (MeasurementStopped != null)
                    {
                        MeasurementStopped(this, new DeviceIdArg(device.deviceId()));
                    }
                }
                break;

            case XsDeviceState.XDS_Measurement:
                if (MeasurementStarted != null)
                {
                    MeasurementStarted(this, new DeviceIdArg(device.deviceId()));
                }
                break;

            case XsDeviceState.XDS_WaitingForRecordingStart:
                if (WaitingForRecordingStart != null)
                {
                    WaitingForRecordingStart(this, new DeviceIdArg(device.deviceId()));
                }
                break;

            case XsDeviceState.XDS_Recording:
                if (RecordingStarted != null)
                {
                    RecordingStarted(this, new DeviceIdArg(device.deviceId()));
                }
                break;

            default:
                break;
            }
        }
Пример #3
0
        public XsDeviceState deviceState()
        {
            XsDeviceState ret = (XsDeviceState)xsensdeviceapiPINVOKE.XsDevice_deviceState(swigCPtr);

            return(ret);
        }