/* Sequence Local Client - DMS - February 2003 - by Bob Le Gob */ /******************************************************************************* Variables *******************************************************************************/ var iNb = 0;; /* Sequence size */ var iCurrent = 0;; /* Sequence index */ /******************************************************************************* Functions *******************************************************************************/ /******************************************************************************* Triggers single current event from -> DMI : Not used action -> S : Not used param -> S : Not used others -> [User r1] : Not used tag -> Tag : Not used <- I : Not used *******************************************************************************/ fun cbInputOneByOne(from, action, param, others, tag) = set iCurrent = (mod iCurrent iNb) + 1; _DMSeventTag this (strcat "out" itoa iCurrent) param others nil; 0;; /******************************************************************************* Triggers all events from -> DMI : Not used action -> S : Not used param -> S : Not used others -> [User r1] : Not used tag -> Tag : Not used <- I : Not used *******************************************************************************/ fun cbInputAllAtOnce(from, action, param, others, tag) = let 1 -> i in while (i <= iNb) do ( _DMSeventTag this (strcat "out" itoa i) param others nil; set i = i + 1; );; /******************************************************************************* Functions: Module instanciation *******************************************************************************/ /******************************************************************************* Standard IniDMI param -> S : Parameter from server - Sequence size <- I : Not used *******************************************************************************/ fun IniDMI (param)= set iNb = atoi param; set iCurrent = iNb; _DMSdefineActions this ["inputOneByOne" @cbInputOneByOne]:: ["inputAllAtOnce" @cbInputAllAtOnce]:: nil; 0;;