Closed yboujraf closed 4 years ago
Dear @dufourgilles
If you see the last picture attached in this issue, you can see we have an array of elements. But when tried to getDirectory to one of the elements we have an error.
I created a small device with two elements (tree.root.elements[0] & tree.root.elements[1]) with few nodes and it works the getDirectory. But if it is a router device like the screenshot we have immediately timeout. With emberPlusViewer, no issue
I can share a connection of the device if you want to test it. The device is offair
Best Regards Youssef
Looks like the connection was closed. If you can open a hole in your firewall for me to reach that device, I can debug it to see what is going on. Please share the info privately dufour.gilles@gmail.com
Dear @dufourgilles
I sent you an email with all the information
Best Regards, Youssef
I connected to your setup and could debug the issue. A fix is now available in 1.10.3
Dear
Great job.
Will check it out and let you know.
Best regards Youssef
On Sat, 14 Dec 2019, 12:10 Gilles Dufour, notifications@github.com wrote:
I connected to your setup and could debug the issue. A fix is now available in 1.10.3
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dufourgilles/node-emberplus/issues/4?email_source=notifications&email_token=ABO5YWWKPVSOOUX4IA5AUETQYS5KNA5CNFSM4J2CJZ6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG4AGGQ#issuecomment-565707546, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABO5YWVJR3IZ4X2FCQ2DQXDQYS5KNANCNFSM4J2CJZ6A .
Dear @dufourgilles
One line of code for fixing this ;-)
Example expand of Elements[0] of the equipment shared to you.
Now when I expand any elements[] I can see in the Tree structure a new TAG "path" then "number" It looks like correct for me.
=> Do we need to construct the tree as well ?
test-discover_path_1_tinyember.zip
I can find only the TAG "PATH" everywhere even on children with full path.
Is it because the device send you like this or there is any properties not setted correctly in the TinyemberRouter or how to manage the TAG?
My position is First topic, PATH TAG for Elements[] and number TAG for each children then your tree structure could be reuse for emulate any device without changing anything in the data model.
Is it right?
Best Regards, Youssef
the path and number are just internal representation. You can always get the value for any node using getNumber or getPath.
Example:
console.log(client.root.elements[0].children[0].getNumber(), client.root.elements[0].children[0].getPath());
With this node :
QualifiedNode { path: '1.0', contents: NodeContents { isOnline: true, identifier: 'identity' }, children: [ QualifiedParameter { path: '1.0.1', contents: [ParameterContents] }, QualifiedParameter { path: '1.0.2', contents: [ParameterContents] }, QualifiedParameter { path: '1.0.3', contents: [ParameterContents] } ] }
We get
0 '1.0'
Dear @dufourgilles
When making an expand we get path instead of “number” or both
That’s why I am confused.
If I generate a new device model, could I use “number” or “path” to identify a node, a parameter, matrix, functions,….
Or it is mandatory to use “number” as recommended by the specification.
Then when I expand I need to have "number" instead of "path"
Two expand from two different devices.
test-discover_path_1_tinyember.zip
Best Regards, Youssef
QualifiedNode uses path Node uses number.
But as I said, you can use getNumber() on a QualifiedNode or getPath() on a Node and that will work.
If you build your own tree, you can use whatever format you like. But if you wants to use the jsontotree function, you need to use number.
G.
On 16 Dec 2019, at 11:06, yboujraf notifications@github.com wrote:
Dear @dufourgilles https://github.com/dufourgilles When making an expand we get path instead of “number” or both
That’s why I am confused.
If I generate a new device model, could I use “number” or “path” to identify a node, a parameter, matrix, functions,….
Or it is mandatory to use “number” as recommended by the specification.
Then when I expand I need to have "number" instead of "path"
Two expand from two different devices.
test-discover_path_0.zip https://github.com/dufourgilles/node-emberplus/files/3967373/test-discover_path_0.zip test-discover_path_1_tinyember.zip https://github.com/dufourgilles/node-emberplus/files/3967374/test-discover_path_1_tinyember.zip Best Regards, Youssef
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dufourgilles/node-emberplus/issues/4?email_source=notifications&email_token=AD3DH262ITS22RCCCB2QARLQY5HJPA5CNFSM4J2CJZ6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG6FTEQ#issuecomment-565991826, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3DH25GL67HPDBUVQXP5S3QY5HJPANCNFSM4J2CJZ6A.
Dear @dufourgilles
So I will use the data model from Lawo router.
Path for the main node = Elements[] number for the rest
Could you confirm ? then I will generate a new device model and try it as server.
Best Regards, Youssef
Dear @dufourgilles
I am trying to just expand the root of a router and I got a multi nodes and this is the main tree
await tree.getDirectory(); await tree.expand(tree.root.elements[0]);
Each node has sub directory, qualified Matrix, Qualified function, .... and taking times to parse.
Topic - Timeout
`desk01@BY_DESKTOP_01 MINGW64 /c/Git/_EMBERPLUS/node-emberplus-master $ node ./usecases/GetDirectory/main-discoverclient.js
I tried to extend to million the timeout but still the same then my conclusion is to parse each node and getDirectory of each node ? is it right ?
Best regards, Youssef