Class MuoviSingleProbeViewModel

ViewModel for the MuoviSingleProbe device card. Exposes signal mode and IMU toggle for UI configuration before streaming.

Inheritance
MuoviSingleProbeViewModel
Namespace: MOSAIC.ViewModels.Devices.Muovi
Assembly: MOSAIC.dll
Syntax
public class MuoviSingleProbeViewModel : ObservableObject, INotifyPropertyChanged, INotifyPropertyChanging

Constructors

MuoviSingleProbeViewModel(MuoviSingleProbe)

Declaration
public MuoviSingleProbeViewModel(MuoviSingleProbe block)
Parameters
Type Name Description
MuoviSingleProbe block

Fields

_block

Declaration
private readonly MuoviSingleProbe _block
Field Value
Type Description
MuoviSingleProbe

_canConfigure

Declaration
[ObservableProperty]
private bool _canConfigure
Field Value
Type Description
bool

_modeDisplay

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

_selectedSignalMode

Currently selected signal mode. Writes through to the block.

Declaration
[ObservableProperty]
private SignalModeOption _selectedSignalMode
Field Value
Type Description
SignalModeOption

_streamImu

IMU streaming toggle. Writes through to the block.

Declaration
[ObservableProperty]
private bool _streamImu
Field Value
Type Description
bool

_toggleLabel

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

toggleStreamingCommand

The backing field for ToggleStreamingCommand.

Declaration
private AsyncRelayCommand? toggleStreamingCommand
Field Value
Type Description
AsyncRelayCommand

Properties

Block

Declaration
public MuoviSingleProbe Block { get; }
Property Value
Type Description
MuoviSingleProbe

CanConfigure

Declaration
[ExcludeFromCodeCoverage]
public bool CanConfigure { get; set; }
Property Value
Type Description
bool

EmgChannelLabels

Channel labels for the EMG/EEG scope legend with trace colors.

Declaration
public ObservableCollection<ScopeLegendItem> EmgChannelLabels { get; }
Property Value
Type Description
ObservableCollection<ScopeLegendItem>

ImuChannelLabels

Channel labels for the IMU scope legend with trace colors.

Declaration
public ObservableCollection<ScopeLegendItem> ImuChannelLabels { get; }
Property Value
Type Description
ObservableCollection<ScopeLegendItem>

ModeDisplay

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

Name

Declaration
public string Name { get; }
Property Value
Type Description
string

SelectedSignalMode

Currently selected signal mode. Writes through to the block.

Declaration
[ExcludeFromCodeCoverage]
public SignalModeOption SelectedSignalMode { get; set; }
Property Value
Type Description
SignalModeOption

SignalModes

Available signal modes for the ComboBox.

Declaration
public ObservableCollection<SignalModeOption> SignalModes { get; }
Property Value
Type Description
ObservableCollection<SignalModeOption>

StreamImu

IMU streaming toggle. Writes through to the block.

Declaration
[ExcludeFromCodeCoverage]
public bool StreamImu { get; set; }
Property Value
Type Description
bool

ToggleLabel

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

ToggleStreamingCommand

Gets an IAsyncRelayCommand instance wrapping ToggleStreamingAsync().

Declaration
[ExcludeFromCodeCoverage]
public IAsyncRelayCommand ToggleStreamingCommand { get; }
Property Value
Type Description
IAsyncRelayCommand

Methods

OnCanConfigureChanged(bool)

Executes the logic for when CanConfigure just changed.

Declaration
private void OnCanConfigureChanged(bool value)
Parameters
Type Name Description
bool value

The new property value that was set.

Remarks

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

OnCanConfigureChanged(bool, bool)

Executes the logic for when CanConfigure just changed.

Declaration
private void OnCanConfigureChanged(bool oldValue, bool newValue)
Parameters
Type Name Description
bool oldValue

The previous property value that was replaced.

bool newValue

The new property value that was set.

Remarks

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

OnCanConfigureChanging(bool)

Executes the logic for when CanConfigure is changing.

Declaration
private void OnCanConfigureChanging(bool value)
Parameters
Type Name Description
bool value

The new property value being set.

Remarks

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

OnCanConfigureChanging(bool, bool)

Executes the logic for when CanConfigure is changing.

Declaration
private void OnCanConfigureChanging(bool oldValue, bool newValue)
Parameters
Type Name Description
bool oldValue

The previous property value that is being replaced.

bool newValue

The new property value being set.

Remarks

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

OnModeDisplayChanged(string)

Executes the logic for when ModeDisplay just changed.

Declaration
private void OnModeDisplayChanged(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 ModeDisplay is changed.

OnModeDisplayChanged(string?, string)

Executes the logic for when ModeDisplay just changed.

Declaration
private void OnModeDisplayChanged(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 ModeDisplay is changed.

OnModeDisplayChanging(string)

Executes the logic for when ModeDisplay is changing.

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

The new property value being set.

Remarks

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

OnModeDisplayChanging(string?, string)

Executes the logic for when ModeDisplay is changing.

Declaration
private void OnModeDisplayChanging(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 ModeDisplay is changed.

OnSelectedSignalModeChanged(SignalModeOption)

Executes the logic for when SelectedSignalMode just changed.

Declaration
private void OnSelectedSignalModeChanged(SignalModeOption value)
Parameters
Type Name Description
SignalModeOption value

The new property value that was set.

Remarks

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

OnSelectedSignalModeChanged(SignalModeOption?, SignalModeOption)

Executes the logic for when SelectedSignalMode just changed.

Declaration
private void OnSelectedSignalModeChanged(SignalModeOption? oldValue, SignalModeOption newValue)
Parameters
Type Name Description
SignalModeOption oldValue

The previous property value that was replaced.

SignalModeOption newValue

The new property value that was set.

Remarks

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

OnSelectedSignalModeChanging(SignalModeOption)

Executes the logic for when SelectedSignalMode is changing.

Declaration
private void OnSelectedSignalModeChanging(SignalModeOption value)
Parameters
Type Name Description
SignalModeOption value

The new property value being set.

Remarks

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

OnSelectedSignalModeChanging(SignalModeOption?, SignalModeOption)

Executes the logic for when SelectedSignalMode is changing.

Declaration
private void OnSelectedSignalModeChanging(SignalModeOption? oldValue, SignalModeOption newValue)
Parameters
Type Name Description
SignalModeOption oldValue

The previous property value that is being replaced.

SignalModeOption newValue

The new property value being set.

Remarks

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

OnStreamImuChanged(bool)

Executes the logic for when StreamImu just changed.

Declaration
private void OnStreamImuChanged(bool value)
Parameters
Type Name Description
bool value

The new property value that was set.

Remarks

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

OnStreamImuChanged(bool, bool)

Executes the logic for when StreamImu just changed.

Declaration
private void OnStreamImuChanged(bool oldValue, bool newValue)
Parameters
Type Name Description
bool oldValue

The previous property value that was replaced.

bool newValue

The new property value that was set.

Remarks

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

OnStreamImuChanging(bool)

Executes the logic for when StreamImu is changing.

Declaration
private void OnStreamImuChanging(bool value)
Parameters
Type Name Description
bool value

The new property value being set.

Remarks

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

OnStreamImuChanging(bool, bool)

Executes the logic for when StreamImu is changing.

Declaration
private void OnStreamImuChanging(bool oldValue, bool newValue)
Parameters
Type Name Description
bool oldValue

The previous property value that is being replaced.

bool newValue

The new property value being set.

Remarks

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

OnToggleLabelChanged(string)

Executes the logic for when ToggleLabel just changed.

Declaration
private void OnToggleLabelChanged(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 ToggleLabel is changed.

OnToggleLabelChanged(string?, string)

Executes the logic for when ToggleLabel just changed.

Declaration
private void OnToggleLabelChanged(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 ToggleLabel is changed.

OnToggleLabelChanging(string)

Executes the logic for when ToggleLabel is changing.

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

The new property value being set.

Remarks

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

OnToggleLabelChanging(string?, string)

Executes the logic for when ToggleLabel is changing.

Declaration
private void OnToggleLabelChanging(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 ToggleLabel is changed.

RefreshLabels()

Declaration
private void RefreshLabels()

ToggleStreamingAsync()

Declaration
[RelayCommand]
private Task ToggleStreamingAsync()
Returns
Type Description
Task

UpdateModeDisplay()

Declaration
private void UpdateModeDisplay()

Implements

INotifyPropertyChanged
INotifyPropertyChanging

Search documentation

Start typing to search the documentation.