C# 클래스 AbstractedSheep.ShuttleTrackerWorld.World

파일 보기 프로젝트 열기: AbstractedSheep/Shuttle-Tracker 1 사용 예제들

공개 메소드들

메소드 설명
AddOrUpdateShuttle ( int shuttleId, Coordinate location, string name, int bearing, string cardinalPoint, int speed, int route = -1 ) : void

Adds a shuttle to the world or updates the position of an existing shuttle.

GenerateWorld ( Netlink n ) : World

Create a world object from a Netlink object.

RemoveOldShuttles ( ) : void

Removes all shuttles older than SHUTTLE_EXPIRATION_TIME

비공개 메소드들

메소드 설명
AddRoute ( RouteJson route ) : void
AddRoute ( int routeId, string name, List coords ) : void
AddStop ( StopJson stop ) : void
AddStop ( string stopId, Coordinate location, string name, List routes ) : void
CurrentTimeMillis ( ) : long
World ( ) : System

메소드 상세

AddOrUpdateShuttle() 공개 메소드

Adds a shuttle to the world or updates the position of an existing shuttle.
public AddOrUpdateShuttle ( int shuttleId, Coordinate location, string name, int bearing, string cardinalPoint, int speed, int route = -1 ) : void
shuttleId int The ID number of the shuttle.
location Coordinate The shuttle's current location.
name string The name of the shuttle.
bearing int The heading of the shuttle in degrees from north.
cardinalPoint string The heading of the shuttle as a cardinal direcation (e.g. Northwest).
speed int The speed of the shuttle in miles per hour.
route int The id of the shuttle route. -1 indicates that the shuttle is not on a route.
리턴 void

GenerateWorld() 공개 정적인 메소드

Create a world object from a Netlink object.
public static GenerateWorld ( Netlink n ) : World
n Netlink The Netlink class that represents the Netlink JSON.
리턴 World

RemoveOldShuttles() 공개 메소드

Removes all shuttles older than SHUTTLE_EXPIRATION_TIME
public RemoveOldShuttles ( ) : void
리턴 void