Table of Contents

Class ULINT

Namespace
L5Sharp.Types.Atomics
Assembly
L5Sharp.dll

Represents a ULINT Logix atomic data type, or a type analogous to a ulong.

public sealed class ULINT : AtomicType, ILogixSerializable, IComparable, IConvertible
Inheritance
ULINT
Implements
Inherited Members

Constructors

ULINT()

Creates a new default ULINT type.

public ULINT()

ULINT(Radix)

Creates a new ULINT value with the provided radix format.

public ULINT(Radix radix)

Parameters

radix Radix

The Radix number format of the value.

ULINT(ulong)

Creates a new ULINT with the provided value.

public ULINT(ulong value)

Parameters

value ulong

The value to initialize the type with.

ULINT(ulong, Radix)

Creates a new ULINT with the provided value.

public ULINT(ulong value, Radix radix)

Parameters

value ulong

The value to initialize the type with.

radix Radix

The optional radix format of the value.

Properties

this[int]

Gets bit member's data type value at the specified bit index.

public BOOL this[int bit] { get; }

Parameters

bit int

The zero based bit index of the value to get.

Property Value

BOOL

A BOOL representing the value of the specified bit value (0/1).

Exceptions

ArgumentOutOfRangeException

bit is out of range of the atomic type bit length.

Name

The name of the logix type.

public override string Name { get; }

Property Value

string

A string name identifying the logix type.

Radix

The radix format for the AtomicType.

public override Radix Radix { get; }

Property Value

Radix

A Radix representing the format of the atomic type value.

Methods

CompareTo(object?)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(object? obj)

Parameters

obj object

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value

Meaning

Less than zero

This instance precedes obj in the sort order.

Zero

This instance occurs in the same position in the sort order as obj.

Greater than zero

This instance follows obj in the sort order.

Exceptions

ArgumentException

obj is not the same type as this instance.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetBytes()

Returns the AtomicType value as an array of byte values.

public override byte[] GetBytes()

Returns

byte[]

An array of byte representing the value of the type.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

OnMemberDataChanged(object, EventArgs)

Executes the logic to update the atomic value and forward the data changed event up the type/member hierarchy.

protected override void OnMemberDataChanged(object sender, EventArgs e)

Parameters

sender object

The member sending the change event.

e EventArgs

The event args of the event.

Remarks

Atomic members (bits) represent the value of the type. When the member data changed event is triggered, we want to intercept that on the parent atomic type in order to change/update the reflected value. We can do that by getting the changed member (sender) name (bit number) and value (bit value) and setting to get the updated value. However, since atomic types ar immutable, we have to send the changed value up the chain to the parent member (Tag, DataValue, DataValueMember) so that it can replace it's data type with the new atomic value. This is captured in LogixMember.

Parse(string)

Parses the provided string value to a new ULINT.

public static ULINT Parse(string value)

Parameters

value string

The string value to parse.

Returns

ULINT

A ULINT representing the parsed value.

Exceptions

FormatException

The Radix format can not be inferred from value.

Operators

implicit operator string(ULINT)

Implicitly converts the provided ULINT to a string value.

public static implicit operator string(ULINT value)

Parameters

value ULINT

The value to convert.

Returns

string

A new string value.

implicit operator ulong(ULINT)

Converts the provided ULINT to a ulong value.

public static implicit operator ulong(ULINT atomic)

Parameters

atomic ULINT

The value to convert.

Returns

ulong

A ulong type value.

implicit operator ULINT(string)

Implicitly converts a string to a ULINT value.

public static implicit operator ULINT(string value)

Parameters

value string

The value to convert.

Returns

ULINT

A new ULINT value.

implicit operator ULINT(ulong)

Converts the provided ulong to a ULINT value.

public static implicit operator ULINT(ulong value)

Parameters

value ulong

The value to convert.

Returns

ULINT

A ULINT value.