scopehal/SiglentSCPIOscilloscope.cpp
// parses out length, does no other validation. requires 17 bytes at header.
parses out length, does no other validation. requires 17 bytes at header.
parses out length does no other validation . requires 17 bytes at header .
uint32_t SiglentSCPIOscilloscope::ReadWaveHeader(char *header)
{
	int r = 0;
	m_transport->ReadRawData(16, (unsigned char*)header);
	if (strlen(header) != 16)
	{
		LogError("Unexpected descriptor header %s\n", header);
		return 0;
	}
	LogDebug("got header: %s\n", header);
	return atoi(&header[8]);
}
uint32_t SiglentSCPIOscilloscope :: ReadWaveHeader ( char * header ) { int r = 0 ; m_transport -> ReadRawData ( 16 , ( unsigned char * ) header ) ; if ( strlen ( header ) != 16 ) { LogError ( " \n " , header ) ; return 0 ; } LogDebug ( " \n " , header ) ; return atoi ( & header [ 8 ] ) ; }
parses out length, does no other validation.
parses out length does no other validation .