Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the implementation of DataSpecificationIEC61360 and its De-/Serialization #141

Merged

Commits on Oct 12, 2023

  1. generate unique id_shorts for SubmodelElementList-children

    Constraint AASd-120 requires direct children of a `SubmodelElementList`
    to have id_short=None. On the contrary, `SubmodelElementList` must be a
    Namespace, since children of Lists must still be referable via
    References, and also must be allowed to reference their parent, which
    is expected to be a Namespace.
    Since id_short=None must hold for all direct children, they lack
    a unique identifying attribute, that can be used to refer to an
    item. However, this is required for a Namespace.
    
    Thus, we had two options for implementing this:
    - Refactor a lot of the model.base module such that `SubmodelElementLists`
      are considered Namespaces
    - Generate a unique id_short for every direct children of a
      `SubmodelElementList` whenever it is added.
    
    Since the first alternative would require a distinction for
    `SubmodelElementList` in all places where a `Namespace` is used, we
    decided on the second alternative.
    
    This commit implements the generation of unique id_shorts via the
    `item_id_set_hook`, that was recently added to `NamespaceSet` and
    `OrderedNamespaceSet`. It is called for every added SubmodelElement.
    Furthermore, the `item_id_del_hook` is called for every removed
    SubmodelElement and used to remove the generated id_short again.
    
    This aside, the examples and unit tests are also adjusted such that the
    id_short is removed for all direct children of `SubmodelElementList`.
    Furthermore, a test for `AASd-120` is added.
    The AASDataChecker is adjusted to skip the comparison of id_short for
    direct children of `SubmodelElementList`, since these are generated and
    thus never the same now.
    For the same reason, the XML/JSON serialisation is adjusted to skip
    serialising the id_short if direct children of a `SubmodelElementList`.
    jkhsjdhjs committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    927f125 View commit details
    Browse the repository at this point in the history
  2. examples.data._helper: disable comparison of unordered `SubmodelEleme…

    …ntList`
    
    Since direct children of `SubmodelElementList` don't have an identifying
    attribute anymore (AASd-120), they cannot be compared because it is
    impossible to know which SubmodelElement should be compared against
    which other element. Maybe this can be implemented again in the future,
    when hashing is implemented for all SubmodelElements, but for now we
    raise a `NotImplementedError`.
    
    A test-case for this behavior is added and `order_relevant` is set to
    `true` in all example files.
    jkhsjdhjs committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    cc11346 View commit details
    Browse the repository at this point in the history
  3. test: update compliance tool test-files

    This commit applies the following changes to all test-files:
    - The id_short of direct children of a `SubmodelElementList` is removed
    - `SubmodelElementList.order_relevant` is set to true for all
      `SubmodelElementList`s
    jkhsjdhjs committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    a0a2416 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2023

  1. Configuration menu
    Copy the full SHA
    3d2a04b View commit details
    Browse the repository at this point in the history
  2. Set typehint of EmbeddedDataSpecification.data_specification

     Set to Reference instead of ExternalReference according to specs
    zrgt committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    9b37316 View commit details
    Browse the repository at this point in the history
  3. Set id_short of Identifiables to optional

    This commit extends eclipse-basyx@bffb075.
    zrgt committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    1545e47 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    27a9a68 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9d661df View commit details
    Browse the repository at this point in the history
  6. Merge remote-tracking branch 'acplt/feature/SubmodelElementList_gener…

    …ated_id_shorts_aasd_120' into fix/id_short
    zrgt committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    250517d View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2023

  1. Update compliance tool test files

    As default value of Submodel.id_short, ConceptDescription.id_short, AAS.id_short is set to None, test files had to be updated.
    zrgt committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    c44bbc9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2d06a82 View commit details
    Browse the repository at this point in the history
  3. Update compliance tool test files

    As default value of Submodel.id_short, ConceptDescription.id_short, AAS.id_short is set to None, test files had to be updated.
    zrgt committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    e69fc6f View commit details
    Browse the repository at this point in the history
  4. Update IEC61360_DATA_TYPES

    zrgt committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    7b71f3c View commit details
    Browse the repository at this point in the history
  5. Fix the implementation of DataSpecificationIEC61360

    - Update IEC61360_DATA_TYPES from the Spec
    - Add checking of value_type string: 1<len(value_type)<2000
    - Some Refactoring
    - Fix typehint of DataSpecification according to the spec
    - Simplify Value and ValueReferencePair, as value is just a string acc. to spec
    - Fix value_format, as it not one of xsd types, but also a string (e.g. "X..17" or "M" or "NR2..3.3"), which describes how the value should look like. Look in IEC61360-1 for further info
    zrgt committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    8d9eb8e View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2023

  1. Fix pycodestyle issue

    zrgt committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    af7422f View commit details
    Browse the repository at this point in the history
  2. Fix ValueReferencePairTest

    zrgt committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    49603cd View commit details
    Browse the repository at this point in the history