[rrd-developers] rrd_update_r function parameters

Robert Halstead badbeeker at gmail.com
Tue Jul 11 19:06:21 MEST 2006


Hello,
I'm making a java application that uses JNI to call rrdtool's librrd_th
functions and I'm having some questions about the parameters of
rrd_update_r().  My question is what is char *tmplt, and how do I go about
finding it in the list of arguments.  Looking at rrd_update(int argc, char
**argv) I see that char *tmplt is derived from getopt_long(), however, I
cannot use this in a multithreaded env.  Looking through rrd_update, I see
that the only option that getopt_long is looking for is template, is tmplt
then just the string of the option argument?  I've looked at getopt man
pages, which are a little bit confusing, and seeing that getopt() has a
global variable optarg which points to the actual argument for the option?
correct?

Since rrd_update_r takes char *tmplt parameter does this mean it's required
in the command line argument list?  Also, when I pass in argc and argv, I
need to subtract the filename and whatever tmplt arguments are from the
array and argc, correct?

I guess one thing that would help is if I knew what exactly argv needs to
look like going into rrd_update_r function.

The only functions I need to port over are rrd_update_r and rrd_create_r,
but I'm having trouble with the expanded arguments that these two functions
take.  Any help would be apprieciated greatly.  Is there any doc's on these
two functions?

-- 
"A fool acts, regardless; knowing well that he is wrong. The ignoramus acts
on only what he knows, but all that he knows.
The ignoramus may be saved, but the fool knows that he is doomed."

Robert Halstead


--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-developers
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-developers mailing list