Packages

  • package root
    Definition Classes
    root
  • package de
    Definition Classes
    root
  • package uni_luebeck
    Definition Classes
    de
  • package isp
    Definition Classes
    uni_luebeck
  • package tessla
    Definition Classes
    isp
  • package interpreter
    Definition Classes
    tessla
  • object JavaApi

    API interface for accessing the TeSSLa compiler from other Java or Scala projects.

    API interface for accessing the TeSSLa compiler from other Java or Scala projects. This API is optimized for a comfortable use from Java and Scala code.

    Usage example (in Java):

    import de.uni_luebeck.isp.tessla.interpreter.JavaApi;
    import de.uni_luebeck.isp.tessla.interpreter.JavaApi.*;
    import de.uni_luebeck.isp.tessla.interpreter.StreamEngine;
    
    class Main {
    
        public static void main(String[] args) {
    
             String spec_str = "in temperature: Events[Int]\r\n" +
             "\r\n" +
             "def low = temperature < 3\r\n" +
             "def high = temperature > 8\r\n" +
             "def unsafe = low || high\r\n" +
             "\r\n" +
             "out unsafe";
    
    
             System.out.println("Compiling...");
    
             Engine res = JavaApi.compile(spec_str ,"spec.tessla").engine();
    
             System.out.println("Ready!");
    
             res.addListener(new EngineListener(){
               public void event(String stream, scala.math.BigInt time, Object value) {
                 System.out.println("Got: " + stream + " = " + value + " at " + time);
               }
    
               public void printEvent(scala.math.BigInt time, Object value) {
                 System.out.println("Raw output: " + value + " at " + time);
               }
             });
    
             res.setTime(1);
             res.provide("temperature",2);
             res.setTime(2);
             res.provide("temperature",15);
             res.setTime(5);
             res.provide("temperature",8);
             res.step();
    
             System.out.println("Finished!");
    
         }
    
     }

    Note: This API internally uses the TeSSLa interpreter. For high performance applications it is advisable to use the TeSSLa compiler to generate a Scala API directly for a specific specification.

    Definition Classes
    interpreter
  • CompilationResult
  • Diagnostic
  • Engine
  • EngineListener
  • Result

abstract class EngineListener extends AnyRef

Abstract interface of a Listener which can be attached to an Engine to observe the outputs generated there. Use Engine.addListener to attach a Listener to an engine.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EngineListener
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new EngineListener()

Abstract Value Members

  1. abstract def event(stream: String, time: Time, value: Any): Unit

    Callback method, called when an output stream raises an event

    Callback method, called when an output stream raises an event

    stream

    Name of the stream

    time

    Timestamp of the event

    value

    Value of an event

  2. abstract def printEvent(time: Time, value: Any): Unit

    Callback method, called when an output stream without name raises an event.

    Callback method, called when an output stream without name raises an event. This may be the case if the corresponding stream was marked with a @raw annotation. This method is called for outputs for which not event is called.

    time

    Timestamp of the event

    value

    Value of an event

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped