Re: Question about digital i/o cmd buffer data format in new driver

On Tuesday 25 January 2005 06:51 pm, Frank Mori Hess wrote:
> On Monday 24 January 2005 01:15 pm, Ian Abbott wrote:
> >
> > The second way is to pack the channel data into the minimum required
> > number of bytes (rounding up to a whole number of bytes), storing the
> > channels in the order they appear in the command's channel list.  So
> > if the channel list contains 9 channels, the scan will use two bytes;
> > bit 0 of byte 0 will contain the data for the first channel in the
> > list; bit 1 will contain the data for the second channel in the list,
> > etc.  If I use this method, I'll set the SDF_PACKED flag in the
> > subdevice (nothing uses that yet!).
>
> You should do it the second way, except rounding up to a multiple of
> sizeof(sampl_t) or sizeof(lsampl_t) depending on your use of SDF_LSAMPL
> (I fixed bytes_per_scan() to do this).  You don't need a new SDF_PACKED
> flag. The ni_pcidio driver could be thought of as a special case where
> only chanlists starting at zero and incrementing are supported (although
> the driver doesn't actually enforce that).

To clairify, when I say the second way, I mean with replacing most the the 
word "byte" in your description with "sampl_t or lsampl_t".

- 
Frank

Received on 2005-01-25Z23:58:04