Function appIdGenerator

  • Generator function returning unique APPID within doc. Defined once it can generate unique APPIDs without the need to update the doc in-between

    GSE:         0x0000 - 0x3FFF
    GSE Type1A: 0x8000 - 0xBFFF
    SMV: 0x4000 - 0x7FFF

    Parameters

    • doc: XMLDocument

      Project SCL as XMLDocument

    • serviceType: "GSE" | "SMV"

      SampledValueControl (SMV) or GSEControl (GSE)

    • type1A: boolean = false

      Whether the GOOSE is a Trip GOOSE resulting in different APPID range - default false

    Returns (() => string | null)

    A function generating increasing unused APPID within doc on subsequent invocations

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

    Example

    const appIdGen = appIdGenerator(doc,"GSE");
    const appId1 = appIdGen(); //0001
    const appId2 = appIdGen(); //000A

Generated using TypeDoc