Skip to content

Commit

Permalink
Merge pull request #177 from HSLdevcom/develop
Browse files Browse the repository at this point in the history
1.3.20
  • Loading branch information
mjaakko authored Mar 9, 2021
2 parents eae8fce + 7b2ffbb commit 4088645
Show file tree
Hide file tree
Showing 24 changed files with 9,873 additions and 3,825 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>fi.hsl</groupId>
<artifactId>transitdata-common</artifactId>
<version>1.3.17</version>
<version>1.3.20</version>
<packaging>jar</packaging>
<name>Common utilities for Transitdata projects</name>
<properties>
Expand Down
12 changes: 12 additions & 0 deletions protos/eke.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
syntax = "proto2";

package proto;

option java_package = "fi.hsl.common.transitdata.proto";
option java_outer_classname = "Eke";

message EkeSummary {
required int64 ekeDate = 1;
required int32 trainNumber = 2;
required string topicPart = 3;
}
4 changes: 4 additions & 0 deletions protos/generate-protos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ protoc mqtt.proto --java_out=../src/main/java/
protoc hfp.proto --java_out=../src/main/java/

protoc metro-ats.proto --java_out=../src/main/java/

protoc passenger-count.proto --java_out=../src/main/java/

protoc eke.proto --java_out=../src/main/java/
1 change: 1 addition & 0 deletions protos/internal-messages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ message StopEstimate {
optional int64 estimated_time_utc_ms = 7;
optional int64 scheduled_time_utc_ms = 8;
required int64 last_modified_utc_ms = 9;
optional bool observed_time = 10 [default = false]; //True if the estimated time was observed (i.e. true if the vehicle has already passed the stop)
}

message Bulletin {
Expand Down
52 changes: 52 additions & 0 deletions protos/passenger-count.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
syntax = "proto2";

package proto;

option java_package = "fi.hsl.common.passengercount.proto";
option java_outer_classname = "PassengerCount";

message Data {
required int32 SchemaVersion = 1 [default = 1];
optional string topic = 2;
required Payload payload = 3;
}

message Payload {
required string desi = 1;
required string dir = 2;
required int32 oper = 3;
required int32 veh = 4;
required int64 tst = 5;
required int64 tsi = 6;
required double lat = 7;
required double long = 8;
required double odo = 9;
required string oday = 10;
required int32 jrn = 11;
required int32 line = 12;
required string start = 13;
required string loc = 14;
required int32 stop = 15;
required string route = 16;
required VehicleCounts vehicleCounts = 17;
}

message VehicleCounts{
required string countQuality = 1;
required int32 vehicleLoad = 2;
required double vehicleLoadRatio = 3;
repeated DoorCount doorCounts = 4;
optional string extensions = 5;
}

message DoorCount{
required string door = 1;
repeated Count count = 2;
}

message Count{
required string clazz = 1;
required int32 in = 2;
required int32 out = 3;
}

Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ public void testPulsarWithMultipleTopics() throws Exception {
o1.put("pulsar.consumer.enabled", false);
o1.put("redis.enabled", false);
o1.put("pulsar.producer.multipleProducers", true);
o1.put("pulsar.producer.topics", String.join(",",formatTopicName("test-1") , formatTopicName("test-2")));
String topic1 = formatTopicName("test-1");
String topic2 = formatTopicName("test-2");
o1.put("pulsar.producer.topics", String.join(",",topic1 , topic2));
o1.put("pulsar.producer.topicKeys",topic1 + "=test-1," + topic2 + "=test-2");
Config producer1Config = PulsarMockApplication.readConfigWithOverrides("integration-multiprod-test.conf", o1);

PulsarApplication app = PulsarMockApplication.newInstance(producer1Config, redis, pulsar);
Expand Down
Loading

0 comments on commit 4088645

Please sign in to comment.