pkt.name = train.get_name();
comm.send(pkt);
}
- // XXX Need control enumeration to send control packets
+ for(unsigned j=0;; ++j)
+ {
+ const char *name = train.get_controller().enumerate_controls(j);
+ if(!name)
+ break;
+
+ TrainControlPacket pkt;
+ pkt.address = train.get_address();
+ pkt.control = name;
+ pkt.value = train.get_control(name);
+ comm.send(pkt);
+ }
{
TrainFunctionPacket pkt;
pkt.address = train.get_address();