Skip to content

tIED: Insert IED relies on generateNewId which may result in excessively long ids #143

@danyill

Description

@danyill

We should ensure that generating an new id never causes an id larger than 255 characters.

Image

The maximum length of the id is 255 characters.

Image

I know this doesn't sound like a concern initially but because we concatenate it eventually can be.

This arises from an engineering process between an ICT and the SCT:

  1. SCT imports multiple ICD files with the same DTT using insertIed
  2. Relays are in the same family and have identical names but perhaps slightly different data models (or serialised differently).
  3. OpenSCD uses isEqualNode to compare them and creates new nodes.

It can also occur like this:

  1. SCT export used in ICT tool
  2. ICT tool serialises IID/SCD file differently (e.g. tabs/spaces or length).
  3. isEqualNode identifies the types as being different.
  4. Each trip between the SCT and ICT results in new data type templates being created.

The problem to resolve fundamentally is doing a more semantic comparison (and probably rolling the incomplete compare functionality into its own library). However a reasonable interim solution would be to ensure this ID generation was stable up to a large ceiling for each IED (I would use 10,000 not 2000 next time!).

Also for information, see danyill/oscd-import-templates#3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions