2635A
Users Manual
C-2
number of channels for the scan. The following C code converts a LOG_BIN? response
string into a byte array:
/*
-* decode(): Decode LOG_BIN? response string into raw byte stream
**
** Decoding is done on multiples of four input bytes:
**
** 543210 543210 543210 543210 (bit number in ASCII bytes)
** +--------+--------+--------+--------+
** | src[0] | src[1] | src[2] | src[3] | ASCII string input
** +--------+--------+--------+--------+
** 765432 107654 321076 543210 (bit number in raw bytes)
** / / /
** / / /
** | / /
** | / /
** | | /
** | | /
** | | |
** 76543210 76543210 76543210 (bit number in raw bytes)
** +--------+--------+--------+
** | dst[0] | dst[1] | dst[2] | Raw data output
** +--------+--------+--------+
**
** Inputs:
** dst Destination for binary data (must have enough space
** allocated; the maximum needed is 6 timestamp bytes + 3
** bytes for temp units, measurement rate, and digital I/O
** + 4 bytes/float * 22 floating point values = 97 bytes).
**
** src Source ASCII string (null terminated)
**
** Outputs:
** dst Set to binary data, based on ASCII string
**
** Returns:
** Number of bytes placed in destination buffer
*/
int
decode(dst, src)
unsigned char *dst;
char *src;
{
/* src to dst xlate */
static struct nibtab_s {
int lindex;
int lmask;
int lshift;
int rindex;
int rmask;
int rshift;
} nibtab[3] = {
/* left right */
Summary of Contents for 2635A
Page 8: ...2635A Users Manual vi...
Page 26: ...2635A Users Manual xxiv...
Page 29: ...Preparation for Use Introduction 1 1 3...
Page 50: ...2635A Users Manual 1 24...
Page 53: ...Front Panel Operations Summary of Front Panel Operations 2 2 3...
Page 88: ...2635A Users Manual 2 38...
Page 180: ...2635A Users Manual 5 10...
Page 212: ......
Page 234: ...2635A Users Manual B 4...
Page 250: ...2635A Users Manual D 8...
Page 251: ...E 1 Appendix E 8 Bit Binary Coded Decimal Table...
Page 264: ...Hydra Memory Card Record DATA FILES SET UP FILES DATxx Application Note SETxx Application Note...
Page 268: ...2635A Users Manual 4...