#!/usr/bin/env python
from ecf import *
def family_limit(): return (
Family("lim2").add(
Inlimit("limits:total"),
Task("alarm").add(
Trigger("limits:total gt 90")),
Family("limits").add(
Defstatus("complete"),
Limits("total", 15)), # dictionnary
Family("side").add( # weaker above
Trigger("limits:total le 10"),
[Family("%03d" % step).add(
Task("process"), Edit(STEP=step))
for step in xrange(0, 120, 3)]),
Family("prio").add(
# favorite shall not lead weak to starve
Trigger("limits:total le 15"),
[Family("%03d" % step).add(
Task("process"), Edit(STEP=step))
for step in xrange(0, 120, 3)])))
|