DOFTypemarshal Method (DOFType, DOFValue, DOFPacket)OpenDOF Object Access Library
Write a DOFValue to a buffer, handling the case where the value is null.

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

C#
public static void marshal(
	DOFType type,
	DOFValue value,
	DOFPacket packet
)

Parameters

type
Type: org.opendof.core.oalDOFType
The type of the value. Must not be null.
value
Type: org.opendof.core.oalDOFValue
The value to be written. May be
null
only if the type is nullable.
packet
Type: org.opendof.core.oalDOFPacket
The packet to write the value to. Must not be null.
Exceptions

ExceptionCondition
DOFMarshalExceptionThrown on marshalling errors.
DOFErrorExceptionThrown on type validation errors.
DOFMarshalException
DOFErrorException
Remarks

Write a DOFValue to a buffer, handling the case where the value is null.

This method should always be used to write values to buffers. Each DOFValue defines its data format and can write itself out with the DOFValue.marshal(DOFType, DOFPacket) method. However, it is possible that the value is

null
. In this case the method call cannot be made.

This method handles this case correctly, checking if the type can accept

null
values. If it is nullable then it writes the value out appropriately.
See Also

Reference