nrod

package
v0.0.0-...-73876c2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Header struct {
	MsgType            string `json:"msg_type"`
	SourceDevID        string `json:"source_dev_id"`
	UserID             string `json:"user_id"`
	OriginalDataSource string `json:"original_data_source"`
	MsgQueueTimestamp  string `json:"msg_queue_timestamp"`
	SourceSystemID     string `json:"source_system_id"`
}

type Message

type Message struct {
	Header Header          `json:"header"`
	Body   json.RawMessage `json:"body"`
}

type StompClient

type StompClient struct {
	Address  string
	Username string
	Password string

	Queue     *railutils.BatchProcessingQueue
	StopCache railutils.StopCache
}

func (*StompClient) ParseTrainMovementMessages

func (s *StompClient) ParseTrainMovementMessages(messagesBytes []byte)

func (*StompClient) ParseVSTPMessages

func (s *StompClient) ParseVSTPMessages(messagesBytes []byte)

func (*StompClient) Run

func (s *StompClient) Run()

func (*StompClient) StartTrainMovementSubscription

func (s *StompClient) StartTrainMovementSubscription(conn *stomp.Conn)

func (*StompClient) StartVSTPSubscription

func (s *StompClient) StartVSTPSubscription(conn *stomp.Conn)

type TrustActivation

type TrustActivation struct {
	EventType  string `json:"event_type"`
	TrainID    string `json:"train_id"`
	OperatorID string `json:"toc_id"`

	ScheduleSource              string `json:"schedule_source"`
	TrainFileAddress            string `json:"train_file_address"`
	TrainUID                    string `json:"train_uid"`
	CreationTimestamp           string `json:"creation_timestamp"`
	TrainPlannedOriginTimestamp string `json:"tp_origin_timestamp"`
	TrainPlannedOriginStanox    string `json:"tp_origin_stanox"`
	OriginDepartureTimestamp    string `json:"origin_dep_timestamp"`
	TrainServiceCode            string `json:"train_service_code"`
	D1266RecordNumber           string `json:"d1266_record_number"`
	TrainCallType               string `json:"train_call_type"`
	TrainCallMode               string `json:"train_call_mode"`
	ScheduleType                string `json:"schedule_type"`
	ScheduleOriginStanox        string `json:"sched_origin_stanox"`
	ScheduleWorkingTimetableID  string `json:"schedule_wtt_id"`
	ScheduleStartDate           string `json:"schedule_start_date"`
	ScheduleEndDate             string `json:"schedule_end_date"`
}

func (*TrustActivation) Process

func (a *TrustActivation) Process(stompClient *StompClient)

type TrustCancellation

type TrustCancellation struct {
	EventType  string `json:"event_type"`
	TrainID    string `json:"train_id"`
	OperatorID string `json:"toc_id"`

	TrainFileAddress        string `json:"train_file_address"`
	TrainServiceCode        string `json:"train_service_code"`
	DivisionCode            string `json:"division_code"`
	LocationStanox          string `json:"loc_stanox"`
	DepartureTimestamp      string `json:"dep_timestamp"`
	CancellationType        string `json:"canx_type"`
	CancellationTimestamp   string `json:"canx_timestamp"`
	OriginLocationStanox    string `json:"orig_loc_stanox"`
	OriginLocationTimestamp string `json:"orig_loc_timestamp"`
	CancellationReasonCode  string `json:"canx_reason_code"`
}

func (*TrustCancellation) Process

func (c *TrustCancellation) Process(stompClient *StompClient)

type TrustMovement

type TrustMovement struct {
	EventType  string `json:"event_type"`
	TrainID    string `json:"train_id"`
	OperatorID string `json:"toc_id"`

	TimestampGBTT          string `json:"gbtt_timestamp"`
	PlannedTimestamp       string `json:"planned_timestamp"`
	ActualTimestamp        string `json:"actual_timestamp"`
	OriginalLocationStanox string `json:"original_loc_stanox"`
	OriginalLOCTimestamp   string `json:"original_loc_timestamp"`
	TimetableVariation     string `json:"timetable_variation"`
	CurrentTrainID         string `json:"current_train_id"`
	DelayMonitoringPoint   string `json:"delay_monitoring_point"`
	NextReportRunTime      string `json:"next_report_run_time"`
	ReportingStanox        string `json:"reporting_stanox"`
	CorrectionInd          string `json:"correction_ind"`
	EventSource            string `json:"event_source"`
	TrainFileAddress       string `json:"train_file_address"`
	Platform               string `json:"platform"`
	DivisionCode           string `json:"division_code"`
	TrainTerminated        string `json:"train_terminated"`
	Offroute               string `json:"offroute_ind"`
	VariationStatus        string `json:"variation_status"`
	TrainServiceCode       string `json:"train_service_code"`
	LocationStanox         string `json:"loc_stanox"`
	AutoExpected           string `json:"auto_expected"`
	Direction              string `json:"direction_ind"`
	Route                  string `json:"route"`
	PlannedEventType       string `json:"planned_event_type"`
	NextReportStanox       string `json:"next_report_stanox"`
	Line                   string `json:"line_ind"`
}

func (*TrustMovement) Process

func (m *TrustMovement) Process(stompClient *StompClient)

type TrustReinstatement

type TrustReinstatement struct {
	EventType  string `json:"event_type"`
	TrainID    string `json:"train_id"`
	OperatorID string `json:"toc_id"`
}

func (*TrustReinstatement) Process

func (r *TrustReinstatement) Process(stompClient *StompClient)

Jump to

Keyboard shortcuts

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