Esempio n. 1
0
        internal void Initialize(ControlRouter parent)
        {
            _parent = parent;

            // conversion from pulses to values
            HeliosAction changeValueByPulses = new HeliosAction(parent, Name, "Value from Pulses", "change",
                                                                "Increment of decrement the value by a number of pulses", "+/- pulses", BindingValueUnits.Numeric);

            changeValueByPulses.Execute += ChangeValueByPulses_Execute;
            Actions.Add(changeValueByPulses);

            // direct angle mapping
            HeliosAction changeAngle = new HeliosAction(parent, Name, "Relative Angle", "change",
                                                        "Control the angle of bound rotary control relative to where it was when it was bound",
                                                        "Value of Control", BindingValueUnits.Numeric);

            changeAngle.Execute += ChangeAngle_Execute;
            Actions.Add(changeAngle);

            // status display: name of bound control
            _controlName = new HeliosValue(parent, BindingValue.Empty, Name, "Bound Control",
                                           "The name of the control receiving the output from this port", "Control name from Profile",
                                           BindingValueUnits.Text);
            Values.Add(_controlName);
            Triggers.Add(_controlName);
        }
Esempio n. 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);
        }
Esempio n. 3
0
        public EosStepper(EosBoard board, byte number) : base(board)
        {
            _number = number;
            Name    = "Servo " + number;

            _calibration = new CalibrationPointCollectionLong(-6000d, -6000, 6000d, 6000);
            _calibration.CalibrationChanged += new EventHandler(_calibration_CalibrationChanged);

            _zero          = new HeliosAction(board.EOSInterface, "Stepper " + Number.ToString(), "zero", "", "Sets the current position as zero.");
            _zero.Execute += Zero_Execute;
            Actions.Add(_zero);

            _targetPosition          = new HeliosValue(board.EOSInterface, new BindingValue(0d), "Stepper " + Number.ToString(), "target position", "Sets the raw target position of this stepper.", "", BindingValueUnits.Numeric);
            _targetPosition.Execute += TargetPosition_Execute;
            Actions.Add(_targetPosition);

            _value          = new HeliosValue(board.EOSInterface, new BindingValue(0d), "Stepper " + Number.ToString(), "input value", "Sets the input value to be displayed on this stepper.", "Input value will be interpolated with the calibration data and set the target position for the stepper as appropriate.", BindingValueUnits.Numeric);
            _value.Execute += Value_Execute;
            Actions.Add(_value);

            _increment          = new HeliosAction(board.EOSInterface, "Stepper " + Number.ToString(), "increment", "", "Increments the stepper position.", "Number of steps to increment steppers position. If empty or not a number 1 will be used.", BindingValueUnits.Numeric);
            _increment.Execute += IncrementPosition_Execute;
            Actions.Add(_increment);

            _decrement          = new HeliosAction(board.EOSInterface, "Stepper " + Number.ToString(), "decrement", "", "Decrements the stepper position.", "Number of steps to decrement steppers position. If empty or not a number 1 will be used.", BindingValueUnits.Numeric);
            _decrement.Execute += DecrementPosition_Execute;
            Actions.Add(_decrement);
        }
        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);
        }
Esempio n. 5
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);
        }
Esempio n. 6
0
        public Axis(BaseUDPInterface sourceInterface, string deviceId, string buttonId, string argId, double argValue, double argMin, double argMax, string device, string name, bool loop, string exportFormat)
            : base(sourceInterface)
        {
            _id     = argId;
            _format = exportFormat;
            _loop   = loop;

            _argValue = argValue;
            _argMin   = argMin;
            _argMax   = argMax;

            _actionData = "C" + deviceId + "," + buttonId + ",";

            _value          = new HeliosValue(sourceInterface, new BindingValue(0.0d), device, name, "Current value of this axis.", argMin.ToString() + "-" + argMax.ToString(), BindingValueUnits.Numeric);
            _value.Execute += new HeliosActionHandler(Value_Execute);
            Values.Add(_value);
            Actions.Add(_value);
            Triggers.Add(_value);

            _incrementAction          = new HeliosAction(sourceInterface, device, name, "increment", "Increments this axis value.", "Amount to increment by (Default:" + argValue + ")", BindingValueUnits.Numeric);
            _incrementAction.Execute += new HeliosActionHandler(IncrementAction_Execute);
            Actions.Add(_incrementAction);

            _decrementAction          = new HeliosAction(sourceInterface, device, name, "decrement", "Decrement this axis value.", "Amount to decrement by (Default:" + -argValue + ")", BindingValueUnits.Numeric);
            _decrementAction.Execute += new HeliosActionHandler(DecrementAction_Execute);
            Actions.Add(_decrementAction);
        }
Esempio n. 7
0
        public EosStepper(EosBoard board, byte number) : base(board)
        {
            _number = number;
            Name = "Servo " + number;

            _calibration = new CalibrationPointCollectionLong(-6000d, -6000, 6000d, 6000);
            _calibration.CalibrationChanged += new EventHandler(_calibration_CalibrationChanged);

            _zero = new HeliosAction(board.EOSInterface, "Stepper " + Number.ToString(), "zero", "", "Sets the current position as zero.");
            _zero.Execute += Zero_Execute;
            Actions.Add(_zero);

            _targetPosition = new HeliosValue(board.EOSInterface, new BindingValue(0d), "Stepper " + Number.ToString(), "target position", "Sets the raw target position of this stepper.", "", BindingValueUnits.Numeric);
            _targetPosition.Execute += TargetPosition_Execute;
            Actions.Add(_targetPosition);

            _value = new HeliosValue(board.EOSInterface, new BindingValue(0d), "Stepper " + Number.ToString(), "input value", "Sets the input value to be displayed on this stepper.", "Input value will be interpolated with the calibration data and set the target position for the stepper as appropriate.", BindingValueUnits.Numeric);
            _value.Execute += Value_Execute;
            Actions.Add(_value);

            _increment = new HeliosAction(board.EOSInterface, "Stepper " + Number.ToString(), "increment", "", "Increments the stepper position.", "Number of steps to increment steppers position. If empty or not a number 1 will be used.", BindingValueUnits.Numeric);
            _increment.Execute += IncrementPosition_Execute;
            Actions.Add(_increment);

            _decrement = new HeliosAction(board.EOSInterface, "Stepper " + Number.ToString(), "decrement", "", "Decrements the stepper position.", "Number of steps to decrement steppers position. If empty or not a number 1 will be used.", BindingValueUnits.Numeric);
            _decrement.Execute += DecrementPosition_Execute;
            Actions.Add(_decrement);
        }
Esempio n. 8
0
        public FalconInterface()
            : base("Falcon")
        {
            FalconType = FalconTypes.OpenFalcon;
            _dataExporter = new OpenFalcon.OpenFalconDataExporter(this);
            KeyFileName = System.IO.Path.Combine(FalconPath, "config\\OFKeystrokes.key");

            HeliosAction sendAction = new HeliosAction(this, "", "callback", "send", "Press and releases a keyboard callback for falcon.", "Callback name", BindingValueUnits.Text);
            sendAction.ActionBindingDescription = "send %value% callback for falcon.";
            sendAction.ActionInputBindingDescription = "send %value% callback";
            sendAction.ValueEditorType = typeof(FalconCallbackValueEditor);
            sendAction.Execute += new HeliosActionHandler(SendAction_Execute);
            Actions.Add(sendAction);

            HeliosAction pressAction = new HeliosAction(this, "", "callback", "press", "Press a keyboard callback for falcon and leave it pressed.", "Callback name", BindingValueUnits.Text);
            pressAction.ActionBindingDescription = "press %value% callback for falcon.";
            pressAction.ActionInputBindingDescription = "press %value% callback";
            pressAction.ValueEditorType = typeof(FalconCallbackValueEditor);
            pressAction.Execute += new HeliosActionHandler(PressAction_Execute);
            Actions.Add(pressAction);

            HeliosAction releaseAction = new HeliosAction(this, "", "callback", "release", "Releases a previously pressed keyboard callback for falcon.", "Callback name", BindingValueUnits.Text);
            releaseAction.ActionBindingDescription = "release %value% callback for falcon.";
            releaseAction.ActionInputBindingDescription = "release %value% callback";
            releaseAction.ValueEditorType = typeof(FalconCallbackValueEditor);
            releaseAction.Execute += new HeliosActionHandler(ReleaseAction_Execute);
            Actions.Add(releaseAction);
        }
Esempio n. 9
0
        public FalconInterface()
            : base("Falcon")
        {
            FalconType    = FalconTypes.OpenFalcon;
            _dataExporter = new OpenFalcon.OpenFalconDataExporter(this);
            KeyFileName   = System.IO.Path.Combine(FalconPath, "config\\OFKeystrokes.key");

            HeliosAction sendAction = new HeliosAction(this, "", "callback", "send", "Press and releases a keyboard callback for falcon.", "Callback name", BindingValueUnits.Text);

            sendAction.ActionBindingDescription      = "send %value% callback for falcon.";
            sendAction.ActionInputBindingDescription = "send %value% callback";
            sendAction.ValueEditorType = typeof(FalconCallbackValueEditor);
            sendAction.Execute        += new HeliosActionHandler(SendAction_Execute);
            Actions.Add(sendAction);

            HeliosAction pressAction = new HeliosAction(this, "", "callback", "press", "Press a keyboard callback for falcon and leave it pressed.", "Callback name", BindingValueUnits.Text);

            pressAction.ActionBindingDescription      = "press %value% callback for falcon.";
            pressAction.ActionInputBindingDescription = "press %value% callback";
            pressAction.ValueEditorType = typeof(FalconCallbackValueEditor);
            pressAction.Execute        += new HeliosActionHandler(PressAction_Execute);
            Actions.Add(pressAction);

            HeliosAction releaseAction = new HeliosAction(this, "", "callback", "release", "Releases a previously pressed keyboard callback for falcon.", "Callback name", BindingValueUnits.Text);

            releaseAction.ActionBindingDescription      = "release %value% callback for falcon.";
            releaseAction.ActionInputBindingDescription = "release %value% callback";
            releaseAction.ValueEditorType = typeof(FalconCallbackValueEditor);
            releaseAction.Execute        += new HeliosActionHandler(ReleaseAction_Execute);
            Actions.Add(releaseAction);
        }
Esempio n. 10
0
        public Axis(BaseUDPInterface sourceInterface, string deviceId, string buttonId, string argId, double argValue, double argMin, double argMax, string device, string name, bool loop, string exportFormat)
            : base(sourceInterface)
        {
            _id = argId;
            _format = exportFormat;
            _loop = loop;

            _argValue = argValue;
            _argMin = argMin;
            _argMax = argMax;

            _actionData = "C" + deviceId + "," + buttonId + ",";

            _value = new HeliosValue(sourceInterface, new BindingValue(0.0d), device, name, "Current value of this axis.", argMin.ToString() + "-" + argMax.ToString(), BindingValueUnits.Numeric);
            _value.Execute += new HeliosActionHandler(Value_Execute);
            Values.Add(_value);
            Actions.Add(_value);
            Triggers.Add(_value);

            _incrementAction = new HeliosAction(sourceInterface, device, name, "increment", "Increments this axis value.", "Amount to increment by (Default:"+ argValue + ")", BindingValueUnits.Numeric);
            _incrementAction.Execute += new HeliosActionHandler(IncrementAction_Execute);
            Actions.Add(_incrementAction);

            _decrementAction = new HeliosAction(sourceInterface, device, name, "decrement", "Decrement this axis value.", "Amount to decrement by (Default:" + -argValue + ")", BindingValueUnits.Numeric);
            _decrementAction.Execute += new HeliosActionHandler(DecrementAction_Execute);
            Actions.Add(_decrementAction);
        }
Esempio n. 11
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);
        }
Esempio n. 12
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);
        }
Esempio n. 13
0
 public RectangleDeocration()
     : base("Rectangle", new Size(100, 100))
 {
     IsSnapTarget = false;
     HeliosAction fillColorAction = new HeliosAction(this, "", "fill color", "set", "Sets the fill color for the rectangle", "Color in the hex format #AARRGGBB.", BindingValueUnits.Text);
     fillColorAction.Execute += new HeliosActionHandler(FillColorAction_Execute);
     Actions.Add(fillColorAction);
 }
Esempio n. 14
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);
        }
Esempio n. 15
0
        public RectangleDeocration()
            : base("Rectangle", new Size(100, 100))
        {
            IsSnapTarget = false;
            HeliosAction fillColorAction = new HeliosAction(this, "", "fill color", "set", "Sets the fill color for the rectangle", "Color in the hex format #AARRGGBB.", BindingValueUnits.Text);

            fillColorAction.Execute += new HeliosActionHandler(FillColorAction_Execute);
            Actions.Add(fillColorAction);
        }
Esempio n. 16
0
        public EosTextOutput(EosBoard board, byte number) : base(board)
        {
            _number = number;
            Name = "Text " + number;

            HeliosAction setText = new HeliosAction(board.EOSInterface, board.Name, Name, "set", "Sets the text displpayed.", "", BindingValueUnits.Text);
            setText.Execute += SetText_Execute;
            Actions.Add(setText);
        }
Esempio n. 17
0
        public EosTextOutput(EosBoard board, byte number) : base(board)
        {
            _number = number;
            Name    = "Text " + number;

            HeliosAction setText = new HeliosAction(board.EOSInterface, board.Name, Name, "set", "Sets the text displpayed.", "", BindingValueUnits.Text);

            setText.Execute += SetText_Execute;
            Actions.Add(setText);
        }
Esempio n. 18
0
        public ScreenReplicator()
            : base("Screen Shot Extractor", new Size(300, 300))
        {
            _startReplicating          = new HeliosAction(this, "", "", "start replication", "Start replicating the screen.");
            _startReplicating.Execute += new HeliosActionHandler(StartReplicating_Execute);
            Actions.Add(_startReplicating);

            _stopReplicating          = new HeliosAction(this, "", "", "stop replication", "Stops replicating the screen.");
            _stopReplicating.Execute += new HeliosActionHandler(StopReplicating_Execute);
            Actions.Add(_stopReplicating);
        }
Esempio n. 19
0
        public ScreenReplicator()
            : base("Screen Shot Extractor", new Size(300, 300))
        {
            _startReplicating = new HeliosAction(this, "", "", "start replication", "Start replicating the screen.");
            _startReplicating.Execute += new HeliosActionHandler(StartReplicating_Execute);
            Actions.Add(_startReplicating);

            _stopReplicating = new HeliosAction(this, "", "", "stop replication", "Stops replicating the screen.");
            _stopReplicating.Execute += new HeliosActionHandler(StopReplicating_Execute);
            Actions.Add(_stopReplicating);
        }
Esempio n. 20
0
        public LEDGroup(PhidgetLEDBoard parentBoard, string name)
        {
            _name = name;
            _togglePowerAction = new HeliosAction(parentBoard, name, "Power", "Toggle", "Toggles the power to this led group.  Current brightness setting will be retained.");
            _togglePowerAction.Context = this;

            _setPowerAction = new HeliosAction(parentBoard, name, "Power", "Set", "Sets whether this led group is powered on or not. Current brightness setting will be retained.", "True if the leds should be turned on, false if the leds should be turned off.", BindingValueUnits.Boolean);
            _setPowerAction.Context = this;

            _setBrightnessAction = new HeliosAction(parentBoard, name, "Brightness", "Set", "Sets the brightness of the leds in this group.", "0 = off regardless of power, 100 = full brightness", BindingValueUnits.Numeric);
            _setBrightnessAction.Context = this;
        }
Esempio n. 21
0
        public EosBacklight(EosBoard board) : base(board)
        {
            Name = "Backlight";

            HeliosAction backlightBrightness = new HeliosAction(board.EOSInterface, board.Name, "backlight brightness", "set", "Sets the brightness level of the backlight outputs.", "0-255", BindingValueUnits.Numeric);
            backlightBrightness.Execute += BacklighBrightness_Execute;
            Actions.Add(backlightBrightness);

            HeliosAction backlightPower = new HeliosAction(board.EOSInterface, board.Name, "backlight power", "set", "Turns backlight power on and off.", "False turns backlight off, true turns it on.", BindingValueUnits.Boolean);
            backlightPower.Execute += BacklightPower_Execute;
            Actions.Add(backlightPower);
        }
Esempio n. 22
0
        public ProcessControlInterface() : base("Process Control")
        {
            HeliosAction launchApplication = new HeliosAction(this, "", "", "launch application", "Launches an external application", "Full path to appliation or document you want to launch or URL to a web page.", BindingValueUnits.Text);

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

            HeliosAction killApplication = new HeliosAction(this, "", "", "kill application", "Kills an external process", "Process Image name of the process to be killed.", BindingValueUnits.Text);

            killApplication.Execute += KillApplication_Execute;
            Actions.Add(killApplication);
        }
Esempio n. 23
0
        public LEDGroup(PhidgetLEDBoard parentBoard, string name)
        {
            _name = name;
            _togglePowerAction         = new HeliosAction(parentBoard, name, "Power", "Toggle", "Toggles the power to this led group.  Current brightness setting will be retained.");
            _togglePowerAction.Context = this;

            _setPowerAction         = new HeliosAction(parentBoard, name, "Power", "Set", "Sets whether this led group is powered on or not. Current brightness setting will be retained.", "True if the leds should be turned on, false if the leds should be turned off.", BindingValueUnits.Boolean);
            _setPowerAction.Context = this;

            _setBrightnessAction         = new HeliosAction(parentBoard, name, "Brightness", "Set", "Sets the brightness of the leds in this group.", "0 = off regardless of power, 100 = full brightness", BindingValueUnits.Numeric);
            _setBrightnessAction.Context = this;
        }
Esempio n. 24
0
        public EosLedOutput(EosBoard board, byte number) : base(board)
        {
            _number = number;
            Name = "LED " + number;

            HeliosAction backlightBrightness = new HeliosAction(board.EOSInterface, board.Name, Name, "brightness", "Sets the brightness level of the led outputs.", "0-255", BindingValueUnits.Numeric);
            backlightBrightness.Execute += LedBrightness_Execute;
            Actions.Add(backlightBrightness);

            HeliosAction backlightPower = new HeliosAction(board.EOSInterface, board.Name, Name, "power", "Turns led power on and off.", "False turns backlight off, true turns it on.", BindingValueUnits.Boolean);
            backlightPower.Execute += LedPower_Execute;
            Actions.Add(backlightPower);
        }
Esempio n. 25
0
        public RectangleFill()
            : base("Rectangle Fill", new Size(25, 100))
        {
            IsSnapTarget = false;
            HeliosAction fillColorAction = new HeliosAction(this, "", "fill color", "set", "Sets the fill color for the rectangle", "Color in the hex format #AARRGGBB.", BindingValueUnits.Text);

            fillColorAction.Execute += new HeliosActionHandler(FillColorAction_Execute);
            Actions.Add(fillColorAction);
            _fillValue          = new HeliosValue(this, new BindingValue(0d), "", "Height", "Current value of the Fill Height. Value from 0 min to 1 max", "", BindingValueUnits.Numeric);
            _fillValue.Execute += new HeliosActionHandler(SetValue_Execute);
            Values.Add(_fillValue);
            Actions.Add(_fillValue);
        }
Esempio n. 26
0
        public EosBacklight(EosBoard board) : base(board)
        {
            Name = "Backlight";

            HeliosAction backlightBrightness = new HeliosAction(board.EOSInterface, board.Name, "backlight brightness", "set", "Sets the brightness level of the backlight outputs.", "0-255", BindingValueUnits.Numeric);

            backlightBrightness.Execute += BacklighBrightness_Execute;
            Actions.Add(backlightBrightness);

            HeliosAction backlightPower = new HeliosAction(board.EOSInterface, board.Name, "backlight power", "set", "Turns backlight power on and off.", "False turns backlight off, true turns it on.", BindingValueUnits.Boolean);

            backlightPower.Execute += BacklightPower_Execute;
            Actions.Add(backlightPower);
        }
Esempio n. 27
0
        public KeyboardInterface()
            : base("Keyboard")
        {
            _keyPressAction          = new HeliosAction(this, "", "", "send keys", "Presses and releases a set of keyboard keys.", "Keys which will be sent to the foreground applications.  Whitespace seperates key combos allowing multiple keystroke commands to be sent. \"{LCONTROL}c\" will hold down left control and then press c while \"{LCONTROL} c\" will press and release left control and then press and release c." + SpecialKeyHelp, BindingValueUnits.Text);
            _keyPressAction.Execute += new HeliosActionHandler(KeyPress_ExecuteAction);
            _keyDownAction           = new HeliosAction(this, "", "", "press key", "Presses keys.", "Keys which will be pressed down and remain pressed until a release key event is sent." + SpecialKeyHelp, BindingValueUnits.Text);
            _keyDownAction.Execute  += new HeliosActionHandler(KeyDown_ExecuteAction);
            _keyUpAction             = new HeliosAction(this, "", "", "release key", "Releases keys.", "Keys which will be released." + SpecialKeyHelp, BindingValueUnits.Text);
            _keyUpAction.Execute    += new HeliosActionHandler(KeyUp_ExecuteAction);

            Actions.Add(_keyPressAction);
            Actions.Add(_keyDownAction);
            Actions.Add(_keyUpAction);
        }
Esempio n. 28
0
        public KeyboardInterface()
            : base("Keyboard")
        {
            _keyPressAction = new HeliosAction(this, "", "", "send keys", "Presses and releases a set of keyboard keys.", "Keys which will be sent to the foreground applications.  Whitespace seperates key combos allowing multiple keystroke commands to be sent. \"{LCONTROL}c\" will hold down left control and then press c while \"{LCONTROL} c\" will press and release left control and then press and release c." + SpecialKeyHelp, BindingValueUnits.Text);
            _keyPressAction.Execute += new HeliosActionHandler(KeyPress_ExecuteAction);
            _keyDownAction = new HeliosAction(this, "", "", "press key", "Presses keys.", "Keys which will be pressed down and remain pressed until a release key event is sent." + SpecialKeyHelp, BindingValueUnits.Text);
            _keyDownAction.Execute += new HeliosActionHandler(KeyDown_ExecuteAction);
            _keyUpAction = new HeliosAction(this, "", "", "release key", "Releases keys.", "Keys which will be released." + SpecialKeyHelp, BindingValueUnits.Text);
            _keyUpAction.Execute += new HeliosActionHandler(KeyUp_ExecuteAction);

            Actions.Add(_keyPressAction);
            Actions.Add(_keyDownAction);
            Actions.Add(_keyUpAction);
        }
Esempio n. 29
0
        public EosLedOutput(EosBoard board, byte number) : base(board)
        {
            _number = number;
            Name    = "LED " + number;

            HeliosAction backlightBrightness = new HeliosAction(board.EOSInterface, board.Name, Name, "brightness", "Sets the brightness level of the led outputs.", "0-255", BindingValueUnits.Numeric);

            backlightBrightness.Execute += LedBrightness_Execute;
            Actions.Add(backlightBrightness);

            HeliosAction backlightPower = new HeliosAction(board.EOSInterface, board.Name, Name, "power", "Turns led power on and off.", "False turns backlight off, true turns it on.", BindingValueUnits.Boolean);

            backlightPower.Execute += LedPower_Execute;
            Actions.Add(backlightPower);
        }
Esempio n. 30
0
        public Indicator()
            : base("Indicator", new System.Windows.Size(100, 50))
        {
            _textFormat.VerticalAlignment = TextVerticalAlignment.Center;
            _textFormat.PropertyChanged  += new System.ComponentModel.PropertyChangedEventHandler(TextFormat_PropertyChanged);

            _value          = new HeliosValue(this, new BindingValue(false), "", "indicator", "Current On/Off State for this indicator.", "True if the indicator is on, otherwise false.", BindingValueUnits.Boolean);
            _value.Execute += new HeliosActionHandler(On_Execute);
            Values.Add(_value);
            Actions.Add(_value);

            _toggleAction          = new HeliosAction(this, "", "", "toggle indicator", "Toggles this indicator between on and off.");
            _toggleAction.Execute += new HeliosActionHandler(ToggleAction_Execute);
            Actions.Add(_toggleAction);
        }
Esempio n. 31
0
        public Indicator()
            : base("Indicator", new System.Windows.Size(100, 50))
        {
            _textFormat.VerticalAlignment = TextVerticalAlignment.Center;
            _textFormat.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(TextFormat_PropertyChanged);

            _value = new HeliosValue(this, new BindingValue(false), "", "indicator", "Current On/Off State for this indicator.", "True if the indicator is on, otherwise false.", BindingValueUnits.Boolean);
            _value.Execute += new HeliosActionHandler(On_Execute);
            Values.Add(_value);
            Actions.Add(_value);

            _toggleAction = new HeliosAction(this, "", "", "toggle indicator", "Toggles this indicator between on and off.");
            _toggleAction.Execute += new HeliosActionHandler(ToggleAction_Execute);
            Actions.Add(_toggleAction);
        }
Esempio n. 32
0
        public Switch(BaseUDPInterface sourceInterface, string deviceId, string argId, SwitchPosition[] positions, string device, string name, string exportFormat, bool everyFrame)
            : base(sourceInterface)
        {
            _id         = argId;
            _format     = exportFormat;
            _everyframe = everyFrame;

            _positions      = positions;
            _sendAction     = new string[_positions.Length];
            _sendStopAction = new string[_positions.Length];
            _exitAction     = new string[_positions.Length];

            _valueDescriptions = "";
            for (int i = 0; i < _positions.Length; i++)
            {
                SwitchPosition position = _positions[i];

                if (_valueDescriptions.Length > 0)
                {
                    _valueDescriptions += ",";
                }
                _valueDescriptions += (i + 1).ToString() + "=" + position.Name;
                if (position.Action != null)
                {
                    _sendAction[i] = "C" + deviceId + "," + position.Action + "," + position.ArgValue;
                }
                if (position.StopAction != null)
                {
                    _sendStopAction[i] = "C" + deviceId + "," + position.StopAction + "," + position.StopActionValue;
                }
                if (position.ExitValue != null)
                {
                    _exitAction[i] = "C" + deviceId + "," + position.Action + "," + position.ExitValue;
                }
            }

            _releaseAction          = new HeliosAction(sourceInterface, device, name, "release", "Releases pressure on current position (allows momentary and electronically held switch to revert to another position if necessary).");
            _releaseAction.Execute += new HeliosActionHandler(Release_Execute);
            Actions.Add(_releaseAction);

            _value          = new HeliosValue(sourceInterface, BindingValue.Empty, device, name, "Current position of this switch.", _valueDescriptions, BindingValueUnits.Numeric);
            _value.Execute += new HeliosActionHandler(Value_Execute);
            Actions.Add(_value);
            Triggers.Add(_value);
            Values.Add(_value);

            _currentPosition = -1;
        }
Esempio n. 33
0
        public RotaryEncoder(BaseUDPInterface sourceInterface, string deviceId, string buttonId, string button2Id, string argId, double argValue, string device, string name)
            : base(sourceInterface)
        {
            _incrementPrefix = "C" + deviceId + "," + button2Id + ",";
            _decrementPrefix = "C" + deviceId + "," + buttonId + ",";
            _incrementData   = _incrementPrefix + argValue.ToString(CultureInfo.InvariantCulture);
            _decrementData   = _decrementPrefix + (-argValue).ToString(CultureInfo.InvariantCulture);

            _incrementAction          = new HeliosAction(sourceInterface, device, name, "increment", "Increments this setting.", "Value to increment by. (Defaults to " + argValue + " if input evaluates to zero.)", BindingValueUnits.Numeric);
            _incrementAction.Execute += new HeliosActionHandler(IncrementAction_Execute);
            Actions.Add(_incrementAction);

            _decrementAction          = new HeliosAction(sourceInterface, device, name, "decrement", "Decrement this setting.", "Value to increment by. (Defaults to " + -argValue + " if input evaluates to zero.)", BindingValueUnits.Numeric);
            _decrementAction.Execute += new HeliosActionHandler(DecrementAction_Execute);
            Actions.Add(_decrementAction);
        }
Esempio n. 34
0
        public LockedEncoder(BaseUDPInterface sourceInterface, string deviceId, string buttonId, string button2Id, string argId, double argValue, string device, string name)
            : base(sourceInterface)
        {
            _incrementPrefix = "C" + deviceId + "," + buttonId + ",";
            _decrementPrefix = "C" + deviceId + "," + button2Id + ",";
            _incrementData = _incrementPrefix + argValue.ToString(CultureInfo.InvariantCulture);
            _decrementData = _decrementPrefix + (-argValue).ToString(CultureInfo.InvariantCulture);

            _incrementAction = new HeliosAction(sourceInterface, device, name, "increment", "Increments this setting.");
            _incrementAction.Execute += new HeliosActionHandler(IncrementAction_Execute);
            Actions.Add(_incrementAction);

            _decrementAction = new HeliosAction(sourceInterface, device, name, "decrement", "Decrement this setting.");
            _decrementAction.Execute += new HeliosActionHandler(DecrementAction_Execute);
            Actions.Add(_decrementAction);
        }
Esempio n. 35
0
        public LockedEncoder(BaseUDPInterface sourceInterface, string deviceId, string buttonId, string button2Id, string argId, double argValue, string device, string name)
            : base(sourceInterface)
        {
            _incrementPrefix = "C" + deviceId + "," + buttonId + ",";
            _decrementPrefix = "C" + deviceId + "," + button2Id + ",";
            _incrementData   = _incrementPrefix + argValue.ToString(CultureInfo.InvariantCulture);
            _decrementData   = _decrementPrefix + (-argValue).ToString(CultureInfo.InvariantCulture);

            _incrementAction          = new HeliosAction(sourceInterface, device, name, "increment", "Increments this setting.");
            _incrementAction.Execute += new HeliosActionHandler(IncrementAction_Execute);
            Actions.Add(_incrementAction);

            _decrementAction          = new HeliosAction(sourceInterface, device, name, "decrement", "Decrement this setting.");
            _decrementAction.Execute += new HeliosActionHandler(DecrementAction_Execute);
            Actions.Add(_decrementAction);
        }
Esempio n. 36
0
        public RotaryEncoder(BaseUDPInterface sourceInterface, string deviceId, string buttonId, string button2Id, string argId, double argValue, string device, string name)
            : base(sourceInterface)
        {
            _incrementPrefix = "C" + deviceId + "," + button2Id + ",";
            _decrementPrefix = "C" + deviceId + "," + buttonId + ",";
            _incrementData = _incrementPrefix + argValue.ToString(CultureInfo.InvariantCulture);
            _decrementData = _decrementPrefix + (-argValue).ToString(CultureInfo.InvariantCulture);

            _incrementAction = new HeliosAction(sourceInterface, device, name, "increment", "Increments this setting.", "Value to increment by. (Defaults to " + argValue + " if input evaluates to zero.)", BindingValueUnits.Numeric);
            _incrementAction.Execute += new HeliosActionHandler(IncrementAction_Execute);
            Actions.Add(_incrementAction);

            _decrementAction = new HeliosAction(sourceInterface, device, name, "decrement", "Decrement this setting.", "Value to increment by. (Defaults to " + -argValue + " if input evaluates to zero.)", BindingValueUnits.Numeric);
            _decrementAction.Execute += new HeliosActionHandler(DecrementAction_Execute);
            Actions.Add(_decrementAction);
        }
Esempio n. 37
0
        public IndicatorPushButton()
            : base("Indicator Pushbutton", new Size(100, 50))
        {
            Image       = "{Helios}/Images/Indicators/caution-indicator-off.png";
            PushedImage = "{Helios}/Images/Indicators/caution-indicator-off-pushed.png";
            TextColor   = Color.FromRgb(28, 28, 28);
            GlyphColor  = Color.FromRgb(28, 28, 28);

            _value          = 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);
            _value.Execute += new HeliosActionHandler(Indicator_Execute);
            Values.Add(_value);
            Actions.Add(_value);

            _toggleAction          = new HeliosAction(this, "", "", "toggle indicator", "Toggles this indicator between on and off.");
            _toggleAction.Execute += new HeliosActionHandler(ToggleAction_Execute);
            Actions.Add(_toggleAction);
        }
Esempio n. 38
0
        public IndicatorPushButton()
            : base("Indicator Pushbutton", new Size(100, 50))
        {
            Image = "{Helios}/Images/Indicators/caution-indicator-off.png";
            PushedImage = "{Helios}/Images/Indicators/caution-indicator-off-pushed.png";
            TextColor = Color.FromRgb(28, 28, 28);
            GlyphColor = Color.FromRgb(28, 28, 28);

            _value = 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);
            _value.Execute += new HeliosActionHandler(Indicator_Execute);
            Values.Add(_value);
            Actions.Add(_value);

            _toggleAction = new HeliosAction(this, "", "", "toggle indicator", "Toggles this indicator between on and off.");
            _toggleAction.Execute += new HeliosActionHandler(ToggleAction_Execute);
            Actions.Add(_toggleAction);
        }
Esempio n. 39
0
        public KeyboardInterface()
            : base("Keyboard")
        {
            // load global configuration not specific to profile
            KeyboardEmulator.ForceQwerty = ConfigManager.SettingsManager.LoadSetting <bool>("KeyboardInterface", "ForceQwerty", false);

            _keyPressAction          = new HeliosAction(this, "", "", "send keys", "Presses and releases a set of keyboard keys.", "Keys which will be sent to the foreground applications.  Whitespace seperates key combos allowing multiple keystroke commands to be sent. \"{LCONTROL}c\" will hold down left control and then press c while \"{LCONTROL} c\" will press and release left control and then press and release c." + SpecialKeyHelp, BindingValueUnits.Text);
            _keyPressAction.Execute += new HeliosActionHandler(KeyPress_ExecuteAction);
            _keyDownAction           = new HeliosAction(this, "", "", "press key", "Presses keys.", "Keys which will be pressed down and remain pressed until a release key event is sent." + SpecialKeyHelp, BindingValueUnits.Text);
            _keyDownAction.Execute  += new HeliosActionHandler(KeyDown_ExecuteAction);
            _keyUpAction             = new HeliosAction(this, "", "", "release key", "Releases keys.", "Keys which will be released." + SpecialKeyHelp, BindingValueUnits.Text);
            _keyUpAction.Execute    += new HeliosActionHandler(KeyUp_ExecuteAction);

            Actions.Add(_keyPressAction);
            Actions.Add(_keyDownAction);
            Actions.Add(_keyUpAction);
        }
Esempio n. 40
0
        public CalibrationFilter() : base("Calibration Filter")
        {
            DesignTimeOnly = true;
            Image          = "{Helios}/Images/General/calibration.png";
            Alignment      = ImageAlignment.Stretched;
            Width          = 128;
            Height         = 128;

            HeliosAction inputValue = new HeliosAction(this, "Input", "Value", "set",
                                                       "the input value to be transformed by the calibration curve",
                                                       "a numeric value in the range covered by the calibration curve",
                                                       BindingValueUnits.Numeric);

            inputValue.Execute += InputValue_Execute;
            Actions.Add(inputValue);

            // create initial version in case we don't ReadXML
            RecreateOutput();
        }
Esempio n. 41
0
        public GuardedSwitch(BaseUDPInterface sourceInterface, string deviceId, string argId, string guardAction, string guardArgId, string guardUpValue, string guardDownValue, SwitchPosition[] positions, string device, string name, string exportFormat, bool everyFrame)
            : base(sourceInterface, deviceId, argId, positions, device, name, exportFormat, everyFrame)
        {
            _guardArgId = guardArgId;
            _guardUpValue = guardUpValue;
            _guardDownValue = guardDownValue;

            _actionData[0] = "C" + deviceId + "," + guardAction + "," + guardUpValue;
            _actionData[1] = "C" + deviceId + "," + guardAction + "," + guardDownValue;

            _guardValue = new HeliosValue(sourceInterface, BindingValue.Empty, device, name + " guard", "Current position of the guard for this switch.", "1 = Up, 2 = Down", BindingValueUnits.Numeric);
            _guardValue.Execute += new HeliosActionHandler(GuardValue_Execute);
            Actions.Add(_guardValue);
            Triggers.Add(_guardValue);
            Values.Add(_guardValue);

            _autoguardPositionAction = new HeliosAction(sourceInterface, device, name, "autoguard set", "Sets the position of this switch, and automatically switches the guard up if necessary.", ValueDescriptions, BindingValueUnits.Numeric);
            _autoguardPositionAction.Execute += new HeliosActionHandler(AutoguardPositionAction_Execute);
            Actions.Add(_autoguardPositionAction);
        }
Esempio n. 42
0
        public GuardedSwitch(BaseUDPInterface sourceInterface, string deviceId, string argId, string guardAction, string guardArgId, string guardUpValue, string guardDownValue, SwitchPosition[] positions, string device, string name, string exportFormat, bool everyFrame)
            : base(sourceInterface, deviceId, argId, positions, device, name, exportFormat, everyFrame)
        {
            _guardArgId     = guardArgId;
            _guardUpValue   = guardUpValue;
            _guardDownValue = guardDownValue;

            _actionData[0] = "C" + deviceId + "," + guardAction + "," + guardUpValue;
            _actionData[1] = "C" + deviceId + "," + guardAction + "," + guardDownValue;

            _guardValue          = new HeliosValue(sourceInterface, BindingValue.Empty, device, name + " guard", "Current position of the guard for this switch.", "1 = Up, 2 = Down", BindingValueUnits.Numeric);
            _guardValue.Execute += new HeliosActionHandler(GuardValue_Execute);
            Actions.Add(_guardValue);
            Triggers.Add(_guardValue);
            Values.Add(_guardValue);

            _autoguardPositionAction          = new HeliosAction(sourceInterface, device, name, "autoguard set", "Sets the position of this switch, and automatically switches the guard up if necessary.", ValueDescriptions, BindingValueUnits.Numeric);
            _autoguardPositionAction.Execute += new HeliosActionHandler(AutoguardPositionAction_Execute);
            Actions.Add(_autoguardPositionAction);
        }
Esempio n. 43
0
        public FalconInterface()
            : base("Falcon")
        {
            FalconType = FalconTypes.BMS;

            _falconVersions = GetFalconVersions();
            _falconPath     = GetFalconPath();

            _dataExporter = new BMS.BMSFalconDataExporter(this);
            KeyFileName   = System.IO.Path.Combine(FalconPath, "User\\Config\\BMS - Full.key");

            HeliosAction sendAction = new HeliosAction(this, "", "callback", "send", "Press and releases a keyboard callback for falcon.", "Callback name", BindingValueUnits.Text)
            {
                ActionBindingDescription      = "send %value% callback for falcon.",
                ActionInputBindingDescription = "send %value% callback",
                ValueEditorType = typeof(FalconCallbackValueEditor)
            };

            sendAction.Execute += new HeliosActionHandler(SendAction_Execute);
            Actions.Add(sendAction);

            HeliosAction pressAction = new HeliosAction(this, "", "callback", "press", "Press a keyboard callback for falcon and leave it pressed.", "Callback name", BindingValueUnits.Text)
            {
                ActionBindingDescription      = "press %value% callback for falcon.",
                ActionInputBindingDescription = "press %value% callback",
                ValueEditorType = typeof(FalconCallbackValueEditor)
            };

            pressAction.Execute += new HeliosActionHandler(PressAction_Execute);
            Actions.Add(pressAction);

            HeliosAction releaseAction = new HeliosAction(this, "", "callback", "release", "Releases a previously pressed keyboard callback for falcon.", "Callback name", BindingValueUnits.Text)
            {
                ActionBindingDescription      = "release %value% callback for falcon.",
                ActionInputBindingDescription = "release %value% callback",
                ValueEditorType = typeof(FalconCallbackValueEditor)
            };

            releaseAction.Execute += new HeliosActionHandler(ReleaseAction_Execute);
            Actions.Add(releaseAction);
        }
Esempio n. 44
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.");
        }
Esempio n. 45
0
        public PhidgetsStepper(PhidgetStepperBoard stepperBoard, int motorNumber)
        {
            _motorNum     = motorNumber;
            _stepperBoard = stepperBoard;

            _zero          = new HeliosAction(stepperBoard, "Motor " + _motorNum.ToString(), "zero", "", "Sets the current position as zero.");
            _zero.Execute += Zero_Execute;

            _targetPosition          = new HeliosValue(stepperBoard, new BindingValue(0d), "Motor " + _motorNum.ToString(), "target position", "Sets the raw target position of this stepper.", "", BindingValueUnits.Numeric);
            _targetPosition.Execute += TargetPosition_Execute;

            _value          = new HeliosValue(stepperBoard, new BindingValue(0d), "Motor " + _motorNum.ToString(), "input value", "Sets the input value to be displayed on this stepper.", "Input value will be interpolated with the calibration data and set the target position for the stepper as appropriate.", BindingValueUnits.Numeric);
            _value.Execute += Value_Execute;

            _calibration = new CalibrationPointCollectionLong(-6000d, -376, 6000d, 376);
            _calibration.CalibrationChanged += new EventHandler(_calibration_CalibrationChanged);

            _increment          = new HeliosAction(stepperBoard, "Motor " + _motorNum.ToString(), "increment", "", "Increments the stepper position.", "Number of steps to increment steppers position. If empty or not a number 1 will be used.", BindingValueUnits.Numeric);
            _increment.Execute += IncrementPosition_Execute;

            _decrement          = new HeliosAction(stepperBoard, "Motor " + _motorNum.ToString(), "decrement", "", "Decrements the stepper position.", "Number of steps to decrement steppers position. If empty or not a number 1 will be used.", BindingValueUnits.Numeric);
            _decrement.Execute += DecrementPosition_Execute;
        }
Esempio n. 46
0
        public PhidgetsStepper(PhidgetStepperBoard stepperBoard, int motorNumber)
        {
            _motorNum = motorNumber;
            _stepperBoard = stepperBoard;

            _zero = new HeliosAction(stepperBoard, "Motor " + _motorNum.ToString(), "zero", "", "Sets the current position as zero.");
            _zero.Execute += Zero_Execute;

            _targetPosition = new HeliosValue(stepperBoard, new BindingValue(0d), "Motor " + _motorNum.ToString(), "target position", "Sets the raw target position of this stepper.", "", BindingValueUnits.Numeric);
            _targetPosition.Execute += TargetPosition_Execute;

            _value = new HeliosValue(stepperBoard, new BindingValue(0d), "Motor " + _motorNum.ToString(), "input value", "Sets the input value to be displayed on this stepper.", "Input value will be interpolated with the calibration data and set the target position for the stepper as appropriate.", BindingValueUnits.Numeric);
            _value.Execute += Value_Execute;

            _calibration = new CalibrationPointCollectionLong(-6000d, -376, 6000d, 376);
            _calibration.CalibrationChanged += new EventHandler(_calibration_CalibrationChanged);

            _increment = new HeliosAction(stepperBoard, "Motor " + _motorNum.ToString(), "increment", "", "Increments the stepper position.", "Number of steps to increment steppers position. If empty or not a number 1 will be used.", BindingValueUnits.Numeric);
            _increment.Execute += IncrementPosition_Execute;

            _decrement = new HeliosAction(stepperBoard, "Motor " + _motorNum.ToString(), "decrement", "", "Decrements the stepper position.", "Number of steps to decrement steppers position. If empty or not a number 1 will be used.", BindingValueUnits.Numeric);
            _decrement.Execute += DecrementPosition_Execute;
        }
Esempio n. 47
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", "Launches an external application", "Full path to appliation or document you want to launch or URL to a web page.", BindingValueUnits.Text);
            launchApplication.Execute += LaunchApplication_Execute;
            Actions.Add(launchApplication);
        }
Esempio n. 48
0
        public Switch(BaseUDPInterface sourceInterface, string deviceId, string argId, SwitchPosition[] positions, string device, string name, string exportFormat, bool everyFrame)
            : base(sourceInterface)
        {
            _id = argId;
            _format = exportFormat;
            _everyframe = everyFrame;

            _positions = positions;
            _sendAction = new string[_positions.Length];
            _sendStopAction = new string[_positions.Length];
            _exitAction = new string[_positions.Length];

            _valueDescriptions = "";
            for (int i = 0; i < _positions.Length; i++)
            {
                SwitchPosition position = _positions[i];

                if (_valueDescriptions.Length > 0)
                {
                    _valueDescriptions += ",";
                }
                _valueDescriptions += (i + 1).ToString() + "=" + position.Name;
                if (position.Action != null)
                {
                    _sendAction[i] = "C" + deviceId + "," + position.Action + "," + position.ArgValue;
                }
                if (position.StopAction != null)
                {
                    _sendStopAction[i] = "C" + deviceId + "," + position.StopAction + "," + position.StopActionValue;
                }
                if (position.ExitValue != null)
                {
                    _exitAction[i] = "C" + deviceId + "," + position.Action + "," + position.ExitValue;
                }
            }

            _releaseAction = new HeliosAction(sourceInterface, device, name, "release", "Releases pressure on current position (allows momentary and electronically held switch to revert to another position if necessary).");
            _releaseAction.Execute += new HeliosActionHandler(Release_Execute);
            Actions.Add(_releaseAction);

            _value = new HeliosValue(sourceInterface, BindingValue.Empty, device, name, "Current position of this switch.", _valueDescriptions, BindingValueUnits.Numeric);
            _value.Execute += new HeliosActionHandler(Value_Execute);
            Actions.Add(_value);
            Triggers.Add(_value);
            Values.Add(_value);

            _currentPosition = -1;
        }
Esempio n. 49
0
        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);
        }