Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Plugin

Index

Constructors

Properties

Methods

Constructors

constructor

  • Parameters

    • obniz: Obniz
    • id: number

    Returns Plugin

Properties

Optional onFrameEnd

onFrameEnd: undefined | (() => void)

Callback function is called when Frame Information Received

// Javascript Example
obniz.plugin.onFrameEnd = length => {
  console.log(`frame ended`);
};

Optional onFrameStart

onFrameStart: undefined | ((length: number) => void)

Callback function is called when Frame Information Received

// Javascript Example
obniz.plugin.onFrameStart = length => {
  console.log(`${length} bytes will be start`);
};

Optional onreceive

Callback function is called when Plugin is received.

// Javascript Example
obniz.plugin.onreceive = data => {
  console.log(data);
};

Methods

send

  • send(data: string | number | number[] | Buffer): void
  • Scan WiFi

    // Javascript Example
    obniz.plugin.send("obniz.js send data")
    
    obniz.plugin.send([0x00, 0x01, 0x02])

    Parameters

    • data: string | number | number[] | Buffer

    Returns void

Generated using TypeDoc