/// <summary> /// The Arm Command /// /// On receipt of this command, the receiving device sets its arm mode according to the /// value of the Arm Mode field. It is not guaranteed that an Arm command will succeed. /// Based on the current state of the IAS CIE, and its related devices, the command can be /// rejected. The device shall generate an Arm Response command to indicate the /// resulting armed state /// /// <param name="armMode" <see cref="byte"> Arm Mode</ param > /// <param name="armDisarmCode" <see cref="string"> Arm/Disarm Code</ param > /// <param name="zoneId" <see cref="byte"> Zone ID</ param > /// <returns> the command result Task </returns> /// </summary> public Task <CommandResult> ArmCommand(byte armMode, string armDisarmCode, byte zoneId) { ArmCommand command = new ArmCommand(); // Set the fields command.ArmMode = armMode; command.ArmDisarmCode = armDisarmCode; command.ZoneId = zoneId; return(Send(command)); }
/// <summary>Wire up view model.</summary> public VehicleViewModel(MultirotorVehicleModel model) { _model = model; _model.PropertyChanged += onModelPropertyChanged; _armCommand = new ArmCommand(_model); _disableApiCommand = new DisableApiControlCommand(_model); _disarmCommand = new DisarmCommand(_model); _enableApiCommand = new EnableApiControlCommand(_model); _goHomeCommand = new GoHomeCommand(_model); _hoverInPlaceCommand = new HoverInPlaceCommand(_model); _landNowCommand = new LandNowCommand(_model); _resetCommand = new ResetCommand(_model); _takeoffCommand = new TakeoffCommand(_model); }
public ControlPanelViewModel(ArmCommand armCommand, DisarmCommand disarmCommand, ThrottleCommand throttleCommand) { this.ArmCommand = armCommand; this.DisarmCommand = disarmCommand; this.ThrottleCommand = throttleCommand; }
public async Task ExecuteCommandAsync(ArmCommand command) { await ExecuteCommandAsync(command as dynamic); }
private void OnDeleteCommand(ArmCommand command) => Commands.Remove(command);