Exemplo n.º 1
0
 /// <summary>
 /// Constructor. Connects with nodeManager and sets up variables.
 /// </summary>
 /// <param name="jausAddress">The JausAddress of the current component.</param>
 public JausRouter(JausAddress jausAddress, InternalEventHandler ieHandler)
 {
     this.jausAddress = jausAddress;
     this.ieHandler = ieHandler;
     jrHandle = 0;
     if (JuniorAPI.JrConnect((int)jausAddress.get(), "nm.cfg", ref jrHandle) != 0)
     {
         Console.WriteLine("UNABLE TO CONNECT TO THE NODE MANAGER.  IS IT RUNNING?");
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor. Connects with nodeManager and sets up variables.
 /// </summary>
 /// <param name="jausAddress">The JausAddress of the current component.</param>
 public JausRouter(JausAddress jausAddress, InternalEventHandler ieHandler)
 {
     this.jausAddress = jausAddress;
     this.ieHandler   = ieHandler;
     jrHandle         = 0;
     if (JuniorAPI.JrConnect((int)jausAddress.get(), "nm.cfg", ref jrHandle) != 0)
     {
         Console.WriteLine("UNABLE TO CONNECT TO THE NODE MANAGER.  IS IT RUNNING?");
     }
 }
Exemplo n.º 3
0
        /*
         * Registers a notification event handler with the FSM.
         */
        public void registerNotification(string StateName, InternalEventHandler ieHandler,
                                         string EventName, string SourceName)
        {
            StateChangeNotification n = new StateChangeNotification();

            n._state   = StateName;
            n._handler = ieHandler;
            n._event   = EventName;
            n._source  = SourceName;

            notifications.Add(n);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Uses the given InternalEventHandler and JausRouter as its own.
 /// </summary>
 /// <param name="ieHandler">The InternalEventHandler to reference.</param>
 /// <param name="jausRouter">The component's JausRouter to send and receive messages.</param>
 public void setHandlers(ref InternalEventHandler ieHandler, ref JausRouter jausRouter)
 {
     this.ieHandler  = ieHandler;
     this.jausRouter = jausRouter;
 }
Exemplo n.º 5
0
        /*
        * Registers a notification event handler with the FSM.
        */
        public void registerNotification( string StateName, InternalEventHandler ieHandler, 
            string EventName, string SourceName)
        {
            StateChangeNotification n = new StateChangeNotification();
            n._state = StateName;
            n._handler = ieHandler;
            n._event = EventName;
            n._source = SourceName;

            notifications.Add( n );
        }
Exemplo n.º 6
0
 /// <summary>
 /// Uses the given InternalEventHandler and JausRouter as its own.
 /// </summary>
 /// <param name="ieHandler">The InternalEventHandler to reference.</param>
 /// <param name="jausRouter">The component's JausRouter to send and receive messages.</param>
 public void setHandlers(ref InternalEventHandler ieHandler, ref JausRouter jausRouter)
 {
     this.ieHandler = ieHandler;
     this.jausRouter = jausRouter;
 }
 public Menu(ref InternalEventHandler p)
 {
     ieHandler = p;
 }
Exemplo n.º 8
0
 public EventReceiver()
 {
     running   = false;
     ieHandler = new InternalEventHandler();
 }
Exemplo n.º 9
0
 public EventReceiver()
 {
     running = false;
     ieHandler = new InternalEventHandler();
 }