|
Asset Connector Documentation
|
This project provides a FastAPI-based connector for interfacing with assets using AID (Asset Interface Description). It allows dynamic configuration and value retrieval for assets described by AID submodels.
/add-config endpoint/get-value endpoint/set-value endpointasset-connector): Use the /add-config endpoint to configure an asset. A Connector responsible for this asset will be initialized based on the details in the AID submodel. The AID JSON must be included in the POST body content like in the following definition:
Example:
Use the /get-value endpoint to retrieve values from the asset using a specific AID configuration. A Connector must be initialized with /add-config first before you can use it! The POST body content must contain the ModelReference to one of the properties (endpoints) defined in the AID.
Example:
Use the /set-value endpoint to set values at the asset using a specific AID configuration. A Connector must be initialized with /add-config first before you can use it! The POST body content must contain the ModelReference to one of the properties (endpoints) defined in the AID and the new data.
Example:
[!TIP] You can also discover the endpoints and request body schemata using Swagger by adding
/docsto the base url, e.g.,http://127.0.0.1:8000/docs.
[!TIP] The provided AID Submodels serve as the only means of configuration for the Asset Connector. You thus have to make sure that the asset endpoints are reachable from this microservice. If the service runs containerized, having a base address like
http://localhostin an AID will most probably fail since it points to the container itself.
main.py: FastAPI application entry pointcore/: Core logic for AID parsing and reference resolutionmodels/: Data models for payloads and responsesrequests/: Example JSON payloadsmqtt, opc_ua, http_connector: Protocol-specific implementations of the communication logicMIT