Exemplo n.º 1
0
        public override void Start(int bitrate)
        {
            this.SetBitrate(bitrate);
            this.FDevice.PerformBlocking(() =>
            {
                NativeFunctions.ThrowIfError(
                    NativeFunctions.StartCAN(
                        this.FDevice.DeviceType
                        , this.FDevice.DeviceIndex
                        , this.FChannelIndex)

                    , this.FDevice.DeviceType
                    , this.FDevice.DeviceIndex
                    , this.FChannelIndex);

                NativeFunctions.ThrowIfError(
                    NativeFunctions.ResetCAN(
                        this.FDevice.DeviceType
                        , this.FDevice.DeviceIndex
                        , this.FChannelIndex)

                    , this.FDevice.DeviceType
                    , this.FDevice.DeviceIndex
                    , this.FChannelIndex);
            });
        }
Exemplo n.º 2
0
        public override void Stop()
        {
            this.FDevice.PerformBlocking(() =>
            {
                NativeFunctions.ThrowIfError(
                    NativeFunctions.ResetCAN(
                        this.FDevice.DeviceType
                        , this.FDevice.DeviceIndex
                        , this.FChannelIndex)

                    , this.FDevice.DeviceType
                    , this.FDevice.DeviceIndex
                    , this.FChannelIndex);
            });
        }