To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcxOpen lugnet.robotics.rcx in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / 370
    Re: OO programing in RCX —David Leeper
   Hi Eric, There always Visual Basic. I'm currently building a few ActiveX controls which sit on top of Spirit. So far its working nicely and is a big improvement over the non-class method of VB coding I used in my original prototype. David Leeper (...) (25 years ago, 10-Jan-00, to lugnet.robotics.rcx)
   
        Re: OO programing in RCX —Matthew Miller
     (...) I'm curious -- are you making it so you can think about your RCX program in OO terms, or just the VB program that sends opcodes? (25 years ago, 10-Jan-00, to lugnet.robotics.rcx)
    
         Re: OO programing in RCX —David Leeper
      Hi Mathew, There are no objects on the RCX, in the sense that there are no vtables on the RCX. I made no changes to spirit.ocx. But I definitely think of the RCX code in terms of objects now. There are "brain" objects, "map" objects, "identity" (...) (25 years ago, 10-Jan-00, to lugnet.robotics.rcx)
    
         Re: OO programing in RCX —Eric Huang
     What I mean is to think the RCX in OO. For example, I can add a sensor object in my programming code when I plug a sensor into my RCX. I can make the sensor object to interface with the RCX object in the OO manner. Is that possible? I learned some (...) (25 years ago, 11-Jan-00, to lugnet.robotics.rcx)
    
         Re: OO programing in RCX —David Leeper
     Hi Eric, Yes, I believe you could create a sensor object on the VB side and write your code thinking in terms of a sensor object. Here's one way: =-=-=-= BEGIN SAMPLE CODE =-=-=-= Private m_SensorNumber As Integer Private m_SensorType As Integer (...) (25 years ago, 11-Jan-00, to lugnet.robotics.rcx)
    
         Re: OO programing in RCX —Eric Huang
     Thank you, David. Your gode is great! I learned a lot from your quick example, though I prefer Java more. I will encapsulate RCX commands in some utility objects and use them in more higher level objects. What I focus now is make a RF/IR adapter to (...) (25 years ago, 12-Jan-00, to lugnet.robotics.rcx)
   
        Re: OO programing in RCX —Dave Baum
   (...) I toyed with a couple of ideas for this, but most of the really useful things can't be done using the standard bytecodes. About the only thing I came up with was a way to wrap the standard API calls up into some classes. However, implementing (...) (25 years ago, 11-Jan-00, to lugnet.robotics.rcx)
   
        Re: OO programing in RCX —David Leeper
     Hi Dave, On the RCX side, I wouldn't want true objects. I wouldn't want to fill up the RCX variables with vtables and the program memory with the code to use the vtables. But on the PC side of things I'm beginning to think objects can be very (...) (25 years ago, 11-Jan-00, to lugnet.robotics.rcx)
   
        Re: OO programing in RCX —Markus L. Noga
   I should probably mention again that legOS supports C++, and supports it even better if you add void*builtin_new(size_t n){return malloc(n)}; to the appropriate library, as v0.3.0 will. The rest of this is off-topic. Dave Baum schrieb: (...) (...) (25 years ago, 12-Jan-00, to lugnet.robotics.rcx)
   
        Re: OO programing in RCX —Dave Baum
   (...) OO works very well for things like a parse tree. I can add a new statement and just add its rules for semantic checking and code generation...all within its own class. I think part of the problem is that compiler design is a very heavily (...) (25 years ago, 12-Jan-00, to lugnet.robotics.rcx)
   
        Re: OO programing in RCX —Markus L. Noga
   Dave Baum schrieb: (...) Yes, definitely so. Many concepts in parser generators are actually OO (bison result types, for example), but they aren't implemented that way. (...) Prof. Goos rather convincingly advocates generation as the do-all and (...) (25 years ago, 12-Jan-00, to lugnet.robotics.rcx)
   
        Re: OO programing in RCX —Dave Baum
   (...) If I were writing NQC from scratch, I'd agree. However, several years ago I was writing a preprocessor and bison wasn't available to me, so I hand-coded the parser. When NQC was started, I just reused about 90% of this parser. Of coruse, along (...) (25 years ago, 13-Jan-00, to lugnet.robotics.rcx)
 

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