Пример #1
0
 def json_serialisation(self, ev):
     json = to_json_string(ev)
     print "Serialisation of "+object_to_name(ev)+" = \n"+json
     self.assertIsNotNone(json, "Serialised object should not be None")
     rev = from_json_string(json)
     self.assertTrue(isinstance(rev, ev.__class__))
     self.assertEqual(ev, rev, "Reconstituted object "+repr(rev)+" must equal original "+repr(ev))
Пример #2
0
def get_current_action(env):
    return from_json_string(env.memory.getData(MEM_CURRENT_ACTIONS))
Пример #3
0
def load_plan(env):
    return from_json_string(env.memory.getData(MEM_PLANNED_ACTIONS))
Пример #4
0
def load_completed_actions(env):
    return from_json_string(env.memory.getData(MEM_COMPLETED_ACTIONS))
Пример #5
0
def load_event(env):
    return from_json_string(env.memory.getData(MEM_CURRENT_EVENT))