<s> from rosbridge_library . protocol import Protocol <EOL> from rosbridge_library . capabilities . call_service import CallService <EOL> from rosbridge_library . capabilities . advertise import Advertise <EOL> from rosbridge_library . capabilities . publish import Publish <EOL> from rosbridge_library . capabilities . subscribe import Subscribe <EOL> from rosbridge_library . capabilities . defragmentation import Defragment <EOL> from rosbridge_library . capabilities . advertise_service import AdvertiseService <EOL> from rosbridge_library . capabilities . service_response import ServiceResponse <EOL> from rosbridge_library . capabilities . unadvertise_service import UnadvertiseService <EOL> class RosbridgeProtocol ( Protocol ) : <EOL> """<STR_LIT>""" <EOL> rosbridge_capabilities = [ CallService , Advertise , Publish , Subscribe , Defragment , AdvertiseService , ServiceResponse , UnadvertiseService ] <EOL> print "<STR_LIT>" <EOL> for cap in rosbridge_capabilities : <EOL> print "<STR_LIT>" , str ( cap ) <EOL> parameters = None <EOL> def __init__ ( self , client_id , parameters = None ) : <EOL> self . parameters = parameters <EOL> Protocol . __init__ ( self , client_id ) <EOL> for capability_class in self . rosbridge_capabilities : <EOL> self . add_capability ( capability_class ) </s>
