Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • PyI40AAS PyI40AAS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 48
    • Issues 48
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Lehrstuhl für Informations- und AutomatisierungssystemeLehrstuhl für Informations- und Automatisierungssysteme
  • PyI40AASPyI40AAS
  • Issues
  • #101
Closed
Open
Issue created Oct 21, 2020 by Michael Thies@mhthiesContributor

model: Add string serialization/deserialization of Reference objects according to DotAAS sec. 5.2.1

In Details of the Asset Administration Shell, section 5.2.1 (p. 95), a cannonical string representation of Reference objects is presented:

In some mapping or serializations the Type “Reference” is converted into a single string. In this case we recommend to use the following serilization:

<Reference> ::= <Key>{,<Key>}*
<Key> ::= (<KeyType>)(<Local>)[<KeyIdType>]<KeyValue>
<KeyType> ::= value of AAS:Key/type
<Local> ::= local | no-local
<KeyIdType> ::= value of AAS:Key/.idType
<KeyValue> ::= value of AAS:Key/value

With <Local> == local if AAS:Key/local = True and no-local if AAS:Key/local == False.

Examples:

  • (ConceptDescription)(local)[IRDI]0173-1#02-BAA120#008
  • (GlobalReference)(no-local)[IRDI]0173-1#01-AFZ615#016
  • (Submodel)(local)[IRI]http://customer.com/demo/aas/1/1/1234859590,(Property)(local)[IdShort]Temperature

(Plattform Industrie 4.0: "Details of the Asset Administration Shell – Part 1 - The exchange of information between partners in the value chain of Industrie 4.0 (Version 2.0.1)", CC BY-ND 4.0)

We could perfectly implement this representation as the __str__ method of the Reference class and add a parser/constructor method like this:

@classmethod
def from_string(cls, value: str) -> "Reference":
    # probably something with regex parsing here
Edited Oct 21, 2020 by Michael Thies
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking