Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  24 Aug 2018, Lukas Gerritzen, Forum, Int64 datatype 
    Reply  25 Aug 2018, Stefan Ritt, Forum, Int64 datatype 
    Reply  28 Aug 2018, Konstantin Olchanski, Forum, Int64 datatype 
Message ID: 1384     Entry time: 25 Aug 2018     In reply to: 1383
Author: Stefan Ritt 
Topic: Forum 
Subject: Int64 datatype 
> I would like to store the address of 1-Wire temperature sensors in a device
> driver. However, the supportet data types (as definded around
> include/midas.h:311) do not foresee a type large enough.
> 
> Is there a good reason against this?
> 
> I know that other experiments use this kind of sensor, how do you store the
> addresses? I've noticed that most of the address is just zeroes, but I wouldn't
> like to store just half the address, assuming that half the address is always
> zeroes.

Well, when this code was written, computers had 640kB  and operating systems had 16 bit. What 
you  can do for your 1-wire sensor is to store the address in two values, one 32-bit LSB and one 
32-bit MSB. Or store it in a string with hex representation.

Stefan 
ELOG V3.1.4-2e1708b5