<s> import groundstation . proto . channel_list_pb2 <EOL> from groundstation import logger <EOL> log = logger . getLogger ( __name__ ) <EOL> def handle_listallchannels ( self ) : <EOL> log . info ( "<STR_LIT>" ) <EOL> payload = self . station . channels ( ) <EOL> log . info ( "<STR_LIT>" % ( len ( payload ) ) ) <EOL> chunk = groundstation . proto . channel_list_pb2 . ChannelList ( ) <EOL> for channel in payload : <EOL> log . debug ( "<STR_LIT>" % ( channel ) ) <EOL> description = chunk . channels . add ( ) <EOL> description . channelname = channel <EOL> grefs = self . station . grefs ( channel ) <EOL> for gref in grefs : <EOL> log . debug ( "<STR_LIT>" % ( gref ) ) <EOL> _gref = description . grefs . add ( ) <EOL> _gref . identifier = gref . identifier <EOL> for tip in gref : <EOL> log . debug ( "<STR_LIT>" % ( tip ) ) <EOL> _tip = _gref . tips . add ( ) <EOL> _tip . tip = tip <EOL> response = self . _Response ( self . id , "<STR_LIT>" , <EOL> chunk . SerializeToString ( ) ) <EOL> self . stream . enqueue ( response ) <EOL> self . TERMINATE ( ) </s>
