Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

onComplete

onComplete: TypedEvent<ModbusCommand<any>> = new TypedEvent<ModbusCommand<any>>()

Fires on either success or failure, with the response bytes. Mainly used by the server to send a response.

onFailure

onFailure: TypedEvent<ModbusCommand<any>> = new TypedEvent<ModbusCommand<any>>()

Fires on a call of the fail method.

onSuccess

onSuccess: TypedEvent<ModbusCommand<any>> = new TypedEvent<ModbusCommand<any>>()

Fires on a call of the success method.

Accessors

functionCode

functionCode:

Modbus function code

registerLength

registerLength:

registerStartAddress

registerStartAddress:

responsePacket

responsePacket:

This function will give you the response packet bytes that will be sent on the emitting server. Before calling this function, the success or fail method must be called in order to set the response.

throws

ModbusCommandError if success or fail hasn't been called yet

unitId

unitId:

If RTU, unitId is equivalent to slaveId

Methods

fail

success

  • success(data: Uint16Array): void
  • Set success on this command to return a valid response to the emitting server.

    Parameters

    • data: Uint16Array

      Array of values of the requested input registers. Register values are 16 bits. Array length must equal registerLength. data[0] should be the value of the register at registerStartAddress.

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc