Class Channel
Defines a basic component channel.
Inherited Members
Namespace: DelsysAPI.Channels
Assembly: DelsysAPI.dll
Syntax
public abstract class Channel
Constructors
Channel(Units)
Default constructor. Only applies a unit, everything else is default (Id becomes system-assigned new Guid)
Declaration
protected Channel(Units unit)
Parameters
| Type | Name | Description |
|---|---|---|
| Units | unit |
Fields
FrameInterval
How many seconds of data within a frame
Declaration
public double FrameInterval
Field Value
| Type | Description |
|---|---|
| System.Double |
MaxValue
Maximum value of the channel output. This does nothing internally, but may be used as a reference.
Declaration
public double MaxValue
Field Value
| Type | Description |
|---|---|
| System.Double |
MinValue
Minimum value of the channel output. This does nothing internally, but may be used as a reference.
Declaration
public double MinValue
Field Value
| Type | Description |
|---|---|
| System.Double |
Name
The channel's name. Typically the type and index (e.g ACC X or EMG A)
Declaration
public string Name
Field Value
| Type | Description |
|---|---|
| System.String |
Type
Type of the channel. See the enum description for details.
Declaration
public ChannelTypes Type
Field Value
| Type | Description |
|---|---|
| ChannelTypes |
Properties
Id
Internal GUID of the channel. Useful for name-agnostic referencing.
Declaration
public Guid Id { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Guid |
IsBound
Has the channel been assigned to a transform?
Declaration
public bool IsBound { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
LostFrameFlag
A matching buffer to the samples buffer. Each index indicates whether the indexed sample was lost data or not.
Declaration
public List<bool> LostFrameFlag { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.Boolean> |
NativeSampleRate
Typically the same as Fs, except in the case of filtering functions, such as RMS. Base sample rate is the original sample rate, and Fs is the sample rate received by the PC.
Declaration
public double NativeSampleRate { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
SampleRate
Sampling Frequency of the channel.
Declaration
public double SampleRate { get; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Samples
Samples currently queued into the channel buffer.
Declaration
public List<double> Samples { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.Double> |
SampleSize
The size of the sample (bits)
Declaration
public int SampleSize { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
SamplesPerFrame
The number of samples that are obtained every FrameInterval.
Declaration
public int SamplesPerFrame { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
ScaledSamples
Automatically loaded and scaled based on the Samples buffer.
Declaration
public List<double> ScaledSamples { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.Double> |
Unit
Channel Units
Declaration
public Units Unit { get; set; }
Property Value
| Type | Description |
|---|---|
| Units |
Methods
AddLostFrameFlag(Boolean)
Overridable method for adding a lost frame flag to the LostFrameData buffer.
Declaration
public virtual void AddLostFrameFlag(bool flag)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | flag |
AddSample(Double)
Overridable add sample method. Just adds a sample if there are less than 5000 already in the buffer.
Declaration
public virtual void AddSample(double sample)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | sample |
GetScaledSample(Double)
Define how a raw sample should be scaled...
Declaration
public abstract double GetScaledSample(double sample)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | sample |
Returns
| Type | Description |
|---|---|
| System.Double |
ScaleSamples()
Overridable method for processing all Samples into the ScaledSamples buffer. By default calls GetScaledSample on each sample.
Declaration
public virtual List<double> ScaleSamples()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.Double> |