Example #1
0
        /// <summary>Initializes the CAN bus.</summary>
        /// <param name="timings">The desired bus timings.</param>
        /// <param name="channel">The CAN channel to use.</param>
        public void Initialize(ControllerAreaNetwork.Timings timings, ControllerAreaNetwork.Channel channel)
        {
            this.can = new ControllerAreaNetwork(channel, timings);

            this.can.MessageAvailable += this.OnCanMessagesAvailable;
            this.can.ErrorReceived    += this.OnCanErrorReceived;

            this.can.Enabled = true;
        }
Example #2
0
 public CanNativeAdapter(ControllerAreaNetwork.Channel canPort, ControllerAreaNetwork.Timings timings)
     : this(new CanNativeAdapterSettings(canPort, 0), timings)
 {
 }
Example #3
0
 public CanNativeAdapterSettings(ControllerAreaNetwork.Channel canPort, CanSpeed speed)
     : base(speed)
 {
     CanPort = canPort;
 }
Example #4
0
 public CanNativeAdapter(ControllerAreaNetwork.Channel canPort, CanAdapterSettings.CanSpeed speed)
     : this(new CanNativeAdapterSettings(canPort, speed))
 {
 }