feat(core): Add update checking and version logging across startup components

This commit is contained in:
2025-03-25 09:27:44 +00:00
parent 32f85aa46f
commit 8ee21ea92b
6 changed files with 190 additions and 1 deletions

View File

@ -15,6 +15,8 @@ const execAsync = promisify(exec);
export class NupstSnmp {
// Active OID set
private activeOIDs: OIDSet;
// Reference to the parent Nupst instance
private nupst: any; // Type 'any' to avoid circular dependency
// Default SNMP configuration
private readonly DEFAULT_CONFIG: SnmpConfig = {
@ -43,6 +45,21 @@ export class NupstSnmp {
this.activeOIDs = UpsOidSets.getOidSet('cyberpower');
}
/**
* Set reference to the main Nupst instance
* @param nupst Reference to the main Nupst instance
*/
public setNupst(nupst: any): void {
this.nupst = nupst;
}
/**
* Get reference to the main Nupst instance
*/
public getNupst(): any {
return this.nupst;
}
/**
* Set active OID set based on UPS model
* @param config SNMP configuration