Table of Contents

Class ForceableDigitalInputModule

Namespace
Loehnert.Lisrt.IO
Assembly
Loehnert.Lisrt.IO.dll

Represents a decorator for an IDigitalInput implementation, that make the digital input forceable.

public class ForceableDigitalInputModule : PropertyChangedBase, ILisrtModule, IDigitalInput, IHasKey, IHasDescription, IHasServiceView, IHasDeviceLabel, IInitializable, INotifyPropertyChangedEx, INotifyPropertyChanged
Inheritance
PropertyChangedBase
ForceableDigitalInputModule
Implements
INotifyPropertyChangedEx
Inherited Members
PropertyChangedBase.Refresh()
PropertyChangedBase.IsNotifying
PropertyChangedBase.PropertyChanged

Remarks

In order to force an input from the service view, the user needs the permission ForceValuePermission.

Constructors

ForceableDigitalInputModule(IDigitalInput)

Initializes a new instance of the ForceableDigitalInputModule class.

public ForceableDigitalInputModule(IDigitalInput digitalInput)

Parameters

digitalInput IDigitalInput

The decorated digital input.

Exceptions

ArgumentNullException

Thrown when digitalInput is null.

Properties

DecoratedDigitalInput

Gets the decorated module.

[Configuration(DoNotCreateNewInstance = true)]
public IDigitalInput DecoratedDigitalInput { get; }

Property Value

IDigitalInput

Description

Gets the translatable description.

public ITranslation Description { get; }

Property Value

ITranslation

DeviceLabel

Gets or sets the device label or null if the decorated module does not implement IHasDeviceLabel.

public string DeviceLabel { get; set; }

Property Value

string

Exceptions

InvalidCastException

Thrown by setter while decorated module does not implement IHasDeviceLabel.

Enabled

Gets or sets a value indicating whether the module is enabled.

public bool Enabled { get; set; }

Property Value

bool

Icon

Gets the module icon.

public Uri Icon { get; }

Property Value

Uri

InitializationState

Gets the initialization state of the decorated digital input if it implements the IInitializable interface.

public InitializationState InitializationState { get; }

Property Value

InitializationState

InstanceID

Gets the instance id or always 0 (zero) if the decorated module does not implement IHasDeviceLabel.

public int InstanceID { get; }

Property Value

int

IsForced

Gets a value indicating whether the input value is forced.

public bool IsForced { get; }

Property Value

bool
See Also

Key

Gets the unique key.

public string Key { get; }

Property Value

string

Name

Gets the name.

public string Name { get; }

Property Value

string

Remarks

This must not contain '.'.

Parent

Gets or sets the parent module.

public ILisrtModule Parent { get; set; }

Property Value

ILisrtModule

TreeItem

Gets the module tree item view model.

public ITreeItem TreeItem { get; }

Property Value

ITreeItem

Value

Gets a value indicating whether input value is high.

public bool Value { get; }

Property Value

bool

Methods

Exit()

De initializes the decorated digital input if it implements the IInitializable interface.

public void Exit()

ForceValue(bool)

Forces Value to return the given value.

public void ForceValue(bool value)

Parameters

value bool

The value to force.

See Also

GetValue()

Gets the value.

public bool GetValue()

Returns

bool

The input value or if IsForced the forced value.

Initialize()

Initializes the decorated digital input if it implements the IInitializable interface.

public void Initialize()

ReleaseForce()

Releases the forced value.

public void ReleaseForce()
See Also

ShowServiceView()

Shows the service window and the service window of the decorated input.

public void ShowServiceView()