BREAKING CHANGE(snmp): refactor: update SNMP type definitions and interface names for consistency
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import type { OIDSet, UpsModel } from './types.js';
|
||||
import type { IOidSet, TUpsModel } from './types.js';
|
||||
|
||||
/**
|
||||
* OID sets for different UPS models
|
||||
@ -8,7 +8,7 @@ export class UpsOidSets {
|
||||
/**
|
||||
* OID sets for different UPS models
|
||||
*/
|
||||
private static readonly UPS_OID_SETS: Record<UpsModel, OIDSet> = {
|
||||
private static readonly UPS_OID_SETS: Record<TUpsModel, IOidSet> = {
|
||||
// Cyberpower OIDs for RMCARD205 (based on CyberPower_MIB_v2.11)
|
||||
cyberpower: {
|
||||
POWER_STATUS: '1.3.6.1.4.1.3808.1.1.1.4.1.1.0', // upsBaseOutputStatus (2=online, 3=on battery)
|
||||
@ -57,7 +57,7 @@ export class UpsOidSets {
|
||||
* @param model UPS model name
|
||||
* @returns OID set for the model
|
||||
*/
|
||||
public static getOidSet(model: UpsModel): OIDSet {
|
||||
public static getOidSet(model: TUpsModel): IOidSet {
|
||||
return this.UPS_OID_SETS[model];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user