Table of Contents

Struct Watchdog

Namespace
L5Sharp.Common
Assembly
L5Sharp.dll

A configurable property of a Task that specified how long a task can rung before triggering a major fault.

public readonly struct Watchdog : IEquatable<Watchdog>
Implements
Inherited Members

Remarks

Watchdog is a simple float value that must be between 0.1 and 2,000,000.0 ms. Attempting to set the Watchdog to a value outside that range will result in an ArgumentOutOfRangeException. This parameter will control how long a task can rung before triggering a major fault.

Constructors

Watchdog(float)

Creates a new instance of Watchdog with the specified value.

public Watchdog(float watchdog)

Parameters

watchdog float

The value of the watchdog in milliseconds. Must be a value between 0.1 and 2M.

Exceptions

ArgumentOutOfRangeException

Throw when the provided value is not within the specified range.

Methods

Default()

public static Watchdog Default()

Returns

Watchdog

A new Watchdog value.

Equals(Watchdog)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Watchdog other)

Parameters

other Watchdog

An object to compare with this object.

Returns

bool

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

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Parse(string)

Parses a string value into a Watchdog.

public static Watchdog Parse(string str)

Parameters

str string

The string to parse.

Returns

Watchdog

A Watchdog value if the parse was successful; otherwise; the default value.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator ==(Watchdog, Watchdog)

Determines if the provided objects are equal.

public static bool operator ==(Watchdog left, Watchdog right)

Parameters

left Watchdog

An object to compare.

right Watchdog

An object to compare.

Returns

bool

true if the provided objects are equal; otherwise, false.

implicit operator float(Watchdog)

Converts a Watchdog to a float.

public static implicit operator float(Watchdog watchdog)

Parameters

watchdog Watchdog

The value to convert.

Returns

float

A float value.

implicit operator Watchdog(float)

Converts a float to a Watchdog.

public static implicit operator Watchdog(float watchdog)

Parameters

watchdog float

The value to convert.

Returns

Watchdog

A Watchdog value.

operator !=(Watchdog, Watchdog)

Determines if the provided objects are not equal.

public static bool operator !=(Watchdog left, Watchdog right)

Parameters

left Watchdog

An object to compare.

right Watchdog

An object to compare.

Returns

bool

true if the provided objects are not equal; otherwise, false.