Subaru.SSM2.Ssm2ReadBlockRequest.Check C# (CSharp) Method

Check() public method

public Check ( ) : bool
return bool
        public override bool Check()
        {
            return this.Command == Ssm2Command.ReadBlockRequestA0
                && this.count == PacketSizeSpecificFixed
                && base.Check ();
        }

Usage Example

Esempio n. 1
0
        public void ConstructAndChangeProps1()
        {
            byte[] packetData = TestPacket1;

            Ssm2ReadBlockRequest p = new Ssm2ReadBlockRequest ();
            p.Source = Ssm2Device.DiagnosticToolF0;
            p.Destination = Ssm2Device.Engine10;
            p.Address = 0x200000;
            p.DataCount = 128;

            // should be ok after setting Data but don't depend on it!
            Assert.AreEqual (packetData.Length, p.Size, "Size before Construct");

            p.Finish ();

            AssertData1 (p);

            // changing some properties now

            p.DataCount = 129;
            // needed to calc new checksum
            p.Finish ();

            // check
            Assert.AreEqual (packetData.Length, p.Size, "Size2");
            Assert.AreEqual (true, p.Check (), "Check2()");
            Assert.AreEqual (Ssm2Device.Engine10, p.Destination, "Destination2");
            Assert.AreEqual (Ssm2Device.DiagnosticToolF0, p.Source, "Source2");
            Assert.AreEqual (Ssm2Command.ReadBlockRequestA0, p.Command, "Command2");
            Assert.AreEqual (0x200000, p.Address, "Address2");
            Assert.AreEqual (129, p.DataCount, "DataCount2");
        }
All Usage Examples Of Subaru.SSM2.Ssm2ReadBlockRequest::Check