-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nrod, darwin-types: fix connection and v16 parsing
- Turns out we actually do have to make changes to upgrade darwin-types to v16, although in this case that's just adding the `atClass` attribute to TsTimeData. - We also now actually connect to Darwin properly.
- Loading branch information
Showing
4 changed files
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Pport xmlns="http://www.thalesgroup.com/rtti/PushPort/v16" xmlns:ns2="http://www.thalesgroup.com/rtti/PushPort/Schedules/v3" xmlns:ns3="http://www.thalesgroup.com/rtti/PushPort/Schedules/v2" xmlns:ns4="http://www.thalesgroup.com/rtti/PushPort/Formations/v2" xmlns:ns5="http://www.thalesgroup.com/rtti/PushPort/Forecasts/v3" xmlns:ns6="http://www.thalesgroup.com/rtti/PushPort/Formations/v1" xmlns:ns7="http://www.thalesgroup.com/rtti/PushPort/StationMessages/v1" xmlns:ns8="http://www.thalesgroup.com/rtti/PushPort/TrainAlerts/v1" xmlns:ns9="http://www.thalesgroup.com/rtti/PushPort/TrainOrder/v1" xmlns:ns10="http://www.thalesgroup.com/rtti/PushPort/TDData/v1" xmlns:ns11="http://www.thalesgroup.com/rtti/PushPort/Alarms/v1" xmlns:ns12="http://thalesgroup.com/RTTI/PushPortStatus/root_1" ts="2019-08-16T14:59:57.5639778+01:00" version="16.0"><uR updateOrigin="TD"><TS rid="201908168059245" uid="P59245" ssd="2019-08-16"><ns5:Location tpl="BONENDJ" wtp="14:59:30"><ns5:pass at="15:00" atClass="Automatic" src="TD"/></ns5:Location><ns5:Location tpl="BERKHMD" wtp="15:00:29"><ns5:pass et="15:01" src="Darwin"/></ns5:Location><ns5:Location tpl="TRING" wtp="15:02:30"><ns5:pass et="15:03" src="Darwin"/><ns5:plat platsup="true" cisPlatsup="true">1</ns5:plat></ns5:Location><ns5:Location tpl="LEDBRNJ" wtp="15:05:30"><ns5:pass et="15:06" src="Darwin"/></ns5:Location><ns5:Location tpl="MKNSCEN" wta="15:12:30" wtd="15:14:30" pta="15:13" ptd="15:13"><ns5:arr et="15:13" src="Darwin"/><ns5:dep et="15:13" src="Darwin"/><ns5:plat>6</ns5:plat></ns5:Location><ns5:Location tpl="HANSLPJ" wtp="15:20"><ns5:pass et="15:18" src="Darwin"/></ns5:Location><ns5:Location tpl="RUGBY" wtp="15:34"><ns5:pass et="15:31" src="Darwin"/><ns5:plat platsup="true" cisPlatsup="true" platsrc="A">DFL</ns5:plat></ns5:Location></TS></uR></Pport> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,7 @@ impl Darwin { | |
fn updates_name(&self) -> &str { | ||
self.queue_updates | ||
.as_ref().map(|x| x as &str) | ||
.unwrap_or("darwin.pushport-v16") | ||
.unwrap_or("/topic/darwin.pushport-v16") | ||
} | ||
} | ||
impl StompType for Darwin { | ||
|
@@ -120,7 +120,7 @@ impl StompProcessor<Darwin> { | |
let stomp_host = conf.stomp_host; | ||
let sess = SessionBuilder::new(stomp_host, conf.stomp_port.unwrap_or(61613)) | ||
.with(Credentials(conf.username, conf.password)) | ||
.with(Header::new("client-id", "[email protected]")) | ||
.with(Header::new("client-id", conf.username)) | ||
.with(HeartBeat(5_000, 2_000)) | ||
.start(hdl.clone())?; | ||
let inner = Darwin { | ||
|