node-modbus icon indicating copy to clipboard operation
node-modbus copied to clipboard

Request address is returning unitId

Open miqmago opened this issue 2 years ago • 1 comments

https://github.com/Cloud-Automation/node-modbus/blob/af7ddd3e47173233078ce8da65dfe9a020575eb3/src/tcp-request.ts#L31

  get address () {
    return this.unitId
  }

  get slaveId () {
    return this.unitId
  }

I'm not sure if this is the correct value, shouldn't it return return this._body._start || this._body._address? In case of slaveId I'm not sure of the value that should be returned...

miqmago avatar Dec 24 '22 17:12 miqmago

Yes, that is probably a bug :-)

stefanpoeter avatar Jan 12 '23 12:01 stefanpoeter