/// <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?"); } }
/* * 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); }
/// <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; }
/* * 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 ); }
public Menu(ref InternalEventHandler p) { ieHandler = p; }
public EventReceiver() { running = false; ieHandler = new InternalEventHandler(); }