To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 1398
1397  |  1399
Subject: 
Re: Blockin LNP calls
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 28 Aug 2000 00:19:39 GMT
Viewed: 
1186 times
  
In lugnet.robotics.rcx.legos, Eddie C. Dost writes:
My code (removing some CORBA detail) looks like this:
I have a class "nanOrbDemo_i" which has the following
constructor:

inline nanOrbDemo_i(){

                if ( lnp_init(0,0,0,0,0) ){
                        cout << "LNP Init() Failed" <<endl;
                }
                else cout << "LNP Initialised" << endl;
        };

Then in a particular method of this class, for debugging pusposes,
I have added the following simple code:

//DEBUGGING ....

        char* testbuffer;
        unsigned char testlen;
        unsigned char testport;
        unsigned char testhost;
        unsigned char testaddress;

        testbuffer = "GIOP";
        testlen = 4;
        testport = 1;
        testhost = 0;
        testaddress = (testhost << 4 | testport);

        cout << "DEBUG: step 1 reached" << endl;

        result = lnp_addressing_write(testbuffer, testlen ,testaddress, 8);

        cout << "DEBUG: step 2 reached" << endl;

                switch (result){

                        case TX_SUCCESS:
                                cout << "Transmitted" << endl;
                        case TX_FAILURE:
                                cout << "Collision" << endl;
                        default:
                                cout << "Error" <<endl;
                }

        cout << "DEBUG: step 3 reached" << endl;
//END DEBUGGING
        cout << "\nExiting method " << endl;



My code never reaches "debugging step 2". When I compile and run this, the
data is successfully recieved by the RCX, but the lnp_addressing_write(..)
call never returns .....

Does anyone have any ideas, please? It's driving me mad,

From the statement "data is received by the RCX" I assume you have this
problem on the host system. What OS are you using? Also, how does your
lnp_logical_write() routine look like?


Yes, the problem is on the host PC (running Red Hat 6.2). What I cant figure
out is how identical code works fine if I instantiate the wrapper class
in a simple demo app, but once I try calling it form within my CORBA server,
it blocks on sending the data??

I'm using OmniOrb 3.0 from AT&T Labs, and all my code is C++, compiled with:
$ g++ -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

The lnp_integrity_write(..) functionality is the same (I'm assuming you meant
'lnp_integrity_write' and not 'lnp_logical_write', is this correct). It too is
failing in the CORBA server.

Thanks,

Colin



Message has 1 Reply:
  Re: Blockin LNP calls
 
(...) No, I meant lnp_logical_write, which is called from lnp_addressing_write. lnp_logical_write is not within the file lnp.c, which I guess you link into your app. This function is supposed to actually write to the serial device communicating with (...) (24 years ago, 28-Aug-00, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: Blockin LNP calls
 
(...) From the statement "data is received by the RCX" I assume you have this problem on the host system. What OS are you using? Also, how does your lnp_logical_write() routine look like? Eddie C. Dost ecd@skynet.be (24 years ago, 27-Aug-00, to lugnet.robotics.rcx.legos)

8 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR