A workflow containing a TCP/IP collection agent can be set up to send responses back to the source from which the incoming data was received. This requires an APL agent (Analysis or Aggregation) to be part of the workflow.
...
The TCP/IP Collection Agent
In order to be able to send reply messages, Send Response must be enabled in the configuration window of the agent. Drop an Analysis agent in the workflow and connect it to the TCP/IP agent. Drag and release in the opposite direction to create a response route in the workflow.
...
Code Block |
---|
|
int seqNum;
synchronized int createSeqNum() {
seqNum = seqNum + 1;
return seqNum;
}
consume {
bytearray reply;
if ( input.duration <= 0 ) {
strToBA( reply, input.anum );
input.response = reply;
udrRoute( input, "response" );
} else {
strToBA( reply, (string)createSeqNum() );
input.response = reply;
udrRoute( input, "response" );
udrRoute( input, "UDRs" );
}
} |