Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following table shows an overview of available event methods. Note that you can call methods of AbstractLogicalOperator or AbstractPipe in event methods, e.g. to send stream elements or punctuations.

Event methodDescription

processNext(IStreamObject object, int port)

 

processPunctuation(IPunctuation punctuation, int port)

 

processOpen()

 

processClose()

 

processDone()

 

processDone(int port)

 

createOutputSchema (int port)

 

sourceSubscribed()

 

sourceUnsubscribed()

 

ao_init()

 

po_init()

 

AO & PO methods

Besides validate and event methods it also possible to create norma’ methods. The ao-keyword should be used if a method needs to call a method of AbstractLogicalOperator. The po-keyword should be used if a method needs to call a method of AbstractPipe.

Code Block
titleExample
getOtherPort(int port) : int {
 return (port+1)%2;
 }
 
 ao getBaseTimeUnit : TimeUnit {
 SDFSchema schema = getInputSchema(0);
 SDFConstraint constraint = schema.getConstraint(SDFConstraint::BASE_TIME_UNIT);
 return constraint.value;
 }
 
 po pint(IPunctuation punctuation) {
 sendPunctuation(punctuation);
 }