Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

More debugging functionality (FlatBuffers + RT) #323

Merged
merged 12 commits into from
May 12, 2023
Merged

Conversation

pablohoch
Copy link
Member

FlatBuffers

Convert any FlatBuffers table or struct to JSON (not just Message or root types):

#include "motis/module/message.h"
using namespace motis::module;

Station const* table = ...
std::string json = fbs_table_to_json(table, "motis.Station");
std::string single_line_json = fbs_table_to_json(table, "motis.Station", json_format::SINGLE_LINE);

JSON trip ids:

#include "motis/core/debug/fbs.h"

schedule const& sched = ...
trip const* trp = ...
std::string json = debug::to_fbs_json(sched, trp);

RIS & RT

  • motis.ris.Message renamed to motis.ris.RISMessage (naming conflict because namespaces are ignored in some places in FlatBuffers related code, e.g. motis_copy_table)
  • Also renamed motis.ris.MessageUnion -> motis.ris.RISMessageUnion and motis.ris.MessageHolder -> motis.ris.RISMessageHolder for consistency
  • Added an optional message history feature for debugging RT updates
    • Enabled using the config option rt.history = 1 (disabled by default)
    • All received messages for a trip can be retrieved using the new /rt/message_history API (in RISMessage format)

RSL

  • Some check + debugging improvements

@pablohoch pablohoch merged commit 6bc64d3 into master May 12, 2023
@pablohoch pablohoch deleted the fbs-and-rt-debug branch May 12, 2023 17:34
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant