to pop up its description (if any).


As shown above, this FB type can be derived from the Basic0T
or Basic1T
type by deleting the START
state and its associated transitions, thereby converting the REQ
and INIT
states to Transient EC States. The
interface, algorithms, and externally observable behaviors of
instances of this type are identical to those for either the Basic0T
or Basic1T
type.
As shown below, this conversion results in a reduction of 73% in the
number of lines of executable Event Handling Lines Of Code (EHLOC),
68% in the total EHLOC, and 26% in the size of the compiled
Java™ .class
file vs. the Basic0T
type.
FB type | Total EHLOC | Executable EHLOC |
.class file size
|
---|---|---|---|
Basic0T
|
25 | 15 | 2192 |
Basic1T
|
18 | 10 | 1986 |
Basic2T
|
8 | 4 | 1613 |
In the listing below, executable Event Handling Lines Of Code
(EHLOCs) are highlighted in
orange
and non-executable EHLOCs are highlighted in yellow.
and non-executable EHLOCs are highlighted in yellow.
public class Basic2T extends fb.rt.FBInstance { /** Initialization Confirm */ public final EventOutput INITO = new EventOutput(); /** Execution Confirmation */ public final EventOutput CNF = new EventOutput(); /** Initialization Request */ public final EventServer INIT = (e) -> { alg_INIT(); INITO.serviceEvent(this); } ; /** Normal Execution Request */ public final EventServer REQ = (e) -> { alg_REQ(); CNF.serviceEvent(this); } ; /** Input event qualifier */ public BOOL QI = new BOOL(); /** Output event qualifier */ public final BOOL QO = new BOOL(); /** VAR RESULT:WSTRING */ public final WSTRING RESULT = new WSTRING(); /** The default constructor. */ public Basic2T(){ super(); } /** ALGORITHM INIT IN ST*/ public void alg_INIT(){ QO.value = QI.value; RESULT.value = "INIT";} /** ALGORITHM REQ IN ST*/ public void alg_REQ(){ QO.value = QI.value; RESULT.value = "REQ";} }