public void Run() { // load config - this defines the XML event types to be processed string configFile = "esper.examples.cfg.xml"; Uri url = ResourceManager.ResolveResourceURL(configFile); Configuration config = new Configuration(); config.Configure(url); // get engine instance EPServiceProvider epService = EPServiceProviderManager.GetProvider(engineURI, config); // set up statement var rfidStmt = RFIDTagsPerSensorStmt.Create(epService.EPAdministrator); rfidStmt.Events += LogRate; // Send events int eventCount = 0; while (eventCount < numEvents) { SendEvent(epService.EPRuntime); eventCount++; } }
public void SetUp() { Uri url = ResourceManager.ResolveResourceURL("esper.examples.cfg.xml"); Configuration config = new Configuration(); config.Configure(url); epService = EPServiceProviderManager.GetProvider("AutoIdSim", config); epService.Initialize(); listener = new SupportUpdateListener(); var rfidStmt = RFIDTagsPerSensorStmt.Create(epService.EPAdministrator); rfidStmt.Events += listener.Update; }