Message.AddField

Method

Visual Basic

Overloads Public Sub AddField(
    ByVal messageField As MessageField)
Overloads Public Sub AddField(
    ByVal fieldName As String,
    ByVal fieldValue As value_type)
Overloads Public Sub AddField(
    ByVal messageField As MessageField,
    ByVal fieldValue As value_type,
    ByVal fieldId As UInt16)

C#

public void AddField(MessageField messageField);
public void AddField(
    string fieldName,
    value_type  fieldValue);
public void AddField(
    string fieldName,
    value_type  fieldValue,
    ushort fieldId);

Purpose

Add a field to a message.

Overloading

This method has many overloads. Message.add Overloads by Category classifies them into three main categories (based on the number of parameters). Message.add Homologous Types documents the automatic conversion from types in Visual Basic and C# to homologous types within the resulting field in Rendezvous wire format.

Message.add Overloads by Category

Signature

Description

messageField

The parameter is a message field object, which fully specifies the field—including its name, type, value, and field identifier; see MessageField.

fieldName,fieldValue

Overloads with two parameters add fields without identifiers.

The first parameter specifies the name of the new field. Fields without identifiers must have non-null names.

The second parameter specifies both the type of the field and its data; see also Message.add Homologous Types.

fieldName,fieldValue,fieldId

Overloads with three parameters add fields with identifiers.

The first parameter specifies the name of the new field. A field with an identifier may have a null name.

The second parameter specifies both the type of the field and its data; see also Message.add Homologous Types.

The third parameter specifies the field identifier. All field identifiers must be unique within each message. Integers in the range [1, 65535] are valid arguments for this parameter.

Message.add Homologous Types

Visual Basic

Value Type

C#

Value Type

Rendezvous Wire Format

Type

Message

Message

TIBRVMSG_MSG

Date DateTime

TIBRVMSG_DATETIME

Opaque

Opaque

TIBRVMSG_OPAQUE

String string

TIBRVMSG_STRING

XmlDocument XmlDocument

TIBRVMSG_XML

Scalar Types

Boolean bool

TIBRVMSG_BOOL

SByte sbyte

TIBRVMSG_I8

Byte byte

TIBRVMSG_U8

Short short

TIBRVMSG_I16

UInt16 ushort

TIBRVMSG_U16

Integer int

TIBRVMSG_I32

UInt32 uint

TIBRVMSG_U32

Long long

TIBRVMSG_I64

UInt64 ulong

TIBRVMSG_U64

Single float

TIBRVMSG_F32

Double double

TIBRVMSG_F64

IPPort

IPPort

TIBRVMSG_IPPORT16

IPAddress IPAddress

TIBRVMSG_IPADDR32

Array Types

The add method copies the array into the field.

SByte() sbyte

TIBRVMSG_I8ARRAY

Byte() byte[]

TIBRVMSG_U8ARRAY

Short() short[]

TIBRVMSG_I16ARRAY

UInt16() ushort[]

TIBRVMSG_U16ARRAY

Integer() int[]

TIBRVMSG_I32ARRAY

UInt32() uint[]

TIBRVMSG_U32ARRAY

Long() long[]

TIBRVMSG_I64ARRAY

UInt64() ulong[]

TIBRVMSG_U64ARRAY

Single() float[]

TIBRVMSG_F32ARRAY

Double() double[]

TIBRVMSG_F64ARRAY

Message() Message[]

TIBRVMSG_MESSAGEARRAY

String() String[]

TIBRVMSG_STRINGARRAY

Field Name Length

The the longest possible field name is 127 bytes.

Nested Message

When the fieldValue argument (that is, the second parameter) is a message object, this method adds only the data portion of the nested message; it does not include any address information or certified delivery information.

Date & Time Representations

Rendezvous software represents time values in two ways—one within programs, and a more compact wire format within messages. In both representations, zero denotes the epoch, 12:00 midnight, January 1st, 1970.

Rendezvous wire format represents time as a two-part value—seconds as a 40-bit signed integer, plus microseconds as a 24-bit unsigned integer. This representation yields the effective range detailed in Date and Time Ranges in Rendezvous Wire Format. Range limits denote the extreme value on either side of zero (the epoch). Bold type indicates the primary unit of measurement.

Date and Time Ranges in Rendezvous Wire Format

range in years

17,432

range in seconds

549,755,813,887

range in milliseconds

549,755,813,887,000

See Also

Message.AddStringAsXml