Skip to content

Commit

Permalink
chore: fix deactivateAlarm
Browse files Browse the repository at this point in the history
  • Loading branch information
erossignon committed Jul 3, 2023
1 parent 6fe67f5 commit bade5e2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Expand Up @@ -3,10 +3,7 @@ import { UAObject, UAVariable } from "node-opcua-address-space-base";

import { g_promotableObject, Promoter } from "./namespace_post_step";

export function registerNodePromoter(
standardNodeId: number,
promoter: Promoter,
applyOnTypes = false
): void {
g_promotableObject[resolveNodeId(standardNodeId).toString()] = { promoter, onInstanceOnly: applyOnTypes };
export function registerNodePromoter(standardNodeId: number, promoter: Promoter, onInstanceOnly = false): void {

g_promotableObject[resolveNodeId(standardNodeId).toString()] = { promoter, onInstanceOnly };
}
Expand Up @@ -201,6 +201,9 @@ export class UAAlarmConditionImpl extends UAAcknowledgeableConditionImpl impleme

public deactivateAlarm(retain?: boolean): void {
const branch = this.currentBranch();
if (!branch) {
return;
}
branch.setRetain(retain === undefined ? true : retain);
branch.setActiveState(false);
}
Expand Down
Expand Up @@ -193,7 +193,7 @@ class UACertificateExpirationAlarmImpl extends UASystemOffNormalAlarmImpl implem
this.expirationLimit.accessLevel = makeAccessLevelExFlag("CurrentRead | CurrentWrite");
this.expirationLimit.userAccessLevel = makeAccessLevelExFlag("CurrentRead | CurrentWrite");
this.expirationLimit.on("value_changed", (dataValue) => {
// make sure we re-evaluate the certificfate
// make sure we re-evaluate the certificate
const certificate = this.getCertificate();
this.setCertificate(certificate);
});
Expand Down

0 comments on commit bade5e2

Please sign in to comment.