OOI Reactive Application.
DataLoggeris a sample implementation of the
Consumerpart of the
ReferenceApplication, which is an example application of
Semantic-Datareactive networking based on OPC UA Part 14 Pub/Sub specification.
Consumerrole in the application:
DataManagementSetup: this class has been overridden by the
LoggerManagementSetupclass and it initializes the communication and binds data fields recovered form messages to local resources.
IMessageHandlerFactory: has been implemented in external common libraries and
Consumerdoesn't depend on this implementation - current implementation of the interfaces is localized as services using an instance of the
IBindingFactory: has been implemented in the class
DataConsumerthat is responsible to synchronize the values of the local data repository properties and messages received over the wire.
IConfigurationFactory: the class
ConsumerConfigurationFactoryimplements this interface to be used for the configuration file opening.
LoggerManagementSetupconstructor initializes all properties, which are injection points of all parts composing this role.
ServiceLocatoris implemented to resolve references to any external services.
DataManagementSetup.Start()method is called to initialize the infrastructure, enable all associations and start pumping the data.
Consumerfunctionality. An instance of the
IBindingFactoryis responsible to create objects implementing
IBindingthat can be used by the
Consumerto save the data received over the wire in the local data repository.
DataConsumeris a sample implementation of a data logger functionality recording data over time. It consumes the testing data sent and updates properties in the class
ConsumerViewModelimplementing ViewModel layer in the Model View ViewModel (on MSDN) (MVVM pattern). The class
DataConsumerdemonstrates how to create bindings interconnecting the data received over the wire and the properties that are the ultimate destination of the data. The user interface provided by the View layer implemented in the
UAOOI.Networking.ReferenceApplication.MainWindowclass is dynamically bounded at run time with the
ConsumerViewModel. To implement the ViewModel layer in the `MVVM pattern the helper generic class
UAOOI.Configuration.Networking. In a typical scenario, this implementation should not be considered for further modification. The only open question is how to provide the name of the file containing the configuration of this role. In proposed solution the name is provided by a service defined by the application entry point part and localized using
IServiceLocatorin the class
LoggerManagementSetup- see code snipped below:
ConfigurationDataConsumer.xmlattached to the project. This file contains a mirror configuration of the
Producerrole configuration to log all the generated data.