_StringPool (FB)¶
FUNCTION_BLOCK FINAL _StringPool EXTENDS MBM.Disposable IMPLEMENTS IStringPool
Provides a pool of IString instances.
Use the
GetString
method to get a new instance.Example for a ``_StringPool instance with a capacity of 10 IString instances with a size of minimal 80 bytes each:
axwMemory : ARRAY[0..209] OF __XWORD;
fbStringPool : STR._StringPool := (udiStringSize:=80, pbyPool:=ADR(axwMemory), udiPoolSize:=SIZEOF(axwMemory));
stPoolConfig : STR.CONFIG := fbStringPool.GetPoolConfig(); // -> udiStringSize = 87 | udiCapacity = 10
Please take a look to the function blocks in the Library “Generic String Base”
You can use the
GSB.StringPool
function block, which performs the same task in a much more convenient way- InOut:
Scope
Name
Type
Initial
Input Const
udiStringSize
UDINT
16#FFFFFFFF
udiInitialCapacity
UDINT
5
pbyPool
POINTER TO BYTE
udiPoolSize
UDINT
usiExtensionFactor
USINT
Methods:
Structure: