DOFTypevalidateLength Method OpenDOF Object Access Library
Verify that the data length for a type matched the data read for the type.

Namespace: org.opendof.core.oal
Assembly: dof-oal (in dof-oal.dll) Version: 7.0.1.2
Syntax

C#
protected void validateLength(
	DOFPacket packet
)

Parameters

packet
Type: org.opendof.core.oalDOFPacket
The buffer the type is being read from.
Exceptions

ExceptionCondition
DOFMarshalExceptionThrown if there is a mismatch between what is declared and what was read.
DOFMarshalException
Remarks

Verify that the data length for a type matched the data read for the type.

Each type follows a consistent format on the wire as defined by the DOF ProtocolSpecification. The base class constructor sets a mark in the buffer at the end of the data that should be associated with the type, and that data is then read by the extending class. Once read the extending class must call this method to validate that the lengths agree.

See Also

Reference