+ if(ev.type=="route-changed")
+ {
+ TrainRoutePacket pkt;
+ pkt.address = train.get_address();
+ if(const Route *route = ev.value.value<const Route *>())
+ pkt.route = route->get_name();
+ send(pkt);
+ }
+ else if(ev.type=="status-changed")
+ {
+ TrainStatusPacket pkt;
+ pkt.address = train.get_address();
+ pkt.status = ev.value.value<std::string>();
+ send(pkt);
+ }