Skip to content

Commit

Permalink
feat(client): expose net and adr from remote, if available
Browse files Browse the repository at this point in the history
  • Loading branch information
kueblc committed May 15, 2024
1 parent c120144 commit f5e1047
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,12 @@ class Client extends EventEmitter {
}
header.apduType = baApdu.getDecodedType(buffer, offset);
header.expectingReply = !!(result.funct & baEnum.NpduControlBit.EXPECTING_REPLY);
if (result.source && result.source.target) {
// SNET of the host. Integer.
header.sender.net = result.source.target.net;
// SADR of the host. Integer[].
header.sender.adr = result.source.target.adr;
}
this._handlePdu(buffer, offset, msgLength, header);
}

Expand Down

0 comments on commit f5e1047

Please sign in to comment.