parameters: (msg_context, text, full_name)
return_statement: return SrvSpec(msg_in, msg_out, text, full_name)
docstring: Load :class:`SrvSpec` from the .srv file.
      
      :param msg_context: :class:`MsgContext` instance to load request/response messages into.
      :param text: .msg text , ``str``
      :param package_name: context to use for msg type name, i.e. the package name,
        or '' to use local naming convention. ``str``
      :returns: :class:`SrvSpec` instance
      :raises :exc:`InvalidMsgSpec` If syntax errors or other problems are detected in file
docstring_summary: Load :class:`SrvSpec` from the .srv file.
      
      :param msg_context: :class:`MsgContext` instance to load request/response messages into.
      :param text: .msg text , ``str``
      :param package_name: context to use for msg type name, i.e. the package name,
        or '' to use local naming convention. ``str``
      :returns: :class:`SrvSpec` instance
      :raises :exc:`InvalidMsgSpec` If syntax errors or other problems are detected in file
docstring_tokens: Load : class : SrvSpec from the . srv file . : param msg_context : : class : MsgContext instance to load request / response messages into . : param text : . msg text str : param package_name : context to use for msg type name i . e . the package name or to use local naming convention . str : returns : : class : SrvSpec instance : raises : exc : InvalidMsgSpec If syntax errors or other problems are detected in file
function: def load_srv_from_string(msg_context, text, full_name):
      """
      Load :class:`SrvSpec` from the .srv file.
      
      :param msg_context: :class:`MsgContext` instance to load request/response messages into.
      :param text: .msg text , ``str``
      :param package_name: context to use for msg type name, i.e. the package name,
        or '' to use local naming convention. ``str``
      :returns: :class:`SrvSpec` instance
      :raises :exc:`InvalidMsgSpec` If syntax errors or other problems are detected in file
      """
      text_in  = StringIO()
      text_out = StringIO()
      accum = text_in
      for l in text.split('\n'):
          l = l.split(COMMENTCHAR)[0].strip() #strip comments        
          if l.startswith(IODELIM): #lenient, by request
              accum = text_out
          else:
              accum.write(l+'\n')
  
      # create separate MsgSpec objects for each half of file
      msg_in = load_msg_from_string(msg_context, text_in.getvalue(), '%sRequest'%(full_name))
      msg_out = load_msg_from_string(msg_context, text_out.getvalue(), '%sResponse'%(full_name))
      return SrvSpec(msg_in, msg_out, text, full_name)
function_tokens: def load_srv_from_string ( msg_context , text , full_name ) : text_in = StringIO ( ) text_out = StringIO ( ) accum = text_in for l in text . split ( '\n' ) : l = l . split ( COMMENTCHAR ) [ 0 ] . strip ( ) #strip comments         if l . startswith ( IODELIM ) : #lenient, by request accum = text_out else : accum . write ( l + '\n' ) # create separate MsgSpec objects for each half of file msg_in = load_msg_from_string ( msg_context , text_in . getvalue ( ) , '%sRequest' % ( full_name ) ) msg_out = load_msg_from_string ( msg_context , text_out . getvalue ( ) , '%sResponse' % ( full_name ) ) return SrvSpec ( msg_in , msg_out , text , full_name )