lawo / ember-plus-sharp Goto Github PK
View Code? Open in Web Editor NEWQuickly implement fully type-safe Ember+ consumers in any .NET language
Home Page: http://lawo.github.io/ember-plus-sharp
License: Boost Software License 1.0
Quickly implement fully type-safe Ember+ consumers in any .NET language
Home Page: http://lawo.github.io/ember-plus-sharp
License: Boost Software License 1.0
If ChildrenRetrievalPolicy is used as described in #39, the retrieval process sometimes just stops.
See #18
In order to get notified about a parameter value change, you must today subscribe to the PropertyChanged
event of that specific Parameter
instance.
This individual event subscription is fine and works perfect.
But in case you are interested in ANY parameter value change (e.g. because your are implementing a general viewer/consumer app), you must subscribe to ALL parameter PropertyChanged
events - which might be hundreds or thousand of events to subscribe to (depending on the provider you are connected to).
This seems in some cases quite uncomfortable and cumbersome.
Is there a possibility to provide a single/global PropertyChanged
event (e.g. at the Consumer class level) which is being raised, in case ANY parameter is changing. The PropertyChangedEventArgs
PropertyName
member in this case contain the full path of the related Parameter
being changed?!
Many Thanks in advance,
Bernd
Is this indentend?
Wouldn't an Int32 value be better suited?
E.g., assume you have an IParameter element of type Enum and what to 'print' both its numeric value as well as the Enum key name. You would have to first cast the parameter.Value to a long and then to an int to access the paramater.EnumMap dictionary...
parameter.EnumMap[(int)(long)parameter.Value].Key
To me this looks unnecessarily complicated - or is there a greater reason behind?
If a node becomes offline then all its children should be considered offline as well. If any element is set online again then all its parents should be considered online.
Moreover, any element that becomes online after being offline, should be subjected to the same details retrieval process as newly retrieved element.
Hi,
when I try to receive Parameter, I get this Error-Message:
"The number of named constants of the enum specified for the parameter with the path [...] does not match the number of entries sent by the provider."
Adding a dummy-entry at the end, does solve that problem.
GlowAnalyzer does not give a hint.
Using v1.2.1604.4003 against a Jünger T*AP Audioprocessor
I've gone through the console application tutorial and can parse the tree loaded into TinyEmber+. I'm struggling to get data changes once running - creating a handler for PropertyChanged of a Parameter is not getting called. I can get a data update by using the same method as described in the static approach to reacting to changes. However, my driver will need to receive all parameter changes for a dynamic environment. I am wondering if I am missing a trick to get my consumer updated? I am running the Ember+ Viewer and can see update messages received as I change data in TinyEmber+ - this is what I need in my application :-)
As far as I understood the ChildrenRetrievalPolicy
concept, you might first only use the DirectOnly mode and then request for each INode child again the DirectOnly to retrieve further children etc. inbetween you call _consumer.SendAsync() to get the additional nodes...
This doesn't seem to work... I am using the dynamic mode...
Here is my code:
_consumer = await Consumer<MyRoot>.CreateAsync(_client, 9000, ChildrenRetrievalPolicy.DirectOnly);
_root = _consumer.Root;
// _root at this point contains 1 x 'Sapphire' node - which is correct!
// 'Sapphire' node itself does not contain any children yet.
foreach (var child in _root.Children)
{
if (child is INode)
((INode)child).ChildrenRetrievalPolicy = ChildrenRetrievalPolicy.DirectOnly;
}
await _consumer.SendAsync();
// at this point _root now contains 2 x a 'Sapphire' node ?!
// both having 2 child nodes each...
// if the code is continued and repeated for the child nore; all nodes are duplicated and exist twice!!
Why is this?
Is this a bug? Or am I using the policy incorrectly?
Some providers seem to have issues with answering the requests sent by the Ember+ Sharp Library. The library typically sends messages containing many GetDirectory requests, but said providers only ever answer the first one. As a result, Consumer.CreateAsync
fails with a TimeoutException
.
With ember-plus already taken, ember-plus-sharp has been chosen as the repository name. To avoid any confusion, we should use the same name for the namespace.
Hi,
in the latest changes, it seems, that the Lawo.EmberPlusSharp.Model.EmberOption has been removed.
So far I used the Lawo.EmberPlusSharp.Model.EmberOption.IgnoreMatrices option.
Is this gone= Am I missing something? or what is the alternative?
Many Greets,
Bernd
Hi,
I am observing relatively high CPU usage - it appears to be approximately 2% per connection. Is this something that has been observed elsewhere?
I am using v1.2.1604.29003 of the DLL.
Regards,
Steve
Hi,
I have a customer using a DHD 52/SX.
When using the old legacy Ember+ Viewer 1.6.2 from Lawo (which used https://github.com/Lawo/ember-plus), he can see all nodes and parameters just fine!
Now we are trying to connect to the DHD with THIS library, but this always generates errors. The client actually can connect fine, but the retrieval of the consumer always fails at a certain point... see below.
So it seems, that there is a fundamental different behavior between THIS lib and https://github.com/Lawo/ember-plus.
This is especially annoying, as I now have build a whole set of products around THIS lib,
DHD and the customer now insist, that all is fine on their side, as they have proven via the legacy Ember+ Viewer 1.6.2 from Lawo, that all is fine!
So where is the effective issue within THIS lib?
Why can all nodes be retrieved fine with the Ember Viewer 1.6.2, but not with this lib?
We tried the standard approach to sync the database at once:
_consumer = await Consumer<MyRoot>.CreateAsync(_client, 20000);
This however resulted in a TimeoutException:
"The provider failed to send the children for the element with the path /Device/Channels/Channel 58"
I have attached a full Glow Payload Message Log, so hopefully you can spot anything:
DHD 52SX payload.txt
Then we tried the dynamic mode (using ChildrenRetrievalPolicy.DirectOnly):
So we retrieved the nodes 1 by 1 and traversed down the tree.
In this mode, we could get all nodes, up until the path: /Device/Channels/Channel 58
As soon as we tried to retrieve that node, again we got a TimeoutException!
From then on all was broken and we could not get any further nodes, e.g. /Device/Channels/Channel 59 or /Device/Channels/Channel 60 etc.
Any idea what is causing this issue?
Please note, that this issue is highly critical for me.
Thanks in advance,
Bernd
Ideally this should be demonstrated with the help of Tiny Ember+, which doesn't support functions yet (Lawo/ember-plus#37).
This would allow the use of Glow Analyzer Proxy for connections where such bytes can appear
This should probably be done with a binary option Raw (as now) vs. Ember+.
The attempt to set this property when it has a value other than ChildrenRetrievalPolicy.None should result in an InvalidOperationException rather than an ArgumentException.
The message of the exception thrown for data received from a Sapphire (as described in #40) is incorrect.
The bug can be reproduced by attempting to convert 20161021_141753_UTC.zip.
This results in a ModelException with the message "No enumeration, enumMap, value or type field is available for the parameter with the path..."
This is most likely due to the fact that the GUI is updated for every single message. This might be fixed by updating e.g. once every second.
Code from Lawo.EmberPlusSharp.Model Namespace Tutorial on Github, worked fine on Windows using .NET SDK 4.5. On Ubuntu as well as macOS in combination with the mono framework an EntryPointNotFoundException occurs. Complete error message in the attached file.
error.txt
I started going through the tutorial here http://lawo.github.io/ember-plus-sharp/html/427fadff-8d32-472e-83d1-3ceaf705ae51.htm and it appears to work when I connect to the TinyEmberPlus dummy but when I try to direct the same code to a real Sapphire mixer, I get the following exception:
System.TimeoutException was unhandled by user code
HResult=-2146233083
Message=The provider failed to send the children for the element with the path /Sapphire.
Source=Lawo.EmberPlusSharp
StackTrace:
vid Lawo.EmberPlusSharp.Model.Consumer`1.<RetrieveChildrenAsync>d__34.MoveNext() i C:\Storage\Development\Libraries\ember-plus-sharp-master\Lawo.EmberPlusSharp\Model\Consumer`1.cs:rad 279
--- Slut på stackspårningen från föregående plats där ett undantag utlöstes ---
vid System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
vid System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
vid System.Runtime.CompilerServices.TaskAwaiter.GetResult()
vid Lawo.EmberPlusSharp.Model.Consumer`1.<CreateAsync>d__4.MoveNext() i C:\Storage\Development\Libraries\ember-plus-sharp-master\Lawo.EmberPlusSharp\Model\Consumer`1.cs:rad 118
--- Slut på stackspårningen från föregående plats där ett undantag utlöstes ---
vid System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
vid System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
vid System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
vid Lawo_EmberPlusSharp_Test.Model.DataService.<connect>d__5.MoveNext() i C:\SVN\metodutv\Lawo-EmberPlusSharp-Test\src\Lawo-EmberPlusSharp-Test\Model\DataService.cs:rad 43
InnerException:
The Sapphire is configured to be an Ember+ provider, connecting with the EmberPlusView tool works fine.
What could I be doing wrong?
My fault - all is working fine with PropertyChanged events!
It obviously should not do that by itself, at least not by default.
Currently, GlowAnalyzerProxy first accepts the connection from the consumer before it attempts to connect to the provider. This behavior is incorrect for the case when the provider does not answer the connection request.
Hello,
is there a chance to automatically build a "Static Database Types" - Declaration with a kind of "Class-Builder" in the Ember-SDK? It would be nice in case of large trees to write manually instead :-)
Task.Delay is used in a few places where the passed timeout could potentially be infinite. Wherever this is the case, the task should be cancelled properly to avoid orphaned tasks.
This is to allow functions in a collection node.
I would like to use this library from within a Windows Service and those don't have a SynchronizationContext.
Do you have any recommendations for how I can proceed? I started to read about making a custom SynchronizationContext in this article series but I feel a little bit out of my depth there.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.