ANT icon indicating copy to clipboard operation
ANT copied to clipboard

Simplifying ANT APIs and IoT.js Support

Open RedCarrottt opened this issue 6 years ago • 0 comments

I'm planning to port ANT runtime from node.js to IoT.js.

Since present ANT APIs are too complicated, it is difficult to port the APIs to IoT.js.

Long-term Plan

  • [x] Simplify ANT APIs
  • [x] Port the simplified ANT APIs to IoT.js
  • [x] Implement ANT Companion App for Android
    • Runnable with ANT apps using simplified ANT APIs
  • [x] Enable static linking config of IoT.js ANT APIs (PR #174)
  • [ ] Packaging the simplified ANT APIs as node.js package (NPM) #77
  • It can divide ANT APIs by JS part and native part efficiently. #79

Simplified ANT APIs

  • [x] App Runtime API (it was AppCore API)
    • ant.runtime
      • String ant.runtime.setCurrentApp(Function on_initialize, Function on_start, Function on_stop)
        • return value: String result
      • App ant.runtime.getCurrentApp()
    • App
      • String App.getState()
      • Integer App.start()
      • Integer App.stop()
      • Attributes
        • Function App.onInitialize
        • Function App.onStart
        • Function App.onStop
        • Integer App.state
  • [x] Stream API
    • ant.stream
      • Pipeline ant.stream.createPipeline()
      • Element ant.stream.createElement()
    • Pipeline
      • void Pipeline.add(Element element)
      • void Pipeline.setState(String state)
    • Element
      • void Element.setProperty(String key, [Number / String] value)
      • void Element.connect(String detailedSignal, Function handler, Array args)
        • void handler(Array args)
  • [x] Base Companion API
    • ant.companion
      • void ant.companion.sendMessage(String message)
      • void ant.companion.setOnReceiveMessage(Function handler)
        • void handler(String message)
  • [x] Remote UI API (#104)
    • ant.remoteui
      • [x] StreamingView
      • [ ] NotificationView (it should be described in detail)
      • [ ] ConfigView (it should be described in detail)
  • [x] Compression Server API
    • ant.compressionServer
      • connect()
      • String downloadModel(String modelId)
        • return value: String modelPath
      • String downloadKernel(String kernelId)
        • return value: String kernelPath

RedCarrottt avatar Nov 22 '19 01:11 RedCarrottt