コード例 #1
0
ファイル: Channel.cs プロジェクト: elliotwoods/MuscleMemory
        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);
            });
        }
コード例 #2
0
ファイル: Channel.cs プロジェクト: elliotwoods/MuscleMemory
        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);
            });
        }