Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How to know when to end the read for MessageBasedSession

Hi:

 

I am using the NSVISA MessageBasedSession class to read a JPG file from DCA DSA8200 hard disk to PC via GPIB cable. The function I am using is ReadByteArray(). Currently the default buffer size is set to 16KB. My file size is about 96KB. So the read will end when the size read back reached 16K. I will need to call multiple times of ReadByteArray() to read the full file data. The question is how do I know when is the final ReadByteArray() call? If I exceeded the last ReadByteArray() call I will get timeout exception because there is nonthing to read. Is there any status I can check to know there is no more byte to read?

 

Thank you.

 

Chin Lin

0 Kudos
Message 1 of 1
(3,105 Views)