
Example
This C program strips the LIF structure from the
data.raw
file.
#include <stdio.h>
main(int argc, char *argv[] )
{
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:
/*
** 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[1] ;
if ( len > 0 )
write( 1, &buffer[2], len ) ;
break;
}
}
}
Retrieving and Restoring Data
To strip LIF structure from raw measurement data
4-8
Содержание 1660 CS Series
Страница 7: ...1 Connecting and Configuring...
Страница 16: ...1 10...
Страница 17: ...2 Accessing the Logic Analyzer File System...
Страница 25: ...3 Using the X Window Interface...
Страница 37: ...4 Retrieving and Restoring Data...
Страница 50: ...4 14...
Страница 51: ...5 Programming the Logic Analyzer...
Страница 64: ...5 14...
Страница 65: ...6 Concepts...
Страница 72: ...6 8...
Страница 73: ...7 Troubleshooting...
Страница 104: ...Index Index 4...