pascalSCADA OPM: commtypes

Pascal SCADA OPM

Unit commtypes

Description

Unit with types/definitions commonly used on communication ports.

:

Overview

Classes, Interfaces, Objects and Records

Name Description
Record TIOPacket  
Interface IPortDriverEventNotification  

Functions and Procedures

function ConcatenateBYTES(const a,b:BYTES):BYTES;

Types

BYTES = array of Byte;
TIOCommand = (...);
TIOResult = (...);
PIOPacket = ˆTIOPacket;
TDriverCallBack = procedure(var Result:TIOPacket) of object;
TCommPortErrorEvent = procedure(Error:TIOResult) of object;
PCommPortErrorEvent = ˆTCommPortErrorEvent;
TCommPortGenericError = procedure of object;
PCommPortGenericError = ˆTCommPortGenericError;
PNotifyEvent = ˆTNotifyEvent;
TPortEvents = (...);
TNotifyThisEvents = set of TPortEvents;
IPortDriverEventNotificationArray = array of IPortDriverEventNotification;

Constants

PSM_COMMERROR = 4;
PSM_PORT_EVENT = 5;

Description

Functions and Procedures

function ConcatenateBYTES(const a,b:BYTES):BYTES;

: Concatenate two bytes buffers.

See also
BYTES

Types

BYTES = array of Byte;

: Sequence of bytes.

See also
TCommPortDriver
The base class of an communication port driver.
TIOPacket
TIOCommand = (...);

: TIOCommand define the commands and their sequence of execution.

See also
TCommPortDriver
The base class of an communication port driver.
TCommPortDriver.IOCommandASync
TCommPortDriver.IOCommandSync
TIOPacket
Values
  • iocNone: Does nothing;
  • iocRead: Executes a read;
  • iocReadWrite: Executes a read command and after this a write command;
  • iocWrite: Executes a write command;
  • iocWriteRead: Executes a write command and after this a read command;
TIOResult = (...);

: TIOResult define the results of an I/O request.

See also
TIOPacket
Values
  • iorOK: The request was done with successfull.
  • iorTimeOut: The request has a timeout.
  • iorNotReady: The communication port isn't ready yet. Example: communication port closed.
  • iorNone: The command was not processed;
  • iorPortError: A fault occurred while processing the I/O command.
PIOPacket = ˆTIOPacket;

: Pointer to a TIOPacket record.

See also
TIOPacket
TDriverCallBack = procedure(var Result:TIOPacket) of object;

: Defines the callback procedure to return the results of a I/O command done by TCommPortDriver.IOCommandSync. The result is returned by the Result variable.

See also
TCommPortDriver
The base class of an communication port driver.
TIOPacket
TCommPortDriver.IOCommandASync
TCommPortDriver.IOCommandSync
TCommPortErrorEvent = procedure(Error:TIOResult) of object;

: Defines a method called when a communication error occurs.

PCommPortErrorEvent = ˆTCommPortErrorEvent;

: Points to a method used to report communications errors.

TCommPortGenericError = procedure of object;

: Defines the types of events of communications port opens, closed and disconnected.

PCommPortGenericError = ˆTCommPortGenericError;

: Points to a method used to report communications errors.

PNotifyEvent = ˆTNotifyEvent;

: Points to a notification method.

TPortEvents = (...);

: Defines the notifications that the protocol driver can register.

See also
IPortDriverEventNotification
Values
  • ntePortOpen: Notifies the protocol driver when the communication port was open.
  • ntePortClosed
  • ntePortDisconnected: Notifies the protocol driver when the communication port was disconnected.
TNotifyThisEvents = set of TPortEvents;

: Defines the set of notifications that a protocol driver can register.

See also
TPortEvents
IPortDriverEventNotificationArray = array of IPortDriverEventNotification;
 

Constants

PSM_COMMERROR = 4;

: Communication error messsage (read or write);

PSM_PORT_EVENT = 5;

: Message of communication port open, closed or disconnected.

Author


Generated by PasDoc 0.14.0.