Function EN Version 4.60

@RequestClass

System

Syntax

@RequestClass(TEXTCLASS1);
@RequestClass(TEXTCLASS1;FNFLAGS2);
@RequestClass(TEXTCLASS1;FNFLAGS2;FNTIMEOUT3);
@RequestClass(TEXTLISTCLASSES1);
@RequestClass(TEXTLISTCLASSES1;FNFLAGS2);
@RequestClass(TEXTLISTCLASSES1;FNFLAGS2;FNTIMEOUT3);

Description

Requests the class or classes with the name(s) TEXT/TEXTLIST TEXTCLASS1/TEXTLISTCLASSES1.

Return value:
@Error   ->   An error occurred.
TRUE   ->   All requested classes were obtained.
FALSE   ->   At least one of the requested classes had already been assigned to another task.

A task can request a class thas it has already successfully requested any number of times.
(A counter is incremented.)
If a class has already been successfully requested by one task,
thas class cannot be successfully requested by any other task.

A class should be released using @ReleaseClass as many times as it was requested with @RequestClass.
When a task is terminated, all classes requested by thas task are released.

FN FNFLAGS2:
0   Do not wait until the requested classes are free (default)
1   Wait until the requested classes are free (see FNTIMEOUT3)

FN FNTIMEOUT3:
If FN FNTIMEOUT3 in combination with FN FNFLAGS2=1 is specified,
returns @RequestClass after the specified number of milliseconds FN FNTIMEOUT3in any case.
If FN FNFLAGS2=1 without FN FNTIMEOUT3 specified waits @RequestClassuntil the requested classes are available.

Example: @RequestClass(TEXTCLASS1;FNFLAGS2);

TEXTCLASS1:="TestClass1";
FNFLAGS2:=1;
Ret:=@RequestClass(TEXTCLASS1;FNFLAGS2);
@LogReport(Ret);

The class with the name "TestClass1" is requested, and the function waits until the class is available.

Example: @RequestClass(TEXTCLASS1;FNFLAGS2;FNTIMEOUT3);

TEXTCLASS1:="TestClass1";
FNFLAGS2:=1;
FNTIMEOUT3:=1000;
Ret:=@RequestClass(TEXTCLASS1;FNFLAGS2;FNTIMEOUT3);
@LogReport(Ret);

The class with the name "TestClass1" is requested, and the function waits until the class is available
or one second has elapsed.
If the class with the name "TestClass1" could not be requested successfully, Ret FALSE assigned.

Example: @RequestClass(TEXTLISTCLASSES1;FNFLAGS2);

TEXTLISTCLASSES1:="TestClass1":"TestClass2";
FNFLAGS2:=1;
Ret:=@RequestClass(TEXTCLASS1;FNFLAGS2);
@LogReport(Ret);

The classes with the names "TestClass1":"TestClass2" are requested and the function waits
until both classes are available.

Note : This text was machine-translated and may contain inaccuracies.