Parse string to tree structure (solved)

General FreeBASIC programming questions.
dodicat
Posts: 6503
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Parse string to tree structure

Postby dodicat » Mar 22, 2020 21:52

That's nice grindstone.
I hope your little friend returns this Spring.
badidea
Posts: 2058
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Parse string to tree structure

Postby badidea » Mar 22, 2020 22:59

I changed my version, but it still crashes on Windows. It seems I cannot use redim. https://freebasic.net/wiki/wikka.php?wakka=KeyPgredim says:
"Using Redim within a member procedure with an array that contains the instance of the object class is undefined, and will [hopefully] result in horrible crashes (if array data are shifted in memory, the This reference becomes incoherent, similarly to a dangling pointer)."
So, re-write to pointers and classic memory allocation...

Code: Select all

function countInStr(text as string, char as string) as integer
   dim as integer count = 0
   for i as integer = 0 to len(text) - 1
      if text[i] = asc(char) then count += 1
   next
   return count
end function

'-------------------------------------------------------------------------------

type tree_fwd as tree_type 'forward declaration

type sub_tree
   dim as string path
   dim as tree_fwd ptr pChild
end type

type tree_type
   dim as string item(any)
   dim as sub_tree subTree(any)
   declare sub addItem(objectStr as string, sepChar as string)
   declare sub show(depth as integer = 0)
   declare sub cleanup()
end type

'object = item or tree
sub tree_type.addItem(objectStr as string, sepChar as string)
   dim as integer i, j
   if objectStr[0] <> asc(sepChar) then
      print "Fail: Bad input"
      exit sub
   end if
   if countInStr(objectStr, sepChar) = 1 then
      dim as string itemStr = mid(objectStr, 2) 'all after "/"
      dim as integer ub = ubound(item)
      redim preserve item(ub + 1)
      'find insert location
      for i = 0 to ub
         if itemStr < item(i) then exit for
      next
      'move other items below
      for j = ub to i step -1
         item(j + 1) = item(j)
      next
      'insert new item
      item(i) = itemStr
   else
      dim as integer nextSepPos = instr(2, objectStr, sepChar)
      dim as string pathStr = mid(objectStr, 2, nextSepPos - 2)
      dim as string remObjStr = mid(objectStr, nextSepPos)
      for i = 0 to ubound(subTree)
         if subTree(i).path = pathStr then exit for
      next
      if i <= ubound(subTree) then 'match found
         subTree(i).pChild->addItem(remObjStr, sepChar)
      else
         'add sub tree
         dim as integer ub = ubound(subTree)
         redim preserve subTree(ub + 1)
         'find insert location
         for i = 0 to ub
            if pathStr < subTree(i).path then exit for
         next
         'move other items below
         for j = ub to i step -1
            subTree(j + 1) = subTree(j)
         next
         'insert new item
         subTree(i).path = pathStr
         subTree(i).pChild = allocate(sizeof(tree_type))
         subTree(i).pChild->addItem(remObjStr, sepChar)
      end if
   end if
end sub

sub tree_type.show(depth as integer = 0)
   dim as string indentStr = string(depth * 2, " ") + "+ "
   for i as integer = 0 to ubound(item)
      color 14, 0 'item in yellow
      print indentStr & item(i)
      color 15, 0
   next
   for i as integer = 0 to ubound(subTree)
      color 10, 0 'path in green
      print indentStr & subTree(i).path
      color 15, 0
      subTree(i).pChild->show(depth + 1)
   next
end sub

sub tree_type.cleanup()
   for i as integer = 0 to ubound(subTree)
      subTree(i).pChild->cleanup()
      deallocate(subTree(i).pChild)
   next
   erase item, subTree
end sub

'-------------------------------------------------------------------------------

dim as string inputStr(...) = { _
   "/itemE",_
   "/path1/path2/itemA", _
   "/path1/path2/itemC", _
   "/path1/path2/itemB", _
   "/path2/path2/itemX", _
   "/path4/path5/path6/path7/itemQ", _
   "/path4/path5/path8/path7/itemR", _
   "/path4/path5/path6/path7/itemP", _
   "/path3/itemC", _
   "/path3/itemC", _
   "/itemD"}

dim as tree_type tree

for i as integer = 0 to ubound(inputStr)
   tree.addItem(inputStr(i), "/")
next
tree.show()
tree.cleanup()
tree.show()
print "end"
sleep
fxm
Posts: 9645
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Parse string to tree structure

Postby fxm » Mar 23, 2020 6:34

badidea wrote:I changed my version, but it still crashes on Windows. It seems I cannot use redim. https://freebasic.net/wiki/wikka.php?wakka=KeyPgredim says:
"Using Redim within a member procedure with an array that contains the instance of the object class is undefined, and will [hopefully] result in horrible crashes (if array data are shifted in memory, the This reference becomes incoherent, similarly to a dangling pointer)."
No, you are not in such a situation (seeing your code at viewtopic.php?p=269973#p269973), and so the error does not come from that.

But on the other hand, you cannot only allocate (and deallocate at end) memory for creating an instance of tree_type, because this instance must also be built (and destroyed at the end), because it contains three descriptors of dynamic arrays:
  • After:
    pSubTree(ub + 1) = allocate(sizeof(tree_type))
    add:
    pSubTree(ub + 1)->constructor()
  • Before:
    deallocate(pSubTree(i))
    add:
    pSubTree(i)->destructor()
But the simplest is to use new/delete instead:
  • Instead of:
    pSubTree(ub + 1) = allocate(sizeof(tree_type))
    use:
    pSubTree(ub + 1) = new tree_type
  • Instead of:
    deallocate(pSubTree(i))
    use:
    delete pSubTree(i)

Note:
Your latest version (just above) also crashes on my PC for a similar reason (see tree_type and sub_tree) => similar change (to call the constructors/destructors).
UEZ
Posts: 563
Joined: May 05, 2017 19:59
Location: Germany

Re: Parse string to tree structure

Postby UEZ » Mar 23, 2020 10:19

My two previous versions don't work properly.

This is now my 3rd and maybe last attempt:

Code: Select all

#Define LF   Chr(10)
#Define CRLF Chr(13) & Chr(10)
#Define INDENT "  "
#Define PREFIX "+ "

Dim Shared As String * 255 u
For n As Long = 0 To 255
    u[n] = Iif(n < 91 Andalso n > 64, n + 32, n)  'lookup string
Next

Sub QuicksortUp(low As String Ptr,high As String Ptr) 'by dodicat
    If (high - low <= 1) Then Return
    Var J = low + 1, I = J, lenb = Cast(Integer Ptr, low)[1], lena=0
    While J <= high
        lena = Cast(Integer Ptr, J)[1] '=Len(*a)
        If lena > lenb Then lena = lenb
        For n As Long = 0 To lena - 1
            If u[(J)[0][n]] < u[(low)[0][n]] Then Swap *J, *I : I += 1 : Exit For
            If u[(J)[0][n]] > u[(low)[0][n]] Then Exit For
        Next
        J + =1
    Wend
    J = I - 1 : Swap *low, *J
    QuicksortUp(low, J)
    QuicksortUp(I, high)
End Sub

Sub StringSplit(sString As String, aResult() As String, sDelimiter As String = "/")
   Dim As Uinteger j = 0, i, ii = 1
   If Left(sString, 1) = sDelimiter Then sString = Ltrim(sString, "/")
   For i = 1 To Len(sString)
      If Mid(sString, i, 1) = sDelimiter Then
         Redim Preserve aResult(Ubound(aResult) + 1)
         aResult(j) = Mid(sString, ii, i - ii)
         j += 1
         i += 1
         ii = i
      End If
   Next
   If ii < i Then
      aResult(j) = Mid(sString, ii, i - ii)
   Else
      Redim Preserve aResult(j - 1)
   End If
End Sub

Sub PrintDirStructur(sPathes As String, sepChar As String)
   ReDim As String aPathes(1000)
   Dim As String char
   Dim As Integer i = 1, ii = 1, c = 0, d = 0, x, y, dimx = 0

   While i <= Len(sPathes) 'loop all characters
      char = Mid(sPathes, i, 1)
      If char = sepChar Then d+= 1 'current depth
      If Asc(char) = 10 Then 'LF
         aPathes(c) = Mid(sPathes, ii, i - ii) 'one complete line
         c += 1 'line count
         i += 1 'input iterator
         ii = i 'previous
         If dimx < d Then dimx = d 'increase max depth
         d = 0 'reset current depth
      Else
         i += 1 'No LF
      End If   
   Wend
   If ii < i Then 'add the last line
      aPathes(c) = Mid(sPathes, ii, i - ii)
   Else
      c -= 1 'correct line count
   End If
   Redim Preserve aPathes(c) 'shrink array size
   QuicksortUp(@aPathes(0), @aPathes(c))
   ? "Input pathes sorted:"
   For i = 0 To Ubound(aPathes)
      ? aPathes(i)
   Next
   ?
   ?
   ? "Formatted:" : ?
   ?
   Dim As String aTree(dimx * c, dimx - 1) 'allocate for worst case
   Dim As String aLine()
   Dim As Integer px, py = 0, found, yy

   For i = 0 To Ubound(aPathes) 'loop all full paths
      Redim aLine(0)
      StringSplit(aPathes(i), aLine(), sepChar) 'split path into segments
      px = 0
      For x = 0 To Ubound(aLine) 'loop path segments
         y = py - 1
         found = 0
       While y > -1
          If aLine(x) = aTree(y, px) Then
            If x > 0 Then
               yy = py
               While yy >= y
                  If aTree(yy, px - 1) <> "" Then Exit While
                  yy -= 1
               Wend
               If yy > y Then
                  found = 0
               Else
                  found = 1
               End If
            Else
               found = 1
            End If
          End If
         y -= 1
       Wend
         If found = 1 Then
            px += 1
         Else
            aTree(py, px) = aLine(x)
            px += 1
            py += 1
         End if
      Next
   Next
   Dim As String sOutput, tc, tn
   
   For y = 0 To py
      For x = 0 To Ubound(aTree, 2)
         sOutput &= Iif(aTree(y, x) <> "", PREFIX + aTree(y, x), "") + INDENT
      Next
      sOutput &= CRLF
   Next
   ? sOutput
End Sub

Dim As String sPathes = _
   "/itemE" & LF & _
   "/path1/path2/itemA" & LF & _
   "/path1/path2/itemC" & LF & _
   "/path1/path2/itemB" & LF & _
   "/path2/path2/itemX" & LF & _
   "/path4/path5/path6/path7/itemQ" & LF & _
   "/path4/path5/path8/path7/itemR" & LF & _
   "/path4/path5/path6/path7/itemP" & LF & _
   "/path3/itemC" & LF & _
   "/itemD"

PrintDirStructur(sPathes, "/")

Sleep


Edit: still not working properly :-(

٩(●̮̮̃•̃)۶
Last edited by UEZ on Mar 24, 2020 15:45, edited 1 time in total.
dodicat
Posts: 6503
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Parse string to tree structure

Postby dodicat » Mar 23, 2020 13:42

badidea -- From your first code.
1) create static path() and pSubTree() to avoid pointers and keep the ubounds the same for bubblesort.
2) tweak bubblesort to standard layout and sort up
3) supply a get out for recursive sub .show.
Result:

Code: Select all

function countInStr(text as string, char as string) as integer
   dim as integer count = 0
   for i as integer = 0 to len(text) - 1
      if text[i] = asc(char) then count += 1
   next
   return count
end function

function findInList(list() as string, find as string) as integer
   for i as integer = 0 to ubound(list)
      if list(i) = find then return i
   next
   return -1
end function

sub bubbleSort(list() as string)
   for i as integer = lbound(list) to ubound(list)-1
      for j as integer = i+1 to ubound(list)
         if list(i) > list(j) then
            swap list(i), list(j)
         end if
      next
   next
end sub

'-------------------------------------------------------------------------------

type tree_type
   dim as string item(any)
   static as string path(any)
   static as tree_type pSubTree(any)
   declare sub addItem(objectStr as string, sepChar as string)
   declare sub show(depth as integer = 0)
   declare sub cleanup()
   
end type
redim tree_type.pSubTree(0)
redim tree_type.path(0)

'object = item or tree
sub tree_type.addItem(objectStr as string, sepChar as string)
   if objectStr[0] <> asc(sepChar) then
      print "Fail: Bad input"
      exit sub
   end if
   if countInStr(objectStr, sepChar) = 1 then
      dim as integer ub = ubound(item)
      redim preserve item(ub + 1)
      item(ub + 1) = mid(objectStr, 2) 'note mid starts at 1
      bubbleSort(item())
   else
      dim as integer nextSepPos = instr(2, objectStr, sepChar)
      dim as string pathStr = mid(objectStr, 2, nextSepPos - 2)
      dim as string remObjStr = mid(objectStr, nextSepPos)
      dim as integer index = findInList(path(), pathStr)
      if index >= 0 then
         pSubTree(index).addItem(remObjStr, sepChar)
      else
         'add sub tree
         dim as integer ub = ubound(pSubTree)
         redim preserve path(ub + 1)
         path(ub + 1) = pathStr
         redim preserve pSubTree(ub + 1)
       
        ' pSubTree(ub + 1) = allocate(sizeof(tree_type)) <<<--- use the static array instead
         pSubTree(ub + 1).addItem(remObjStr, sepChar)
         'bubble sort with 2nd array
        ' print ubound(path),ubound(psubtree) 'ok  they are equal
         for i as integer = lbound(path) to ubound(path)-1 'STANDARD BUBBLESORT -- up
            for j as integer = i+1 to ubound(path)
               if path(i) > path(j) then
                  swap path(i), path(j)  'no problem, both ubounds are equal
                  swap pSubTree(i), pSubTree(j)
               end if
            next
         next
      end if
   end if
end sub


sub tree_type.show(depth as integer = 0)
    static as long start=-1
    start+=1
   dim as string indentStr = string(depth * 2, " ") + "+ "
   for i as integer = 0 to ubound(item)
      color 14, 0 'item in yellow
      print indentStr & item(i)
      color 15, 0
   next
   for j as integer = start to ubound(path)
      color 10, 0 'path in green
      print indentStr & path(j)
      color 15, 0
      pSubTree(j).show(depth + 1)
   next j
end sub


sub tree_type.cleanup()
   'for i as integer = 0 to ubound(pSubTree)  <<-- not needed
      'pSubTree(i)->cleanup()
      'deallocate(pSubTree(i))
   'next
   erase item, path, pSubTree
end sub

'-------------------------------------------------------------------------------

dim as string inputStr(...) = { _
   "/itemE",_
   "/path1/path2/itemA", _
   "/path1/path2/itemC", _
   "/path1/path2/itemB", _
   "/path2/path2/itemX", _
   "/path4/path5/path6/path7/itemQ", _
   "/path4/path5/path8/path7/itemR", _
   "/path4/path5/path6/path7/itemP", _
   "/path3/itemC", _
   "/path3/itemC", _
   "/itemD"}

dim as tree_type tree

for i as integer = 0 to ubound(inputStr)
   tree.addItem(inputStr(i), "/")
   
next
tree.show()
'tree.cleanup()
print "end"
sleep
 

tested Win 10
Last edited by dodicat on Mar 23, 2020 14:35, edited 2 times in total.
grindstone
Posts: 722
Joined: May 05, 2015 5:35
Location: Germany

Re: Parse string to tree structure

Postby grindstone » Mar 23, 2020 13:56

@badidea: With that "double - typing" you're making it unnecessary complicated. You can simply put it all in a single type...

Code: Select all

type tree_type
   dim as string path
   dim as string item(any)
   dim as tree_type ptr pChild(any)
   declare sub addItem(objectStr as string, sepChar as string)
   declare sub show(depth as integer = 0)
   declare sub cleanup()
end type

...and avoid the sub_tree type as well as the forward referencing.

And if you make the cleanup sub a destructor it will be automatically called if you delete an instance of tree-type.

Furthermore: From my experience mixing up record access (by dot) and pointer access (by arrow) is begging for trouble. You should consequently use one method or the other. For a tree structure I would strongly recommend the pointer access.
dodicat
Posts: 6503
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Parse string to tree structure

Postby dodicat » Mar 23, 2020 14:28

badidea -- from your second code, and agreeing with grindstone about using only one type structure, but disagreeing about using pointers.

Code: Select all

function countInStr(text as string, char as string) as integer
   dim as integer count = 0
   for i as integer = 0 to len(text) - 1
      if text[i] = asc(char) then count += 1
   next
   return count
end function

'-------------------------------------------------------------------------------



type tree_type
    as string path
   dim as string item(any)
   static as tree_type subTree(any)
   declare sub addItem(objectStr as string, sepChar as string)
   declare sub show(depth as integer = 0)
   declare sub cleanup()
end type
redim tree_type.subTree(0)
'object = item or tree
sub tree_type.addItem(objectStr as string, sepChar as string)
   dim as integer i, j
   if objectStr[0] <> asc(sepChar) then
      print "Fail: Bad input"
      exit sub
   end if
   if countInStr(objectStr, sepChar) = 1 then
      dim as string itemStr = mid(objectStr, 2) 'all after "/"
      dim as integer ub = ubound(item)
      redim preserve item(ub + 1)
      'find insert location
      for i = 0 to ub
         if itemStr < item(i) then exit for
      next
      'move other items below
      for j = ub to i step -1
         item(j + 1) = item(j)
      next
      'insert new item
      item(i) = itemStr
   else
      dim as integer nextSepPos = instr(2, objectStr, sepChar)
      dim as string pathStr = mid(objectStr, 2, nextSepPos - 2)
      dim as string remObjStr = mid(objectStr, nextSepPos)
      for i = 0 to ubound(subTree)
         if subTree(i).path = pathStr then exit for
      next
      if i <= ubound(subTree) then 'match found
         subTree(i).addItem(remObjStr, sepChar)
      else
         'add sub tree
         dim as integer ub = ubound(subTree)
         redim preserve subTree(ub + 1)
         'find insert location
         for i = 0 to ub
            if pathStr < subTree(i).path then exit for
         next
         'move other items below
         for j = ub to i step -1
            subTree(j + 1) = subTree(j)
         next
         'insert new item
         subTree(i).path = pathStr
        ' subTree(i).pChild = allocate(sizeof(tree_type))
         subTree(i).addItem(remObjStr, sepChar)
      end if
   end if
end sub

sub tree_type.show(depth as integer = 0)
    static as long start=-1
    start+=1
   dim as string indentStr = string(depth * 2, " ") + "+ "
   for i as integer = 0 to ubound(item)
      color 14, 0 'item in yellow
      print indentStr & item(i)
      color 15, 0
   next
   for i as integer = start to ubound(subTree)
      color 10, 0 'path in green
      print indentStr & subTree(i).path
      color 15, 0
      subTree(i).show(depth + 1)
   next
end sub

sub tree_type.cleanup()
   'for i as integer = 0 to ubound(subTree)
      'subTree(i).pChild->cleanup()
      'deallocate(subTree(i).pChild)
   'next
   erase item, subTree
end sub

'-------------------------------------------------------------------------------

dim as string inputStr(...) = { _
   "/itemE",_
   "/path1/path2/itemA", _
   "/path1/path2/itemC", _
   "/path1/path2/itemB", _
   "/path2/path2/itemX", _
   "/path4/path5/path6/path7/itemQ", _
   "/path4/path5/path8/path7/itemR", _
   "/path4/path5/path6/path7/itemP", _
   "/path3/itemC", _
   "/path3/itemC", _
   "/itemD"}

dim as tree_type tree

for i as integer = 0 to ubound(inputStr)
   tree.addItem(inputStr(i), "/")
next
tree.show()
tree.cleanup()
tree.show()
print "end"
sleep

results are the same as your first code.
Lost Zergling
Posts: 322
Joined: Dec 02, 2011 22:51
Location: France

Re: Parse string to tree structure

Postby Lost Zergling » Mar 23, 2020 14:46

@Badidea.I feel badly placed to take a look at your approach and that is not my goal. Without offense, it seems to me that the problem you are facing is somewhat of a nature comparable to that which I was faced with during the long-term design of LZLE: the memory management of a tree. Suppose that the choice is based on a recursive technique: you are going to encapsulate the function calls according to a variable structure and with variable volumetries. This will have major consequences: perhaps avoidable loading of the stack, delegation to the system of the management of the constraints due to the fragmentation of the memory induced by this conceptual architecture, and very delicate management of the conditional outputs of loops and of the navigation . Conversely, an architecture based on linearization and logical standardization of memory blocks (we create a logical abstraction layer to be able to reduce fragmentation in two ways: linearization and "logical" reallocation) will impose serious consequences: code complexity ( which must support memory virtualization operations) and counter-intuitive logical constraints or behaviors as soon as recursive operation by essence must be simulated.
Neither of these two approaches can in itself be satisfactory. For example, in case of batch processing, the second option will be the best. Conversely, getting rid of recursion completely could prove to be prohibitively complex in some cases.
These issues are not technical but conceptual and linked to the low level intrinsic architecture (processor, memory) of the system on the one hand, to the logic of the tree on the other, which implies that whatever the technical solution implemented (object design, pointers or other), these constraints are likely to resurface in different ways depending on the technique used.
Depending on what exactly you want your code to do and how you want to design it, this task may be more or less considerable.
badidea
Posts: 2058
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Parse string to tree structure

Postby badidea » Mar 23, 2020 19:04

dodicat wrote:badidea -- from your second code, and agreeing with grindstone about using only one type structure, but disagreeing about using pointers.
...
results are the same as your first code.

I do know what you did, but the output is completely different here.
I could work with 1 list with a flag per entry is_dir like actual filesystems.
UEZ
Posts: 563
Joined: May 05, 2017 19:59
Location: Germany

Re: Parse string to tree structure

Postby UEZ » Mar 23, 2020 19:49

@badidea: just for curiosity - does my 3rd attempt work now with you real data properly?
dodicat
Posts: 6503
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Parse string to tree structure

Postby dodicat » Mar 23, 2020 20:35

Hello UEZ.
Windows
Run this in a dedicated folder, it is literally the path instructions set alive(folders and files are created in a folder tmp then tree is called then everything is deleted)

Code: Select all

Sub string_split(Byval s As String,chars As String,result() As String)
    Redim result(0)
    Dim As String var1,var2
    Dim As Long pst,LC=Len(chars)
    #macro split(stri)
    pst=Instr(stri,chars)
    var1="":var2=""
    If pst<>0 Then
        var1=Mid(stri,1,pst-1)
        var2=Mid(stri,pst+LC)
    Else
        var1=stri
    End If
    If Len(var1) Then
        Redim Preserve result(1 To Ubound(result)+1)
        result(Ubound(result))=var1
    End If
    #endmacro
    Do
        split(s):s=var2
    Loop Until var2=""
End Sub

Sub savefile(filename As String,p As String)
    Dim As Integer n
    n=Freefile
    If Open (filename For Binary Access Write As #n)=0 Then
        Put #n,,p
        Close
    Else
        Print "Unable to save " + filename
    End If
End Sub

Function Remove(Byval Text As String,Char As String) As String
    Dim As Long i
    For n As Long = 0 To Len(Text)-1
        If Text[n]<> Asc(char) Then Text[i]= Text[n]:i+=1
    Next
    Return Left(Text,i)
End Function

Function FindAndReplace(InString As String,Find As String,Replace As String) As String
    Dim s As String=InString
    Var position=Instr(s,Find)
    While position>0
        s=Mid(s,1,position-1) & Replace & Mid(s,position+Len(Find))
        position=Instr(position+Len(Replace),s,Find)
    Wend
    Return s
End Function

Function pipeout(Byval s As String="") Byref As String
    Var f=Freefile
    Dim As String tmp
    Open Pipe s For Input As #f
    s=""
    Do Until Eof(f)
        Line Input #f,tmp
        s+=tmp+Chr(10)
    Loop
    Close #f
    Return s
End Function

Dim As String inputStr(1 To 11) = { _
"/itemE",_
"/path1/path2/itemA", _
"/path1/path2/itemC", _
"/path1/path2/itemB", _
"/path2/path2/itemX", _
"/path4/path5/path6/path7/itemQ", _
"/path4/path5/path8/path7/itemR", _
"/path4/path5/path6/path7/itemP", _
"/path3/itemC", _
"/path3/itemC", _
"/itemD"}

Shell "mkdir "+Curdir+"\tmp"

Dim As Long p
For n As Long=1 To Ubound(inputstr)
    Redim As String a()
    string_split(inputstr(n),"/",a())
    If Ubound(a)=1 Then
        savefile("tmp/"+a(1),"Hello")
    Else
        For m As Long=1 To Ubound(a)-1
            Shell "mkdir "+Curdir+"\tmp"+"\"+ a(m)
            p=m
        Next m
        savefile("tmp/"+a(p)+"/"+a(p+1),"Hello")
    End If
Next n
Cls

Var path=Curdir +"\tmp"

Var s=pipeout("tree /A /F "+path)
'to suit windows
s=remove(s,"|")
s=FindAndReplace(s,"---","  ")
s=FindAndReplace(s,"\"," + ")
Print s
Sleep
Shell "rmdir /S /Q "+Curdir +"\tmp"
#include "file.bi"
Print Iif(Fileexists(Curdir +"\tmp"),"Delete foldet tmp manually","OK")
Sleep


 
badidea
Posts: 2058
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Parse string to tree structure

Postby badidea » Mar 23, 2020 21:24

UEZ wrote:@badidea: just for curiosity - does my 3rd attempt work now with you real data properly?

It does not look good. Items are not grouped, see e.g. "Thermocouples" at the end.
Part of real data:

Code: Select all

/UPP/HpCooling/Manifold/Temperatures/Supply
/UPP/HpCooling/Manifold/Flows/Target
/UPP/Target/Cooling/WaterTempMf
/UPP/HpCooling/Manifold/Temperatures/Target
/UPP/Target/Cooling/WaterFlowMf
/UPP/HpCooling/Manifold/Flows/SourceAnode
/UPP/Plasma/Source/Anode/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourceAnode
/UPP/Plasma/Source/Anode/WaterTemp
/UPP/HpCooling/Manifold/Flows/SourceNozzle
/UPP/Plasma/Source/Nozzle/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourceNozzle
/UPP/Plasma/Source/Nozzle/WaterTemp
/UPP/HpCooling/Manifold/Flows/SourcePlate1
/UPP/Plasma/Source/Plate1/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourcePlate1
/UPP/Plasma/Source/Plate1/WaterTemp
/UPP/HpCooling/Manifold/Flows/SourcePlate2
/UPP/Plasma/Source/Plate2/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourcePlate2
/UPP/Plasma/Source/Plate2/WaterTemp
/UPP/HpCooling/Manifold/Flows/SourcePlate3
/UPP/Plasma/Source/Plate3/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourcePlate3
/UPP/Plasma/Source/Plate3/WaterTemp
/UPP/HpCooling/Manifold/Flows/SourcePlate4
/UPP/Plasma/Source/Plate4/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourcePlate4
/UPP/Plasma/Source/Plate4/WaterTemp
/UPP/HpCooling/Manifold/Flows/SourcePlate5
/UPP/Plasma/Source/Plate5/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourcePlate5
/UPP/Plasma/Source/Plate5/WaterTemp
/UPP/HpCooling/Manifold/Flows/SourcePlate6
/UPP/Plasma/Source/Plate6/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourcePlate6
/UPP/Plasma/Source/Plate6/WaterTemp
/UPP/HpCooling/Manifold/Flows/SourceCathodeHouse
/UPP/Plasma/Source/CathodeHouse/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourceCathodeHouse
/UPP/Plasma/Source/CathodeHouse/WaterTemp
/UPP/HpCooling/Manifold/Flows/SourceCathode
/UPP/Plasma/Source/Cathode/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourceCathode
/UPP/Plasma/Source/Cathode/WaterTemp
/UPP/LpCooling/Manifold/Temperatures/Supply
/UPP/Target/Calorimeter/WaterTempDiff
/UPP/Target/Calorimeter/HeaterVoltage
/UPP/Target/Calorimeter/HeaterCurrent
/UPP/LpCooling/Manifold/Flows/DirtyWaterUnit
/UPP/LpCooling/Manifold/Temperatures/DirtyWaterUnit
/UPP/LpCooling/Manifold/Flows/MagnetCoil1
/UPP/Magnet/Coil1/WaterFlow
/UPP/LpCooling/Manifold/Temperatures/MagnetCoil1
/UPP/Magnet/Coil1/WaterTemp
/UPP/LpCooling/Manifold/Flows/MagnetCoil2
/UPP/Magnet/Coil2/WaterFlow
/UPP/LpCooling/Manifold/Temperatures/MagnetCoil2
/UPP/Magnet/Coil2/WaterTemp
/UPP/LpCooling/Manifold/Flows/MagnetCoil3
/UPP/Magnet/Coil3/WaterFlow
/UPP/LpCooling/Manifold/Temperatures/MagnetCoil3
/UPP/Magnet/Coil3/WaterTemp
/UPP/LpCooling/Manifold/Flows/VacuumVessel
/UPP/Vacuum/Cooling/Vessel/WaterFlow
/UPP/LpCooling/Manifold/Temperatures/VacuumVessel
/UPP/Vacuum/Cooling/Vessel/WaterTemp
/UPP/LpCooling/Manifold/Flows/VacuumPorts
/UPP/Vacuum/Cooling/Ports/WaterFlow
/UPP/LpCooling/Manifold/Temperatures/VacuumPorts
/UPP/Vacuum/Cooling/Ports/WaterTemp
/UPP/LpCooling/Manifold/Flows/SourceFlange
/UPP/Vacuum/Cooling/SourceFlange/WaterFlow
/UPP/LpCooling/Manifold/Temperatures/SourceFlange
/UPP/Vacuum/Cooling/SourceFlange/WaterTemp
/UPP/LpCooling/Manifold/Flows/MagnetPS
/UPP/Magnet/PowerSupply/WaterFlow
/UPP/LpCooling/Manifold/Temperatures/MagnetPS
/UPP/Magnet/PowerSupply/WaterTemp
/UPP/LpCooling/Manifold/Flows/PlasmaPS
/UPP/Plasma/PowerSupply/WaterFlow
/UPP/LpCooling/Manifold/Temperatures/PlasmaPS
/UPP/Plasma/PowerSupply/WaterTemp
/UPP/LpCooling/Manifold/Flows/IonBeamDetector
/UPP/Diagnostics/IonBeamDet1/WaterFlow
/UPP/LpCooling/Manifold/Temperatures/IonBeamDetector
/UPP/Diagnostics/IonBeamDet1/WaterTemp
/UPP/Target/Calorimeter/CooledPower
/UPP/Target/Calorimeter/HeaterPower
/UPP/LpCooling/Manifold/Calorimeters/Target
/UPP/Target/Cooling/CooledPowerMf
/UPP/LpCooling/Manifold/Calorimeters/SourceAnode
/UPP/Plasma/Source/Anode/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/SourceNozzle
/UPP/Plasma/Source/Nozzle/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/SourcePlate1
/UPP/Plasma/Source/Plate1/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/SourcePlate2
/UPP/Plasma/Source/Plate2/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/SourcePlate3
/UPP/Plasma/Source/Plate3/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/SourcePlate4
/UPP/Plasma/Source/Plate4/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/SourcePlate5
/UPP/Plasma/Source/Plate5/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/SourcePlate6
/UPP/Plasma/Source/Plate6/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/SourceHouse
/UPP/Plasma/Source/CathodeHouse/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/SourceCathode
/UPP/Plasma/Source/Cathode/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/Total
/UPP/LpCooling/Manifold/Calorimeters/DirtyWaterUnit
/UPP/LpCooling/Manifold/Calorimeters/MagnetCoil1
/UPP/Magnet/Coil1/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/MagnetCoil2
/UPP/Magnet/Coil2/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/MagnetCoil3
/UPP/Magnet/Coil3/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/VacuumVessel
/UPP/Vacuum/Cooling/Vessel/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/VacuumPorts
/UPP/Vacuum/Cooling/Ports/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/SourceFlange
/UPP/Vacuum/Cooling/SourceFlange/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/MagnetPS
/UPP/Magnet/PowerSupply/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/PlasmaPS
/UPP/Plasma/PowerSupply/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/IonBeamDetector
/UPP/Diagnostics/IonBeamDet1/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/Total
/UPP/Plasma/ControlSystem/UplaMode
/UPP/Plasma/ControlSystem/PlasmaShutdown
/UPP/Plasma/PowerSupply/StatusRegister
/UPP/Magnet/PowerSupply/StatusRegisterUnit12
/UPP/Magnet/PowerSupply/StatusRegisterUnit34
/UPP/Magnet/PowerSupply/StatusRegisterRack
/UPP/Plasma/ControlSystem/UplaPlcState
/UPP/Plasma/GasInlet/Cylinders/Cyl1GasType
/UPP/Plasma/GasInlet/Cylinders/Cyl2GasType
/UPP/Plasma/GasInlet/Cylinders/Cyl3GasType
/UPP/Plasma/GasInlet/Cylinders/Cyl4GasType
/UPP/Plasma/GasInlet/Cylinders/Cyl6GasType
/UPP/Plasma/PowerSupply/PS1.1/IgnitionMode
/UPP/Plasma/PowerSupply/PS1.2/IgnitionMode
/UPP/Plasma/PowerSupply/PS1.3/IgnitionMode
/UPP/Plasma/PowerSupply/PS1.1/SourceConnection
/UPP/Plasma/PowerSupply/PS1.2/SourceConnection
/UPP/Plasma/PowerSupply/PS1.3/SourceConnection
/UPP/Plasma/PowerSupply/PS1.1/TargetConnection
/UPP/Plasma/PowerSupply/PS1.2/TargetConnection
/UPP/Plasma/PowerSupply/PS1.3/TargetConnection
/UPP/Target/Bias/PositivePolarity
/UPP/Magnet/Coil1/ConnectedPsNr
/UPP/Magnet/Coil2/ConnectedPsNr
/UPP/Magnet/Coil3/ConnectedPsNr
/UPP/Plasma/GasInlet/Mfc1/ValveEnabled
/UPP/Plasma/GasInlet/Mfc2/ValveEnabled
/UPP/Plasma/GasInlet/Mfc3/ValveEnabled
/UPP/Plasma/GasInlet/Mfc4/ValveEnabled
/UPP/Plasma/GasInlet/Mfc5/ValveEnabled
/UPP/Plasma/GasInlet/Mfc7/ValveEnabled
/UPP/Plasma/GasInlet/Mfc8/ValveEnabled
/UPP/Plasma/Source/Config/FileName
/UPP/Plasma/Source/Config/Id
/UPP/Plasma/Source/Config/DrawingName
/UPP/Plasma/Source/Config/Description
/UPP/Plasma/Source/Config/Comment
/UPP/Plasma/Source/Config/NumPlates
/UPP/Plasma/ControlSystem/SourceVoltEnBits
/UPP/Plasma/ControlSystem/SourceWaterFlowEnBits
/UPP/Plasma/ControlSystem/SourceWaterTempEnBits
/UPP/Plasma/ControlSystem/ExperimentConfigFileName
/UPP/Plasma/ControlSystem/ThermocoupleEnBits
/UPP/Plasma/ControlSystem/ExpWaterFlowEnBits
/UPP/Plasma/ControlSystem/ExpWaterTempEnBits
/UPP/Plasma/Source/Gas/FlowAr
/UPP/Plasma/Source/Gas/FlowH2
/UPP/Plasma/Source/Gas/FlowD2
/UPP/Plasma/Source/Gas/FlowHe
/UPP/Plasma/Source/Gas/FlowCh4
/UPP/Plasma/Source/Gas/FlowNe
/UPP/Plasma/Source/Gas/FlowXe
/UPP/Plasma/Source/Gas/FlowN2
/UPP/Vacuum/GasInlet/FlowAr
/UPP/Vacuum/GasInlet/FlowH2
/UPP/Vacuum/GasInlet/FlowD2
/UPP/Vacuum/GasInlet/FlowHe
/UPP/Vacuum/GasInlet/FlowCh4
/UPP/Vacuum/GasInlet/FlowNe
/UPP/Vacuum/GasInlet/FlowXe
/UPP/Vacuum/GasInlet/FlowN2
/UPP/Plasma/GasInlet/Mfc1/FlowPv
/UPP/Plasma/GasInlet/Mfc2/FlowPv
/UPP/Plasma/GasInlet/Mfc3/FlowPv
/UPP/Plasma/GasInlet/Mfc4/FlowPv
/UPP/Plasma/GasInlet/Mfc5/FlowPv
/UPP/Plasma/GasInlet/Mfc6/FlowPv
/UPP/Plasma/GasInlet/Mfc7/FlowPv
/UPP/Plasma/GasInlet/Mfc8/FlowPv
/UPP/Plasma/Source/Cathode/VoltagePs
/UPP/Plasma/Source/Cathode/CurrentPs
/UPP/Target/Bias/VoltagePs
/UPP/Target/Bias/CurrentPs
/UPP/Magnet/Coil1/CurrentPv
/UPP/Magnet/Coil2/CurrentPv
/UPP/Magnet/Coil3/CurrentPv
/UPP/Vacuum/Vessel/Thermocouple/Tc1
/UPP/Vacuum/Vessel/Thermocouple/Tc2
/UPP/Vacuum/Vessel/Thermocouple/Tc3
/UPP/Vacuum/Vessel/Thermocouple/Tc4
/UPP/Vacuum/Vessel/Thermocouple/Tc5
/UPP/Vacuum/Vessel/Thermocouple/Tc6
/UPP/Plasma/Source/Voltages/Cathode
/UPP/Plasma/Source/Cathode/Voltage
/UPP/Plasma/Source/Voltages/CathodeHouse
/UPP/Plasma/Source/CathodeHouse/Voltage
/UPP/Plasma/Source/Voltages/Plate1
/UPP/Plasma/Source/Plate1/Voltage
/UPP/Plasma/Source/Voltages/Plate2
/UPP/Plasma/Source/Plate2/Voltage
/UPP/Plasma/Source/Voltages/Plate3
/UPP/Plasma/Source/Plate3/Voltage
/UPP/Plasma/Source/Voltages/Plate4
/UPP/Plasma/Source/Plate4/Voltage
/UPP/Plasma/Source/Voltages/Plate5
/UPP/Plasma/Source/Plate5/Voltage
/UPP/Plasma/Source/Voltages/Plate6
/UPP/Plasma/Source/Plate6/Voltage
/UPP/Plasma/Source/Gas/ChannelPressure
/UPP/Plasma/Source/Thermocouple/Tc1
/UPP/Plasma/Source/Thermocouple/Tc2
/UPP/Target/Thermocouple/Tc1
/UPP/Target/Thermocouple/Tc2
/UPP/Target/Bias/VoltagePv
/UPP/Plasma/PowerSupply/Ps1.1/Status
/UPP/Plasma/PowerSupply/Ps1.2/Status
/UPP/Plasma/PowerSupply/Ps1.3/Status
/UPP/Plasma/PowerSupply/Ps1.1/VoltagePv
/UPP/Plasma/PowerSupply/Ps1.2/VoltagePv
/UPP/Plasma/PowerSupply/Ps1.3/VoltagePv
/UPP/Plasma/PowerSupply/Ps1.1/CurrentPv
/UPP/Plasma/PowerSupply/Ps1.2/CurrentPv
/UPP/Plasma/PowerSupply/Ps1.3/CurrentPv
/UPP/Magnet/PowerSupply/Unit1/CurrentPv
/UPP/Magnet/PowerSupply/Unit2/CurrentPv
/UPP/Magnet/PowerSupply/Unit3/CurrentPv
/UPP/Magnet/PowerSupply/Unit4/CurrentPv
/UPP/Plasma/GasInlet/Mfc1/FlowSp
/UPP/Plasma/GasInlet/Mfc2/FlowSp
/UPP/Plasma/GasInlet/Mfc3/FlowSp
/UPP/Plasma/GasInlet/Mfc4/FlowSp
/UPP/Plasma/GasInlet/Mfc5/FlowSp
/UPP/Plasma/GasInlet/Mfc6/FlowSp
/UPP/Plasma/GasInlet/Mfc7/FlowSp
/UPP/Plasma/GasInlet/Mfc8/FlowSp
/UPP/Plasma/PowerSupply/Ps1.1/VoltageSp
/UPP/Plasma/PowerSupply/Ps1.2/VoltageSp
/UPP/Plasma/PowerSupply/Ps1.3/VoltageSp
/UPP/Plasma/PowerSupply/Ps1.1/CurrentSp
/UPP/Plasma/PowerSupply/Ps1.2/CurrentSp
/UPP/Plasma/PowerSupply/Ps1.3/CurrentSp
/UPP/Magnet/PowerSupply/Unit1/CurrentSp
/UPP/Magnet/PowerSupply/Unit2/CurrentSp
/UPP/Magnet/PowerSupply/Unit3/CurrentSp
/UPP/Magnet/PowerSupply/Unit4/CurrentSp
/UPP/Plasma/Source/Gas/Valve
/UPP/Vacuum/GasInlet/Valve
/UPP/Target/Bias/PsConnected
Input pathes sorted:
/UPP/Diagnostics/IonBeamDet1/CooledPower
/UPP/Diagnostics/IonBeamDet1/WaterFlow
/UPP/Diagnostics/IonBeamDet1/WaterTemp
/UPP/HpCooling/Manifold/Flows/SourceAnode
/UPP/HpCooling/Manifold/Flows/SourceCathodeHouse
/UPP/HpCooling/Manifold/Flows/SourceCathode
/UPP/HpCooling/Manifold/Flows/SourceNozzle
/UPP/HpCooling/Manifold/Flows/SourcePlate1
/UPP/HpCooling/Manifold/Flows/SourcePlate2
/UPP/HpCooling/Manifold/Flows/SourcePlate3
/UPP/HpCooling/Manifold/Flows/SourcePlate4
/UPP/HpCooling/Manifold/Flows/SourcePlate5
/UPP/HpCooling/Manifold/Flows/SourcePlate6
/UPP/HpCooling/Manifold/Flows/Target
/UPP/HpCooling/Manifold/Temperatures/SourceAnode
/UPP/HpCooling/Manifold/Temperatures/SourceCathode
/UPP/HpCooling/Manifold/Temperatures/SourceCathodeHouse
/UPP/HpCooling/Manifold/Temperatures/SourceNozzle
/UPP/HpCooling/Manifold/Temperatures/SourcePlate1
/UPP/HpCooling/Manifold/Temperatures/SourcePlate2
/UPP/HpCooling/Manifold/Temperatures/SourcePlate3
/UPP/HpCooling/Manifold/Temperatures/SourcePlate4
/UPP/HpCooling/Manifold/Temperatures/SourcePlate5
/UPP/HpCooling/Manifold/Temperatures/SourcePlate6
/UPP/HpCooling/Manifold/Temperatures/Supply
/UPP/HpCooling/Manifold/Temperatures/Target
/UPP/LpCooling/Manifold/Calorimeters/DirtyWaterUnit
/UPP/LpCooling/Manifold/Calorimeters/IonBeamDetector
/UPP/LpCooling/Manifold/Calorimeters/MagnetCoil1
/UPP/LpCooling/Manifold/Calorimeters/MagnetCoil2
/UPP/LpCooling/Manifold/Calorimeters/MagnetCoil3
/UPP/LpCooling/Manifold/Calorimeters/MagnetPS
/UPP/LpCooling/Manifold/Calorimeters/PlasmaPS
/UPP/LpCooling/Manifold/Calorimeters/SourceAnode
/UPP/LpCooling/Manifold/Calorimeters/SourceCathode
/UPP/LpCooling/Manifold/Calorimeters/SourceFlange
/UPP/LpCooling/Manifold/Calorimeters/SourceHouse
/UPP/LpCooling/Manifold/Calorimeters/SourceNozzle
/UPP/LpCooling/Manifold/Calorimeters/SourcePlate1
/UPP/LpCooling/Manifold/Calorimeters/SourcePlate2
/UPP/LpCooling/Manifold/Calorimeters/SourcePlate3
/UPP/LpCooling/Manifold/Calorimeters/SourcePlate4
/UPP/LpCooling/Manifold/Calorimeters/SourcePlate5
/UPP/LpCooling/Manifold/Calorimeters/SourcePlate6
/UPP/LpCooling/Manifold/Calorimeters/Target
/UPP/LpCooling/Manifold/Calorimeters/Total
/UPP/LpCooling/Manifold/Calorimeters/Total
/UPP/LpCooling/Manifold/Calorimeters/VacuumPorts
/UPP/LpCooling/Manifold/Calorimeters/VacuumVessel
/UPP/LpCooling/Manifold/Flows/DirtyWaterUnit
/UPP/LpCooling/Manifold/Flows/IonBeamDetector
/UPP/LpCooling/Manifold/Flows/MagnetCoil1
/UPP/LpCooling/Manifold/Flows/MagnetCoil2
/UPP/LpCooling/Manifold/Flows/MagnetCoil3
/UPP/LpCooling/Manifold/Flows/MagnetPS
/UPP/LpCooling/Manifold/Flows/PlasmaPS
/UPP/LpCooling/Manifold/Flows/SourceFlange
/UPP/LpCooling/Manifold/Flows/VacuumPorts
/UPP/LpCooling/Manifold/Flows/VacuumVessel
/UPP/LpCooling/Manifold/Temperatures/DirtyWaterUnit
/UPP/LpCooling/Manifold/Temperatures/IonBeamDetector
/UPP/LpCooling/Manifold/Temperatures/MagnetCoil1
/UPP/LpCooling/Manifold/Temperatures/MagnetCoil2
/UPP/LpCooling/Manifold/Temperatures/MagnetCoil3
/UPP/LpCooling/Manifold/Temperatures/MagnetPS
/UPP/LpCooling/Manifold/Temperatures/PlasmaPS
/UPP/LpCooling/Manifold/Temperatures/SourceFlange
/UPP/LpCooling/Manifold/Temperatures/Supply
/UPP/LpCooling/Manifold/Temperatures/VacuumPorts
/UPP/LpCooling/Manifold/Temperatures/VacuumVessel
/UPP/Magnet/Coil1/ConnectedPsNr
/UPP/Magnet/Coil1/CooledPower
/UPP/Magnet/Coil1/CurrentPv
/UPP/Magnet/Coil1/WaterFlow
/UPP/Magnet/Coil1/WaterTemp
/UPP/Magnet/Coil2/ConnectedPsNr
/UPP/Magnet/Coil2/CooledPower
/UPP/Magnet/Coil2/CurrentPv
/UPP/Magnet/Coil2/WaterFlow
/UPP/Magnet/Coil2/WaterTemp
/UPP/Magnet/Coil3/ConnectedPsNr
/UPP/Magnet/Coil3/CooledPower
/UPP/Magnet/Coil3/CurrentPv
/UPP/Magnet/Coil3/WaterFlow
/UPP/Magnet/Coil3/WaterTemp
/UPP/Magnet/PowerSupply/CooledPower
/UPP/Magnet/PowerSupply/StatusRegisterRack
/UPP/Magnet/PowerSupply/StatusRegisterUnit12
/UPP/Magnet/PowerSupply/StatusRegisterUnit34
/UPP/Magnet/PowerSupply/Unit1/CurrentPv
/UPP/Magnet/PowerSupply/Unit1/CurrentSp
/UPP/Magnet/PowerSupply/Unit2/CurrentPv
/UPP/Magnet/PowerSupply/Unit2/CurrentSp
/UPP/Magnet/PowerSupply/Unit3/CurrentPv
/UPP/Magnet/PowerSupply/Unit3/CurrentSp
/UPP/Magnet/PowerSupply/Unit4/CurrentPv
/UPP/Magnet/PowerSupply/Unit4/CurrentSp
/UPP/Magnet/PowerSupply/WaterFlow
/UPP/Magnet/PowerSupply/WaterTemp
/UPP/Plasma/ControlSystem/ExperimentConfigFileName
/UPP/Plasma/ControlSystem/ExpWaterFlowEnBits
/UPP/Plasma/ControlSystem/ExpWaterTempEnBits
/UPP/Plasma/ControlSystem/PlasmaShutdown
/UPP/Plasma/ControlSystem/SourceVoltEnBits
/UPP/Plasma/ControlSystem/SourceWaterFlowEnBits
/UPP/Plasma/ControlSystem/SourceWaterTempEnBits
/UPP/Plasma/ControlSystem/ThermocoupleEnBits
/UPP/Plasma/ControlSystem/UplaMode
/UPP/Plasma/ControlSystem/UplaPlcState
/UPP/Plasma/GasInlet/Cylinders/Cyl1GasType
/UPP/Plasma/GasInlet/Cylinders/Cyl2GasType
/UPP/Plasma/GasInlet/Cylinders/Cyl3GasType
/UPP/Plasma/GasInlet/Cylinders/Cyl4GasType
/UPP/Plasma/GasInlet/Cylinders/Cyl6GasType
/UPP/Plasma/GasInlet/Mfc1/FlowPv
/UPP/Plasma/GasInlet/Mfc1/FlowSp
/UPP/Plasma/GasInlet/Mfc1/ValveEnabled
/UPP/Plasma/GasInlet/Mfc2/FlowPv
/UPP/Plasma/GasInlet/Mfc2/FlowSp
/UPP/Plasma/GasInlet/Mfc2/ValveEnabled
/UPP/Plasma/GasInlet/Mfc3/FlowPv
/UPP/Plasma/GasInlet/Mfc3/FlowSp
/UPP/Plasma/GasInlet/Mfc3/ValveEnabled
/UPP/Plasma/GasInlet/Mfc4/FlowPv
/UPP/Plasma/GasInlet/Mfc4/FlowSp
/UPP/Plasma/GasInlet/Mfc4/ValveEnabled
/UPP/Plasma/GasInlet/Mfc5/FlowPv
/UPP/Plasma/GasInlet/Mfc5/FlowSp
/UPP/Plasma/GasInlet/Mfc5/ValveEnabled
/UPP/Plasma/GasInlet/Mfc6/FlowPv
/UPP/Plasma/GasInlet/Mfc6/FlowSp
/UPP/Plasma/GasInlet/Mfc7/FlowPv
/UPP/Plasma/GasInlet/Mfc7/FlowSp
/UPP/Plasma/GasInlet/Mfc7/ValveEnabled
/UPP/Plasma/GasInlet/Mfc8/FlowPv
/UPP/Plasma/GasInlet/Mfc8/FlowSp
/UPP/Plasma/GasInlet/Mfc8/ValveEnabled
/UPP/Plasma/PowerSupply/CooledPower
/UPP/Plasma/PowerSupply/Ps1.1/CurrentPv
/UPP/Plasma/PowerSupply/Ps1.1/CurrentSp
/UPP/Plasma/PowerSupply/PS1.1/IgnitionMode
/UPP/Plasma/PowerSupply/PS1.1/SourceConnection
/UPP/Plasma/PowerSupply/Ps1.1/Status
/UPP/Plasma/PowerSupply/PS1.1/TargetConnection
/UPP/Plasma/PowerSupply/Ps1.1/VoltagePv
/UPP/Plasma/PowerSupply/Ps1.1/VoltageSp
/UPP/Plasma/PowerSupply/Ps1.2/CurrentPv
/UPP/Plasma/PowerSupply/Ps1.2/CurrentSp
/UPP/Plasma/PowerSupply/PS1.2/IgnitionMode
/UPP/Plasma/PowerSupply/PS1.2/SourceConnection
/UPP/Plasma/PowerSupply/Ps1.2/Status
/UPP/Plasma/PowerSupply/PS1.2/TargetConnection
/UPP/Plasma/PowerSupply/Ps1.2/VoltagePv
/UPP/Plasma/PowerSupply/Ps1.2/VoltageSp
/UPP/Plasma/PowerSupply/Ps1.3/CurrentPv
/UPP/Plasma/PowerSupply/Ps1.3/CurrentSp
/UPP/Plasma/PowerSupply/PS1.3/IgnitionMode
/UPP/Plasma/PowerSupply/PS1.3/SourceConnection
/UPP/Plasma/PowerSupply/Ps1.3/Status
/UPP/Plasma/PowerSupply/PS1.3/TargetConnection
/UPP/Plasma/PowerSupply/Ps1.3/VoltagePv
/UPP/Plasma/PowerSupply/Ps1.3/VoltageSp
/UPP/Plasma/PowerSupply/StatusRegister
/UPP/Plasma/PowerSupply/WaterFlow
/UPP/Plasma/PowerSupply/WaterTemp
/UPP/Plasma/Source/Anode/CooledPower
/UPP/Plasma/Source/Anode/WaterFlow
/UPP/Plasma/Source/Anode/WaterTemp
/UPP/Plasma/Source/Cathode/CooledPower
/UPP/Plasma/Source/Cathode/CurrentPs
/UPP/Plasma/Source/Cathode/Voltage
/UPP/Plasma/Source/Cathode/VoltagePs
/UPP/Plasma/Source/Cathode/WaterFlow
/UPP/Plasma/Source/Cathode/WaterTemp
/UPP/Plasma/Source/CathodeHouse/CooledPower
/UPP/Plasma/Source/CathodeHouse/Voltage
/UPP/Plasma/Source/CathodeHouse/WaterFlow
/UPP/Plasma/Source/CathodeHouse/WaterTemp
/UPP/Plasma/Source/Config/Comment
/UPP/Plasma/Source/Config/Description
/UPP/Plasma/Source/Config/DrawingName
/UPP/Plasma/Source/Config/FileName
/UPP/Plasma/Source/Config/Id
/UPP/Plasma/Source/Config/NumPlates
/UPP/Plasma/Source/Gas/ChannelPressure
/UPP/Plasma/Source/Gas/FlowAr
/UPP/Plasma/Source/Gas/FlowCh4
/UPP/Plasma/Source/Gas/FlowD2
/UPP/Plasma/Source/Gas/FlowH2
/UPP/Plasma/Source/Gas/FlowHe
/UPP/Plasma/Source/Gas/FlowN2
/UPP/Plasma/Source/Gas/FlowNe
/UPP/Plasma/Source/Gas/FlowXe
/UPP/Plasma/Source/Gas/Valve
/UPP/Plasma/Source/Nozzle/CooledPower
/UPP/Plasma/Source/Nozzle/WaterFlow
/UPP/Plasma/Source/Nozzle/WaterTemp
/UPP/Plasma/Source/Plate1/CooledPower
/UPP/Plasma/Source/Plate1/Voltage
/UPP/Plasma/Source/Plate1/WaterFlow
/UPP/Plasma/Source/Plate1/WaterTemp
/UPP/Plasma/Source/Plate2/CooledPower
/UPP/Plasma/Source/Plate2/Voltage
/UPP/Plasma/Source/Plate2/WaterFlow
/UPP/Plasma/Source/Plate2/WaterTemp
/UPP/Plasma/Source/Plate3/CooledPower
/UPP/Plasma/Source/Plate3/Voltage
/UPP/Plasma/Source/Plate3/WaterFlow
/UPP/Plasma/Source/Plate3/WaterTemp
/UPP/Plasma/Source/Plate4/CooledPower
/UPP/Plasma/Source/Plate4/Voltage
/UPP/Plasma/Source/Plate4/WaterFlow
/UPP/Plasma/Source/Plate4/WaterTemp
/UPP/Plasma/Source/Plate5/CooledPower
/UPP/Plasma/Source/Plate5/Voltage
/UPP/Plasma/Source/Plate5/WaterFlow
/UPP/Plasma/Source/Plate5/WaterTemp
/UPP/Plasma/Source/Plate6/CooledPower
/UPP/Plasma/Source/Plate6/Voltage
/UPP/Plasma/Source/Plate6/WaterFlow
/UPP/Plasma/Source/Plate6/WaterTemp
/UPP/Plasma/Source/Thermocouple/Tc1
/UPP/Plasma/Source/Thermocouple/Tc2
/UPP/Plasma/Source/Voltages/Cathode
/UPP/Plasma/Source/Voltages/CathodeHouse
/UPP/Plasma/Source/Voltages/Plate1
/UPP/Plasma/Source/Voltages/Plate2
/UPP/Plasma/Source/Voltages/Plate3
/UPP/Plasma/Source/Voltages/Plate4
/UPP/Plasma/Source/Voltages/Plate5
/UPP/Plasma/Source/Voltages/Plate6
/UPP/Target/Bias/CurrentPs
/UPP/Target/Bias/PositivePolarity
/UPP/Target/Bias/PsConnected
/UPP/Target/Bias/VoltagePs
/UPP/Target/Bias/VoltagePv
/UPP/Target/Calorimeter/CooledPower
/UPP/Target/Calorimeter/HeaterCurrent
/UPP/Target/Calorimeter/HeaterPower
/UPP/Target/Calorimeter/HeaterVoltage
/UPP/Target/Calorimeter/WaterTempDiff
/UPP/Target/Cooling/CooledPowerMf
/UPP/Target/Cooling/WaterFlowMf
/UPP/Target/Cooling/WaterTempMf
/UPP/Target/Thermocouple/Tc1
/UPP/Target/Thermocouple/Tc2
/UPP/Vacuum/Cooling/Ports/CooledPower
/UPP/Vacuum/Cooling/Ports/WaterFlow
/UPP/Vacuum/Cooling/Ports/WaterTemp
/UPP/Vacuum/Cooling/SourceFlange/CooledPower
/UPP/Vacuum/Cooling/SourceFlange/WaterFlow
/UPP/Vacuum/Cooling/SourceFlange/WaterTemp
/UPP/Vacuum/Cooling/Vessel/CooledPower
/UPP/Vacuum/Cooling/Vessel/WaterFlow
/UPP/Vacuum/Cooling/Vessel/WaterTemp
/UPP/Vacuum/GasInlet/FlowAr
/UPP/Vacuum/GasInlet/FlowCh4
/UPP/Vacuum/GasInlet/FlowD2
/UPP/Vacuum/GasInlet/FlowH2
/UPP/Vacuum/GasInlet/FlowHe
/UPP/Vacuum/GasInlet/FlowN2
/UPP/Vacuum/GasInlet/FlowNe
/UPP/Vacuum/GasInlet/FlowXe
/UPP/Vacuum/GasInlet/Valve
/UPP/Vacuum/Vessel/Thermocouple/Tc1
/UPP/Vacuum/Vessel/Thermocouple/Tc2
/UPP/Vacuum/Vessel/Thermocouple/Tc3
/UPP/Vacuum/Vessel/Thermocouple/Tc4
/UPP/Vacuum/Vessel/Thermocouple/Tc6
/UPP/Vacuum/Vessel/Thermocouple/Tc5

Output:

Code: Select all

+ UPP         
  + Diagnostics       
    + IonBeamDet1     
      + CooledPower   
      + WaterFlow   
      + WaterTemp   
  + HpCooling       
    + Manifold     
      + Flows   
        + SourceAnode 
        + SourceCathodeHouse 
        + SourceCathode 
        + SourceNozzle 
        + SourcePlate1 
        + SourcePlate2 
        + SourcePlate3 
        + SourcePlate4 
        + SourcePlate5 
        + SourcePlate6 
        + Target 
      + Temperatures   
        + SourceAnode 
        + SourceCathode 
        + SourceCathodeHouse 
        + SourceNozzle 
        + SourcePlate1 
        + SourcePlate2 
        + SourcePlate3 
        + SourcePlate4 
        + SourcePlate5 
        + SourcePlate6 
        + Supply 
        + Target 
  + LpCooling       
    + Manifold     
      + Calorimeters   
        + DirtyWaterUnit 
    + Manifold     
      + Calorimeters   
        + IonBeamDetector 
    + Manifold     
      + Calorimeters   
        + MagnetCoil1 
    + Manifold     
      + Calorimeters   
        + MagnetCoil2 
    + Manifold     
      + Calorimeters   
        + MagnetCoil3 
    + Manifold     
      + Calorimeters   
        + MagnetPS 
    + Manifold     
      + Calorimeters   
        + PlasmaPS 
    + Manifold     
      + Calorimeters   
        + SourceAnode 
    + Manifold     
      + Calorimeters   
        + SourceCathode 
    + Manifold     
      + Calorimeters   
        + SourceFlange 
    + Manifold     
      + Calorimeters   
        + SourceHouse 
    + Manifold     
      + Calorimeters   
        + SourceNozzle 
    + Manifold     
      + Calorimeters   
        + SourcePlate1 
    + Manifold     
      + Calorimeters   
        + SourcePlate2 
    + Manifold     
      + Calorimeters   
        + SourcePlate3 
    + Manifold     
      + Calorimeters   
        + SourcePlate4 
    + Manifold     
      + Calorimeters   
        + SourcePlate5 
    + Manifold     
      + Calorimeters   
        + SourcePlate6 
    + Manifold     
      + Calorimeters   
        + Target 
    + Manifold     
      + Calorimeters   
        + Total 
    + Manifold     
      + Calorimeters   
        + Total 
    + Manifold     
      + Calorimeters   
        + VacuumPorts 
    + Manifold     
      + Calorimeters   
        + VacuumVessel 
    + Manifold     
      + Flows   
        + DirtyWaterUnit 
    + Manifold     
      + Flows   
        + IonBeamDetector 
    + Manifold     
      + Flows   
        + MagnetCoil1 
    + Manifold     
      + Flows   
        + MagnetCoil2 
    + Manifold     
      + Flows   
        + MagnetCoil3 
    + Manifold     
      + Flows   
        + MagnetPS 
    + Manifold     
      + Flows   
        + PlasmaPS 
    + Manifold     
      + Flows   
        + SourceFlange 
    + Manifold     
      + Flows   
        + VacuumPorts 
    + Manifold     
      + Flows   
        + VacuumVessel 
    + Manifold     
      + Temperatures   
        + DirtyWaterUnit 
    + Manifold     
      + Temperatures   
        + IonBeamDetector 
    + Manifold     
      + Temperatures   
        + MagnetCoil1 
    + Manifold     
      + Temperatures   
        + MagnetCoil2 
    + Manifold     
      + Temperatures   
        + MagnetCoil3 
    + Manifold     
      + Temperatures   
        + MagnetPS 
    + Manifold     
      + Temperatures   
        + PlasmaPS 
    + Manifold     
      + Temperatures   
        + SourceFlange 
    + Manifold     
      + Temperatures   
        + Supply 
    + Manifold     
      + Temperatures   
        + VacuumPorts 
    + Manifold     
      + Temperatures   
        + VacuumVessel 
  + Magnet       
    + Coil1     
      + ConnectedPsNr   
      + CooledPower   
      + CurrentPv   
      + WaterFlow   
      + WaterTemp   
    + Coil2     
      + ConnectedPsNr   
      + CooledPower   
      + CurrentPv   
      + WaterFlow   
      + WaterTemp   
    + Coil3     
      + ConnectedPsNr   
      + CooledPower   
      + CurrentPv   
      + WaterFlow   
      + WaterTemp   
    + PowerSupply     
      + CooledPower   
      + StatusRegisterRack   
      + StatusRegisterUnit12   
      + StatusRegisterUnit34   
      + Unit1   
        + CurrentPv 
        + CurrentSp 
      + Unit2   
        + CurrentPv 
        + CurrentSp 
      + Unit3   
        + CurrentPv 
        + CurrentSp 
      + Unit4   
        + CurrentPv 
        + CurrentSp 
      + WaterFlow   
      + WaterTemp   
  + Plasma       
    + ControlSystem     
      + ExperimentConfigFileName   
      + ExpWaterFlowEnBits   
      + ExpWaterTempEnBits   
      + PlasmaShutdown   
      + SourceVoltEnBits   
      + SourceWaterFlowEnBits   
      + SourceWaterTempEnBits   
      + ThermocoupleEnBits   
      + UplaMode   
      + UplaPlcState   
    + GasInlet     
      + Cylinders   
        + Cyl1GasType 
        + Cyl2GasType 
        + Cyl3GasType 
        + Cyl4GasType 
        + Cyl6GasType 
      + Mfc1   
        + FlowPv 
        + FlowSp 
        + ValveEnabled 
      + Mfc2   
        + FlowPv 
        + FlowSp 
        + ValveEnabled 
      + Mfc3   
        + FlowPv 
        + FlowSp 
        + ValveEnabled 
      + Mfc4   
        + FlowPv 
        + FlowSp 
        + ValveEnabled 
      + Mfc5   
        + FlowPv 
        + FlowSp 
        + ValveEnabled 
      + Mfc6   
        + FlowPv 
        + FlowSp 
      + Mfc7   
        + FlowPv 
        + FlowSp 
        + ValveEnabled 
      + Mfc8   
        + FlowPv 
        + FlowSp 
        + ValveEnabled 
    + PowerSupply     
      + CooledPower   
    + PowerSupply     
      + Ps1.1   
        + CurrentPv 
    + PowerSupply     
      + Ps1.1   
        + CurrentSp 
    + PowerSupply     
      + PS1.1   
        + IgnitionMode 
    + PowerSupply     
      + PS1.1   
        + SourceConnection 
    + PowerSupply     
      + Ps1.1   
        + Status 
    + PowerSupply     
      + PS1.1   
        + TargetConnection 
    + PowerSupply     
      + Ps1.1   
        + VoltagePv 
    + PowerSupply     
      + Ps1.1   
        + VoltageSp 
    + PowerSupply     
      + Ps1.2   
        + CurrentPv 
    + PowerSupply     
      + Ps1.2   
        + CurrentSp 
    + PowerSupply     
      + PS1.2   
        + IgnitionMode 
    + PowerSupply     
      + PS1.2   
        + SourceConnection 
    + PowerSupply     
      + Ps1.2   
        + Status 
    + PowerSupply     
      + PS1.2   
        + TargetConnection 
    + PowerSupply     
      + Ps1.2   
        + VoltagePv 
    + PowerSupply     
      + Ps1.2   
        + VoltageSp 
    + PowerSupply     
      + Ps1.3   
        + CurrentPv 
    + PowerSupply     
      + Ps1.3   
        + CurrentSp 
    + PowerSupply     
      + PS1.3   
        + IgnitionMode 
    + PowerSupply     
      + PS1.3   
        + SourceConnection 
    + PowerSupply     
      + Ps1.3   
        + Status 
    + PowerSupply     
      + PS1.3   
        + TargetConnection 
    + PowerSupply     
      + Ps1.3   
        + VoltagePv 
    + PowerSupply     
      + Ps1.3   
        + VoltageSp 
    + PowerSupply     
      + StatusRegister   
    + PowerSupply     
      + WaterFlow   
    + PowerSupply     
      + WaterTemp   
    + Source     
      + Anode   
        + CooledPower 
        + WaterFlow 
        + WaterTemp 
      + Cathode   
        + CooledPower 
        + CurrentPs 
        + Voltage 
        + VoltagePs 
        + WaterFlow 
        + WaterTemp 
      + CathodeHouse   
        + CooledPower 
        + Voltage 
        + WaterFlow 
        + WaterTemp 
      + Config   
        + Comment 
        + Description 
        + DrawingName 
        + FileName 
        + Id 
        + NumPlates 
      + Gas   
        + ChannelPressure 
        + FlowAr 
        + FlowCh4 
        + FlowD2 
        + FlowH2 
        + FlowHe 
        + FlowN2 
        + FlowNe 
        + FlowXe 
        + Valve 
      + Nozzle   
        + CooledPower 
        + WaterFlow 
        + WaterTemp 
      + Plate1   
        + CooledPower 
        + Voltage 
        + WaterFlow 
        + WaterTemp 
      + Plate2   
        + CooledPower 
        + Voltage 
        + WaterFlow 
        + WaterTemp 
      + Plate3   
        + CooledPower 
        + Voltage 
        + WaterFlow 
        + WaterTemp 
      + Plate4   
        + CooledPower 
        + Voltage 
        + WaterFlow 
        + WaterTemp 
      + Plate5   
        + CooledPower 
        + Voltage 
        + WaterFlow 
        + WaterTemp 
      + Plate6   
        + CooledPower 
        + Voltage 
        + WaterFlow 
        + WaterTemp 
      + Thermocouple   
        + Tc1 
        + Tc2 
      + Voltages   
        + Cathode 
        + CathodeHouse 
        + Plate1 
        + Plate2 
        + Plate3 
        + Plate4 
        + Plate5 
        + Plate6 
  + Target       
    + Bias     
      + CurrentPs   
      + PositivePolarity   
      + PsConnected   
      + VoltagePs   
      + VoltagePv   
    + Calorimeter     
      + CooledPower   
      + HeaterCurrent   
      + HeaterPower   
      + HeaterVoltage   
      + WaterTempDiff   
    + Cooling     
      + CooledPowerMf   
      + WaterFlowMf   
      + WaterTempMf   
    + Thermocouple     
      + Tc1   
      + Tc2   
  + Vacuum       
    + Cooling     
      + Ports   
        + CooledPower 
    + Cooling     
      + Ports   
        + WaterFlow 
    + Cooling     
      + Ports   
        + WaterTemp 
    + Cooling     
      + SourceFlange   
        + CooledPower 
    + Cooling     
      + SourceFlange   
        + WaterFlow 
    + Cooling     
      + SourceFlange   
        + WaterTemp 
    + Cooling     
      + Vessel   
        + CooledPower 
    + Cooling     
      + Vessel   
        + WaterFlow 
    + Cooling     
      + Vessel   
        + WaterTemp 
    + GasInlet     
      + FlowAr   
    + GasInlet     
      + FlowCh4   
    + GasInlet     
      + FlowD2   
    + GasInlet     
      + FlowH2   
    + GasInlet     
      + FlowHe   
    + GasInlet     
      + FlowN2   
    + GasInlet     
      + FlowNe   
    + GasInlet     
      + FlowXe   
    + GasInlet     
      + Valve   
    + Vessel     
      + Thermocouple   
        + Tc1 
      + Thermocouple   
        + Tc2 
      + Thermocouple   
        + Tc3 
      + Thermocouple   
        + Tc4 
      + Thermocouple   
        + Tc6 
      + Thermocouple   
        + Tc5 
badidea
Posts: 2058
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Parse string to tree structure

Postby badidea » Mar 23, 2020 21:33

grindstone wrote:And here are my two pennies to the tree parser:
...

Your versions works with the real data above.
Edit: One small issue: It does not display all items in a path before all sub-paths ("files before folders").
Output:

Code: Select all

+ root
  + UPP
    + Diagnostics
      + IonBeamDet1
        + CooledPower
        + WaterFlow
        + WaterTemp
    + HpCooling
      + Manifold
        + Flows
          + SourceAnode
          + SourceCathode
          + SourceCathodeHouse
          + SourceNozzle
          + SourcePlate1
          + SourcePlate2
          + SourcePlate3
          + SourcePlate4
          + SourcePlate5
          + SourcePlate6
          + Target
        + Temperatures
          + SourceAnode
          + SourceCathode
          + SourceCathodeHouse
          + SourceNozzle
          + SourcePlate1
          + SourcePlate2
          + SourcePlate3
          + SourcePlate4
          + SourcePlate5
          + SourcePlate6
          + Supply
          + Target
    + LpCooling
      + Manifold
        + Calorimeters
          + DirtyWaterUnit
          + IonBeamDetector
          + MagnetCoil1
          + MagnetCoil2
          + MagnetCoil3
          + MagnetPS
          + PlasmaPS
          + SourceAnode
          + SourceCathode
          + SourceFlange
          + SourceHouse
          + SourceNozzle
          + SourcePlate1
          + SourcePlate2
          + SourcePlate3
          + SourcePlate4
          + SourcePlate5
          + SourcePlate6
          + Target
          + Total
          + VacuumPorts
          + VacuumVessel
        + Flows
          + DirtyWaterUnit
          + IonBeamDetector
          + MagnetCoil1
          + MagnetCoil2
          + MagnetCoil3
          + MagnetPS
          + PlasmaPS
          + SourceFlange
          + VacuumPorts
          + VacuumVessel
        + Temperatures
          + DirtyWaterUnit
          + IonBeamDetector
          + MagnetCoil1
          + MagnetCoil2
          + MagnetCoil3
          + MagnetPS
          + PlasmaPS
          + SourceFlange
          + Supply
          + VacuumPorts
          + VacuumVessel
    + Magnet
      + Coil1
        + ConnectedPsNr
        + CooledPower
        + CurrentPv
        + WaterFlow
        + WaterTemp
      + Coil2
        + ConnectedPsNr
        + CooledPower
        + CurrentPv
        + WaterFlow
        + WaterTemp
      + Coil3
        + ConnectedPsNr
        + CooledPower
        + CurrentPv
        + WaterFlow
        + WaterTemp
      + PowerSupply
        + CooledPower
        + StatusRegisterRack
        + StatusRegisterUnit12
        + StatusRegisterUnit34
        + Unit1
          + CurrentPv
          + CurrentSp
        + Unit2
          + CurrentPv
          + CurrentSp
        + Unit3
          + CurrentPv
          + CurrentSp
        + Unit4
          + CurrentPv
          + CurrentSp
        + WaterFlow
        + WaterTemp
    + Plasma
      + ControlSystem
        + ExperimentConfigFileName
        + ExpWaterFlowEnBits
        + ExpWaterTempEnBits
        + PlasmaShutdown
        + SourceVoltEnBits
        + SourceWaterFlowEnBits
        + SourceWaterTempEnBits
        + ThermocoupleEnBits
        + UplaMode
        + UplaPlcState
      + GasInlet
        + Cylinders
          + Cyl1GasType
          + Cyl2GasType
          + Cyl3GasType
          + Cyl4GasType
          + Cyl6GasType
        + Mfc1
          + FlowPv
          + FlowSp
          + ValveEnabled
        + Mfc2
          + FlowPv
          + FlowSp
          + ValveEnabled
        + Mfc3
          + FlowPv
          + FlowSp
          + ValveEnabled
        + Mfc4
          + FlowPv
          + FlowSp
          + ValveEnabled
        + Mfc5
          + FlowPv
          + FlowSp
          + ValveEnabled
        + Mfc6
          + FlowPv
          + FlowSp
        + Mfc7
          + FlowPv
          + FlowSp
          + ValveEnabled
        + Mfc8
          + FlowPv
          + FlowSp
          + ValveEnabled
      + PowerSupply
        + CooledPower
        + PS1.1
          + CurrentPv
          + CurrentSp
          + IgnitionMode
          + SourceConnection
          + Status
          + TargetConnection
          + VoltagePv
          + VoltageSp
        + PS1.2
          + CurrentPv
          + CurrentSp
          + IgnitionMode
          + SourceConnection
          + Status
          + TargetConnection
          + VoltagePv
          + VoltageSp
        + PS1.3
          + CurrentPv
          + CurrentSp
          + IgnitionMode
          + SourceConnection
          + Status
          + TargetConnection
          + VoltagePv
          + VoltageSp
        + StatusRegister
        + WaterFlow
        + WaterTemp
      + Source
        + Anode
          + CooledPower
          + WaterFlow
          + WaterTemp
        + Cathode
          + CooledPower
          + CurrentPs
          + Voltage
          + VoltagePs
          + WaterFlow
          + WaterTemp
        + CathodeHouse
          + CooledPower
          + Voltage
          + WaterFlow
          + WaterTemp
        + Config
          + Comment
          + Description
          + DrawingName
          + FileName
          + Id
          + NumPlates
        + Gas
          + ChannelPressure
          + FlowAr
          + FlowCh4
          + FlowD2
          + FlowH2
          + FlowHe
          + FlowN2
          + FlowNe
          + FlowXe
          + Valve
        + Nozzle
          + CooledPower
          + WaterFlow
          + WaterTemp
        + Plate1
          + CooledPower
          + Voltage
          + WaterFlow
          + WaterTemp
        + Plate2
          + CooledPower
          + Voltage
          + WaterFlow
          + WaterTemp
        + Plate3
          + CooledPower
          + Voltage
          + WaterFlow
          + WaterTemp
        + Plate4
          + CooledPower
          + Voltage
          + WaterFlow
          + WaterTemp
        + Plate5
          + CooledPower
          + Voltage
          + WaterFlow
          + WaterTemp
        + Plate6
          + CooledPower
          + Voltage
          + WaterFlow
          + WaterTemp
        + Thermocouple
          + Tc1
          + Tc2
        + Voltages
          + Cathode
          + CathodeHouse
          + Plate1
          + Plate2
          + Plate3
          + Plate4
          + Plate5
          + Plate6
    + Target
      + Bias
        + CurrentPs
        + PositivePolarity
        + PsConnected
        + VoltagePs
        + VoltagePv
      + Calorimeter
        + CooledPower
        + HeaterCurrent
        + HeaterPower
        + HeaterVoltage
        + WaterTempDiff
      + Cooling
        + CooledPowerMf
        + WaterFlowMf
        + WaterTempMf
      + Thermocouple
        + Tc1
        + Tc2
    + Vacuum
      + Cooling
        + Ports
          + CooledPower
          + WaterFlow
          + WaterTemp
        + SourceFlange
          + CooledPower
          + WaterFlow
          + WaterTemp
        + Vessel
          + CooledPower
          + WaterFlow
          + WaterTemp
      + GasInlet
        + FlowAr
        + FlowCh4
        + FlowD2
        + FlowH2
        + FlowHe
        + FlowN2
        + FlowNe
        + FlowXe
        + Valve
      + Vessel
        + Thermocouple
          + Tc1
          + Tc2
          + Tc3
          + Tc4
          + Tc5
          + Tc6

I already spotted a few data mistakes in the input data with this.
UEZ
Posts: 563
Joined: May 05, 2017 19:59
Location: Germany

Re: Parse string to tree structure

Postby UEZ » Mar 23, 2020 22:10

@badidea: thanks for testing. Sad to hear that it still doesn't work properly... :-(

C'est la vie...

¯\_(ツ)_/¯
badidea
Posts: 2058
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Parse string to tree structure

Postby badidea » Mar 23, 2020 22:17

UEZ wrote:@badidea: thanks for testing. Sad to hear that it still doesn't work properly... :-(

C'est la vie...

¯\_(ツ)_/¯

No problem, I can use grindstone's tool for now. Meanwhile i'll try to fix my own version.

Revised input data for those who want to test a larger data set:

Code: Select all

/UPP/Plasma/ControlSystem/UepmMode
/UPP/HpCooling/Manifold/Temperatures/Supply
/UPP/HpCooling/Manifold/Flows/Target
/UPP/Target/Cooling/WaterTempMf
/UPP/HpCooling/Manifold/Temperatures/Target
/UPP/Target/Cooling/WaterFlowMf
/UPP/HpCooling/Manifold/Flows/SourceAnode
/UPP/Plasma/Source/Components/Anode/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourceAnode
/UPP/Plasma/Source/Components/Anode/WaterTemp
/UPP/HpCooling/Manifold/Flows/SourceNozzle
/UPP/Plasma/Source/Components/Nozzle/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourceNozzle
/UPP/Plasma/Source/Components/Nozzle/WaterTemp
/UPP/HpCooling/Manifold/Flows/SourcePlate1
/UPP/Plasma/Source/Components/Plate1/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourcePlate1
/UPP/Plasma/Source/Components/Plate1/WaterTemp
/UPP/HpCooling/Manifold/Flows/SourcePlate2
/UPP/Plasma/Source/Components/Plate2/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourcePlate2
/UPP/Plasma/Source/Components/Plate2/WaterTemp
/UPP/HpCooling/Manifold/Flows/SourcePlate3
/UPP/Plasma/Source/Components/Plate3/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourcePlate3
/UPP/Plasma/Source/Components/Plate3/WaterTemp
/UPP/HpCooling/Manifold/Flows/SourcePlate4
/UPP/Plasma/Source/Components/Plate4/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourcePlate4
/UPP/Plasma/Source/Components/Plate4/WaterTemp
/UPP/HpCooling/Manifold/Flows/SourcePlate5
/UPP/Plasma/Source/Components/Plate5/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourcePlate5
/UPP/Plasma/Source/Components/Plate5/WaterTemp
/UPP/HpCooling/Manifold/Flows/SourcePlate6
/UPP/Plasma/Source/Components/Plate6/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourcePlate6
/UPP/Plasma/Source/Components/Plate6/WaterTemp
/UPP/HpCooling/Manifold/Flows/SourceCathodeHouse
/UPP/Plasma/Source/Components/CathodeHouse/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourceCathodeHouse
/UPP/Plasma/Source/Components/CathodeHouse/WaterTemp
/UPP/HpCooling/Manifold/Flows/SourceCathode
/UPP/Plasma/Source/Components/Cathode/WaterFlow
/UPP/HpCooling/Manifold/Temperatures/SourceCathode
/UPP/Plasma/Source/Components/Cathode/WaterTemp
/UPP/LpCooling/Manifold/Temperatures/Supply
/UPP/Target/Calorimeter/WaterTempDiff
/UPP/Target/Calorimeter/HeaterVoltage
/UPP/Target/Calorimeter/HeaterCurrent
/UPP/LpCooling/Manifold/Flows/DirtyWaterUnit
/UPP/LpCooling/Manifold/Temperatures/DirtyWaterUnit
/UPP/LpCooling/Manifold/Flows/MagnetCoil1
/UPP/Magnet/Coil1/WaterFlow
/UPP/LpCooling/Manifold/Temperatures/MagnetCoil1
/UPP/Magnet/Coil1/WaterTemp
/UPP/LpCooling/Manifold/Flows/MagnetCoil2
/UPP/Magnet/Coil2/WaterFlow
/UPP/LpCooling/Manifold/Temperatures/MagnetCoil2
/UPP/Magnet/Coil2/WaterTemp
/UPP/LpCooling/Manifold/Flows/MagnetCoil3
/UPP/Magnet/Coil3/WaterFlow
/UPP/LpCooling/Manifold/Temperatures/MagnetCoil3
/UPP/Magnet/Coil3/WaterTemp
/UPP/LpCooling/Manifold/Flows/VacuumVessel
/UPP/Vacuum/Cooling/Vessel/WaterFlow
/UPP/LpCooling/Manifold/Temperatures/VacuumVessel
/UPP/Vacuum/Cooling/Vessel/WaterTemp
/UPP/LpCooling/Manifold/Flows/VacuumPorts
/UPP/Vacuum/Cooling/Ports/WaterFlow
/UPP/LpCooling/Manifold/Temperatures/VacuumPorts
/UPP/Vacuum/Cooling/Ports/WaterTemp
/UPP/LpCooling/Manifold/Flows/SourceFlange
/UPP/Vacuum/Cooling/SourceFlange/WaterFlow
/UPP/LpCooling/Manifold/Temperatures/SourceFlange
/UPP/Vacuum/Cooling/SourceFlange/WaterTemp
/UPP/LpCooling/Manifold/Flows/MagnetPS
/UPP/Magnet/PowerSupply/WaterFlow
/UPP/LpCooling/Manifold/Temperatures/MagnetPS
/UPP/Magnet/PowerSupply/WaterTemp
/UPP/LpCooling/Manifold/Flows/PlasmaPS
/UPP/Plasma/PowerSupply/WaterFlow
/UPP/LpCooling/Manifold/Temperatures/PlasmaPS
/UPP/Plasma/PowerSupply/WaterTemp
/UPP/LpCooling/Manifold/Flows/IonBeamDetector
/UPP/Diagnostics/IonBeamDet1/WaterFlow
/UPP/LpCooling/Manifold/Temperatures/IonBeamDetector
/UPP/Diagnostics/IonBeamDet1/WaterTemp
/UPP/Target/Calorimeter/CooledPower
/UPP/Target/Calorimeter/HeaterPower
/UPP/HpCooling/Manifold/Calorimeters/Target
/UPP/Target/Cooling/CooledPowerMf
/UPP/HpCooling/Manifold/Calorimeters/SourceAnode
/UPP/Plasma/Source/Components/Anode/CooledPower
/UPP/HpCooling/Manifold/Calorimeters/SourceNozzle
/UPP/Plasma/Source/Components/Nozzle/CooledPower
/UPP/HpCooling/Manifold/Calorimeters/SourcePlate1
/UPP/Plasma/Source/Components/Plate1/CooledPower
/UPP/HpCooling/Manifold/Calorimeters/SourcePlate2
/UPP/Plasma/Source/Components/Plate2/CooledPower
/UPP/HpCooling/Manifold/Calorimeters/SourcePlate3
/UPP/Plasma/Source/Components/Plate3/CooledPower
/UPP/HpCooling/Manifold/Calorimeters/SourcePlate4
/UPP/Plasma/Source/Components/Plate4/CooledPower
/UPP/HpCooling/Manifold/Calorimeters/SourcePlate5
/UPP/Plasma/Source/Components/Plate5/CooledPower
/UPP/HpCooling/Manifold/Calorimeters/SourcePlate6
/UPP/Plasma/Source/Components/Plate6/CooledPower
/UPP/HpCooling/Manifold/Calorimeters/SourceCathodeHouse
/UPP/Plasma/Source/Components/CathodeHouse/CooledPower
/UPP/HpCooling/Manifold/Calorimeters/SourceCathode
/UPP/Plasma/Source/Components/Cathode/CooledPower
/UPP/HpCooling/Manifold/Calorimeters/Total
/UPP/LpCooling/Manifold/Calorimeters/DirtyWaterUnit
/UPP/LpCooling/Manifold/Calorimeters/MagnetCoil1
/UPP/Magnet/Coil1/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/MagnetCoil2
/UPP/Magnet/Coil2/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/MagnetCoil3
/UPP/Magnet/Coil3/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/VacuumVessel
/UPP/Vacuum/Cooling/Vessel/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/VacuumPorts
/UPP/Vacuum/Cooling/Ports/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/SourceFlange
/UPP/Vacuum/Cooling/SourceFlange/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/MagnetPS
/UPP/Magnet/PowerSupply/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/PlasmaPS
/UPP/Plasma/PowerSupply/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/IonBeamDetector
/UPP/Diagnostics/IonBeamDet1/CooledPower
/UPP/LpCooling/Manifold/Calorimeters/Total
/UPP/Plasma/ControlSystem/UplaMode
/UPP/Plasma/ControlSystem/PlasmaShutdown
/UPP/Plasma/PowerSupply/StatusRegister
/UPP/Magnet/PowerSupply/StatusRegisterUnit12
/UPP/Magnet/PowerSupply/StatusRegisterUnit34
/UPP/Magnet/PowerSupply/StatusRegisterRack
/UPP/Plasma/ControlSystem/UplaPlcState
/UPP/Plasma/GasSystem/Cylinders/Cyl1GasType
/UPP/Plasma/GasSystem/Cylinders/Cyl2GasType
/UPP/Plasma/GasSystem/Cylinders/Cyl3GasType
/UPP/Plasma/GasSystem/Cylinders/Cyl4GasType
/UPP/Plasma/GasSystem/Cylinders/Cyl6GasType
/UPP/Plasma/PowerSupply/PS1.1/IgnitionMode
/UPP/Plasma/PowerSupply/PS1.2/IgnitionMode
/UPP/Plasma/PowerSupply/PS1.3/IgnitionMode
/UPP/Plasma/PowerSupply/PS1.1/SourceConnection
/UPP/Plasma/PowerSupply/PS1.2/SourceConnection
/UPP/Plasma/PowerSupply/PS1.3/SourceConnection
/UPP/Plasma/PowerSupply/PS1.1/TargetConnection
/UPP/Plasma/PowerSupply/PS1.2/TargetConnection
/UPP/Plasma/PowerSupply/PS1.3/TargetConnection
/UPP/Target/Bias/PositivePolarity
/UPP/Magnet/Coil1/ConnectedPsNr
/UPP/Magnet/Coil2/ConnectedPsNr
/UPP/Magnet/Coil3/ConnectedPsNr
/UPP/Plasma/GasSystem/Mfc/Mfc1/ValveEnabled
/UPP/Plasma/GasSystem/Mfc/Mfc2/ValveEnabled
/UPP/Plasma/GasSystem/Mfc/Mfc3/ValveEnabled
/UPP/Plasma/GasSystem/Mfc/Mfc4/ValveEnabled
/UPP/Plasma/GasSystem/Mfc/Mfc5/ValveEnabled
/UPP/Plasma/GasSystem/Mfc/Mfc7/ValveEnabled
/UPP/Plasma/GasSystem/Mfc/Mfc8/ValveEnabled
/UPP/Plasma/Source/Config/FileName
/UPP/Plasma/Source/Config/Id
/UPP/Plasma/Source/Config/DrawingName
/UPP/Plasma/Source/Config/Description
/UPP/Plasma/Source/Config/Comment
/UPP/Plasma/Source/Config/NumPlates
/UPP/Plasma/ControlSystem/SourceVoltEnBits
/UPP/Plasma/ControlSystem/SourceWaterFlowEnBits
/UPP/Plasma/ControlSystem/SourceWaterTempEnBits
/UPP/Plasma/ControlSystem/ExperimentConfigFileName
/UPP/Plasma/ControlSystem/ThermocoupleEnBits
/UPP/Plasma/ControlSystem/ExpWaterFlowEnBits
/UPP/Plasma/ControlSystem/ExpWaterTempEnBits
/UPP/Plasma/ControlSystem/Transition/Duration/Time1
/UPP/Plasma/ControlSystem/Transition/Duration/Time2
/UPP/Plasma/ControlSystem/Transition/Duration/Time3
/UPP/Plasma/ControlSystem/Transition/Duration/Time4
/UPP/Plasma/ControlSystem/Transition/Duration/Time5
/UPP/Plasma/ControlSystem/Transition/Duration/Time6
/UPP/Plasma/ControlSystem/Transition/Duration/Time7
/UPP/Plasma/ControlSystem/Transition/Duration/Time8
/UPP/Plasma/ControlSystem/Transition/Number/Cathode
/UPP/Plasma/ControlSystem/Transition/Number/TargetBias
/UPP/Plasma/ControlSystem/Transition/Number/Magnet
/UPP/Plasma/ControlSystem/Transition/Number/SourceGas1
/UPP/Plasma/ControlSystem/Transition/Number/SourceGas2
/UPP/Plasma/ControlSystem/Transition/Number/SourceGas3
/UPP/Plasma/ControlSystem/Transition/Number/SourceGas4
/UPP/Plasma/ControlSystem/Transition/Number/SourceGas5
/UPP/Plasma/ControlSystem/Transition/Number/VesselGas1
/UPP/Plasma/ControlSystem/Transition/Number/VesselGas1
/UPP/Plasma/ControlSystem/Transition/Number/VesselGas1
/UPP/Plasma/Source/Gas/FlowAr
/UPP/Plasma/Source/Gas/FlowH2
/UPP/Plasma/Source/Gas/FlowD2
/UPP/Plasma/Source/Gas/FlowHe
/UPP/Plasma/Source/Gas/FlowCh4
/UPP/Plasma/Source/Gas/FlowNe
/UPP/Plasma/Source/Gas/FlowXe
/UPP/Plasma/Source/Gas/FlowN2
/UPP/Vacuum/GasInlet/FlowAr
/UPP/Vacuum/GasInlet/FlowH2
/UPP/Vacuum/GasInlet/FlowD2
/UPP/Vacuum/GasInlet/FlowHe
/UPP/Vacuum/GasInlet/FlowCh4
/UPP/Vacuum/GasInlet/FlowNe
/UPP/Vacuum/GasInlet/FlowXe
/UPP/Vacuum/GasInlet/FlowN2
/UPP/Plasma/GasSystem/Mfc/Mfc1/FlowPv
/UPP/Plasma/GasSystem/Mfc/Mfc2/FlowPv
/UPP/Plasma/GasSystem/Mfc/Mfc3/FlowPv
/UPP/Plasma/GasSystem/Mfc/Mfc4/FlowPv
/UPP/Plasma/GasSystem/Mfc/Mfc5/FlowPv
/UPP/Plasma/GasSystem/Mfc/Mfc6/FlowPv
/UPP/Plasma/GasSystem/Mfc/Mfc7/FlowPv
/UPP/Plasma/GasSystem/Mfc/Mfc8/FlowPv
/UPP/Plasma/Source/Components/Cathode/VoltagePs
/UPP/Plasma/Source/Components/Cathode/CurrentPs
/UPP/Target/Bias/VoltagePs
/UPP/Target/Bias/CurrentPs
/UPP/Magnet/Coil1/CurrentPv
/UPP/Magnet/Coil2/CurrentPv
/UPP/Magnet/Coil3/CurrentPv
/UPP/Vacuum/Vessel/Thermocouple/Tc1
/UPP/Vacuum/Vessel/Thermocouple/Tc2
/UPP/Vacuum/Vessel/Thermocouple/Tc3
/UPP/Vacuum/Vessel/Thermocouple/Tc4
/UPP/Vacuum/Vessel/Thermocouple/Tc5
/UPP/Vacuum/Vessel/Thermocouple/Tc6
/UPP/Plasma/Source/Voltages/Cathode
/UPP/Plasma/Source/Components/Cathode/Voltage
/UPP/Plasma/Source/Voltages/CathodeHouse
/UPP/Plasma/Source/Components/CathodeHouse/Voltage
/UPP/Plasma/Source/Voltages/Plate1
/UPP/Plasma/Source/Components/Plate1/Voltage
/UPP/Plasma/Source/Voltages/Plate2
/UPP/Plasma/Source/Components/Plate2/Voltage
/UPP/Plasma/Source/Voltages/Plate3
/UPP/Plasma/Source/Components/Plate3/Voltage
/UPP/Plasma/Source/Voltages/Plate4
/UPP/Plasma/Source/Components/Plate4/Voltage
/UPP/Plasma/Source/Voltages/Plate5
/UPP/Plasma/Source/Components/Plate5/Voltage
/UPP/Plasma/Source/Voltages/Plate6
/UPP/Plasma/Source/Components/Plate6/Voltage
/UPP/Plasma/Source/Gas/ChannelPressure
/UPP/Plasma/Source/Thermocouple/Tc1
/UPP/Plasma/Source/Thermocouple/Tc2
/UPP/Target/Thermocouple/Tc1
/UPP/Target/Thermocouple/Tc2
/UPP/Target/Bias/VoltagePv
/UPP/Plasma/PowerSupply/Ps1.1/Status
/UPP/Plasma/PowerSupply/Ps1.2/Status
/UPP/Plasma/PowerSupply/Ps1.3/Status
/UPP/Plasma/PowerSupply/Ps1.1/VoltagePv
/UPP/Plasma/PowerSupply/Ps1.2/VoltagePv
/UPP/Plasma/PowerSupply/Ps1.3/VoltagePv
/UPP/Plasma/PowerSupply/Ps1.1/CurrentPv
/UPP/Plasma/PowerSupply/Ps1.2/CurrentPv
/UPP/Plasma/PowerSupply/Ps1.3/CurrentPv
/UPP/Magnet/PowerSupply/Unit1/CurrentPv
/UPP/Magnet/PowerSupply/Unit2/CurrentPv
/UPP/Magnet/PowerSupply/Unit3/CurrentPv
/UPP/Magnet/PowerSupply/Unit4/CurrentPv
/UPP/Plasma/GasSystem/Mfc/Mfc1/FlowSp
/UPP/Plasma/GasSystem/Mfc/Mfc2/FlowSp
/UPP/Plasma/GasSystem/Mfc/Mfc3/FlowSp
/UPP/Plasma/GasSystem/Mfc/Mfc4/FlowSp
/UPP/Plasma/GasSystem/Mfc/Mfc5/FlowSp
/UPP/Plasma/GasSystem/Mfc/Mfc6/FlowSp
/UPP/Plasma/GasSystem/Mfc/Mfc7/FlowSp
/UPP/Plasma/GasSystem/Mfc/Mfc8/FlowSp
/UPP/Plasma/PowerSupply/Ps1.1/VoltageSp
/UPP/Plasma/PowerSupply/Ps1.2/VoltageSp
/UPP/Plasma/PowerSupply/Ps1.3/VoltageSp
/UPP/Plasma/PowerSupply/Ps1.1/CurrentSp
/UPP/Plasma/PowerSupply/Ps1.2/CurrentSp
/UPP/Plasma/PowerSupply/Ps1.3/CurrentSp
/UPP/Magnet/PowerSupply/Unit1/CurrentSp
/UPP/Magnet/PowerSupply/Unit2/CurrentSp
/UPP/Magnet/PowerSupply/Unit3/CurrentSp
/UPP/Magnet/PowerSupply/Unit4/CurrentSp
/UPP/Plasma/Source/Gas/Valve
/UPP/Vacuum/GasInlet/Valve
/UPP/Target/Bias/PsConnected

Return to “General”

Who is online

Users browsing this forum: No registered users and 3 guests