Skip to content

Commit 9799b26

Browse files
committed
fix(client): Make confirmedCOV function use sendBvlc
1 parent 52b639b commit 9799b26

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/client.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -704,19 +704,19 @@ class Client extends EventEmitter {
704704
* }
705705
* );
706706
*/
707-
confirmedCOVNotification(address, monitoredObject, subscribeId, initiatingDeviceId, lifetime, values, options, next) {
707+
confirmedCOVNotification(receiver, monitoredObject, subscribeId, initiatingDeviceId, lifetime, values, options, next) {
708708
next = next || options;
709709
const settings = {
710710
maxSegments: options.maxSegments || baEnum.MaxSegmentsAccepted.SEGMENTS_65,
711711
maxApdu: options.maxApdu || baEnum.MaxApduLengthAccepted.OCTETS_1476,
712712
invokeId: options.invokeId || this._getInvokeId()
713713
};
714714
const buffer = this._getBuffer();
715-
baNpdu.encode(buffer, baEnum.NpduControlPriority.NORMAL_MESSAGE | baEnum.NpduControlBits.EXPECTING_REPLY, address);
715+
baNpdu.encode(buffer, baEnum.NpduControlPriority.NORMAL_MESSAGE | baEnum.NpduControlBits.EXPECTING_REPLY, receiver);
716716
baApdu.encodeConfirmedServiceRequest(buffer, baEnum.PduTypes.CONFIRMED_REQUEST, baEnum.ConfirmedServiceChoice.CONFIRMED_COV_NOTIFICATION, settings.maxSegments, settings.maxApdu, settings.invokeId, 0, 0);
717717
baServices.covNotify.encode(buffer, subscribeId, initiatingDeviceId, monitoredObject, lifetime, values);
718718
baBvlc.encode(buffer.buffer, baEnum.BvlcResultPurpose.ORIGINAL_UNICAST_NPDU, buffer.offset);
719-
this._transport.send(buffer.buffer, buffer.offset, address);
719+
this.sendBvlc(receiver, buffer);
720720
this._addCallback(settings.invokeId, (err, data) => {
721721
if (err) return next(err);
722722
next();

0 commit comments

Comments
 (0)