Esempio n. 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))
Esempio n. 2
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))
Esempio n. 3
0
def get_current_action(env):
    return from_json_string(env.memory.getData(MEM_CURRENT_ACTIONS))
Esempio n. 4
0
def load_completed_actions(env):
    return from_json_string(env.memory.getData(MEM_COMPLETED_ACTIONS))
Esempio n. 5
0
def load_plan(env):
    return from_json_string(env.memory.getData(MEM_PLANNED_ACTIONS))
Esempio n. 6
0
def load_event(env):
    return from_json_string(env.memory.getData(MEM_CURRENT_EVENT))
Esempio n. 7
0
def get_current_action(env):
    return from_json_string(env.memory.getData(MEM_CURRENT_ACTIONS))
Esempio n. 8
0
def load_completed_actions(env):
    return from_json_string(env.memory.getData(MEM_COMPLETED_ACTIONS))
Esempio n. 9
0
def load_plan(env):
    return from_json_string(env.memory.getData(MEM_PLANNED_ACTIONS))
Esempio n. 10
0
def load_event(env):
    return from_json_string(env.memory.getData(MEM_CURRENT_EVENT))