WIP
DirectOutput framework for virtual pinball cabinets WIP
Go to:
Overview 
DirectOutput.Cab.Toys.Hardware.Shaker Class Reference

Shaker toy with settings for minimum and maximum power, fading curves, max runtime and kickstart. More...

Inheritance diagram for DirectOutput.Cab.Toys.Hardware.Shaker:
DirectOutput.Cab.Toys.Hardware.Motor DirectOutput.Cab.Toys.Layer.AnalogAlphaToy DirectOutput.Cab.Toys.ToyBaseUpdatable DirectOutput.Cab.Toys.IAnalogAlphaToy DirectOutput.Cab.Toys.ISingleOutputToy DirectOutput.Cab.Toys.ToyBase DirectOutput.Cab.Toys.IToyUpdatable DirectOutput.Cab.Toys.Layer.ILayerToy< AnalogAlpha > DirectOutput.Cab.Toys.IToy DirectOutput.General.Generic.NamedItemBase DirectOutput.Cab.Toys.IToy DirectOutput.Cab.Toys.IToy DirectOutput.General.Generic.INamedItem DirectOutput.General.Generic.INamedItem DirectOutput.General.Generic.INamedItem DirectOutput.General.Generic.INamedItem

Additional Inherited Members

- Public Member Functions inherited from DirectOutput.Cab.Toys.Hardware.Motor
override void UpdateOutputs ()
 Updates the output of the toy. More...
 
override void Init (Cabinet Cabinet)
 Initalizes the Motor toy. More...
 
override void Finish ()
 Finishes the Motor toy and releases used references. More...
 
- Public Member Functions inherited from DirectOutput.Cab.Toys.Layer.AnalogAlphaToy
override void Init (Cabinet Cabinet)
 Initializes the toy. More...
 
override void UpdateOutputs ()
 Updates the output of the toy. More...
 
override void Finish ()
 Resets the toy and releases all references More...
 
override void Reset ()
 Resets the toy.
Clears the Layers object and turn off the output (if available). Method must be overwritten. More...
 
 AnalogAlphaToy ()
 Initializes a new instance of the AnalogAlphaToy class. More...
 
- Protected Member Functions inherited from DirectOutput.Cab.Toys.Layer.AnalogAlphaToy
int GetResultingValue ()
 Gets the analog value which results from the analog values and alpha values in the dirctionary. More...
 
- Protected Member Functions inherited from DirectOutput.General.Generic.NamedItemBase
virtual void AfterNameChange (string OldName, string NewName)
 
virtual void BeforeNameChange (string OldName, string NewName)
 
virtual void OnPropertyChanged (string propertyName)
 
virtual void OnPropertyChanging (string propertyName)
 
- Protected Attributes inherited from DirectOutput.Cab.Toys.Layer.AnalogAlphaToy
IOutput Output
 
Curve FadingCurve = null
 
Cabinet Cabinet
 
- Properties inherited from DirectOutput.Cab.Toys.Hardware.Motor
int MaxRunTimeMs [get, set]
 Gets or sets the max run time for the toy in milliseconds.
Default value of this property is 30000 (5 minutes).
Set value to 0 for infinite runtime. More...
 
int KickstartPower [get, set]
 Gets or sets the kickstart power for the motor.
If motor are run with low power they might not start to rotate without some initial kickstart. KickstartPower will only be applied if the motor is started with a power setting below the defined KickstartPower.
Default value of this setting is 255.
Set value to 0 to skip kickstart. More...
 
int KickstartDurationMs [get, set]
 Gets or sets the kickstart duration (time during which the KickstartPower is applied) in milliseconds.
Property defaults to 100 milliseconds.
Set value to 0 to skip kickstart. More...
 
int MinPower [get, set]
 Gets or sets the minimal power for the toy when it is active. More...
 
int MaxPower [get, set]
 Gets or sets the max power for the toy. More...
 
- Properties inherited from DirectOutput.Cab.Toys.Layer.AnalogAlphaToy
LayerDictionary< AnalogAlphaLayers [get]
 Gets the layers dictionary. More...
 
string OutputName [get, set]
 Gets or sets the name of the IOutput object of the toy. More...
 
string FadingCurveName [get, set]
 Gets or sets the name of the fading curve as defined in the Curves list of the cabinet object. This curve can be used to adjust the output values of the toy to fit the behaviour of the toys hardware and/or human perception. More...
 
- Properties inherited from DirectOutput.General.Generic.NamedItemBase
string Name [get, set]
 Name of the named item.
Triggers BeforeNameChange before a new Name is set.
Triggers AfterNameChanged after a new name has been set. More...
 
- Properties inherited from DirectOutput.General.Generic.INamedItem
string Name [get, set]
 Gets or sets the name of the item.
Must fire the BeforeNameChange and AfterNameChange events when the value of the property is changed. More...
 
- Properties inherited from DirectOutput.Cab.Toys.IToy
new string Name [get, set]
 Gets or sets the Name of the IToy. More...
 
- Properties inherited from DirectOutput.Cab.Toys.Layer.ILayerToy< AnalogAlpha >
LayerDictionary< LayerElementType > Layers [get]
 
- Properties inherited from DirectOutput.Cab.Toys.ISingleOutputToy
string OutputName [get, set]
 Gets or sets the name of the output of the toy. More...
 
- Events inherited from DirectOutput.General.Generic.NamedItemBase
EventHandler< NameChangeEventArgsAfterNameChanged
 Event is fired after the value of the property Name has changed. More...
 
EventHandler< NameChangeEventArgsBeforeNameChanged
 Event is fired before the value of the property Name is changed. More...
 
PropertyChangedEventHandler PropertyChanged
 
PropertyChangingEventHandler PropertyChanging
 
- Events inherited from DirectOutput.General.Generic.INamedItem
EventHandler< NameChangeEventArgsBeforeNameChanged
 Occurs before the name of the item changes. More...
 
EventHandler< NameChangeEventArgsAfterNameChanged
 Occurs when after the name of the item has changed. More...
 

Detailed Description

Shaker toy with settings for minimum and maximum power, fading curves, max runtime and kickstart.

Shaker.jpg

The shaker toy is a simple wrapper around the Motor toy, so you can define your toy with the precise type.

The settings of this toy allow for a detailed definition of the behaviour of the connected motor.

  • The KickstartPower and the KickstartDurationMs property allow you to define a initial stronger impulse for the start of the motor. Some hardware, e.g. like the Wolfsoft shaker in my cab, do not start to rotate when they are started with low power, giving them a initial pulse and the reducing to the lower power on the other hand is no problem. These properties allow you to define this behaviour.
  • The MinPower and MaxPower properties allow you to define the range of values which are allowed for the motor power. As a example, the shaker in my cab doesn't rotate with powers lower than 50 and starts to rattle and shake my cab appart with powers above 100. The normal value range for motor powers (0-255) is scaled to the range defined by the MinPower and MaxPower properties, so a value of 1 will result the shaker to operate on MinPower and 255 will result in MaxPower.
  • The FadingCurveName property can be used to specify the name of a predefined or user defined fading curve. This allows for even better fine tuning of the shaker power for different input values. It is recommended to use either the fading curve Linear (default) and the MinPower/MaxPower settings or to use a fading curve and keep the MinPower/MaxPower settings on their defaults. If MinPower/MaxPower and a Fading Curve are combined, the power value for the motor will first be adjusted by the fading curve and the be scaled into the range of the MinPower/MaxPower settings.
  • MaxRunTimeMs allows you to define a maximum runtime for the motor before it is automatically turned off. To get reactivated after a runtime timeout the motor toy must first receive a power off (value=0), before it is reactivated.

Definition at line 18 of file Shaker.cs.


The documentation for this class was generated from the following file: