Beispiel #1
0
def interface_to_yaml(identifier):
    interface = utilities.get_interface(identifier)
    if utilities.is_action(interface):
        instance = interface.Goal()
    elif utilities.is_service(interface):
        instance = interface.Request()
    else:
        instance = interface()

    return message_to_yaml(instance)
Beispiel #2
0
 def __call__(self, prefix, parsed_args, **kwargs):
     action = get_action(getattr(parsed_args, self.action_type_key))
     return [message_to_yaml(action.Goal())]
Beispiel #3
0
 def __call__(self, prefix, parsed_args, **kwargs):
     service = get_service(getattr(parsed_args, self.service_type_key))
     return [message_to_yaml(service.Request())]
Beispiel #4
0
 def __call__(self, prefix, parsed_args, **kwargs):
     message = get_message(getattr(parsed_args, self.topic_type_key))
     return [message_to_yaml(message())]