diff --git a/source/chaos-proto b/source/chaos-proto index fbf1948102..14cff78e8d 160000 --- a/source/chaos-proto +++ b/source/chaos-proto @@ -1 +1 @@ -Subproject commit fbf19481022fc0384768993615a4303ca65691c1 +Subproject commit 14cff78e8d343a7a407096bdb66624feb710a339 diff --git a/source/jormungandr/tests/disruptions_tests.py b/source/jormungandr/tests/disruptions_tests.py index fb8214ee4c..7e61fb35b8 100644 --- a/source/jormungandr/tests/disruptions_tests.py +++ b/source/jormungandr/tests/disruptions_tests.py @@ -682,7 +682,9 @@ def test_disruption_on_route_and_line(self): channel = get_not_null(message[2], 'channel') assert channel['id'] == 'beacon' assert channel['name'] == 'beacon channel' - assert len(channel['types']) == 3 + assert len(channel['types']) == 4 + assert 'web' in channel['types'] + assert 'pids' in channel['types'] def test_disruption_date_filtering(self): """ diff --git a/source/kraken/fill_disruption_from_database.h b/source/kraken/fill_disruption_from_database.h index b4dc094ca4..bf0cd3c977 100644 --- a/source/kraken/fill_disruption_from_database.h +++ b/source/kraken/fill_disruption_from_database.h @@ -471,6 +471,8 @@ struct DisruptionDatabaseReader { channel->add_types(chaos::Channel_Type_title); } else if (type_ == "beacon") { channel->add_types(chaos::Channel_Type_beacon); + } else if (type_ == "pids") { + channel->add_types(chaos::Channel_Type_pids); } else { channel->add_types(chaos::Channel_Type_unkown_type); } diff --git a/source/kraken/make_disruption_from_chaos.cpp b/source/kraken/make_disruption_from_chaos.cpp index 7515f0e2d1..666f8020c5 100644 --- a/source/kraken/make_disruption_from_chaos.cpp +++ b/source/kraken/make_disruption_from_chaos.cpp @@ -323,6 +323,9 @@ static std::set create_channel_types(const chaos::C case chaos::Channel_Type_beacon: res.insert(nt::disruption::ChannelType::beacon); break; + case chaos::Channel_Type_pids: + res.insert(nt::disruption::ChannelType::pids); + break; default: res.insert(nt::disruption::ChannelType::unknown_type); LOG4CPLUS_WARN(log4cplus::Logger::getInstance("log"), diff --git a/source/navitia-proto b/source/navitia-proto index f66f1609ee..4f9d2ee859 160000 --- a/source/navitia-proto +++ b/source/navitia-proto @@ -1 +1 @@ -Subproject commit f66f1609ee04df1fcee19ae5f120524ff41cd5a1 +Subproject commit 4f9d2ee8596af7c4d28abda52c7b9916a61ee57f diff --git a/source/routing/tests/routing_api_test_data.h b/source/routing/tests/routing_api_test_data.h index f9dfd75e4e..ff3033bfed 100644 --- a/source/routing/tests/routing_api_test_data.h +++ b/source/routing/tests/routing_api_test_data.h @@ -822,7 +822,7 @@ struct routing_api_data { "content type", default_date, default_date, - {ChannelType::web, ChannelType::title, ChannelType::beacon}, + {ChannelType::web, ChannelType::title, ChannelType::beacon, ChannelType::pids}, {}}); disruption_maker.impact() diff --git a/source/type/message.h b/source/type/message.h index 916181fe61..908071475a 100644 --- a/source/type/message.h +++ b/source/type/message.h @@ -69,7 +69,19 @@ enum class Effect { enum class ActiveStatus { past = 0, active = 1, future = 2 }; -enum class ChannelType { web = 0, sms, email, mobile, notification, twitter, facebook, unknown_type, title, beacon }; +enum class ChannelType { + web = 0, + sms, + email, + mobile, + notification, + twitter, + facebook, + unknown_type, + title, + beacon, + pids +}; inline std::string to_string(Effect effect) { switch (effect) { @@ -149,6 +161,8 @@ inline std::string to_string(ChannelType ct) { return "title"; case ChannelType::beacon: return "beacon"; + case ChannelType::pids: + return "pids"; default: throw navitia::exception("unhandled channeltype case"); } diff --git a/source/type/pb_converter.cpp b/source/type/pb_converter.cpp index e8332edf94..5d457a821e 100644 --- a/source/type/pb_converter.cpp +++ b/source/type/pb_converter.cpp @@ -1389,6 +1389,9 @@ void PbCreator::Filler::fill_pb_object(const nd::Impact* impact, pbnavitia::Impa case nd::ChannelType::beacon: pb_channel->add_channel_types(pbnavitia::Channel::beacon); break; + case nd::ChannelType::pids: + pb_channel->add_channel_types(pbnavitia::Channel::pids); + break; } } }