def test_paramdeclaration(): pardec = OSC.ParameterDeclarations() pardec.add_parameter(OSC.Parameter('myparam1',OSC.ParameterType.integer,'1')) pardec.add_parameter(OSC.Parameter('myparam1',OSC.ParameterType.double,'0.01')) OSC.prettyprint(pardec.get_element())
def test_catalogreference(): catref = OSC.CatalogReference('VehicleCatalog','S60') OSC.prettyprint(catref.get_element()) catref.add_parameter_assignment('stuffs',1) OSC.prettyprint(catref.get_element())
def test_waypoint(): wp = OSC.Waypoint(OSC.WorldPosition(),OSC.RouteStrategy.shortest) OSC.prettyprint(wp.get_element())
def test_roadcondition(): rc = OSC.RoadCondition(1) OSC.prettyprint(rc.get_element())
def test_parameter(): param = OSC.Parameter('stuffs',OSC.ParameterType.integer,'1') OSC.prettyprint(param.get_element())
def test_tod(): tod = OSC.TimeOfDay(True,2020,10,1,18,30,30) OSC.prettyprint(tod.get_element())
def test_weather(): weather = OSC.Weather(OSC.CloudState.free,100,0,1,OSC.PrecipitationType.dry,1) OSC.prettyprint(weather.get_element())
def test_phase(): p1 = OSC.Phase('myphase',1) OSC.prettyprint(p1.get_element()) p1.add_signal_state('myid','red') p1.add_signal_state('myid','green') OSC.prettyprint(p1.get_element())
def test_timeref(): timeref = OSC.TimeReference(OSC.ReferenceContext.absolute,1,2) OSC.prettyprint(timeref.get_element())
def test_clothoid(): clot = OSC.Clothoid(1,0.1,10,OSC.WorldPosition(),0,1) OSC.prettyprint(clot.get_element()) clot = OSC.Clothoid(1,0.1,10,OSC.WorldPosition()) OSC.prettyprint(clot.get_element())