To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 1146
1145  |  1147
Subject: 
Re: NQC's RCX Communication Code
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Sat, 12 May 2001 14:17:25 GMT
Viewed: 
2533 times
  
In article <3AFD3C27.4030006@comclub.dyndns.org>, Quentin Smith
<quentins.l@comclub.dyndns.org> wrote:

Hi-
This message is probably only answerable by Dave, but someone else might
know the answer. I'm trying to build a GNOME (a linux GUI) application
for controlling the RCX, ala the tools menu of RCXcc. Anyway, I wanted
to know what files I would need out of the nqc source distribution, what
copyright info i would need to include (my app will be GPL), and also
how to send a simple bytecode and receive a response from the RCX (my
first version of the app was in perl, which has a wonderful OO library
[like RCX->motorOn(1,7);], so I don't know all the gory details).

Thanks for any help and sorry for acting like a newbie,
--Quentin


You'll need a bunch of files from the rcxlib directory (primarily
RCX_Link.cpp, which implements the communication protocol).  You'll also
need the serial interface code which resides in
platform/PSerial_unix.cpp (plus a few include files in the platform
directory).

As for copyright, all of the NQC code is under MPL, which is quite
permissive in terms of excerpting and combining with other licenses.
However, GPL might be a little pickier (it tends to require that almost
everything it touches also be GPL).  I'm not an expert on this, though,
so I really can't say how you'd work a GPL license for a product that
included MPL code.

To be honest, I'm not going to be picky about the licensing.  Just make
sure the copyright info at the start of each file is intact, and include
the MPL license file.  One thing you cannot do is change the NQC files
from MPL to GPL.

Sending commmands...

1) Figure out what bytecode (and arguments) you need to send (refer to
the documentation from Lego's SDK).

2) Create an instance of RCX_Cmd with those bytes (RCX_Cmd has some
helper methods that assist in constructing some bytecodes/arguments).

3) Use RCX_Link::Send() to send the command.  (You must have already
instantiated and opened RCX_Link - close RCX_Link when you are done).

There are lots of examples of formating and sending commands in nqc.cpp.

Dave Baum

--
reply to: dbaum at enteract dot com



Message is in Reply To:
  NQC's RCX Communication Code
 
Hi- This message is probably only answerable by Dave, but someone else might know the answer. I'm trying to build a GNOME (a linux GUI) application for controlling the RCX, ala the tools menu of RCXcc. Anyway, I wanted to know what files I would (...) (24 years ago, 12-May-01, to lugnet.robotics.rcx.nqc)

2 Messages in This Thread:

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

Custom Search

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