/// <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); }
/// <summary> /// Initializes a new instance of the <see cref="rclcs.Node"/> class. /// Takes the node name /// </summary> /// <param name="_Name">Name.</param> public Node(string _Name) { //Create a rcl_node which is a wrapper of the native methods InternalNode = rcl_node.create_native_node(_Name); Name = _Name; }
/// <summary> /// Initializes a new instance of the <see cref="rclcs.Node"/> class. /// Takes the node name /// </summary> /// <param name="_Name">Name.</param> /// <param name="_Namespace">Namespace.</param> public Node(string _Name, string _Namespace = "") { //Create a rcl_node which is a wrapper of the native methods InternalNode = new rcl_node(_Name, _Namespace); Name = _Name; }