Class ForceableDigitalInputModule
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
-
PropertyChangedBaseForceableDigitalInputModule
- Implements
-
INotifyPropertyChangedEx
- Inherited Members
-
PropertyChangedBase.Refresh()PropertyChangedBase.IsNotifyingPropertyChangedBase.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
IDigitalInputThe 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
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
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
Icon
Gets the module icon.
public Uri Icon { get; }
Property Value
InitializationState
Gets the initialization state of the decorated digital input if it implements the IInitializable interface.
public InitializationState InitializationState { get; }
Property Value
InstanceID
Gets the instance id or always 0 (zero) if the decorated module does not implement IHasDeviceLabel.
public int InstanceID { get; }
Property Value
IsForced
Gets a value indicating whether the input value is forced.
public bool IsForced { get; }
Property Value
- See Also
Key
Gets the unique key.
public string Key { get; }
Property Value
Name
Gets the name.
public string Name { get; }
Property Value
Remarks
This must not contain '.'.
Parent
Gets or sets the parent module.
public ILisrtModule Parent { get; set; }
Property Value
TreeItem
Gets the module tree item view model.
public ITreeItem TreeItem { get; }
Property Value
Value
Gets a value indicating whether input value is high.
public bool Value { get; }
Property Value
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
boolThe value to force.
- See Also
GetValue()
Gets the value.
public bool GetValue()
Returns
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()