EasyManuals Logo

HP 1670A Series User Manual

HP 1670A Series
108 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #45 background imageLoading...
Page #45 background image
Example
Retrieving
and
Restoring
Data
To
strip
LIF
structure
from
raw
measurement
data
This C program strips
the
LIF
structure from
the
data.
raw
file.
#include
<stdio.h>
main(int
argc,
char
*argv[J
{
}
char
buffer[256]
int
len
;
int
count
= 0 ;
while
((
len
=
read(
0,
buffer,
256
))>0
) {
count++
;
}
}
switch
(
count
) {
case
1:
case
2:
/*
do
nothing
--
just
throw
away
*/
break;
case
3:
I*
**
throw
away
the
first
two
bytes
(
record
size
**
the
next
four
bytes
(
file
type
? )
**
the
next
32
bytes
(
file
description
*/
if
len
-
38
> 0
write(
1,
&buffer[38],
len-38
)
break;
default:
/*
throw
away
the
first
two
bytes
(
record
size
)
*/
len
=
(unsigned
char)buffer[l]
;
if
(
len
> 0 )
write(
1,
&buffer[2],
len
) ;
break;
4-8

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP 1670A Series and is the answer not in the manual?

HP 1670A Series Specifications

General IconGeneral
BrandHP
Model1670A Series
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals