pascalSCADA OPM: Tag: Class TTag

Pascal SCADA OPM

Class TTag

Unit

Tag

Declaration

type TTag = class(TComponent)

Description

TTag

Hierarchy

  • TComponent
  • TTag

Overview

Fields

Protected FReadOKNotificationList:TTagNotificationList;
Protected FReadFaultNotificationList:TTagNotificationList;
Protected FWriteOKNotificationList:TTagNotificationList;
Protected FWriteFaultNotificationList:TTagNotificationList;
Protected FChangeNotificationList:TTagNotificationList;
Protected FTagRemovalNotificationList:TTagNotificationList;
Protected PAutoRead:Boolean;
Protected PAutoWrite:Boolean;
Protected PCommReadErrors:Cardinal;
Protected PCommReadOK:Cardinal;
Protected PCommWriteErrors:Cardinal;
Protected PCommWriteOk:Cardinal;
Protected PRack:Cardinal;
Protected PSlot:Cardinal;
Protected PStation:Cardinal;
Protected PFile_DB:Cardinal;
Protected PAddress:Cardinal;
Protected PSubElement:Cardinal;
Protected PSize:Cardinal;
Protected PPath:AnsiString;
Protected PReadFunction:Cardinal;
Protected PWriteFunction:Cardinal;
Protected PRetries:Cardinal;
Protected PUpdateTime:TRefreshTime;
Protected POnReadOk:TNotifyEvent;
Protected POnReadFail:TNotifyEvent;
Protected POnWriteOk:TNotifyEvent;
Protected POnWriteFail:TNotifyEvent;
Protected POnValueChangeFirst:TNotifyEvent;
Protected POnValueChangeLast:TNotifyEvent;
Protected POnAsyncValueChange:TASyncValueChangeNotify;
Protected POnUpdate:TNotifyEvent;
Protected PGUID:AnsiString;
Protected PFirstUpdate:Boolean;

Methods

Protected procedure AsyncNotifyChange(data:Pointer); virtual;
Protected function GetValueChangeData:Pointer; virtual;
Protected procedure ReleaseChangeData(data:Pointer); virtual;
Protected procedure NotifyReadOk;
Protected procedure NotifyReadFault;
Protected procedure NotifyUpdate;
Protected procedure NotifyWriteOk;
Protected procedure NotifyWriteFault;
Protected procedure NotifyChange;
Protected procedure IncCommReadOK(value:Cardinal);
Protected procedure IncCommReadFaults(value:Cardinal);
Protected procedure IncCommWriteOK(value:Cardinal);
Protected procedure IncCommWriteFaults(value:Cardinal);
Protected function IndexOf(List:TTagNotificationList; aHandler:TNotifyEvent):Integer;
Protected procedure AddToList(var List:TTagNotificationList; const aHandler:TNotifyEvent);
Protected procedure DeleteFromList(var List:TTagNotificationList; const aIndex:Integer);
Public procedure AddReadOkHandler(aCallBack:TNotifyEvent);
Public procedure AddReadFaultHandler(aCallBack:TNotifyEvent);
Public procedure AddWriteOkHandler(aCallBack:TNotifyEvent);
Public procedure AddWriteFaultHandler(aCallBack:TNotifyEvent);
Public procedure AddTagChangeHandler(aCallBack:TNotifyEvent);
Public procedure AddRemoveTagHandler(aCallBack:TNotifyEvent);
Public procedure RemoveAllHandlersFromObject(aObject:TObject);
Public function CountObjectsLinkedWithTagChangeHandler:Integer;
Public function GetObjectLinkedWithTagChangeHandler(Index:Integer):TObject;

Properties

Protected property AutoRead: Boolean read PAutoRead;
Protected property AutoWrite: Boolean read PAutoWrite;
Protected property CommReadErrors: Cardinal read PCommReadErrors;
Protected property CommReadsOK: Cardinal read PCommReadOK;
Protected property CommWriteErrors: Cardinal read PCommWriteErrors;
Protected property CommWritesOk: Cardinal read PCommWriteOk;
Protected property PLCRack: Cardinal read PRack;
Protected property PLCSlot: Cardinal read PSlot;
Protected property PLCStation: Cardinal read PStation;
Protected property MemFile_DB: Cardinal read PFile_DB;
Protected property MemAddress: Cardinal read PAddress;
Protected property MemSubElement: Cardinal read PSubElement;
Protected property MemReadFunction: Cardinal read PReadFunction;
Protected property MemWriteFunction: Cardinal read PWriteFunction;
Protected property Retries: Cardinal read PRetries;
Protected property RefreshTime: TRefreshTime read PUpdateTime stored false;
Protected property UpdateTime: TRefreshTime read PUpdateTime;
Protected property Size: Cardinal read PSize;
Protected property LongAddress: AnsiString read PPath;
Protected property OnReadOK: TNotifyEvent read POnReadOk write POnReadOk;
Protected property OnReadFail: TNotifyEvent read POnReadFail write POnReadFail;
Protected property OnWriteOk: TNotifyEvent read POnWriteOk write POnWriteOk;
Protected property OnWriteFail: TNotifyEvent read POnWriteFail write POnWriteFail;
Protected property OnValueChange: TNotifyEvent read POnValueChangeLast write POnValueChangeLast stored false;
Protected property OnValueChangeLast: TNotifyEvent read POnValueChangeLast write POnValueChangeLast;
Protected property OnValueChangeFirst: TNotifyEvent read POnValueChangeFirst write POnValueChangeFirst;
Protected property OnUpdate: TNotifyEvent read POnUpdate write POnUpdate;
Protected property OnAsyncValueChange: TASyncValueChangeNotify read POnAsyncValueChange write POnAsyncValueChange;

Description

Fields

Protected FReadOKNotificationList:TTagNotificationList;
 
Protected FReadFaultNotificationList:TTagNotificationList;
 
Protected FWriteOKNotificationList:TTagNotificationList;
 
Protected FWriteFaultNotificationList:TTagNotificationList;
 
Protected FChangeNotificationList:TTagNotificationList;
 
Protected FTagRemovalNotificationList:TTagNotificationList;
 
Protected PAutoRead:Boolean;

: Stores if the tag will be updated automatically.

Protected PAutoWrite:Boolean;

: Stores if the tag will write their value automatically.

Protected PCommReadErrors:Cardinal;

: Stores the counter of failed reads.

Protected PCommReadOK:Cardinal;

: Stores the counter of successful reads.

Protected PCommWriteErrors:Cardinal;

: Stores the counter of failed writes.

Protected PCommWriteOk:Cardinal;

: Stores the counter of successful writes.

Protected PRack:Cardinal;

: Stores the device Rack number of the tag.

Protected PSlot:Cardinal;

: Stores the device Slot number of the tag.

Protected PStation:Cardinal;

: Stores the device Station address of the tag.

Protected PFile_DB:Cardinal;

: Stores the File/DB number of the tag.

Protected PAddress:Cardinal;

: Stores the device memory address of the tag.

Protected PSubElement:Cardinal;

: Stores the device sub-memory address of the tag.

Protected PSize:Cardinal;

: Stores how many memories are being mapped.

Protected PPath:AnsiString;

: Stores the textual memory address of the tag.

Protected PReadFunction:Cardinal;

: Stores the function code to read the values of the tag.

Protected PWriteFunction:Cardinal;

: Stores the function code to write the values of the tag.

Protected PRetries:Cardinal;

: Stores the

Protected PUpdateTime:TRefreshTime;

: Stores the update time of the tag.

Protected POnReadOk:TNotifyEvent;

: Stores the event to be called when a read has success.

Protected POnReadFail:TNotifyEvent;

: Stores the event to be called when a read fail occurs.

Protected POnWriteOk:TNotifyEvent;

: Stores the event to be called when a value is written successfully on device.

Protected POnWriteFail:TNotifyEvent;

: Stores the event called when a write of tag value has a failed.

Protected POnValueChangeFirst:TNotifyEvent;

: Stores the event called when the tag value changes, BEFORE notify the dependents of the tag.

Protected POnValueChangeLast:TNotifyEvent;

: Stores the event called when the tag value changes, AFTER notify the dependents of the tag.

Protected POnAsyncValueChange:TASyncValueChangeNotify;

: Stores asynchronous event that notifies when the tag value changes.

Protected POnUpdate:TNotifyEvent;

: Stores the event called when the tag value was updated.

Protected PGUID:AnsiString;

: Stores the unique tag identification.

Protected PFirstUpdate:Boolean;

: First tag update? so fires

Methods

Protected procedure AsyncNotifyChange(data:Pointer); virtual;

: Call the assynchronous tag value change.

Protected function GetValueChangeData:Pointer; virtual;

: Return a copy of the Tag value for each assynchronous event calls.

Protected procedure ReleaseChangeData(data:Pointer); virtual;

: Release a copy of a tag value of one assynchronous event call.

Protected procedure NotifyReadOk;

: Notifies when a successful read occurs.

Protected procedure NotifyReadFault;

: Notifies when a read fault occurs.

Protected procedure NotifyUpdate;

: Notifies when the tag value was updated.

Protected procedure NotifyWriteOk;

: Notifies when a successful write occurs.

Protected procedure NotifyWriteFault;

: Notifies when a write fault occurs.

Protected procedure NotifyChange;

: Notifies when the tag value changes.

Protected procedure IncCommReadOK(value:Cardinal);

: Increments the counter of successful reads.

Protected procedure IncCommReadFaults(value:Cardinal);

: Increments the counter of faulted reads.

Protected procedure IncCommWriteOK(value:Cardinal);

: Increments the counter of successful writes.

Protected procedure IncCommWriteFaults(value:Cardinal);

: Increments the counter of faulted writes.

Protected function IndexOf(List:TTagNotificationList; aHandler:TNotifyEvent):Integer;
 
Protected procedure AddToList(var List:TTagNotificationList; const aHandler:TNotifyEvent);
 
Protected procedure DeleteFromList(var List:TTagNotificationList; const aIndex:Integer);
 
Public procedure AddReadOkHandler(aCallBack:TNotifyEvent);
 
Public procedure AddReadFaultHandler(aCallBack:TNotifyEvent);
 
Public procedure AddWriteOkHandler(aCallBack:TNotifyEvent);
 
Public procedure AddWriteFaultHandler(aCallBack:TNotifyEvent);
 
Public procedure AddTagChangeHandler(aCallBack:TNotifyEvent);
 
Public procedure AddRemoveTagHandler(aCallBack:TNotifyEvent);
 
Public procedure RemoveAllHandlersFromObject(aObject:TObject);
 
Public function CountObjectsLinkedWithTagChangeHandler:Integer;
 
Public function GetObjectLinkedWithTagChangeHandler(Index:Integer):TObject;
 

Properties

Protected property AutoRead: Boolean read PAutoRead;

: If True, the tag will be updated automaticaly.

Protected property AutoWrite: Boolean read PAutoWrite;

: If True, all values written on tags will be automaticaly written on the the memory of the linked device.

Protected property CommReadErrors: Cardinal read PCommReadErrors;

: Tell how many read errors occurred.

Protected property CommReadsOK: Cardinal read PCommReadOK;

: Tells the count of successful reads.

Protected property CommWriteErrors: Cardinal read PCommWriteErrors;

: Tell how many write errors occurred.

Protected property CommWritesOk: Cardinal read PCommWriteOk;

: Tells the count of successful writes.

Protected property PLCRack: Cardinal read PRack;

: Device Rack that contains the memory being mapped, if applicable.

See also
TISOTCPDriver
TISOTCPDriver.PLCRack
Protected property PLCSlot: Cardinal read PSlot;

: Device Slot that contains the memory being mapped, if applicable.

See also
TISOTCPDriver
TISOTCPDriver.PLCSlot
Protected property PLCStation: Cardinal read PStation;

: Device address that contains the memory being mapped, if applicable.

See also
TISOTCPDriver
TISOTCPDriver.PLCStation
Protected property MemFile_DB: Cardinal read PFile_DB;

: Device File/DB that contains the memory being mapped, if applicable.

Protected property MemAddress: Cardinal read PAddress;

: The address of the memory being mapped.

Protected property MemSubElement: Cardinal read PSubElement;

: The sub-memory address, if applicable.

Protected property MemReadFunction: Cardinal read PReadFunction;

: Protocol driver function that will read the memory being mapped.

Protected property MemWriteFunction: Cardinal read PWriteFunction;

: Protocol driver function that will write values in the memory being mapped.

Protected property Retries: Cardinal read PRetries;

: Number of retries of read/write of this memory.

Protected property RefreshTime: TRefreshTime read PUpdateTime stored false;

: Update time of the tag, in milliseconds.

Protected property UpdateTime: TRefreshTime read PUpdateTime;

: Update time of the tag, in milliseconds.

Protected property Size: Cardinal read PSize;

: Number of memories being mapped, if applicable.

Protected property LongAddress: AnsiString read PPath;

: Long address (text), if supported by the protocol driver.

Protected property OnReadOK: TNotifyEvent read POnReadOk write POnReadOk;

: Event called to notify when a successful read occurs.

Protected property OnReadFail: TNotifyEvent read POnReadFail write POnReadFail;

: Event called when a read fault occurs.

Protected property OnWriteOk: TNotifyEvent read POnWriteOk write POnWriteOk;

: Event called to notify when a write of the tag value has success.

Protected property OnWriteFail: TNotifyEvent read POnWriteFail write POnWriteFail;

: Event called when a write fault occurs.

Protected property OnValueChange: TNotifyEvent read POnValueChangeLast write POnValueChangeLast stored false;

: Event called when the tag value changes, AFTER notify all tag dependents.

Protected property OnValueChangeLast: TNotifyEvent read POnValueChangeLast write POnValueChangeLast;

: Event called when the tag value changes, AFTER notify all tag dependents.

Protected property OnValueChangeFirst: TNotifyEvent read POnValueChangeFirst write POnValueChangeFirst;

: Event called when the tag value changes, BEFORE notify all tag dependents.

Protected property OnUpdate: TNotifyEvent read POnUpdate write POnUpdate;

: Event called when the tag value was updated.

Protected property OnAsyncValueChange: TASyncValueChangeNotify read POnAsyncValueChange write POnAsyncValueChange;

: Asynchronous event called when the tag value changes.


Generated by PasDoc 0.14.0.