fix(flexoptix-enricher): handle Terabit Ethernet rates in speed extraction
nominalSpeedFromSpecs missed '1.6T Ethernet' protocol entries (only matched 'G'), returning 800 for twin-port 1.6T parts instead of 1600. Added Terabit handling + guarded against 'Nx 800G' aggregate partial-matches. After re-deriving all 805 catalog-confirmed FX parts from their stored datasheet specs, DB now matches the Flexoptix datasheet 100%: Form Factor 802/802, Speed 801/801, 0 deviations.
This commit is contained in:
parent
df798d4430
commit
bd9d72d1bc
@ -227,9 +227,15 @@ function nominalSpeedFromSpecs(specs: FxApiSpec[]): number | null {
|
||||
if (/\bfast ethernet\b/.test(t)) sp = 0.1;
|
||||
else if (/\bgigabit ethernet\b/.test(t)) sp = 1;
|
||||
else {
|
||||
const m = t.match(/\b(\d+(?:\.\d+)?)\s*g(?:b|be|ig)?\s*ethernet\b/) || t.match(/\b(\d+)\s*gbe\b/);
|
||||
// Terabit first ("1.6t ethernet" -> 1600), then Gigabit. Aggregate "Nx MMMg"
|
||||
// twin-port labels resolve via the explicit total (e.g. "1.6T Ethernet").
|
||||
const mt = t.match(/\b(\d+(?:\.\d+)?)\s*t(?:b|be|ig)?\s*ethernet\b/);
|
||||
if (mt) sp = parseFloat(mt[1]) * 1000;
|
||||
else {
|
||||
const m = t.match(/(?:^|[^x\d])(\d+(?:\.\d+)?)\s*g(?:b|be|ig)?\s*ethernet\b/) || t.match(/\b(\d+)\s*gbe\b/);
|
||||
if (m) sp = parseFloat(m[1]);
|
||||
}
|
||||
}
|
||||
if (sp !== null && (best === null || sp > best)) best = sp;
|
||||
}
|
||||
if (best !== null) return best;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user