6.1 Data messages general
The SkyVUE 8M can provide a variety of data message types to allow efficient output of data. Not
all messages provide the full information available, but these messages may be more efficient in
terms of data storage and transmission.
CL31 and CT25K messages follow formats used by common existing CL31 and CT25K sensors
allowing easier replacement or network expansion.
6.2 Checksums used in SkyVUE 8M
messages
This is based on the CRC-16 with the output XOR’d with Hex 0xFFFF and outputs a two-byte
CRC-16 character. The CRC-16 is calculated on all characters after the SOH character up to and
including the ETX character.
The following example uses the
C
code to calculate the SkyVUE 8M checksum.
NOTE:
Shorts are 16 bits long and ints are 32 bits long.
// ----------------------------------------------------------------
// Calculate CRC-16
// buf is a pointer to the input string
// len is the length of the input string
// ----------------------------------------------------------------
unsigned short crc16(char *buffer, int length)
{
unsigned short crc;
unsigned short m;
int i, j;
crc = 0xFFFF;
for (i=0; i < length; ++i)
{
crc ^= buffer[i] << 8;
for (j=0; j<8; ++j){
m = (crc & 0x8000) ? 0x1021 : 0;
crc <<= 1;
crc ^= m;
}
}
crc ^= 0xFFFF;
return crc;
}
SkyVUE™8M Tactical LIDAR Ceilometer
63
Содержание SkyVUE 8M
Страница 1: ...Revision 11 2020 Copyright 2020 Campbell Scientific Inc ...
Страница 105: ...SkyVUE 8M Tactical LIDAR Ceilometer 100 ...