OPC UA Connector#
OPCUAConnector Class
Provides orchestration for deploying OPC UA-based devices into the OpenFactory environment. This includes:
Registering the device with OpenFactory.
Deploying an OPC UA producer to publish device data into the Kafka cluster.
Tearing down all associated components when the device is removed.
See also
The schema of the OPCUAConnector is openfactory.schemas.connectors.opcua.OPCUAConnectorSchema.
- class openfactory.connectors.opcua.opcua_connector.OPCUAConnector(deployment_strategy, ksqlClient, bootstrap_servers=None)[source]#
Bases:
ConnectorConnector for OPC UA devices that manages deployment of OPC UA producers.
Responsibilities include:
Registering the device as an OpenFactory asset.
Deploying an OPC UA producer to stream device data to Kafka.
Managing references between the device and its producer in OpenFactory.
Tearing down the producer when the device is removed.
See also
The schema of the OPCUAConnector is
openfactory.schemas.connectors.opcua.OPCUAConnectorSchema.- __init__(deployment_strategy, ksqlClient, bootstrap_servers=None)[source]#
Initializes the OPCUAConnector.
- Parameters:
deployment_strategy (OpenFactoryServiceDeploymentStrategy) – The deployment strategy to use.
ksqlClient (KSQLDBClient) – The client for interacting with ksqlDB.
bootstrap_servers (str) – The Kafka bootstrap server address. Defaults to config.KAFKA_BROKER.
- deploy_opcua_producer(device)[source]#
Deploy an OPC UA producer.
- Return type:
- Parameters:
device (Device) – The device for which the producer is to be deployed.
- Raises:
OFAException – If the producer cannot be deployed.