コード例 #1
0
ファイル: Device.cs プロジェクト: maslovvladimir/neuro-sdk
        internal Device(IntPtr devicePtr)
        {
            DevicePtr = devicePtr;
            if (DevicePtr == null)
            {
                throw new ArgumentNullException(nameof(devicePtr), "Device pointer is null");
            }

            _paramChangedFunc = OnParameterChanged;
            var result = device_subscribe_param_changed(DevicePtr, _paramChangedFunc, out _paramChangedListenerPtr, IntPtr.Zero);

            SdkError.ThrowIfError(result);

            _doubleDataReceivedFunc = OnDoubleDataReceived;
            _signalDataReceivedFunc = OnSignalDataReceived;
            _intDataReceivedFunc    = OnIntDataReceived;
        }
コード例 #2
0
ファイル: Device.cs プロジェクト: maslovvladimir/neuro-sdk
        public Device(DeviceInfo info)
        {
            DevicePtr = create_Device(info);
            if (DevicePtr == null)
            {
                throw new InvalidOperationException(SdkError.LastErrorMessage);
            }

            _paramChangedFunc = OnParameterChanged;
            var result = device_subscribe_param_changed(DevicePtr, _paramChangedFunc, out _paramChangedListenerPtr, IntPtr.Zero);

            SdkError.ThrowIfError(result);

            _doubleDataReceivedFunc = OnDoubleDataReceived;
            _signalDataReceivedFunc = OnSignalDataReceived;
            _intDataReceivedFunc    = OnIntDataReceived;
        }
コード例 #3
0
ファイル: Device.cs プロジェクト: maslovvladimir/neuro-sdk
 private static extern int device_subscribe_double_channel_data_received(IntPtr devicePtr, ChannelInfo info, DeviceDoubleDataReceivedFunc callback, out IntPtr outListenerPtr, IntPtr userData);