|
|
|
@ -981,6 +981,12 @@ namespace PIV |
|
|
|
for (int i = 0; i < Data.Length; i++) |
|
|
|
for (int i = 0; i < Data.Length; i++) |
|
|
|
Data[i] = 0; |
|
|
|
Data[i] = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public static UInt16 CalcCRC() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return CONST.CRC16(ref Data, _len_crc); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
public static class BVM2OES |
|
|
|
public static class BVM2OES |
|
|
|
{ |
|
|
|
{ |
|
|
|
@ -1185,9 +1191,18 @@ namespace PIV |
|
|
|
for (int i = 0; i < Data.Length; i++) |
|
|
|
for (int i = 0; i < Data.Length; i++) |
|
|
|
Data[i] = 0; |
|
|
|
Data[i] = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public static UInt16 CalcCRC() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return CONST.CRC16(ref Data, _len_crc); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
public static class BON2BVM |
|
|
|
public static class BON2BVM |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
private const UInt16 _len_pack = 85; |
|
|
|
|
|
|
|
private static UInt16 _len_data = _len_pack - 8; |
|
|
|
|
|
|
|
private static UInt16 _len_crc = _len_pack - 2; |
|
|
|
|
|
|
|
|
|
|
|
private static Byte _num_pack = 1; |
|
|
|
private static Byte _num_pack = 1; |
|
|
|
private static Byte _dir_pack = 2; |
|
|
|
private static Byte _dir_pack = 2; |
|
|
|
private static Byte _addr_pack = 3; |
|
|
|
private static Byte _addr_pack = 3; |
|
|
|
@ -1393,7 +1408,7 @@ namespace PIV |
|
|
|
public static UInt16 ko_prev_dop { get => _ko_prev_dop; set => _ko_prev_dop = value; } |
|
|
|
public static UInt16 ko_prev_dop { get => _ko_prev_dop; set => _ko_prev_dop = value; } |
|
|
|
public static UInt16 CRC16; |
|
|
|
public static UInt16 CRC16; |
|
|
|
|
|
|
|
|
|
|
|
public static Byte[] Data = new Byte[85]; |
|
|
|
public static Byte[] Data = new Byte[_len_pack]; |
|
|
|
public static void MakeData() |
|
|
|
public static void MakeData() |
|
|
|
{ |
|
|
|
{ |
|
|
|
Array.Copy(BitConverter.GetBytes(Start), 0, Data, 0, 1); |
|
|
|
Array.Copy(BitConverter.GetBytes(Start), 0, Data, 0, 1); |
|
|
|
@ -1470,13 +1485,18 @@ namespace PIV |
|
|
|
Sputnik_GPS = Data[79]; |
|
|
|
Sputnik_GPS = Data[79]; |
|
|
|
Rejim_SNS = Data[80]; |
|
|
|
Rejim_SNS = Data[80]; |
|
|
|
Kod_Oshibki = BitConverter.ToUInt16(Data, 81); |
|
|
|
Kod_Oshibki = BitConverter.ToUInt16(Data, 81); |
|
|
|
CRC16 = BitConverter.ToUInt16(Data, 83); |
|
|
|
CRC16 = BitConverter.ToUInt16(Data, _len_crc); |
|
|
|
} |
|
|
|
} |
|
|
|
public static void ClearData() |
|
|
|
public static void ClearData() |
|
|
|
{ |
|
|
|
{ |
|
|
|
for (int i = 0; i < Data.Length; i++) |
|
|
|
for (int i = 0; i < Data.Length; i++) |
|
|
|
Data[i] = 0; |
|
|
|
Data[i] = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public static UInt16 CalcCRC() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return CONST.CRC16(ref Data, _len_crc); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// Новый класс пакет обмена данных ИНС от БОН |
|
|
|
/// Новый класс пакет обмена данных ИНС от БОН |
|
|
|
@ -1807,7 +1827,7 @@ namespace PIV |
|
|
|
for (int i = 0; i < Data.Length; i++) |
|
|
|
for (int i = 0; i < Data.Length; i++) |
|
|
|
Data[i] = 0; |
|
|
|
Data[i] = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// Новый класс пакет обмена данных СНС от БОН |
|
|
|
/// Новый класс пакет обмена данных СНС от БОН |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
|
|