Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Basic commands

The 5 basic commands follow the same pattern:

  • They cannot be specialized outside of the CK.DeviceModel.

  • Their StoppedBehavior and ImmediateStoppedBehavior properties are both "RunAnyway" (they can run on a stopped device).

  • Their ImmediateSending property is true by default.

  • They all respect the ControllerKey optional guard.

  • They can be sent via SendCommand or are simply useless since the 5 device's methods
    SetControllerKeyAsync, StartAsync, StopAsync, ReconfigureAsync or DestroyAsync (see IDevice) helpers do the job.

Specificities are:

  • Destroy has no result and always succeeds (thanks to the OnError and OnCanceled implementations).
  • Start and Stop are boolean commands. Exceptions or cancellation are transformed into a `false' result.
  • Stop can specify IgnoreAlwaysRunning to stop a device even if its configuration state that it must be AlwaysRunning. The daemon then enters into play.
  • ReconfigureDeviceCommand<TConfiguration> is parametrized on the Device and non-generic on IDevice). Cancellations are transformed into ConfigurationCanceled, exceptions are transformed into InvalidControllerKey or UnexpectedError result (see DeviceApplyConfigurationResult).
  • SetControllerKey exposes the NewControllerKey (in addition to the standard ControllerKey guard).

The 5 basic commands