public ccParameter(int index, string name, byte typeIdx, UInt32 arrayLen, routedNode owner) { Index = index; Name = name; type = getTypeFromCode(typeIdx); TypeIdx = typeIdx; ArrayLen = arrayLen; Owner = owner; }
public void enumerateResponse(routedMessage resp) { route from = resp.Route.getReturnRoute(); commandReader reader = resp.getReader(); reader.ReadByte(); string name = reader.ReadString(); //add to tree under parent //_parent.findNode(from); routedNode p = _parent; //problem with not having the first part of the address // TODO do it properly! int i; if (from.Length > 1) { p = p.children[0]; for (i = 1; i < from.Length - 1; i++) { byte childIdx = from.getLink(i - 1); p = p.children[childIdx]; } p.children.Add(from.getLink(i - 1), new routedNode(name, from)); } else { p.children.Add(0, new routedNode(name, from)); } // else if (from.Length == 2) p.children[0].children.Add((byte)p.children[0].children.Count, new routedNode(name, from)); // else p.children.Add(from.getLink(i-1), new routedNode(name,from)); //add children to unwalked list try { while (1 == 1) { byte con = reader.ReadByte(); UnwalkedRoutes.Add(new route(from, con)); } } catch (Exception) { } }
public routedObject findNode(string name) { routedNode n = node.findNode(name); if (n != null) { return new routedObject() { node = n, con = con } } ; else { return(null); } }
public routedTreeWalker(routedNode parent) { _parent = parent; UnwalkedRoutes.Add(route.DirectLink); }