Class EventFunction

  • All Implemented Interfaces:
    ca.uqac.lif.cep.EventNodeFunction, ca.uqac.lif.petitpoucet.NodeFunction
    Direct Known Subclasses:
    EventFunction.InputValue, EventFunction.OutputValue

    public abstract class EventFunction
    extends java.lang.Object
    implements ca.uqac.lif.cep.EventNodeFunction, ca.uqac.lif.petitpoucet.NodeFunction
    Node function that relates to an event at a specific position, in a specific stream of a specific processor.
    Author:
    Sylvain Hallé
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int m_processorId
      The ID of the processor which produces the event
      protected int m_streamIndex
      The index of the output stream on the processor
      protected int m_streamPosition
      The position in the stream where the event is
      protected static ca.uqac.lif.petitpoucet.DirectValue s_dependencyFunction
      An instance of the DirectValue node function.
      • Fields inherited from interface ca.uqac.lif.petitpoucet.NodeFunction

        s_separator
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected EventFunction()
      Empty constructor.
        EventFunction​(int id, int index, int position)
      Creates a new event function.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ca.uqac.lif.petitpoucet.NodeFunction dependsOn()  
      int getProcessorId()
      Gets the processor ID associated to this event function
      int getStreamIndex()
      Gets the stream index associated to this event function
      int getStreamPosition()
      Gets the stream position associated to this event function
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface ca.uqac.lif.petitpoucet.NodeFunction

        getDataPointId
    • Field Detail

      • m_processorId

        protected int m_processorId
        The ID of the processor which produces the event
      • m_streamIndex

        protected int m_streamIndex
        The index of the output stream on the processor
      • m_streamPosition

        protected int m_streamPosition
        The position in the stream where the event is
      • s_dependencyFunction

        protected static final transient ca.uqac.lif.petitpoucet.DirectValue s_dependencyFunction
        An instance of the DirectValue node function. All objects of this class have this as their final dependency, so we create only one instance and reuse it every time.
    • Constructor Detail

      • EventFunction

        protected EventFunction()
        Empty constructor. Only there to support deserialization with Azrael.
      • EventFunction

        public EventFunction​(int id,
                             int index,
                             int position)
        Creates a new event function.
        Parameters:
        id - The ID of the processor
        index - The index of the output stream on that processor
        position - The position of the event in that stream
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • dependsOn

        public ca.uqac.lif.petitpoucet.NodeFunction dependsOn()
        Specified by:
        dependsOn in interface ca.uqac.lif.petitpoucet.NodeFunction
      • getProcessorId

        public int getProcessorId()
        Gets the processor ID associated to this event function
        Specified by:
        getProcessorId in interface ca.uqac.lif.cep.EventNodeFunction
        Returns:
        The ID
      • getStreamIndex

        public int getStreamIndex()
        Gets the stream index associated to this event function
        Specified by:
        getStreamIndex in interface ca.uqac.lif.cep.EventNodeFunction
        Returns:
        The index
      • getStreamPosition

        public int getStreamPosition()
        Gets the stream position associated to this event function
        Specified by:
        getStreamPosition in interface ca.uqac.lif.cep.EventNodeFunction
        Returns:
        The position