Message Class |
Namespace: OBCOM.NetClient
The Message type exposes the following members.
Name | Description | |
---|---|---|
Message |
Creates a new Message instance.
| |
Message(String) |
Creates a new Message with the supplied data.
|
Name | Description | |
---|---|---|
Data |
Gets or sets the string data of the Message.
| |
DataAll |
Gets the complete string data of the Message.
| |
DataBytes |
Gets or sets the binary data of the Message.
| |
DefaultSignANSI |
Gets or sets whether, by default, numeric fields are stored in Messages
using the ANSI or the TANDEM format.
| |
FormCode |
Gets or sets the form code of the Message.
| |
IsDataOnly |
Gets or sets whether this is a data-only Message.
| |
Layout |
Gets or sets the Layout of the Message.
| |
MaxLabelKey |
Returns the maximum label key of all Message labels.
| |
MinLabelKey |
Returns the minimum label key of all Message labels.
| |
MulticastName |
Gets the multicast name of this Message.
| |
OperCode |
Gets or sets the operation code of the Message (MessageOper).
| |
ProtCode |
Gets or sets the protection code of the Message (MessageProt).
| |
ReplyCode |
Gets or sets the reply code of the Message (MessageReply).
| |
Sequence |
Gets or sets the sequence of the Message.
| |
ServerCode |
Gets or sets the server code of the Message.
| |
SessionID |
Gets or sets the session ID of the Message.
| |
SignANSI |
Gets or sets whether numeric fields are stored in the Message using the
ANSI or the TANDEM format.
| |
Strict |
Gets or sets wheter the Message is strict.
| |
TranCode |
Gets or sets the transaction code of the Message.
| |
TypeCode |
Gets or sets the type of the Message (MessageType).
|
Name | Description | |
---|---|---|
Clone |
Returns a "deep" copy of the Message.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Exists |
Returns true if the field identified by fieldName exists in the Layout of the Message.
| |
GetChar(String) |
Returns the first character of the value of the field identified by
fieldName.
| |
GetChar(String, Int32) |
Returns the first character of the value of the field identified by
fieldName and index.
| |
GetData(String) |
Returns the string data of the field identified by fieldName.
| |
GetData(String, Int32) |
Returns the string data of the field identified by fieldName and index.
| |
GetDate(String) |
Returns the date value of the field identified by fieldName.
| |
GetDate(String, Int32) |
Returns the date value of the field identified by fieldName and index.
| |
GetDouble(String) |
Returns the double value of the field identified by fieldName.
| |
GetDouble(String, Int32) |
Returns the double value of the field identified by fieldName and index.
| |
GetField |
Returns the field identified by specified fieldName.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetInteger(String) |
Returns the integer value of the field identified by fieldName.
| |
GetInteger(String, Int32) |
Returns the integer value of the field identified by fieldName and index.
| |
GetLabel |
Gets the value of the label indexed by key.
| |
GetNumber(String) |
Returns the decimal value of the field identified by fieldName.
| |
GetNumber(String, Int32) |
Returns the decimal value of the field identified by fieldName and index.
| |
GetOccurs |
Returns the number of occurrences of the field identified by fieldName.
| |
GetString(String) |
Returns the string value of the field identified by fieldName.
| |
GetString(String, Int32) |
Returns the string value of the field identified by fieldName and index.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
HasLabel |
Returns true if the label indexed by key exists.
| |
InitFields |
Sets the value of each field of the Message to its default value.
| |
InitFields(Message) |
Sets the value of each field of the Message to the value of its
corresponding field in source.
| |
IsNull(String) |
Returns true if the value of the field identified by Name is
NULL.
| |
IsNull(Int32, Int32) |
Returns true if the substring that begins at the specified start
and extends to the character at index end-1 is null. A substring
is NULL if it's first character is the NO-DATA (0x1a).
| |
IsNull(String, Int32) |
Returns true if the value of the field identified by fieldName and index is NULL.
| |
RemoveLabel |
Removes the label indexed by key from the Message.
| |
RemoveLables |
Removes all the labels defined in the Message.
| |
Replace |
Replaces the characters in a substring of the message data with
characters in the specified string. The substring begins at the
specified start and extends to the character at index end-1. If needed,
the capacity of the data is extended so the entire substring can be
stored. If the string is null the substring is filled with
NO-DATA (0x1a). If the string is shorter than the substring, the
rest is filled with spaces.
| |
Serialize |
Returns a byte array with the serialization of the Message.
| |
Serialize(Boolean) |
Returns a byte array with the serialization of the Message with optional
type code.
| |
SetChar(String, Char) |
Changes the character value of the field identified by fieldName to the supplied value.
| |
SetChar(String, Int32, Char) |
Changes the character value of the field identified by fieldName and index to the supplied
value.
| |
SetData(String, String) |
Changes the string data of the field identified by fieldName to the supplied value.
| |
SetData(String, Int32, String) |
Changes the string data of the field identified by fieldName and index to the supplied
value.
| |
SetDate(String, NullableDateTime) |
Changes the date value of the field identified by fieldName to the supplied value.
| |
SetDate(String, Int32, NullableDateTime) |
Changes the date value of the field identified by fieldName and index to the supplied
value.
| |
SetDouble(String, Double) |
Changes the double value of the field identified by fieldName to the supplied value.
| |
SetDouble(String, Int32, Double) |
Changes the double value of the field identified by fieldName and index to the supplied
value.
| |
SetInteger(String, Int32) |
Changes the integer value of the field identified by fieldName to the supplied value.
| |
SetInteger(String, Int32, Int32) |
Changes the integer value of the field identified by fieldName and index to the supplied
value.
| |
SetLabel |
Sets the value of the label indexed by key.
| |
SetNull(String) |
Changes the the value of the field identified by fieldName to NULL.
| |
SetNull(String, Int32) |
Changes the the value of the field identified by fieldName and index to NULL.
| |
SetNumber(String, NullableDecimal) |
Changes the decimal value of the field identified by fieldName to the supplied value.
| |
SetNumber(String, Int32, NullableDecimal) |
Changes the decimal value of the field identified by fieldName and index to the supplied
value.
| |
SetString(String, String) |
Changes the string value of the field identified by fieldName to the supplied value.
| |
SetString(String, Int32, String) |
Changes the string value of the field identified by fieldName and index to the supplied
value.
| |
Substring |
Returns a new string that is a substring of this Message. The substring
begins at the specified start and extends to the character at index
end-1. Thus the length of the substring is end-start. If the first
character of the substring is NO-DATA (0x1a) it returns
null. The trailing space characters of the the substring are
removed (right trimmed).
| |
ToMessage |
Returns a Message constructed using the supplied object value.
| |
ToString |
Returns a string representation of the Message.
(Overrides ObjectToString.) | |
ToTagString |
Returns a string with the TAG representation of the data stored in this
Message.
| |
ToXml |
Returns the XML string representation of the Message.
| |
Unserialize(Byte, Int32, Int32) |
Unserialized the supplied byte array into a new Message.
| |
Unserialize(Byte, Int32, Int32, Boolean) |
Unserialized the supplied byte array into a new Message with optional
type code.
| |
VerifyLayout |
Returns true if the name of the Layout of the Message equals to
supplied layoutName.
|
A Message is represented by a fixed set of codes, a list of zero or more labels, and a sequence of zero or more characters that encode the message data.
The codes and labels of a Message are used to implement the details of the NetServer Communication Protocol. They specify, among other things, the type, sequence number and the destination of the data of a Message. A Message must be serialized in order to transfer it through a communication channel (socket). A serialized Message looks as follows:
+-+-----+-+-+----------------------------------------------------+ |V|12345|F|T|QOI<FS>KVVV...V<FS>KVVV...V<GS>SSIRMMPDDD......DDXXX| +-+-----+-+-+----------------------------------------------------+ Message Header (8 Bytes) V: Version Code (0x1E) L: Length (12345) F: Filler Count (X) T: Type Code Message Data (L-8 Bytes) Q: Sequence Number O: Operation Code I: Session ID (Links Only) <FS>: Field Separator (0x1C) K: Label Name V: Label Data Bytes <GS>: Group Separator (0x1D) S: Server Code I: Session ID Code R: Request/Reply Code M: Form Code P: Protection Code D: Data Bytes X: Filler Bytes (F)
The meaning of all these Message elements is explained in the different getter and setter methods provided by this class.