Пример #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?");
     }
 }
Пример #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?");
     }
 }
Пример #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);
        }
Пример #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;
 }
Пример #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 );
        }
Пример #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;
 }
Пример #8
0
 public EventReceiver()
 {
     running   = false;
     ieHandler = new InternalEventHandler();
 }
Пример #9
0
 public EventReceiver()
 {
     running = false;
     ieHandler = new InternalEventHandler();
 }