Auxiliary unit for the dbugintf unit.

dbugmsg is an auxialiary unit used in the dbugintf unit. It defines the message protocol used between the debug unit and the debug server.

TStream implementation System unique name DebugServerID is a string which is used when creating the message protocol, it is used when identifying the server in the (platform dependent) client-server protocol. Stop message lctStop is sent by the client to a server when it disconnects. Informational message lctInformation is the identification of informational messages. Warning message lctWarning is the identification of warning messages. Error message lctError is the identification of error messages. Identification message lctIdentify is sent by the client to a server when it first connects. It's the first message, and contains the name of client application. Structure describing a message TDebugMessage is a record that describes the message passed from the client to the server. It should not be passed directly in shared memory, as the string containing the message is allocated on the heap. Instead, the and can be used to read or write the message from/to a stream. Constant, identifying the type of message Time when the message was generated String containing the message text. Read a message from stream

ReadDebugMessageFromStream reads a record (Msg) from the stream AStream.

The record is not read in a byte-ordering safe way, i.e. it cannot be exchanged between little- and big-endian systems.

If the stream contains not enough bytes or is malformed, then an exception may be raised.
Stream from which record is read Record to be read from stream Write a message to stream

WriteDebugMessageFromStream writes a record (Msg) to the stream AStream.

The record is not written in a byte-ordering safe way, i.e. it cannot be exchanged between little- and big-endian systems.

A stream write error may occur if the stream cannot be written to.
Stream to write message to Message record to be written Return the name of the debug message DebugMessageName returns the name of the message type. It can be used to examine the MsgType field of a record, and if msgType contains a known type, it returns a string describing this type. If MsgType contains an unknown type, 'Unknown' is returned. String describing the message type Message type