pascalSCADA OPM: CrossEvent: Class TCrossEvent

Pascal SCADA OPM

Class TCrossEvent

Unit

CrossEvent

Declaration

type TCrossEvent = class(TObject)

Description

: Class of thread synchronization by events multi-platform.

This class was created by compatibility and performance reasons between Windows and Unix environments. It emulates events to any OSes. The Unix code (Linux/FreeBSD) is based on events of the RTL of FreePascal project.

Hierarchy

  • TObject
  • TCrossEvent

Overview

Methods

Public constructor Create(AManualReset, InitialState : Boolean);
Public destructor Destroy; override;
Public function ResetEvent:Boolean;
Public function SetEvent:Boolean;
Public function WaitFor(Timeout : Cardinal) : TWaitResult;

Description

Methods

Public constructor Create(AManualReset, InitialState : Boolean);

: Create creates a new event object. Their parameters are the same of the class TEvent of FPC and Delphi.

Parameters
EventAttributes
PSecurityAttributes. Security attributes. Only Windows, other OSes must be suplied nil.
AManualReset
Boolean. If False, the event will reset automatically after the first thread wake up of the wait. If True is needed call ResetEvent to reset the event object.
InitialState
Boolean. Initial state of the event object. If true, the event object will be created signaled.
Name
String. Event object name. Only Windows.
See also
SetEvent
ResetEvent
WaitFor
Public destructor Destroy; override;

: Destroys the event object.

Public function ResetEvent:Boolean;

: Reset the event object. Set it to False.

See also
SetEvent
WaitFor
Public function SetEvent:Boolean;

: Set the event object. Set it to True.

See also
ResetEvent
WaitFor
Public function WaitFor(Timeout : Cardinal) : TWaitResult;

: Wait the event object to be signaled (set).

Parameters
Timeout
Cardinal. Timeout in milliseconds to wait the event be signaled. If is suplied $FFFFFFFF, waits infinitely or until be destroyed.
Returns

wrSignaled if the event was signaled before the timeout. wrTimeout if the event was not signaled before the timeout. wrAbandoned if the event object was destroyed. wrError if some error occurs trying to wait the event object.

See also
SetEvent
ResetEvent

Author


Generated by PasDoc 0.14.0.