Skip to content

Lite API: Stream

Gyeonghwan Hong edited this page Dec 21, 2020 · 4 revisions

Parent Document: ANT APIs

With ANT Stream API, applications can build their own sensor data stream pipeline.

Stream API comprises of pipeline functions and element functions.

You need to load stream API module before you use its API as following.

var streamAPI = require('ant').stream;

Pipeline

StreamAPI.createPipeline()

  • Pipeline StreamAPI.createPipeline(String pipelineName)

Pipeline.binAdd()

  • Boolean Pipeline.binAdd([Element, Array] elementOrElements)

Pipeline.setState()

  • Boolean Pipeline.setState(Integer state)

Pipeline.linkMany()

  • Boolean Pipeline.linkMany(Array elements)

Pipeline.unref()

  • Boolean Pipeline.unref(void)

Element

StreamAPI.createElement()

  • Element StreamAPI.createElement(String elementName)

Element.setProperty()

  • Boolean Element.setProperty(String key, [String, Number, Boolean] value)

Element.setCapsProperty()

  • Boolean Element.setCapsProperty(String key, String value)

Element.connectSignal()

  • Boolean Element.connectSignal(String detailedSignal, Function handler)

Element.link()

  • Boolean Element.link(Element destElement)

Common

StreamAPI.initialize()

  • void StreamAPI.initialize(void)

StreamAPI.finalize()

  • void StreamAPI.finalize(void)

StreamAPI.isInitialized()

  • Boolean StreamAPI.isInitialized(void)

StreamAPI.callDbusMethod()

  • String StreamAPI.callDbusMethod(String message)

Clone this wiki locally