specpress
Version:
Export PDF and/or DOCX files from a subset of Markdown, ASN.1 and JSON files
58 lines (57 loc) • 2.39 kB
TypeScript
/** Maximum valid NR/EUTRA band number (inclusive). */
export declare const MAX_BAND_NUMBER = 511;
/** Upper bound of FR1 band numbers. Bands above this value are FR2. */
export declare const MAX_BAND_NUMBER_FR1 = 250;
/** Thrown when a band number value is invalid or out of range. */
export declare class InvalidBandNumberException extends Error {
constructor(message: string);
}
/** Radio Access Technology type. */
export declare enum RAT {
EUTRA = "EUTRA",
NR = "NR"
}
/**
* Represents a 3GPP band number with its associated RAT (NR or E-UTRA).
*
* NR band numbers are written with an 'n' prefix (e.g. `n1`, `n78`).
* E-UTRA band numbers are plain integers (e.g. `1`, `7`).
*
* Valid range: 1–511 (inclusive) for both RATs.
*/
export declare class BandNumber {
/** The RAT this band number belongs to. */
readonly rat: RAT;
private readonly value;
/**
* Constructs a BandNumber.
*
* @param aValue — the band number as a string (e.g. `"n1"`, `"7"`), a plain
* integer, or an existing BandNumber to copy.
* @param aRat — the RAT type; defaults to NR. For NR, string values must be
* prefixed with `'n'`. For EUTRA, string values must be plain integers.
* @throws InvalidBandNumberException if the value is out of range or malformed.
*/
constructor(aValue: string | number | BandNumber | null, aRat?: RAT);
/** Returns the numeric band number value (without 'n' prefix). */
valueOf(): number;
/**
* Returns the band number as a string in 3GPP notation.
* NR bands are prefixed with `'n'` (e.g. `"n78"`); EUTRA bands are plain integers (e.g. `"7"`).
*/
toString(): string;
/** Returns the numeric band number value. Equivalent to `valueOf()`. */
asInt(): number;
/** Returns true if this band is in Frequency Range 1 (band number ≤ 250). */
isFr1(): boolean;
/** Returns true if this band is in Frequency Range 2 (band number > 250). */
isFr2(): boolean;
/** Returns true if this band belongs to NR. */
isNR(): boolean;
/** Returns true if this band belongs to E-UTRA. */
isEUTRA(): boolean;
/** Returns true if this band number has the same numeric value and RAT as `other`. */
equals(other: BandNumber): boolean;
/** Determines the specification this band number belongs to. */
getSpecification(): string;
}