[openrtm-commit:02668] r856 - branches/FSM4RTC/OpenRTM-aist-Python/OpenRTM_aist
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 7月 10日 (月) 18:32:02 JST
Author: miyamoto
Date: 2017-07-10 18:32:02 +0900 (Mon, 10 Jul 2017)
New Revision: 856
Modified:
branches/FSM4RTC/OpenRTM-aist-Python/OpenRTM_aist/Macho.py
Log:
[incompat,2.0,FSM4RTC] fixed Machine Objects class library.
Modified: branches/FSM4RTC/OpenRTM-aist-Python/OpenRTM_aist/Macho.py
===================================================================
--- branches/FSM4RTC/OpenRTM-aist-Python/OpenRTM_aist/Macho.py 2017-07-10 09:17:34 UTC (rev 855)
+++ branches/FSM4RTC/OpenRTM-aist-Python/OpenRTM_aist/Macho.py 2017-07-10 09:32:02 UTC (rev 856)
@@ -42,11 +42,20 @@
return False
isChild = staticmethod(isChild)
+ def set_state_direct(self, S, *args):
+ return self.setStateDirect(S, *args)
+
+ def setStateDirect(self, S, *args):
+ #global _theDefaultInitializer
+ m = self._myStateInstance.machine()
+ instance = S._getInstance(m, S.SUPER, S)
+ m.setPendingState(instance, _Direct_Initializer(*args))
+
def set_state(self, S, *args):
return self.setState(S, *args)
+
-
def setState(self, S, *args):
#global _theDefaultInitializer
m = self._myStateInstance.machine()
@@ -618,6 +627,15 @@
def execute(self, instance, history_):
execute(instance, history_, *self.myParams)
+
+class _Direct_Initializer(__Initializer):
+ def __init__(self, *args):
+ self.myParams = args
+ def clone(self):
+ return _Initializer(*self.myParams)
+ def execute(self, instance, history_):
+ execute(instance, False, *self.myParams)
+
class _Initializer1(__Initializer):
def __init__(self, p1):
self.myParam1 = p1
More information about the openrtm-commit
mailing list