示例#1
0
 public SignalChannel(Device device, Filter[] filters)
 {
     _device      = device;
     _anyChannel  = new AnyChannel(create_SignalDoubleChannel_filters(device.DevicePtr, filters, (IntPtr)filters.Length));
     _dataChannel = new DataChannel <double>(_anyChannel);
     _anyChannel.LengthChanged += (sender, length) => LengthChanged?.Invoke(sender, length);
 }
 public BatteryChannel(Device device)
 {
     _device      = device;
     _anyChannel  = new AnyChannel(create_BatteryIntChannel(device.DevicePtr));
     _dataChannel = new DataChannel <int>(_anyChannel);
     _anyChannel.LengthChanged += (sender, length) => LengthChanged?.Invoke(sender, length);
 }
示例#3
0
 public SignalChannel(Device device, ChannelInfo info)
 {
     _device      = device;
     _anyChannel  = new AnyChannel(create_SignalDoubleChannel_info(device.DevicePtr, info));
     _dataChannel = new DataChannel <double>(_anyChannel);
     _anyChannel.LengthChanged += (sender, length) => LengthChanged?.Invoke(sender, length);
 }
示例#4
0
 public EegChannel(Device device)
 {
     _device      = device;
     _anyChannel  = new AnyChannel(create_EegDoubleChannel(device.DevicePtr));
     _dataChannel = new DataChannel <double>(_anyChannel);
     _anyChannel.LengthChanged += (sender, length) => LengthChanged?.Invoke(sender, length);
 }
示例#5
0
 public FilteredChannel(IDataChannel <double> channel, Filter[] filters)
 {
     _sourceChannel             = channel;
     _anyChannel                = new AnyChannel(create_FilteredDoubleChannel(channel.ChannelPtr, filters, (IntPtr)filters.Length));
     _dataChannel               = new DataChannel <double>(_anyChannel);
     _anyChannel.LengthChanged += (sender, length) => LengthChanged?.Invoke(sender, length);
 }
示例#6
0
        public SpectrumPowerChannel(IEnumerable <SpectrumChannel> channels, float lowFrequency, float highFrequency, string name, double windowDuration = 8.0, double overlappingCoeff = 0.9)
        {
            _channelsPointers = channels.Select(x => x.ChannelPtr).ToArray();

            _anyChannel  = new AnyChannel(create_SpectrumPowerDoubleChannel(_channelsPointers, (IntPtr)_channelsPointers.Length, lowFrequency, highFrequency, name, windowDuration, overlappingCoeff));
            _dataChannel = new DataChannel <double>(_anyChannel);
            _anyChannel.LengthChanged += (sender, length) => LengthChanged?.Invoke(sender, length);
        }
示例#7
0
 public BipolarDoubleChannel(IDataChannel <double> first, IDataChannel <double> second)
 {
     _firstSourceChannel        = first;
     _secondSourceChannel       = second;
     _anyChannel                = new AnyChannel(create_BipolarDoubleChannel(first.ChannelPtr, second.ChannelPtr));
     _dataChannel               = new DataChannel <double>(_anyChannel);
     _anyChannel.LengthChanged += (sender, length) => LengthChanged?.Invoke(sender, length);
 }
示例#8
0
        public EmulationChannel(IEnumerable <EmulationSine> components, float samplingFrequency, int initialLength)
        {
            var componentArray = components.ToArray();

            _anyChannel  = new AnyChannel(create_EmulationDoubleChannel(componentArray, (IntPtr)componentArray.Length, samplingFrequency, (IntPtr)initialLength));
            _dataChannel = new DataChannel <double>(_anyChannel);
            _anyChannel.LengthChanged += (sender, length) => LengthChanged?.Invoke(sender, length);
        }
示例#9
0
 public EegIndexChannel(EegChannel t3, EegChannel t4, EegChannel o1, EegChannel o2)
 {
     _t3         = t3;
     _t4         = t4;
     _o1         = o1;
     _o2         = o2;
     _anyChannel = new AnyChannel(create_EegIndexChannel(_t3.ChannelPtr, _t4.ChannelPtr, _o1.ChannelPtr, _o2.ChannelPtr));
     _anyChannel.LengthChanged += (sender, length) => LengthChanged?.Invoke(sender, length);
 }
示例#10
0
 public DataChannel(AnyChannel channel)
 {
     _anyChannel        = channel;
     _channelDataReader = new NativeChannelDataReader <T>();
 }
示例#11
0
 public SpectrumChannel(IDataChannel <double> channel)
 {
     _sourceChannel             = channel;
     _anyChannel                = new AnyChannel(create_SpectrumDoubleChannel(channel.ChannelPtr));
     _anyChannel.LengthChanged += (sender, length) => LengthChanged?.Invoke(sender, length);
 }
 public EmotionStateChannel(EegIndexChannel indexChannel)
 {
     _indexChannel              = indexChannel;
     _anyChannel                = new AnyChannel(create_EmotionalStateChannel(_indexChannel.ChannelPtr));
     _anyChannel.LengthChanged += (sender, length) => LengthChanged?.Invoke(sender, length);
 }