def CreateLocalTestConfig(): c = TileConfig() t0 = TileDesc((400, 400), (0, 0), ":0", localWindowId=0) t1 = TileDesc( (400, 400), (400, 0), ":0", lrtbMullions=(0, 0, 0, 0), location=TileLocation((400, 0), relative=t0.uid), localWindowId=0, ) print "t1 relative:", t1.location.relative t2 = TileDesc((400, 400), (0, 400), ":0", localWindowId=0, location=TileLocation((0, 400), relative=t0.uid)) t3 = TileDesc( (400, 400), (400, 400), ":0", lrtbMullions=(0, 0, 0, 0), location=TileLocation((400, 0), relative=t2.uid), localWindowId=0, ) localWindow = LocalWindow(Rect(0, 0, 800, 800)) m3 = MachineDesc("maze", tiles=[t0, t1, t2, t3], windows=[localWindow]) c.addMachine(m3) return c
def CreateAMConfig(): c = TileConfig() # the local window is the same for most nodes. #localWindow = LocalWindow(Rect(0,0,2560, 1024)) localWindow = LocalWindow(Rect(0, 0, 2048, 768)) # this one has two tiles oriented vertically. localWindow2rows = LocalWindow(Rect(0, 0, 1024, 1536)) """ t0 = TileDesc( (2048, 768), (0,0), ":0") m6 = MachineDesc( "am-mac6", tiles = [t0], windows=[localWindow]) c.addMachine(m6) """ t2 = TileDesc((2048, 768), (0, 0), None, lrtbMullions=(0, 0, 0, 0), location=TileLocation((0, 0))) m3 = MachineDesc("am-mac3", tiles=[t2], windows=[localWindow]) c.addMachine(m3) t4 = TileDesc((2048, 768), (0, 0), None, lrtbMullions=(0, 0, 0, 0), location=TileLocation((0, 768), relative=t2.uid)) m1 = MachineDesc("am-mac1", tiles=[t4], windows=[localWindow]) c.addMachine(m1) """ t6 = TileDesc( (2048, 768), (0,0), None, location=TileLocation( (2048,0), relative=t0.uid )) m5 = MachineDesc( "am-mac5", tiles = [t6], windows=[localWindow]) c.addMachine(m5) """ t8 = TileDesc((2048, 768), (0, 0), None, location=TileLocation((2048, 0), relative=t2.uid)) m4 = MachineDesc("am-mac4", tiles=[t8], windows=[localWindow]) c.addMachine(m4) t10 = TileDesc((2048, 768), (0, 0), None, location=TileLocation((0, 768), relative=t8.uid)) m2 = MachineDesc("am-mac2", tiles=[t10], windows=[localWindow]) c.addMachine(m2) """ localWindowB = LocalWindow(Rect(0,0,1024, 768)) t12 = TileDesc( (1024, 768), (0,0), ":0", location=TileLocation( (2048,0), relative=t6.uid )) #t13 = TileDesc( (1024, 768), (1024,0), ":0", location=TileLocation( (0,768), relative=t12.uid )) #m8 = MachineDesc( "am-mac8", tiles = [t12, t13], windows=[localWindow]) m8 = MachineDesc( "am-mac8", tiles = [t12], windows=[localWindowB]) c.addMachine(m8) #t13 = TileDesc( (1024, 768), (1024, 0), ":0", location=TileLocation( (0,768), relative=t12.uid )) t13 = TileDesc( (1024, 1536), (0, 0), ":0", location=TileLocation( (0,768), relative=t12.uid )) m7 = MachineDesc( "am-mac7", tiles = [t13], windows=[localWindow2rows]) #m7 = MachineDesc( "am-mac7", tiles = [t13], windows=[localWindow]) c.addMachine(m7) """ return c
def CreateLocalTestConfig(): c = TileConfig() t0 = TileDesc((200, 200), (0, 0), ":0", localWindowId=0) t1 = TileDesc((200, 200), (200, 0), ":0", lrtbMullions=(0, 0, 0, 0), location=TileLocation((200, 0), relative=t0.uid), localWindowId=0) print "t1 relative:", t1.location.relative localWindow = LocalWindow(Rect(0, 0, 400, 200)) m3 = MachineDesc("maze", tiles=[t0, t1], windows=[localWindow]) c.addMachine(m3) return c
def CreateLocal2TestConfig(): c = TileConfig() t0 = TileDesc( (840, 400), (0,0), ":0", localWindowId=0) t1 = TileDesc( (840, 400), (840, 0), ":0", lrtbMullions=(0,0,0,0), location=TileLocation( (840,0), relative=t0.uid), localWindowId=0) print "t1 relative:", t1.location.relative t2 = TileDesc( (840, 400), (0,0), ":0", localWindowId=0, location=TileLocation( (0,400), relative=t0.uid)) t3 = TileDesc( (840, 400), (840, 0), ":0", lrtbMullions=(0,0,0,0), location=TileLocation( (840,0), relative=t2.uid), localWindowId=0) localWindow1 = LocalWindow(Rect(0,450,1680,400)) localWindow2 = LocalWindow(Rect(0,50,1680,400)) m3 = MachineDesc( "localhost", tiles = [t0, t1], windows=[localWindow1]) c.addMachine(m3) m4 = MachineDesc( "localhost2", tiles = [t2, t3], windows=[localWindow2]) c.addMachine(m4) return c
def CreateAMConfig(): c = TileConfig() # the local window is the same for most nodes. #localWindow = LocalWindow(Rect(0,0,2560, 1024)) localWindow = LocalWindow(Rect(0,0,2048, 768)) # this one has two tiles oriented vertically. localWindow2rows = LocalWindow(Rect(0,0,1024, 1536)) """ t0 = TileDesc( (2048, 768), (0,0), ":0") m6 = MachineDesc( "am-mac6", tiles = [t0], windows=[localWindow]) c.addMachine(m6) """ t2 = TileDesc( (2048, 768), (0,0), None, lrtbMullions=(0,0,0,0), location=TileLocation( (0,0))) m3 = MachineDesc( "am-mac3", tiles = [t2], windows=[localWindow]) c.addMachine(m3) t4 = TileDesc( (2048, 768), (0,0), None, lrtbMullions=(0,0,0,0), location=TileLocation( (0,768), relative=t2.uid )) m1 = MachineDesc( "am-mac1", tiles = [t4], windows=[localWindow]) c.addMachine(m1) """ t6 = TileDesc( (2048, 768), (0,0), None, location=TileLocation( (2048,0), relative=t0.uid )) m5 = MachineDesc( "am-mac5", tiles = [t6], windows=[localWindow]) c.addMachine(m5) """ t8 = TileDesc( (2048, 768), (0,0), None, location=TileLocation( (2048,0), relative=t2.uid )) m4 = MachineDesc( "am-mac4", tiles = [t8], windows=[localWindow]) c.addMachine(m4) t10 = TileDesc( (2048, 768), (0,0), None, location=TileLocation( (0,768), relative=t8.uid )) m2 = MachineDesc( "am-mac2", tiles = [t10], windows=[localWindow]) c.addMachine(m2) """ localWindowB = LocalWindow(Rect(0,0,1024, 768)) t12 = TileDesc( (1024, 768), (0,0), ":0", location=TileLocation( (2048,0), relative=t6.uid )) #t13 = TileDesc( (1024, 768), (1024,0), ":0", location=TileLocation( (0,768), relative=t12.uid )) #m8 = MachineDesc( "am-mac8", tiles = [t12, t13], windows=[localWindow]) m8 = MachineDesc( "am-mac8", tiles = [t12], windows=[localWindowB]) c.addMachine(m8) #t13 = TileDesc( (1024, 768), (1024, 0), ":0", location=TileLocation( (0,768), relative=t12.uid )) t13 = TileDesc( (1024, 1536), (0, 0), ":0", location=TileLocation( (0,768), relative=t12.uid )) m7 = MachineDesc( "am-mac7", tiles = [t13], windows=[localWindow2rows]) #m7 = MachineDesc( "am-mac7", tiles = [t13], windows=[localWindow]) c.addMachine(m7) """ return c
def CreateOptIPortalConfig(): c = TileConfig() #localWindow = LocalWindow(Rect(0,0,10240, 1600)) localWindow0 = LocalWindow(Rect(0,0,5120, 1600), ":0") localWindow1 = LocalWindow(Rect(0,0,5120, 1600), ":1") # Currently config coordinates are based on bottom left origin, so we'll start with tile-0-3 t6 = TileDesc( (5120, 1600), (0,0), None) t7 = TileDesc( (5120, 1600), (0,0), None, lrtbMullions=(0,0,0,0), location=TileLocation( (5120,0), relative=t6.uid )) avengerD0= MachineDesc( "tile-0-3", tiles = [t6], windows=[localWindow0]) c.addMachine(avengerD0) avengerD1 = MachineDesc( "tile-0-3", tiles = [t7], windows=[localWindow1]) c.addMachine(avengerD1) t4 = TileDesc( (5120, 1600), (0,0), None, location=TileLocation( (0,1600), relative=t6.uid)) t5 = TileDesc( (5120, 1600), (0,0), None, lrtbMullions=(0,0,0,0), location=TileLocation( (5120,0), relative=t4.uid )) avengerC0= MachineDesc( "tile-0-2", tiles = [t4], windows=[localWindow0]) c.addMachine(avengerC0) avengerC1 = MachineDesc( "tile-0-2", tiles = [t5], windows=[localWindow1]) c.addMachine(avengerC1) t2 = TileDesc( (5120, 1600), (0,0), None, location=TileLocation( (0,1600), relative=t4.uid)) t3 = TileDesc( (5120, 1600), (0,0), None, lrtbMullions=(0,0,0,0), location=TileLocation( (5120,0), relative=t2.uid )) wasp0 = MachineDesc( "tile-0-1", tiles = [t2], windows=[localWindow0]) c.addMachine(wasp0) wasp1 = MachineDesc( "tile-0-1", tiles = [t3], windows=[localWindow1]) c.addMachine(wasp1) t0 = TileDesc( (5120, 1600), (0,0), None, location=TileLocation( (0,1600), relative=t2.uid)) t1 = TileDesc( (5120, 1600), (0,0), None, lrtbMullions=(0,0,0,0), location=TileLocation( (5120,0), relative=t0.uid )) ironman0= MachineDesc( "tile-0-0", tiles = [t0], windows=[localWindow0]) c.addMachine(ironman0) ironman1 = MachineDesc( "tile-0-0", tiles = [t1], windows=[localWindow1]) c.addMachine(ironman1) return c
def CreateAMConfig(): c = TileConfig() # the local window is the same for most nodes. #localWindow = LocalWindow(Rect(0,0,2560, 1024)) localWindow = LocalWindow(Rect(0,0,2048, 768)) # this one has two tiles oriented vertically. localWindow2rows = LocalWindow(Rect(0,0,1024, 1536)) t0 = TileDesc( (1024, 768), (0,0), ":0") t1 = TileDesc( (1024, 768), (1024, 0), ":0", lrtbMullions=(0,0,0,0), location=TileLocation( (1024,0), relative=t0.uid)) print "t1 relative:", t1.location.relative m6 = MachineDesc( "am-mac6", tiles = [t0, t1], windows=[localWindow]) c.addMachine(m6) t2 = TileDesc( (1024, 768), (0,0), ":0", lrtbMullions=(0,0,0,0), location=TileLocation( (0,768), relative=t0.uid )) t3 = TileDesc( (1024, 768), (1024,0), ":0", location=TileLocation( (1024,0), relative=t2.uid )) m3 = MachineDesc( "am-mac3", tiles = [t2, t3], windows=[localWindow]) c.addMachine(m3) t4 = TileDesc( (1024, 768), (0,0), ":0", lrtbMullions=(0,0,0,0), location=TileLocation( (0,768), relative=t2.uid )) t5 = TileDesc( (1024, 768), (1024,0), ":0", location=TileLocation( (1024,0), relative=t4.uid )) m1 = MachineDesc( "am-mac1", tiles = [t4, t5], windows=[localWindow]) c.addMachine(m1) t6 = TileDesc( (1024, 768), (0,0), ":0", location=TileLocation( (1024,0), relative=t1.uid )) t7 = TileDesc( (1024, 768), (1024,0), ":0", location=TileLocation( (1024,0), relative=t6.uid )) m5 = MachineDesc( "am-mac5", tiles = [t6, t7], windows=[localWindow]) c.addMachine(m5) t8 = TileDesc( (1024, 768), (0,0), ":0", location=TileLocation( (0,768), relative=t6.uid )) t9 = TileDesc( (1024, 768), (1024,0), ":0", location=TileLocation( (1024,0), relative=t8.uid )) m4 = MachineDesc( "am-mac4", tiles = [t8, t9], windows=[localWindow]) c.addMachine(m4) t10 = TileDesc( (1024, 768), (0,0), ":0", location=TileLocation( (0,768), relative=t8.uid )) t11 = TileDesc( (1024, 768), (1024,0), ":0", location=TileLocation( (1024,0), relative=t10.uid )) m2 = MachineDesc( "am-mac2", tiles = [t10, t11], windows=[localWindow]) c.addMachine(m2) localWindowB = LocalWindow(Rect(0,0,1024, 768)) t12 = TileDesc( (1024, 768), (0,0), ":0", location=TileLocation( (1024,0), relative=t7.uid )) #t13 = TileDesc( (1024, 768), (1024,0), ":0", location=TileLocation( (0,768), relative=t12.uid )) #m8 = MachineDesc( "am-mac8", tiles = [t12, t13], windows=[localWindow]) m8 = MachineDesc( "am-mac8", tiles = [t12], windows=[localWindowB]) c.addMachine(m8) #t13 = TileDesc( (1024, 768), (1024, 0), ":0", location=TileLocation( (0,768), relative=t12.uid )) t13 = TileDesc( (1024, 768), (0, 0), ":0", location=TileLocation( (0,768), relative=t12.uid )) t14 = TileDesc( (1024, 768), (0, 768), ":0", location=TileLocation( (0,768), relative=t13.uid )) m7 = MachineDesc( "am-mac7", tiles = [t13,t14], windows=[localWindow2rows]) #m7 = MachineDesc( "am-mac7", tiles = [t13], windows=[localWindow]) c.addMachine(m7) return c
def CreateAMConfig(): c = TileConfig() # the local window is the same for most nodes. #localWindow = LocalWindow(Rect(0,0,2560, 1024)) localWindow = LocalWindow(Rect(0, 0, 2048, 768)) # this one has two tiles oriented vertically. localWindow2rows = LocalWindow(Rect(0, 0, 1024, 1536)) t0 = TileDesc((1024, 768), (0, 0), ":0") t1 = TileDesc((1024, 768), (1024, 0), ":0", lrtbMullions=(0, 0, 0, 0), location=TileLocation((1024, 0), relative=t0.uid)) print "t1 relative:", t1.location.relative m6 = MachineDesc("am-mac6", tiles=[t0, t1], windows=[localWindow]) c.addMachine(m6) t2 = TileDesc((1024, 768), (0, 0), ":0", lrtbMullions=(0, 0, 0, 0), location=TileLocation((0, 768), relative=t0.uid)) t3 = TileDesc((1024, 768), (1024, 0), ":0", location=TileLocation((1024, 0), relative=t2.uid)) m3 = MachineDesc("am-mac3", tiles=[t2, t3], windows=[localWindow]) c.addMachine(m3) t4 = TileDesc((1024, 768), (0, 0), ":0", lrtbMullions=(0, 0, 0, 0), location=TileLocation((0, 768), relative=t2.uid)) t5 = TileDesc((1024, 768), (1024, 0), ":0", location=TileLocation((1024, 0), relative=t4.uid)) m1 = MachineDesc("am-mac1", tiles=[t4, t5], windows=[localWindow]) c.addMachine(m1) t6 = TileDesc((1024, 768), (0, 0), ":0", location=TileLocation((1024, 0), relative=t1.uid)) t7 = TileDesc((1024, 768), (1024, 0), ":0", location=TileLocation((1024, 0), relative=t6.uid)) m5 = MachineDesc("am-mac5", tiles=[t6, t7], windows=[localWindow]) c.addMachine(m5) t8 = TileDesc((1024, 768), (0, 0), ":0", location=TileLocation((0, 768), relative=t6.uid)) t9 = TileDesc((1024, 768), (1024, 0), ":0", location=TileLocation((1024, 0), relative=t8.uid)) m4 = MachineDesc("am-mac4", tiles=[t8, t9], windows=[localWindow]) c.addMachine(m4) t10 = TileDesc((1024, 768), (0, 0), ":0", location=TileLocation((0, 768), relative=t8.uid)) t11 = TileDesc((1024, 768), (1024, 0), ":0", location=TileLocation((1024, 0), relative=t10.uid)) m2 = MachineDesc("am-mac2", tiles=[t10, t11], windows=[localWindow]) c.addMachine(m2) localWindowB = LocalWindow(Rect(0, 0, 1024, 768)) t12 = TileDesc((1024, 768), (0, 0), ":0", location=TileLocation((1024, 0), relative=t7.uid)) #t13 = TileDesc( (1024, 768), (1024,0), ":0", location=TileLocation( (0,768), relative=t12.uid )) #m8 = MachineDesc( "am-mac8", tiles = [t12, t13], windows=[localWindow]) m8 = MachineDesc("am-mac8", tiles=[t12], windows=[localWindowB]) c.addMachine(m8) #t13 = TileDesc( (1024, 768), (1024, 0), ":0", location=TileLocation( (0,768), relative=t12.uid )) t13 = TileDesc((1024, 768), (0, 0), ":0", location=TileLocation((0, 768), relative=t12.uid)) t14 = TileDesc((1024, 768), (0, 768), ":0", location=TileLocation((0, 768), relative=t13.uid)) m7 = MachineDesc("am-mac7", tiles=[t13, t14], windows=[localWindow2rows]) #m7 = MachineDesc( "am-mac7", tiles = [t13], windows=[localWindow]) c.addMachine(m7) return c
def CreateAMConfig(): c = TileConfig() # currently the local window is the same for all nodes. localWindow = LocalWindow(Rect(0, 0, 2560, 1024)) t0 = TileDesc((1280, 1024), (0, 0), ":0") t1 = TileDesc((1280, 1024), (1280, 0), ":0", lrtbMullions=(0, 0, 0, 0), location=TileLocation((1050, 0), relative=t0.uid)) print "t1 relative:", t1.location.relative m3 = MachineDesc("am-mac3", tiles=[t0, t1], windows=[localWindow]) c.addMachine(m3) t2 = TileDesc((1280, 1024), (0, 0), ":0", lrtbMullions=(0, 0, 0, 0), location=TileLocation((0, 840), relative=t0.uid)) t3 = TileDesc((1280, 1024), (1280, 0), ":0", location=TileLocation((1050, 0), relative=t2.uid)) m2 = MachineDesc("am-mac2", tiles=[t2, t3], windows=[localWindow]) c.addMachine(m2) t4 = TileDesc((1280, 1024), (0, 0), ":0", lrtbMullions=(0, 0, 0, 0), location=TileLocation((0, 840), relative=t2.uid)) t5 = TileDesc((1280, 1024), (1280, 0), ":0", location=TileLocation((1050, 0), relative=t4.uid)) m1 = MachineDesc("am-mac1", tiles=[t4, t5], windows=[localWindow]) c.addMachine(m1) t6 = TileDesc((1280, 1024), (0, 0), ":0", location=TileLocation((1050, 0), relative=t1.uid)) t7 = TileDesc((1280, 1024), (1280, 0), ":0", location=TileLocation((1050, 0), relative=t6.uid)) m6 = MachineDesc("am-mac6", tiles=[t6, t7], windows=[localWindow]) c.addMachine(m6) t8 = TileDesc((1280, 1024), (0, 0), ":0", location=TileLocation((0, 840), relative=t6.uid)) t9 = TileDesc((1280, 1024), (1280, 0), ":0", location=TileLocation((1050, 0), relative=t8.uid)) m5 = MachineDesc("am-mac5", tiles=[t8, t9], windows=[localWindow]) c.addMachine(m5) t10 = TileDesc((1280, 1024), (0, 0), ":0", location=TileLocation((0, 840), relative=t8.uid)) t11 = TileDesc((1280, 1024), (1280, 0), ":0", location=TileLocation((1050, 0), relative=t10.uid)) m4 = MachineDesc("am-mac4", tiles=[t10, t11], windows=[localWindow]) c.addMachine(m4) t12 = TileDesc((1280, 1024), (0, 0), ":0", location=TileLocation((1050, 0), relative=t7.uid)) #t13 = TileDesc( (1280, 1024), (1280,0), ":0", location=TileLocation( (0,840), relative=t12.uid )) #m8 = MachineDesc( "am-mac8", tiles = [t12, t13], windows=[localWindow]) m8 = MachineDesc("am-mac8", tiles=[t12]) c.addMachine(m8) t13 = TileDesc((1280, 1024), (1280, 0), ":0", location=TileLocation((0, 840), relative=t12.uid)) t14 = TileDesc((1280, 1024), (0, 0), ":0", location=TileLocation((0, 840), relative=t13.uid)) m7 = MachineDesc("am-mac7", tiles=[t13, t14], windows=[localWindow]) c.addMachine(m7) return c
def CreateAMConfig(): c = TileConfig() # currently the local window is the same for all nodes. localWindow = LocalWindow(Rect(0,0,2560, 1024)) t0 = TileDesc( (1280, 1024), (0,0), ":0") t1 = TileDesc( (1280, 1024), (1280, 0), ":0", lrtbMullions=(0,0,0,0), location=TileLocation( (1050,0), relative=t0.uid)) print "t1 relative:", t1.location.relative m3 = MachineDesc( "am-mac3", tiles = [t0, t1], windows=[localWindow]) c.addMachine(m3) t2 = TileDesc( (1280, 1024), (0,0), ":0", lrtbMullions=(0,0,0,0), location=TileLocation( (0,840), relative=t0.uid )) t3 = TileDesc( (1280, 1024), (1280,0), ":0", location=TileLocation( (1050,0), relative=t2.uid )) m2 = MachineDesc( "am-mac2", tiles = [t2, t3], windows=[localWindow]) c.addMachine(m2) t4 = TileDesc( (1280, 1024), (0,0), ":0", lrtbMullions=(0,0,0,0), location=TileLocation( (0,840), relative=t2.uid )) t5 = TileDesc( (1280, 1024), (1280,0), ":0", location=TileLocation( (1050,0), relative=t4.uid )) m1 = MachineDesc( "am-mac1", tiles = [t4, t5], windows=[localWindow]) c.addMachine(m1) t6 = TileDesc( (1280, 1024), (0,0), ":0", location=TileLocation( (1050,0), relative=t1.uid )) t7 = TileDesc( (1280, 1024), (1280,0), ":0", location=TileLocation( (1050,0), relative=t6.uid )) m6 = MachineDesc( "am-mac6", tiles = [t6, t7], windows=[localWindow]) c.addMachine(m6) t8 = TileDesc( (1280, 1024), (0,0), ":0", location=TileLocation( (0,840), relative=t6.uid )) t9 = TileDesc( (1280, 1024), (1280,0), ":0", location=TileLocation( (1050,0), relative=t8.uid )) m5 = MachineDesc( "am-mac5", tiles = [t8, t9], windows=[localWindow]) c.addMachine(m5) t10 = TileDesc( (1280, 1024), (0,0), ":0", location=TileLocation( (0,840), relative=t8.uid )) t11 = TileDesc( (1280, 1024), (1280,0), ":0", location=TileLocation( (1050,0), relative=t10.uid )) m4 = MachineDesc( "am-mac4", tiles = [t10, t11], windows=[localWindow]) c.addMachine(m4) t12 = TileDesc( (1280, 1024), (0,0), ":0", location=TileLocation( (1050,0), relative=t7.uid )) #t13 = TileDesc( (1280, 1024), (1280,0), ":0", location=TileLocation( (0,840), relative=t12.uid )) #m8 = MachineDesc( "am-mac8", tiles = [t12, t13], windows=[localWindow]) m8 = MachineDesc( "am-mac8", tiles = [t12]) c.addMachine(m8) t13 = TileDesc( (1280, 1024), (1280,0), ":0", location=TileLocation( (0,840), relative=t12.uid )) t14 = TileDesc( (1280, 1024), (0,0), ":0", location=TileLocation( (0,840), relative=t13.uid )) m7 = MachineDesc( "am-mac7", tiles = [t13,t14], windows=[localWindow]) c.addMachine(m7) return c