Project

General

Profile

Bug #3140

RBNBToKepler2 actor output port generation problem

Added by Derik Barseghian over 11 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
Normal
Category:
actors
Target version:
Start date:
02/07/2008
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
3140

Description

This actor is having problems dealing with output port generation when pointed at "niagara-dev.sdsc.edu:3333" (an sdsc test server). Below my discussion of what I think are the issues are (as posted to the rbnb-dev list https://lists.sdsc.edu/pipermail/rbnb-dev/2008/000298.html):

I have two RBNB questions:
1) Does one need to do a Fetch to get channel types?
2) Why does a Fetch sometimes reduce the number of channels in a channelmap?

I hope the answer to 1) is No. Is there a way to get type without first doing a Fetch? Below are some snippets that illustrate the two issues.

I first set up a registrationMap:

------------------------------
_map.Clear();
_registrationMap.Clear();
_sink.RequestRegistration(_registrationMap);
_sink.Fetch(_blockTimeout,_registrationMap);
_numChans = _registrationMap.NumberOfChannels();

for (int i=0; i < _numChans; i++){
chanType = _registrationMap.GetType(i);
System.out.println("chanType of _registrationMap chan " +i + " is: " + chanType);
_map.Add(_chanNames[i]);
}
------------------------------

Unfortunately the types printed are all 9, i.e. string....not true! (If I try to GetType on _map instead, after the _map.Add, I get NullPointerExceptions).

So what I've been doing after the above is the below code. After the following Request and Fetch I can use GetType to receive the variety of channeltypes I expect--strings, float64s, etc.
However, I was hoping I could get this 'metadata' without actually fetching data.

The below also illustrates issue 2).

------------------------------
_numChans2 = _map.NumberOfChannels();
System.out.println("num chans of _map: " + _numChans2);

// just get one small chunk of data so we are able to check the data types
_sink.Request(_map, 0, 1, "oldest");
_numChans2 = _map.NumberOfChannels();
System.out.println("num chans of _map: " + _numChans2);
_sink.Fetch(_blockTimeout,_map);
_numChans2 = _map.NumberOfChannels();
System.out.println("num chans of _map: " + _numChans2);
------------------------------

When I point at niagara-dev.sdsc.edu the stdouts print:

num chans of _map: 106
num chans of _map: 106
num chans of _map: 100

The Fetch seems to be changing the number of channels in _map! Does that make sense? Does Fetch throw-away / auto-disregard certain channels? On my server this does not happen, num chans does not change in those three stdouts. I also don't think it's that rbnb is throwing away channels with duration 0--I see more channels than 6 that have duration 0 on niagara-dev.

This is with v3.1b1 and v3.1b2.

History

#1 Updated by Derik Barseghian over 11 years ago

I've identified the channels that are dropping after Fetch.

These are the 7 channels dropping from the current (as of about 15 mins ago) list of 524 after I do a Fetch (tried it twice, same set dropped both times):

FakeDAQ/10
FakeDAQ/11
FakeDAQ/12
FakeDAQ/13
FakeDAQ/14
FakeDAQ/15
PaulMatlabSource/image.jpg

Taking a closer look at PaulMatlabSource/image.jpg, I see a peculiar begin date: Dec 2, 292269055.

I also notice now a recent email about FakeDAQ/10 - 15 being messed up: https://lists.sdsc.edu/pipermail/rbnb-dev/2008/000300.html.

I have an email out to Paul and Larry...

#2 Updated by Derik Barseghian over 11 years ago

I believe these are the answers to my original questions:

1) Does one need to do a Fetch to get channel types?

Yes.
Bill Finger said:
--------
The GetType method will always* return STRING for Registration data,
because the data that comes back from the server from a registration
request IS a string. Specifically, it is an xml document that looks
something like:


<!DOCTYPE rbnb>
<rbnb>
<size>4</size>
<mime>application/octet-stream</mime>
</rbnb>

This xml document does not include the binary type of the data in the
channel. However, if you were merely differentiating between 32 bit
floats and 64 bit floats, the 'size' field could be used (4 and 8,
respectively).
------

As I want to differentiate between all data types, I'm just going to have to stay with my original solution for now: fetch a piece of data and decipher its type. Bummer.

2) Why does a Fetch sometimes reduce the number of channels in a channelmap?

Fetch excludes channels with duration 0.

I believe my original problem was caused by 1) channels with a period in their name and 2) a problem in my filtering section whereby I was miscounting number of channels with duration 0.

niagara-dev is down right now, I will close this bug when it's back up and I see the original problem does not occur.

#3 Updated by Derik Barseghian over 11 years ago

niagara-dev is back up, contains a few empty channels and a channel with a period in its name, and all is well.

#4 Updated by Redmine Admin over 6 years ago

Original Bugzilla ID was 3140

Also available in: Atom PDF