From f19e2e305d8baeafc30dde4fc0aa3fa37038869c Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Mon, 9 Apr 2018 14:24:42 +0300 Subject: Update dancer config --- .../PMR/Common/MessageType.pb-c.c | 108 +++--- .../PMR/Common/MessageType.pb-c.h | 4 + .../PMR/Diagnostics/EventType.pb-c.c | 18 +- .../PMR/Diagnostics/EventType.pb-c.h | 4 +- .../PMR/Hardware/HardwarePidControl.pb-c.c | 60 +++- .../PMR/Hardware/HardwarePidControl.pb-c.h | 34 +- .../PMR/Stubs/StubMotorHomeMarkRequest.pb-c.c | 105 ++++++ .../PMR/Stubs/StubMotorHomeMarkRequest.pb-c.h | 77 ++++ .../PMR/Stubs/StubMotorHomeMarkResponse.pb-c.c | 105 ++++++ .../PMR/Stubs/StubMotorHomeMarkResponse.pb-c.h | 74 ++++ .../PMR/Stubs/StubMotorRunStepTickRequest.pb-c.c | 118 +++++++ .../PMR/Stubs/StubMotorRunStepTickRequest.pb-c.h | 76 ++++ .../PMR/Stubs/StubMotorRunStepTickResponse.pb-c.c | 183 ++++++++++ .../PMR/Stubs/StubMotorRunStepTickResponse.pb-c.h | 92 +++++ .../twine_usblib_demo/Stubs_Handler/Container.c | 8 + .../twine_usblib_demo/Stubs_Handler/DataDef.h | 6 + .../twine_usblib_demo/Stubs_Handler/Stub_Motor.c | 114 ++++++ .../twine_usblib_demo/Stubs_Handler/Stub_Motor.h | 3 +- .../drivers/Danser_SSI/SSI_Comm.c | 50 ++- .../twine_usblib_demo/drivers/SPI/SPI_Comm.c | 20 +- Software/Code_Composer/twine_usblib_demo/main.c | 2 +- Software/PMR/Messages/Common/MessageType.proto | 5 + .../Messages/Stubs/StubMotorHomeMarkRequest.proto | 10 + .../Messages/Stubs/StubMotorHomeMarkResponse.proto | 11 + .../Stubs/StubMotorRunStepTickRequest.proto | 11 + .../Stubs/StubMotorRunStepTickResponse.proto | 17 + .../Visual_Studio/Tango.PMR/Common/MessageType.cs | 73 ++-- .../Tango.PMR/Diagnostics/EventType.cs | 17 +- .../Tango.PMR/Hardware/HardwarePidControl.cs | 392 ++++++++++++--------- .../Tango.PMR/Stubs/StubMotorHomeMarkRequest.cs | 191 ++++++++++ .../Tango.PMR/Stubs/StubMotorHomeMarkResponse.cs | 188 ++++++++++ .../Tango.PMR/Stubs/StubMotorRunStepTickRequest.cs | 216 ++++++++++++ .../Stubs/StubMotorRunStepTickResponse.cs | 365 +++++++++++++++++++ 33 files changed, 2439 insertions(+), 318 deletions(-) create mode 100644 Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorHomeMarkRequest.pb-c.c create mode 100644 Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorHomeMarkRequest.pb-c.h create mode 100644 Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorHomeMarkResponse.pb-c.c create mode 100644 Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorHomeMarkResponse.pb-c.h create mode 100644 Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunStepTickRequest.pb-c.c create mode 100644 Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunStepTickRequest.pb-c.h create mode 100644 Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunStepTickResponse.pb-c.c create mode 100644 Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunStepTickResponse.pb-c.h create mode 100644 Software/PMR/Messages/Stubs/StubMotorHomeMarkRequest.proto create mode 100644 Software/PMR/Messages/Stubs/StubMotorHomeMarkResponse.proto create mode 100644 Software/PMR/Messages/Stubs/StubMotorRunStepTickRequest.proto create mode 100644 Software/PMR/Messages/Stubs/StubMotorRunStepTickResponse.proto create mode 100644 Software/Visual_Studio/Tango.PMR/Stubs/StubMotorHomeMarkRequest.cs create mode 100644 Software/Visual_Studio/Tango.PMR/Stubs/StubMotorHomeMarkResponse.cs create mode 100644 Software/Visual_Studio/Tango.PMR/Stubs/StubMotorRunStepTickRequest.cs create mode 100644 Software/Visual_Studio/Tango.PMR/Stubs/StubMotorRunStepTickResponse.cs diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Common/MessageType.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Common/MessageType.pb-c.c index 78ba96d77..45ba5c5b9 100644 --- a/Software/Code_Composer/twine_usblib_demo/PMR/Common/MessageType.pb-c.c +++ b/Software/Code_Composer/twine_usblib_demo/PMR/Common/MessageType.pb-c.c @@ -7,7 +7,7 @@ #endif #include "MessageType.pb-c.h" -static const ProtobufCEnumValue message_type__enum_values_by_number[110] = +static const ProtobufCEnumValue message_type__enum_values_by_number[114] = { { "None", "MESSAGE_TYPE__None", 0 }, { "CalculateRequest", "MESSAGE_TYPE__CalculateRequest", 3 }, @@ -74,6 +74,10 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[110] = { "StubHeatingTestPollResponse", "MESSAGE_TYPE__StubHeatingTestPollResponse", 64 }, { "StubMotorRequest", "MESSAGE_TYPE__StubMotorRequest", 65 }, { "StubMotorResponse", "MESSAGE_TYPE__StubMotorResponse", 66 }, + { "StubMotorHomeMarkRequest", "MESSAGE_TYPE__StubMotorHomeMarkRequest", 67 }, + { "StubMotorHomeMarkResponse", "MESSAGE_TYPE__StubMotorHomeMarkResponse", 68 }, + { "StubMotorRunStepTickRequest", "MESSAGE_TYPE__StubMotorRunStepTickRequest", 69 }, + { "StubMotorRunStepTickResponse", "MESSAGE_TYPE__StubMotorRunStepTickResponse", 70 }, { "ExternalBridgeUdpDiscoveryPacket", "MESSAGE_TYPE__ExternalBridgeUdpDiscoveryPacket", 1000 }, { "ExternalClientLoginRequest", "MESSAGE_TYPE__ExternalClientLoginRequest", 1001 }, { "ExternalClientLoginResponse", "MESSAGE_TYPE__ExternalClientLoginResponse", 1002 }, @@ -121,52 +125,52 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[110] = { "UploadHardwareConfigurationResponse", "MESSAGE_TYPE__UploadHardwareConfigurationResponse", 5001 }, }; static const ProtobufCIntRange message_type__value_ranges[] = { -{0, 0},{3, 1},{1000, 65},{2000, 74},{3000, 100},{4000, 106},{5000, 108},{0, 110} +{0, 0},{3, 1},{1000, 69},{2000, 78},{3000, 104},{4000, 110},{5000, 112},{0, 114} }; -static const ProtobufCEnumValueIndex message_type__enum_values_by_name[110] = +static const ProtobufCEnumValueIndex message_type__enum_values_by_name[114] = { - { "AbortJobRequest", 102 }, - { "AbortJobResponse", 103 }, + { "AbortJobRequest", 106 }, + { "AbortJobResponse", 107 }, { "CalculateRequest", 1 }, { "CalculateResponse", 2 }, - { "DebugLogRequest", 106 }, - { "DebugLogResponse", 107 }, - { "DirectSynchronizationRequest", 68 }, - { "DirectSynchronizationResponse", 69 }, - { "DispenserAbortHomingRequest", 84 }, - { "DispenserAbortHomingResponse", 85 }, - { "DispenserAbortJoggingRequest", 90 }, - { "DispenserAbortJoggingResponse", 91 }, - { "DispenserHomingRequest", 86 }, - { "DispenserHomingResponse", 87 }, - { "DispenserJoggingRequest", 88 }, - { "DispenserJoggingResponse", 89 }, - { "ExternalBridgeUdpDiscoveryPacket", 65 }, - { "ExternalClientLoginRequest", 66 }, - { "ExternalClientLoginResponse", 67 }, - { "JobRequest", 100 }, - { "JobResponse", 101 }, - { "KeepAliveRequest", 72 }, - { "KeepAliveResponse", 73 }, - { "MotorAbortHomingRequest", 76 }, - { "MotorAbortHomingResponse", 77 }, - { "MotorAbortJoggingRequest", 82 }, - { "MotorAbortJoggingResponse", 83 }, - { "MotorHomingRequest", 78 }, - { "MotorHomingResponse", 79 }, - { "MotorJoggingRequest", 80 }, - { "MotorJoggingResponse", 81 }, + { "DebugLogRequest", 110 }, + { "DebugLogResponse", 111 }, + { "DirectSynchronizationRequest", 72 }, + { "DirectSynchronizationResponse", 73 }, + { "DispenserAbortHomingRequest", 88 }, + { "DispenserAbortHomingResponse", 89 }, + { "DispenserAbortJoggingRequest", 94 }, + { "DispenserAbortJoggingResponse", 95 }, + { "DispenserHomingRequest", 90 }, + { "DispenserHomingResponse", 91 }, + { "DispenserJoggingRequest", 92 }, + { "DispenserJoggingResponse", 93 }, + { "ExternalBridgeUdpDiscoveryPacket", 69 }, + { "ExternalClientLoginRequest", 70 }, + { "ExternalClientLoginResponse", 71 }, + { "JobRequest", 104 }, + { "JobResponse", 105 }, + { "KeepAliveRequest", 76 }, + { "KeepAliveResponse", 77 }, + { "MotorAbortHomingRequest", 80 }, + { "MotorAbortHomingResponse", 81 }, + { "MotorAbortJoggingRequest", 86 }, + { "MotorAbortJoggingResponse", 87 }, + { "MotorHomingRequest", 82 }, + { "MotorHomingResponse", 83 }, + { "MotorJoggingRequest", 84 }, + { "MotorJoggingResponse", 85 }, { "None", 0 }, - { "OverrideDataBaseRequest", 70 }, - { "OverrideDataBaseResponse", 71 }, + { "OverrideDataBaseRequest", 74 }, + { "OverrideDataBaseResponse", 75 }, { "ProgressRequest", 3 }, { "ProgressResponse", 4 }, - { "PushDiagnosticsRequest", 74 }, - { "PushDiagnosticsResponse", 75 }, - { "SetComponentValueRequest", 98 }, - { "SetComponentValueResponse", 99 }, - { "SetDigitalOutRequest", 92 }, - { "SetDigitalOutResponse", 93 }, + { "PushDiagnosticsRequest", 78 }, + { "PushDiagnosticsResponse", 79 }, + { "SetComponentValueRequest", 102 }, + { "SetComponentValueResponse", 103 }, + { "SetDigitalOutRequest", 96 }, + { "SetDigitalOutResponse", 97 }, { "StubCartridgeReadRequest", 5 }, { "StubCartridgeReadResponse", 6 }, { "StubCartridgeWriteRequest", 7 }, @@ -205,6 +209,8 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[110] = { "StubL6470DriverResponse", 40 }, { "StubMotorEncoderRequest", 23 }, { "StubMotorEncoderResponse", 24 }, + { "StubMotorHomeMarkRequest", 65 }, + { "StubMotorHomeMarkResponse", 66 }, { "StubMotorInitRequest", 41 }, { "StubMotorInitResponse", 42 }, { "StubMotorMovRequest", 49 }, @@ -215,6 +221,8 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[110] = { "StubMotorResponse", 64 }, { "StubMotorRunRequest", 43 }, { "StubMotorRunResponse", 44 }, + { "StubMotorRunStepTickRequest", 67 }, + { "StubMotorRunStepTickResponse", 68 }, { "StubMotorSpeedRequest", 51 }, { "StubMotorSpeedResponse", 52 }, { "StubMotorStatusRequest", 47 }, @@ -227,14 +235,14 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[110] = { "StubSteperMotorResponse", 28 }, { "StubValveRequest", 29 }, { "StubValveResponse", 30 }, - { "ThreadAbortJoggingRequest", 96 }, - { "ThreadAbortJoggingResponse", 97 }, - { "ThreadJoggingRequest", 94 }, - { "ThreadJoggingResponse", 95 }, - { "UploadHardwareConfigurationRequest", 108 }, - { "UploadHardwareConfigurationResponse", 109 }, - { "UploadProcessParametersRequest", 104 }, - { "UploadProcessParametersResponse", 105 }, + { "ThreadAbortJoggingRequest", 100 }, + { "ThreadAbortJoggingResponse", 101 }, + { "ThreadJoggingRequest", 98 }, + { "ThreadJoggingResponse", 99 }, + { "UploadHardwareConfigurationRequest", 112 }, + { "UploadHardwareConfigurationResponse", 113 }, + { "UploadProcessParametersRequest", 108 }, + { "UploadProcessParametersResponse", 109 }, }; const ProtobufCEnumDescriptor message_type__descriptor = { @@ -243,9 +251,9 @@ const ProtobufCEnumDescriptor message_type__descriptor = "MessageType", "MessageType", "", - 110, + 114, message_type__enum_values_by_number, - 110, + 114, message_type__enum_values_by_name, 7, message_type__value_ranges, diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Common/MessageType.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Common/MessageType.pb-c.h index fdc8f18ba..387a5eb1d 100644 --- a/Software/Code_Composer/twine_usblib_demo/PMR/Common/MessageType.pb-c.h +++ b/Software/Code_Composer/twine_usblib_demo/PMR/Common/MessageType.pb-c.h @@ -85,6 +85,10 @@ typedef enum _MessageType { MESSAGE_TYPE__StubHeatingTestPollResponse = 64, MESSAGE_TYPE__StubMotorRequest = 65, MESSAGE_TYPE__StubMotorResponse = 66, + MESSAGE_TYPE__StubMotorHomeMarkRequest = 67, + MESSAGE_TYPE__StubMotorHomeMarkResponse = 68, + MESSAGE_TYPE__StubMotorRunStepTickRequest = 69, + MESSAGE_TYPE__StubMotorRunStepTickResponse = 70, MESSAGE_TYPE__ExternalBridgeUdpDiscoveryPacket = 1000, MESSAGE_TYPE__ExternalClientLoginRequest = 1001, MESSAGE_TYPE__ExternalClientLoginResponse = 1002, diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Diagnostics/EventType.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Diagnostics/EventType.pb-c.c index cf6300148..bd3bc7fd6 100644 --- a/Software/Code_Composer/twine_usblib_demo/PMR/Diagnostics/EventType.pb-c.c +++ b/Software/Code_Composer/twine_usblib_demo/PMR/Diagnostics/EventType.pb-c.c @@ -7,7 +7,7 @@ #endif #include "EventType.pb-c.h" -static const ProtobufCEnumValue event_type__enum_values_by_number[34] = +static const ProtobufCEnumValue event_type__enum_values_by_number[36] = { { "ThreadBreak", "EVENT_TYPE__ThreadBreak", 0 }, { "ThreadTensionControlFailure", "EVENT_TYPE__ThreadTensionControlFailure", 1 }, @@ -42,17 +42,21 @@ static const ProtobufCEnumValue event_type__enum_values_by_number[34] = { "ResponseReceived", "EVENT_TYPE__ResponseReceived", 30 }, { "RequestFailed", "EVENT_TYPE__RequestFailed", 31 }, { "ApplicationException", "EVENT_TYPE__ApplicationException", 32 }, - { "ApplicationInformation", "EVENT_TYPE__ApplicationInformation", 34 }, + { "ApplicationInformation", "EVENT_TYPE__ApplicationInformation", 33 }, + { "ApplicationStarted", "EVENT_TYPE__ApplicationStarted", 34 }, + { "ApplicationTerminated", "EVENT_TYPE__ApplicationTerminated", 35 }, }; static const ProtobufCIntRange event_type__value_ranges[] = { -{0, 0},{34, 33},{0, 34} +{0, 0},{0, 36} }; -static const ProtobufCEnumValueIndex event_type__enum_values_by_name[34] = +static const ProtobufCEnumValueIndex event_type__enum_values_by_name[36] = { { "AirFilterClogged", 13 }, { "AirFilterNotInstalled", 14 }, { "ApplicationException", 32 }, { "ApplicationInformation", 33 }, + { "ApplicationStarted", 34 }, + { "ApplicationTerminated", 35 }, { "DHThermalCutoff", 7 }, { "DispenserEmpty", 18 }, { "DispenserLowLevel", 19 }, @@ -91,11 +95,11 @@ const ProtobufCEnumDescriptor event_type__descriptor = "EventType", "EventType", "", - 34, + 36, event_type__enum_values_by_number, - 34, + 36, event_type__enum_values_by_name, - 2, + 1, event_type__value_ranges, NULL,NULL,NULL,NULL /* reserved[1234] */ }; diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Diagnostics/EventType.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Diagnostics/EventType.pb-c.h index 0fbfc6914..c6bd394cf 100644 --- a/Software/Code_Composer/twine_usblib_demo/PMR/Diagnostics/EventType.pb-c.h +++ b/Software/Code_Composer/twine_usblib_demo/PMR/Diagnostics/EventType.pb-c.h @@ -53,7 +53,9 @@ typedef enum _EventType { EVENT_TYPE__ResponseReceived = 30, EVENT_TYPE__RequestFailed = 31, EVENT_TYPE__ApplicationException = 32, - EVENT_TYPE__ApplicationInformation = 34 + EVENT_TYPE__ApplicationInformation = 33, + EVENT_TYPE__ApplicationStarted = 34, + EVENT_TYPE__ApplicationTerminated = 35 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(EVENT_TYPE) } EventType; diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Hardware/HardwarePidControl.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Hardware/HardwarePidControl.pb-c.c index 8eb96d16d..9826afdda 100644 --- a/Software/Code_Composer/twine_usblib_demo/PMR/Hardware/HardwarePidControl.pb-c.c +++ b/Software/Code_Composer/twine_usblib_demo/PMR/Hardware/HardwarePidControl.pb-c.c @@ -52,7 +52,7 @@ void hardware_pid_control__free_unpacked assert(message->base.descriptor == &hardware_pid_control__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } -static const ProtobufCFieldDescriptor hardware_pid_control__field_descriptors[15] = +static const ProtobufCFieldDescriptor hardware_pid_control__field_descriptors[17] = { { "HardwarePidControlType", @@ -70,7 +70,7 @@ static const ProtobufCFieldDescriptor hardware_pid_control__field_descriptors[15 "OutputProportionalPowerLimit", 2, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, + PROTOBUF_C_TYPE_DOUBLE, offsetof(HardwarePidControl, has_outputproportionalpowerlimit), offsetof(HardwarePidControl, outputproportionalpowerlimit), NULL, @@ -82,7 +82,7 @@ static const ProtobufCFieldDescriptor hardware_pid_control__field_descriptors[15 "OutputProportionalBand", 3, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, + PROTOBUF_C_TYPE_DOUBLE, offsetof(HardwarePidControl, has_outputproportionalband), offsetof(HardwarePidControl, outputproportionalband), NULL, @@ -94,7 +94,7 @@ static const ProtobufCFieldDescriptor hardware_pid_control__field_descriptors[15 "IntegralTime", 4, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, + PROTOBUF_C_TYPE_DOUBLE, offsetof(HardwarePidControl, has_integraltime), offsetof(HardwarePidControl, integraltime), NULL, @@ -106,7 +106,7 @@ static const ProtobufCFieldDescriptor hardware_pid_control__field_descriptors[15 "DerivativeTime", 5, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, + PROTOBUF_C_TYPE_DOUBLE, offsetof(HardwarePidControl, has_derivativetime), offsetof(HardwarePidControl, derivativetime), NULL, @@ -118,7 +118,7 @@ static const ProtobufCFieldDescriptor hardware_pid_control__field_descriptors[15 "SensorCorrectionAdjustment", 6, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, + PROTOBUF_C_TYPE_DOUBLE, offsetof(HardwarePidControl, has_sensorcorrectionadjustment), offsetof(HardwarePidControl, sensorcorrectionadjustment), NULL, @@ -130,7 +130,7 @@ static const ProtobufCFieldDescriptor hardware_pid_control__field_descriptors[15 "SensorMinValue", 7, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, + PROTOBUF_C_TYPE_DOUBLE, offsetof(HardwarePidControl, has_sensorminvalue), offsetof(HardwarePidControl, sensorminvalue), NULL, @@ -142,7 +142,7 @@ static const ProtobufCFieldDescriptor hardware_pid_control__field_descriptors[15 "SensorMaxValue", 8, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, + PROTOBUF_C_TYPE_DOUBLE, offsetof(HardwarePidControl, has_sensormaxvalue), offsetof(HardwarePidControl, sensormaxvalue), NULL, @@ -154,7 +154,7 @@ static const ProtobufCFieldDescriptor hardware_pid_control__field_descriptors[15 "SetPointRampRateorSoftStartRamp", 9, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, + PROTOBUF_C_TYPE_DOUBLE, offsetof(HardwarePidControl, has_setpointramprateorsoftstartramp), offsetof(HardwarePidControl, setpointramprateorsoftstartramp), NULL, @@ -166,7 +166,7 @@ static const ProtobufCFieldDescriptor hardware_pid_control__field_descriptors[15 "SetPointControlOutputRate", 10, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, + PROTOBUF_C_TYPE_DOUBLE, offsetof(HardwarePidControl, has_setpointcontroloutputrate), offsetof(HardwarePidControl, setpointcontroloutputrate), NULL, @@ -178,7 +178,7 @@ static const ProtobufCFieldDescriptor hardware_pid_control__field_descriptors[15 "ControlOutputType", 11, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, + PROTOBUF_C_TYPE_DOUBLE, offsetof(HardwarePidControl, has_controloutputtype), offsetof(HardwarePidControl, controloutputtype), NULL, @@ -190,7 +190,7 @@ static const ProtobufCFieldDescriptor hardware_pid_control__field_descriptors[15 "SsrControlOutputType", 12, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, + PROTOBUF_C_TYPE_DOUBLE, offsetof(HardwarePidControl, has_ssrcontroloutputtype), offsetof(HardwarePidControl, ssrcontroloutputtype), NULL, @@ -202,7 +202,7 @@ static const ProtobufCFieldDescriptor hardware_pid_control__field_descriptors[15 "OutputOnOffHysteresisValue", 13, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, + PROTOBUF_C_TYPE_DOUBLE, offsetof(HardwarePidControl, has_outputonoffhysteresisvalue), offsetof(HardwarePidControl, outputonoffhysteresisvalue), NULL, @@ -214,7 +214,7 @@ static const ProtobufCFieldDescriptor hardware_pid_control__field_descriptors[15 "ProcessVariableSamplingRate", 14, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, + PROTOBUF_C_TYPE_DOUBLE, offsetof(HardwarePidControl, has_processvariablesamplingrate), offsetof(HardwarePidControl, processvariablesamplingrate), NULL, @@ -226,7 +226,7 @@ static const ProtobufCFieldDescriptor hardware_pid_control__field_descriptors[15 "PvInputFilterFactorMode", 15, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, + PROTOBUF_C_TYPE_DOUBLE, offsetof(HardwarePidControl, has_pvinputfilterfactormode), offsetof(HardwarePidControl, pvinputfilterfactormode), NULL, @@ -234,14 +234,40 @@ static const ProtobufCFieldDescriptor hardware_pid_control__field_descriptors[15 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, + { + "OutputProportionalCycleTime", + 16, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT32, + offsetof(HardwarePidControl, has_outputproportionalcycletime), + offsetof(HardwarePidControl, outputproportionalcycletime), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "AcHeatersHalfCycleTime", + 17, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT32, + offsetof(HardwarePidControl, has_acheatershalfcycletime), + offsetof(HardwarePidControl, acheatershalfcycletime), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned hardware_pid_control__field_indices_by_name[] = { + 16, /* field[16] = AcHeatersHalfCycleTime */ 10, /* field[10] = ControlOutputType */ 4, /* field[4] = DerivativeTime */ 0, /* field[0] = HardwarePidControlType */ 3, /* field[3] = IntegralTime */ 12, /* field[12] = OutputOnOffHysteresisValue */ 2, /* field[2] = OutputProportionalBand */ + 15, /* field[15] = OutputProportionalCycleTime */ 1, /* field[1] = OutputProportionalPowerLimit */ 13, /* field[13] = ProcessVariableSamplingRate */ 14, /* field[14] = PvInputFilterFactorMode */ @@ -255,7 +281,7 @@ static const unsigned hardware_pid_control__field_indices_by_name[] = { static const ProtobufCIntRange hardware_pid_control__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 15 } + { 0, 17 } }; const ProtobufCMessageDescriptor hardware_pid_control__descriptor = { @@ -265,7 +291,7 @@ const ProtobufCMessageDescriptor hardware_pid_control__descriptor = "HardwarePidControl", "", sizeof(HardwarePidControl), - 15, + 17, hardware_pid_control__field_descriptors, hardware_pid_control__field_indices_by_name, 1, hardware_pid_control__number_ranges, diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Hardware/HardwarePidControl.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Hardware/HardwarePidControl.pb-c.h index 2a316b5ab..b012fb377 100644 --- a/Software/Code_Composer/twine_usblib_demo/PMR/Hardware/HardwarePidControl.pb-c.h +++ b/Software/Code_Composer/twine_usblib_demo/PMR/Hardware/HardwarePidControl.pb-c.h @@ -30,37 +30,41 @@ struct _HardwarePidControl protobuf_c_boolean has_hardwarepidcontroltype; HardwarePidControlType hardwarepidcontroltype; protobuf_c_boolean has_outputproportionalpowerlimit; - int32_t outputproportionalpowerlimit; + double outputproportionalpowerlimit; protobuf_c_boolean has_outputproportionalband; - int32_t outputproportionalband; + double outputproportionalband; protobuf_c_boolean has_integraltime; - int32_t integraltime; + double integraltime; protobuf_c_boolean has_derivativetime; - int32_t derivativetime; + double derivativetime; protobuf_c_boolean has_sensorcorrectionadjustment; - int32_t sensorcorrectionadjustment; + double sensorcorrectionadjustment; protobuf_c_boolean has_sensorminvalue; - int32_t sensorminvalue; + double sensorminvalue; protobuf_c_boolean has_sensormaxvalue; - int32_t sensormaxvalue; + double sensormaxvalue; protobuf_c_boolean has_setpointramprateorsoftstartramp; - int32_t setpointramprateorsoftstartramp; + double setpointramprateorsoftstartramp; protobuf_c_boolean has_setpointcontroloutputrate; - int32_t setpointcontroloutputrate; + double setpointcontroloutputrate; protobuf_c_boolean has_controloutputtype; - int32_t controloutputtype; + double controloutputtype; protobuf_c_boolean has_ssrcontroloutputtype; - int32_t ssrcontroloutputtype; + double ssrcontroloutputtype; protobuf_c_boolean has_outputonoffhysteresisvalue; - int32_t outputonoffhysteresisvalue; + double outputonoffhysteresisvalue; protobuf_c_boolean has_processvariablesamplingrate; - int32_t processvariablesamplingrate; + double processvariablesamplingrate; protobuf_c_boolean has_pvinputfilterfactormode; - int32_t pvinputfilterfactormode; + double pvinputfilterfactormode; + protobuf_c_boolean has_outputproportionalcycletime; + int32_t outputproportionalcycletime; + protobuf_c_boolean has_acheatershalfcycletime; + int32_t acheatershalfcycletime; }; #define HARDWARE_PID_CONTROL__INIT \ { PROTOBUF_C_MESSAGE_INIT (&hardware_pid_control__descriptor) \ - , 0, HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + , 0, HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } /* HardwarePidControl methods */ diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorHomeMarkRequest.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorHomeMarkRequest.pb-c.c new file mode 100644 index 000000000..fbfe0ab08 --- /dev/null +++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorHomeMarkRequest.pb-c.c @@ -0,0 +1,105 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StubMotorHomeMarkRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "StubMotorHomeMarkRequest.pb-c.h" +void stub_motor_home_mark_request__init + (StubMotorHomeMarkRequest *message) +{ + static const StubMotorHomeMarkRequest init_value = STUB_MOTOR_HOME_MARK_REQUEST__INIT; + *message = init_value; +} +size_t stub_motor_home_mark_request__get_packed_size + (const StubMotorHomeMarkRequest *message) +{ + assert(message->base.descriptor == &stub_motor_home_mark_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t stub_motor_home_mark_request__pack + (const StubMotorHomeMarkRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &stub_motor_home_mark_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t stub_motor_home_mark_request__pack_to_buffer + (const StubMotorHomeMarkRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &stub_motor_home_mark_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +StubMotorHomeMarkRequest * + stub_motor_home_mark_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (StubMotorHomeMarkRequest *) + protobuf_c_message_unpack (&stub_motor_home_mark_request__descriptor, + allocator, len, data); +} +void stub_motor_home_mark_request__free_unpacked + (StubMotorHomeMarkRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &stub_motor_home_mark_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor stub_motor_home_mark_request__field_descriptors[2] = +{ + { + "Motor_ID", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(StubMotorHomeMarkRequest, has_motor_id), + offsetof(StubMotorHomeMarkRequest, motor_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "Set_Home_Mark_GO_Home_Mark", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(StubMotorHomeMarkRequest, has_set_home_mark_go_home_mark), + offsetof(StubMotorHomeMarkRequest, set_home_mark_go_home_mark), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned stub_motor_home_mark_request__field_indices_by_name[] = { + 0, /* field[0] = Motor_ID */ + 1, /* field[1] = Set_Home_Mark_GO_Home_Mark */ +}; +static const ProtobufCIntRange stub_motor_home_mark_request__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor stub_motor_home_mark_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "StubMotorHomeMarkRequest", + "StubMotorHomeMarkRequest", + "StubMotorHomeMarkRequest", + "", + sizeof(StubMotorHomeMarkRequest), + 2, + stub_motor_home_mark_request__field_descriptors, + stub_motor_home_mark_request__field_indices_by_name, + 1, stub_motor_home_mark_request__number_ranges, + (ProtobufCMessageInit) stub_motor_home_mark_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorHomeMarkRequest.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorHomeMarkRequest.pb-c.h new file mode 100644 index 000000000..401241e76 --- /dev/null +++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorHomeMarkRequest.pb-c.h @@ -0,0 +1,77 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StubMotorHomeMarkRequest.proto */ + +#ifndef PROTOBUF_C_StubMotorHomeMarkRequest_2eproto__INCLUDED +#define PROTOBUF_C_StubMotorHomeMarkRequest_2eproto__INCLUDED + +#include + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + + +typedef struct _StubMotorHomeMarkRequest StubMotorHomeMarkRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _StubMotorHomeMarkRequest +{ + ProtobufCMessage base; + protobuf_c_boolean has_motor_id; + uint32_t motor_id; + /* + * 0..3 + */ + protobuf_c_boolean has_set_home_mark_go_home_mark; + uint32_t set_home_mark_go_home_mark; +}; +#define STUB_MOTOR_HOME_MARK_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&stub_motor_home_mark_request__descriptor) \ + , 0, 0, 0, 0 } + + +/* StubMotorHomeMarkRequest methods */ +void stub_motor_home_mark_request__init + (StubMotorHomeMarkRequest *message); +size_t stub_motor_home_mark_request__get_packed_size + (const StubMotorHomeMarkRequest *message); +size_t stub_motor_home_mark_request__pack + (const StubMotorHomeMarkRequest *message, + uint8_t *out); +size_t stub_motor_home_mark_request__pack_to_buffer + (const StubMotorHomeMarkRequest *message, + ProtobufCBuffer *buffer); +StubMotorHomeMarkRequest * + stub_motor_home_mark_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void stub_motor_home_mark_request__free_unpacked + (StubMotorHomeMarkRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*StubMotorHomeMarkRequest_Closure) + (const StubMotorHomeMarkRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor stub_motor_home_mark_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_StubMotorHomeMarkRequest_2eproto__INCLUDED */ diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorHomeMarkResponse.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorHomeMarkResponse.pb-c.c new file mode 100644 index 000000000..65f1b899f --- /dev/null +++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorHomeMarkResponse.pb-c.c @@ -0,0 +1,105 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StubMotorHomeMarkResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "StubMotorHomeMarkResponse.pb-c.h" +void stub_motor_home_mark_response__init + (StubMotorHomeMarkResponse *message) +{ + static const StubMotorHomeMarkResponse init_value = STUB_MOTOR_HOME_MARK_RESPONSE__INIT; + *message = init_value; +} +size_t stub_motor_home_mark_response__get_packed_size + (const StubMotorHomeMarkResponse *message) +{ + assert(message->base.descriptor == &stub_motor_home_mark_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t stub_motor_home_mark_response__pack + (const StubMotorHomeMarkResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &stub_motor_home_mark_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t stub_motor_home_mark_response__pack_to_buffer + (const StubMotorHomeMarkResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &stub_motor_home_mark_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +StubMotorHomeMarkResponse * + stub_motor_home_mark_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (StubMotorHomeMarkResponse *) + protobuf_c_message_unpack (&stub_motor_home_mark_response__descriptor, + allocator, len, data); +} +void stub_motor_home_mark_response__free_unpacked + (StubMotorHomeMarkResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &stub_motor_home_mark_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor stub_motor_home_mark_response__field_descriptors[2] = +{ + { + "Motor_ID", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(StubMotorHomeMarkResponse, has_motor_id), + offsetof(StubMotorHomeMarkResponse, motor_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "Position", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(StubMotorHomeMarkResponse, has_position), + offsetof(StubMotorHomeMarkResponse, position), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned stub_motor_home_mark_response__field_indices_by_name[] = { + 0, /* field[0] = Motor_ID */ + 1, /* field[1] = Position */ +}; +static const ProtobufCIntRange stub_motor_home_mark_response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor stub_motor_home_mark_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "StubMotorHomeMarkResponse", + "StubMotorHomeMarkResponse", + "StubMotorHomeMarkResponse", + "", + sizeof(StubMotorHomeMarkResponse), + 2, + stub_motor_home_mark_response__field_descriptors, + stub_motor_home_mark_response__field_indices_by_name, + 1, stub_motor_home_mark_response__number_ranges, + (ProtobufCMessageInit) stub_motor_home_mark_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorHomeMarkResponse.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorHomeMarkResponse.pb-c.h new file mode 100644 index 000000000..431e62d4b --- /dev/null +++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorHomeMarkResponse.pb-c.h @@ -0,0 +1,74 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StubMotorHomeMarkResponse.proto */ + +#ifndef PROTOBUF_C_StubMotorHomeMarkResponse_2eproto__INCLUDED +#define PROTOBUF_C_StubMotorHomeMarkResponse_2eproto__INCLUDED + +#include + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + + +typedef struct _StubMotorHomeMarkResponse StubMotorHomeMarkResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _StubMotorHomeMarkResponse +{ + ProtobufCMessage base; + protobuf_c_boolean has_motor_id; + uint32_t motor_id; + protobuf_c_boolean has_position; + uint32_t position; +}; +#define STUB_MOTOR_HOME_MARK_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&stub_motor_home_mark_response__descriptor) \ + , 0, 0, 0, 0 } + + +/* StubMotorHomeMarkResponse methods */ +void stub_motor_home_mark_response__init + (StubMotorHomeMarkResponse *message); +size_t stub_motor_home_mark_response__get_packed_size + (const StubMotorHomeMarkResponse *message); +size_t stub_motor_home_mark_response__pack + (const StubMotorHomeMarkResponse *message, + uint8_t *out); +size_t stub_motor_home_mark_response__pack_to_buffer + (const StubMotorHomeMarkResponse *message, + ProtobufCBuffer *buffer); +StubMotorHomeMarkResponse * + stub_motor_home_mark_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void stub_motor_home_mark_response__free_unpacked + (StubMotorHomeMarkResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*StubMotorHomeMarkResponse_Closure) + (const StubMotorHomeMarkResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor stub_motor_home_mark_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_StubMotorHomeMarkResponse_2eproto__INCLUDED */ diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunStepTickRequest.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunStepTickRequest.pb-c.c new file mode 100644 index 000000000..80a362034 --- /dev/null +++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunStepTickRequest.pb-c.c @@ -0,0 +1,118 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StubMotorRunStepTickRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "StubMotorRunStepTickRequest.pb-c.h" +void stub_motor_run_step_tick_request__init + (StubMotorRunStepTickRequest *message) +{ + static const StubMotorRunStepTickRequest init_value = STUB_MOTOR_RUN_STEP_TICK_REQUEST__INIT; + *message = init_value; +} +size_t stub_motor_run_step_tick_request__get_packed_size + (const StubMotorRunStepTickRequest *message) +{ + assert(message->base.descriptor == &stub_motor_run_step_tick_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t stub_motor_run_step_tick_request__pack + (const StubMotorRunStepTickRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &stub_motor_run_step_tick_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t stub_motor_run_step_tick_request__pack_to_buffer + (const StubMotorRunStepTickRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &stub_motor_run_step_tick_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +StubMotorRunStepTickRequest * + stub_motor_run_step_tick_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (StubMotorRunStepTickRequest *) + protobuf_c_message_unpack (&stub_motor_run_step_tick_request__descriptor, + allocator, len, data); +} +void stub_motor_run_step_tick_request__free_unpacked + (StubMotorRunStepTickRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &stub_motor_run_step_tick_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor stub_motor_run_step_tick_request__field_descriptors[3] = +{ + { + "Motor_ID", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(StubMotorRunStepTickRequest, has_motor_id), + offsetof(StubMotorRunStepTickRequest, motor_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "Direction", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(StubMotorRunStepTickRequest, has_direction), + offsetof(StubMotorRunStepTickRequest, direction), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "Speed", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(StubMotorRunStepTickRequest, has_speed), + offsetof(StubMotorRunStepTickRequest, speed), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned stub_motor_run_step_tick_request__field_indices_by_name[] = { + 1, /* field[1] = Direction */ + 0, /* field[0] = Motor_ID */ + 2, /* field[2] = Speed */ +}; +static const ProtobufCIntRange stub_motor_run_step_tick_request__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 3 } +}; +const ProtobufCMessageDescriptor stub_motor_run_step_tick_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "StubMotorRunStepTickRequest", + "StubMotorRunStepTickRequest", + "StubMotorRunStepTickRequest", + "", + sizeof(StubMotorRunStepTickRequest), + 3, + stub_motor_run_step_tick_request__field_descriptors, + stub_motor_run_step_tick_request__field_indices_by_name, + 1, stub_motor_run_step_tick_request__number_ranges, + (ProtobufCMessageInit) stub_motor_run_step_tick_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunStepTickRequest.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunStepTickRequest.pb-c.h new file mode 100644 index 000000000..d2efb1df9 --- /dev/null +++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunStepTickRequest.pb-c.h @@ -0,0 +1,76 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StubMotorRunStepTickRequest.proto */ + +#ifndef PROTOBUF_C_StubMotorRunStepTickRequest_2eproto__INCLUDED +#define PROTOBUF_C_StubMotorRunStepTickRequest_2eproto__INCLUDED + +#include + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + + +typedef struct _StubMotorRunStepTickRequest StubMotorRunStepTickRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _StubMotorRunStepTickRequest +{ + ProtobufCMessage base; + protobuf_c_boolean has_motor_id; + uint32_t motor_id; + protobuf_c_boolean has_direction; + protobuf_c_boolean direction; + protobuf_c_boolean has_speed; + double speed; +}; +#define STUB_MOTOR_RUN_STEP_TICK_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&stub_motor_run_step_tick_request__descriptor) \ + , 0, 0, 0, 0, 0, 0 } + + +/* StubMotorRunStepTickRequest methods */ +void stub_motor_run_step_tick_request__init + (StubMotorRunStepTickRequest *message); +size_t stub_motor_run_step_tick_request__get_packed_size + (const StubMotorRunStepTickRequest *message); +size_t stub_motor_run_step_tick_request__pack + (const StubMotorRunStepTickRequest *message, + uint8_t *out); +size_t stub_motor_run_step_tick_request__pack_to_buffer + (const StubMotorRunStepTickRequest *message, + ProtobufCBuffer *buffer); +StubMotorRunStepTickRequest * + stub_motor_run_step_tick_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void stub_motor_run_step_tick_request__free_unpacked + (StubMotorRunStepTickRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*StubMotorRunStepTickRequest_Closure) + (const StubMotorRunStepTickRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor stub_motor_run_step_tick_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_StubMotorRunStepTickRequest_2eproto__INCLUDED */ diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunStepTickResponse.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunStepTickResponse.pb-c.c new file mode 100644 index 000000000..1fa6f484a --- /dev/null +++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunStepTickResponse.pb-c.c @@ -0,0 +1,183 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StubMotorRunStepTickResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "StubMotorRunStepTickResponse.pb-c.h" +void stub_motor_run_step_tick_response__init + (StubMotorRunStepTickResponse *message) +{ + static const StubMotorRunStepTickResponse init_value = STUB_MOTOR_RUN_STEP_TICK_RESPONSE__INIT; + *message = init_value; +} +size_t stub_motor_run_step_tick_response__get_packed_size + (const StubMotorRunStepTickResponse *message) +{ + assert(message->base.descriptor == &stub_motor_run_step_tick_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t stub_motor_run_step_tick_response__pack + (const StubMotorRunStepTickResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &stub_motor_run_step_tick_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t stub_motor_run_step_tick_response__pack_to_buffer + (const StubMotorRunStepTickResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &stub_motor_run_step_tick_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +StubMotorRunStepTickResponse * + stub_motor_run_step_tick_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (StubMotorRunStepTickResponse *) + protobuf_c_message_unpack (&stub_motor_run_step_tick_response__descriptor, + allocator, len, data); +} +void stub_motor_run_step_tick_response__free_unpacked + (StubMotorRunStepTickResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &stub_motor_run_step_tick_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor stub_motor_run_step_tick_response__field_descriptors[8] = +{ + { + "Motor_ID", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(StubMotorRunStepTickResponse, has_motor_id), + offsetof(StubMotorRunStepTickResponse, motor_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "Speed", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(StubMotorRunStepTickResponse, has_speed), + offsetof(StubMotorRunStepTickResponse, speed), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "Status_Reg", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(StubMotorRunStepTickResponse, has_status_reg), + offsetof(StubMotorRunStepTickResponse, status_reg), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "Direction", + 4, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(StubMotorRunStepTickResponse, has_direction), + offsetof(StubMotorRunStepTickResponse, direction), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "Mot_Status", + 5, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(StubMotorRunStepTickResponse, has_mot_status), + offsetof(StubMotorRunStepTickResponse, mot_status), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "STEP_LOSS_A", + 6, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(StubMotorRunStepTickResponse, has_step_loss_a), + offsetof(StubMotorRunStepTickResponse, step_loss_a), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "STEP_LOSS_B", + 7, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(StubMotorRunStepTickResponse, has_step_loss_b), + offsetof(StubMotorRunStepTickResponse, step_loss_b), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "BUSY", + 8, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(StubMotorRunStepTickResponse, has_busy), + offsetof(StubMotorRunStepTickResponse, busy), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned stub_motor_run_step_tick_response__field_indices_by_name[] = { + 7, /* field[7] = BUSY */ + 3, /* field[3] = Direction */ + 4, /* field[4] = Mot_Status */ + 0, /* field[0] = Motor_ID */ + 5, /* field[5] = STEP_LOSS_A */ + 6, /* field[6] = STEP_LOSS_B */ + 1, /* field[1] = Speed */ + 2, /* field[2] = Status_Reg */ +}; +static const ProtobufCIntRange stub_motor_run_step_tick_response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 8 } +}; +const ProtobufCMessageDescriptor stub_motor_run_step_tick_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "StubMotorRunStepTickResponse", + "StubMotorRunStepTickResponse", + "StubMotorRunStepTickResponse", + "", + sizeof(StubMotorRunStepTickResponse), + 8, + stub_motor_run_step_tick_response__field_descriptors, + stub_motor_run_step_tick_response__field_indices_by_name, + 1, stub_motor_run_step_tick_response__number_ranges, + (ProtobufCMessageInit) stub_motor_run_step_tick_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunStepTickResponse.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunStepTickResponse.pb-c.h new file mode 100644 index 000000000..5541f9b82 --- /dev/null +++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunStepTickResponse.pb-c.h @@ -0,0 +1,92 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StubMotorRunStepTickResponse.proto */ + +#ifndef PROTOBUF_C_StubMotorRunStepTickResponse_2eproto__INCLUDED +#define PROTOBUF_C_StubMotorRunStepTickResponse_2eproto__INCLUDED + +#include + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + + +typedef struct _StubMotorRunStepTickResponse StubMotorRunStepTickResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _StubMotorRunStepTickResponse +{ + ProtobufCMessage base; + protobuf_c_boolean has_motor_id; + uint32_t motor_id; + protobuf_c_boolean has_speed; + double speed; + protobuf_c_boolean has_status_reg; + uint32_t status_reg; + /* + * Reverse / Forward + */ + protobuf_c_boolean has_direction; + protobuf_c_boolean direction; + /* + *Stopped / Acceleration / Deceleration / Constant speed + */ + protobuf_c_boolean has_mot_status; + uint32_t mot_status; + protobuf_c_boolean has_step_loss_a; + protobuf_c_boolean step_loss_a; + protobuf_c_boolean has_step_loss_b; + protobuf_c_boolean step_loss_b; + protobuf_c_boolean has_busy; + protobuf_c_boolean busy; +}; +#define STUB_MOTOR_RUN_STEP_TICK_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&stub_motor_run_step_tick_response__descriptor) \ + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + + +/* StubMotorRunStepTickResponse methods */ +void stub_motor_run_step_tick_response__init + (StubMotorRunStepTickResponse *message); +size_t stub_motor_run_step_tick_response__get_packed_size + (const StubMotorRunStepTickResponse *message); +size_t stub_motor_run_step_tick_response__pack + (const StubMotorRunStepTickResponse *message, + uint8_t *out); +size_t stub_motor_run_step_tick_response__pack_to_buffer + (const StubMotorRunStepTickResponse *message, + ProtobufCBuffer *buffer); +StubMotorRunStepTickResponse * + stub_motor_run_step_tick_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void stub_motor_run_step_tick_response__free_unpacked + (StubMotorRunStepTickResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*StubMotorRunStepTickResponse_Closure) + (const StubMotorRunStepTickResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor stub_motor_run_step_tick_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_StubMotorRunStepTickResponse_2eproto__INCLUDED */ diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Container.c b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Container.c index 3cd3b3931..2f3bd6009 100644 --- a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Container.c +++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Container.c @@ -155,6 +155,14 @@ void receive_callback(char* buffer, size_t length) Stub_MotorRequest(requestContainer); break; + case MESSAGE_TYPE__StubMotorHomeMarkRequest: + Stub_MotorHomeMarkRequest(requestContainer); + break; + case MESSAGE_TYPE__StubMotorRunStepTickRequest: + Stub_MotorRunStepTickRequest(requestContainer); + break; + + default: //unsupported message type !! break; diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/DataDef.h b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/DataDef.h index 30b9cab07..dcf8d151c 100644 --- a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/DataDef.h +++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/DataDef.h @@ -33,6 +33,12 @@ enum #define NOTBUSY 0 #define BUSY 1 + +#define SET_HOME 0 +#define SET_MARK 1 +#define GO_HOME 2 +#define GO_MARK 3 + // //#define SPI_BUSY 0 //#define SPI_NOTBUSY 1 diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Motor.c b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Motor.c index d1e6ff82d..c6422d6d9 100644 --- a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Motor.c +++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Motor.c @@ -15,6 +15,10 @@ #include #include #include +#include +#include +#include +#include #include #include @@ -526,4 +530,114 @@ void Stub_MotorRequest(MessageContainer* requestContainer) free(requestContainer); } +void Stub_MotorHomeMarkRequest(MessageContainer* requestContainer) +{ + + MessageContainer responseContainer; + + StubMotorHomeMarkRequest* request = stub_motor_home_mark_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + + switch(request->set_home_mark_go_home_mark) + { + case SET_HOME: + ResetPos(); + break; + case SET_MARK: + Get_Param(x_MARK); ///???? + break; + case GO_HOME: + GoHome(); + break; + case GO_MARK: + GoMark(); + break; + + default: + break; + } + + StubMotorHomeMarkResponse response = STUB_MOTOR_HOME_MARK_RESPONSE__INIT; + + response.motor_id = request->motor_id; + response.has_motor_id = true; + + response.position = Get_Param(x_ABS_POS); + response.has_position = true; + + responseContainer = createContainer(MESSAGE_TYPE__StubMotorHomeMarkResponse, requestContainer->token, true, &response, &stub_motor_home_mark_response__pack, &stub_motor_home_mark_response__get_packed_size); + + free(request); + //------------------------------------------------------------------------------------------- + uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer)); + size_t container_size = message_container__pack(&responseContainer, container_buffer); + SendChars((char*)container_buffer, container_size); + free(container_buffer); + free(requestContainer); +} + +void Stub_MotorRunStepTickRequest(MessageContainer* requestContainer) +{ + + uint32_t read_status; + + MessageContainer responseContainer; + + StubMotorRunStepTickRequest* request = stub_motor_run_step_tick_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + + //float temp = (float)request->speed; + //Run_Value = SpdCalc(temp); + //Direction = request->direction; + + + Run(request->direction,request->speed); + + + + + + StubMotorRunStepTickResponse response = STUB_MOTOR_RUN_STEP_TICK_RESPONSE__INIT; + + response.motor_id = request->motor_id; + response.has_motor_id = true; + + read_status = Get_and_Clear_Status(); + + response.speed = (Get_Param(x_SPEED)); + response.has_speed = true; + + response.status_reg = read_status; + response.has_status_reg = true; + + response.direction = ((read_status & x_STATUS_DIR)>>4); + response.has_direction = true; + + response.step_loss_a = ((read_status & x_STATUS_STEP_LOSS_A)>>13); + response.has_step_loss_a = true; + response.step_loss_b = ((read_status & x_STATUS_STEP_LOSS_B)>>14); + response.has_step_loss_b = true; + + + response.mot_status = ((read_status & x_STATUS_MOT_STATUS)>>5); + response.has_mot_status = true; + + response.busy = ((read_status & x_STATUS_BUSY)>>1); + response.has_busy = true; + + + responseContainer = createContainer(MESSAGE_TYPE__StubMotorRunStepTickResponse, requestContainer->token, true, &response, &stub_motor_run_step_tick_response__pack, &stub_motor_run_step_tick_response__get_packed_size); + + writeLine("Sending Response: "); + + writeFloat(response.motor_id); + + + free(request); + //------------------------------------------------------------------------------------------- + uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer)); + size_t container_size = message_container__pack(&responseContainer, container_buffer); + SendChars((char*)container_buffer, container_size); + free(container_buffer); + free(requestContainer); +} + diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Motor.h b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Motor.h index 59312179f..6366698c5 100644 --- a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Motor.h +++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Motor.h @@ -6,5 +6,6 @@ void Stub_MotorSpeedRequest(MessageContainer* requestContainer); void Stub_MotorPositionRequest(MessageContainer* requestContainer); void Stub_MotorMovRequest(MessageContainer* requestContainer); void Stub_MotorRequest(MessageContainer* requestContainer); - +void Stub_MotorHomeMarkRequest(MessageContainer* requestContainer); +void Stub_MotorRunStepTickRequest(MessageContainer* requestContainer); diff --git a/Software/Code_Composer/twine_usblib_demo/drivers/Danser_SSI/SSI_Comm.c b/Software/Code_Composer/twine_usblib_demo/drivers/Danser_SSI/SSI_Comm.c index bf9460ab5..2cd0534a7 100644 --- a/Software/Code_Composer/twine_usblib_demo/drivers/Danser_SSI/SSI_Comm.c +++ b/Software/Code_Composer/twine_usblib_demo/drivers/Danser_SSI/SSI_Comm.c @@ -10,6 +10,26 @@ //00 - No special requirements +/* +down + +Name : RByte + Default:34988 + Hex:0x000088AC + Decimal:34988 + Octal:0104254 + Binary:0000000000000000 10001000101011 00b (position = 8747) +up + Name : RByte + Default:44520 + Hex:0x0000ADE8 + Decimal:44520 + Octal:0126750 + Binary:0000000000000000 10101101111010 00b (position = 11130) + + missing 8 bits of Detailed status (the 16 MSB should not be receive) + */ + #include #include #include @@ -33,9 +53,9 @@ typedef struct // 24bit { - unsigned char Det_status:8; - unsigned char Gen_status:2; unsigned short Position:14; + unsigned char Gen_status:2; + unsigned char Det_status:8; }SSI_ENC; SSI_ENC SSI_enc; @@ -79,9 +99,9 @@ void SSI1_Init() SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE); /* Configure pad settings */ // AVI - GPIOPadConfigSet(GPIO_PORTE_BASE, - GPIO_PIN_4, - GPIO_STRENGTH_4MA, GPIO_PIN_TYPE_STD); +// GPIOPadConfigSet(GPIO_PORTE_BASE, +// GPIO_PIN_4, +// GPIO_STRENGTH_4MA, GPIO_PIN_TYPE_STD); GPIOPadConfigSet(GPIO_PORTE_BASE, GPIO_PIN_5, @@ -121,8 +141,8 @@ void SSI1_Init() // Configure and enable the SSI1 port for SPI Master mode. // - SSIConfigSetExpClk(SSI1_BASE, ui32SysClock, SSI_FRF_NMW, - SSI_MODE_MASTER, 500000, 16); // to receive Clock period 2uSec, Clock frequency 500KHz + SSIConfigSetExpClk(SSI1_BASE, ui32SysClock, SSI_FRF_MOTO_MODE_0,//SSI_FRF_NMW, + SSI_MODE_MASTER, 500000, 32);//16); // to receive Clock period 2uSec, Clock frequency 500KHz //SSI_MODE_MASTER send 24 bits 0x00 (dummy) 0x7f 0xff -> create clock of 24 bits for SSI SSIAdvModeSet(SSI1_BASE,SSI_ADV_MODE_READ_WRITE ); @@ -140,14 +160,17 @@ uint32_t Write_Dummy_Byte() uint8_t WByte = 0x00; // Dummy Byte uint32_t RByte = 0x00; + SSIDataPut(SSI1_BASE, WByte); while(SSIBusy(SSI1_BASE)){}; - SSIDataGet(SSI1_BASE, &RByte);// 24 bytes - return (RByte & 0xffffff);// 24 bytes + while(SSIDataGetNonBlocking(SSI1_BASE, &RByte)){}; //FIFO to read 24 bit + + //return (RByte & 0xffffff);// 24 bytes + return (RByte & 0xffff);//14 bit position + 2 bit general status } void Read_Dancer_Position () @@ -158,11 +181,14 @@ void Read_Dancer_Position () ENC_SSI_Data = Write_Dummy_Byte(); - SSI_enc.Det_status = ENC_SSI_Data & 0xFF; - ENC_SSI_Data = ENC_SSI_Data >> 8; + + //SSI_enc.Det_status = ENC_SSI_Data & 0xFF; + //ENC_SSI_Data = ENC_SSI_Data >> 8; + SSI_enc.Det_status = 0; + SSI_enc.Gen_status = ENC_SSI_Data & 0x3; ENC_SSI_Data = ENC_SSI_Data >> 2; - SSI_enc.Position = ENC_SSI_Data & 0x3FFF; + SSI_enc.Position = ENC_SSI_Data & 0x3FFF; // up 11130 down 8747 SSIDisable(SSI1_BASE); } diff --git a/Software/Code_Composer/twine_usblib_demo/drivers/SPI/SPI_Comm.c b/Software/Code_Composer/twine_usblib_demo/drivers/SPI/SPI_Comm.c index 4eeeda774..2f44ed635 100644 --- a/Software/Code_Composer/twine_usblib_demo/drivers/SPI/SPI_Comm.c +++ b/Software/Code_Composer/twine_usblib_demo/drivers/SPI/SPI_Comm.c @@ -394,7 +394,7 @@ void setup(StubMotorInitRequest* request) { SetParam(x_STEP_MODE, !x_SYNC_EN | - x_STEP_SEL_1_8 | + x_STEP_SEL_1 |//x_STEP_SEL_1_8 | x_SYNC_SEL_1); } @@ -505,7 +505,7 @@ void setup(StubMotorInitRequest* request) read_status = Get_Param(x_STATUS); } - //writable only when outputs are in high impedance: +// //writable only when outputs are in high impedance: SetParam(x_CONFIG, x_CONFIG_PWM_DIV_1 | x_CONFIG_PWM_MUL_2 | @@ -540,14 +540,14 @@ void setup(StubMotorInitRequest* request) // SetParam(x_FN_SLP_DEC, /*0x48);// */ 0x23); //for Motor 49: - SetParam(x_KVAL_HOLD, 0x35); - SetParam(x_KVAL_RUN, 0x4B); - SetParam(x_KVAL_ACC, 0x4B); - SetParam(x_KVAL_DEC, 0x4B); - SetParam(x_ST_SLP, 0x20); - SetParam(x_INT_SPD, 0x1A13); - SetParam(x_FN_SLP_ACC, 0x50); - SetParam(x_FN_SLP_DEC, 0x50); +// SetParam(x_KVAL_HOLD, 0x35); +// SetParam(x_KVAL_RUN, 0x4B); +// SetParam(x_KVAL_ACC, 0x4B); +// SetParam(x_KVAL_DEC, 0x4B); +// SetParam(x_ST_SLP, 0x20); +// SetParam(x_INT_SPD, 0x1A13); +// SetParam(x_FN_SLP_ACC, 0x50); +// SetParam(x_FN_SLP_DEC, 0x50); //https://www.youtube.com/watch?v=8C7qdjPbhlg MIN 2:20 diff --git a/Software/Code_Composer/twine_usblib_demo/main.c b/Software/Code_Composer/twine_usblib_demo/main.c index 2f1591661..a6eb475ad 100644 --- a/Software/Code_Composer/twine_usblib_demo/main.c +++ b/Software/Code_Composer/twine_usblib_demo/main.c @@ -139,7 +139,7 @@ int main(void) // SPI_Control(); SSI1_Init(); // Read dancer ENC SSI - //Loop_SSI(); + Loop_SSI(); SPI2_Init(); init_BUSY_Pin(); diff --git a/Software/PMR/Messages/Common/MessageType.proto b/Software/PMR/Messages/Common/MessageType.proto index ee5adaf1e..2a0e0b753 100644 --- a/Software/PMR/Messages/Common/MessageType.proto +++ b/Software/PMR/Messages/Common/MessageType.proto @@ -74,6 +74,11 @@ enum MessageType StubHeatingTestPollResponse = 64; StubMotorRequest = 65; StubMotorResponse = 66; + StubMotorHomeMarkRequest = 67; + StubMotorHomeMarkResponse = 68; + StubMotorRunStepTickRequest = 69; + StubMotorRunStepTickResponse = 70; + //Integration ExternalBridgeUdpDiscoveryPacket = 1000; diff --git a/Software/PMR/Messages/Stubs/StubMotorHomeMarkRequest.proto b/Software/PMR/Messages/Stubs/StubMotorHomeMarkRequest.proto new file mode 100644 index 000000000..3ee519433 --- /dev/null +++ b/Software/PMR/Messages/Stubs/StubMotorHomeMarkRequest.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package Tango.PMR.Stubs; +option java_package = "com.twine.tango.pmr.stubs"; + +message StubMotorHomeMarkRequest +{ + uint32 Motor_ID = 1; + uint32 Set_Home_Mark_GO_Home_Mark = 2; // 0..3 +} \ No newline at end of file diff --git a/Software/PMR/Messages/Stubs/StubMotorHomeMarkResponse.proto b/Software/PMR/Messages/Stubs/StubMotorHomeMarkResponse.proto new file mode 100644 index 000000000..fc359d653 --- /dev/null +++ b/Software/PMR/Messages/Stubs/StubMotorHomeMarkResponse.proto @@ -0,0 +1,11 @@ + +syntax = "proto3"; + +package Tango.PMR.Stubs; +option java_package = "com.twine.tango.pmr.stubs"; + +message StubMotorHomeMarkResponse +{ + uint32 Motor_ID = 1; + uint32 Position = 2; +} \ No newline at end of file diff --git a/Software/PMR/Messages/Stubs/StubMotorRunStepTickRequest.proto b/Software/PMR/Messages/Stubs/StubMotorRunStepTickRequest.proto new file mode 100644 index 000000000..37ee5b7eb --- /dev/null +++ b/Software/PMR/Messages/Stubs/StubMotorRunStepTickRequest.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package Tango.PMR.Stubs; +option java_package = "com.twine.tango.pmr.stubs"; + +message StubMotorRunStepTickRequest +{ + uint32 Motor_ID = 1; + bool Direction = 2; + double Speed = 3; +} \ No newline at end of file diff --git a/Software/PMR/Messages/Stubs/StubMotorRunStepTickResponse.proto b/Software/PMR/Messages/Stubs/StubMotorRunStepTickResponse.proto new file mode 100644 index 000000000..4791f70bf --- /dev/null +++ b/Software/PMR/Messages/Stubs/StubMotorRunStepTickResponse.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +package Tango.PMR.Stubs; +option java_package = "com.twine.tango.pmr.stubs"; + +message StubMotorRunStepTickResponse +{ + uint32 Motor_ID = 1; + double Speed = 2; + uint32 Status_Reg = 3; + bool Direction = 4;// Reverse / Forward + uint32 Mot_Status = 5; //Stopped / Acceleration / Deceleration / Constant speed + bool STEP_LOSS_A = 6; + bool STEP_LOSS_B = 7; + bool BUSY = 8; + +} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs index 0c46ea0d9..ca6fb0b75 100644 --- a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs +++ b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs @@ -22,7 +22,7 @@ namespace Tango.PMR.Common { static MessageTypeReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbirqGAoLTWVz", + "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbirqGQoLTWVz", "c2FnZVR5cGUSCAoETm9uZRAAEhQKEENhbGN1bGF0ZVJlcXVlc3QQAxIVChFD", "YWxjdWxhdGVSZXNwb25zZRAEEhMKD1Byb2dyZXNzUmVxdWVzdBAFEhQKEFBy", "b2dyZXNzUmVzcG9uc2UQBhIcChhTdHViQ2FydHJpZGdlUmVhZFJlcXVlc3QQ", @@ -63,38 +63,41 @@ namespace Tango.PMR.Common { "aW5nVGVzdFJlcXVlc3QQPRIbChdTdHViSGVhdGluZ1Rlc3RSZXNwb25zZRA+", "Eh4KGlN0dWJIZWF0aW5nVGVzdFBvbGxSZXF1ZXN0ED8SHwobU3R1YkhlYXRp", "bmdUZXN0UG9sbFJlc3BvbnNlEEASFAoQU3R1Yk1vdG9yUmVxdWVzdBBBEhUK", - "EVN0dWJNb3RvclJlc3BvbnNlEEISJQogRXh0ZXJuYWxCcmlkZ2VVZHBEaXNj", - "b3ZlcnlQYWNrZXQQ6AcSHwoaRXh0ZXJuYWxDbGllbnRMb2dpblJlcXVlc3QQ", - "6QcSIAobRXh0ZXJuYWxDbGllbnRMb2dpblJlc3BvbnNlEOoHEiEKHERpcmVj", - "dFN5bmNocm9uaXphdGlvblJlcXVlc3QQ6wcSIgodRGlyZWN0U3luY2hyb25p", - "emF0aW9uUmVzcG9uc2UQ7AcSHAoXT3ZlcnJpZGVEYXRhQmFzZVJlcXVlc3QQ", - "7QcSHQoYT3ZlcnJpZGVEYXRhQmFzZVJlc3BvbnNlEO4HEhUKEEtlZXBBbGl2", - "ZVJlcXVlc3QQ7wcSFgoRS2VlcEFsaXZlUmVzcG9uc2UQ8AcSGwoWUHVzaERp", - "YWdub3N0aWNzUmVxdWVzdBDQDxIcChdQdXNoRGlhZ25vc3RpY3NSZXNwb25z", - "ZRDRDxIcChdNb3RvckFib3J0SG9taW5nUmVxdWVzdBDSDxIdChhNb3RvckFi", - "b3J0SG9taW5nUmVzcG9uc2UQ0w8SFwoSTW90b3JIb21pbmdSZXF1ZXN0ENQP", - "EhgKE01vdG9ySG9taW5nUmVzcG9uc2UQ1Q8SGAoTTW90b3JKb2dnaW5nUmVx", - "dWVzdBDWDxIZChRNb3RvckpvZ2dpbmdSZXNwb25zZRDXDxIdChhNb3RvckFi", - "b3J0Sm9nZ2luZ1JlcXVlc3QQ2A8SHgoZTW90b3JBYm9ydEpvZ2dpbmdSZXNw", - "b25zZRDZDxIgChtEaXNwZW5zZXJBYm9ydEhvbWluZ1JlcXVlc3QQ2g8SIQoc", - "RGlzcGVuc2VyQWJvcnRIb21pbmdSZXNwb25zZRDbDxIbChZEaXNwZW5zZXJI", - "b21pbmdSZXF1ZXN0ENwPEhwKF0Rpc3BlbnNlckhvbWluZ1Jlc3BvbnNlEN0P", - "EhwKF0Rpc3BlbnNlckpvZ2dpbmdSZXF1ZXN0EN4PEh0KGERpc3BlbnNlckpv", - "Z2dpbmdSZXNwb25zZRDfDxIhChxEaXNwZW5zZXJBYm9ydEpvZ2dpbmdSZXF1", - "ZXN0EOAPEiIKHURpc3BlbnNlckFib3J0Sm9nZ2luZ1Jlc3BvbnNlEOEPEhkK", - "FFNldERpZ2l0YWxPdXRSZXF1ZXN0EOIPEhoKFVNldERpZ2l0YWxPdXRSZXNw", - "b25zZRDjDxIZChRUaHJlYWRKb2dnaW5nUmVxdWVzdBDkDxIaChVUaHJlYWRK", - "b2dnaW5nUmVzcG9uc2UQ5Q8SHgoZVGhyZWFkQWJvcnRKb2dnaW5nUmVxdWVz", - "dBDmDxIfChpUaHJlYWRBYm9ydEpvZ2dpbmdSZXNwb25zZRDnDxIdChhTZXRD", - "b21wb25lbnRWYWx1ZVJlcXVlc3QQ6A8SHgoZU2V0Q29tcG9uZW50VmFsdWVS", - "ZXNwb25zZRDpDxIPCgpKb2JSZXF1ZXN0ELgXEhAKC0pvYlJlc3BvbnNlELkX", - "EhQKD0Fib3J0Sm9iUmVxdWVzdBC6FxIVChBBYm9ydEpvYlJlc3BvbnNlELsX", - "EiMKHlVwbG9hZFByb2Nlc3NQYXJhbWV0ZXJzUmVxdWVzdBC8FxIkCh9VcGxv", - "YWRQcm9jZXNzUGFyYW1ldGVyc1Jlc3BvbnNlEL0XEhQKD0RlYnVnTG9nUmVx", - "dWVzdBCgHxIVChBEZWJ1Z0xvZ1Jlc3BvbnNlEKEfEicKIlVwbG9hZEhhcmR3", - "YXJlQ29uZmlndXJhdGlvblJlcXVlc3QQiCcSKAojVXBsb2FkSGFyZHdhcmVD", - "b25maWd1cmF0aW9uUmVzcG9uc2UQiSdCHAoaY29tLnR3aW5lLnRhbmdvLnBt", - "ci5jb21tb25iBnByb3RvMw==")); + "EVN0dWJNb3RvclJlc3BvbnNlEEISHAoYU3R1Yk1vdG9ySG9tZU1hcmtSZXF1", + "ZXN0EEMSHQoZU3R1Yk1vdG9ySG9tZU1hcmtSZXNwb25zZRBEEh8KG1N0dWJN", + "b3RvclJ1blN0ZXBUaWNrUmVxdWVzdBBFEiAKHFN0dWJNb3RvclJ1blN0ZXBU", + "aWNrUmVzcG9uc2UQRhIlCiBFeHRlcm5hbEJyaWRnZVVkcERpc2NvdmVyeVBh", + "Y2tldBDoBxIfChpFeHRlcm5hbENsaWVudExvZ2luUmVxdWVzdBDpBxIgChtF", + "eHRlcm5hbENsaWVudExvZ2luUmVzcG9uc2UQ6gcSIQocRGlyZWN0U3luY2hy", + "b25pemF0aW9uUmVxdWVzdBDrBxIiCh1EaXJlY3RTeW5jaHJvbml6YXRpb25S", + "ZXNwb25zZRDsBxIcChdPdmVycmlkZURhdGFCYXNlUmVxdWVzdBDtBxIdChhP", + "dmVycmlkZURhdGFCYXNlUmVzcG9uc2UQ7gcSFQoQS2VlcEFsaXZlUmVxdWVz", + "dBDvBxIWChFLZWVwQWxpdmVSZXNwb25zZRDwBxIbChZQdXNoRGlhZ25vc3Rp", + "Y3NSZXF1ZXN0ENAPEhwKF1B1c2hEaWFnbm9zdGljc1Jlc3BvbnNlENEPEhwK", + "F01vdG9yQWJvcnRIb21pbmdSZXF1ZXN0ENIPEh0KGE1vdG9yQWJvcnRIb21p", + "bmdSZXNwb25zZRDTDxIXChJNb3RvckhvbWluZ1JlcXVlc3QQ1A8SGAoTTW90", + "b3JIb21pbmdSZXNwb25zZRDVDxIYChNNb3RvckpvZ2dpbmdSZXF1ZXN0ENYP", + "EhkKFE1vdG9ySm9nZ2luZ1Jlc3BvbnNlENcPEh0KGE1vdG9yQWJvcnRKb2dn", + "aW5nUmVxdWVzdBDYDxIeChlNb3RvckFib3J0Sm9nZ2luZ1Jlc3BvbnNlENkP", + "EiAKG0Rpc3BlbnNlckFib3J0SG9taW5nUmVxdWVzdBDaDxIhChxEaXNwZW5z", + "ZXJBYm9ydEhvbWluZ1Jlc3BvbnNlENsPEhsKFkRpc3BlbnNlckhvbWluZ1Jl", + "cXVlc3QQ3A8SHAoXRGlzcGVuc2VySG9taW5nUmVzcG9uc2UQ3Q8SHAoXRGlz", + "cGVuc2VySm9nZ2luZ1JlcXVlc3QQ3g8SHQoYRGlzcGVuc2VySm9nZ2luZ1Jl", + "c3BvbnNlEN8PEiEKHERpc3BlbnNlckFib3J0Sm9nZ2luZ1JlcXVlc3QQ4A8S", + "IgodRGlzcGVuc2VyQWJvcnRKb2dnaW5nUmVzcG9uc2UQ4Q8SGQoUU2V0RGln", + "aXRhbE91dFJlcXVlc3QQ4g8SGgoVU2V0RGlnaXRhbE91dFJlc3BvbnNlEOMP", + "EhkKFFRocmVhZEpvZ2dpbmdSZXF1ZXN0EOQPEhoKFVRocmVhZEpvZ2dpbmdS", + "ZXNwb25zZRDlDxIeChlUaHJlYWRBYm9ydEpvZ2dpbmdSZXF1ZXN0EOYPEh8K", + "GlRocmVhZEFib3J0Sm9nZ2luZ1Jlc3BvbnNlEOcPEh0KGFNldENvbXBvbmVu", + "dFZhbHVlUmVxdWVzdBDoDxIeChlTZXRDb21wb25lbnRWYWx1ZVJlc3BvbnNl", + "EOkPEg8KCkpvYlJlcXVlc3QQuBcSEAoLSm9iUmVzcG9uc2UQuRcSFAoPQWJv", + "cnRKb2JSZXF1ZXN0ELoXEhUKEEFib3J0Sm9iUmVzcG9uc2UQuxcSIwoeVXBs", + "b2FkUHJvY2Vzc1BhcmFtZXRlcnNSZXF1ZXN0ELwXEiQKH1VwbG9hZFByb2Nl", + "c3NQYXJhbWV0ZXJzUmVzcG9uc2UQvRcSFAoPRGVidWdMb2dSZXF1ZXN0EKAf", + "EhUKEERlYnVnTG9nUmVzcG9uc2UQoR8SJwoiVXBsb2FkSGFyZHdhcmVDb25m", + "aWd1cmF0aW9uUmVxdWVzdBCIJxIoCiNVcGxvYWRIYXJkd2FyZUNvbmZpZ3Vy", + "YXRpb25SZXNwb25zZRCJJ0IcChpjb20udHdpbmUudGFuZ28ucG1yLmNvbW1v", + "bmIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Common.MessageType), }, null)); @@ -175,6 +178,10 @@ namespace Tango.PMR.Common { [pbr::OriginalName("StubHeatingTestPollResponse")] StubHeatingTestPollResponse = 64, [pbr::OriginalName("StubMotorRequest")] StubMotorRequest = 65, [pbr::OriginalName("StubMotorResponse")] StubMotorResponse = 66, + [pbr::OriginalName("StubMotorHomeMarkRequest")] StubMotorHomeMarkRequest = 67, + [pbr::OriginalName("StubMotorHomeMarkResponse")] StubMotorHomeMarkResponse = 68, + [pbr::OriginalName("StubMotorRunStepTickRequest")] StubMotorRunStepTickRequest = 69, + [pbr::OriginalName("StubMotorRunStepTickResponse")] StubMotorRunStepTickResponse = 70, /// ///Integration /// diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/EventType.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/EventType.cs index 7eebf2553..1506aef18 100644 --- a/Software/Visual_Studio/Tango.PMR/Diagnostics/EventType.cs +++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/EventType.cs @@ -22,7 +22,7 @@ namespace Tango.PMR.Diagnostics { static EventTypeReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "Cg9FdmVudFR5cGUucHJvdG8SFVRhbmdvLlBNUi5EaWFnbm9zdGljcyroBgoJ", + "Cg9FdmVudFR5cGUucHJvdG8SFVRhbmdvLlBNUi5EaWFnbm9zdGljcyqbBwoJ", "RXZlbnRUeXBlEg8KC1RocmVhZEJyZWFrEAASHwobVGhyZWFkVGVuc2lvbkNv", "bnRyb2xGYWlsdXJlEAESGgoWRmVlZGVyQ29uZUluc3VmZmljaWFudBACEhYK", "EldpbmRlckdlbmVyYWxFcnJvchADEhcKE1dpbmRlckNvbmVOb3RFeGlzdHMQ", @@ -42,8 +42,9 @@ namespace Tango.PMR.Diagnostics { "dXR0b25QcmVzc2VkEBsSFgoSU3lzdGVtR2VuZXJhbEVycm9yEBwSDwoLUmVx", "dWVzdFNlbnQQHRIUChBSZXNwb25zZVJlY2VpdmVkEB4SEQoNUmVxdWVzdEZh", "aWxlZBAfEhgKFEFwcGxpY2F0aW9uRXhjZXB0aW9uECASGgoWQXBwbGljYXRp", - "b25JbmZvcm1hdGlvbhAiQiEKH2NvbS50d2luZS50YW5nby5wbXIuZGlhZ25v", - "c3RpY3NiBnByb3RvMw==")); + "b25JbmZvcm1hdGlvbhAhEhYKEkFwcGxpY2F0aW9uU3RhcnRlZBAiEhkKFUFw", + "cGxpY2F0aW9uVGVybWluYXRlZBAjQiEKH2NvbS50d2luZS50YW5nby5wbXIu", + "ZGlhZ25vc3RpY3NiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Diagnostics.EventType), }, null)); @@ -188,7 +189,15 @@ namespace Tango.PMR.Diagnostics { /// ///General application event logs (Group = Application, Category = Info, Actions = ) /// - [pbr::OriginalName("ApplicationInformation")] ApplicationInformation = 34, + [pbr::OriginalName("ApplicationInformation")] ApplicationInformation = 33, + /// + ///Notifies about application succesfully started (Group = Application, Category = Info, Actions = ) + /// + [pbr::OriginalName("ApplicationStarted")] ApplicationStarted = 34, + /// + ///Notifies about application termination (Group = Application, Category = Info, Actions = ) + /// + [pbr::OriginalName("ApplicationTerminated")] ApplicationTerminated = 35, } #endregion diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControl.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControl.cs index c59f07cc1..658f4463c 100644 --- a/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControl.cs +++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControl.cs @@ -23,24 +23,26 @@ namespace Tango.PMR.Hardware { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "ChhIYXJkd2FyZVBpZENvbnRyb2wucHJvdG8SElRhbmdvLlBNUi5IYXJkd2Fy", - "ZRocSGFyZHdhcmVQaWRDb250cm9sVHlwZS5wcm90byKXBAoSSGFyZHdhcmVQ", + "ZRocSGFyZHdhcmVQaWRDb250cm9sVHlwZS5wcm90byLcBAoSSGFyZHdhcmVQ", "aWRDb250cm9sEkoKFkhhcmR3YXJlUGlkQ29udHJvbFR5cGUYASABKA4yKi5U", "YW5nby5QTVIuSGFyZHdhcmUuSGFyZHdhcmVQaWRDb250cm9sVHlwZRIkChxP", - "dXRwdXRQcm9wb3J0aW9uYWxQb3dlckxpbWl0GAIgASgFEh4KFk91dHB1dFBy", - "b3BvcnRpb25hbEJhbmQYAyABKAUSFAoMSW50ZWdyYWxUaW1lGAQgASgFEhYK", - "DkRlcml2YXRpdmVUaW1lGAUgASgFEiIKGlNlbnNvckNvcnJlY3Rpb25BZGp1", - "c3RtZW50GAYgASgFEhYKDlNlbnNvck1pblZhbHVlGAcgASgFEhYKDlNlbnNv", - "ck1heFZhbHVlGAggASgFEicKH1NldFBvaW50UmFtcFJhdGVvclNvZnRTdGFy", - "dFJhbXAYCSABKAUSIQoZU2V0UG9pbnRDb250cm9sT3V0cHV0UmF0ZRgKIAEo", - "BRIZChFDb250cm9sT3V0cHV0VHlwZRgLIAEoBRIcChRTc3JDb250cm9sT3V0", - "cHV0VHlwZRgMIAEoBRIiChpPdXRwdXRPbk9mZkh5c3RlcmVzaXNWYWx1ZRgN", - "IAEoBRIjChtQcm9jZXNzVmFyaWFibGVTYW1wbGluZ1JhdGUYDiABKAUSHwoX", - "UHZJbnB1dEZpbHRlckZhY3Rvck1vZGUYDyABKAVCHgocY29tLnR3aW5lLnRh", - "bmdvLnBtci5oYXJkd2FyZWIGcHJvdG8z")); + "dXRwdXRQcm9wb3J0aW9uYWxQb3dlckxpbWl0GAIgASgBEh4KFk91dHB1dFBy", + "b3BvcnRpb25hbEJhbmQYAyABKAESFAoMSW50ZWdyYWxUaW1lGAQgASgBEhYK", + "DkRlcml2YXRpdmVUaW1lGAUgASgBEiIKGlNlbnNvckNvcnJlY3Rpb25BZGp1", + "c3RtZW50GAYgASgBEhYKDlNlbnNvck1pblZhbHVlGAcgASgBEhYKDlNlbnNv", + "ck1heFZhbHVlGAggASgBEicKH1NldFBvaW50UmFtcFJhdGVvclNvZnRTdGFy", + "dFJhbXAYCSABKAESIQoZU2V0UG9pbnRDb250cm9sT3V0cHV0UmF0ZRgKIAEo", + "ARIZChFDb250cm9sT3V0cHV0VHlwZRgLIAEoARIcChRTc3JDb250cm9sT3V0", + "cHV0VHlwZRgMIAEoARIiChpPdXRwdXRPbk9mZkh5c3RlcmVzaXNWYWx1ZRgN", + "IAEoARIjChtQcm9jZXNzVmFyaWFibGVTYW1wbGluZ1JhdGUYDiABKAESHwoX", + "UHZJbnB1dEZpbHRlckZhY3Rvck1vZGUYDyABKAESIwobT3V0cHV0UHJvcG9y", + "dGlvbmFsQ3ljbGVUaW1lGBAgASgFEh4KFkFjSGVhdGVyc0hhbGZDeWNsZVRp", + "bWUYESABKAVCHgocY29tLnR3aW5lLnRhbmdvLnBtci5oYXJkd2FyZWIGcHJv", + "dG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tango.PMR.Hardware.HardwarePidControlTypeReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwarePidControl), global::Tango.PMR.Hardware.HardwarePidControl.Parser, new[]{ "HardwarePidControlType", "OutputProportionalPowerLimit", "OutputProportionalBand", "IntegralTime", "DerivativeTime", "SensorCorrectionAdjustment", "SensorMinValue", "SensorMaxValue", "SetPointRampRateorSoftStartRamp", "SetPointControlOutputRate", "ControlOutputType", "SsrControlOutputType", "OutputOnOffHysteresisValue", "ProcessVariableSamplingRate", "PvInputFilterFactorMode" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwarePidControl), global::Tango.PMR.Hardware.HardwarePidControl.Parser, new[]{ "HardwarePidControlType", "OutputProportionalPowerLimit", "OutputProportionalBand", "IntegralTime", "DerivativeTime", "SensorCorrectionAdjustment", "SensorMinValue", "SensorMaxValue", "SetPointRampRateorSoftStartRamp", "SetPointControlOutputRate", "ControlOutputType", "SsrControlOutputType", "OutputOnOffHysteresisValue", "ProcessVariableSamplingRate", "PvInputFilterFactorMode", "OutputProportionalCycleTime", "AcHeatersHalfCycleTime" }, null, null, null) })); } #endregion @@ -86,6 +88,8 @@ namespace Tango.PMR.Hardware { outputOnOffHysteresisValue_ = other.outputOnOffHysteresisValue_; processVariableSamplingRate_ = other.processVariableSamplingRate_; pvInputFilterFactorMode_ = other.pvInputFilterFactorMode_; + outputProportionalCycleTime_ = other.outputProportionalCycleTime_; + acHeatersHalfCycleTime_ = other.acHeatersHalfCycleTime_; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -106,9 +110,9 @@ namespace Tango.PMR.Hardware { /// Field number for the "OutputProportionalPowerLimit" field. public const int OutputProportionalPowerLimitFieldNumber = 2; - private int outputProportionalPowerLimit_; + private double outputProportionalPowerLimit_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int OutputProportionalPowerLimit { + public double OutputProportionalPowerLimit { get { return outputProportionalPowerLimit_; } set { outputProportionalPowerLimit_ = value; @@ -117,9 +121,9 @@ namespace Tango.PMR.Hardware { /// Field number for the "OutputProportionalBand" field. public const int OutputProportionalBandFieldNumber = 3; - private int outputProportionalBand_; + private double outputProportionalBand_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int OutputProportionalBand { + public double OutputProportionalBand { get { return outputProportionalBand_; } set { outputProportionalBand_ = value; @@ -128,9 +132,9 @@ namespace Tango.PMR.Hardware { /// Field number for the "IntegralTime" field. public const int IntegralTimeFieldNumber = 4; - private int integralTime_; + private double integralTime_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int IntegralTime { + public double IntegralTime { get { return integralTime_; } set { integralTime_ = value; @@ -139,9 +143,9 @@ namespace Tango.PMR.Hardware { /// Field number for the "DerivativeTime" field. public const int DerivativeTimeFieldNumber = 5; - private int derivativeTime_; + private double derivativeTime_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int DerivativeTime { + public double DerivativeTime { get { return derivativeTime_; } set { derivativeTime_ = value; @@ -150,9 +154,9 @@ namespace Tango.PMR.Hardware { /// Field number for the "SensorCorrectionAdjustment" field. public const int SensorCorrectionAdjustmentFieldNumber = 6; - private int sensorCorrectionAdjustment_; + private double sensorCorrectionAdjustment_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int SensorCorrectionAdjustment { + public double SensorCorrectionAdjustment { get { return sensorCorrectionAdjustment_; } set { sensorCorrectionAdjustment_ = value; @@ -161,9 +165,9 @@ namespace Tango.PMR.Hardware { /// Field number for the "SensorMinValue" field. public const int SensorMinValueFieldNumber = 7; - private int sensorMinValue_; + private double sensorMinValue_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int SensorMinValue { + public double SensorMinValue { get { return sensorMinValue_; } set { sensorMinValue_ = value; @@ -172,9 +176,9 @@ namespace Tango.PMR.Hardware { /// Field number for the "SensorMaxValue" field. public const int SensorMaxValueFieldNumber = 8; - private int sensorMaxValue_; + private double sensorMaxValue_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int SensorMaxValue { + public double SensorMaxValue { get { return sensorMaxValue_; } set { sensorMaxValue_ = value; @@ -183,9 +187,9 @@ namespace Tango.PMR.Hardware { /// Field number for the "SetPointRampRateorSoftStartRamp" field. public const int SetPointRampRateorSoftStartRampFieldNumber = 9; - private int setPointRampRateorSoftStartRamp_; + private double setPointRampRateorSoftStartRamp_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int SetPointRampRateorSoftStartRamp { + public double SetPointRampRateorSoftStartRamp { get { return setPointRampRateorSoftStartRamp_; } set { setPointRampRateorSoftStartRamp_ = value; @@ -194,9 +198,9 @@ namespace Tango.PMR.Hardware { /// Field number for the "SetPointControlOutputRate" field. public const int SetPointControlOutputRateFieldNumber = 10; - private int setPointControlOutputRate_; + private double setPointControlOutputRate_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int SetPointControlOutputRate { + public double SetPointControlOutputRate { get { return setPointControlOutputRate_; } set { setPointControlOutputRate_ = value; @@ -205,9 +209,9 @@ namespace Tango.PMR.Hardware { /// Field number for the "ControlOutputType" field. public const int ControlOutputTypeFieldNumber = 11; - private int controlOutputType_; + private double controlOutputType_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int ControlOutputType { + public double ControlOutputType { get { return controlOutputType_; } set { controlOutputType_ = value; @@ -216,9 +220,9 @@ namespace Tango.PMR.Hardware { /// Field number for the "SsrControlOutputType" field. public const int SsrControlOutputTypeFieldNumber = 12; - private int ssrControlOutputType_; + private double ssrControlOutputType_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int SsrControlOutputType { + public double SsrControlOutputType { get { return ssrControlOutputType_; } set { ssrControlOutputType_ = value; @@ -227,9 +231,9 @@ namespace Tango.PMR.Hardware { /// Field number for the "OutputOnOffHysteresisValue" field. public const int OutputOnOffHysteresisValueFieldNumber = 13; - private int outputOnOffHysteresisValue_; + private double outputOnOffHysteresisValue_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int OutputOnOffHysteresisValue { + public double OutputOnOffHysteresisValue { get { return outputOnOffHysteresisValue_; } set { outputOnOffHysteresisValue_ = value; @@ -238,9 +242,9 @@ namespace Tango.PMR.Hardware { /// Field number for the "ProcessVariableSamplingRate" field. public const int ProcessVariableSamplingRateFieldNumber = 14; - private int processVariableSamplingRate_; + private double processVariableSamplingRate_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int ProcessVariableSamplingRate { + public double ProcessVariableSamplingRate { get { return processVariableSamplingRate_; } set { processVariableSamplingRate_ = value; @@ -249,15 +253,37 @@ namespace Tango.PMR.Hardware { /// Field number for the "PvInputFilterFactorMode" field. public const int PvInputFilterFactorModeFieldNumber = 15; - private int pvInputFilterFactorMode_; + private double pvInputFilterFactorMode_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int PvInputFilterFactorMode { + public double PvInputFilterFactorMode { get { return pvInputFilterFactorMode_; } set { pvInputFilterFactorMode_ = value; } } + /// Field number for the "OutputProportionalCycleTime" field. + public const int OutputProportionalCycleTimeFieldNumber = 16; + private int outputProportionalCycleTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int OutputProportionalCycleTime { + get { return outputProportionalCycleTime_; } + set { + outputProportionalCycleTime_ = value; + } + } + + /// Field number for the "AcHeatersHalfCycleTime" field. + public const int AcHeatersHalfCycleTimeFieldNumber = 17; + private int acHeatersHalfCycleTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int AcHeatersHalfCycleTime { + get { return acHeatersHalfCycleTime_; } + set { + acHeatersHalfCycleTime_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as HardwarePidControl); @@ -286,6 +312,8 @@ namespace Tango.PMR.Hardware { if (OutputOnOffHysteresisValue != other.OutputOnOffHysteresisValue) return false; if (ProcessVariableSamplingRate != other.ProcessVariableSamplingRate) return false; if (PvInputFilterFactorMode != other.PvInputFilterFactorMode) return false; + if (OutputProportionalCycleTime != other.OutputProportionalCycleTime) return false; + if (AcHeatersHalfCycleTime != other.AcHeatersHalfCycleTime) return false; return true; } @@ -293,20 +321,22 @@ namespace Tango.PMR.Hardware { public override int GetHashCode() { int hash = 1; if (HardwarePidControlType != 0) hash ^= HardwarePidControlType.GetHashCode(); - if (OutputProportionalPowerLimit != 0) hash ^= OutputProportionalPowerLimit.GetHashCode(); - if (OutputProportionalBand != 0) hash ^= OutputProportionalBand.GetHashCode(); - if (IntegralTime != 0) hash ^= IntegralTime.GetHashCode(); - if (DerivativeTime != 0) hash ^= DerivativeTime.GetHashCode(); - if (SensorCorrectionAdjustment != 0) hash ^= SensorCorrectionAdjustment.GetHashCode(); - if (SensorMinValue != 0) hash ^= SensorMinValue.GetHashCode(); - if (SensorMaxValue != 0) hash ^= SensorMaxValue.GetHashCode(); - if (SetPointRampRateorSoftStartRamp != 0) hash ^= SetPointRampRateorSoftStartRamp.GetHashCode(); - if (SetPointControlOutputRate != 0) hash ^= SetPointControlOutputRate.GetHashCode(); - if (ControlOutputType != 0) hash ^= ControlOutputType.GetHashCode(); - if (SsrControlOutputType != 0) hash ^= SsrControlOutputType.GetHashCode(); - if (OutputOnOffHysteresisValue != 0) hash ^= OutputOnOffHysteresisValue.GetHashCode(); - if (ProcessVariableSamplingRate != 0) hash ^= ProcessVariableSamplingRate.GetHashCode(); - if (PvInputFilterFactorMode != 0) hash ^= PvInputFilterFactorMode.GetHashCode(); + if (OutputProportionalPowerLimit != 0D) hash ^= OutputProportionalPowerLimit.GetHashCode(); + if (OutputProportionalBand != 0D) hash ^= OutputProportionalBand.GetHashCode(); + if (IntegralTime != 0D) hash ^= IntegralTime.GetHashCode(); + if (DerivativeTime != 0D) hash ^= DerivativeTime.GetHashCode(); + if (SensorCorrectionAdjustment != 0D) hash ^= SensorCorrectionAdjustment.GetHashCode(); + if (SensorMinValue != 0D) hash ^= SensorMinValue.GetHashCode(); + if (SensorMaxValue != 0D) hash ^= SensorMaxValue.GetHashCode(); + if (SetPointRampRateorSoftStartRamp != 0D) hash ^= SetPointRampRateorSoftStartRamp.GetHashCode(); + if (SetPointControlOutputRate != 0D) hash ^= SetPointControlOutputRate.GetHashCode(); + if (ControlOutputType != 0D) hash ^= ControlOutputType.GetHashCode(); + if (SsrControlOutputType != 0D) hash ^= SsrControlOutputType.GetHashCode(); + if (OutputOnOffHysteresisValue != 0D) hash ^= OutputOnOffHysteresisValue.GetHashCode(); + if (ProcessVariableSamplingRate != 0D) hash ^= ProcessVariableSamplingRate.GetHashCode(); + if (PvInputFilterFactorMode != 0D) hash ^= PvInputFilterFactorMode.GetHashCode(); + if (OutputProportionalCycleTime != 0) hash ^= OutputProportionalCycleTime.GetHashCode(); + if (AcHeatersHalfCycleTime != 0) hash ^= AcHeatersHalfCycleTime.GetHashCode(); return hash; } @@ -321,61 +351,69 @@ namespace Tango.PMR.Hardware { output.WriteRawTag(8); output.WriteEnum((int) HardwarePidControlType); } - if (OutputProportionalPowerLimit != 0) { - output.WriteRawTag(16); - output.WriteInt32(OutputProportionalPowerLimit); + if (OutputProportionalPowerLimit != 0D) { + output.WriteRawTag(17); + output.WriteDouble(OutputProportionalPowerLimit); } - if (OutputProportionalBand != 0) { - output.WriteRawTag(24); - output.WriteInt32(OutputProportionalBand); + if (OutputProportionalBand != 0D) { + output.WriteRawTag(25); + output.WriteDouble(OutputProportionalBand); } - if (IntegralTime != 0) { - output.WriteRawTag(32); - output.WriteInt32(IntegralTime); + if (IntegralTime != 0D) { + output.WriteRawTag(33); + output.WriteDouble(IntegralTime); } - if (DerivativeTime != 0) { - output.WriteRawTag(40); - output.WriteInt32(DerivativeTime); + if (DerivativeTime != 0D) { + output.WriteRawTag(41); + output.WriteDouble(DerivativeTime); } - if (SensorCorrectionAdjustment != 0) { - output.WriteRawTag(48); - output.WriteInt32(SensorCorrectionAdjustment); + if (SensorCorrectionAdjustment != 0D) { + output.WriteRawTag(49); + output.WriteDouble(SensorCorrectionAdjustment); } - if (SensorMinValue != 0) { - output.WriteRawTag(56); - output.WriteInt32(SensorMinValue); + if (SensorMinValue != 0D) { + output.WriteRawTag(57); + output.WriteDouble(SensorMinValue); } - if (SensorMaxValue != 0) { - output.WriteRawTag(64); - output.WriteInt32(SensorMaxValue); + if (SensorMaxValue != 0D) { + output.WriteRawTag(65); + output.WriteDouble(SensorMaxValue); } - if (SetPointRampRateorSoftStartRamp != 0) { - output.WriteRawTag(72); - output.WriteInt32(SetPointRampRateorSoftStartRamp); + if (SetPointRampRateorSoftStartRamp != 0D) { + output.WriteRawTag(73); + output.WriteDouble(SetPointRampRateorSoftStartRamp); } - if (SetPointControlOutputRate != 0) { - output.WriteRawTag(80); - output.WriteInt32(SetPointControlOutputRate); + if (SetPointControlOutputRate != 0D) { + output.WriteRawTag(81); + output.WriteDouble(SetPointControlOutputRate); } - if (ControlOutputType != 0) { - output.WriteRawTag(88); - output.WriteInt32(ControlOutputType); + if (ControlOutputType != 0D) { + output.WriteRawTag(89); + output.WriteDouble(ControlOutputType); } - if (SsrControlOutputType != 0) { - output.WriteRawTag(96); - output.WriteInt32(SsrControlOutputType); + if (SsrControlOutputType != 0D) { + output.WriteRawTag(97); + output.WriteDouble(SsrControlOutputType); } - if (OutputOnOffHysteresisValue != 0) { - output.WriteRawTag(104); - output.WriteInt32(OutputOnOffHysteresisValue); + if (OutputOnOffHysteresisValue != 0D) { + output.WriteRawTag(105); + output.WriteDouble(OutputOnOffHysteresisValue); } - if (ProcessVariableSamplingRate != 0) { - output.WriteRawTag(112); - output.WriteInt32(ProcessVariableSamplingRate); + if (ProcessVariableSamplingRate != 0D) { + output.WriteRawTag(113); + output.WriteDouble(ProcessVariableSamplingRate); } - if (PvInputFilterFactorMode != 0) { - output.WriteRawTag(120); - output.WriteInt32(PvInputFilterFactorMode); + if (PvInputFilterFactorMode != 0D) { + output.WriteRawTag(121); + output.WriteDouble(PvInputFilterFactorMode); + } + if (OutputProportionalCycleTime != 0) { + output.WriteRawTag(128, 1); + output.WriteInt32(OutputProportionalCycleTime); + } + if (AcHeatersHalfCycleTime != 0) { + output.WriteRawTag(136, 1); + output.WriteInt32(AcHeatersHalfCycleTime); } } @@ -385,47 +423,53 @@ namespace Tango.PMR.Hardware { if (HardwarePidControlType != 0) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) HardwarePidControlType); } - if (OutputProportionalPowerLimit != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(OutputProportionalPowerLimit); + if (OutputProportionalPowerLimit != 0D) { + size += 1 + 8; + } + if (OutputProportionalBand != 0D) { + size += 1 + 8; } - if (OutputProportionalBand != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(OutputProportionalBand); + if (IntegralTime != 0D) { + size += 1 + 8; } - if (IntegralTime != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(IntegralTime); + if (DerivativeTime != 0D) { + size += 1 + 8; } - if (DerivativeTime != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(DerivativeTime); + if (SensorCorrectionAdjustment != 0D) { + size += 1 + 8; } - if (SensorCorrectionAdjustment != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(SensorCorrectionAdjustment); + if (SensorMinValue != 0D) { + size += 1 + 8; } - if (SensorMinValue != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(SensorMinValue); + if (SensorMaxValue != 0D) { + size += 1 + 8; } - if (SensorMaxValue != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(SensorMaxValue); + if (SetPointRampRateorSoftStartRamp != 0D) { + size += 1 + 8; } - if (SetPointRampRateorSoftStartRamp != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(SetPointRampRateorSoftStartRamp); + if (SetPointControlOutputRate != 0D) { + size += 1 + 8; } - if (SetPointControlOutputRate != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(SetPointControlOutputRate); + if (ControlOutputType != 0D) { + size += 1 + 8; } - if (ControlOutputType != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(ControlOutputType); + if (SsrControlOutputType != 0D) { + size += 1 + 8; } - if (SsrControlOutputType != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(SsrControlOutputType); + if (OutputOnOffHysteresisValue != 0D) { + size += 1 + 8; } - if (OutputOnOffHysteresisValue != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(OutputOnOffHysteresisValue); + if (ProcessVariableSamplingRate != 0D) { + size += 1 + 8; } - if (ProcessVariableSamplingRate != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(ProcessVariableSamplingRate); + if (PvInputFilterFactorMode != 0D) { + size += 1 + 8; } - if (PvInputFilterFactorMode != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(PvInputFilterFactorMode); + if (OutputProportionalCycleTime != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(OutputProportionalCycleTime); + } + if (AcHeatersHalfCycleTime != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(AcHeatersHalfCycleTime); } return size; } @@ -438,48 +482,54 @@ namespace Tango.PMR.Hardware { if (other.HardwarePidControlType != 0) { HardwarePidControlType = other.HardwarePidControlType; } - if (other.OutputProportionalPowerLimit != 0) { + if (other.OutputProportionalPowerLimit != 0D) { OutputProportionalPowerLimit = other.OutputProportionalPowerLimit; } - if (other.OutputProportionalBand != 0) { + if (other.OutputProportionalBand != 0D) { OutputProportionalBand = other.OutputProportionalBand; } - if (other.IntegralTime != 0) { + if (other.IntegralTime != 0D) { IntegralTime = other.IntegralTime; } - if (other.DerivativeTime != 0) { + if (other.DerivativeTime != 0D) { DerivativeTime = other.DerivativeTime; } - if (other.SensorCorrectionAdjustment != 0) { + if (other.SensorCorrectionAdjustment != 0D) { SensorCorrectionAdjustment = other.SensorCorrectionAdjustment; } - if (other.SensorMinValue != 0) { + if (other.SensorMinValue != 0D) { SensorMinValue = other.SensorMinValue; } - if (other.SensorMaxValue != 0) { + if (other.SensorMaxValue != 0D) { SensorMaxValue = other.SensorMaxValue; } - if (other.SetPointRampRateorSoftStartRamp != 0) { + if (other.SetPointRampRateorSoftStartRamp != 0D) { SetPointRampRateorSoftStartRamp = other.SetPointRampRateorSoftStartRamp; } - if (other.SetPointControlOutputRate != 0) { + if (other.SetPointControlOutputRate != 0D) { SetPointControlOutputRate = other.SetPointControlOutputRate; } - if (other.ControlOutputType != 0) { + if (other.ControlOutputType != 0D) { ControlOutputType = other.ControlOutputType; } - if (other.SsrControlOutputType != 0) { + if (other.SsrControlOutputType != 0D) { SsrControlOutputType = other.SsrControlOutputType; } - if (other.OutputOnOffHysteresisValue != 0) { + if (other.OutputOnOffHysteresisValue != 0D) { OutputOnOffHysteresisValue = other.OutputOnOffHysteresisValue; } - if (other.ProcessVariableSamplingRate != 0) { + if (other.ProcessVariableSamplingRate != 0D) { ProcessVariableSamplingRate = other.ProcessVariableSamplingRate; } - if (other.PvInputFilterFactorMode != 0) { + if (other.PvInputFilterFactorMode != 0D) { PvInputFilterFactorMode = other.PvInputFilterFactorMode; } + if (other.OutputProportionalCycleTime != 0) { + OutputProportionalCycleTime = other.OutputProportionalCycleTime; + } + if (other.AcHeatersHalfCycleTime != 0) { + AcHeatersHalfCycleTime = other.AcHeatersHalfCycleTime; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -494,60 +544,68 @@ namespace Tango.PMR.Hardware { hardwarePidControlType_ = (global::Tango.PMR.Hardware.HardwarePidControlType) input.ReadEnum(); break; } - case 16: { - OutputProportionalPowerLimit = input.ReadInt32(); + case 17: { + OutputProportionalPowerLimit = input.ReadDouble(); + break; + } + case 25: { + OutputProportionalBand = input.ReadDouble(); + break; + } + case 33: { + IntegralTime = input.ReadDouble(); break; } - case 24: { - OutputProportionalBand = input.ReadInt32(); + case 41: { + DerivativeTime = input.ReadDouble(); break; } - case 32: { - IntegralTime = input.ReadInt32(); + case 49: { + SensorCorrectionAdjustment = input.ReadDouble(); break; } - case 40: { - DerivativeTime = input.ReadInt32(); + case 57: { + SensorMinValue = input.ReadDouble(); break; } - case 48: { - SensorCorrectionAdjustment = input.ReadInt32(); + case 65: { + SensorMaxValue = input.ReadDouble(); break; } - case 56: { - SensorMinValue = input.ReadInt32(); + case 73: { + SetPointRampRateorSoftStartRamp = input.ReadDouble(); break; } - case 64: { - SensorMaxValue = input.ReadInt32(); + case 81: { + SetPointControlOutputRate = input.ReadDouble(); break; } - case 72: { - SetPointRampRateorSoftStartRamp = input.ReadInt32(); + case 89: { + ControlOutputType = input.ReadDouble(); break; } - case 80: { - SetPointControlOutputRate = input.ReadInt32(); + case 97: { + SsrControlOutputType = input.ReadDouble(); break; } - case 88: { - ControlOutputType = input.ReadInt32(); + case 105: { + OutputOnOffHysteresisValue = input.ReadDouble(); break; } - case 96: { - SsrControlOutputType = input.ReadInt32(); + case 113: { + ProcessVariableSamplingRate = input.ReadDouble(); break; } - case 104: { - OutputOnOffHysteresisValue = input.ReadInt32(); + case 121: { + PvInputFilterFactorMode = input.ReadDouble(); break; } - case 112: { - ProcessVariableSamplingRate = input.ReadInt32(); + case 128: { + OutputProportionalCycleTime = input.ReadInt32(); break; } - case 120: { - PvInputFilterFactorMode = input.ReadInt32(); + case 136: { + AcHeatersHalfCycleTime = input.ReadInt32(); break; } } diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorHomeMarkRequest.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorHomeMarkRequest.cs new file mode 100644 index 000000000..b7a630ba8 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorHomeMarkRequest.cs @@ -0,0 +1,191 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubMotorHomeMarkRequest.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.Stubs { + + /// Holder for reflection information generated from StubMotorHomeMarkRequest.proto + public static partial class StubMotorHomeMarkRequestReflection { + + #region Descriptor + /// File descriptor for StubMotorHomeMarkRequest.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static StubMotorHomeMarkRequestReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ch5TdHViTW90b3JIb21lTWFya1JlcXVlc3QucHJvdG8SD1RhbmdvLlBNUi5T", + "dHVicyJQChhTdHViTW90b3JIb21lTWFya1JlcXVlc3QSEAoITW90b3JfSUQY", + "ASABKA0SIgoaU2V0X0hvbWVfTWFya19HT19Ib21lX01hcmsYAiABKA1CGwoZ", + "Y29tLnR3aW5lLnRhbmdvLnBtci5zdHVic2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorHomeMarkRequest), global::Tango.PMR.Stubs.StubMotorHomeMarkRequest.Parser, new[]{ "MotorID", "SetHomeMarkGOHomeMark" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class StubMotorHomeMarkRequest : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StubMotorHomeMarkRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.Stubs.StubMotorHomeMarkRequestReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubMotorHomeMarkRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubMotorHomeMarkRequest(StubMotorHomeMarkRequest other) : this() { + motorID_ = other.motorID_; + setHomeMarkGOHomeMark_ = other.setHomeMarkGOHomeMark_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubMotorHomeMarkRequest Clone() { + return new StubMotorHomeMarkRequest(this); + } + + /// Field number for the "Motor_ID" field. + public const int MotorIDFieldNumber = 1; + private uint motorID_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint MotorID { + get { return motorID_; } + set { + motorID_ = value; + } + } + + /// Field number for the "Set_Home_Mark_GO_Home_Mark" field. + public const int SetHomeMarkGOHomeMarkFieldNumber = 2; + private uint setHomeMarkGOHomeMark_; + /// + /// 0..3 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint SetHomeMarkGOHomeMark { + get { return setHomeMarkGOHomeMark_; } + set { + setHomeMarkGOHomeMark_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as StubMotorHomeMarkRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(StubMotorHomeMarkRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MotorID != other.MotorID) return false; + if (SetHomeMarkGOHomeMark != other.SetHomeMarkGOHomeMark) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MotorID != 0) hash ^= MotorID.GetHashCode(); + if (SetHomeMarkGOHomeMark != 0) hash ^= SetHomeMarkGOHomeMark.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MotorID != 0) { + output.WriteRawTag(8); + output.WriteUInt32(MotorID); + } + if (SetHomeMarkGOHomeMark != 0) { + output.WriteRawTag(16); + output.WriteUInt32(SetHomeMarkGOHomeMark); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MotorID != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MotorID); + } + if (SetHomeMarkGOHomeMark != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(SetHomeMarkGOHomeMark); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(StubMotorHomeMarkRequest other) { + if (other == null) { + return; + } + if (other.MotorID != 0) { + MotorID = other.MotorID; + } + if (other.SetHomeMarkGOHomeMark != 0) { + SetHomeMarkGOHomeMark = other.SetHomeMarkGOHomeMark; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 8: { + MotorID = input.ReadUInt32(); + break; + } + case 16: { + SetHomeMarkGOHomeMark = input.ReadUInt32(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorHomeMarkResponse.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorHomeMarkResponse.cs new file mode 100644 index 000000000..817750898 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorHomeMarkResponse.cs @@ -0,0 +1,188 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubMotorHomeMarkResponse.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.Stubs { + + /// Holder for reflection information generated from StubMotorHomeMarkResponse.proto + public static partial class StubMotorHomeMarkResponseReflection { + + #region Descriptor + /// File descriptor for StubMotorHomeMarkResponse.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static StubMotorHomeMarkResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ch9TdHViTW90b3JIb21lTWFya1Jlc3BvbnNlLnByb3RvEg9UYW5nby5QTVIu", + "U3R1YnMiPwoZU3R1Yk1vdG9ySG9tZU1hcmtSZXNwb25zZRIQCghNb3Rvcl9J", + "RBgBIAEoDRIQCghQb3NpdGlvbhgCIAEoDUIbChljb20udHdpbmUudGFuZ28u", + "cG1yLnN0dWJzYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorHomeMarkResponse), global::Tango.PMR.Stubs.StubMotorHomeMarkResponse.Parser, new[]{ "MotorID", "Position" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class StubMotorHomeMarkResponse : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StubMotorHomeMarkResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.Stubs.StubMotorHomeMarkResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubMotorHomeMarkResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubMotorHomeMarkResponse(StubMotorHomeMarkResponse other) : this() { + motorID_ = other.motorID_; + position_ = other.position_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubMotorHomeMarkResponse Clone() { + return new StubMotorHomeMarkResponse(this); + } + + /// Field number for the "Motor_ID" field. + public const int MotorIDFieldNumber = 1; + private uint motorID_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint MotorID { + get { return motorID_; } + set { + motorID_ = value; + } + } + + /// Field number for the "Position" field. + public const int PositionFieldNumber = 2; + private uint position_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint Position { + get { return position_; } + set { + position_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as StubMotorHomeMarkResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(StubMotorHomeMarkResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MotorID != other.MotorID) return false; + if (Position != other.Position) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MotorID != 0) hash ^= MotorID.GetHashCode(); + if (Position != 0) hash ^= Position.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MotorID != 0) { + output.WriteRawTag(8); + output.WriteUInt32(MotorID); + } + if (Position != 0) { + output.WriteRawTag(16); + output.WriteUInt32(Position); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MotorID != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MotorID); + } + if (Position != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Position); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(StubMotorHomeMarkResponse other) { + if (other == null) { + return; + } + if (other.MotorID != 0) { + MotorID = other.MotorID; + } + if (other.Position != 0) { + Position = other.Position; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 8: { + MotorID = input.ReadUInt32(); + break; + } + case 16: { + Position = input.ReadUInt32(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorRunStepTickRequest.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorRunStepTickRequest.cs new file mode 100644 index 000000000..1697b715a --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorRunStepTickRequest.cs @@ -0,0 +1,216 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubMotorRunStepTickRequest.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.Stubs { + + /// Holder for reflection information generated from StubMotorRunStepTickRequest.proto + public static partial class StubMotorRunStepTickRequestReflection { + + #region Descriptor + /// File descriptor for StubMotorRunStepTickRequest.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static StubMotorRunStepTickRequestReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiFTdHViTW90b3JSdW5TdGVwVGlja1JlcXVlc3QucHJvdG8SD1RhbmdvLlBN", + "Ui5TdHVicyJRChtTdHViTW90b3JSdW5TdGVwVGlja1JlcXVlc3QSEAoITW90", + "b3JfSUQYASABKA0SEQoJRGlyZWN0aW9uGAIgASgIEg0KBVNwZWVkGAMgASgB", + "QhsKGWNvbS50d2luZS50YW5nby5wbXIuc3R1YnNiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorRunStepTickRequest), global::Tango.PMR.Stubs.StubMotorRunStepTickRequest.Parser, new[]{ "MotorID", "Direction", "Speed" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class StubMotorRunStepTickRequest : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StubMotorRunStepTickRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.Stubs.StubMotorRunStepTickRequestReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubMotorRunStepTickRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubMotorRunStepTickRequest(StubMotorRunStepTickRequest other) : this() { + motorID_ = other.motorID_; + direction_ = other.direction_; + speed_ = other.speed_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubMotorRunStepTickRequest Clone() { + return new StubMotorRunStepTickRequest(this); + } + + /// Field number for the "Motor_ID" field. + public const int MotorIDFieldNumber = 1; + private uint motorID_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint MotorID { + get { return motorID_; } + set { + motorID_ = value; + } + } + + /// Field number for the "Direction" field. + public const int DirectionFieldNumber = 2; + private bool direction_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Direction { + get { return direction_; } + set { + direction_ = value; + } + } + + /// Field number for the "Speed" field. + public const int SpeedFieldNumber = 3; + private double speed_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public double Speed { + get { return speed_; } + set { + speed_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as StubMotorRunStepTickRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(StubMotorRunStepTickRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MotorID != other.MotorID) return false; + if (Direction != other.Direction) return false; + if (Speed != other.Speed) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MotorID != 0) hash ^= MotorID.GetHashCode(); + if (Direction != false) hash ^= Direction.GetHashCode(); + if (Speed != 0D) hash ^= Speed.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MotorID != 0) { + output.WriteRawTag(8); + output.WriteUInt32(MotorID); + } + if (Direction != false) { + output.WriteRawTag(16); + output.WriteBool(Direction); + } + if (Speed != 0D) { + output.WriteRawTag(25); + output.WriteDouble(Speed); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MotorID != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MotorID); + } + if (Direction != false) { + size += 1 + 1; + } + if (Speed != 0D) { + size += 1 + 8; + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(StubMotorRunStepTickRequest other) { + if (other == null) { + return; + } + if (other.MotorID != 0) { + MotorID = other.MotorID; + } + if (other.Direction != false) { + Direction = other.Direction; + } + if (other.Speed != 0D) { + Speed = other.Speed; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 8: { + MotorID = input.ReadUInt32(); + break; + } + case 16: { + Direction = input.ReadBool(); + break; + } + case 25: { + Speed = input.ReadDouble(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorRunStepTickResponse.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorRunStepTickResponse.cs new file mode 100644 index 000000000..d1b53c1ba --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorRunStepTickResponse.cs @@ -0,0 +1,365 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubMotorRunStepTickResponse.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.Stubs { + + /// Holder for reflection information generated from StubMotorRunStepTickResponse.proto + public static partial class StubMotorRunStepTickResponseReflection { + + #region Descriptor + /// File descriptor for StubMotorRunStepTickResponse.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static StubMotorRunStepTickResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiJTdHViTW90b3JSdW5TdGVwVGlja1Jlc3BvbnNlLnByb3RvEg9UYW5nby5Q", + "TVIuU3R1YnMisgEKHFN0dWJNb3RvclJ1blN0ZXBUaWNrUmVzcG9uc2USEAoI", + "TW90b3JfSUQYASABKA0SDQoFU3BlZWQYAiABKAESEgoKU3RhdHVzX1JlZxgD", + "IAEoDRIRCglEaXJlY3Rpb24YBCABKAgSEgoKTW90X1N0YXR1cxgFIAEoDRIT", + "CgtTVEVQX0xPU1NfQRgGIAEoCBITCgtTVEVQX0xPU1NfQhgHIAEoCBIMCgRC", + "VVNZGAggASgIQhsKGWNvbS50d2luZS50YW5nby5wbXIuc3R1YnNiBnByb3Rv", + "Mw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorRunStepTickResponse), global::Tango.PMR.Stubs.StubMotorRunStepTickResponse.Parser, new[]{ "MotorID", "Speed", "StatusReg", "Direction", "MotStatus", "STEPLOSSA", "STEPLOSSB", "BUSY" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class StubMotorRunStepTickResponse : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StubMotorRunStepTickResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.Stubs.StubMotorRunStepTickResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubMotorRunStepTickResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubMotorRunStepTickResponse(StubMotorRunStepTickResponse other) : this() { + motorID_ = other.motorID_; + speed_ = other.speed_; + statusReg_ = other.statusReg_; + direction_ = other.direction_; + motStatus_ = other.motStatus_; + sTEPLOSSA_ = other.sTEPLOSSA_; + sTEPLOSSB_ = other.sTEPLOSSB_; + bUSY_ = other.bUSY_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubMotorRunStepTickResponse Clone() { + return new StubMotorRunStepTickResponse(this); + } + + /// Field number for the "Motor_ID" field. + public const int MotorIDFieldNumber = 1; + private uint motorID_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint MotorID { + get { return motorID_; } + set { + motorID_ = value; + } + } + + /// Field number for the "Speed" field. + public const int SpeedFieldNumber = 2; + private double speed_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public double Speed { + get { return speed_; } + set { + speed_ = value; + } + } + + /// Field number for the "Status_Reg" field. + public const int StatusRegFieldNumber = 3; + private uint statusReg_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint StatusReg { + get { return statusReg_; } + set { + statusReg_ = value; + } + } + + /// Field number for the "Direction" field. + public const int DirectionFieldNumber = 4; + private bool direction_; + /// + /// Reverse / Forward + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Direction { + get { return direction_; } + set { + direction_ = value; + } + } + + /// Field number for the "Mot_Status" field. + public const int MotStatusFieldNumber = 5; + private uint motStatus_; + /// + ///Stopped / Acceleration / Deceleration / Constant speed + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint MotStatus { + get { return motStatus_; } + set { + motStatus_ = value; + } + } + + /// Field number for the "STEP_LOSS_A" field. + public const int STEPLOSSAFieldNumber = 6; + private bool sTEPLOSSA_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool STEPLOSSA { + get { return sTEPLOSSA_; } + set { + sTEPLOSSA_ = value; + } + } + + /// Field number for the "STEP_LOSS_B" field. + public const int STEPLOSSBFieldNumber = 7; + private bool sTEPLOSSB_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool STEPLOSSB { + get { return sTEPLOSSB_; } + set { + sTEPLOSSB_ = value; + } + } + + /// Field number for the "BUSY" field. + public const int BUSYFieldNumber = 8; + private bool bUSY_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool BUSY { + get { return bUSY_; } + set { + bUSY_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as StubMotorRunStepTickResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(StubMotorRunStepTickResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MotorID != other.MotorID) return false; + if (Speed != other.Speed) return false; + if (StatusReg != other.StatusReg) return false; + if (Direction != other.Direction) return false; + if (MotStatus != other.MotStatus) return false; + if (STEPLOSSA != other.STEPLOSSA) return false; + if (STEPLOSSB != other.STEPLOSSB) return false; + if (BUSY != other.BUSY) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MotorID != 0) hash ^= MotorID.GetHashCode(); + if (Speed != 0D) hash ^= Speed.GetHashCode(); + if (StatusReg != 0) hash ^= StatusReg.GetHashCode(); + if (Direction != false) hash ^= Direction.GetHashCode(); + if (MotStatus != 0) hash ^= MotStatus.GetHashCode(); + if (STEPLOSSA != false) hash ^= STEPLOSSA.GetHashCode(); + if (STEPLOSSB != false) hash ^= STEPLOSSB.GetHashCode(); + if (BUSY != false) hash ^= BUSY.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MotorID != 0) { + output.WriteRawTag(8); + output.WriteUInt32(MotorID); + } + if (Speed != 0D) { + output.WriteRawTag(17); + output.WriteDouble(Speed); + } + if (StatusReg != 0) { + output.WriteRawTag(24); + output.WriteUInt32(StatusReg); + } + if (Direction != false) { + output.WriteRawTag(32); + output.WriteBool(Direction); + } + if (MotStatus != 0) { + output.WriteRawTag(40); + output.WriteUInt32(MotStatus); + } + if (STEPLOSSA != false) { + output.WriteRawTag(48); + output.WriteBool(STEPLOSSA); + } + if (STEPLOSSB != false) { + output.WriteRawTag(56); + output.WriteBool(STEPLOSSB); + } + if (BUSY != false) { + output.WriteRawTag(64); + output.WriteBool(BUSY); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MotorID != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MotorID); + } + if (Speed != 0D) { + size += 1 + 8; + } + if (StatusReg != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(StatusReg); + } + if (Direction != false) { + size += 1 + 1; + } + if (MotStatus != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MotStatus); + } + if (STEPLOSSA != false) { + size += 1 + 1; + } + if (STEPLOSSB != false) { + size += 1 + 1; + } + if (BUSY != false) { + size += 1 + 1; + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(StubMotorRunStepTickResponse other) { + if (other == null) { + return; + } + if (other.MotorID != 0) { + MotorID = other.MotorID; + } + if (other.Speed != 0D) { + Speed = other.Speed; + } + if (other.StatusReg != 0) { + StatusReg = other.StatusReg; + } + if (other.Direction != false) { + Direction = other.Direction; + } + if (other.MotStatus != 0) { + MotStatus = other.MotStatus; + } + if (other.STEPLOSSA != false) { + STEPLOSSA = other.STEPLOSSA; + } + if (other.STEPLOSSB != false) { + STEPLOSSB = other.STEPLOSSB; + } + if (other.BUSY != false) { + BUSY = other.BUSY; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 8: { + MotorID = input.ReadUInt32(); + break; + } + case 17: { + Speed = input.ReadDouble(); + break; + } + case 24: { + StatusReg = input.ReadUInt32(); + break; + } + case 32: { + Direction = input.ReadBool(); + break; + } + case 40: { + MotStatus = input.ReadUInt32(); + break; + } + case 48: { + STEPLOSSA = input.ReadBool(); + break; + } + case 56: { + STEPLOSSB = input.ReadBool(); + break; + } + case 64: { + BUSY = input.ReadBool(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code -- cgit v1.3.1