Official Plugins (Kuzzle v2.x)
Device Manager v1.x
2

This plugin is part of the Kuzzle Enterprise Plan. If you are interested, please contact us.

Decoder #

Custom decoders must inherit the provided abstract Decoder class.

The super constructor must be called with the device model name.


Constructor #

Copied to clipboard!
Decoder()

Example #

Copied to clipboard!
import { Decoder } from 'kuzzle-plugin-device-manager';

class KarakoyDecoder extends Decoder {
  constructor () {
    super('Karakoy');
  }

  // This method must be implemented
  async decode (payload: JSONObject, request: KuzzleRequest): Promise<DeviceContent> {
    // ...custom device decoding function
  }
}