Skip to main content
Version: v0.0.4

Function: resolveProfileTransport()

resolveProfileTransport(profile): AstmFraming | undefined

The profile's transport override, if any - the value a consumer feeds to detectFraming(bytes, { override }) to force framed/raw and bypass leading-byte auto-detection. undefined means "let detection decide."

Parameters

profile

AstmProfile | undefined

The active profile, or undefined.

Returns

AstmFraming | undefined

"framed" / "raw" when the profile forces one, else undefined.

Example

import { resolveProfileTransport, detectFraming, astmProfiles } from "@cosyte/astm";
const override = resolveProfileTransport(myRawTcpProfile);
const { framing } = detectFraming(bytes, override !== undefined ? { override } : {});