AnalyzeTunes: Commander.CommandProc = {
[cmd: Commander.Handle] RETURNS [result: REF ANY ← NIL, msg: ROPE ← NIL]
Enumerates the the jukebox and computes total tune length.
exists: BOOL;
size: INT;
num: CARD ← 0;
BluejayUtilsRpcControl.ImportInterface[interfaceName: [type: "BluejayUtils", instance: "Strowger.lark"]];
FOR tid:
CARD
IN [0..maxVFID]
DO
[exists, size] ← BluejayUtils.DescribeTune[tid];
IF exists
THEN {
vfileTotalSpace ← vfileTotalSpace + size;
num ← num + 1;
};
ENDLOOP;
IO.PutF[cmd.out, "Total # of tunes = %g\n", IO.card[num]];
IO.PutF[cmd.out, "Total length of tunes (in chirps) = %g\n", IO.card[vfileTotalSpace]];
};
Commander.Register[key: "TuneStorage", proc: AnalyzeTunes, doc: "Computes total tune storage."];