2022-04-08 13:10:06 +05:00
|
|
|
|
using AsbCloudApp.Data.SAUB;
|
2021-10-31 16:35:09 +05:00
|
|
|
|
using ProtoBuf.Meta;
|
|
|
|
|
|
|
|
|
|
namespace AsbCloudWebApi
|
|
|
|
|
{
|
|
|
|
|
public static class ProtobufModel
|
|
|
|
|
{
|
|
|
|
|
public static void EnshureRegistered()
|
|
|
|
|
{
|
|
|
|
|
EnshureRegisteredDataSpin();
|
|
|
|
|
EnshureRegisteredDataSaub();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void EnshureRegisteredDataSpin()
|
|
|
|
|
{
|
|
|
|
|
var type = typeof(TelemetryDataSpinDto);
|
|
|
|
|
if (RuntimeTypeModel.Default.IsDefined(type))
|
|
|
|
|
return;
|
|
|
|
|
RuntimeTypeModel.Default.Add(type, false)
|
2021-11-13 18:47:11 +05:00
|
|
|
|
.Add(1, nameof(TelemetryDataSpinDto.IdTelemetry))
|
2022-04-08 13:10:06 +05:00
|
|
|
|
.Add(2, nameof(TelemetryDataSpinDto.DateTime))
|
2021-11-13 18:47:11 +05:00
|
|
|
|
.Add(3, nameof(TelemetryDataSpinDto.TopDriveSpeed))
|
|
|
|
|
.Add(4, nameof(TelemetryDataSpinDto.TopDriveSpeedMin))
|
|
|
|
|
.Add(5, nameof(TelemetryDataSpinDto.TopDriveSpeedMax))
|
|
|
|
|
.Add(6, nameof(TelemetryDataSpinDto.TopDriveSpeedOffset))
|
|
|
|
|
.Add(7, nameof(TelemetryDataSpinDto.TopDriveSpeedErr))
|
|
|
|
|
.Add(8, nameof(TelemetryDataSpinDto.TopDriveTorque))
|
|
|
|
|
.Add(9, nameof(TelemetryDataSpinDto.TopDriveTorqueMin))
|
|
|
|
|
.Add(10, nameof(TelemetryDataSpinDto.TopDriveTorqueMax))
|
|
|
|
|
.Add(11, nameof(TelemetryDataSpinDto.TopDriveTorqueOffset))
|
|
|
|
|
.Add(12, nameof(TelemetryDataSpinDto.TopDriveTorqueErr))
|
|
|
|
|
.Add(13, nameof(TelemetryDataSpinDto.TopDriveSpeedSpFrom))
|
|
|
|
|
.Add(14, nameof(TelemetryDataSpinDto.TopDriveSpeedSpFromMin))
|
|
|
|
|
.Add(15, nameof(TelemetryDataSpinDto.TopDriveSpeedSpFromMax))
|
|
|
|
|
.Add(16, nameof(TelemetryDataSpinDto.TopDriveSpeedSpFromOffset))
|
|
|
|
|
.Add(17, nameof(TelemetryDataSpinDto.TopDriveSpeedSpFromErr))
|
|
|
|
|
.Add(18, nameof(TelemetryDataSpinDto.TopDriveTorqueSpFrom))
|
|
|
|
|
.Add(19, nameof(TelemetryDataSpinDto.TopDriveTorqueSpFromMin))
|
|
|
|
|
.Add(20, nameof(TelemetryDataSpinDto.TopDriveTorqueSpFromMax))
|
|
|
|
|
.Add(21, nameof(TelemetryDataSpinDto.TopDriveTorqueSpFromOffset))
|
|
|
|
|
.Add(22, nameof(TelemetryDataSpinDto.TopDriveTorqueSpFromErr))
|
|
|
|
|
.Add(23, nameof(TelemetryDataSpinDto.TopDriveSpeedSpTo))
|
|
|
|
|
.Add(24, nameof(TelemetryDataSpinDto.TopDriveSpeedSpToMin))
|
|
|
|
|
.Add(25, nameof(TelemetryDataSpinDto.TopDriveSpeedSpToMax))
|
|
|
|
|
.Add(26, nameof(TelemetryDataSpinDto.TopDriveSpeedSpToOffset))
|
|
|
|
|
.Add(27, nameof(TelemetryDataSpinDto.TopDriveSpeedSpToErr))
|
|
|
|
|
.Add(28, nameof(TelemetryDataSpinDto.TopDriveTorqueSpTo))
|
|
|
|
|
.Add(29, nameof(TelemetryDataSpinDto.TopDriveTorqueSpToMin))
|
|
|
|
|
.Add(30, nameof(TelemetryDataSpinDto.TopDriveTorqueSpToMax))
|
|
|
|
|
.Add(31, nameof(TelemetryDataSpinDto.TopDriveTorqueSpToOffset))
|
|
|
|
|
.Add(32, nameof(TelemetryDataSpinDto.TopDriveTorqueSpToErr))
|
|
|
|
|
.Add(33, nameof(TelemetryDataSpinDto.W2800))
|
|
|
|
|
.Add(34, nameof(TelemetryDataSpinDto.W2810))
|
|
|
|
|
.Add(35, nameof(TelemetryDataSpinDto.Mode))
|
|
|
|
|
.Add(36, nameof(TelemetryDataSpinDto.W2808))
|
|
|
|
|
.Add(37, nameof(TelemetryDataSpinDto.TorqueStarting))
|
|
|
|
|
.Add(38, nameof(TelemetryDataSpinDto.RotorTorqueAvg))
|
|
|
|
|
.Add(39, nameof(TelemetryDataSpinDto.EncoderResolution))
|
|
|
|
|
.Add(40, nameof(TelemetryDataSpinDto.Ratio))
|
|
|
|
|
.Add(41, nameof(TelemetryDataSpinDto.TorqueRightLimit))
|
|
|
|
|
.Add(42, nameof(TelemetryDataSpinDto.TorqueLeftLimit))
|
|
|
|
|
.Add(43, nameof(TelemetryDataSpinDto.RevolsRightLimit))
|
|
|
|
|
.Add(44, nameof(TelemetryDataSpinDto.RevolsLeftLimit))
|
|
|
|
|
.Add(45, nameof(TelemetryDataSpinDto.SpeedRightSp))
|
|
|
|
|
.Add(46, nameof(TelemetryDataSpinDto.SpeedLeftSp))
|
|
|
|
|
.Add(47, nameof(TelemetryDataSpinDto.RevolsRightTotal))
|
|
|
|
|
.Add(48, nameof(TelemetryDataSpinDto.RevolsLeftTotal))
|
|
|
|
|
.Add(49, nameof(TelemetryDataSpinDto.TurnRightOnceByTorque))
|
|
|
|
|
.Add(50, nameof(TelemetryDataSpinDto.TurnLeftOnceByTorque))
|
|
|
|
|
.Add(51, nameof(TelemetryDataSpinDto.TurnRightOnceByAngle))
|
|
|
|
|
.Add(52, nameof(TelemetryDataSpinDto.TurnLeftOnceByAngle))
|
|
|
|
|
.Add(53, nameof(TelemetryDataSpinDto.TurnRightOnceByRevols))
|
|
|
|
|
.Add(54, nameof(TelemetryDataSpinDto.TurnLeftOnceByRevols))
|
|
|
|
|
.Add(55, nameof(TelemetryDataSpinDto.BreakAngleK))
|
|
|
|
|
.Add(56, nameof(TelemetryDataSpinDto.ReverseKTorque))
|
|
|
|
|
.Add(57, nameof(TelemetryDataSpinDto.PositionZero))
|
|
|
|
|
.Add(58, nameof(TelemetryDataSpinDto.PositionRight))
|
|
|
|
|
.Add(59, nameof(TelemetryDataSpinDto.TorqueRampTime))
|
|
|
|
|
.Add(60, nameof(TelemetryDataSpinDto.Ver))
|
|
|
|
|
.Add(61, nameof(TelemetryDataSpinDto.ReverseSpeedSpZeroTime))
|
|
|
|
|
.Add(62, nameof(TelemetryDataSpinDto.UnlockBySectorOut))
|
|
|
|
|
.Add(63, nameof(TelemetryDataSpinDto.PidMuxTorqueLeftLimit))
|
|
|
|
|
.Add(64, nameof(TelemetryDataSpinDto.State))
|
|
|
|
|
.Add(65, nameof(TelemetryDataSpinDto.BreakAngleLeft));
|
2021-10-31 16:35:09 +05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void EnshureRegisteredDataSaub()
|
|
|
|
|
{
|
|
|
|
|
var type = typeof(TelemetryDataSaubDto);
|
|
|
|
|
if (RuntimeTypeModel.Default.IsDefined(type))
|
|
|
|
|
return;
|
|
|
|
|
RuntimeTypeModel.Default.Add(type, false)
|
2021-11-13 18:47:11 +05:00
|
|
|
|
.Add(1, nameof(TelemetryDataSaubDto.IdTelemetry))
|
2022-04-08 13:10:06 +05:00
|
|
|
|
.Add(2, nameof(TelemetryDataSaubDto.DateTime))
|
2021-10-31 16:35:09 +05:00
|
|
|
|
.Add(3, nameof(TelemetryDataSaubDto.Mode))
|
2021-11-13 18:47:11 +05:00
|
|
|
|
.Add(4, nameof(TelemetryDataSaubDto.User))
|
|
|
|
|
.Add(5, nameof(TelemetryDataSaubDto.WellDepth))
|
|
|
|
|
.Add(6, nameof(TelemetryDataSaubDto.BitDepth))
|
|
|
|
|
.Add(7, nameof(TelemetryDataSaubDto.BlockPosition))
|
|
|
|
|
.Add(8, nameof(TelemetryDataSaubDto.BlockPositionMin))
|
|
|
|
|
.Add(9, nameof(TelemetryDataSaubDto.BlockPositionMax))
|
|
|
|
|
.Add(10, nameof(TelemetryDataSaubDto.BlockSpeed))
|
|
|
|
|
.Add(11, nameof(TelemetryDataSaubDto.BlockSpeedSp))
|
|
|
|
|
.Add(12, nameof(TelemetryDataSaubDto.BlockSpeedSpRotor))
|
|
|
|
|
.Add(13, nameof(TelemetryDataSaubDto.BlockSpeedSpSlide))
|
|
|
|
|
.Add(14, nameof(TelemetryDataSaubDto.BlockSpeedSpDevelop))
|
|
|
|
|
.Add(15, nameof(TelemetryDataSaubDto.Pressure))
|
|
|
|
|
.Add(16, nameof(TelemetryDataSaubDto.PressureIdle))
|
|
|
|
|
.Add(17, nameof(TelemetryDataSaubDto.PressureSp))
|
|
|
|
|
.Add(18, nameof(TelemetryDataSaubDto.PressureSpRotor))
|
|
|
|
|
.Add(19, nameof(TelemetryDataSaubDto.PressureSpSlide))
|
|
|
|
|
.Add(20, nameof(TelemetryDataSaubDto.PressureSpDevelop))
|
|
|
|
|
.Add(21, nameof(TelemetryDataSaubDto.PressureDeltaLimitMax))
|
|
|
|
|
.Add(22, nameof(TelemetryDataSaubDto.AxialLoad))
|
|
|
|
|
.Add(23, nameof(TelemetryDataSaubDto.AxialLoadSp))
|
|
|
|
|
.Add(24, nameof(TelemetryDataSaubDto.AxialLoadLimitMax))
|
|
|
|
|
.Add(25, nameof(TelemetryDataSaubDto.HookWeight))
|
|
|
|
|
.Add(26, nameof(TelemetryDataSaubDto.HookWeightIdle))
|
|
|
|
|
.Add(27, nameof(TelemetryDataSaubDto.HookWeightLimitMin))
|
|
|
|
|
.Add(28, nameof(TelemetryDataSaubDto.HookWeightLimitMax))
|
|
|
|
|
.Add(29, nameof(TelemetryDataSaubDto.RotorTorque))
|
|
|
|
|
.Add(30, nameof(TelemetryDataSaubDto.RotorTorqueIdle))
|
|
|
|
|
.Add(31, nameof(TelemetryDataSaubDto.RotorTorqueSp))
|
|
|
|
|
.Add(32, nameof(TelemetryDataSaubDto.RotorTorqueLimitMax))
|
|
|
|
|
.Add(33, nameof(TelemetryDataSaubDto.RotorSpeed))
|
|
|
|
|
.Add(34, nameof(TelemetryDataSaubDto.Flow))
|
|
|
|
|
.Add(35, nameof(TelemetryDataSaubDto.FlowIdle))
|
|
|
|
|
.Add(36, nameof(TelemetryDataSaubDto.FlowDeltaLimitMax))
|
|
|
|
|
.Add(37, nameof(TelemetryDataSaubDto.IdFeedRegulator))
|
2022-03-10 17:18:30 +05:00
|
|
|
|
.Add(38, nameof(TelemetryDataSaubDto.MseState))
|
|
|
|
|
.Add(39, nameof(TelemetryDataSaubDto.Mse));
|
2021-10-31 16:35:09 +05:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|