protected AbstractVectorActionPlus(IVectorBehaviourPlus behaviour, TimeSpan?timeout, bool needsControl) { Behaviour = behaviour; Created = DateTime.Now; State = ActionState.Pending; StartTimeout = timeout; NeedsControl = needsControl; }
public async Task AddBehaviourAsync(IVectorBehaviourPlus behaviour) { if (!Behaviours.Any(b => b.UniqueReference == behaviour.UniqueReference)) { Behaviours.Add(behaviour); UpdateFrameProcessors(); if (Connection == ConnectedState.Connected) { await ActOnAnyBehaviourPermanentRequirements(); await RegisterBehavioursAsync(new[] { behaviour }); } if (behaviour.ActionOnAdded != null) { EnqueueAction(behaviour.ActionOnAdded); } OnBehaviourEvent?.Invoke(Behaviours, BehaviourEvent.Add); } }
public StopAllMotorsAction(IVectorBehaviourPlus behaviour, TimeSpan?timeout) : base(behaviour, timeout, true) { }
public SimpleSpeechAction(IVectorBehaviourPlus behaviour, string speech) : base(behaviour, TimeSpan.FromSeconds(15), true) { this.speech = speech; }
public TurnToFaceAction(IVectorBehaviourPlus behaviour, TimeSpan?timeout, Face face) : base(behaviour, timeout, true) { this.face = face; }
public static VectorBehaviourPlusReport FromException(Exception e, Robot robot = null, IVectorControllerPlus controller = null, IVectorBehaviourPlus behaviour = null) { return(new VectorBehaviourPlusReport() { Description = e.Message, Controller = controller, Robot = robot, Behaviour = behaviour }); }
public BirthdaySongAction(IVectorBehaviourPlus behaviour, TimeSpan?timeout) : base(behaviour, timeout, true) { }
public ExterminateAction(IVectorBehaviourPlus behaviour, TimeSpan?timeout) : base(behaviour, timeout, true) { }
public OfferTeaAction(IVectorBehaviourPlus behaviour, TimeSpan?timeout, string name = null) : base(behaviour, timeout, true) { this.name = name; }
public FaceSomeoneAction(IVectorBehaviourPlus behaviour, TimeSpan?timeout) : base(behaviour, timeout, true) { }