Class Control


  • public class Control
    extends java.lang.Object
    Control is the main entry point for CLB control. It offers high-level interface to most CLB functionality. Each Control instance only relates to one DOM. Control uses an asynchronous command / reply semantics, therefore its high level call will return a 'Response' object. This allows for the batching of multiple commands:
     
     control.setBatchMode(true);
     Response<int[]> resp1 = control.dbg.readAddress(0x3000, 10);
     Response<int[]> resp2 = control.dbg.readAddress(0x3000, 10);
     
     for (Integer addr : resp1.get())    // Only now the request is send is send, and the replies 
     	    System.out.println(addr);      // processed.
     
     for (Integer addr : resp2.get())
          System.out.println(addr);
     
     
     
    All command sections have there own public final field, which you can use to easly access its functions.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Control.CommandGroup
      A command group implements a group of CLB commands belonging to a specific functional section of the CLB.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      CmdBase bse
      Exposes the base features.
      CmdLogicBoard clb
      Controller Logic Board
      CmdDebug dbg
      This section contains commands for the debug group.
      CmdInstrumentation ins
      Contains commands for controlling the instrumentation.
      CmdNetwork net
      Contains commands for controlling the network and WhiteRabbit
      CmdSystem sys
      This section contains commands for the system group.
    • Constructor Summary

      Constructors 
      Constructor Description
      Control​(int v1, int v2, int v3, int v4)  
      Control​(java.lang.String text)  
      Control​(java.net.Inet4Address addr)
      Create a new control instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Closes this Control class.
      void flush()
      Flushes all pending commands or events, sending them to the remote side.
      MessageProcessor getProcessor()  
      boolean isBatchMode()
      Whether or not this control is in batch mode.
      void setBatchMode​(boolean batch)
      Sets the batching mode.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • dbg

        public final CmdDebug dbg
        This section contains commands for the debug group.
      • sys

        public final CmdSystem sys
        This section contains commands for the system group.
      • net

        public final CmdNetwork net
        Contains commands for controlling the network and WhiteRabbit
      • ins

        public final CmdInstrumentation ins
        Contains commands for controlling the instrumentation.
      • bse

        public final CmdBase bse
        Exposes the base features.
    • Constructor Detail

      • Control

        public Control​(java.net.Inet4Address addr)
                throws java.io.IOException
        Create a new control instance. Usually a Control instance is bound to a specific dom. However, it is possible to create a broad-casting socket using the specific broadcast IP address. Using a broad-casting IP will make it impossible to send and receive anything but events.
        Parameters:
        addr - The IPv4 address of the DOM or a broadcasting address for creating a broadcast socket.
        Throws:
        java.io.IOException
        See Also:
        http://en.wikipedia.org/wiki/Broadcast_address
      • Control

        public Control​(int v1,
                       int v2,
                       int v3,
                       int v4)
                throws java.io.IOException
        Throws:
        java.io.IOException
      • Control

        public Control​(java.lang.String text)
                throws java.net.UnknownHostException,
                       java.io.IOException
        Throws:
        java.net.UnknownHostException
        java.io.IOException
    • Method Detail

      • setBatchMode

        public void setBatchMode​(boolean batch)
        Sets the batching mode. When in batching mode as much commands as possible are queued before send. To force an explicit sending, use flush()
        Parameters:
        batch - true to enable batch mode, false to disable.
      • flush

        public void flush()
        Flushes all pending commands or events, sending them to the remote side.
      • isBatchMode

        public boolean isBatchMode()
        Whether or not this control is in batch mode.
        Returns:
        true if it is, false otherwise.
      • close

        public void close()
                   throws java.lang.InterruptedException
        Closes this Control class.
        Throws:
        java.lang.InterruptedException - If interrupted.