def setUp(self): self.server = subprocess.Popen([ testconfig.tagserver_file, "-C", "tests/config/tagserver_basic.conf" ], stdout=subprocess.DEVNULL) time.sleep(0.1) x = self.server.poll() self.assertIsNone(x) self.dax = daxwrapper.LibDaxWrapper()
def setUp(self): self.server = subprocess.Popen([ testconfig.tagserver_file, "-C", "tests/config/tagserver_basic.conf" ], stdout=subprocess.DEVNULL) time.sleep(0.1) x = self.server.poll() self.assertIsNone(x) self.dax = daxwrapper.LibDaxWrapper() self.ds = self.dax.dax_init("test") x = self.dax.dax_init_config(self.ds, "test") x = self.dax.dax_configure(self.ds, ["test"], 4) x = self.dax.dax_connect(self.ds) members = [ ("Int5", "INT", 5), # 10 ("Bool10", "BOOL", 10), # 2 ("Dint1", "DINT", 1), # 4 ("Dint3", "DINT", 3) ] # 12 # 28 Total test1 = self.dax.dax_add_cdt(self.ds, "Test1", members) members = [ ("Int3", "INT", 3), # 6 ("Test1", "Test1", 5) ] # 140 # 146 Total test2 = self.dax.dax_add_cdt(self.ds, "Test2", members) members = [ ("Int7", "INT", 7), # 14 ("Bool30", "BOOL", 30), # 1 ("Bool32", "BOOL", 32), # 1 ("Test1", "Test1", 1), # 28 ("Test2", "Test2", 2) ] # 292 # 336 Total test3 = self.dax.dax_add_cdt(self.ds, "Test3", members) members = [("Int", "INT", 1), ("Bool", "BOOL", 1), ("reBool", "BOOL", 1), ("triBool", "BOOL", 1), ("Dint", "DINT", 1)] test4 = self.dax.dax_add_cdt(self.ds, "Test4", members) members = [("Bool1", "BOOL", 10), ("Bool2", "BOOL", 1), ("Bool3", "BOOL", 3)] test5 = self.dax.dax_add_cdt(self.ds, "Test5", members) self.dax.dax_tag_add(self.ds, "HandleBool1", "BOOL", 1) self.dax.dax_tag_add(self.ds, "HandleBool7", "BOOL", 7) self.dax.dax_tag_add(self.ds, "HandleBool8", "BOOL", 8) self.dax.dax_tag_add(self.ds, "HandleBool9", "BOOL", 9) self.dax.dax_tag_add(self.ds, "HandleBool33", "BOOL", 33) self.dax.dax_tag_add(self.ds, "HandleInt", "INT", 1) self.dax.dax_tag_add(self.ds, "HandleInt2", "INT", 2) self.dax.dax_tag_add(self.ds, "HandleInt32", "INT", 32) self.dax.dax_tag_add(self.ds, "HandleReal", "REAL", 1) self.dax.dax_tag_add(self.ds, "HandleReal16", "REAL", 16) self.dax.dax_tag_add(self.ds, "HandleTest1", "Test1", 1) self.dax.dax_tag_add(self.ds, "HandleTest2", test2, 5) self.dax.dax_tag_add(self.ds, "HandleTest3", test3, 1) self.dax.dax_tag_add(self.ds, "HandleTest4", test3, 10) self.dax.dax_tag_add(self.ds, "HandleTestIV", test4, 1) self.dax.dax_tag_add(self.ds, "HandleTest5", test5, 1) self.dax.dax_tag_add(self.ds, "HandleTest5_10", test5, 10)
def setUp(self): self.dax = daxwrapper.LibDaxWrapper()