pascalSCADA OPM: MessageSpool: Class TMessageSpool

Pascal SCADA OPM

Class TMessageSpool

Unit

MessageSpool

Declaration

type TMessageSpool = class(TObject)

Description

Class of a multi-platform message queue.

:

Built to allow threads exchange messages independently of operating system.

The implementation of the message queue is similar of the message system of the Windows operating System, but include some improvements, like messages with priority (messages that must be processed before others).

Hierarchy

  • TObject
  • TMessageSpool

Overview

Methods

Public constructor Create;
Public destructor Destroy; override;
Public function PeekMessage(out Msg:TMSMsg; uFilterMinMsg, uFilterMaxMsg:Cardinal; Remove:Boolean):Boolean;
Public procedure PostMessage(MsgID:Cardinal; wParam, lParam:Pointer; Priority:Boolean);

Description

Methods

Public constructor Create;

: Creates the message queue.

Public destructor Destroy; override;

: Destroys the message queue.

Public function PeekMessage(out Msg:TMSMsg; uFilterMinMsg, uFilterMaxMsg:Cardinal; Remove:Boolean):Boolean;

: Seeks a message, removing it or not of the queue. To select a message or not, their MsgId must be greater or equal than uFilterMinMsg and less or equal than uFilterMaxMsg. To select the first message of the queue, pass 0 (zero) to the parameters uFilterMinMsg and uFilterMaxMsg.

If uFilterMinMsg and uFilterMaxMsg are equals and greater than 0 (zero), PeekMessage will seek all messages which the MsgID is equal than this parameters.

Parameters
Msg
TMsg. Variable used to return the message.
uFilterMinMsg
Cardinal. Select only the messages where the MsgID is greater or equal than this parameter.
uFilterMaxMsg
Cardinal. Select only the messages where the MsgID is less or equal than this parameter.
Remove
Boolean. If True, the message encountered will be removed from the queue.
Returns

Return True if found some message.

See also
PostMessage
Public procedure PostMessage(MsgID:Cardinal; wParam, lParam:Pointer; Priority:Boolean);

: Inserts a message on queue.

Parameters
MsgID
Cardinal. Message identification.
wParam
Pointer Data pointer 1.
lParam
Pointer Data Pointer 2.
Priority
Boolean. If True if the message will be inserted at the beginning of the queue (With priority).
See also
PeekMessage

Author


Generated by PasDoc 0.14.0.