Table of Contents

Class Channel

Namespace
Hse.EviFluor
Assembly
Hseagcom.EviFluor.dll

Represents a measurement channel with sample and reference values, measured in mV.

public class Channel : IJsonSerializable
Inheritance
Channel
Implements
Inherited Members

Constructors

Channel(double, double, int)

Initializes a new instance of the Channel class with optional dark and value values.

public Channel(double dark = 0, double value = 0, int ledPower = 0)

Parameters

dark double

The dark value in mV (default: 0.0).

value double

The value in mV (default: 0.0).

ledPower int

The led power, no unit, range 0..255 (default: 0).

Properties

Dark

Gets or sets the dark value in mV.

public double Dark { get; set; }

Property Value

double

LedPower

Gets or sets the led power. No unit, range 0..255..

public int LedPower { get; set; }

Property Value

int

Value

Gets or sets the value in mV.

public double Value { get; set; }

Property Value

double

Methods

Delta()

Calculates the difference between value and dark.

public double Delta()

Returns

double

difference in mV

FromJson(JsonNode)

Creates a Channel instance from a JSON node.

public static Channel FromJson(JsonNode node)

Parameters

node JsonNode

The JSON node containing the channel data.

Returns

Channel

A new Channel instance with values extracted from the JSON node.

Exceptions

ArgumentException

Thrown when the JSON node is invalid.

ToJson()

Converts the channel values to a JSON representation.

public JsonNode ToJson()

Returns

JsonNode

A JsonNode representing the channel values.

ToString()

Returns a string representation of the channel values.

public override string ToString()

Returns

string

A string in the format "Sample: [value] Reference: [value]".