diff -r 42637f721b5b -r 4379e98a30aa PLCControler.py --- a/PLCControler.py Thu Jul 19 11:53:14 2007 +0200 +++ b/PLCControler.py Thu Jul 19 15:04:41 2007 +0200 @@ -542,6 +542,15 @@ pou = self.Project.getPou(name) return pou.getBodyType() + # Return the actions of a pou + def GetPouTransitions(self, pou_name): + transitions = [] + pou = self.Project.getPou(pou_name) + if pou.getBodyType() == "SFC": + for transition in pou.getTransitionList(): + transitions.append(transition.getName()) + return transitions + # Return the body language of the transition given by its name def GetTransitionBodyType(self, pou_name, pou_transition): # Found the pou correponding to name and return its body language @@ -549,6 +558,15 @@ transition = pou.getTransition(pou_transition) return transition.getBodyType() + # Return the actions of a pou + def GetPouActions(self, pou_name): + actions = [] + pou = self.Project.getPou(pou_name) + if pou.getBodyType() == "SFC": + for action in pou.getActionList(): + actions.append(action.getName()) + return actions + # Return the body language of the pou given by its name def GetActionBodyType(self, pou_name, pou_action): # Found the pou correponding to name and return its body language @@ -556,6 +574,16 @@ action = pou.getAction(pou_action) return action.getBodyType() + # Add a Transition to a Project Pou + def ProjectRemovePouTransition(self, pou_name, transition_name): + pou = self.Project.getPou(pou_name) + pou.removeTransition(transition_name) + + # Add a Transition to a Project Pou + def ProjectRemovePouAction(self, pou_name, action_name): + pou = self.Project.getPou(pou_name) + pou.removeAction(action_name) + # Extract varlists from a list of vars def ExtractVarLists(self, vars): varlist_list = []