Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LinkingServiceSensor

Hierarchy

  • LinkingServiceSensor

Index

Properties

SERVICE_ID

SERVICE_ID: number = 3

SERVICE_NAME

SERVICE_NAME: string = "PeripheralDeviceSensorInformation"

Methods

_createPayload

  • _createPayload(message_name: any, params: any): null | Buffer
  • Parameters

    • message_name: any
    • params: any

    Returns null | Buffer

_createPayloadGetSensorInfo

  • _createPayloadGetSensorInfo(params: any): null | Buffer
  • Parameters

    • params: any

    Returns null | Buffer

_createPayloadSetNotifySensorInfo

  • _createPayloadSetNotifySensorInfo(params: any): null | Buffer
  • Parameters

    • params: any

    Returns null | Buffer

_createPropertyBlockBuffer

  • _createPropertyBlockBuffer(pid: any, val_buf: any): Buffer
  • Parameters

    • pid: any
    • val_buf: any

    Returns Buffer

_parseCancel

  • _parseCancel(buf: any): { cancelCode: any; cancelText: string; name: string }
  • Parameters

    • buf: any

    Returns { cancelCode: any; cancelText: string; name: string }

    • cancelCode: any
    • cancelText: string
    • name: string

_parseOriginalData

  • _parseOriginalData(buf: any, sensor_type: any): { chargeLevel: number; chargeRequired: boolean } | { temperature: number } | { humidity: number } | { pressure: any } | { openingCount: number; openingStatus: boolean } | { humanDetectionCount: number; humanDetectionResponse: boolean } | { moveCount: number; moveResponse: boolean } | { illuminance: any } | {}
  • Parameters

    • buf: any
    • sensor_type: any

    Returns { chargeLevel: number; chargeRequired: boolean } | { temperature: number } | { humidity: number } | { pressure: any } | { openingCount: number; openingStatus: boolean } | { humanDetectionCount: number; humanDetectionResponse: boolean } | { moveCount: number; moveResponse: boolean } | { illuminance: any } | {}

_parseParameter

  • _parseParameter(pid: any, buf: any, sensor_type: any): any
  • Parameters

    • pid: any
    • buf: any
    • sensor_type: any

    Returns any

_parseResultCode

  • _parseResultCode(buf: any): { name: string; resultCode: any; resultText: string }
  • Parameters

    • buf: any

    Returns { name: string; resultCode: any; resultText: string }

    • name: string
    • resultCode: any
    • resultText: string

_parseSensorType

  • _parseSensorType(buf: any): { name: string; sensorTypeCode: any; sensorTypeText: string }
  • Parameters

    • buf: any

    Returns { name: string; sensorTypeCode: any; sensorTypeText: string }

    • name: string
    • sensorTypeCode: any
    • sensorTypeText: string

_parseStatus

  • _parseStatus(buf: any): { name: string; statusCode: any; statusText: string }
  • Parameters

    • buf: any

    Returns { name: string; statusCode: any; statusText: string }

    • name: string
    • statusCode: any
    • statusText: string

_parseX_threshold

  • _parseX_threshold(buf: any): { name: string; xThreshold: any }
  • Parameters

    • buf: any

    Returns { name: string; xThreshold: any }

    • name: string
    • xThreshold: any

_parseX_value

  • _parseX_value(buf: any): { name: string; xValue: any }
  • Parameters

    • buf: any

    Returns { name: string; xValue: any }

    • name: string
    • xValue: any

_parseY_threshold

  • _parseY_threshold(buf: any): { name: string; yThreshold: any }
  • Parameters

    • buf: any

    Returns { name: string; yThreshold: any }

    • name: string
    • yThreshold: any

_parseY_value

  • _parseY_value(buf: any): { name: string; yValue: any }
  • Parameters

    • buf: any

    Returns { name: string; yValue: any }

    • name: string
    • yValue: any

_parseZ_threshold

  • _parseZ_threshold(buf: any): { name: string; zThreshold: any }
  • Parameters

    • buf: any

    Returns { name: string; zThreshold: any }

    • name: string
    • zThreshold: any

_parseZ_value

  • _parseZ_value(buf: any): { name: string; zValue: any }
  • Parameters

    • buf: any

    Returns { name: string; zValue: any }

    • name: string
    • zValue: any

createRequest

  • createRequest(message_name: any, params: any): null | Buffer
  • Parameters

    • message_name: any
    • params: any

    Returns null | Buffer

parsePayload

  • parsePayload(pnum: any, buf: any): any[]
  • Parameters

    • pnum: any
    • buf: any

    Returns any[]

setDeviceInfo

  • setDeviceInfo(info: any): void
  • Parameters

    • info: any

    Returns void

Object literals

MESSAGE_NAME_MAP

MESSAGE_NAME_MAP: object

00

00: string = "GET_SENSOR_INFO"

01

01: string = "GET_SENSOR_INFO_RESP"

02

02: string = "SET_NOTIFY_SENSOR_INFO"

03

03: string = "SET_NOTIFY_SENSOR_INFO_RESP"

04

04: string = "NOTIFY_PD_SENSOR_INFO"

Generated using TypeDoc