********************************************************************
* NOTE: This file is generated automatically from the event
* definition file Wheeler.evt.
********************************************************************
MODULE WheelerAlgClass ;
<*NOWARN*> IMPORT TextConv, Rd, ZeusClass, Fmt, Algorithm, Wr;
<*NOWARN*> IMPORT ZeusPanel, FormsVBT, VBT, Text, MiscFmt;
<*NOWARN*> IMPORT ZeusUtil;
<* PRAGMA LL *>
Fix any FormsVBT errors; don't handle exceptions for them.
<* FATAL FormsVBT.Error, FormsVBT.Unimplemented *>
REVEAL
T = Public BRANDED OBJECT
OVERRIDES
<* LL = VBT.mu *>
init := WheelerDefaultInit;
snapshot := WheelerDefaultSnapshot;
restore := WheelerDefaultRestore;
updateEventCounts := WheelerDefaultUpdateCts;
END;
PROCEDURE WheelerDefaultInit (v: T): Algorithm.T =
<* LL = VBT.mu *>
PROCEDURE Attach (id: TEXT; proc: FormsVBT.Proc) =
BEGIN
FormsVBT.AttachProc(v.eventData, id, proc, v);
END Attach;
BEGIN
v.eventData := ZeusPanel.NewForm("WheelerEventData.fv");
Attach("stopatCodeEvents", WheelerDoIt);
Attach("waitatCodeEvents", WheelerDoIt);
Attach("eventCounts", WheelerRefreshCts);
Attach("stopAtStartPermute", WheelerDoIt);
Attach("waitAtStartPermute", WheelerDoIt);
Attach("stopAtNextRotation", WheelerDoIt);
Attach("waitAtNextRotation", WheelerDoIt);
Attach("stopAtRotationsSorted", WheelerDoIt);
Attach("waitAtRotationsSorted", WheelerDoIt);
Attach("stopAtPermuteDone", WheelerDoIt);
Attach("waitAtPermuteDone", WheelerDoIt);
Attach("stopAtStartEncode", WheelerDoIt);
Attach("waitAtStartEncode", WheelerDoIt);
Attach("stopAtEncodeNextChar", WheelerDoIt);
Attach("waitAtEncodeNextChar", WheelerDoIt);
Attach("stopAtEncodeDistinctCount", WheelerDoIt);
Attach("waitAtEncodeDistinctCount", WheelerDoIt);
Attach("stopAtEncodeFoundCode", WheelerDoIt);
Attach("waitAtEncodeFoundCode", WheelerDoIt);
Attach("stopAtEncodeDone", WheelerDoIt);
Attach("waitAtEncodeDone", WheelerDoIt);
Attach("stopAtInitDecode", WheelerDoIt);
Attach("waitAtInitDecode", WheelerDoIt);
Attach("stopAtStartDecode", WheelerDoIt);
Attach("waitAtStartDecode", WheelerDoIt);
Attach("stopAtDecodeNextCode", WheelerDoIt);
Attach("waitAtDecodeNextCode", WheelerDoIt);
Attach("stopAtDecodeDistinctCount", WheelerDoIt);
Attach("waitAtDecodeDistinctCount", WheelerDoIt);
Attach("stopAtDecodeFoundChar", WheelerDoIt);
Attach("waitAtDecodeFoundChar", WheelerDoIt);
Attach("stopAtDecodeDone", WheelerDoIt);
Attach("waitAtDecodeDone", WheelerDoIt);
Attach("stopAtStartReconstruct", WheelerDoIt);
Attach("waitAtStartReconstruct", WheelerDoIt);
Attach("stopAtFirstChars", WheelerDoIt);
Attach("waitAtFirstChars", WheelerDoIt);
Attach("stopAtConsiderChar", WheelerDoIt);
Attach("waitAtConsiderChar", WheelerDoIt);
Attach("stopAtEqualChars", WheelerDoIt);
Attach("waitAtEqualChars", WheelerDoIt);
Attach("stopAtFinishCharRun", WheelerDoIt);
Attach("waitAtFinishCharRun", WheelerDoIt);
Attach("stopAtStartResult", WheelerDoIt);
Attach("waitAtStartResult", WheelerDoIt);
Attach("stopAtResultNextChar", WheelerDoIt);
Attach("waitAtResultNextChar", WheelerDoIt);
Attach("stopAtEndResult", WheelerDoIt);
Attach("waitAtEndResult", WheelerDoIt);
Attach("stopAtReveal", WheelerDoIt);
Attach("waitAtReveal", WheelerDoIt);
FromFV (v.eventData, v); (* Get FV and internal data in sync *)
RETURN Algorithm.T.init(v);
END WheelerDefaultInit;
PROCEDURE WheelerDoIt ( fv : FormsVBT.T;
e : TEXT;
arg: REFANY;
<*UNUSED*> t : VBT.TimeStamp) =
<* LL = VBT.mu *>
BEGIN
IF Text.Equal(e, "stopatCodeEvents") THEN
NARROW(arg, T).stopatCodeEvents :=
FormsVBT.GetBoolean(fv, "stopatCodeEvents");
END;
IF Text.Equal(e, "waitatCodeEvents") THEN
NARROW(arg, T).waitatCodeEvents :=
FormsVBT.GetInteger(fv, "waitatCodeEvents");
END;
IF Text.Equal(e, "stopAtStartPermute") THEN
NARROW(arg, T).eventDataRec.stopAtStartPermute :=
FormsVBT.GetBoolean(fv, "stopAtStartPermute");
END;
IF Text.Equal(e, "waitAtStartPermute") THEN
NARROW(arg, T).eventDataRec.waitAtStartPermute :=
FormsVBT.GetInteger(fv, "waitAtStartPermute");
END;
IF Text.Equal(e, "stopAtNextRotation") THEN
NARROW(arg, T).eventDataRec.stopAtNextRotation :=
FormsVBT.GetBoolean(fv, "stopAtNextRotation");
END;
IF Text.Equal(e, "waitAtNextRotation") THEN
NARROW(arg, T).eventDataRec.waitAtNextRotation :=
FormsVBT.GetInteger(fv, "waitAtNextRotation");
END;
IF Text.Equal(e, "stopAtRotationsSorted") THEN
NARROW(arg, T).eventDataRec.stopAtRotationsSorted :=
FormsVBT.GetBoolean(fv, "stopAtRotationsSorted");
END;
IF Text.Equal(e, "waitAtRotationsSorted") THEN
NARROW(arg, T).eventDataRec.waitAtRotationsSorted :=
FormsVBT.GetInteger(fv, "waitAtRotationsSorted");
END;
IF Text.Equal(e, "stopAtPermuteDone") THEN
NARROW(arg, T).eventDataRec.stopAtPermuteDone :=
FormsVBT.GetBoolean(fv, "stopAtPermuteDone");
END;
IF Text.Equal(e, "waitAtPermuteDone") THEN
NARROW(arg, T).eventDataRec.waitAtPermuteDone :=
FormsVBT.GetInteger(fv, "waitAtPermuteDone");
END;
IF Text.Equal(e, "stopAtStartEncode") THEN
NARROW(arg, T).eventDataRec.stopAtStartEncode :=
FormsVBT.GetBoolean(fv, "stopAtStartEncode");
END;
IF Text.Equal(e, "waitAtStartEncode") THEN
NARROW(arg, T).eventDataRec.waitAtStartEncode :=
FormsVBT.GetInteger(fv, "waitAtStartEncode");
END;
IF Text.Equal(e, "stopAtEncodeNextChar") THEN
NARROW(arg, T).eventDataRec.stopAtEncodeNextChar :=
FormsVBT.GetBoolean(fv, "stopAtEncodeNextChar");
END;
IF Text.Equal(e, "waitAtEncodeNextChar") THEN
NARROW(arg, T).eventDataRec.waitAtEncodeNextChar :=
FormsVBT.GetInteger(fv, "waitAtEncodeNextChar");
END;
IF Text.Equal(e, "stopAtEncodeDistinctCount") THEN
NARROW(arg, T).eventDataRec.stopAtEncodeDistinctCount :=
FormsVBT.GetBoolean(fv, "stopAtEncodeDistinctCount");
END;
IF Text.Equal(e, "waitAtEncodeDistinctCount") THEN
NARROW(arg, T).eventDataRec.waitAtEncodeDistinctCount :=
FormsVBT.GetInteger(fv, "waitAtEncodeDistinctCount");
END;
IF Text.Equal(e, "stopAtEncodeFoundCode") THEN
NARROW(arg, T).eventDataRec.stopAtEncodeFoundCode :=
FormsVBT.GetBoolean(fv, "stopAtEncodeFoundCode");
END;
IF Text.Equal(e, "waitAtEncodeFoundCode") THEN
NARROW(arg, T).eventDataRec.waitAtEncodeFoundCode :=
FormsVBT.GetInteger(fv, "waitAtEncodeFoundCode");
END;
IF Text.Equal(e, "stopAtEncodeDone") THEN
NARROW(arg, T).eventDataRec.stopAtEncodeDone :=
FormsVBT.GetBoolean(fv, "stopAtEncodeDone");
END;
IF Text.Equal(e, "waitAtEncodeDone") THEN
NARROW(arg, T).eventDataRec.waitAtEncodeDone :=
FormsVBT.GetInteger(fv, "waitAtEncodeDone");
END;
IF Text.Equal(e, "stopAtInitDecode") THEN
NARROW(arg, T).eventDataRec.stopAtInitDecode :=
FormsVBT.GetBoolean(fv, "stopAtInitDecode");
END;
IF Text.Equal(e, "waitAtInitDecode") THEN
NARROW(arg, T).eventDataRec.waitAtInitDecode :=
FormsVBT.GetInteger(fv, "waitAtInitDecode");
END;
IF Text.Equal(e, "stopAtStartDecode") THEN
NARROW(arg, T).eventDataRec.stopAtStartDecode :=
FormsVBT.GetBoolean(fv, "stopAtStartDecode");
END;
IF Text.Equal(e, "waitAtStartDecode") THEN
NARROW(arg, T).eventDataRec.waitAtStartDecode :=
FormsVBT.GetInteger(fv, "waitAtStartDecode");
END;
IF Text.Equal(e, "stopAtDecodeNextCode") THEN
NARROW(arg, T).eventDataRec.stopAtDecodeNextCode :=
FormsVBT.GetBoolean(fv, "stopAtDecodeNextCode");
END;
IF Text.Equal(e, "waitAtDecodeNextCode") THEN
NARROW(arg, T).eventDataRec.waitAtDecodeNextCode :=
FormsVBT.GetInteger(fv, "waitAtDecodeNextCode");
END;
IF Text.Equal(e, "stopAtDecodeDistinctCount") THEN
NARROW(arg, T).eventDataRec.stopAtDecodeDistinctCount :=
FormsVBT.GetBoolean(fv, "stopAtDecodeDistinctCount");
END;
IF Text.Equal(e, "waitAtDecodeDistinctCount") THEN
NARROW(arg, T).eventDataRec.waitAtDecodeDistinctCount :=
FormsVBT.GetInteger(fv, "waitAtDecodeDistinctCount");
END;
IF Text.Equal(e, "stopAtDecodeFoundChar") THEN
NARROW(arg, T).eventDataRec.stopAtDecodeFoundChar :=
FormsVBT.GetBoolean(fv, "stopAtDecodeFoundChar");
END;
IF Text.Equal(e, "waitAtDecodeFoundChar") THEN
NARROW(arg, T).eventDataRec.waitAtDecodeFoundChar :=
FormsVBT.GetInteger(fv, "waitAtDecodeFoundChar");
END;
IF Text.Equal(e, "stopAtDecodeDone") THEN
NARROW(arg, T).eventDataRec.stopAtDecodeDone :=
FormsVBT.GetBoolean(fv, "stopAtDecodeDone");
END;
IF Text.Equal(e, "waitAtDecodeDone") THEN
NARROW(arg, T).eventDataRec.waitAtDecodeDone :=
FormsVBT.GetInteger(fv, "waitAtDecodeDone");
END;
IF Text.Equal(e, "stopAtStartReconstruct") THEN
NARROW(arg, T).eventDataRec.stopAtStartReconstruct :=
FormsVBT.GetBoolean(fv, "stopAtStartReconstruct");
END;
IF Text.Equal(e, "waitAtStartReconstruct") THEN
NARROW(arg, T).eventDataRec.waitAtStartReconstruct :=
FormsVBT.GetInteger(fv, "waitAtStartReconstruct");
END;
IF Text.Equal(e, "stopAtFirstChars") THEN
NARROW(arg, T).eventDataRec.stopAtFirstChars :=
FormsVBT.GetBoolean(fv, "stopAtFirstChars");
END;
IF Text.Equal(e, "waitAtFirstChars") THEN
NARROW(arg, T).eventDataRec.waitAtFirstChars :=
FormsVBT.GetInteger(fv, "waitAtFirstChars");
END;
IF Text.Equal(e, "stopAtConsiderChar") THEN
NARROW(arg, T).eventDataRec.stopAtConsiderChar :=
FormsVBT.GetBoolean(fv, "stopAtConsiderChar");
END;
IF Text.Equal(e, "waitAtConsiderChar") THEN
NARROW(arg, T).eventDataRec.waitAtConsiderChar :=
FormsVBT.GetInteger(fv, "waitAtConsiderChar");
END;
IF Text.Equal(e, "stopAtEqualChars") THEN
NARROW(arg, T).eventDataRec.stopAtEqualChars :=
FormsVBT.GetBoolean(fv, "stopAtEqualChars");
END;
IF Text.Equal(e, "waitAtEqualChars") THEN
NARROW(arg, T).eventDataRec.waitAtEqualChars :=
FormsVBT.GetInteger(fv, "waitAtEqualChars");
END;
IF Text.Equal(e, "stopAtFinishCharRun") THEN
NARROW(arg, T).eventDataRec.stopAtFinishCharRun :=
FormsVBT.GetBoolean(fv, "stopAtFinishCharRun");
END;
IF Text.Equal(e, "waitAtFinishCharRun") THEN
NARROW(arg, T).eventDataRec.waitAtFinishCharRun :=
FormsVBT.GetInteger(fv, "waitAtFinishCharRun");
END;
IF Text.Equal(e, "stopAtStartResult") THEN
NARROW(arg, T).eventDataRec.stopAtStartResult :=
FormsVBT.GetBoolean(fv, "stopAtStartResult");
END;
IF Text.Equal(e, "waitAtStartResult") THEN
NARROW(arg, T).eventDataRec.waitAtStartResult :=
FormsVBT.GetInteger(fv, "waitAtStartResult");
END;
IF Text.Equal(e, "stopAtResultNextChar") THEN
NARROW(arg, T).eventDataRec.stopAtResultNextChar :=
FormsVBT.GetBoolean(fv, "stopAtResultNextChar");
END;
IF Text.Equal(e, "waitAtResultNextChar") THEN
NARROW(arg, T).eventDataRec.waitAtResultNextChar :=
FormsVBT.GetInteger(fv, "waitAtResultNextChar");
END;
IF Text.Equal(e, "stopAtEndResult") THEN
NARROW(arg, T).eventDataRec.stopAtEndResult :=
FormsVBT.GetBoolean(fv, "stopAtEndResult");
END;
IF Text.Equal(e, "waitAtEndResult") THEN
NARROW(arg, T).eventDataRec.waitAtEndResult :=
FormsVBT.GetInteger(fv, "waitAtEndResult");
END;
IF Text.Equal(e, "stopAtReveal") THEN
NARROW(arg, T).eventDataRec.stopAtReveal :=
FormsVBT.GetBoolean(fv, "stopAtReveal");
END;
IF Text.Equal(e, "waitAtReveal") THEN
NARROW(arg, T).eventDataRec.waitAtReveal :=
FormsVBT.GetInteger(fv, "waitAtReveal");
END;
END WheelerDoIt;
PROCEDURE WheelerRefreshCts (
<*UNUSED*> fv : FormsVBT.T;
<*UNUSED*> e : TEXT;
arg : REFANY;
<*UNUSED*> t : VBT.TimeStamp) =
<* LL = VBT.mu *>
BEGIN
NARROW(arg, T).updateEventCounts(FALSE);
END WheelerRefreshCts;
PROCEDURE FromFV (fv : FormsVBT.T; alg: T) =
<* LL = VBT.mu *>
BEGIN
alg.stopatCodeEvents :=
FormsVBT.GetBoolean(fv, "stopatCodeEvents");
alg.waitatCodeEvents :=
FormsVBT.GetInteger(fv, "waitatCodeEvents");
alg.eventDataRec.stopAtStartPermute :=
FormsVBT.GetBoolean(fv, "stopAtStartPermute");
alg.eventDataRec.waitAtStartPermute :=
FormsVBT.GetInteger(fv, "waitAtStartPermute");
alg.eventDataRec.stopAtNextRotation :=
FormsVBT.GetBoolean(fv, "stopAtNextRotation");
alg.eventDataRec.waitAtNextRotation :=
FormsVBT.GetInteger(fv, "waitAtNextRotation");
alg.eventDataRec.stopAtRotationsSorted :=
FormsVBT.GetBoolean(fv, "stopAtRotationsSorted");
alg.eventDataRec.waitAtRotationsSorted :=
FormsVBT.GetInteger(fv, "waitAtRotationsSorted");
alg.eventDataRec.stopAtPermuteDone :=
FormsVBT.GetBoolean(fv, "stopAtPermuteDone");
alg.eventDataRec.waitAtPermuteDone :=
FormsVBT.GetInteger(fv, "waitAtPermuteDone");
alg.eventDataRec.stopAtStartEncode :=
FormsVBT.GetBoolean(fv, "stopAtStartEncode");
alg.eventDataRec.waitAtStartEncode :=
FormsVBT.GetInteger(fv, "waitAtStartEncode");
alg.eventDataRec.stopAtEncodeNextChar :=
FormsVBT.GetBoolean(fv, "stopAtEncodeNextChar");
alg.eventDataRec.waitAtEncodeNextChar :=
FormsVBT.GetInteger(fv, "waitAtEncodeNextChar");
alg.eventDataRec.stopAtEncodeDistinctCount :=
FormsVBT.GetBoolean(fv, "stopAtEncodeDistinctCount");
alg.eventDataRec.waitAtEncodeDistinctCount :=
FormsVBT.GetInteger(fv, "waitAtEncodeDistinctCount");
alg.eventDataRec.stopAtEncodeFoundCode :=
FormsVBT.GetBoolean(fv, "stopAtEncodeFoundCode");
alg.eventDataRec.waitAtEncodeFoundCode :=
FormsVBT.GetInteger(fv, "waitAtEncodeFoundCode");
alg.eventDataRec.stopAtEncodeDone :=
FormsVBT.GetBoolean(fv, "stopAtEncodeDone");
alg.eventDataRec.waitAtEncodeDone :=
FormsVBT.GetInteger(fv, "waitAtEncodeDone");
alg.eventDataRec.stopAtInitDecode :=
FormsVBT.GetBoolean(fv, "stopAtInitDecode");
alg.eventDataRec.waitAtInitDecode :=
FormsVBT.GetInteger(fv, "waitAtInitDecode");
alg.eventDataRec.stopAtStartDecode :=
FormsVBT.GetBoolean(fv, "stopAtStartDecode");
alg.eventDataRec.waitAtStartDecode :=
FormsVBT.GetInteger(fv, "waitAtStartDecode");
alg.eventDataRec.stopAtDecodeNextCode :=
FormsVBT.GetBoolean(fv, "stopAtDecodeNextCode");
alg.eventDataRec.waitAtDecodeNextCode :=
FormsVBT.GetInteger(fv, "waitAtDecodeNextCode");
alg.eventDataRec.stopAtDecodeDistinctCount :=
FormsVBT.GetBoolean(fv, "stopAtDecodeDistinctCount");
alg.eventDataRec.waitAtDecodeDistinctCount :=
FormsVBT.GetInteger(fv, "waitAtDecodeDistinctCount");
alg.eventDataRec.stopAtDecodeFoundChar :=
FormsVBT.GetBoolean(fv, "stopAtDecodeFoundChar");
alg.eventDataRec.waitAtDecodeFoundChar :=
FormsVBT.GetInteger(fv, "waitAtDecodeFoundChar");
alg.eventDataRec.stopAtDecodeDone :=
FormsVBT.GetBoolean(fv, "stopAtDecodeDone");
alg.eventDataRec.waitAtDecodeDone :=
FormsVBT.GetInteger(fv, "waitAtDecodeDone");
alg.eventDataRec.stopAtStartReconstruct :=
FormsVBT.GetBoolean(fv, "stopAtStartReconstruct");
alg.eventDataRec.waitAtStartReconstruct :=
FormsVBT.GetInteger(fv, "waitAtStartReconstruct");
alg.eventDataRec.stopAtFirstChars :=
FormsVBT.GetBoolean(fv, "stopAtFirstChars");
alg.eventDataRec.waitAtFirstChars :=
FormsVBT.GetInteger(fv, "waitAtFirstChars");
alg.eventDataRec.stopAtConsiderChar :=
FormsVBT.GetBoolean(fv, "stopAtConsiderChar");
alg.eventDataRec.waitAtConsiderChar :=
FormsVBT.GetInteger(fv, "waitAtConsiderChar");
alg.eventDataRec.stopAtEqualChars :=
FormsVBT.GetBoolean(fv, "stopAtEqualChars");
alg.eventDataRec.waitAtEqualChars :=
FormsVBT.GetInteger(fv, "waitAtEqualChars");
alg.eventDataRec.stopAtFinishCharRun :=
FormsVBT.GetBoolean(fv, "stopAtFinishCharRun");
alg.eventDataRec.waitAtFinishCharRun :=
FormsVBT.GetInteger(fv, "waitAtFinishCharRun");
alg.eventDataRec.stopAtStartResult :=
FormsVBT.GetBoolean(fv, "stopAtStartResult");
alg.eventDataRec.waitAtStartResult :=
FormsVBT.GetInteger(fv, "waitAtStartResult");
alg.eventDataRec.stopAtResultNextChar :=
FormsVBT.GetBoolean(fv, "stopAtResultNextChar");
alg.eventDataRec.waitAtResultNextChar :=
FormsVBT.GetInteger(fv, "waitAtResultNextChar");
alg.eventDataRec.stopAtEndResult :=
FormsVBT.GetBoolean(fv, "stopAtEndResult");
alg.eventDataRec.waitAtEndResult :=
FormsVBT.GetInteger(fv, "waitAtEndResult");
alg.eventDataRec.stopAtReveal :=
FormsVBT.GetBoolean(fv, "stopAtReveal");
alg.eventDataRec.waitAtReveal :=
FormsVBT.GetInteger(fv, "waitAtReveal");
END FromFV;
<*UNUSED*>
PROCEDURE ToFV (fv : FormsVBT.T; alg: T) =
<* LL = VBT.mu *>
BEGIN
FormsVBT.PutBoolean(fv, "stopatCodeEvents", alg.stopatCodeEvents);
FormsVBT.PutInteger(fv, "waitatCodeEvents", alg.waitatCodeEvents);
FormsVBT.PutBoolean(fv, "stopAtStartPermute",
alg.eventDataRec.stopAtStartPermute);
FormsVBT.PutInteger(fv, "waitAtStartPermute",
alg.eventDataRec.waitAtStartPermute);
FormsVBT.PutBoolean(fv, "stopAtNextRotation",
alg.eventDataRec.stopAtNextRotation);
FormsVBT.PutInteger(fv, "waitAtNextRotation",
alg.eventDataRec.waitAtNextRotation);
FormsVBT.PutBoolean(fv, "stopAtRotationsSorted",
alg.eventDataRec.stopAtRotationsSorted);
FormsVBT.PutInteger(fv, "waitAtRotationsSorted",
alg.eventDataRec.waitAtRotationsSorted);
FormsVBT.PutBoolean(fv, "stopAtPermuteDone",
alg.eventDataRec.stopAtPermuteDone);
FormsVBT.PutInteger(fv, "waitAtPermuteDone",
alg.eventDataRec.waitAtPermuteDone);
FormsVBT.PutBoolean(fv, "stopAtStartEncode",
alg.eventDataRec.stopAtStartEncode);
FormsVBT.PutInteger(fv, "waitAtStartEncode",
alg.eventDataRec.waitAtStartEncode);
FormsVBT.PutBoolean(fv, "stopAtEncodeNextChar",
alg.eventDataRec.stopAtEncodeNextChar);
FormsVBT.PutInteger(fv, "waitAtEncodeNextChar",
alg.eventDataRec.waitAtEncodeNextChar);
FormsVBT.PutBoolean(fv, "stopAtEncodeDistinctCount",
alg.eventDataRec.stopAtEncodeDistinctCount);
FormsVBT.PutInteger(fv, "waitAtEncodeDistinctCount",
alg.eventDataRec.waitAtEncodeDistinctCount);
FormsVBT.PutBoolean(fv, "stopAtEncodeFoundCode",
alg.eventDataRec.stopAtEncodeFoundCode);
FormsVBT.PutInteger(fv, "waitAtEncodeFoundCode",
alg.eventDataRec.waitAtEncodeFoundCode);
FormsVBT.PutBoolean(fv, "stopAtEncodeDone",
alg.eventDataRec.stopAtEncodeDone);
FormsVBT.PutInteger(fv, "waitAtEncodeDone",
alg.eventDataRec.waitAtEncodeDone);
FormsVBT.PutBoolean(fv, "stopAtInitDecode",
alg.eventDataRec.stopAtInitDecode);
FormsVBT.PutInteger(fv, "waitAtInitDecode",
alg.eventDataRec.waitAtInitDecode);
FormsVBT.PutBoolean(fv, "stopAtStartDecode",
alg.eventDataRec.stopAtStartDecode);
FormsVBT.PutInteger(fv, "waitAtStartDecode",
alg.eventDataRec.waitAtStartDecode);
FormsVBT.PutBoolean(fv, "stopAtDecodeNextCode",
alg.eventDataRec.stopAtDecodeNextCode);
FormsVBT.PutInteger(fv, "waitAtDecodeNextCode",
alg.eventDataRec.waitAtDecodeNextCode);
FormsVBT.PutBoolean(fv, "stopAtDecodeDistinctCount",
alg.eventDataRec.stopAtDecodeDistinctCount);
FormsVBT.PutInteger(fv, "waitAtDecodeDistinctCount",
alg.eventDataRec.waitAtDecodeDistinctCount);
FormsVBT.PutBoolean(fv, "stopAtDecodeFoundChar",
alg.eventDataRec.stopAtDecodeFoundChar);
FormsVBT.PutInteger(fv, "waitAtDecodeFoundChar",
alg.eventDataRec.waitAtDecodeFoundChar);
FormsVBT.PutBoolean(fv, "stopAtDecodeDone",
alg.eventDataRec.stopAtDecodeDone);
FormsVBT.PutInteger(fv, "waitAtDecodeDone",
alg.eventDataRec.waitAtDecodeDone);
FormsVBT.PutBoolean(fv, "stopAtStartReconstruct",
alg.eventDataRec.stopAtStartReconstruct);
FormsVBT.PutInteger(fv, "waitAtStartReconstruct",
alg.eventDataRec.waitAtStartReconstruct);
FormsVBT.PutBoolean(fv, "stopAtFirstChars",
alg.eventDataRec.stopAtFirstChars);
FormsVBT.PutInteger(fv, "waitAtFirstChars",
alg.eventDataRec.waitAtFirstChars);
FormsVBT.PutBoolean(fv, "stopAtConsiderChar",
alg.eventDataRec.stopAtConsiderChar);
FormsVBT.PutInteger(fv, "waitAtConsiderChar",
alg.eventDataRec.waitAtConsiderChar);
FormsVBT.PutBoolean(fv, "stopAtEqualChars",
alg.eventDataRec.stopAtEqualChars);
FormsVBT.PutInteger(fv, "waitAtEqualChars",
alg.eventDataRec.waitAtEqualChars);
FormsVBT.PutBoolean(fv, "stopAtFinishCharRun",
alg.eventDataRec.stopAtFinishCharRun);
FormsVBT.PutInteger(fv, "waitAtFinishCharRun",
alg.eventDataRec.waitAtFinishCharRun);
FormsVBT.PutBoolean(fv, "stopAtStartResult",
alg.eventDataRec.stopAtStartResult);
FormsVBT.PutInteger(fv, "waitAtStartResult",
alg.eventDataRec.waitAtStartResult);
FormsVBT.PutBoolean(fv, "stopAtResultNextChar",
alg.eventDataRec.stopAtResultNextChar);
FormsVBT.PutInteger(fv, "waitAtResultNextChar",
alg.eventDataRec.waitAtResultNextChar);
FormsVBT.PutBoolean(fv, "stopAtEndResult",
alg.eventDataRec.stopAtEndResult);
FormsVBT.PutInteger(fv, "waitAtEndResult",
alg.eventDataRec.waitAtEndResult);
FormsVBT.PutBoolean(fv, "stopAtReveal",
alg.eventDataRec.stopAtReveal);
FormsVBT.PutInteger(fv, "waitAtReveal",
alg.eventDataRec.waitAtReveal);
CountsToFV (fv, alg);
END ToFV;
PROCEDURE CountsToFV (fv : FormsVBT.T; alg: T) =
<* LL = VBT.mu *>
BEGIN
FormsVBT.PutText(fv, "ctOfStartPermute",
Fmt.Int(alg.eventDataRec.ctOfStartPermute));
FormsVBT.PutText(fv, "ctOfNextRotation",
Fmt.Int(alg.eventDataRec.ctOfNextRotation));
FormsVBT.PutText(fv, "ctOfRotationsSorted",
Fmt.Int(alg.eventDataRec.ctOfRotationsSorted));
FormsVBT.PutText(fv, "ctOfPermuteDone",
Fmt.Int(alg.eventDataRec.ctOfPermuteDone));
FormsVBT.PutText(fv, "ctOfStartEncode",
Fmt.Int(alg.eventDataRec.ctOfStartEncode));
FormsVBT.PutText(fv, "ctOfEncodeNextChar",
Fmt.Int(alg.eventDataRec.ctOfEncodeNextChar));
FormsVBT.PutText(fv, "ctOfEncodeDistinctCount",
Fmt.Int(alg.eventDataRec.ctOfEncodeDistinctCount));
FormsVBT.PutText(fv, "ctOfEncodeFoundCode",
Fmt.Int(alg.eventDataRec.ctOfEncodeFoundCode));
FormsVBT.PutText(fv, "ctOfEncodeDone",
Fmt.Int(alg.eventDataRec.ctOfEncodeDone));
FormsVBT.PutText(fv, "ctOfInitDecode",
Fmt.Int(alg.eventDataRec.ctOfInitDecode));
FormsVBT.PutText(fv, "ctOfStartDecode",
Fmt.Int(alg.eventDataRec.ctOfStartDecode));
FormsVBT.PutText(fv, "ctOfDecodeNextCode",
Fmt.Int(alg.eventDataRec.ctOfDecodeNextCode));
FormsVBT.PutText(fv, "ctOfDecodeDistinctCount",
Fmt.Int(alg.eventDataRec.ctOfDecodeDistinctCount));
FormsVBT.PutText(fv, "ctOfDecodeFoundChar",
Fmt.Int(alg.eventDataRec.ctOfDecodeFoundChar));
FormsVBT.PutText(fv, "ctOfDecodeDone",
Fmt.Int(alg.eventDataRec.ctOfDecodeDone));
FormsVBT.PutText(fv, "ctOfStartReconstruct",
Fmt.Int(alg.eventDataRec.ctOfStartReconstruct));
FormsVBT.PutText(fv, "ctOfFirstChars",
Fmt.Int(alg.eventDataRec.ctOfFirstChars));
FormsVBT.PutText(fv, "ctOfConsiderChar",
Fmt.Int(alg.eventDataRec.ctOfConsiderChar));
FormsVBT.PutText(fv, "ctOfEqualChars",
Fmt.Int(alg.eventDataRec.ctOfEqualChars));
FormsVBT.PutText(fv, "ctOfFinishCharRun",
Fmt.Int(alg.eventDataRec.ctOfFinishCharRun));
FormsVBT.PutText(fv, "ctOfStartResult",
Fmt.Int(alg.eventDataRec.ctOfStartResult));
FormsVBT.PutText(fv, "ctOfResultNextChar",
Fmt.Int(alg.eventDataRec.ctOfResultNextChar));
FormsVBT.PutText(fv, "ctOfEndResult",
Fmt.Int(alg.eventDataRec.ctOfEndResult));
FormsVBT.PutText(fv, "ctOfReveal",
Fmt.Int(alg.eventDataRec.ctOfReveal));
END CountsToFV;
PROCEDURE WheelerDefaultUpdateCts ( v: T; reset: BOOLEAN) =
<* LL = VBT.mu *>
BEGIN
IF reset THEN
v.eventDataRec.ctOfStartPermute := 0;
v.eventDataRec.ctOfNextRotation := 0;
v.eventDataRec.ctOfRotationsSorted := 0;
v.eventDataRec.ctOfPermuteDone := 0;
v.eventDataRec.ctOfStartEncode := 0;
v.eventDataRec.ctOfEncodeNextChar := 0;
v.eventDataRec.ctOfEncodeDistinctCount := 0;
v.eventDataRec.ctOfEncodeFoundCode := 0;
v.eventDataRec.ctOfEncodeDone := 0;
v.eventDataRec.ctOfInitDecode := 0;
v.eventDataRec.ctOfStartDecode := 0;
v.eventDataRec.ctOfDecodeNextCode := 0;
v.eventDataRec.ctOfDecodeDistinctCount := 0;
v.eventDataRec.ctOfDecodeFoundChar := 0;
v.eventDataRec.ctOfDecodeDone := 0;
v.eventDataRec.ctOfStartReconstruct := 0;
v.eventDataRec.ctOfFirstChars := 0;
v.eventDataRec.ctOfConsiderChar := 0;
v.eventDataRec.ctOfEqualChars := 0;
v.eventDataRec.ctOfFinishCharRun := 0;
v.eventDataRec.ctOfStartResult := 0;
v.eventDataRec.ctOfResultNextChar := 0;
v.eventDataRec.ctOfEndResult := 0;
v.eventDataRec.ctOfReveal := 0;
END;
CountsToFV (v.eventData, v);
END WheelerDefaultUpdateCts;
PROCEDURE WheelerDefaultSnapshot (v: T; wr: Wr.T)
RAISES {ZeusClass.Error} =
<* LL = VBT.mu *>
BEGIN
TRY
Wr.PutChar(wr, '(')
EXCEPT
ELSE
RAISE ZeusClass.Error(
"WheelerAlgClass.WheelerDefaultSnapshot write error");
END;
IF v.eventData = NIL THEN
RAISE ZeusClass.Error(
"WheelerAlgClass.WheelerDefaultSnapshot: " &
"eventData not set!");
END;
TRY
v.eventData.snapshot(wr)
EXCEPT
FormsVBT.Error (msg) =>
RAISE ZeusClass.Error(
"WheelerAlgClass.WheelerDefaultSnapshot FV error: "
& msg);
ELSE
RAISE ZeusClass.Error(
"WheelerAlgClass.WheelerDefaultSnapshot error");
END;
Algorithm.T.snapshot(v, wr);
TRY
Wr.PutChar(wr, ')')
EXCEPT
ELSE
RAISE ZeusClass.Error(
"WheelerAlgClass.WheelerDefaultSnapshot write error");
END;
END WheelerDefaultSnapshot;
PROCEDURE WheelerDefaultRestore (v: T; rd: Rd.T)
RAISES {ZeusClass.Error} =
<* LL = VBT.mu *>
BEGIN
IF rd = NIL THEN RETURN END;
IF NOT ZeusUtil.EatChar(rd, '(') THEN
RAISE ZeusClass.Error(
"WheelerAlgClass.WheelerDefaultRestore read error");
END;
IF v.eventData = NIL THEN
RAISE ZeusClass.Error(
"WheelerAlgClass.WheelerDefaultRestore: " &
"eventData not set!");
END;
TRY
v.eventData.restore(rd);
v.updateEventCounts(FALSE);
FromFV(v.eventData, v);
EXCEPT
ELSE
RAISE ZeusClass.Error(
"WheelerAlgClass.WheelerDefaultRestore error");
END;
Algorithm.T.restore(v, rd);
IF NOT ZeusUtil.EatChar(rd, ')') THEN
RAISE ZeusClass.Error(
"WheelerAlgClass.WheelerDefaultRestore read error");
END;
END WheelerDefaultRestore;
BEGIN
END WheelerAlgClass.