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

Improvement: OPC server statefulness in OpcDaClient #43

Open
jamesbraza opened this issue Jan 12, 2023 · 1 comment
Open

Improvement: OPC server statefulness in OpcDaClient #43

jamesbraza opened this issue Jan 12, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jamesbraza
Copy link
Contributor

In openopc2.da_client.OpcDaClient, there is some awkward statefulness:

open_opc_config = OpenOpcConfig()
open_opc_config.OPC_SERVER = opc_server  # Pretend no env vars for now
opc_client = OpcDaClient(open_opc_config=open_opc_config)
opc_client.connect(opc_server=opc_server)

The statefulness comes from:

  • Having to embed opc_server into OpenOpcConfig, only for OpcDaClient never to use self.opc_server
  • Having to pass opc_server again to opc_client.connect

Just pointing out this is awkward, and to me indicates room for a better design.

@renzop renzop added the enhancement New feature or request label Feb 7, 2023
@renzop renzop self-assigned this Feb 7, 2023
@renzop
Copy link
Collaborator

renzop commented Feb 7, 2023

True.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants