
Note
This command not allowed during scenario execution, and will result in the error code “-
190,"Execution in progress"”.
The checksum is calculated using the following algorithm, presented here in a Python lan-
guage example. The array s passed in must be read from a file opened with attributes read
and binary (rb).
def cksum(s):
sum = 0
for c in s:
sum += ord(c)
sum &= 255
sum = -sum
return sum
An example in C is shown below. Again, the char *Data array is read from a file and is a bin-
ary array of unsigned 8-bit char values.
unsigned char CalcChecksum(const char *Data, unsigned Length)
{
unsigned char sum = 0;
unsigned char chksum;
unsigned i;
for (i = 0; i < Length; ++i) {
sum += Data[i];
}
chksum = -sum;
return chksum;
}
6.3.3.100 SOURce:FILe:DATA
Function
This command sends the file data to the unit. The file being transferred is divided into mul-
tiple data commands. There can be as many data commands as needed to send the whole
file. The maximum data in one command is 4000 bytes. At the start of each data block
there is a header #800001234 which tells that 8 following digits gives the length of block.
Command Syntax
SOURce:FILe:DATA
Notes
The example below depicts the transfer of a file. The first DATA command depicts the
transfer. The checksum shown cannot be recreated from the file data because the end of
6.3 Command Reference
User Manual GSG-5/6 Series Rev. 27
315
Содержание GSG-5 Series
Страница 2: ......
Страница 4: ...Blank page II User Manual GSG 5 6 Series...
Страница 42: ...BLANK PAGE 2 5 Signal Power Level Considerations 26 User Manual GSG 5 6 Series Rev 27...
Страница 382: ...BLANK PAGE 6 7 Revision History SCPI Guide 366 User Manual GSG 5 6 Series Rev 27...
Страница 388: ...BLANK PAGE vi User Manual GSG 5 6 Series...