Show / Hide Table of Contents

Class DeviceUpdateTrigger

Represents an update-trigger used to update devices with a maximum update-rate.

Inheritance
object
AbstractBindable
AbstractUpdateTrigger
DeviceUpdateTrigger
Implements
IBindable
INotifyPropertyChanged
IDeviceUpdateTrigger
IUpdateTrigger
IDisposable
Inherited Members
AbstractUpdateTrigger.Starting
AbstractUpdateTrigger.Update
AbstractUpdateTrigger.OnStartup(CustomUpdateData)
AbstractBindable.PropertyChanged
AbstractBindable.RequiresUpdate<T>(ref T, T)
AbstractBindable.SetProperty<T>(ref T, T, string)
AbstractBindable.OnPropertyChanged(string)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: RGB.NET.Core
Assembly: RGB.NET.Core.dll
Syntax
public class DeviceUpdateTrigger : AbstractUpdateTrigger, IBindable, INotifyPropertyChanged, IDeviceUpdateTrigger, IUpdateTrigger, IDisposable

Constructors

| Edit this page View Source

DeviceUpdateTrigger()

Initializes a new instance of the DeviceUpdateTrigger class.

Declaration
public DeviceUpdateTrigger()
| Edit this page View Source

DeviceUpdateTrigger(double)

Initializes a new instance of the DeviceUpdateTrigger class.

Declaration
public DeviceUpdateTrigger(double updateRateHardLimit)
Parameters
Type Name Description
double updateRateHardLimit

The hard limit of the update rate of this trigger.

Properties

| Edit this page View Source

HasDataEvent

Gets or sets the event to trigger when new data is available (TriggerHasData()).

Declaration
protected AutoResetEvent HasDataEvent { get; set; }
Property Value
Type Description
AutoResetEvent
| Edit this page View Source

HeartbeatTimer

Gets or sets the time in ms after which a refresh-request is sent even if no changes are made in the meantime to prevent the target from timing out or similar problems. To disable heartbeats leave it at 0.

Declaration
public int HeartbeatTimer { get; set; }
Property Value
Type Description
int
| Edit this page View Source

IsRunning

Gets or sets a bool indicating if the trigger is currently updating.

Declaration
protected bool IsRunning { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

LastUpdateTime

Gets the time spent for the last update.

Declaration
public override double LastUpdateTime { get; protected set; }
Property Value
Type Description
double
Overrides
AbstractUpdateTrigger.LastUpdateTime
| Edit this page View Source

LastUpdateTimestamp

Gets or sets the timestamp of the last update.

Declaration
protected long LastUpdateTimestamp { get; set; }
Property Value
Type Description
long
| Edit this page View Source

MaxUpdateRate

Gets or sets the maximum update rate of this trigger (is overwriten if the UpdateRateHardLimit is smaller). <= 0 removes the limit.

Declaration
public double MaxUpdateRate { get; set; }
Property Value
Type Description
double
| Edit this page View Source

Timeout

Gets or sets the timeout used by the blocking wait for data availability.

Declaration
public int Timeout { get; set; }
Property Value
Type Description
int
| Edit this page View Source

UpdateFrequency

Gets the update frequency used by the trigger if not limited by data shortage.

Declaration
public double UpdateFrequency { get; }
Property Value
Type Description
double
| Edit this page View Source

UpdateRateHardLimit

Gets the hard limit of the update rate of this trigger. Updates will never perform faster then then this value if it's set. <= 0 removes the limit.

Declaration
public double UpdateRateHardLimit { get; protected set; }
Property Value
Type Description
double
| Edit this page View Source

UpdateTask

Gets or sets the update loop of this trigger.

Declaration
protected Task? UpdateTask { get; set; }
Property Value
Type Description
Task
| Edit this page View Source

UpdateToken

Gets or sets the cancellation token checked by the UpdateTask.

Declaration
protected CancellationToken UpdateToken { get; set; }
Property Value
Type Description
CancellationToken
| Edit this page View Source

UpdateTokenSource

Gets or sets the cancellation token source used to create the cancellation token checked by the UpdateTask.

Declaration
protected CancellationTokenSource? UpdateTokenSource { get; set; }
Property Value
Type Description
CancellationTokenSource

Methods

| Edit this page View Source

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public override void Dispose()
Overrides
AbstractUpdateTrigger.Dispose()
| Edit this page View Source

OnUpdate(CustomUpdateData?)

Invokes the Update-event.

Declaration
protected override void OnUpdate(CustomUpdateData? updateData = null)
Parameters
Type Name Description
CustomUpdateData updateData

Optional custom-data passed to the subscribers of the Update.event.

Overrides
AbstractUpdateTrigger.OnUpdate(CustomUpdateData?)
| Edit this page View Source

Start()

Starts the trigger.

Declaration
public override void Start()
Overrides
AbstractUpdateTrigger.Start()
| Edit this page View Source

Stop()

Stops the trigger.

Declaration
public virtual void Stop()
| Edit this page View Source

TriggerHasData()

Indicates that there's data available to process.

Declaration
public void TriggerHasData()
| Edit this page View Source

UpdateLoop()

The update loop called by the UpdateTask.

Declaration
protected virtual void UpdateLoop()

Implements

IBindable
INotifyPropertyChanged
IDeviceUpdateTrigger
IUpdateTrigger
IDisposable
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX