Class CommandSenderInfo

Observable telemetry model for the CommandSender block.

Inheritance
CommandSenderInfo
Namespace: MOSAIC.Models.Devices
Assembly: MOSAIC.dll
Syntax
public class CommandSenderInfo : ObservableObject, INotifyPropertyChanged, INotifyPropertyChanging

Fields

_commandsSent

Running count of commands sent since connection.

Declaration
[ObservableProperty]
private int _commandsSent
Field Value
Type Description
int

_lastCommand

The most recently sent command string.

Declaration
[ObservableProperty]
private string _lastCommand
Field Value
Type Description
string

_status

Current connection status string.

Declaration
[ObservableProperty]
private string _status
Field Value
Type Description
string

_target

Target endpoint in host:port format.

Declaration
[ObservableProperty]
private string _target
Field Value
Type Description
string

Properties

CommandsSent

Running count of commands sent since connection.

Declaration
[ExcludeFromCodeCoverage]
public int CommandsSent { get; set; }
Property Value
Type Description
int

LastCommand

The most recently sent command string.

Declaration
[ExcludeFromCodeCoverage]
public string LastCommand { get; set; }
Property Value
Type Description
string

Status

Current connection status string.

Declaration
[ExcludeFromCodeCoverage]
public string Status { get; set; }
Property Value
Type Description
string

Target

Target endpoint in host:port format.

Declaration
[ExcludeFromCodeCoverage]
public string Target { get; set; }
Property Value
Type Description
string

Methods

OnCommandsSentChanged(int)

Executes the logic for when CommandsSent just changed.

Declaration
private void OnCommandsSentChanged(int value)
Parameters
Type Name Description
int value

The new property value that was set.

Remarks

This method is invoked right after the value of CommandsSent is changed.

OnCommandsSentChanged(int, int)

Executes the logic for when CommandsSent just changed.

Declaration
private void OnCommandsSentChanged(int oldValue, int newValue)
Parameters
Type Name Description
int oldValue

The previous property value that was replaced.

int newValue

The new property value that was set.

Remarks

This method is invoked right after the value of CommandsSent is changed.

OnCommandsSentChanging(int)

Executes the logic for when CommandsSent is changing.

Declaration
private void OnCommandsSentChanging(int value)
Parameters
Type Name Description
int value

The new property value being set.

Remarks

This method is invoked right before the value of CommandsSent is changed.

OnCommandsSentChanging(int, int)

Executes the logic for when CommandsSent is changing.

Declaration
private void OnCommandsSentChanging(int oldValue, int newValue)
Parameters
Type Name Description
int oldValue

The previous property value that is being replaced.

int newValue

The new property value being set.

Remarks

This method is invoked right before the value of CommandsSent is changed.

OnLastCommandChanged(string)

Executes the logic for when LastCommand just changed.

Declaration
private void OnLastCommandChanged(string value)
Parameters
Type Name Description
string value

The new property value that was set.

Remarks

This method is invoked right after the value of LastCommand is changed.

OnLastCommandChanged(string?, string)

Executes the logic for when LastCommand just changed.

Declaration
private void OnLastCommandChanged(string? oldValue, string newValue)
Parameters
Type Name Description
string oldValue

The previous property value that was replaced.

string newValue

The new property value that was set.

Remarks

This method is invoked right after the value of LastCommand is changed.

OnLastCommandChanging(string)

Executes the logic for when LastCommand is changing.

Declaration
private void OnLastCommandChanging(string value)
Parameters
Type Name Description
string value

The new property value being set.

Remarks

This method is invoked right before the value of LastCommand is changed.

OnLastCommandChanging(string?, string)

Executes the logic for when LastCommand is changing.

Declaration
private void OnLastCommandChanging(string? oldValue, string newValue)
Parameters
Type Name Description
string oldValue

The previous property value that is being replaced.

string newValue

The new property value being set.

Remarks

This method is invoked right before the value of LastCommand is changed.

OnStatusChanged(string)

Executes the logic for when Status just changed.

Declaration
private void OnStatusChanged(string value)
Parameters
Type Name Description
string value

The new property value that was set.

Remarks

This method is invoked right after the value of Status is changed.

OnStatusChanged(string?, string)

Executes the logic for when Status just changed.

Declaration
private void OnStatusChanged(string? oldValue, string newValue)
Parameters
Type Name Description
string oldValue

The previous property value that was replaced.

string newValue

The new property value that was set.

Remarks

This method is invoked right after the value of Status is changed.

OnStatusChanging(string)

Executes the logic for when Status is changing.

Declaration
private void OnStatusChanging(string value)
Parameters
Type Name Description
string value

The new property value being set.

Remarks

This method is invoked right before the value of Status is changed.

OnStatusChanging(string?, string)

Executes the logic for when Status is changing.

Declaration
private void OnStatusChanging(string? oldValue, string newValue)
Parameters
Type Name Description
string oldValue

The previous property value that is being replaced.

string newValue

The new property value being set.

Remarks

This method is invoked right before the value of Status is changed.

OnTargetChanged(string)

Executes the logic for when Target just changed.

Declaration
private void OnTargetChanged(string value)
Parameters
Type Name Description
string value

The new property value that was set.

Remarks

This method is invoked right after the value of Target is changed.

OnTargetChanged(string?, string)

Executes the logic for when Target just changed.

Declaration
private void OnTargetChanged(string? oldValue, string newValue)
Parameters
Type Name Description
string oldValue

The previous property value that was replaced.

string newValue

The new property value that was set.

Remarks

This method is invoked right after the value of Target is changed.

OnTargetChanging(string)

Executes the logic for when Target is changing.

Declaration
private void OnTargetChanging(string value)
Parameters
Type Name Description
string value

The new property value being set.

Remarks

This method is invoked right before the value of Target is changed.

OnTargetChanging(string?, string)

Executes the logic for when Target is changing.

Declaration
private void OnTargetChanging(string? oldValue, string newValue)
Parameters
Type Name Description
string oldValue

The previous property value that is being replaced.

string newValue

The new property value being set.

Remarks

This method is invoked right before the value of Target is changed.

Implements

INotifyPropertyChanged
INotifyPropertyChanging

Search documentation

Start typing to search the documentation.