wttxml

package
v0.0.0-...-0b5d739 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadSavedTimetable

func ReadSavedTimetable(path string) ([]byte, error)

Load a WTT file and return the contents of the SavedTimetable.xml file

func SBool

func SBool(s string) bool

In some timetable files "-1" is used instead of "True"...

Types

type SimSigTimetable

type SimSigTimetable struct {
	XMLName    xml.Name `xml:"SimSigTimetable"`
	Timetables Timetables
}

SavedTimetable.xml root element

type Timetable

type Timetable struct {
	XMLName         xml.Name `xml:"Timetable"`
	ID              string
	UID             string
	OriginName      string
	DestinationName string
	Description     string
	Trips           Trips
}

type Timetables

type Timetables struct {
	Timetable []Timetable
}

type Trip

type Trip struct {
	XMLName     xml.Name `xml:"Trip"`
	Location    string
	IsPassTime  string //-1 / True
	SetDownOnly string //-1 / True
	DepPassTime uint
	ArrTime     uint
	Platform    string
}

type Trips

type Trips struct {
	XMLName xml.Name `xml:"Trips"`
	Trip    []Trip
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL