Function macAddressGenerator

  • Generator function returning MAC-Address within doc. Defined once it can generate unique MAC-address without the need to update the doc in-between:

    Parameters

    • doc: XMLDocument

      Project SCL as XMLDocument

    • serviceType: "GSE" | "SMV"

      SampledValueControl (SMV) or GSEControl (GSE)

    Returns (() => string | null)

    A function generating increasing unused MAC-Address within doc on subsequent invocations

      • (): string | null
      • Returns string | null

    Example

    const macGenerator = macAddressGenerator(doc,"GSE");
    const mac1 = macGenerator(); //01-0C-CD-01-00-09
    const mac2 = macGenerator(); //01-0C-CD-01-00-0A

Generated using TypeDoc