Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 16 10:22
    mpostol milestoned #665
  • May 16 10:22
    mpostol labeled #665
  • May 16 10:22
    mpostol assigned #665
  • May 16 10:22
    mpostol opened #665
  • May 05 19:21
    mpostol labeled #648
  • May 05 19:20
    mpostol assigned #648
  • May 05 19:20
    mpostol edited #648
  • May 03 20:49

    mpostol on master

    Regenerate models using UA-Mode… Regenerate models using UA-Mode… Merge pull request #664 from mp… (compare)

  • May 03 20:49
    mpostol closed #664
  • May 03 20:49
    mpostol closed #663
  • May 03 20:49
    mpostol reopened #664
  • May 03 20:49
    mpostol closed #664
  • May 03 20:49
    mpostol milestoned #664
  • May 03 20:49
    mpostol assigned #664
  • May 03 20:48
    mpostol opened #664
  • May 03 20:47
    mpostol edited #663
  • May 03 20:47

    mpostol on 6.5.5.39885

    Regenerate models using UA-Mode… (compare)

  • May 03 20:39
    mpostol edited #663
  • May 03 20:33

    mpostol on 6.5.5.39885

    Regenerate models using UA-Mode… (compare)

  • May 03 20:24
    mpostol milestoned #663
Piotr Szymczak
@Drutol
Hello!
@mpostol I've managed to get the library running on Android using existing simulator in ReferenceApplication. It was a bit of a wild ride browsing through reference code but in the end it turned out to be quite easy to integrate. It's now running on UDP on Broadcast.
Mariusz
@mpostol
Hi @Drutol - great. I am working on the documentation to make it easier. Thanks.
Mariusz
@mpostol
Hi Piotr @Drutol - let me inform you that I have finished working on the documentation for now. The relevant for HMI implementation documentation is at https://commsvr.gitbook.io/ooi/deployment/walk-through-referenceapplication and subsections. Add issue or PR if there is something missing or not clear. Good luck and inform us about all you successes.
Mariusz
@mpostol
Hi Klaus @biancode I am still not ready to create video introduction, but the let me inform you that the project documentation has bee improved and are available as the ebook at https://commsvr.gitbook.io/ooi/. Hope it helps for now. Current priority of the work is defined on the Milestones page: https://github.com/mpostol/OPC-UA-OOI/milestones. Let me know how it works for you. Any suggestions are welcome :).
Klaus Landsdorf
@biancode
@mpostol thank you! I'll read it and let you know.
Piotr Szymczak
@Drutol
Got simple wrapper running filtering by given variable with basic list view on Android . Now I need to figure out how to distinguish publishers of this data... Is each publisher meant to have separate PublisherId? Or is it rather "type" of publisher?
Gitter doesn't play well with images apparently
Mariusz
@mpostol

Not sure if I have got the question. Filtering is implemented in the library, so you should not care about it. Filtering and data content is setup in the configuration.

You should use the couple (RepositoryGroup, ProcessValueName) to find where the value must be written. If your HMI interface need additional configuration the provided configuration should be expanded. For example:

RepositoryGroup = Boiler.1
ProcessValueName = PipeIn_Presure

You can use the simulator to display generated values on selected picture or place on the screen - don't touch the MessageHandlers configuration to make sure you are getting everything form the producer.

Mariusz
@mpostol
Let me inform you that have accomplished the milestone Architecture improvements and it is available on the main track master. It needs harmonization of any derived libraries as the result of some minor architecture changes. The work on Rel 4 is underway so I cannot guarantee that the API will not change in future, but once more it is to be more stable for now.
Mariusz
@mpostol
Hi Piotr @Drutol; let me recall you that all the tasks relevant to the development of the HMI I am assigning to the project Networking.HMI. Review if the list is what you are expecting to keep going. The priorities of the work are defined on the milestone page. Let me know or add what is missing.
Piotr Szymczak
@Drutol
A bit of an update from me. I managed to neatly wrap around library to expose gathered data to UI. I've adjusted current producer simulator to suit my needs (2 boilers which are indetified via repositoryGroup, and while it works locally (on single machine) I ran into issues with receiving this data on mobile device in local network I'll try to debug it now. I tried enabling events on EventSource of UDP message handler but I didn't receive any... I wonder whether it has to do with Mono's implementation of these.
Mariusz
@mpostol

Thanks for update. The critical point for logging the network traffic is application configuration, there is the switch:

      <add name="System.Net.Sockets" value="Information" />
      <!-- value:  Required String attribute. Sets the verbosity of the output. 
                  Legitimate values are Critical, Error, Verbose, Warning, and Information.
      -->
      <!-- maxdatasize:  Optional Int32 attribute. Sets the maximum number of bytes of network data included in each line trace. 
                         The default value is 1024.
      -->
      <!-- tracemode Optional String attribute. Set to includehex to show protocol traces in hexadecimal and text format. 
      Set to protocolonly to show only text. The default value is includehex.
      -->
    </switches>

change Information to All

The network traffic is logged by the Microsoft stuff, so the behavior may depend on the platform.
@Drutol I am working on the simulator behavior. The simulator is implemented using generated code by the ModelCompiler translating OPC UA Information Model to Address Space. In our case we don't have Address Space so the code is not well suited but we don't have any better replacement. hopefully I will finisher this part today.
Mariusz
@mpostol
@Drutol one more detail: the network traffic is longed in file ReferenceApplicationBootstrapper.log . You should have two log files. It is something we need to think about it to make the logging system consistent and open.
Piotr Szymczak
@Drutol
Sorry for late reply. Hmm I'm afraid that this switch does not apply to non .Net Framework applications. I've got wireshark running and I see packets properly propagating.
I've tested obtaining events from UDPMessageHandlerSemanticEventSource and while in WPF application it works, on mono it doesn't. I'm also not sure how I'm suppposed to obtain its instance since Log property is internal. For now I've been using reflection to test (but it wasn't very helpful).
I'll try importing UDP handler project manually and thoroughly see what's going on.
Piotr Szymczak
@Drutol
Okay, after importing the UDP message handler directly to code I noticed some exceptions being thrown from UABinaryDecoder. I've had a bug in my implementation of IEncodingFactory :(
All is okay now.
Piotr Szymczak
@Drutol
I'm trying to change producer configuration but to no avail. Is just changing .xml config files sufficient? I'm now adding one more DataSetConfiguration with only AssociationName and RepositoryGroup changed. Additionaly I'm adding ProducerAssociationConfiguration entry with updated AssociationName to match the ones defined in DataSetConfiguration
Mariusz
@mpostol
@Drutol it is possible that some .NET stuff doesn't work in your environment. Document all cases because it will be important for your further work. If there is something we know without doubts that should cause modification of the base-code you MUST report new issue.
@Drutol it is good that the UDP works for now. As I remember main project (.exe) references this assembly to make sure it is copied to the destination folder. IEncodingFactory is implemented by the code-base as .NET Standards so you can use it instead of implementing it. I don't see any reasons to rework this lib , or maybe I am not following you.
Mariusz
@mpostol
@Drutol consumer and producer configuration must be symmetrical, namely should have the same DataSetConfiguration set and the same associations. It doesn't mean they are identical, but semantically equivalent . Changing only the producer configuration you can observe different network traffic and packages payload using Wireshark. Let's think about a piece of software converting the producer configuration to consumer configuration - for example as a unit test. Yes .xml file consist all details for selected producer or consumer. In a few days I should have the configuration generator for the simulator I am working on. Maybe it helps. Lets think about conf call or F2F meeting - details we exchange by separate conversation by email.
Piotr Szymczak
@Drutol
I'll read more about of EventSources in cross-platform scenarios and then create an issue, I may be missing something.
The problem with library's implementation of IEncodingFactory is that it forces repositoryGroup which is undesirable, I just made my own without this check.
The problem with missing packets is that even though I'm changing producer configuration I only see data produced for 1st data set, I'll wait for this configuration generator while working on other stuff.
Mariusz
@mpostol
@Drutol You are right, the repositoryGroup in IEncodingFactory is required in case you need to provide a data converted.
```C#
/// <summary>
/// Sets the converter, which is used to provide a way to apply custom logic to a binding.
/// </summary>
/// <value>The converter as an instance of the <see cref="IValueConverter"/>.</value>
IValueConverter Converter { set; }
~~
The check is redundant and may be simply removed - I will add issue addressing this

The

    /// <summary>
    /// Updates the value converter.
    /// </summary>
    /// <param name="binding">An object responsible to transfer the value between the message and ultimate destination in the repository.</param>
    /// <param name="repositoryGroup">The repository group.</param>
    /// <param name="sourceEncoding">The source encoding.</param>
    /// <exception cref="ArgumentOutOfRangeException">
    /// repositoryGroup
    /// or
    /// binding
    /// </exception>
    void IEncodingFactory.UpdateValueConverter(IBinding binding, string repositoryGroup, UATypeInfo sourceEncoding)

is the pace where you can assign to the Converter property used by the library to handle additional type conversion if needed.

@Drutol Details you can find in the IBinding definition.
Mariusz
@mpostol
@Drutol Configuration: the best practice -I recommend - is testing new configuration in the WPF environment using base-code. If there are any doubts about if something is correct or not you can PR additional UT. Let me recall one of the primary rules: UT should be also be used to understand the code - intention of the author.
Mariusz
@mpostol
@Drutol I have added the issue that should solve the problem with custom implementation of the IEncodingFactory
EncodingFactoryBinarySimple has useless test of the repositoryGroup parameter. #304
This fix should be committed today and will be available on 400.
The Simulator development is really time consuming job, so the milestone is now overdue. There are two tricky point: making the simulator work and configuration generation. Hopefully I will PR to master a prototype at the beginning of the next week. So keep going focusing on your stuff.
Mariusz
@mpostol

@Drutol I am glad to say that the work on the factory (boilers set) simulator (alfa) is close to release. :simple_smile:

The starting point for boiler description is on the commsvr.com page:

boiler

Investigate also the document: section Custom model boiler

I will use this documents to prepare the simulator description, so you may read them in advance.

You may find also helpful downloading the
OPC UA Address Space Model Designer

It has the model attached as the embedded example.
The simulator documentation is planned as the #306 in the current milestone.

Piotr Szymczak
@Drutol
Roger. Thanks for update! As for me I've implemented obtaining GPS coordinates and I'm waiting for simulator now :)
Mariusz
@mpostol

@Drutol My concern is how to provide the observed device coordinates. We must consider two scenarios:

  1. Localization is fixed, e.g. boiler - the coordinates may be provided in the HMI configuration file.
  2. It is a moving device, e.g. train - the current coordinates must be transmitted over the wire.

In 2 the coordinates must be modeled and encoded - importance level is as the timestamp. I must ask my OPC UA fellows if we have any standard representation of the GPS coordinates.
Are you aware of that? The first approach is 1. but we should be ready to accommodate 2.

Piotr Szymczak
@Drutol
Hmm, I don't see an issue with different nature of coordinates sources on my side. And yeah, I'm implementing it having the "ball" example in my mind.
Mariusz
@mpostol
@Drutol hope you are right. Anyway the simulator exposing set of 4 boilers is on the master track. To switch on the simulator the RefereneApplication configuration must be modified. Diff it with App.BilersSet.xml. The simulator is loosely coupled with the ReferenceApplication. Hard references have been added to copy all assemblies during the build.
Your next step is to prepare the configuration for the Consumer - it must be mirror of the producer configuration. Test it with the DataLogger before integration with your stuff. It should log all data cumming from the simulator.
My next task is to prepare a documentation, but because I have a few other challenging project ahead I must slow down. Keep me informed about the progress.
Let me know how it works for you.
Piotr Szymczak
@Drutol
Okay, thanks! I'll try to get something done today.
Piotr Szymczak
@Drutol
image.png
Okay after some digging I got it running. Are the values supposed to change? Or are they constantly "0" right now?
Mariusz
@mpostol

@Drutol Good news. I haven't really tested the behavior of the boiler simulator . I have stolen it form the OPC Foundation stuff as is, but now my concern is where set points are provided. Anyway, the simulator is implemented in tempuri.org.UA.Examples.BoilerType.BoilerState:

    /// <summary>
    /// Updates the values for the simulation. 
    /// </summary>
    private void DoSimulation(object state)
    {
           //....
    }

Note it is partial and located in at : Networking\Simulator.Boiler\Model\BoilerState.cs

It seems that it was not implemented with real physic rules in mind, but it shout generate random data.

  1. First priority task is to prove that the communication doesn't generate any warnings in the log files (consumer and producer). Note, there are two log files -it is not perfect solution but ...it is.
  2. Next is to provide data from selected boiled on scree in real-time
  3. Improve simulator to behave as expected - our goal is not to simulate real boiler, but not all 0.0.
  4. Build a sophisticated mechanism to select one of the boilers in set using for visualization for example using observer (smartphone) geographical location.

If the configuration works fine, add the file to the DataLogger and PR back to me. Use similar name as for the producer.
Goo luck and inform me about success.

Piotr Szymczak
@Drutol
Screenshot_2018-07-29-14-01-46-781_CrossHMI.Android.CrossHMI.Android.png
I've successfully convinced the simulator to start doing actual "simulation" and the data reaches my application just fine.
  1. As for warnings in log files... I don't see any.
Piotr Szymczak
@Drutol
Now I have to include position in this simulation, would you rather like to see it in repository name or as a data member or is it up to me? Any updates from OPCUA on coordinates representation?
Piotr Szymczak
@Drutol
I've opened PR with fixed simulation.
Mariusz
@mpostol
@Drutol great job. I have merged it and updated the 400 branch (I am working on 400 to make master more stable). I have noticed the problem with starting simulation.
Mariusz
@mpostol

Now how to deal with the geographical localization? As I sad we must consider two scenarios:

  1. It is static, so it is not provided by the data transferred over the wire - it is HMI feature, so you must deal with it. Using the repository name is not the perfect solution (but possible), because it makes consumer/producer configuration synchronization very difficult. The OOI stuff is prepared for a situation like this by expanding the configuration file. An example you have in UANetworkingConfigurationUnitTest. I believe your work will be proof of concept in this respect. In your part of the configuration, you may add an array containing <key, value> pairs, where the key is repository name and value is geographical localization.

  2. It is dynamic (running train, rolling ball) the geo position must be provided as a variable with the part of relationship with the object model. But now it is not the case. So let's fix the static solution, and after that, if we have time we will think about the UA model containing localization. BTW, I have forgotten to ask :-1: , sorry about that. Fortunately, having proof of concept for a static case we may inform about the success while asking about this particular detail :smile: .

Mariusz
@mpostol
@Drutol switch on the issues in you fork to make me possible to add comments not related to public discussion. Your repository is private, so any comments related to your code must be added there. Additionally it seems that you should prepare and publish GitHub Pages. They are visible even for private repositories, so I will be able to add ref to you stuff if you don't mind.
Piotr Szymczak
@Drutol
I've turned on the issues. I guess I'll now check out this configuration expansion you mentioned.
As for GitHub Pages... hmm I don't really feel like there's much to present there. Any specifics in mind? I've prepared the static website generator though so I'm pretty much ready to go.
Piotr Szymczak
@Drutol
As for code itself... well... it's changing quite dynamically as of now so It's not properly tested nor commented yet.
Piotr Szymczak
@Drutol
I've been trying to find this extension you have been talking about but to no avail. I see some wrappers but I don't see how they are expanding anything, I've found ExtensionDataObject but I don't believe that this is what I'm looking for either. Also even if I do expand the configuration file I won't be given any data from the library when creating bindings for example so I would have to intercept the configuration somewhere anyway. Isn't it more feasible to create some other configuration file or just derive from existing ConfiguarationData class and forward extra data to some other component?