本文整理汇总了Python中traci._sendStringCmd函数的典型用法代码示例。如果您正苦于以下问题:Python _sendStringCmd函数的具体用法?Python _sendStringCmd怎么用?Python _sendStringCmd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_sendStringCmd函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setRouteID
def setRouteID(vehID, routeID):
"""setRouteID(string, string) -> None
Sets the id of the route for the named vehicle.
"""
traci._sendStringCmd(
tc.CMD_SET_VEHICLE_VARIABLE, tc.VAR_ROUTE_ID, vehID, routeID)
示例2: setShapeClass
def setShapeClass(typeID, clazz):
"""setShapeClass(string, string) -> None
Sets the shape class of vehicles of this type.
"""
traci._sendStringCmd(
tc.CMD_SET_VEHICLETYPE_VARIABLE, tc.VAR_SHAPECLASS, typeID, clazz)
示例3: setRedYellowGreenState
def setRedYellowGreenState(tlsID, state):
"""setRedYellowGreenState(string, string) -> None
Sets the named tl's state as a tuple of light definitions from rRgGyYoO, for red, green, yellow, off, where lower case letters mean that the stream has to decelerate.
"""
traci._sendStringCmd(
tc.CMD_SET_TL_VARIABLE, tc.TL_RED_YELLOW_GREEN_STATE, tlsID, state)
示例4: trackVehicle
def trackVehicle(viewID, vehID):
"""trackVehicle(string, string) -> None
Start visually tracking the given vehicle on the given view.
"""
traci._sendStringCmd(
tc.CMD_SET_GUI_VARIABLE, tc.VAR_TRACK_VEHICLE, viewID, vehID)
示例5: setEmissionClass
def setEmissionClass(typeID, clazz):
"""setEmissionClass(string, string) -> None
Sets the emission class of vehicles of this type.
"""
traci._sendStringCmd(
tc.CMD_SET_VEHICLETYPE_VARIABLE, tc.VAR_EMISSIONCLASS, typeID, clazz)
示例6: setShapeClass
def setShapeClass(vehID, clazz):
"""setShapeClass(string, string) -> None
Sets the shape class for this vehicle.
"""
traci._sendStringCmd(
tc.CMD_SET_VEHICLE_VARIABLE, tc.VAR_SHAPECLASS, vehID, clazz)
示例7: setSchema
def setSchema(viewID, schemeName):
"""setSchema(string, string) -> None
Set the current coloring scheme for the given view.
"""
traci._sendStringCmd(
tc.CMD_SET_GUI_VARIABLE, tc.VAR_VIEW_SCHEMA, viewID, schemeName)
示例8: setProgram
def setProgram(tlsID, programID):
"""setProgram(string, string) -> None
Sets the id of the current program.
"""
traci._sendStringCmd(
tc.CMD_SET_TL_VARIABLE, tc.TL_PROGRAM, tlsID, programID)
示例9: setEmissionClass
def setEmissionClass(vehID, clazz):
"""setEmissionClass(string, string) -> None
Sets the emission class for this vehicle.
"""
traci._sendStringCmd(
tc.CMD_SET_VEHICLE_VARIABLE, tc.VAR_EMISSIONCLASS, vehID, clazz)
示例10: setRouteID
def setRouteID(vehID, routeID):
"""setRouteID(string, string) -> None
Changes the vehicles route to the route with the given id.
"""
traci._sendStringCmd(
tc.CMD_SET_VEHICLE_VARIABLE, tc.VAR_ROUTE_ID, vehID, routeID)
示例11: setType
def setType(vehID, typeID):
"""setType(string, string) -> None
Sets the id of the type for the named vehicle.
"""
traci._sendStringCmd(
tc.CMD_SET_VEHICLE_VARIABLE, tc.VAR_TYPE, vehID, typeID)
示例12: screenshot
def screenshot(viewID, filename):
"""screenshot(string, string) -> None
Save a screenshot for the given view to the given filename.
The fileformat is guessed from the extension, the available
formats differ from platform to platform but should at least
include ps, svg and pdf, on linux probably gif, png and jpg as well.
"""
traci._sendStringCmd(tc.CMD_SET_GUI_VARIABLE, tc.VAR_SCREENSHOT, viewID, filename)
示例13: setRouteID
def setRouteID(vehID, routeID):
traci._sendStringCmd(tc.CMD_SET_VEHICLE_VARIABLE, tc.VAR_ROUTE_ID, vehID, routeID)
示例14: changeTarget
def changeTarget(vehID, edgeID):
traci._sendStringCmd(tc.CMD_SET_VEHICLE_VARIABLE, tc.CMD_CHANGETARGET, vehID, edgeID)
示例15: setShapeClass
def setShapeClass(typeID, clazz):
traci._sendStringCmd(tc.CMD_SET_VEHICLETYPE_VARIABLE, tc.VAR_SHAPECLASS, typeID, clazz)