|pMe||(Object) Reference to the PmaCommGroup object where the event rises.|
|pEvent||(Object) Reference to object describing detailed information about the specific event.
pEvent.Items - (Array) The property is set to various objects depending on the ""onDataReceive" event" configurator setup:
- "A = call for all registered variables (in this object and also in other PmaData objects)".
Then each item of this array represents the "data extension ExtComm object" of the variable that is defined either in the PmaCommGroup object or in another PmaData object.
- "B = call only for variables defined in this object (obsolete)".
Then each item of this array represents the PmVar object that is defined in the PmaCommGroup object. Variables in other PmaData objects (having the ExtComm data extension) are not processed here.
In both cases if 10 data items are received simultaneously from the communication, then the event is triggered only once and there are these 10 items in the array.
pEvent.ErrorCount - (Long) The number of data items in the array pEvent.Items, that do not have the Quality property set to Good.
var aItems = pEvent.Items;
var nItems = aItems.GetSize(1);
Pm.Debug("COMM onDataReceive: Size=" + nItems + ", ErrorCount=" + pEvent.ErrorCount);
for (i = 0; i < nItems; i++)
Pm.Debug("Name=" + aItems.GetItem(i).Var.Name);
Pm.Debug("Value=" + aItems.GetItem(i).Var.Value);
Pm.Debug("Quality=" + aItems.GetItem(i).Var.Quality);
Pm.Debug("ItemId=" + aItems.GetItem(i).ItemId);