LogPrinter

Constructor

LogPrinter <id> (string label)

Action

Prints the concatenation of label and input on the console each time the input value is updated.

Predefined children

  • TextProperty: label
  • TextProperty: input.
  • Example 1

    
    use core
    use base
    use display
    use gui
    
    _main_
    Component root {
      Frame f ("myFrame", 0, 0, 500, 500)
    
      Exit ex (0, 1)
      f.close -> ex
    
      LogPrinter lp ("ivybus in: ")
    
      IvyAccess ivybus ("10.33.39.255:2023", "smala", "READY")
    
      Connector c1 (ivybus, "in/smala (\\S*)/1", lp, "input", 0)
    }
            

    Example 2

    
    use core
    use base
    use display
    use gui
    
    _main_
    Component root {
      Frame f ("myFrame", 0, 0, 500, 500)
    
      Exit ex (0, 1)
        f.close -> ex
    
      List entries {
        for (int n = 0; n < nb_entry; n++)
        {
          Component _ {
            ...
    
            FSM fsm {
              ...
            }
    
            LogPrinter lp ("log " + to_string(n) + " :")
            fsm.state => lp.input
          }
        }
      }
    }