Author: smaisonneuve Date: 2015-06-09 15:39:35 +0000 (Tue, 09 Jun 2015) New Revision: 1667 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1667 Log: [Refactor] Turning SignalInfo into es6 class Modified: oipf/lib/js/impl/model/SignalInfo.js Modified: oipf/lib/js/impl/model/SignalInfo.js =================================================================== --- oipf/lib/js/impl/model/SignalInfo.js 2015-06-09 15:38:00 UTC (rev 1666) +++ oipf/lib/js/impl/model/SignalInfo.js 2015-06-09 15:39:35 UTC (rev 1667) @@ -1,56 +1,56 @@ -/* - * The SignalInfo object provides details on the signal strength of the tuner. - * If the tuner is not tuned to a transponder the all properties SHALL have +/* + * The SignalInfo object provides details on the signal strength of the tuner. + * If the tuner is not tuned to a transponder the all properties SHALL have * the value undefined . - * + * */ -var SignalInfo = Class.extend({ - - /* - * Description: - * Signal strength measured in dBm, for example -31.5dBm. - * - * Type: readonly Number - */ - strength: null, - - /* - * Description: - * Signal quality with range from 0 to 100. Calculation of quality is a - * function of ber and snr . The specification remains silent as to - * how the calculation is made. - * - * Type: readonly Integer - */ - quality: null, - - /* - * Description: - * Bit error rate. - * - * Type: readonly Integer - */ - ber: null, - - /* - * Description: - * Signal to noise ratio (dB), for example 22.3dB. - * - * Type: readonly Number - */ - snr: null, - - /* - * Description: - * True if the tuner is locked to a transponder. - * - * Type: readonly Boolean - */ - lock: null, - - init: function(defaultProperties) { +class SignalInfo { + + constructor(defaultProperties) { oipf.utils.initProperties.call(this, defaultProperties); + + /* + * Description: + * Signal strength measured in dBm, for example -31.5dBm. + * + * Type: readonly Number + */ + this.strength = null; + + /* + * Description: + * Signal quality with range from 0 to 100. Calculation of quality is a + * function of ber and snr . The specification remains silent as to + * how the calculation is made. + * + * Type: readonly Integer + */ + this.quality = null; + + /* + * Description: + * Bit error rate. + * + * Type: readonly Integer + */ + this.ber = null; + + /* + * Description: + * Signal to noise ratio (dB), for example 22.3dB. + * + * Type: readonly Number + */ + this.snr = null; + + /* + * Description: + * True if the tuner is locked to a transponder. + * + * Type: readonly Boolean + */ + this.lock = null; } -}); +}