Re: ppc db access

From: Flemming Videbaek (videbaek@sgs1.hirg.bnl.gov)
Date: Sat Nov 03 2001 - 17:02:22 EST

  • Next message: Djamel Ouerdane: "Re: ppc db access and brat update"

    Dear Steve,
    
    When we talked about this today I thought there was a byte issue, but let us
    look at the facts
    The content tables usual of the calibration tables are stored as the 'hex'
    number in ascii formed
    and unpack /packed as such from mem to from ascii string. (byte oriented
    reading/writting)
    Since the DB is stored by taking the incrementing 'byte' converting to ascii
    hex and storeing in the DB, I do believe that
    the order becomes reversed when reading to another machine. Thus to work
    with the ppc (and not the fix any
    existing DB) I think one has to add aprropriate compile flags + code in the
    routines
    String2Float ,.. for the reading , and if you want to write from the ppc, it
    seems from my reading of the code we have to expand the content of the
    single Address2String that is used for storing, since one really has to know
    the type (or at least size)
    of individual elements.
    
    Christian, would you please go over these arguments and propose a solution.
    I think it is a matter of byte-swapping only
    at least between linux i286 and linus ppc which uses IEEE floating and
    double (?).
    
    Flemming
    
    ------------------------------------------------------
    Flemming Videbaek
    Physics Department
    Brookhaven National Laboratory
    
    tlf: 631-344-4106
    fax 631-344-1334
    e-mail: videbaek@bnl.gov
    ----- Original Message -----
    From: "Stephen J. Sanders" <ssanders@ku.edu>
    To: <brahms-dev-l@bnl.gov>
    Sent: Saturday, November 03, 2001 9:40 AM
    Subject: ppc db access
    
    
    > Hi,
    >      As evidenced by a  number of recent messages to this group  I am
    > trying to access the
    > mysql db from the linuxppc system.  With Djamel's and Christian's help,
    > I think I now
    > have this done.  However, I now encounter what may be a serious problem:
    >  All of the numerical
    > values that I'm getting back are garbage.  The ascii type information
    > seen to be OK (at least, the strings output
    > when I issue the Print method from BrCalibration seem OK),  but the
    > numbers are nonsense.
    >
    > Does anyone know if there is a byte-swapping issue with db access?
    >
    > ..steve
    >
    



    This archive was generated by hypermail 2b30 : Sat Nov 03 2001 - 18:27:51 EST