コード例 #1
0
        public IndicatorPushButton(BaseUDPInterface sourceInterface, string deviceId, string buttonId, string argId, string device, string name, string pushValue, string releaseValue)
            : base(sourceInterface)
        {
            _id     = argId;
            _format = "%0.1f";

            _pushValue    = pushValue;
            _releaseValue = releaseValue;

            _pushActionData    = "C" + deviceId + "," + buttonId + "," + pushValue;
            _releaseActionData = "C" + deviceId + "," + buttonId + "," + releaseValue;

            _value = new HeliosValue(sourceInterface, BindingValue.Empty, device, name, "Current state of this button.", "True if the button is currently pushed(either via pressure or toggle), otherwise false.", BindingValueUnits.Boolean);
            Values.Add(_value);
            Triggers.Add(_value);

            _indicatorValue = new HeliosValue(sourceInterface, BindingValue.Empty, device, name + " indicator", "Current state of the indicator lamp on this button.", "True if the indicator is on, otherwise false.", BindingValueUnits.Boolean);
            Values.Add(_indicatorValue);
            Triggers.Add(_indicatorValue);

            _pushedTrigger = new HeliosTrigger(sourceInterface, device, name, "pushed", "Fired when this button is pushed in the simulator.");
            Triggers.Add(_pushedTrigger);
            _releasedTrigger = new HeliosTrigger(sourceInterface, device, name, "released", "Fired when this button is released in the simulator.");
            Triggers.Add(_releasedTrigger);

            _pushAction          = new HeliosAction(sourceInterface, device, name, "push", "Pushes this button in the simulator");
            _pushAction.Execute += new HeliosActionHandler(PushAction_Execute);
            Actions.Add(_pushAction);
            _releaseAction          = new HeliosAction(sourceInterface, device, name, "release", "Releases the button in the simulator.");
            _releaseAction.Execute += new HeliosActionHandler(ReleaseAction_Execute);
            Actions.Add(_releaseAction);
        }
コード例 #2
0
        private void Setup()
        {
            _labelFormat.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(Format_PropertyChanged);

            _labelFormat.FontSize            = 20;
            _labelFormat.HorizontalAlignment = TextHorizontalAlignment.Center;
            _labelFormat.VerticalAlignment   = TextVerticalAlignment.Center;

            _pushedTrigger   = new HeliosTrigger(this, "", "", "pushed", "Fired when this button is pushed.", "Always returns true.", BindingValueUnits.Boolean);
            _releasedTrigger = new HeliosTrigger(this, "", "", "released", "Fired when this button is released.", "Always returns false.", BindingValueUnits.Boolean);
            _closedTrigger   = new HeliosTrigger(this, "", "", "closed", "Fired when this button is in the closed state.", "Always returns true.", BindingValueUnits.Boolean);
            _openTrigger     = new HeliosTrigger(this, "", "", "open", "Fired when this button is in the open state.", "Always returns false.", BindingValueUnits.Boolean);
            Triggers.Add(_pushedTrigger);
            Triggers.Add(_releasedTrigger);
            Triggers.Add(_closedTrigger);
            Triggers.Add(_openTrigger);

            _pushAction             = new HeliosAction(this, "", "", "push", "Simulate physically pushing this button.");
            _pushAction.Execute    += new HeliosActionHandler(Push_ExecuteAction);
            _releaseAction          = new HeliosAction(this, "", "", "release", "Simulate physically removing pressure from this button.");
            _releaseAction.Execute += new HeliosActionHandler(Release_ExecuteAction);
            Actions.Add(_pushAction);
            Actions.Add(_releaseAction);

            _pushedValue          = new HeliosValue(this, new BindingValue(false), "", "physical state", "Current state of this button.", "True if the button is currently pushed(either via pressure or toggle), otherwise false.  Setting this value will not fire pushed/released triggers, but will fire on/off triggers.  Directly setting this state to on for a momentary buttons will not auto release, the state must be manually reset to false.", BindingValueUnits.Boolean);
            _pushedValue.Execute += new HeliosActionHandler(PushedValue_Execute);
            Values.Add(_pushedValue);
            Actions.Add(_pushedValue);

            _value = new HeliosValue(this, new BindingValue(false), "", "circuit state", "Current open/closed state of this buttons circuit.", "True if the button is currently closed (on), otherwise false.", BindingValueUnits.Boolean);
            Values.Add(_value);
        }
コード例 #3
0
ファイル: NetworkTrigger.cs プロジェクト: appsou/Helios
 // without a received value, this presents as an event without value
 public NetworkTrigger(BaseUDPInterface sourceInterface, string id, string name, string description)
     : base(sourceInterface)
 {
     _id = id;
     _receivedTrigger = new HeliosTrigger(sourceInterface, "", name, "", description);
     Triggers.Add(_receivedTrigger);
 }
コード例 #4
0
        public ThreeWayToggleSwitch()
            : base("Three Way Toggle Switch", new System.Windows.Size(50, 100))
        {
            _positionOneImage = "{Helios}/Images/Toggles/toggle-up.png";
            _positionTwoImage = "{Helios}/Images/Toggles/toggle-norm.png";
            _positionThreeImage = "{Helios}/Images/Toggles/toggle-down.png";

            _positionOneEnterAction = new HeliosTrigger(this, "", "position one", "entered", "Triggered when position one is entered or depressed.");
            Triggers.Add(_positionOneEnterAction);
            _positionOneExitAction = new HeliosTrigger(this, "", "position one", "exited", "Triggered when posotion one is exited or released.");
            Triggers.Add(_positionOneExitAction);
            _positionTwoEnterAction = new HeliosTrigger(this, "", "position two", "entered", "Triggered when position two is entered or depressed.");
            Triggers.Add(_positionTwoEnterAction);
            _positionTwoExitAction = new HeliosTrigger(this, "", "position two", "exited", "Triggered when posotion two is exited or released.");
            Triggers.Add(_positionTwoExitAction);
            _positionThreeEnterAction = new HeliosTrigger(this, "", "position three", "entered", "Triggered when position three is entered or depressed.");
            Triggers.Add(_positionThreeEnterAction);
            _positionThreeExitAction = new HeliosTrigger(this, "", "position three", "exited", "Triggered when posotion three is exited or released.");
            Triggers.Add(_positionThreeExitAction);

            _positionValue = new HeliosValue(this, new BindingValue((double)SwitchPosition), "", "position", "Current position of the switch.", "Position number 1,2 or 3.  Positions are numbered from top to bottom.", BindingValueUnits.Numeric);
            _positionValue.Execute += new HeliosActionHandler(SetPositionAction_Execute);
            Values.Add(_positionValue);
            Actions.Add(_positionValue);
            Triggers.Add(_positionValue);
        }
コード例 #5
0
        public RotaryEncoderPushable()
            : base("Pushable Rotary Encoder", new Size(100, 100))
        {
            KnobImage = "{Helios}/Images/Knobs/knob1.png";

            _incrementTrigger = new HeliosTrigger(this, "", "encoder", "incremented", "Triggered when encoder is incremented.", "Current encoder value", BindingValueUnits.Numeric);
            Triggers.Add(_incrementTrigger);
            _decrementTrigger = new HeliosTrigger(this, "", "encoder", "decremented", "Triggered when encoder is decremented.", "Current encoder value", BindingValueUnits.Numeric);
            Triggers.Add(_decrementTrigger);

            _pushedTrigger   = new HeliosTrigger(this, "", "", "pushed", "Fired when this button is pushed.", "Always returns true.", BindingValueUnits.Boolean);
            _releasedTrigger = new HeliosTrigger(this, "", "", "released", "Fired when this button is released.", "Always returns false.", BindingValueUnits.Boolean);
            Triggers.Add(_pushedTrigger);
            Triggers.Add(_releasedTrigger);

            _pushAction             = new HeliosAction(this, "", "", "push", "Simulate physically pushing this button.");
            _pushAction.Execute    += new HeliosActionHandler(Push_ExecuteAction);
            _releaseAction          = new HeliosAction(this, "", "", "release", "Simulate physically removing pressure from this button.");
            _releaseAction.Execute += new HeliosActionHandler(Release_ExecuteAction);
            Actions.Add(_pushAction);
            Actions.Add(_releaseAction);

            _pushedValue          = new HeliosValue(this, new BindingValue(false), "", "physical state", "Current state of this button.", "True if the button is currently pushed(either via pressure or toggle), otherwise false.  Setting this value will not fire pushed/released triggers, but will fire on/off triggers.  Directly setting this state to on for a momentary buttons will not auto release, the state must be manually reset to false.", BindingValueUnits.Boolean);
            _pushedValue.Execute += new HeliosActionHandler(PushedValue_Execute);
            Values.Add(_pushedValue);
            Actions.Add(_pushedValue);
        }
コード例 #6
0
        public GuardedToggleSwitch()
            : base("Guarded Toggle Switch", new System.Windows.Size(65, 249))
        {
            _positionOneGuardUpImage   = "{Helios}/Images/Toggles/guard-up-on.png";
            _positionOneGuardDownImage = "{Helios}/Images/Toggles/guard-down-on.png";
            _positionTwoGuardUpImage   = "{Helios}/Images/Toggles/guard-up-off.png";
            _positionTwoGuardDownImage = "{Helios}/Images/Toggles/guard-down-off.png";

            _positionOneEnterAction = new HeliosTrigger(this, "", "position one", "entered", "Triggered when position one is entered or depressed.");
            Triggers.Add(_positionOneEnterAction);
            _positionOneExitAction = new HeliosTrigger(this, "", "position one", "exited", "Triggered when posotion one is exited or released.");
            Triggers.Add(_positionOneExitAction);
            _positionTwoEnterAction = new HeliosTrigger(this, "", "position two", "entered", "Triggered when position two is entered or depressed.");
            Triggers.Add(_positionTwoEnterAction);
            _positionTwoExitAction = new HeliosTrigger(this, "", "position two", "exited", "Triggered when position two is exited or released.");
            Triggers.Add(_positionTwoExitAction);
            _guardUpAction = new HeliosTrigger(this, "", "guard", "up", "Triggered when guard is moved up.");
            Triggers.Add(_guardUpAction);
            _guardDownAction = new HeliosTrigger(this, "", "guard", "down", "Triggered when guard is moved down.");
            Triggers.Add(_guardDownAction);
            _releaseTrigger = new HeliosTrigger(this, "", "", "released", "This trigger is fired when the user releases pressure on the switch (lifts finger or mouse button.).");
            Triggers.Add(_releaseTrigger);

            _positionValue          = new HeliosValue(this, new BindingValue((double)SwitchPosition), "", "position", "Current position of the switch.", "Position number 1 or 2.  Positions are numbered from top to bottom.", BindingValueUnits.Numeric);
            _positionValue.Execute += new HeliosActionHandler(SetPositionAction_Execute);
            Values.Add(_positionValue);
            Actions.Add(_positionValue);
            Triggers.Add(_positionValue);

            _guardPositionValue          = new HeliosValue(this, new BindingValue((double)GuardPosition), "", "guard position", "Current position of the switch guard.", "1 = Up, 2 = Down.", BindingValueUnits.Numeric);
            _guardPositionValue.Execute += new HeliosActionHandler(SetGuardPositionAction_Execute);
            Values.Add(_guardPositionValue);
            Actions.Add(_guardPositionValue);
            Triggers.Add(_guardPositionValue);
        }
コード例 #7
0
        public ThreeWayToggleSwitch()
            : base("Three Way Toggle Switch", new System.Windows.Size(50, 100))
        {
            _positionOneImage   = "{Helios}/Images/Toggles/toggle-up.png";
            _positionTwoImage   = "{Helios}/Images/Toggles/toggle-norm.png";
            _positionThreeImage = "{Helios}/Images/Toggles/toggle-down.png";

            _positionOneEnterAction = new HeliosTrigger(this, "", "position one", "entered", "Triggered when position one is entered or depressed.");
            Triggers.Add(_positionOneEnterAction);
            _positionOneExitAction = new HeliosTrigger(this, "", "position one", "exited", "Triggered when posotion one is exited or released.");
            Triggers.Add(_positionOneExitAction);
            _positionTwoEnterAction = new HeliosTrigger(this, "", "position two", "entered", "Triggered when position two is entered or depressed.");
            Triggers.Add(_positionTwoEnterAction);
            _positionTwoExitAction = new HeliosTrigger(this, "", "position two", "exited", "Triggered when posotion two is exited or released.");
            Triggers.Add(_positionTwoExitAction);
            _positionThreeEnterAction = new HeliosTrigger(this, "", "position three", "entered", "Triggered when position three is entered or depressed.");
            Triggers.Add(_positionThreeEnterAction);
            _positionThreeExitAction = new HeliosTrigger(this, "", "position three", "exited", "Triggered when posotion three is exited or released.");
            Triggers.Add(_positionThreeExitAction);

            _positionValue          = new HeliosValue(this, new BindingValue((double)SwitchPosition), "", "position", "Current position of the switch.", "Position number 1,2 or 3.  Positions are numbered from top to bottom.", BindingValueUnits.Numeric);
            _positionValue.Execute += new HeliosActionHandler(SetPositionAction_Execute);
            Values.Add(_positionValue);
            Actions.Add(_positionValue);
            Triggers.Add(_positionValue);
        }
コード例 #8
0
        public IndicatorPushButton(BaseUDPInterface sourceInterface, string deviceId, string buttonId, string argId, string device, string name, string pushValue, string releaseValue)
            : base(sourceInterface)
        {
            _id = argId;
            _format = "%0.1f";

            _pushValue = pushValue;
            _releaseValue = releaseValue;

            _pushActionData = "C" + deviceId + "," + buttonId + "," + pushValue;
            _releaseActionData = "C" + deviceId + "," + buttonId + "," + releaseValue;

            _value = new HeliosValue(sourceInterface, BindingValue.Empty, device, name, "Current state of this button.", "True if the button is currently pushed(either via pressure or toggle), otherwise false.", BindingValueUnits.Boolean);
            Values.Add(_value);
            Triggers.Add(_value);

            _indicatorValue = new HeliosValue(sourceInterface, BindingValue.Empty, device, name + " indicator", "Current state of the indicator lamp on this button.", "True if the indicator is on, otherwise false.", BindingValueUnits.Boolean);
            Values.Add(_indicatorValue);
            Triggers.Add(_indicatorValue);

            _pushedTrigger = new HeliosTrigger(sourceInterface, device, name, "pushed", "Fired when this button is pushed in the simulator.");
            Triggers.Add(_pushedTrigger);
            _releasedTrigger = new HeliosTrigger(sourceInterface, device, name, "released", "Fired when this button is released in the simulator.");
            Triggers.Add(_releasedTrigger);

            _pushAction = new HeliosAction(sourceInterface, device, name, "push", "Pushes this button in the simulator");
            _pushAction.Execute += new HeliosActionHandler(PushAction_Execute);
            Actions.Add(_pushAction);
            _releaseAction = new HeliosAction(sourceInterface, device, name, "release", "Releases the button in the simulator.");
            _releaseAction.Execute += new HeliosActionHandler(ReleaseAction_Execute);
            Actions.Add(_releaseAction);
        }
コード例 #9
0
        public GuardedToggleSwitch()
            : base("Guarded Toggle Switch", new System.Windows.Size(65, 249))
        {
            _positionOneGuardUpImage = "{Helios}/Images/Toggles/guard-up-on.png";
            _positionOneGuardDownImage = "{Helios}/Images/Toggles/guard-down-on.png";
            _positionTwoGuardUpImage = "{Helios}/Images/Toggles/guard-up-off.png";
            _positionTwoGuardDownImage = "{Helios}/Images/Toggles/guard-down-off.png";

            _positionOneEnterAction = new HeliosTrigger(this, "", "position one", "entered", "Triggered when position one is entered or depressed.");
            Triggers.Add(_positionOneEnterAction);
            _positionOneExitAction = new HeliosTrigger(this, "", "position one", "exited", "Triggered when posotion one is exited or released.");
            Triggers.Add(_positionOneExitAction);
            _positionTwoEnterAction = new HeliosTrigger(this, "", "position two", "entered", "Triggered when position two is entered or depressed.");
            Triggers.Add(_positionTwoEnterAction);
            _positionTwoExitAction = new HeliosTrigger(this, "", "position two", "exited", "Triggered when position two is exited or released.");
            Triggers.Add(_positionTwoExitAction);
            _guardUpAction = new HeliosTrigger(this, "", "guard", "up", "Triggered when guard is moved up.");
            Triggers.Add(_guardUpAction);
            _guardDownAction = new HeliosTrigger(this, "", "guard", "down", "Triggered when guard is moved down.");
            Triggers.Add(_guardDownAction);
            _releaseTrigger = new HeliosTrigger(this, "", "", "released", "This trigger is fired when the user releases pressure on the switch (lifts finger or mouse button.).");
            Triggers.Add(_releaseTrigger);

            _positionValue = new HeliosValue(this, new BindingValue((double)SwitchPosition), "", "position", "Current position of the switch.", "Position number 1 or 2.  Positions are numbered from top to bottom.", BindingValueUnits.Numeric);
            _positionValue.Execute += new HeliosActionHandler(SetPositionAction_Execute);
            Values.Add(_positionValue);
            Actions.Add(_positionValue);
            Triggers.Add(_positionValue);

            _guardPositionValue = new HeliosValue(this, new BindingValue((double)GuardPosition), "", "guard position", "Current position of the switch guard.", "1 = Up, 2 = Down.", BindingValueUnits.Numeric);
            _guardPositionValue.Execute += new HeliosActionHandler(SetGuardPositionAction_Execute);
            Values.Add(_guardPositionValue);
            Actions.Add(_guardPositionValue);
            Triggers.Add(_guardPositionValue);
        }
コード例 #10
0
ファイル: PushButton.cs プロジェクト: Heliflyer/helios
        private void Setup()
        {
            _labelFormat.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(Format_PropertyChanged);

            _labelFormat.FontSize = 20;
            _labelFormat.HorizontalAlignment = TextHorizontalAlignment.Center;
            _labelFormat.VerticalAlignment = TextVerticalAlignment.Center;

            _pushedTrigger = new HeliosTrigger(this, "", "", "pushed", "Fired when this button is pushed.", "Always returns true.", BindingValueUnits.Boolean);
            _releasedTrigger = new HeliosTrigger(this, "", "", "released", "Fired when this button is released.", "Always returns false.", BindingValueUnits.Boolean);
            _closedTrigger = new HeliosTrigger(this, "", "", "closed", "Fired when this button is in the closed state.", "Always returns true.", BindingValueUnits.Boolean);
            _openTrigger = new HeliosTrigger(this, "", "", "open", "Fired when this button is in the open state.", "Always returns false.", BindingValueUnits.Boolean);
            Triggers.Add(_pushedTrigger);
            Triggers.Add(_releasedTrigger);
            Triggers.Add(_closedTrigger);
            Triggers.Add(_openTrigger);

            _pushAction = new HeliosAction(this, "", "", "push", "Simulate physically pushing this button.");
            _pushAction.Execute += new HeliosActionHandler(Push_ExecuteAction);
            _releaseAction = new HeliosAction(this, "", "", "release", "Simulate physically removing pressure from this button.");
            _releaseAction.Execute += new HeliosActionHandler(Release_ExecuteAction);
            Actions.Add(_pushAction);
            Actions.Add(_releaseAction);

            _pushedValue = new HeliosValue(this, new BindingValue(false), "", "physical state", "Current state of this button.", "True if the button is currently pushed(either via pressure or toggle), otherwise false.  Setting this value will not fire pushed/released triggers, but will fire on/off triggers.  Directly setting this state to on for a momentary buttons will not auto release, the state must be manually reset to false.", BindingValueUnits.Boolean);
            _pushedValue.Execute += new HeliosActionHandler(PushedValue_Execute);
            Values.Add(_pushedValue);
            Actions.Add(_pushedValue);

            _value = new HeliosValue(this, new BindingValue(false), "", "circuit state", "Current open/closed state of this buttons circuit.", "True if the button is currently closed (on), otherwise false.", BindingValueUnits.Boolean);
            Values.Add(_value);
        }
コード例 #11
0
        public DualRocker(BaseUDPInterface sourceInterface, string deviceId, string button1Id, string button2Id, string releaseButtonId, string releaseButton2Id, string argId, string device, string name, bool vertical, string push1Value, string push2Value, string releaseValue, string exportFormat)
            : base(sourceInterface)
        {
            _id = argId;

            _arg_name = "Argument Value of " + name;
            _format   = exportFormat;

            _position1Value = push1Value;
            _position2Value = push2Value;
            _releaseValue   = releaseValue;

            _pushed1ActionData  = "C" + deviceId + "," + button1Id + "," + push1Value;
            _pushed2ActionData  = "C" + deviceId + "," + button2Id + "," + push2Value;
            _release1ActionData = "C" + deviceId + "," + releaseButtonId + "," + releaseValue;
            _release2ActionData = "C" + deviceId + "," + releaseButton2Id + "," + releaseValue;

            if (vertical)
            {
                _position1Name = "up";
                _position2Name = "down";
            }
            else
            {
                _position1Name = "left";
                _position2Name = "right";
            }


            _value = new HeliosValue(sourceInterface, new BindingValue(false), device, name, "Current position of this rocker.", "1=" + _position1Name + ", 2=released" + ", 3=" + _position2Name, BindingValueUnits.Numeric);
            Values.Add(_value);
            Triggers.Add(_value);

            _pushed1Trigger = new HeliosTrigger(sourceInterface, device, name, "pushed " + _position1Name, "Fired when this rocker is pushed " + _position1Name + " in the simulator.");
            Triggers.Add(_pushed1Trigger);
            _pushed2Trigger = new HeliosTrigger(sourceInterface, device, name, "pushed " + _position2Name, "Fired when this rocker is pushed " + _position2Name + " in the simulator.");
            Triggers.Add(_pushed2Trigger);

            _releasedTrigger = new HeliosTrigger(sourceInterface, device, name, "released", "Fired when this rocker is released in the simulator.");
            Triggers.Add(_releasedTrigger);

            _push1Action          = new HeliosAction(sourceInterface, device, name, "push " + _position1Name, "Pushes this rocker " + _position1Name + " in the simulator");
            _push1Action.Execute += new HeliosActionHandler(Push1Action_Execute);
            Actions.Add(_push1Action);

            _push2Action          = new HeliosAction(sourceInterface, device, name, "push " + _position2Name, "Pushes this rocker " + _position2Name + " in the simulator");
            _push2Action.Execute += new HeliosActionHandler(Push2Action_Execute);
            Actions.Add(_push2Action);

            _releaseAction          = new HeliosAction(sourceInterface, device, name, "release", "Releases the rocker in the simulator.");
            _releaseAction.Execute += new HeliosActionHandler(ReleaseAction_Execute);
            Actions.Add(_releaseAction);

            _arg_value = new HeliosValue(sourceInterface, BindingValue.Empty, device, _arg_name, "Argument value in DCS", "argument value", BindingValueUnits.Numeric);

            Values.Add(_arg_value);
            Triggers.Add(_arg_value);
        }
コード例 #12
0
        public RotarySwitchPosition(HeliosObject rotarySwitch, int index, string name, double rotation)
        {
            _index    = index;
            _name     = name;
            _rotation = rotation;

            EnterTriggger = new HeliosTrigger(rotarySwitch, "", "position " + _index, "entered", "Fires when switch enters the " + _name + " position");
            ExitTrigger   = new HeliosTrigger(rotarySwitch, "", "position " + _index, "exited", "Fires when switch exits the " + _name + " position");
        }
コード例 #13
0
        public RotarySwitchPosition(RotarySwitch rotarySwitch, int index, string name, double rotation)
        {
            _index = index;
            _name = name;
            _rotation = rotation;

            _enterTrigger = new HeliosTrigger(rotarySwitch, "", "position " + _index, "entered", "Fires when switch enters the " + _name + " position");
            _exitTrigger = new HeliosTrigger(rotarySwitch, "", "position " + _index, "exited", "Fires when switch exits the " + _name + " position");
        }
コード例 #14
0
        public RotaryEncoder()
            : base("Rotary Encoder", new Size(100, 100))
        {
            KnobImage = "{Helios}/Images/Knobs/knob1.png";

            _incrementTrigger = new HeliosTrigger(this, "", "encoder", "incremented", "Triggered when encoder is incremented.", "Current encoder value", BindingValueUnits.Numeric);
            Triggers.Add(_incrementTrigger);
            _decrementTrigger = new HeliosTrigger(this, "", "encoder", "decremented", "Triggered when encoder is decremented.", "Current encoder value", BindingValueUnits.Numeric);
            Triggers.Add(_decrementTrigger);
        }
コード例 #15
0
        protected ToggleSwitchBase(string name, Size nativeSize)
            : base(name, nativeSize)
        {
            _indicatorValue          = new HeliosValue(this, new BindingValue(false), "", "indicator", "Current On/Off State for this buttons indicator.", "True if the indicator is on, otherwise false.", BindingValueUnits.Boolean);
            _indicatorValue.Execute += new HeliosActionHandler(Indicator_Execute);
            Actions.Add(_indicatorValue);

            _releaseTrigger = new HeliosTrigger(this, "", "", "released", "This trigger is fired when the user releases pressure on the switch (lifts finger or mouse button.).");
            Triggers.Add(_releaseTrigger);
        }
コード例 #16
0
ファイル: RotaryEncoder.cs プロジェクト: Heliflyer/helios
        public RotaryEncoder()
            : base("Rotary Encoder", new Size(100, 100))
        {
            KnobImage = "{Helios}/Images/Knobs/knob1.png";

            _incrementTrigger = new HeliosTrigger(this, "", "encoder", "incremented", "Triggered when encoder is incremented.", "Current encoder value", BindingValueUnits.Numeric);
            Triggers.Add(_incrementTrigger);
            _decrementTrigger = new HeliosTrigger(this, "", "encoder", "decremented", "Triggered when encoder is decremented.", "Current encoder value", BindingValueUnits.Numeric);
            Triggers.Add(_decrementTrigger);
        }
コード例 #17
0
ファイル: ToggleSwitchBase.cs プロジェクト: Heliflyer/helios
        protected ToggleSwitchBase(string name, Size nativeSize)
            : base(name, nativeSize)
        {
            _indicatorValue = new HeliosValue(this, new BindingValue(false), "", "indicator", "Current On/Off State for this buttons indicator.", "True if the indicator is on, otherwise false.", BindingValueUnits.Boolean);
            _indicatorValue.Execute += new HeliosActionHandler(Indicator_Execute);
            Actions.Add(_indicatorValue);

            _releaseTrigger = new HeliosTrigger(this, "", "", "released", "This trigger is fired when the user releases pressure on the switch (lifts finger or mouse button.).");
            Triggers.Add(_releaseTrigger);
        }
コード例 #18
0
        public BaseUDPInterface(string name)
            : base(name)
        {
            _socketDataCallback = new AsyncCallback(OnDataReceived);

            _connectedTrigger = new HeliosTrigger(this, "", "", "Connected", "Fired when a new client is connected.");
            Triggers.Add(_connectedTrigger);

            _functions.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Functions_CollectionChanged);
        }
コード例 #19
0
ファイル: BaseUDPInterface.cs プロジェクト: Heliflyer/helios
        public BaseUDPInterface(string name)
            : base(name)
        {
            _socketDataCallback = new AsyncCallback(OnDataReceived);

            _connectedTrigger = new HeliosTrigger(this, "", "", "Connected", "Fired when a new client is connected.");
            Triggers.Add(_connectedTrigger);

            _functions.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Functions_CollectionChanged);
        }
コード例 #20
0
ファイル: NetworkTriggerValue.cs プロジェクト: appsou/Helios
 public NetworkTriggerValue(BaseUDPInterface sourceInterface, string id, string name, string description,
                            string valueDescription)
     : base(sourceInterface)
 {
     _id    = id;
     _value = new HeliosValue(sourceInterface, BindingValue.Empty, "", name, description, valueDescription,
                              BindingValueUnits.Text);
     Values.Add(_value);
     Triggers.Add(_value);
     _receivedTrigger = new HeliosTrigger(sourceInterface, "", name, "received", description);
 }
コード例 #21
0
ファイル: EosDigitalInput.cs プロジェクト: Heliflyer/helios
        public EosDigitalInput(EosBoard board, byte number)
        {
            _board = new WeakReference(board);
            _number = number;
            Name = "Digital Input " + number;

            _onTrigger = new HeliosTrigger(board.EOSInterface, board.Name, Name, "On", "Triggered when this digital input is moved to the on state.");
            Triggers.Add(_onTrigger);

            _offTrigger = new HeliosTrigger(board.EOSInterface, board.Name, Name, "Off", "Triggered when this digitla input is moved to the off state.");
            Triggers.Add(_offTrigger);
        }
コード例 #22
0
        public EosDigitalInput(EosBoard board, byte number)
        {
            _board  = new WeakReference(board);
            _number = number;
            Name    = "Digital Input " + number;

            _onTrigger = new HeliosTrigger(board.EOSInterface, board.Name, Name, "On", "Triggered when this digital input is moved to the on state.");
            Triggers.Add(_onTrigger);

            _offTrigger = new HeliosTrigger(board.EOSInterface, board.Name, Name, "Off", "Triggered when this digitla input is moved to the off state.");
            Triggers.Add(_offTrigger);
        }
コード例 #23
0
ファイル: Rocker.cs プロジェクト: Heliflyer/helios
        public Rocker(BaseUDPInterface sourceInterface, string deviceId, string button1Id, string button2Id, string releaseButtonId, string releaseButton2Id, string argId, string device, string name, bool vertical, string push1Value, string push2Value, string releaseValue, string exportFormat)
            : base(sourceInterface)
        {
            _id = argId;
            _format = exportFormat;

            _position1Value = push1Value;
            _position2Value = push2Value;
            _releaseValue = releaseValue;

            _pushed1ActionData = "C" + deviceId + "," + button1Id + "," + push1Value;
            _pushed2ActionData = "C" + deviceId + "," + button2Id + "," + push2Value;
            _release1ActionData = "C" + deviceId + "," + releaseButtonId + "," + releaseValue;
            _release2ActionData = "C" + deviceId + "," + releaseButton2Id + "," + releaseValue;

            if (vertical)
            {
                _position1Name = "up";
                _position2Name = "down";
            }
            else
            {
                _position1Name = "left";
                _position2Name = "right";
            }

            _value = new HeliosValue(sourceInterface, new BindingValue(false), device, name, "Current state of this rocker.", "1=" + _position1Name + ", 2=released" + ", 3=" + _position2Name, BindingValueUnits.Numeric);
            Values.Add(_value);
            Triggers.Add(_value);

            _pushed1Trigger = new HeliosTrigger(sourceInterface, device, name, "pushed " + _position1Name, "Fired when this rocker is pushed " + _position1Name + " in the simulator.");
            Triggers.Add(_pushed1Trigger);
            _pushed2Trigger = new HeliosTrigger(sourceInterface, device, name, "pushed " + _position2Name, "Fired when this rocker is pushed " + _position2Name + " in the simulator.");
            Triggers.Add(_pushed2Trigger);

            _releasedTrigger = new HeliosTrigger(sourceInterface, device, name, "released", "Fired when this rocker is released in the simulator.");
            Triggers.Add(_releasedTrigger);

            _push1Action = new HeliosAction(sourceInterface, device, name, "push " + _position1Name, "Pushes this rocker " + _position1Name + " in the simulator");
            _push1Action.Execute += new HeliosActionHandler(Push1Action_Execute);
            Actions.Add(_push1Action);

            _push2Action = new HeliosAction(sourceInterface, device, name, "push " + _position2Name, "Pushes this rocker " + _position2Name + " in the simulator");
            _push2Action.Execute += new HeliosActionHandler(Push2Action_Execute);
            Actions.Add(_push2Action);

            _releaseAction = new HeliosAction(sourceInterface, device, name, "release", "Releases the rocker in the simulator.");
            _releaseAction.Execute += new HeliosActionHandler(ReleaseAction_Execute);
            Actions.Add(_releaseAction);
        }
コード例 #24
0
        public DirectXControllerPOVHat(DirectXControllerInterface controllerInterface, int povNumber)
        {
            _lastPollValue = POVDirection.Center;
            _povNumber = povNumber;
            _name = "POV " + (_povNumber + 1);

            _value = new HeliosValue(controllerInterface, new BindingValue(-1d), "", _name, "Current state for " + _name + ".", "-1 = Centered, 0 = Up, 45 = Up and Right, 90 = Right, 135 = Down and Right, 180 = Down, 225 = Down and Left, 270 = Left, 315 = Up and Left", BindingValueUnits.Boolean);

            _centerEnter = new HeliosTrigger(controllerInterface, _name, "center", "entered", "Fires when hat enters the center position.");
            _triggers.Add(_centerEnter);
            _centerExit = new HeliosTrigger(controllerInterface, _name, "center", "exited", "Fires when the hat leaves the center position.");
            _triggers.Add(_centerExit);

            _rightEnter = new HeliosTrigger(controllerInterface, _name, "right", "entered", "Fires when hat enters the right position.");
            _triggers.Add(_rightEnter);
            _rightExit = new HeliosTrigger(controllerInterface, _name, "right", "exited", "Fires when the hat leaves the right position.");
            _triggers.Add(_rightExit);

            _leftEnter = new HeliosTrigger(controllerInterface, _name, "left", "entered", "Fires when hat enters the left position.");
            _triggers.Add(_leftEnter);
            _leftExit = new HeliosTrigger(controllerInterface, _name, "left", "exited", "Fires when the hat leaves the left position.");
            _triggers.Add(_leftExit);


            _upEnter = new HeliosTrigger(controllerInterface, _name, "up", "entered", "Fires when hat enters the up position.");
            _triggers.Add(_upEnter);
            _upExit = new HeliosTrigger(controllerInterface, _name, "up", "exited", "Fires when the hat leaves the up position.");
            _triggers.Add(_upExit);
            _upLeftEnter = new HeliosTrigger(controllerInterface, _name, "up and left", "entered", "Fires when hat enters the upper left position.");
            _triggers.Add(_upLeftEnter);
            _upLeftExit = new HeliosTrigger(controllerInterface, _name, "up and left", "exited", "Fires when the hat leaves the upper left position.");
            _triggers.Add(_upLeftExit);
            _upRightEnter = new HeliosTrigger(controllerInterface, _name, "up and right", "entered", "Fires when hat enters the upper right position.");
            _triggers.Add(_upRightEnter);
            _upRightExit = new HeliosTrigger(controllerInterface, _name, "up and right", "exited", "Fires when the hat leaves the upper right position.");
            _triggers.Add(_upRightExit);

            _downEnter = new HeliosTrigger(controllerInterface, _name, "down", "entered", "Fires when hat enters the down position.");
            _triggers.Add(_downEnter);
            _downExit = new HeliosTrigger(controllerInterface, _name, "down", "exited", "Fires when the hat leaves the down position.");
            _triggers.Add(_downExit);
            _downLeftEnter = new HeliosTrigger(controllerInterface, _name, "down and left", "entered", "Fires when hat enters the downper left position.");
            _triggers.Add(_downLeftEnter);
            _downLeftExit = new HeliosTrigger(controllerInterface, _name, "down and left", "exited", "Fires when the hat leaves the downper left position.");
            _triggers.Add(_downLeftExit);
            _downRightEnter = new HeliosTrigger(controllerInterface, _name, "down and right", "entered", "Fires when hat enters the downper right position.");
            _triggers.Add(_downRightEnter);
            _downRightExit = new HeliosTrigger(controllerInterface, _name, "down and right", "exited", "Fires when the hat leaves the downper right position.");
            _triggers.Add(_downRightExit);
        }
コード例 #25
0
        public DirectXControllerButton(DirectXControllerInterface controllerInterface, int buttonNumber, JoystickState initialState)
        {
            _buttonNumber = buttonNumber;
            _name = "Button " + (_buttonNumber + 1);
            _value = new HeliosValue(controllerInterface, new BindingValue(GetValue(initialState)), "", _name, "Current state for " + _name + ".", "True if pressed, false other wise.", BindingValueUnits.Boolean);

            _press = new HeliosTrigger(controllerInterface, "", _name, "pressed", "Fires when " + _name + " is pressed.", "Always returns true.", BindingValueUnits.Boolean);
            _release = new HeliosTrigger(controllerInterface, "", _name, "released", "Fires when " + _name + " is released.", "Always returns false.", BindingValueUnits.Boolean);

            _triggers.Add(_press);
            _triggers.Add(_release);

            _lastPollValue = GetValue(initialState);
        }
コード例 #26
0
        public DirectXControllerPOVHat(DirectXControllerInterface controllerInterface, int povNumber)
        {
            _lastPollValue = POVDirection.Center;
            _povNumber     = povNumber;
            _name          = "POV " + (_povNumber + 1);

            _value = new HeliosValue(controllerInterface, new BindingValue(-1d), "", _name, "Current state for " + _name + ".", "-1 = Centered, 0 = Up, 45 = Up and Right, 90 = Right, 135 = Down and Right, 180 = Down, 225 = Down and Left, 270 = Left, 315 = Up and Left", BindingValueUnits.Boolean);

            _centerEnter = new HeliosTrigger(controllerInterface, _name, "center", "entered", "Fires when hat enters the center position.");
            _triggers.Add(_centerEnter);
            _centerExit = new HeliosTrigger(controllerInterface, _name, "center", "exited", "Fires when the hat leaves the center position.");
            _triggers.Add(_centerExit);

            _rightEnter = new HeliosTrigger(controllerInterface, _name, "right", "entered", "Fires when hat enters the right position.");
            _triggers.Add(_rightEnter);
            _rightExit = new HeliosTrigger(controllerInterface, _name, "right", "exited", "Fires when the hat leaves the right position.");
            _triggers.Add(_rightExit);

            _leftEnter = new HeliosTrigger(controllerInterface, _name, "left", "entered", "Fires when hat enters the left position.");
            _triggers.Add(_leftEnter);
            _leftExit = new HeliosTrigger(controllerInterface, _name, "left", "exited", "Fires when the hat leaves the left position.");
            _triggers.Add(_leftExit);


            _upEnter = new HeliosTrigger(controllerInterface, _name, "up", "entered", "Fires when hat enters the up position.");
            _triggers.Add(_upEnter);
            _upExit = new HeliosTrigger(controllerInterface, _name, "up", "exited", "Fires when the hat leaves the up position.");
            _triggers.Add(_upExit);
            _upLeftEnter = new HeliosTrigger(controllerInterface, _name, "up and left", "entered", "Fires when hat enters the upper left position.");
            _triggers.Add(_upLeftEnter);
            _upLeftExit = new HeliosTrigger(controllerInterface, _name, "up and left", "exited", "Fires when the hat leaves the upper left position.");
            _triggers.Add(_upLeftExit);
            _upRightEnter = new HeliosTrigger(controllerInterface, _name, "up and right", "entered", "Fires when hat enters the upper right position.");
            _triggers.Add(_upRightEnter);
            _upRightExit = new HeliosTrigger(controllerInterface, _name, "up and right", "exited", "Fires when the hat leaves the upper right position.");
            _triggers.Add(_upRightExit);

            _downEnter = new HeliosTrigger(controllerInterface, _name, "down", "entered", "Fires when hat enters the down position.");
            _triggers.Add(_downEnter);
            _downExit = new HeliosTrigger(controllerInterface, _name, "down", "exited", "Fires when the hat leaves the down position.");
            _triggers.Add(_downExit);
            _downLeftEnter = new HeliosTrigger(controllerInterface, _name, "down and left", "entered", "Fires when hat enters the downper left position.");
            _triggers.Add(_downLeftEnter);
            _downLeftExit = new HeliosTrigger(controllerInterface, _name, "down and left", "exited", "Fires when the hat leaves the downper left position.");
            _triggers.Add(_downLeftExit);
            _downRightEnter = new HeliosTrigger(controllerInterface, _name, "down and right", "entered", "Fires when hat enters the downper right position.");
            _triggers.Add(_downRightEnter);
            _downRightExit = new HeliosTrigger(controllerInterface, _name, "down and right", "exited", "Fires when the hat leaves the downper right position.");
            _triggers.Add(_downRightExit);
        }
コード例 #27
0
        public DirectXControllerButton(DirectXControllerInterface controllerInterface, int buttonNumber, JoystickState initialState)
        {
            _buttonNumber = buttonNumber;
            _name         = "Button " + (_buttonNumber + 1);
            _value        = new HeliosValue(controllerInterface, new BindingValue(GetValue(initialState)), "", _name, "Current state for " + _name + ".", "True if pressed, false other wise.", BindingValueUnits.Boolean);

            _press   = new HeliosTrigger(controllerInterface, "", _name, "pressed", "Fires when " + _name + " is pressed.", "Always returns true.", BindingValueUnits.Boolean);
            _release = new HeliosTrigger(controllerInterface, "", _name, "released", "Fires when " + _name + " is released.", "Always returns false.", BindingValueUnits.Boolean);

            _triggers.Add(_press);
            _triggers.Add(_release);

            _lastPollValue = GetValue(initialState);
        }
コード例 #28
0
        public BaseUDPInterface(string name)
            : base(name)
        {
            iso_8859_1          = System.Text.Encoding.GetEncoding("iso-8859-1"); // This is the locale of the lua exports program
            _socketDataCallback = new AsyncCallback(OnDataReceived);

            _connectedTrigger = new HeliosTrigger(this, "", "", "Connected", "Fired on DCS connect.");
            Triggers.Add(_connectedTrigger);

            _disconnectedTrigger = new HeliosTrigger(this, "", "", "Disconnected", "Fired on DCS disconnect.");
            Triggers.Add(_disconnectedTrigger);

            _profileLoadedTrigger = new HeliosTrigger(this, "", "", "Profile Delay Start", "Fired 10 seconds after DCS profile is started.");
            Triggers.Add(_profileLoadedTrigger);

            _functions.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Functions_CollectionChanged);
        }
コード例 #29
0
ファイル: GuardedSwitch.cs プロジェクト: appsou/Helios
        public GuardedSwitch()
            : base("Guard Empty", new System.Windows.Size(65, 249))
        {
            _positionOneGuardUpImage   = "{Helios}/Images/Toggles/guard-up-empty.png";
            _positionTwoGuardDownImage = "{Helios}/Images/Toggles/guard-down-off.png";

            _guardUpAction = new HeliosTrigger(this, "", "guard", "up", "Triggered when guard is moved up.");
            Triggers.Add(_guardUpAction);
            _guardDownAction = new HeliosTrigger(this, "", "guard", "down", "Triggered when guard is moved down.");
            Triggers.Add(_guardDownAction);
            _releaseTrigger = new HeliosTrigger(this, "", "", "released", "This trigger is fired when the user releases pressure on the switch (lifts finger or mouse button.).");
            Triggers.Add(_releaseTrigger);

            _guardPositionValue          = new HeliosValue(this, new BindingValue((double)GuardPosition), "", "guard position", "Current position of the switch guard.", "1 = Up, 2 = Down.", BindingValueUnits.Numeric);
            _guardPositionValue.Execute += new HeliosActionHandler(SetGuardPositionAction_Execute);
            Values.Add(_guardPositionValue);
            Actions.Add(_guardPositionValue);
            Triggers.Add(_guardPositionValue);
        }
コード例 #30
0
        public ProfileInterface()
            : base("Profile")
        {
            HeliosAction resetAction = new HeliosAction(this, "", "", "reset", "Resets the profile to default state.");

            resetAction.Execute += new HeliosActionHandler(ResetAction_Execute);
            Actions.Add(resetAction);

            HeliosAction stopAction = new HeliosAction(this, "", "", "stop", "Stops the profile from running.");

            stopAction.Execute += new HeliosActionHandler(StopAction_Execute);
            Actions.Add(stopAction);

            HeliosAction showControlCenter = new HeliosAction(this, "", "", "show control center", "Shows the control center.");

            showControlCenter.Execute += new HeliosActionHandler(ShowAction_Execute);
            Actions.Add(showControlCenter);

            HeliosAction hideControlCenter = new HeliosAction(this, "", "", "hide control center", "Shows the control center.");

            hideControlCenter.Execute += new HeliosActionHandler(HideAction_Execute);
            Actions.Add(hideControlCenter);

            HeliosAction launchApplication = new HeliosAction(this, "", "", "launch application", "This functionality has moved to Process Control interface", "This action will be ignored.", BindingValueUnits.Text);

            launchApplication.Execute += LaunchApplication_Execute;
            Actions.Add(launchApplication);

            _profileStartedTrigger = new HeliosTrigger(this, "", "", "Started", "Fired when a profile is started.");
            Triggers.Add(_profileStartedTrigger);

            _profileResetTrigger = new HeliosTrigger(this, "", "", "Reset", "Fired when a profile has been reset.");
            Triggers.Add(_profileResetTrigger);

            _profileStoppedTrigger = new HeliosTrigger(this, "", "", "Stopped", "Fired when a profile is stopped.");
            Triggers.Add(_profileStoppedTrigger);

            _statusReportNotify = new StatusReportNotifyAsyncOnce(CreateStatusReport, () => "Profile Interface", () => "Interface to Helios itself.");
        }
コード例 #31
0
ファイル: HatSwitch.cs プロジェクト: Heliflyer/helios
        public HatSwitch() : base("Hat Switch", new Size(100d, 100d))
        {
            _centerImage = "{Helios}/Images/Hats/hat-center.png";
            _upImage = "{Helios}/Images/Hats/hat-up.png";
            _downImage = "{Helios}/Images/Hats/hat-down.png";
            _leftImage = "{Helios}/Images/Hats/hat-left.png";
            _rightImage = "{Helios}/Images/Hats/hat-right.png";

            _upTrigger = new HeliosTrigger(this, "", "up", "entered", "Triggered when the hat is moved into the up position.");
            Triggers.Add(_upTrigger);
            _upExitTrigger = new HeliosTrigger(this, "", "up", "exited", "Triggered when the hat is returning from the up position.");
            Triggers.Add(_upExitTrigger);
            _downTrigger = new HeliosTrigger(this, "", "down", "entered", "Triggered when the hat is moved into the down position.");
            Triggers.Add(_downTrigger);
            _downExitTrigger = new HeliosTrigger(this, "", "down", "exited", "Triggered when the hat is returning from the down position.");
            Triggers.Add(_downExitTrigger);
            _leftTrigger = new HeliosTrigger(this, "", "left", "entered", "Triggered when the hat is moved into the left position.");
            Triggers.Add(_leftTrigger);
            _leftExitTrigger = new HeliosTrigger(this, "", "left", "exited", "Triggered when the hat is returning from the left position.");
            Triggers.Add(_leftExitTrigger);
            _rightTrigger = new HeliosTrigger(this, "", "right", "entered", "Triggered when the hat is moved into the right position.");
            Triggers.Add(_rightTrigger);
            _rightExitTrigger = new HeliosTrigger(this, "", "right", "exited", "Triggered when the hat is returning from the right position.");
            Triggers.Add(_rightExitTrigger);
            _centerTrigger = new HeliosTrigger(this, "", "center", "entered", "Triggered when the hat is moved back to the center position.");
            Triggers.Add(_centerTrigger);
            _centerExitTrigger = new HeliosTrigger(this, "", "center", "exited", "Triggered when the hat is exiting from the center position.");
            Triggers.Add(_centerExitTrigger);

            _positionValue = new HeliosValue(this, new BindingValue((double)SwitchPosition), "", "position", "Current position of the hat switch.", "Position 0 = center, 1 = up, 2 = down, 3 = left,  or 4 = right.", BindingValueUnits.Numeric);
            _positionValue.Execute += new HeliosActionHandler(SetPositionAction_Execute);
            Values.Add(_positionValue);
            Triggers.Add(_positionValue);
            Actions.Add(_positionValue);

            UpdatePoints();
        }
コード例 #32
0
        public HatSwitch() : base("Hat Switch", new Size(100d, 100d))
        {
            _centerImage = "{Helios}/Images/Hats/hat-center.png";
            _upImage     = "{Helios}/Images/Hats/hat-up.png";
            _downImage   = "{Helios}/Images/Hats/hat-down.png";
            _leftImage   = "{Helios}/Images/Hats/hat-left.png";
            _rightImage  = "{Helios}/Images/Hats/hat-right.png";

            _upTrigger = new HeliosTrigger(this, "", "up", "entered", "Triggered when the hat is moved into the up position.");
            Triggers.Add(_upTrigger);
            _upExitTrigger = new HeliosTrigger(this, "", "up", "exited", "Triggered when the hat is returning from the up position.");
            Triggers.Add(_upExitTrigger);
            _downTrigger = new HeliosTrigger(this, "", "down", "entered", "Triggered when the hat is moved into the down position.");
            Triggers.Add(_downTrigger);
            _downExitTrigger = new HeliosTrigger(this, "", "down", "exited", "Triggered when the hat is returning from the down position.");
            Triggers.Add(_downExitTrigger);
            _leftTrigger = new HeliosTrigger(this, "", "left", "entered", "Triggered when the hat is moved into the left position.");
            Triggers.Add(_leftTrigger);
            _leftExitTrigger = new HeliosTrigger(this, "", "left", "exited", "Triggered when the hat is returning from the left position.");
            Triggers.Add(_leftExitTrigger);
            _rightTrigger = new HeliosTrigger(this, "", "right", "entered", "Triggered when the hat is moved into the right position.");
            Triggers.Add(_rightTrigger);
            _rightExitTrigger = new HeliosTrigger(this, "", "right", "exited", "Triggered when the hat is returning from the right position.");
            Triggers.Add(_rightExitTrigger);
            _centerTrigger = new HeliosTrigger(this, "", "center", "entered", "Triggered when the hat is moved back to the center position.");
            Triggers.Add(_centerTrigger);
            _centerExitTrigger = new HeliosTrigger(this, "", "center", "exited", "Triggered when the hat is exiting from the center position.");
            Triggers.Add(_centerExitTrigger);

            _positionValue          = new HeliosValue(this, new BindingValue((double)SwitchPosition), "", "position", "Current position of the hat switch.", "Position 0 = center, 1 = up, 2 = down, 3 = left,  or 4 = right.", BindingValueUnits.Numeric);
            _positionValue.Execute += new HeliosActionHandler(SetPositionAction_Execute);
            Values.Add(_positionValue);
            Triggers.Add(_positionValue);
            Actions.Add(_positionValue);

            UpdatePoints();
        }