I have to create a simple app, that will suit as an example of using WPF and WCF for creating HMI screens.
I'm not sure what WCF is supposed to do in such application, I guess there must be an OPC server that my application connects to. Does app connect to OPC server using WCF service and does the WCF service reside inside the application or outside?
Is WCF service meant to be used only as a connection to OPC server? I'm not yet quite sure which process to simulate, I need something simple.
Please, any ideas are welcomed.
Thank you
It sounds like what you will have is a WPF application that will act as the HMI, containing all the UI elements. The WPF application will create a client proxy for a WCF service using the address (the host address that the service is running on), binding (probably tcp or http) and contract (an interface) of the service.
The WCF service will be hosted somewhere (the host address) and expose an endpoint that specifies a binding and a contract. This is what your WPF app's client proxy will communicate with. The methods implemented in the service's contract will instantiate OPC classes and write or read OPC Items as needed.
In its simplest form, you would probably have one solution with two projects: one for the WPF application (with the client proxy) and one for the WCF service (with OPC implementations).