Example #1
0
        public rcl_service(rcl_node_t _node, rosidl_service_type_support_t typesupport, string service_name, rcl_service_options_t options)
        {
            native_node   = _node;
            native_handle = rcl_get_zero_initialized_service();
            int             ret    = rcl_service_init(ref native_handle, ref native_node, ref typesupport, service_name, ref options);
            RCLReturnValues retVal = (RCLReturnValues)ret;

            switch (retVal)
            {
            case RCLReturnValues.RCL_RET_OK:

                break;

            case RCLReturnValues.RCL_RET_NODE_INVALID:
                throw new RCLNodeInvalidException();
                break;

            case RCLReturnValues.RCL_RET_INVALID_ARGUMENT:
                throw new RCLInvalidArgumentException();
                break;

            case RCLReturnValues.RCL_RET_SERVICE_INVALID:
                throw new RCLServiceInvalidException();
                break;

            case RCLReturnValues.RCL_RET_BAD_ALLOC:
                throw new RCLBadAllocException();
                break;

            case RCLReturnValues.RCL_RET_ERROR:

                break;

            default:
                break;
            }
        }
Example #2
0
 extern static IntPtr rcl_service_get_options(ref rcl_service_t service);
Example #3
0
 extern static string rcl_service_get_service_name(ref rcl_service_t service);
Example #4
0
 extern static int rcl_send_response(ref rcl_service_t service, ref rmw_request_id_t request_header, [In, Out] ValueType ros_response);
Example #5
0
 extern static int rcl_take_request(ref rcl_service_t service, ref rmw_request_id_t request_header, [In, Out] ValueType ros_request);
Example #6
0
 extern static int rcl_service_fini(ref rcl_service_t service, ref rcl_node_t node);
Example #7
0
 extern static int rcl_service_init(ref rcl_service_t service, ref rcl_node_t node, ref rosidl_service_type_support_t type_support, string topic_name, ref rcl_service_options_t options);