/// <summary> /// Initializes a new instance of the <see cref="rclcs.rcl_node"/> class. /// </summary> /// <param name="name">Name.</param> /// <param name="namespace_">Namespace.</param> public rcl_node_linux(string name, string namespace_ = "") : base(name, namespace_) { rcl_node_t node = rcl_get_zero_initialized_node(); rcl_node_options_t default_options = rcl_node_get_default_options(); int ret = rcl_node_init(ref node, name, namespace_, ref default_options); native_handle = node; }
/// <summary> /// Creates the native node. /// Moving this method into the constructor resulted into an error /// </summary> /// <returns>The native node.</returns> /// <param name="name">Name.</param> public static rcl_node create_native_node(string name) { rcl_node_t node = rcl_get_zero_initialized_node(); rcl_node_options_t default_options = rcl_node_get_default_options(); int ret = rcl_node_init(ref node, name, ref default_options); rcl_node local_node = new rcl_node(node); return(local_node); }
static extern int rcl_node_init(ref rcl_node_t node, [MarshalAs(UnmanagedType.LPStr)] string name, ref rcl_node_options_t options);