How to add a new DeviceModel - luigisaetta/kuragateway2019 GitHub Wiki

December 2019:

DeviceModel is a concept related to the way Oracle IoT C.S: works. See relevant publics docs.

At this moment, the way designed to enable the addition of support for a new DeviceModel is the following and requires addition to the code of the bundle OSGi and deployment of a new version. Deployment can be done "hot", as always in Kura

  • Add a new class for the JSON message representation in Java (see: AircareMessage)
  • Add a new class to define the fields in Oracle DeviceModel (see AircareModel)
  • Add a new Message Parser (see AircareMessageParser)
  • Add a new OracleIoTClient (see OracleIoTAircareClient... in it the send() method)
  • Modify the method createParser() in MessageParserFactory
  • Modify the method recognizeMsg in MessageParserFactory
  • Modify the method dump() in MessageDumper
  • Modify downloadMessageModel() in OracleIoTBaseClient