Cloud-Automation / node-modbus

Modbus TCP Client/Server implementation for Node.JS
456 stars 169 forks source link

Request address is returning unitId #320

Open miqmago opened 1 year ago

miqmago commented 1 year ago

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...

stefanpoeter commented 1 year ago

Yes, that is probably a bug :-)