[rrd-developers] Re: rrd_datalang
Laurie Gellatly
gellatly at one.net.au
Sat Mar 10 11:36:39 MET 2001
Years ago, when I worked on an APL interpreter, we needed to be able to
store in
memory all types of objects. These objects could have been text, numerical
(of several
storage types) as well as other objects. Each object could also potentially
have
multiple dimensions and each dimension could be user defined (on the fly).
Such
is the nature of APL.
Maybe considering this will help here now.
>From what I recall, each object had a structure that had
1) A total byte length (mainly used for garbage collection)
2) A type (Text, binary, integer, float ...)
3) A Rank (how many dimensions, 0 = scalar, 1 = vector, 2 = 2d array etc).
4) The length of each dimension (each dimension itself was a 32 bit value)
5) The data in row order
I think you will find that this will cover simple data types that you want
to pass.
A variation on this allowed you to stored mixed data types.
HTH ...Laurie :{)
----- Original Message -----
From: "Tobias Oetiker" <oetiker at ee.ethz.ch>
To: <rrd-developers at list.ee.ethz.ch>
Sent: Saturday, March 10, 2001 8:42 PM
Subject: [rrd-developers] rrd_datalang
>
>
/***************************************************************************
**
> * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997 - 2001
>
****************************************************************************
*
> * rrd_datalang A system for passing named and typed parameters between
> * the different parts of rrdtool
> *
> * In rrdtool thre are a number of places where large and complex
> * data structures have to be passed from one function to another
> * eg when rrd_info returns its findings, but also when a function
> * like rrd_graph get called.
> *
> * At the moment function calling is done with an argc/argv type
> * interface. Its special property is that all data is passed as
> * strings, this can lead to unnecessary data conversions being
> * performed when rrdtool functions are called from a typed
> * language
> *
> * Data returned from functions is not standardized at all, which is
> * efficient in the sense that the data return interface can be
> * tailored to the specific needs of the function at hand, but it
> * also leads to increased probability for implementation errors
> * as things have to be reinvented for each function. Also adding
> * new functions into all the language bindings is quite cumbersome.
> *
> * Therefore I want to develop a standardized interface for passing named
> * and typed data into functions and for returning data from functions to
> * their callers. I am thinking about working of the code in rrd_info.c
...
> *
> * Does anyone have experience in this field or any pointers to
> * read up on related work ? Or maybe even an existing library for
> * this ?
> *
> * Cheers
> * tobi / 2001-03-10
> *
>
****************************************************************************
*/
>
> --
> ______ __ _
> /_ __/_ / / (_) Oetiker, Timelord & SysMgr @ EE-Dept ETH-Zurich
> / // _ \/ _ \/ / TEL: +41(0)1-6325286 FAX:...1517 ICQ: 10419518
> /_/ \.__/_.__/_/ oetiker at ee.ethz.ch http://ee-staff.ethz.ch/~oetiker
>
>
> --
> 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://www.ee.ethz.ch/~slist/rrd-developers
> WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
>
>
--
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://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-developers
mailing list