/// <summary> /// Does the specified modi. /// </summary> /// <param name="modi">The modi info.</param> public void Do(/*Modi modi*/ ActionHandleStates actionHandleStates) { try { //const uint SelectPulseInput = CanCommandConsts.SetActiveSensor; //var id = this.GetActualNodeId.Get(); //var data = new List<byte>(); //data.Add((byte)modi); //var cobid = SelectPulseInput + id; const uint SelectPulseInput = CanCommandConsts.SetActiveSensor; var id = this.GetActualNodeId.Get(); var data = new List <byte>(); data.Add((byte)actionHandleStates); var cobid = SelectPulseInput + id; this.WriteBasicCan.WriteCan(cobid, data, TpcanMessageType.PCAN_MESSAGE_EXTENDED); } catch (Exception ex) { this.Logger.LogError(ex); throw; } finally { this.Logger.LogEnd(this.GetType()); } }
/// <summary> /// Raises the <see cref="E:NodeReached" /> event. /// </summary> /// <param name="e">The <see cref="AliveEventArgs" /> instance containing the event data.</param> public virtual void OnReached(/*Modi*/ ActionHandleStates e) { try { this.Logger.LogBegin(this.GetType()); if (this.EventIsReached == null) { return; } this.EventIsReached.Invoke(this, e); } catch (Exception exception) { this.Logger.LogError(exception); throw; } finally { this.Logger.LogEnd(this.GetType()); } }