Lines Matching +full:event +full:- +full:name
20 into a tuple consisting of the type name and a list with the params
55 if i < len(typeArray) - 1 and type(typeArray[i + 1]) is list:
69 This function then converts the type-list into a C++ type string.
95 # Handle 0-entry parameter lists.
106 if (entry["params"] != -1) and (entry["params"] != len(rest)):
134 def genEvent(event): argument
136 Generates the source code of an event and returns it as a string
139 e += '"' + event["name"] + '",\n'
141 for group in event["groups"]:
149 for d in event["action"]:
160 e += "make_action(action::" + a["name"] + "(\n"
162 e += "make_action(action::" + a["name"] + "\n"
176 if ("timer" in event["triggers"]) and (
177 event["triggers"]["timer"] is not None
180 e += "\t" + event["triggers"]["timer"]["interval"] + ",\n"
181 e += "\t" + event["triggers"]["timer"]["type"] + "\n"
184 if ("signals" in event["triggers"]) and (
185 event["triggers"]["signals"] is not None
187 for s in event["triggers"]["signals"]:
222 if "init" in event["triggers"]:
223 for i in event["triggers"]["init"]:
265 Extract and construct the groups for the given event.
274 # if this event's condition is not in this zone's conditions
276 "name" in z
277 and z["name"] is not None
278 and not any(c["name"] == z["name"] for c in zCond)
284 # zone's zone number is not in the event's zone numbers
293 g for g in events["groups"] if g["name"] == eGroups["name"]
298 group["name"] = eGroup["name"]
304 member["property"] = eGroups["property"]["name"]
367 Extracts and constructs an init trigger for the event's groups
378 m for m in events["methods"] if m["name"] == eTrig["method"]
380 method["method"] = eMethod["name"]
385 h for h in events["handlers"] if h["name"] == eTrig["handler"]
387 method["handler"] = eHandler["name"]
406 s for s in events["signals"] if s["name"] == eTrig["signal"]
408 signal["signal"] = eSignal["name"]
417 if m["name"] == eSignal["match"]
419 signal["match"] = eMatch["name"]
426 h for h in events["handlers"] if h["name"] == eTrig["handler"]
428 signal["handler"] = eHandler["name"]
439 event timer.
455 all the actions within the given event.
461 a for a in events["actions"] if a["name"] == eActions["name"]
463 actions["name"] = eAction["name"]
478 "make_action(action::" + a["name"] + "(\n"
486 param += "make_action(action::" + a["name"]
557 Parses the sections of an event and populates the properties
558 that construct an event within the generated source.
560 event = {}
562 # Add set speed event name
563 event["name"] = e["name"]
565 # Add set speed event groups
566 event["groups"] = getGroups(zone_num, zone_conditions, e, events_data)
569 event["action"] = []
575 # Skip events that have no groups defined for the event or actions
576 if not event["groups"] and not eAction["groups"]:
593 event["action"] = sseActions
595 # Add event triggers
596 event["triggers"] = {}
599 if trig["name"] == "timer":
600 event["triggers"]["timer"] = getTimer(trig)
601 elif trig["name"] == "signal":
602 if "signals" not in event["triggers"]:
603 event["triggers"]["signals"] = []
604 triggers = getSignal(event["groups"], trig, events_data)
605 event["triggers"]["signals"].extend(triggers)
606 elif trig["name"] == "init":
607 triggers = getInit(event["groups"], trig, events_data)
608 event["triggers"]["init"] = triggers
610 return event
613 def addPrecondition(zNum, zCond, event, events_data): argument
615 Parses the precondition section of an event and populates the necessary
616 structures to generate a precondition for a set speed event.
620 # Add set speed event precondition name
621 precond["pcname"] = event["name"]
623 # Add set speed event precondition group
625 zNum, zCond, event["precondition"], events_data
628 # Add set speed event precondition actions
631 pcs["name"] = event["precondition"]["name"]
635 if p["name"] == event["precondition"]["name"]
677 for pce in event["precondition"]["events"]:
684 # Add precondition event triggers
686 for trig in event["precondition"]["triggers"]:
688 if trig["name"] == "timer":
690 elif trig["name"] == "signal":
695 elif trig["name"] == "init":
704 Constructs the event entries defined for each zone using the events yaml
711 event = {}
715 event["pc"] = addPrecondition(
719 event = getEvent(zone_num, zone_conditions, e, events_data)
721 # no groups defined for the event or any of the actions
722 if not event or (
723 not event["groups"]
724 and all(not a["groups"] for a in event["action"])
727 events.append(event)
755 fan["name"] = f["inventory"]
778 # Interface name not needed yet for fan zones but
780 iface["name"] = i["name"]
786 prop["name"] = p["name"]
787 prop["func"] = str(p["name"]).lower()
804 # Wrap strings with double-quotes
824 if zone_condition != c["name"]:
865 c["name"], zone_conditions_data
869 sys.exit("Missing zone condition " + c["name"])
935 "-z",
936 "--zone_yaml",
942 "-f",
943 "--fan_yaml",
949 "-e",
950 "--events_yaml",
955 "-c",
956 "--zone_conditions_yaml",
961 "-o",
962 "--output_dir",