![YSI SonTek ADVField Скачать руководство пользователя страница 108](http://html.mh-extra.com/html/ysi/sontek-advfield/sontek-advfield_technical-documentation-manual_915334108.webp)
SonTek/YSI
96
ADVField Operation Manual (September 1, 2001)
A1.2.2 Checksum
Calculation
The ADV uses a checksum when sending binary data over a serial port. The checksum is com-
puted with the C function
ComputeCheckSum
shown below. To understand how the checksum is
computed, assume that a sample has been placed in a segment of memory (i.e.; a character array)
in the format shown in §A1.2. The checksum is computed by the following statement in C.
CheckSum = ComputeCheckSum( buf, Sample_Length - 2 );
In this example,
buf
is a pointer to the memory location where the profile begins (i.e.; the name
of the character array where the profile was placed).
ComputeCheckSum
simply adds the first
Sample_Length-2
bytes starting at location
buf
, and then adds the value 0xA596. The result of
this summation is then truncated to a two-byte integer and returned. The addition of the value
0xA596 is to ensure that an all-zeros profile does not produce a valid checksum.
#define CHECK_SUM_OFFSET
0xA596
unsigned int ComputeCheckSum( unsigned char *buf, int n )
{
int i;
unsigned int ChkSum = CHECK_SUM_OFFSET;
for(i=0;i<n;i++) = buf[i];
return(ChkSum);
}
Содержание SonTek ADVField
Страница 2: ......
Страница 8: ...SonTek YSI iv ADVField Hydra Operation Manual September 1 2001 NOTES ...
Страница 12: ......
Страница 32: ...SonTek YSI 20 ADVField Operation Manual September 1 2001 ...
Страница 102: ...SonTek YSI 90 ADVField Operation Manual September 1 2001 ...
Страница 104: ...SonTek YSI 92 ADVField Operation Manual September 1 2001 ...
Страница 118: ...SonTek YSI 106 ADVField Operation Manual September 1 2001 ...
Страница 122: ...SonTek YSI 110 ADVField Operation Manual September 1 2001 ...
Страница 126: ...SonTek YSI 2 ADVField Operation Manual September 1 2001 ...
Страница 132: ...SonTek YSI vi ADVField Software Manual September 1 2001 NOTES ...
Страница 136: ...SonTek YSI ADVField Software Manual September 1 2001 4 ...
Страница 152: ...SonTek YSI ADVField Software Manual September 1 2001 20 ...
Страница 160: ...SonTek YSI ADVField Software Manual September 1 2001 28 ...
Страница 162: ...SonTek YSI ADVField Software Manual September 1 2001 30 ...
Страница 164: ...SonTek YSI ADVField Software Manual September 1 2001 32 ...
Страница 168: ...SonTek YSI ADVField Software Manual September 1 2001 36 ...
Страница 174: ...SonTek YSI ADVField Software Manual September 1 2001 42 ...
Страница 182: ...SonTek YSI ADVField Software Manual September 1 2001 50 ...
Страница 184: ...SonTek YSI ADVField Software Manual September 1 2001 52 Figure 15 ViewHydra Screen Shot ...
Страница 196: ...SonTek YSI ADVField Software Manual September 1 2001 64 ...
Страница 198: ...SonTek YSI ADVField Software Manual September 1 2001 66 ...
Страница 202: ......
Страница 206: ......
Страница 220: ...SonTek YSI Acoustic Doppler Velocimeter Principles of Operation September 1 2001 14 ...