1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | //Try and get a Property from the existing pool PropertySetValuesPool.ItterateNext( itfElement => _COL_Element, HasNext => ); IF _COL_Element <> 0 THEN IF __QUERYPOINTER( _COL_Element, pObject ) THEN ClaimNextFreePropertyValue REF= pObject^; ClaimNextFreePropertyValue.InitializeStructure(); ELSE eError := ERROR.PayloadNotACollectionOfStorage; END_IF ELSE //No free object? No worries, we will just create one //Better add it to the Pool and "itterate" it, so future generations of payload can use it METHOD ClaimNextFreePropertyValue : REFERENCE TO FB_PayloadPropertyValue; VAR_OUTPUT eError : ERROR; END_VAR VAR pObject : POINTER TO FB_PayloadPropertyValue; initData : DummyData; |