Minor tweaks to get streaming from mock working
- Key point there being boats, raceand regatta xml files are being read from mock #story[778]
This commit is contained in:
@@ -44,7 +44,7 @@ public class MockOutput implements Runnable
|
|||||||
|
|
||||||
public MockOutput() throws IOException {
|
public MockOutput() throws IOException {
|
||||||
lastHeartbeatTime = System.currentTimeMillis();
|
lastHeartbeatTime = System.currentTimeMillis();
|
||||||
serverSocket = new ServerSocket(4942);
|
serverSocket = new ServerSocket(4945);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* calculates the time since last heartbeat
|
* calculates the time since last heartbeat
|
||||||
@@ -140,9 +140,9 @@ public class MockOutput implements Runnable
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
parseXMLString(boatsXml, XMLMessage.XMLTypeBoat);
|
|
||||||
parseXMLString(raceXml, XMLMessage.XMLTypeRace);
|
parseXMLString(raceXml, XMLMessage.XMLTypeRace);
|
||||||
parseXMLString(regattaXml, XMLMessage.XMLTypeRegatta);
|
parseXMLString(regattaXml, XMLMessage.XMLTypeRegatta);
|
||||||
|
parseXMLString(boatsXml, XMLMessage.XMLTypeBoat);
|
||||||
|
|
||||||
/*******************************Test********************************/
|
/*******************************Test********************************/
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<raceId>5326</raceId>
|
<raceId>5326</raceId>
|
||||||
<boats>
|
<boats>
|
||||||
<boat>
|
<boat>
|
||||||
<name>ORACLE TEAM USA</name>
|
<name>Team 7</name>
|
||||||
<speed>20</speed>
|
<speed>20</speed>
|
||||||
<abbr>USA</abbr>
|
<abbr>USA</abbr>
|
||||||
<sourceID>121</sourceID>
|
<sourceID>121</sourceID>
|
||||||
|
|||||||
@@ -161,7 +161,8 @@ public class StreamedCourseXMLReader extends XMLReader {
|
|||||||
* @return value of "compoundMarkID" attribute
|
* @return value of "compoundMarkID" attribute
|
||||||
*/
|
*/
|
||||||
private int getCompoundMarkID(Element element) {
|
private int getCompoundMarkID(Element element) {
|
||||||
return Integer.parseInt(element.getAttribute("CompoundMarkID"));
|
//return Integer.parseInt(element.getAttribute("CompoundMarkID"));
|
||||||
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ public class VisualiserInput implements Runnable
|
|||||||
|
|
||||||
public VisualiserInput(StreamedCourse course) throws IOException{
|
public VisualiserInput(StreamedCourse course) throws IOException{
|
||||||
|
|
||||||
//connectionSocket = new Socket(InetAddress.getLocalHost(), 4942);
|
this.connectionSocket = new Socket(InetAddress.getLocalHost(), 4945);
|
||||||
this.connectionSocket = new Socket("livedata.americascup.com",4941);
|
// this.connectionSocket = new Socket("livedata.americascup.com",4941);
|
||||||
|
|
||||||
this.course = course;
|
this.course = course;
|
||||||
this.boatLocation = new HashMap<>();
|
this.boatLocation = new HashMap<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user