Object: Message

A Message object. Created by calling function CreateMessage()

Properties

The properties of a message object are defined by the user.

Functions

Dispose

Called to release system allocated resources, this must be called when the object is no longer required.

void Dispose()

Example

var myHeader = CreateHeader(); // Create header structure
var myBody = CreateMessage("TraceRequest"); // Create message structure
myHeader.MessageID = 75;
myHeader.DeviceID = 5;
myHeader.LocationID = 2;
myHeader.DeviceRef = 0;

myBody.Barcode = "123456789000"; // Fill the members of the structure
myBody.ActionID = 1;
myBody.OperatorID = 0;
myBody.reserved = 0;
SendMessage(myBody, myHeader); // Send message

myBody.Dispose(); // Release body memory
myHeader.Dispose(); // Release header memory