Welcome, Guest

A few questions..
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: A few questions..
#17
A few questions.. 2 Years, 3 Months ago  
gibbocool wrote:
1. I am wondering if anyone knows of how I might find discover all nodes and their components in the subsystem, or at least just the components connected to a node. I saw a function in nodeManagerInterface.c called nodeManagerGetComponentAddressList and was wondering what it does?

2. I would like to know if there is a function that gets the Identification of the component at a given JausAddress. I know this is easy to implement myself by sending a QueryIdentification message, but if there is no such function I would have thought it might be useful to add it to OpenJaus.

3. And finally, I want to know what Jaus messages I can use to send large data, I had a look in the specification but I can't really figure out which message types allow arbitrary lengths of data.

Cheers for the help!
kentd
Go Gators!
Admin
Posts: 87
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Draco098 Lights Out Photography Draco098 Draco098 Draco098 Location: Charlotte, NC Birthday: 09/20
Last Edit: 2009/10/13 09:46 By kentd.
The administrator has disabled public write access.
There's 10 types of people in the world; those that understand binary and those that don't.
 
#18
Re:A few questions.. 2 Years, 3 Months ago  
Hmmm.... I think I can help.

1. There isn't a function whose design is to get all nodes and components. The nodeManagerGetAddressList() function is designed to return a linked list of addresses that match a particular pattern in the system. For example, if you wanted to know about every JAUS_PRIMITIVE_DRIVER message, you would query it with a JausAddress of 0.0.33.0 and a list of all valid primitive driver addresses would be returned. Now, I think you could send this function 0.0.0.0 (all wildcards) and get a complete list back. That might be one solution, but I've never tried it. Another approach you could take is to query the node manager using the proper JAUS message. If you send the Node Manager a QueryConfigurationMessage it will reply with a ReportConfigurationMessage. (or it should ) The query allows you specify if you want the System, Subsystem or Node configuration.

2. There is not a function currently that allows retrieval the Identification of an entity from its JausAddress. As you said, it would be trivial to add this to OpenJAUS, however there is the issue of sending a JAUS message is asynchronous and one should not block state execution awaiting a reply to a message. A query/response for something like this could be added to the OpenJAUS Node Manager interface (which is sychronous). however it is a desire of the development group to move away from that mechanism and move all the traffic between component and node manager into the JAUS port. Anyway, the solution is an option.

3. I am a bit confused on your question. I believe you are looking for a JAUS message that will allow an arbitrary amount / configuration of data. Say a JAUS Header and a BLOB. This does not exist in the JAUS Standard. The standard is designed such that each message has a well-defined and parasible structure as defined in the RA. This allows interoperability as everyone with the standard will understand the structure and content of a given message. However, some of these messages allow loops of data which may become quite large. These large messages are where the large message support is needed in the standard. You can see an example of this in the ReportConfigurationMessage or the ReportVksObjectsMessage. That said, if you follow the tutorial on making your own message (www.openjaus.com/create-an-experimental-message), you could certainly build one which is just a header and a BLOB or whatever datastructure you would like. It would transmit through the system like any other message, however it would not be understandable by other JAUS components that are not familiar with that message structure/type.
kentd
Go Gators!
Admin
Posts: 87
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Draco098 Lights Out Photography Draco098 Draco098 Draco098 Location: Charlotte, NC Birthday: 09/20
The administrator has disabled public write access.
There's 10 types of people in the world; those that understand binary and those that don't.
 
#19
Re:A few questions.. 2 Years, 3 Months ago  
gibbocool wrote:
Hi danny, cheers for the information.
I think the QueryConfiguration is what I need, but I'm having trouble getting a response from the nodemanager. I'm sending the queryConfiguration to component JAUS_NODE_MANAGER, and setting the queryField to JAUS_SUBSYSTEM_CONFIGURATION but i'm not getting any reportConfiguration messages. Any ideas?
gibbocool


Okay... looking through the source code for the Node Manager, I think I see what may be the issue for you here. If you are sending a QueryConfiguration with a type of JAUS_SUBSYSTEM_CONFIGURATION, the NM checks that the SubsystemCommunicationInterface is enabled, i.e. you have some active subsystem interface. The reason for this is that the SUBSYSTEM_CONFIGURATION is usually used during discovery and only flows between node managers / communicators on the subsystem level. There isn't an easy fix to this (without hacking the NM). One thing you can do is enable the subsystem interface, but that may not be possible. Have you tried the nodeManagerGetAddressList() function? I believe that should work but haven't had a chance to try it.
kentd
Go Gators!
Admin
Posts: 87
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Draco098 Lights Out Photography Draco098 Draco098 Draco098 Location: Charlotte, NC Birthday: 09/20
Last Edit: 2009/10/13 09:42 By kentd.
The administrator has disabled public write access.
There's 10 types of people in the world; those that understand binary and those that don't.
 
#20
Re:A few questions.. 2 Years, 3 Months ago  
gibbocool wrote:
I still haven't solved the above problem, but i have another issue now. I'm trying to get two NodeManagers? talking. I've set up ubuntu on virtualbox, and when i start both nodemanagers, I get this on one of them:

Node ADDED: JausNode?-2 ERROR (virtual bool JausNodeCommunicationManager::receiveJausMessage(JausMessageStruct?*, JausTransportInterface?*):305): Message received from NodeInterface? that is from my Node!

The other doesn't say anything.

My configuration on the main box:
SubsystemId: 1
NodeId: 1
Subsystem_Identification: OJSubsystem
Node_Identification: OJNode1

[Component_Communications]
JAUS_OPC_UDP_Interface: true
OpenJAUS_UDP_Interface: true

[Node_Communications]
Enabled: true
JUDP_Interface: true
JUDP_IP_Address: 192.168.0.38
#JAUS_OPC_UDP_Interface: true
#JAUS_OPC_UDP_IP_Address:

[Subsystem_Communications]
Enabled: false


on the virtualbox:
[JAUS]
SubsystemId: 1
NodeId: 2
Subsystem_Identification: OJSubsystem
Node_Identification: OJNode2

[Component_Communications]
JAUS_OPC_UDP_Interface: true
OpenJAUS_UDP_Interface: true

[Node_Communications]
Enabled: true
JUDP_Interface: true
JUDP_IP_Address: 10.0.2.15
#JAUS_OPC_UDP_Interface: true
#JAUS_OPC_UDP_IP_Address:

[Subsystem_Communications]
Enabled: false


Having a bit of experience with VirtualBox myself, I believe the issue you are having is that you are using the external interface (192.168.0.38) on Node1 and the VirtualBox interface (10.0.2.15) on Node2. I believe there should be a complimentary interface on your host machine with an address like 10.0.2.1 or something similar that can talk to the VirtualBox.
kentd
Go Gators!
Admin
Posts: 87
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Draco098 Lights Out Photography Draco098 Draco098 Draco098 Location: Charlotte, NC Birthday: 09/20
Last Edit: 2009/10/13 09:43 By kentd.
The administrator has disabled public write access.
There's 10 types of people in the world; those that understand binary and those that don't.
 
#21
Re:A few questions.. 2 Years, 3 Months ago  
gibbocool wrote:
Having a bit of experience with VirtualBox myself, I believe the issue you are having is that you are using the external interface (192.168.0.38) on Node1 and the VirtualBox interface (10.0.2.15) on Node2. I believe there should be a complimentary interface on your host machine with an address like 10.0.2.1 or something similar that can talk to the VirtualBox.
I found that the host gateway IP is 10.0.2.2, but I couldn't start the NM on that IP. Any ideas?

Hmmm... not really. What happens when you try to start the NM on that interface? And when you start it, do you have Virtual Box running? I think Virtual Box has some different network configurations you can use (host only, NAT, etc)... so maybe you are configured for some other interface in VirtualBox and that interface (10.0.2.2) is not active? Does it seem active in the Network Interfaces control panel?
kentd
Go Gators!
Admin
Posts: 87
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Draco098 Lights Out Photography Draco098 Draco098 Draco098 Location: Charlotte, NC Birthday: 09/20
Last Edit: 2009/10/13 09:46 By kentd.
The administrator has disabled public write access.
There's 10 types of people in the world; those that understand binary and those that don't.
 
#23
Re:A few questions.. 2 Years, 3 Months ago  
kentd wrote:
gibbocool wrote:
Hi danny, cheers for the information.
I think the QueryConfiguration is what I need, but I'm having trouble getting a response from the nodemanager. I'm sending the queryConfiguration to component JAUS_NODE_MANAGER, and setting the queryField to JAUS_SUBSYSTEM_CONFIGURATION but i'm not getting any reportConfiguration messages. Any ideas?
gibbocool


Okay... looking through the source code for the Node Manager, I think I see what may be the issue for you here. If you are sending a QueryConfiguration with a type of JAUS_SUBSYSTEM_CONFIGURATION, the NM checks that the SubsystemCommunicationInterface is enabled, i.e. you have some active subsystem interface. The reason for this is that the SUBSYSTEM_CONFIGURATION is usually used during discovery and only flows between node managers / communicators on the subsystem level. There isn't an easy fix to this (without hacking the NM). One thing you can do is enable the subsystem interface, but that may not be possible. Have you tried the nodeManagerGetAddressList() function? I believe that should work but haven't had a chance to try it.


gibbocool wrote:
I cant find the nodeManagerGetAddressList() function, but I did find:

JausAddressList *nodeManagerGetComponentAddressList(NodeManagerInterface, unsigned char);

Unfortunately I dont know how to call it since I dont know how to put in the correct arguments.

I dont understand how people have been discovering the system before now? Have they just been hard coding node ID's, and instance ID's? I guess for many systems that would be fine, but my system depends on discovering what nodes / components / instances are connected.


I just realized that looking up components on the system table is not covered by any of the OpenJAUS tutorials (shame on us, I'll get that rectified in the future). But that would still not address your particular issue.

Typically, when you are trying to find the JAUS Address of another entity, you know it's Component ID (as specified in the JAUS RA). Using the component ID, a component can query the NodeManager (where the system tree is held and managed) for the JAUS Address of an entity that matches the specified information. To do so you would use the following function defined in the OJ Component Template:
Code:

JausBoolean ojCmptLookupAddress(OjCmpt ojCmpt, JausAddress address);


This takes the ojCmpt object to operate on and a JausAddress. This JausAddress is special. It should be populated with all the information known about the entity you are searching for (i.e. the subsystem ID if you know it, the node ID if you know it, the cmpt ID)... any zeros in this address are treated as wildcards. The response from the nodeManager is put into that JausAddress entity and True/False is returned if a valid entity is found.

We originally designed the system to support returning a list of possible entities (if more than one match was found), but found that was cumbersome to use and not useful to most developers. Therefore the "list" interface is not exposed currently through the ojCmpt template. Therefore sending 0.0.0.0 will not work.

So, if you absolutely need to get a list of all components on a given system, then I don't think we have a good mechanism in place to do that right now. I think the best solution is to remove the check in the NodeManager that is stopping it from responding to a QueryConfiguration request.

A better long-term solution would be to add a function for this to the ojCmpt template which can query the NM for the information over the UDP port or handle the sending & receiving of the QueryConfiguration message for the component.

All that said... if you go into NodeManagerComponent.cpp (in /libopenJaus/src/nodeManager)... go to line 1300 and comment out that IF statement (and the accompanying ELSE) and I think your Query/Report should start working.

I hope that helps!
kentd
Go Gators!
Admin
Posts: 87
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Draco098 Lights Out Photography Draco098 Draco098 Draco098 Location: Charlotte, NC Birthday: 09/20
The administrator has disabled public write access.
There's 10 types of people in the world; those that understand binary and those that don't.
 
Go to topPage: 12
Copyright © 2012 OpenJAUS. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.