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

Expose OpcDa server for extensibility purposes #24

Merged
merged 2 commits into from
Jul 20, 2016
Merged

Expose OpcDa server for extensibility purposes #24

merged 2 commits into from
Jul 20, 2016

Conversation

ewancoder
Copy link
Contributor

OpcDa server should be exposed as a protected property at least, so that
the end-user of the library could inherit and extend DaClient class for
one's needs.

For example, I need to get timestamp along with each value I read. But I
cannot do so without rewriting Read() method or adding whole new method in
DaClient as well as in IClient interface.

With this solution, one can easily inherit from DaNode class and implement
any kind of behaviour based on OPC Foundation OpcDa library's
functionality.

OpcDa server should be exposed as a protected property at least, so that
the end-user of the library could inherit and extend DaClient class for
one's needs.

For example, I need to get timestamp along with each value I read. But I
cannot do so without rewriting Read() method or adding whole new method in
DaClient as well as in IClient<Node> interface.

With this solution, one can easily inherit from DaNode class and implement
any kind of behaviour based on OPC Foundation OpcDa library's
functionality.
@jmbeach
Copy link
Contributor

jmbeach commented Jul 20, 2016

Please don't use c# 6.0 unless you truly need it. I would like this library to be as backwards compatible as possible

@ewancoder
Copy link
Contributor Author

No problem. I have dropped C# 6.0 syntax. Also, maybe it's a good idea to make this property public, because I know for certain that currently some people use this library as a simple OPC foundation library wrapper, utilizing OpcDa server using Reflection. But this would also require an interface change, and then we'll be leaking OpcDa details to the consumer, the library will become "leaky wrapper", so I decided it's best to make it protected (for now) so that at least anyone could inherit and extend it.

@jmbeach jmbeach merged commit cab7775 into hylasoft-usa:master Jul 20, 2016
@jmbeach
Copy link
Contributor

jmbeach commented Jul 20, 2016

I'm down with extensibility

@ewancoder ewancoder deleted the feature/expose-opcda-server branch July 20, 2016 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants