pascalSCADA OPM: ValueProcessor: Class TScaleQueue

Pascal SCADA OPM

Class TScaleQueue

Unit

ValueProcessor

Declaration

type TScaleQueue = class(TCollection)

Description

: Implements a collection of scale processors.

Hierarchy

  • TCollection
  • TScaleQueue

Overview

Methods

Public function Add:TScaleQueueItem;
Public function SetInGetOut(Sender:TComponent; Input:Double):Double;
Public function SetOutGetIn(Sender:TComponent; Output:Double):Double;

Description

Methods

Public function Add:TScaleQueueItem;

: Adds a new item to collection.

Returns

The new item of the collection.

Public function SetInGetOut(Sender:TComponent; Input:Double):Double;

: Process a raw value (Input) to a value in engineering scale, processed by each scale processors of the collection.

To do this, this method passes the Input parameter to TScalePIPEItem.SetInGetOut of the first item of the collection, takes the result and passes it again as Input of TScalePIPEItem.SetInGetOut of the next item of the collection, until reach the end of the collection.

So, the first item of the collection is the first that will be called when the value is comming from device and going to User AND so as the last item of the collection o is the first to be called when the value is comming from the user and going to device.

Parameters
Sender
TComponent: Object that has requested the value transformation.
Input
Double: Value to be transformed to a value in engineering scale.
Returns

Returns the value processed by all items of the collection. If the collection is empty or all items of the collection aren't set correctly (a value processor isn't set), returns the value given in Input parameter.

See also
TScalePIPEItem.SetInGetOut
Public function SetOutGetIn(Sender:TComponent; Output:Double):Double;

: Process a raw value in engineering scale to a raw value, processed by each scale processors of the collection.

Para fazer isso, esse método passa o parâmetro de entrada para TScalePIPEItem.SetInGetOut do último item da coleção, leva o resultado e passa-lo novamente como entrada de TScalePIPEItem.SetInGetOut do item que precede o item atual da coleção, até chegar ao início da coleção.

So, the last item of the collection is the first that will be called when the value is comming from the user and going to device AND so as the first item of the collection o is the last to be called when the value is comming from the device and going to user.

Parameters
Sender
TComponent: Object that has requested the value transformation.
Output
Double: Value in engineering scale to be transformed to a raw value.
Returns

Returns the value processed by all items of the collection. If the collection is empty or all items of the collection aren't set correctly (a value processor isn't set), returns the value given in Outpu parameter.

See also
TScalePIPEItem.SetInGetOut

Generated by PasDoc 0.14.0.