Apama Connectivity with Device Integration Platform Documentation 10.0 : Event Protocols : Sample EPL
Sample EPL
Below sample EPL describes how to subscribe and receive DIP measurements, DIP events and DIP devices.
package com.apama.dip.sample;

using com.apama.dip.Device;

using com.apama.dip.Measurement;

using com.apama.dip.Event;

monitor SampleApplication {

com.apama.dip.Measurement m;
com.apama.dip.Event e;
com.apama.dip.Device d;

action onload() {

// Subscribe to receive all the devices from device integration platform
monitor.subscribe(com.apama.dip.Device.CHANNEL);

// Consume all the devices from device integration platform
on all com.apama.dip.Device() as d {
log d.toString() at INFO;
}

// Subscribe to receive all the measurement published from
device integration platform
monitor.subscribe(com.apama.dip.Measurement.CHANNEL);

// Consume all the measurements from device integration platform
on all com.apama.dip.Measurement() as m{
log m.toString() at INFO;
}

// Consume all the events from device integration platform
on all com.apama.dip.Event() as e{
log e.toString() at INFO;
}

}
}
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback