/// <summary> /// Gets the names of all cameras attached to the robot /// </summary> /// <returns>A collection of camera names, or an empty collection if the robot has no cameras or is disconnected</returns> public static IEnumerable <string> GetCameras() { NetworkTree network = GetTableOutline("CameraPublisher"); foreach (NetworkElement elm in network.Children) { if (elm.Type == typeof(NetworkTree)) { yield return(elm.Name); } } }
internal NetworkElement(string name, Type type, NetworkTree parent = null) { Name = name; Type = type; if (parent != null) { FullPath = parent.FullPath + "/" + name; } else { FullPath = "/" + name; } }
internal NetworkTree(string root, ITable baseTree = null, NetworkTree parent = null) : base(root, typeof(NetworkTree), parent) { ConstructChildren(root, baseTree); }