Class QuattrocentoViewModel

ViewModel for the Quattrocento device card. Sampling frequency + decimator selection; per-input toggles bind directly to Block.InsCollection / Block.MultsCollection.

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

Constructors

QuattrocentoViewModel(Quattrocento)

Declaration
public QuattrocentoViewModel(Quattrocento block)
Parameters
Type Name Description
Quattrocento block

Fields

_block

Declaration
private readonly Quattrocento _block
Field Value
Type Description
Quattrocento

_canConfigure

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

_decimatorEnabled

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

_selectedFrequency

Declaration
[ObservableProperty]
private SamplingFrequencyOption _selectedFrequency
Field Value
Type Description
SamplingFrequencyOption

toggleStreamingCommand

The backing field for ToggleStreamingCommand.

Declaration
private AsyncRelayCommand? toggleStreamingCommand
Field Value
Type Description
AsyncRelayCommand

Properties

Block

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

CanConfigure

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

DecimatorEnabled

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

IsConnected

Declaration
public bool IsConnected { get; }
Property Value
Type Description
bool

Name

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

SamplingFrequencies

Declaration
public ObservableCollection<SamplingFrequencyOption> SamplingFrequencies { get; }
Property Value
Type Description
ObservableCollection<SamplingFrequencyOption>

SelectedFrequency

Declaration
[ExcludeFromCodeCoverage]
public SamplingFrequencyOption SelectedFrequency { get; set; }
Property Value
Type Description
SamplingFrequencyOption

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.

OnDecimatorEnabledChanged(bool)

Executes the logic for when DecimatorEnabled just changed.

Declaration
private void OnDecimatorEnabledChanged(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 DecimatorEnabled is changed.

OnDecimatorEnabledChanged(bool, bool)

Executes the logic for when DecimatorEnabled just changed.

Declaration
private void OnDecimatorEnabledChanged(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 DecimatorEnabled is changed.

OnDecimatorEnabledChanging(bool)

Executes the logic for when DecimatorEnabled is changing.

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

The new property value being set.

Remarks

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

OnDecimatorEnabledChanging(bool, bool)

Executes the logic for when DecimatorEnabled is changing.

Declaration
private void OnDecimatorEnabledChanging(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 DecimatorEnabled is changed.

OnSelectedFrequencyChanged(SamplingFrequencyOption)

Executes the logic for when SelectedFrequency just changed.

Declaration
private void OnSelectedFrequencyChanged(SamplingFrequencyOption value)
Parameters
Type Name Description
SamplingFrequencyOption value

The new property value that was set.

Remarks

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

OnSelectedFrequencyChanged(SamplingFrequencyOption?, SamplingFrequencyOption)

Executes the logic for when SelectedFrequency just changed.

Declaration
private void OnSelectedFrequencyChanged(SamplingFrequencyOption? oldValue, SamplingFrequencyOption newValue)
Parameters
Type Name Description
SamplingFrequencyOption oldValue

The previous property value that was replaced.

SamplingFrequencyOption newValue

The new property value that was set.

Remarks

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

OnSelectedFrequencyChanging(SamplingFrequencyOption)

Executes the logic for when SelectedFrequency is changing.

Declaration
private void OnSelectedFrequencyChanging(SamplingFrequencyOption value)
Parameters
Type Name Description
SamplingFrequencyOption value

The new property value being set.

Remarks

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

OnSelectedFrequencyChanging(SamplingFrequencyOption?, SamplingFrequencyOption)

Executes the logic for when SelectedFrequency is changing.

Declaration
private void OnSelectedFrequencyChanging(SamplingFrequencyOption? oldValue, SamplingFrequencyOption newValue)
Parameters
Type Name Description
SamplingFrequencyOption oldValue

The previous property value that is being replaced.

SamplingFrequencyOption newValue

The new property value being set.

Remarks

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

ToggleStreamingAsync()

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

Implements

INotifyPropertyChanged
INotifyPropertyChanging

Search documentation

Start typing to search the documentation.