Subscribe() public méthode

Subscribe to all channels whose name matches the regular expression. Note that to subscribe to all channels, you must specify ".*", not "*".
public Subscribe ( string regex, LCMSubscriber sub ) : void
regex string regular expression determining the channels to subscribe
sub LCMSubscriber subscribing object providing callback
Résultat void
Exemple #1
0
 private void subscribeForResponses()
 {
     _lcm.Subscribe(Channels.discovery_res_channel, new DiscoveryResponseHandler());
     _lcm.Subscribe(Channels.init_session_res_channel, new InitSessionResponseHandler());
     _lcm.Subscribe(Channels.end_session_res_channel, new EndSessionResponseHandler());
     _lcm.Subscribe(Channels.position_res_channel, new PositionResponseHandler());
     _lcm.Subscribe(Channels.stream_res_channel, new StreamUriResponseHandler());
     _lcm.Subscribe(Channels.start_program_res_channel, new StartProgramResponseHandler());
     _lcm.Subscribe(Channels.stop_program_res_channel, new StopProgramResponseHandler());
     _lcm.Subscribe(Channels.output_req_channel, new OutputRequestHandler());
     _lcm.Subscribe(Channels.program_status_mes_channel, new ProgramStatusUpdateHandler());
     _lcm.Subscribe(Channels.end_program_mes_channel, new EndProgramMessageReceivedHandler());
 }