/** * @param {Config} config * @param {Context} context * Do not edit this comment or parameter types. Required for code suggestions */ exports.main = function (config, context) {
var channel = context.vars. Wifi_Channel_5GHz ; var subband = context.vars. Subband ;
var radioOperational = config.getTableByOid( "1.2.23.20.7" ); var rowOperational = radioOperational.createNewRow();
rowOperational.setByOid( "1" , "1" ); // Interface rowOperational.setByOid( "2" , "0" ); // WLAN-Interface activated radioOperational.addOrMerge(rowOperational);
var radioSettings = config.getTableByOid( "1.2.23.20.8" ); var rowRadioSettings = radioSettings.createNewRow();
rowRadioSettings.setByOid( "1" , "1" ); // Interface rowRadioSettings.setByOid( "6" , "2" ); // Set Frequency to 5GHz rowRadioSettings.setByOid( "7" , subband); // Set Subband - Possible Values: 1 (Band-1), 2 (Band-2), 3 (Band-1+2) rowRadioSettings.setByOid( "8" , channel); // Set Channel radioSettings.addOrMerge(rowRadioSettings);
};
|