aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Software/Code_Composer/twine_usblib_demo/.cproject2
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Common/MessageType.pb-c.c68
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Common/MessageType.pb-c.h26
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Job.pb-c.h4
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadBackRegRequest.pb-c.c105
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadBackRegRequest.pb-c.h80
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadBackRegResponse.pb-c.c132
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadBackRegResponse.pb-c.h89
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadVersionRequest.pb-c.c92
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadVersionRequest.pb-c.h75
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadVersionResponse.pb-c.c170
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadVersionResponse.pb-c.h92
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubL6470DriverRequest.pb-c.c339
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubL6470DriverRequest.pb-c.h110
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubL6470DriverResponse.pb-c.c274
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubL6470DriverResponse.pb-c.h105
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorInitRequest.pb-c.c196
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorInitRequest.pb-c.h91
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorInitResponse.pb-c.c105
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorInitResponse.pb-c.h74
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorMovRequest.pb-c.c118
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorMovRequest.pb-c.h76
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorMovResponse.pb-c.c170
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorMovResponse.pb-c.h90
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorPositionRequest.pb-c.c92
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorPositionRequest.pb-c.h72
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorPositionResponse.pb-c.c105
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorPositionResponse.pb-c.h74
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunRequest.pb-c.c118
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunRequest.pb-c.h76
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunResponse.pb-c.c170
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunResponse.pb-c.h90
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorSpeedRequest.pb-c.c92
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorSpeedRequest.pb-c.h72
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorSpeedResponse.pb-c.c105
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorSpeedResponse.pb-c.h74
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStatusRequest.pb-c.c105
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStatusRequest.pb-c.h74
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStatusResponse.pb-c.c287
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStatusResponse.pb-c.h102
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStopRequest.pb-c.c105
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStopRequest.pb-c.h77
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStopResponse.pb-c.c118
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStopResponse.pb-c.h82
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Calculate.c5
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Container.c34
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/DataDef.h70
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Progress.c5
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Cartridge.c9
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Dispenser.c5
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_ExtFlash.c10
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_FPGAReadBackReg.c69
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_FPGAReadBackReg.h11
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_FPGAReadVersion.c81
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_FPGAReadVersion.h6
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_GPIO.c25
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Heater.c5
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_L6470.c133
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_L6470.h3
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Motor.c448
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Motor.h7
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_MotorEncoder.c5
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_OptLimitSwitch.c5
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_SteperMotor.c5
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Valve.c5
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/temperature_sensor.c263
-rw-r--r--Software/Code_Composer/twine_usblib_demo/Stubs_Handler/temperature_sensor.h1
-rw-r--r--Software/Code_Composer/twine_usblib_demo/drivers/ADC_Sampling/ADC.c295
-rw-r--r--Software/Code_Composer/twine_usblib_demo/drivers/ADC_Sampling/ADC.h40
-rw-r--r--Software/Code_Composer/twine_usblib_demo/drivers/FPGA/FPGA.c88
-rw-r--r--Software/Code_Composer/twine_usblib_demo/drivers/FPGA/FPGA.h9
-rw-r--r--Software/Code_Composer/twine_usblib_demo/drivers/FPGA/FPGA_Comm.h731
-rw-r--r--Software/Code_Composer/twine_usblib_demo/drivers/FPGA/FPGA_SPI_Comm.c281
-rw-r--r--Software/Code_Composer/twine_usblib_demo/drivers/FPGA/Moters_Driver/L6470.c706
-rw-r--r--Software/Code_Composer/twine_usblib_demo/drivers/FPGA/Moters_Driver/L6470.h338
-rw-r--r--Software/Code_Composer/twine_usblib_demo/drivers/I2C_Communication/I2C.h31
-rw-r--r--Software/Code_Composer/twine_usblib_demo/drivers/SPI/SPI_Comm.c1031
-rw-r--r--Software/Code_Composer/twine_usblib_demo/drivers/SPI/SPI_Comm.h16
-rw-r--r--Software/Code_Composer/twine_usblib_demo/drivers/SPI/spi_master.c519
-rw-r--r--Software/Code_Composer/twine_usblib_demo/drivers/SPI/spi_master.h1
-rw-r--r--Software/Code_Composer/twine_usblib_demo/main.c28
-rw-r--r--Software/Code_Composer/twine_usblib_demo/tm4c129xnczad_startup_ccs.c3
-rw-r--r--Software/DB/Tango.mdfbin75497472 -> 75497472 bytes
-rw-r--r--Software/DB/Tango_log.ldfbin8388608 -> 8388608 bytes
-rw-r--r--Software/Graphics/external-bridge-tcp.pngbin0 -> 3618 bytes
-rw-r--r--Software/Graphics/external-bridge-usb.pngbin0 -> 3623 bytes
-rw-r--r--Software/Graphics/machine-trans.pngbin0 -> 45618 bytes
-rw-r--r--Software/PMR/Messages/Common/MessageType.proto21
-rw-r--r--Software/PMR/Messages/Stubs/StubFPGAReadBackRegRequest.proto10
-rw-r--r--Software/PMR/Messages/Stubs/StubFPGAReadBackRegResponse.proto12
-rw-r--r--Software/PMR/Messages/Stubs/StubFPGAReadVersionRequest.proto9
-rw-r--r--Software/PMR/Messages/Stubs/StubFPGAReadVersionResponse.proto15
-rw-r--r--Software/PMR/Messages/Stubs/StubL6470DriverRequest.proto28
-rw-r--r--Software/PMR/Messages/Stubs/StubL6470DriverResponse.proto23
-rw-r--r--Software/PMR/Messages/Stubs/StubMotorInitRequest.proto17
-rw-r--r--Software/PMR/Messages/Stubs/StubMotorInitResponse.proto10
-rw-r--r--Software/PMR/Messages/Stubs/StubMotorMovRequest.proto11
-rw-r--r--Software/PMR/Messages/Stubs/StubMotorMovResponse.proto16
-rw-r--r--Software/PMR/Messages/Stubs/StubMotorPositionRequest.proto9
-rw-r--r--Software/PMR/Messages/Stubs/StubMotorPositionResponse.proto10
-rw-r--r--Software/PMR/Messages/Stubs/StubMotorRunRequest.proto11
-rw-r--r--Software/PMR/Messages/Stubs/StubMotorRunResponse.proto16
-rw-r--r--Software/PMR/Messages/Stubs/StubMotorSpeedRequest.proto9
-rw-r--r--Software/PMR/Messages/Stubs/StubMotorSpeedResponse.proto10
-rw-r--r--Software/PMR/Messages/Stubs/StubMotorStatusRequest.proto10
-rw-r--r--Software/PMR/Messages/Stubs/StubMotorStatusResponse.proto24
-rw-r--r--Software/PMR/Messages/Stubs/StubMotorStopRequest.proto10
-rw-r--r--Software/PMR/Messages/Stubs/StubMotorStopResponse.proto11
-rw-r--r--Software/Visual_Studio/Tango.PMR/Common/MessageType.cs50
-rw-r--r--Software/Visual_Studio/Tango.PMR/Jobs/Job.cs252
-rw-r--r--Software/Visual_Studio/Tango.PMR/Jobs/Segment.cs33
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubFPGAReadBackRegRequest.cs194
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubFPGAReadBackRegResponse.cs257
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubFPGAReadVersionRequest.cs162
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubFPGAReadVersionResponse.cs339
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubL6470DriverRequest.cs701
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubL6470DriverResponse.cs564
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubMotorInitRequest.cs390
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubMotorInitResponse.cs188
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubMotorMovRequest.cs216
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubMotorMovResponse.cs336
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubMotorPositionRequest.cs159
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubMotorPositionResponse.cs188
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubMotorRunRequest.cs216
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubMotorRunResponse.cs336
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubMotorSpeedRequest.cs159
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubMotorSpeedResponse.cs188
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubMotorStatusRequest.cs188
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubMotorStatusResponse.cs585
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubMotorStopRequest.cs191
-rw-r--r--Software/Visual_Studio/Tango.PMR/Stubs/StubMotorStopResponse.cs222
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/App_Data/Tango.dbbin602112 -> 602112 bytes
132 files changed, 16410 insertions, 96 deletions
diff --git a/Software/Code_Composer/twine_usblib_demo/.cproject b/Software/Code_Composer/twine_usblib_demo/.cproject
index c6812f5ac..b1256533d 100644
--- a/Software/Code_Composer/twine_usblib_demo/.cproject
+++ b/Software/Code_Composer/twine_usblib_demo/.cproject
@@ -52,6 +52,8 @@
<option id="com.ti.ccstudio.buildDefinitions.TMS470_16.3.compilerID.LITTLE_ENDIAN.572182054" name="Little endian code [See 'General' page to edit] (--little_endian, -me)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_16.3.compilerID.LITTLE_ENDIAN" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_16.3.compilerID.INCLUDE_PATH.411074002" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_16.3.compilerID.INCLUDE_PATH" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/twine_usblib}&quot;"/>
+ <listOptionValue builtIn="false" value="C:\ti\tirtos_tivac_2_16_00_08\products\bios_6_45_01_29\packages"/>
+ <listOptionValue builtIn="false" value="C:\ti\xdctools_3_32_00_06_core\packages"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/grlib}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/twine_graphicslib}&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:/ti/TivaWare_C_Series-2.1.4.178/examples/boards/dk-tm4c129x&quot;"/>
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 a9684e855..02bf45004 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[46] =
+static const ProtobufCEnumValue message_type__enum_values_by_number[66] =
{
{ "RGB", "MESSAGE_TYPE__RGB", 0 },
{ "Job", "MESSAGE_TYPE__Job", 1 },
@@ -46,6 +46,26 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[46] =
{ "StubExtFlashReadResponse", "MESSAGE_TYPE__StubExtFlashReadResponse", 34 },
{ "StubExtFlashWriteRequest", "MESSAGE_TYPE__StubExtFlashWriteRequest", 35 },
{ "StubExtFlashWriteResponse", "MESSAGE_TYPE__StubExtFlashWriteResponse", 36 },
+ { "StubFPGAReadBackRegRequest", "MESSAGE_TYPE__StubFPGAReadBackRegRequest", 37 },
+ { "StubFPGAReadBackRegResponse", "MESSAGE_TYPE__StubFPGAReadBackRegResponse", 38 },
+ { "StubFPGAReadVersionRequest", "MESSAGE_TYPE__StubFPGAReadVersionRequest", 39 },
+ { "StubFPGAReadVersionResponse", "MESSAGE_TYPE__StubFPGAReadVersionResponse", 40 },
+ { "StubL6470DriverRequest", "MESSAGE_TYPE__StubL6470DriverRequest", 41 },
+ { "StubL6470DriverResponse", "MESSAGE_TYPE__StubL6470DriverResponse", 42 },
+ { "StubMotorInitRequest", "MESSAGE_TYPE__StubMotorInitRequest", 43 },
+ { "StubMotorInitResponse", "MESSAGE_TYPE__StubMotorInitResponse", 44 },
+ { "StubMotorRunRequest", "MESSAGE_TYPE__StubMotorRunRequest", 45 },
+ { "StubMotorRunResponse", "MESSAGE_TYPE__StubMotorRunResponse", 46 },
+ { "StubMotorStopRequest", "MESSAGE_TYPE__StubMotorStopRequest", 47 },
+ { "StubMotorStopResponse", "MESSAGE_TYPE__StubMotorStopResponse", 48 },
+ { "StubMotorStatusRequest", "MESSAGE_TYPE__StubMotorStatusRequest", 49 },
+ { "StubMotorStatusResponse", "MESSAGE_TYPE__StubMotorStatusResponse", 50 },
+ { "StubMotorMovRequest", "MESSAGE_TYPE__StubMotorMovRequest", 51 },
+ { "StubMotorMovResponse", "MESSAGE_TYPE__StubMotorMovResponse", 52 },
+ { "StubMotorSpeedRequest", "MESSAGE_TYPE__StubMotorSpeedRequest", 53 },
+ { "StubMotorSpeedResponse", "MESSAGE_TYPE__StubMotorSpeedResponse", 54 },
+ { "StubMotorPositionRequest", "MESSAGE_TYPE__StubMotorPositionRequest", 55 },
+ { "StubMotorPositionResponse", "MESSAGE_TYPE__StubMotorPositionResponse", 56 },
{ "ExternalBridgeUdpDiscoveryPacket", "MESSAGE_TYPE__ExternalBridgeUdpDiscoveryPacket", 1000 },
{ "ExternalClientLoginRequest", "MESSAGE_TYPE__ExternalClientLoginRequest", 1001 },
{ "ExternalClientLoginResponse", "MESSAGE_TYPE__ExternalClientLoginResponse", 1002 },
@@ -57,22 +77,22 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[46] =
{ "KeepAliveResponse", "MESSAGE_TYPE__KeepAliveResponse", 1008 },
};
static const ProtobufCIntRange message_type__value_ranges[] = {
-{0, 0},{1000, 37},{0, 46}
+{0, 0},{1000, 57},{0, 66}
};
-static const ProtobufCEnumValueIndex message_type__enum_values_by_name[46] =
+static const ProtobufCEnumValueIndex message_type__enum_values_by_name[66] =
{
{ "CalculateRequest", 3 },
{ "CalculateResponse", 4 },
- { "DirectSynchronizationRequest", 40 },
- { "DirectSynchronizationResponse", 41 },
- { "ExternalBridgeUdpDiscoveryPacket", 37 },
- { "ExternalClientLoginRequest", 38 },
- { "ExternalClientLoginResponse", 39 },
+ { "DirectSynchronizationRequest", 60 },
+ { "DirectSynchronizationResponse", 61 },
+ { "ExternalBridgeUdpDiscoveryPacket", 57 },
+ { "ExternalClientLoginRequest", 58 },
+ { "ExternalClientLoginResponse", 59 },
{ "Job", 1 },
- { "KeepAliveRequest", 44 },
- { "KeepAliveResponse", 45 },
- { "OverrideDataBaseRequest", 42 },
- { "OverrideDataBaseResponse", 43 },
+ { "KeepAliveRequest", 64 },
+ { "KeepAliveResponse", 65 },
+ { "OverrideDataBaseRequest", 62 },
+ { "OverrideDataBaseResponse", 63 },
{ "ProgressRequest", 5 },
{ "ProgressResponse", 6 },
{ "RGB", 0 },
@@ -87,6 +107,10 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[46] =
{ "StubExtFlashReadResponse", 34 },
{ "StubExtFlashWriteRequest", 35 },
{ "StubExtFlashWriteResponse", 36 },
+ { "StubFPGAReadBackRegRequest", 37 },
+ { "StubFPGAReadBackRegResponse", 38 },
+ { "StubFPGAReadVersionRequest", 39 },
+ { "StubFPGAReadVersionResponse", 40 },
{ "StubGPIOInputSetupRequest", 13 },
{ "StubGPIOInputSetupResponse", 14 },
{ "StubGPIOReadBitRequest", 15 },
@@ -99,8 +123,24 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[46] =
{ "StubGPIOWriteByteResponse", 22 },
{ "StubHeaterRequest", 23 },
{ "StubHeaterResponse", 24 },
+ { "StubL6470DriverRequest", 41 },
+ { "StubL6470DriverResponse", 42 },
{ "StubMotorEncoderRequest", 25 },
{ "StubMotorEncoderResponse", 26 },
+ { "StubMotorInitRequest", 43 },
+ { "StubMotorInitResponse", 44 },
+ { "StubMotorMovRequest", 51 },
+ { "StubMotorMovResponse", 52 },
+ { "StubMotorPositionRequest", 55 },
+ { "StubMotorPositionResponse", 56 },
+ { "StubMotorRunRequest", 45 },
+ { "StubMotorRunResponse", 46 },
+ { "StubMotorSpeedRequest", 53 },
+ { "StubMotorSpeedResponse", 54 },
+ { "StubMotorStatusRequest", 49 },
+ { "StubMotorStatusResponse", 50 },
+ { "StubMotorStopRequest", 47 },
+ { "StubMotorStopResponse", 48 },
{ "StubOptLimitSwitchRequest", 27 },
{ "StubOptLimitSwitchResponse", 28 },
{ "StubSteperMotorRequest", 29 },
@@ -115,9 +155,9 @@ const ProtobufCEnumDescriptor message_type__descriptor =
"MessageType",
"MessageType",
"",
- 46,
+ 66,
message_type__enum_values_by_number,
- 46,
+ 66,
message_type__enum_values_by_name,
2,
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 b5040d4d1..04e3336f2 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
@@ -23,6 +23,9 @@ typedef enum _MessageType {
MESSAGE_TYPE__RGB = 0,
MESSAGE_TYPE__Job = 1,
MESSAGE_TYPE__Segment = 2,
+ /*
+ *Stubs
+ */
MESSAGE_TYPE__CalculateRequest = 3,
MESSAGE_TYPE__CalculateResponse = 4,
MESSAGE_TYPE__ProgressRequest = 5,
@@ -57,6 +60,29 @@ typedef enum _MessageType {
MESSAGE_TYPE__StubExtFlashReadResponse = 34,
MESSAGE_TYPE__StubExtFlashWriteRequest = 35,
MESSAGE_TYPE__StubExtFlashWriteResponse = 36,
+ MESSAGE_TYPE__StubFPGAReadBackRegRequest = 37,
+ MESSAGE_TYPE__StubFPGAReadBackRegResponse = 38,
+ MESSAGE_TYPE__StubFPGAReadVersionRequest = 39,
+ MESSAGE_TYPE__StubFPGAReadVersionResponse = 40,
+ MESSAGE_TYPE__StubL6470DriverRequest = 41,
+ MESSAGE_TYPE__StubL6470DriverResponse = 42,
+ MESSAGE_TYPE__StubMotorInitRequest = 43,
+ MESSAGE_TYPE__StubMotorInitResponse = 44,
+ MESSAGE_TYPE__StubMotorRunRequest = 45,
+ MESSAGE_TYPE__StubMotorRunResponse = 46,
+ MESSAGE_TYPE__StubMotorStopRequest = 47,
+ MESSAGE_TYPE__StubMotorStopResponse = 48,
+ MESSAGE_TYPE__StubMotorStatusRequest = 49,
+ MESSAGE_TYPE__StubMotorStatusResponse = 50,
+ MESSAGE_TYPE__StubMotorMovRequest = 51,
+ MESSAGE_TYPE__StubMotorMovResponse = 52,
+ MESSAGE_TYPE__StubMotorSpeedRequest = 53,
+ MESSAGE_TYPE__StubMotorSpeedResponse = 54,
+ MESSAGE_TYPE__StubMotorPositionRequest = 55,
+ MESSAGE_TYPE__StubMotorPositionResponse = 56,
+ /*
+ *Integration
+ */
MESSAGE_TYPE__ExternalBridgeUdpDiscoveryPacket = 1000,
MESSAGE_TYPE__ExternalClientLoginRequest = 1001,
MESSAGE_TYPE__ExternalClientLoginResponse = 1002,
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Job.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Job.pb-c.h
index dbb1f8046..4e6718ca9 100644
--- a/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Job.pb-c.h
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Job.pb-c.h
@@ -44,6 +44,10 @@ struct _Job
*/
protobuf_c_boolean has_distancetospoollength;
uint32_t distancetospoollength;
+ /*
+ *repeated temperatureSensorsSetting[Dryer,Head, Mixer]; //temp sensor wanted temperaure in celzius
+ *SCREW:
+ */
protobuf_c_boolean has_startoffsetpulses;
uint32_t startoffsetpulses;
protobuf_c_boolean has_spoolbackingrate;
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadBackRegRequest.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadBackRegRequest.pb-c.c
new file mode 100644
index 000000000..60519632e
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadBackRegRequest.pb-c.c
@@ -0,0 +1,105 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubFPGAReadBackRegRequest.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubFPGAReadBackRegRequest.pb-c.h"
+void stub_fpgaread_back_reg_request__init
+ (StubFPGAReadBackRegRequest *message)
+{
+ static const StubFPGAReadBackRegRequest init_value = STUB_FPGAREAD_BACK_REG_REQUEST__INIT;
+ *message = init_value;
+}
+size_t stub_fpgaread_back_reg_request__get_packed_size
+ (const StubFPGAReadBackRegRequest *message)
+{
+ assert(message->base.descriptor == &stub_fpgaread_back_reg_request__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_fpgaread_back_reg_request__pack
+ (const StubFPGAReadBackRegRequest *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_fpgaread_back_reg_request__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_fpgaread_back_reg_request__pack_to_buffer
+ (const StubFPGAReadBackRegRequest *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_fpgaread_back_reg_request__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubFPGAReadBackRegRequest *
+ stub_fpgaread_back_reg_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubFPGAReadBackRegRequest *)
+ protobuf_c_message_unpack (&stub_fpgaread_back_reg_request__descriptor,
+ allocator, len, data);
+}
+void stub_fpgaread_back_reg_request__free_unpacked
+ (StubFPGAReadBackRegRequest *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_fpgaread_back_reg_request__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_fpgaread_back_reg_request__field_descriptors[2] =
+{
+ {
+ "FPGAId",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubFPGAReadBackRegRequest, has_fpgaid),
+ offsetof(StubFPGAReadBackRegRequest, fpgaid),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Value",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubFPGAReadBackRegRequest, has_value),
+ offsetof(StubFPGAReadBackRegRequest, value),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_fpgaread_back_reg_request__field_indices_by_name[] = {
+ 0, /* field[0] = FPGAId */
+ 1, /* field[1] = Value */
+};
+static const ProtobufCIntRange stub_fpgaread_back_reg_request__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 2 }
+};
+const ProtobufCMessageDescriptor stub_fpgaread_back_reg_request__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubFPGAReadBackRegRequest",
+ "StubFPGAReadBackRegRequest",
+ "StubFPGAReadBackRegRequest",
+ "",
+ sizeof(StubFPGAReadBackRegRequest),
+ 2,
+ stub_fpgaread_back_reg_request__field_descriptors,
+ stub_fpgaread_back_reg_request__field_indices_by_name,
+ 1, stub_fpgaread_back_reg_request__number_ranges,
+ (ProtobufCMessageInit) stub_fpgaread_back_reg_request__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadBackRegRequest.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadBackRegRequest.pb-c.h
new file mode 100644
index 000000000..e4ae69f1f
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadBackRegRequest.pb-c.h
@@ -0,0 +1,80 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubFPGAReadBackRegRequest.proto */
+
+#ifndef PROTOBUF_C_StubFPGAReadBackRegRequest_2eproto__INCLUDED
+#define PROTOBUF_C_StubFPGAReadBackRegRequest_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubFPGAReadBackRegRequest StubFPGAReadBackRegRequest;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubFPGAReadBackRegRequest
+{
+ ProtobufCMessage base;
+ /*
+ * 0..2
+ */
+ protobuf_c_boolean has_fpgaid;
+ uint32_t fpgaid;
+ /*
+ * 16 bit
+ */
+ protobuf_c_boolean has_value;
+ uint32_t value;
+};
+#define STUB_FPGAREAD_BACK_REG_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_fpgaread_back_reg_request__descriptor) \
+ , 0, 0, 0, 0 }
+
+
+/* StubFPGAReadBackRegRequest methods */
+void stub_fpgaread_back_reg_request__init
+ (StubFPGAReadBackRegRequest *message);
+size_t stub_fpgaread_back_reg_request__get_packed_size
+ (const StubFPGAReadBackRegRequest *message);
+size_t stub_fpgaread_back_reg_request__pack
+ (const StubFPGAReadBackRegRequest *message,
+ uint8_t *out);
+size_t stub_fpgaread_back_reg_request__pack_to_buffer
+ (const StubFPGAReadBackRegRequest *message,
+ ProtobufCBuffer *buffer);
+StubFPGAReadBackRegRequest *
+ stub_fpgaread_back_reg_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_fpgaread_back_reg_request__free_unpacked
+ (StubFPGAReadBackRegRequest *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubFPGAReadBackRegRequest_Closure)
+ (const StubFPGAReadBackRegRequest *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_fpgaread_back_reg_request__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubFPGAReadBackRegRequest_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadBackRegResponse.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadBackRegResponse.pb-c.c
new file mode 100644
index 000000000..e222b3b24
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadBackRegResponse.pb-c.c
@@ -0,0 +1,132 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubFPGAReadBackRegResponse.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubFPGAReadBackRegResponse.pb-c.h"
+void stub_fpgaread_back_reg_response__init
+ (StubFPGAReadBackRegResponse *message)
+{
+ static const StubFPGAReadBackRegResponse init_value = STUB_FPGAREAD_BACK_REG_RESPONSE__INIT;
+ *message = init_value;
+}
+size_t stub_fpgaread_back_reg_response__get_packed_size
+ (const StubFPGAReadBackRegResponse *message)
+{
+ assert(message->base.descriptor == &stub_fpgaread_back_reg_response__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_fpgaread_back_reg_response__pack
+ (const StubFPGAReadBackRegResponse *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_fpgaread_back_reg_response__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_fpgaread_back_reg_response__pack_to_buffer
+ (const StubFPGAReadBackRegResponse *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_fpgaread_back_reg_response__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubFPGAReadBackRegResponse *
+ stub_fpgaread_back_reg_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubFPGAReadBackRegResponse *)
+ protobuf_c_message_unpack (&stub_fpgaread_back_reg_response__descriptor,
+ allocator, len, data);
+}
+void stub_fpgaread_back_reg_response__free_unpacked
+ (StubFPGAReadBackRegResponse *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_fpgaread_back_reg_response__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_fpgaread_back_reg_response__field_descriptors[4] =
+{
+ {
+ "FPGAId",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubFPGAReadBackRegResponse, has_fpgaid),
+ offsetof(StubFPGAReadBackRegResponse, fpgaid),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "ReadBackValue",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubFPGAReadBackRegResponse, has_readbackvalue),
+ offsetof(StubFPGAReadBackRegResponse, readbackvalue),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Status",
+ 4,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_STRING,
+ 0, /* quantifier_offset */
+ offsetof(StubFPGAReadBackRegResponse, status),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "StatusWord",
+ 5,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubFPGAReadBackRegResponse, has_statusword),
+ offsetof(StubFPGAReadBackRegResponse, statusword),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_fpgaread_back_reg_response__field_indices_by_name[] = {
+ 0, /* field[0] = FPGAId */
+ 1, /* field[1] = ReadBackValue */
+ 2, /* field[2] = Status */
+ 3, /* field[3] = StatusWord */
+};
+static const ProtobufCIntRange stub_fpgaread_back_reg_response__number_ranges[2 + 1] =
+{
+ { 1, 0 },
+ { 4, 2 },
+ { 0, 4 }
+};
+const ProtobufCMessageDescriptor stub_fpgaread_back_reg_response__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubFPGAReadBackRegResponse",
+ "StubFPGAReadBackRegResponse",
+ "StubFPGAReadBackRegResponse",
+ "",
+ sizeof(StubFPGAReadBackRegResponse),
+ 4,
+ stub_fpgaread_back_reg_response__field_descriptors,
+ stub_fpgaread_back_reg_response__field_indices_by_name,
+ 2, stub_fpgaread_back_reg_response__number_ranges,
+ (ProtobufCMessageInit) stub_fpgaread_back_reg_response__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadBackRegResponse.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadBackRegResponse.pb-c.h
new file mode 100644
index 000000000..234017433
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadBackRegResponse.pb-c.h
@@ -0,0 +1,89 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubFPGAReadBackRegResponse.proto */
+
+#ifndef PROTOBUF_C_StubFPGAReadBackRegResponse_2eproto__INCLUDED
+#define PROTOBUF_C_StubFPGAReadBackRegResponse_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubFPGAReadBackRegResponse StubFPGAReadBackRegResponse;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubFPGAReadBackRegResponse
+{
+ ProtobufCMessage base;
+ /*
+ * 0..2
+ */
+ protobuf_c_boolean has_fpgaid;
+ uint32_t fpgaid;
+ /*
+ * 16 bit
+ */
+ protobuf_c_boolean has_readbackvalue;
+ uint32_t readbackvalue;
+ /*
+ * Passed/Failed
+ */
+ char *status;
+ /*
+ * Error number/bit when the status is Failed
+ */
+ protobuf_c_boolean has_statusword;
+ uint32_t statusword;
+};
+#define STUB_FPGAREAD_BACK_REG_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_fpgaread_back_reg_response__descriptor) \
+ , 0, 0, 0, 0, NULL, 0, 0 }
+
+
+/* StubFPGAReadBackRegResponse methods */
+void stub_fpgaread_back_reg_response__init
+ (StubFPGAReadBackRegResponse *message);
+size_t stub_fpgaread_back_reg_response__get_packed_size
+ (const StubFPGAReadBackRegResponse *message);
+size_t stub_fpgaread_back_reg_response__pack
+ (const StubFPGAReadBackRegResponse *message,
+ uint8_t *out);
+size_t stub_fpgaread_back_reg_response__pack_to_buffer
+ (const StubFPGAReadBackRegResponse *message,
+ ProtobufCBuffer *buffer);
+StubFPGAReadBackRegResponse *
+ stub_fpgaread_back_reg_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_fpgaread_back_reg_response__free_unpacked
+ (StubFPGAReadBackRegResponse *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubFPGAReadBackRegResponse_Closure)
+ (const StubFPGAReadBackRegResponse *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_fpgaread_back_reg_response__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubFPGAReadBackRegResponse_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadVersionRequest.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadVersionRequest.pb-c.c
new file mode 100644
index 000000000..5381c462a
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadVersionRequest.pb-c.c
@@ -0,0 +1,92 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubFPGAReadVersionRequest.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubFPGAReadVersionRequest.pb-c.h"
+void stub_fpgaread_version_request__init
+ (StubFPGAReadVersionRequest *message)
+{
+ static const StubFPGAReadVersionRequest init_value = STUB_FPGAREAD_VERSION_REQUEST__INIT;
+ *message = init_value;
+}
+size_t stub_fpgaread_version_request__get_packed_size
+ (const StubFPGAReadVersionRequest *message)
+{
+ assert(message->base.descriptor == &stub_fpgaread_version_request__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_fpgaread_version_request__pack
+ (const StubFPGAReadVersionRequest *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_fpgaread_version_request__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_fpgaread_version_request__pack_to_buffer
+ (const StubFPGAReadVersionRequest *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_fpgaread_version_request__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubFPGAReadVersionRequest *
+ stub_fpgaread_version_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubFPGAReadVersionRequest *)
+ protobuf_c_message_unpack (&stub_fpgaread_version_request__descriptor,
+ allocator, len, data);
+}
+void stub_fpgaread_version_request__free_unpacked
+ (StubFPGAReadVersionRequest *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_fpgaread_version_request__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_fpgaread_version_request__field_descriptors[1] =
+{
+ {
+ "FPGAId",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubFPGAReadVersionRequest, has_fpgaid),
+ offsetof(StubFPGAReadVersionRequest, fpgaid),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_fpgaread_version_request__field_indices_by_name[] = {
+ 0, /* field[0] = FPGAId */
+};
+static const ProtobufCIntRange stub_fpgaread_version_request__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 1 }
+};
+const ProtobufCMessageDescriptor stub_fpgaread_version_request__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubFPGAReadVersionRequest",
+ "StubFPGAReadVersionRequest",
+ "StubFPGAReadVersionRequest",
+ "",
+ sizeof(StubFPGAReadVersionRequest),
+ 1,
+ stub_fpgaread_version_request__field_descriptors,
+ stub_fpgaread_version_request__field_indices_by_name,
+ 1, stub_fpgaread_version_request__number_ranges,
+ (ProtobufCMessageInit) stub_fpgaread_version_request__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadVersionRequest.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadVersionRequest.pb-c.h
new file mode 100644
index 000000000..54db77bad
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadVersionRequest.pb-c.h
@@ -0,0 +1,75 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubFPGAReadVersionRequest.proto */
+
+#ifndef PROTOBUF_C_StubFPGAReadVersionRequest_2eproto__INCLUDED
+#define PROTOBUF_C_StubFPGAReadVersionRequest_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubFPGAReadVersionRequest StubFPGAReadVersionRequest;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubFPGAReadVersionRequest
+{
+ ProtobufCMessage base;
+ /*
+ * 0..2
+ */
+ protobuf_c_boolean has_fpgaid;
+ uint32_t fpgaid;
+};
+#define STUB_FPGAREAD_VERSION_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_fpgaread_version_request__descriptor) \
+ , 0, 0 }
+
+
+/* StubFPGAReadVersionRequest methods */
+void stub_fpgaread_version_request__init
+ (StubFPGAReadVersionRequest *message);
+size_t stub_fpgaread_version_request__get_packed_size
+ (const StubFPGAReadVersionRequest *message);
+size_t stub_fpgaread_version_request__pack
+ (const StubFPGAReadVersionRequest *message,
+ uint8_t *out);
+size_t stub_fpgaread_version_request__pack_to_buffer
+ (const StubFPGAReadVersionRequest *message,
+ ProtobufCBuffer *buffer);
+StubFPGAReadVersionRequest *
+ stub_fpgaread_version_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_fpgaread_version_request__free_unpacked
+ (StubFPGAReadVersionRequest *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubFPGAReadVersionRequest_Closure)
+ (const StubFPGAReadVersionRequest *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_fpgaread_version_request__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubFPGAReadVersionRequest_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadVersionResponse.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadVersionResponse.pb-c.c
new file mode 100644
index 000000000..79c25d9a5
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadVersionResponse.pb-c.c
@@ -0,0 +1,170 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubFPGAReadVersionResponse.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubFPGAReadVersionResponse.pb-c.h"
+void stub_fpgaread_version_response__init
+ (StubFPGAReadVersionResponse *message)
+{
+ static const StubFPGAReadVersionResponse init_value = STUB_FPGAREAD_VERSION_RESPONSE__INIT;
+ *message = init_value;
+}
+size_t stub_fpgaread_version_response__get_packed_size
+ (const StubFPGAReadVersionResponse *message)
+{
+ assert(message->base.descriptor == &stub_fpgaread_version_response__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_fpgaread_version_response__pack
+ (const StubFPGAReadVersionResponse *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_fpgaread_version_response__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_fpgaread_version_response__pack_to_buffer
+ (const StubFPGAReadVersionResponse *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_fpgaread_version_response__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubFPGAReadVersionResponse *
+ stub_fpgaread_version_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubFPGAReadVersionResponse *)
+ protobuf_c_message_unpack (&stub_fpgaread_version_response__descriptor,
+ allocator, len, data);
+}
+void stub_fpgaread_version_response__free_unpacked
+ (StubFPGAReadVersionResponse *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_fpgaread_version_response__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_fpgaread_version_response__field_descriptors[7] =
+{
+ {
+ "FPGAId",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubFPGAReadVersionResponse, has_fpgaid),
+ offsetof(StubFPGAReadVersionResponse, fpgaid),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Day",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubFPGAReadVersionResponse, has_day),
+ offsetof(StubFPGAReadVersionResponse, day),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Month",
+ 3,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubFPGAReadVersionResponse, has_month),
+ offsetof(StubFPGAReadVersionResponse, month),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Year",
+ 4,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubFPGAReadVersionResponse, has_year),
+ offsetof(StubFPGAReadVersionResponse, year),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Ver_num",
+ 5,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubFPGAReadVersionResponse, has_ver_num),
+ offsetof(StubFPGAReadVersionResponse, ver_num),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Status",
+ 6,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_STRING,
+ 0, /* quantifier_offset */
+ offsetof(StubFPGAReadVersionResponse, status),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "StatusWord",
+ 7,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubFPGAReadVersionResponse, has_statusword),
+ offsetof(StubFPGAReadVersionResponse, statusword),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_fpgaread_version_response__field_indices_by_name[] = {
+ 1, /* field[1] = Day */
+ 0, /* field[0] = FPGAId */
+ 2, /* field[2] = Month */
+ 5, /* field[5] = Status */
+ 6, /* field[6] = StatusWord */
+ 4, /* field[4] = Ver_num */
+ 3, /* field[3] = Year */
+};
+static const ProtobufCIntRange stub_fpgaread_version_response__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 7 }
+};
+const ProtobufCMessageDescriptor stub_fpgaread_version_response__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubFPGAReadVersionResponse",
+ "StubFPGAReadVersionResponse",
+ "StubFPGAReadVersionResponse",
+ "",
+ sizeof(StubFPGAReadVersionResponse),
+ 7,
+ stub_fpgaread_version_response__field_descriptors,
+ stub_fpgaread_version_response__field_indices_by_name,
+ 1, stub_fpgaread_version_response__number_ranges,
+ (ProtobufCMessageInit) stub_fpgaread_version_response__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadVersionResponse.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadVersionResponse.pb-c.h
new file mode 100644
index 000000000..360f7faac
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubFPGAReadVersionResponse.pb-c.h
@@ -0,0 +1,92 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubFPGAReadVersionResponse.proto */
+
+#ifndef PROTOBUF_C_StubFPGAReadVersionResponse_2eproto__INCLUDED
+#define PROTOBUF_C_StubFPGAReadVersionResponse_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubFPGAReadVersionResponse StubFPGAReadVersionResponse;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubFPGAReadVersionResponse
+{
+ ProtobufCMessage base;
+ /*
+ * 0..2
+ */
+ protobuf_c_boolean has_fpgaid;
+ uint32_t fpgaid;
+ protobuf_c_boolean has_day;
+ uint32_t day;
+ protobuf_c_boolean has_month;
+ uint32_t month;
+ protobuf_c_boolean has_year;
+ uint32_t year;
+ protobuf_c_boolean has_ver_num;
+ uint32_t ver_num;
+ /*
+ * Passed/Failed
+ */
+ char *status;
+ /*
+ * Error number/bit when the status is Failed
+ */
+ protobuf_c_boolean has_statusword;
+ uint32_t statusword;
+};
+#define STUB_FPGAREAD_VERSION_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_fpgaread_version_response__descriptor) \
+ , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 0 }
+
+
+/* StubFPGAReadVersionResponse methods */
+void stub_fpgaread_version_response__init
+ (StubFPGAReadVersionResponse *message);
+size_t stub_fpgaread_version_response__get_packed_size
+ (const StubFPGAReadVersionResponse *message);
+size_t stub_fpgaread_version_response__pack
+ (const StubFPGAReadVersionResponse *message,
+ uint8_t *out);
+size_t stub_fpgaread_version_response__pack_to_buffer
+ (const StubFPGAReadVersionResponse *message,
+ ProtobufCBuffer *buffer);
+StubFPGAReadVersionResponse *
+ stub_fpgaread_version_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_fpgaread_version_response__free_unpacked
+ (StubFPGAReadVersionResponse *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubFPGAReadVersionResponse_Closure)
+ (const StubFPGAReadVersionResponse *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_fpgaread_version_response__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubFPGAReadVersionResponse_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubL6470DriverRequest.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubL6470DriverRequest.pb-c.c
new file mode 100644
index 000000000..3771b60a9
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubL6470DriverRequest.pb-c.c
@@ -0,0 +1,339 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubL6470DriverRequest.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubL6470DriverRequest.pb-c.h"
+void stub_l6470_driver_request__init
+ (StubL6470DriverRequest *message)
+{
+ static const StubL6470DriverRequest init_value = STUB_L6470_DRIVER_REQUEST__INIT;
+ *message = init_value;
+}
+size_t stub_l6470_driver_request__get_packed_size
+ (const StubL6470DriverRequest *message)
+{
+ assert(message->base.descriptor == &stub_l6470_driver_request__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_l6470_driver_request__pack
+ (const StubL6470DriverRequest *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_l6470_driver_request__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_l6470_driver_request__pack_to_buffer
+ (const StubL6470DriverRequest *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_l6470_driver_request__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubL6470DriverRequest *
+ stub_l6470_driver_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubL6470DriverRequest *)
+ protobuf_c_message_unpack (&stub_l6470_driver_request__descriptor,
+ allocator, len, data);
+}
+void stub_l6470_driver_request__free_unpacked
+ (StubL6470DriverRequest *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_l6470_driver_request__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_l6470_driver_request__field_descriptors[20] =
+{
+ {
+ "Run_Value",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverRequest, has_run_value),
+ offsetof(StubL6470DriverRequest, run_value),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Mov_Value",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverRequest, has_mov_value),
+ offsetof(StubL6470DriverRequest, mov_value),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Direction",
+ 3,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubL6470DriverRequest, has_direction),
+ offsetof(StubL6470DriverRequest, direction),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Time_2_Change_Direction",
+ 4,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverRequest, has_time_2_change_direction),
+ offsetof(StubL6470DriverRequest, time_2_change_direction),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Display_Tx_ON_LCD",
+ 5,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubL6470DriverRequest, has_display_tx_on_lcd),
+ offsetof(StubL6470DriverRequest, display_tx_on_lcd),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Display_Rx_on_LCD",
+ 6,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubL6470DriverRequest, has_display_rx_on_lcd),
+ offsetof(StubL6470DriverRequest, display_rx_on_lcd),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Init_MicroStep",
+ 7,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverRequest, has_init_microstep),
+ offsetof(StubL6470DriverRequest, init_microstep),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Init_Acc",
+ 8,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverRequest, has_init_acc),
+ offsetof(StubL6470DriverRequest, init_acc),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Init_Dec",
+ 9,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverRequest, has_init_dec),
+ offsetof(StubL6470DriverRequest, init_dec),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestBool_1",
+ 10,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubL6470DriverRequest, has_testbool_1),
+ offsetof(StubL6470DriverRequest, testbool_1),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestBool_2",
+ 11,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubL6470DriverRequest, has_testbool_2),
+ offsetof(StubL6470DriverRequest, testbool_2),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestBool_3",
+ 12,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubL6470DriverRequest, has_testbool_3),
+ offsetof(StubL6470DriverRequest, testbool_3),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestBool_4",
+ 13,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubL6470DriverRequest, has_testbool_4),
+ offsetof(StubL6470DriverRequest, testbool_4),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestBool_5",
+ 14,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubL6470DriverRequest, has_testbool_5),
+ offsetof(StubL6470DriverRequest, testbool_5),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestUint32_1",
+ 15,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverRequest, has_testuint32_1),
+ offsetof(StubL6470DriverRequest, testuint32_1),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestUint32_2",
+ 16,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverRequest, has_testuint32_2),
+ offsetof(StubL6470DriverRequest, testuint32_2),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestUint32_3",
+ 17,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverRequest, has_testuint32_3),
+ offsetof(StubL6470DriverRequest, testuint32_3),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestUint32_4",
+ 18,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverRequest, has_testuint32_4),
+ offsetof(StubL6470DriverRequest, testuint32_4),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestUint32_5",
+ 19,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverRequest, has_testuint32_5),
+ offsetof(StubL6470DriverRequest, testuint32_5),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestUint32_6",
+ 20,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverRequest, has_testuint32_6),
+ offsetof(StubL6470DriverRequest, testuint32_6),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_l6470_driver_request__field_indices_by_name[] = {
+ 2, /* field[2] = Direction */
+ 5, /* field[5] = Display_Rx_on_LCD */
+ 4, /* field[4] = Display_Tx_ON_LCD */
+ 7, /* field[7] = Init_Acc */
+ 8, /* field[8] = Init_Dec */
+ 6, /* field[6] = Init_MicroStep */
+ 1, /* field[1] = Mov_Value */
+ 0, /* field[0] = Run_Value */
+ 9, /* field[9] = TestBool_1 */
+ 10, /* field[10] = TestBool_2 */
+ 11, /* field[11] = TestBool_3 */
+ 12, /* field[12] = TestBool_4 */
+ 13, /* field[13] = TestBool_5 */
+ 14, /* field[14] = TestUint32_1 */
+ 15, /* field[15] = TestUint32_2 */
+ 16, /* field[16] = TestUint32_3 */
+ 17, /* field[17] = TestUint32_4 */
+ 18, /* field[18] = TestUint32_5 */
+ 19, /* field[19] = TestUint32_6 */
+ 3, /* field[3] = Time_2_Change_Direction */
+};
+static const ProtobufCIntRange stub_l6470_driver_request__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 20 }
+};
+const ProtobufCMessageDescriptor stub_l6470_driver_request__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubL6470DriverRequest",
+ "StubL6470DriverRequest",
+ "StubL6470DriverRequest",
+ "",
+ sizeof(StubL6470DriverRequest),
+ 20,
+ stub_l6470_driver_request__field_descriptors,
+ stub_l6470_driver_request__field_indices_by_name,
+ 1, stub_l6470_driver_request__number_ranges,
+ (ProtobufCMessageInit) stub_l6470_driver_request__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubL6470DriverRequest.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubL6470DriverRequest.pb-c.h
new file mode 100644
index 000000000..ee4e261c9
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubL6470DriverRequest.pb-c.h
@@ -0,0 +1,110 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubL6470DriverRequest.proto */
+
+#ifndef PROTOBUF_C_StubL6470DriverRequest_2eproto__INCLUDED
+#define PROTOBUF_C_StubL6470DriverRequest_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubL6470DriverRequest StubL6470DriverRequest;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubL6470DriverRequest
+{
+ ProtobufCMessage base;
+ protobuf_c_boolean has_run_value;
+ uint32_t run_value;
+ protobuf_c_boolean has_mov_value;
+ uint32_t mov_value;
+ protobuf_c_boolean has_direction;
+ protobuf_c_boolean direction;
+ protobuf_c_boolean has_time_2_change_direction;
+ uint32_t time_2_change_direction;
+ protobuf_c_boolean has_display_tx_on_lcd;
+ protobuf_c_boolean display_tx_on_lcd;
+ protobuf_c_boolean has_display_rx_on_lcd;
+ protobuf_c_boolean display_rx_on_lcd;
+ protobuf_c_boolean has_init_microstep;
+ uint32_t init_microstep;
+ protobuf_c_boolean has_init_acc;
+ uint32_t init_acc;
+ protobuf_c_boolean has_init_dec;
+ uint32_t init_dec;
+ protobuf_c_boolean has_testbool_1;
+ protobuf_c_boolean testbool_1;
+ protobuf_c_boolean has_testbool_2;
+ protobuf_c_boolean testbool_2;
+ protobuf_c_boolean has_testbool_3;
+ protobuf_c_boolean testbool_3;
+ protobuf_c_boolean has_testbool_4;
+ protobuf_c_boolean testbool_4;
+ protobuf_c_boolean has_testbool_5;
+ protobuf_c_boolean testbool_5;
+ protobuf_c_boolean has_testuint32_1;
+ uint32_t testuint32_1;
+ protobuf_c_boolean has_testuint32_2;
+ uint32_t testuint32_2;
+ protobuf_c_boolean has_testuint32_3;
+ uint32_t testuint32_3;
+ protobuf_c_boolean has_testuint32_4;
+ uint32_t testuint32_4;
+ protobuf_c_boolean has_testuint32_5;
+ uint32_t testuint32_5;
+ protobuf_c_boolean has_testuint32_6;
+ uint32_t testuint32_6;
+};
+#define STUB_L6470_DRIVER_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_l6470_driver_request__descriptor) \
+ , 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, 0, 0, 0, 0, 0, 0, 0, 0 }
+
+
+/* StubL6470DriverRequest methods */
+void stub_l6470_driver_request__init
+ (StubL6470DriverRequest *message);
+size_t stub_l6470_driver_request__get_packed_size
+ (const StubL6470DriverRequest *message);
+size_t stub_l6470_driver_request__pack
+ (const StubL6470DriverRequest *message,
+ uint8_t *out);
+size_t stub_l6470_driver_request__pack_to_buffer
+ (const StubL6470DriverRequest *message,
+ ProtobufCBuffer *buffer);
+StubL6470DriverRequest *
+ stub_l6470_driver_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_l6470_driver_request__free_unpacked
+ (StubL6470DriverRequest *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubL6470DriverRequest_Closure)
+ (const StubL6470DriverRequest *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_l6470_driver_request__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubL6470DriverRequest_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubL6470DriverResponse.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubL6470DriverResponse.pb-c.c
new file mode 100644
index 000000000..b129bb930
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubL6470DriverResponse.pb-c.c
@@ -0,0 +1,274 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubL6470DriverResponse.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubL6470DriverResponse.pb-c.h"
+void stub_l6470_driver_response__init
+ (StubL6470DriverResponse *message)
+{
+ static const StubL6470DriverResponse init_value = STUB_L6470_DRIVER_RESPONSE__INIT;
+ *message = init_value;
+}
+size_t stub_l6470_driver_response__get_packed_size
+ (const StubL6470DriverResponse *message)
+{
+ assert(message->base.descriptor == &stub_l6470_driver_response__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_l6470_driver_response__pack
+ (const StubL6470DriverResponse *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_l6470_driver_response__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_l6470_driver_response__pack_to_buffer
+ (const StubL6470DriverResponse *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_l6470_driver_response__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubL6470DriverResponse *
+ stub_l6470_driver_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubL6470DriverResponse *)
+ protobuf_c_message_unpack (&stub_l6470_driver_response__descriptor,
+ allocator, len, data);
+}
+void stub_l6470_driver_response__free_unpacked
+ (StubL6470DriverResponse *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_l6470_driver_response__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_l6470_driver_response__field_descriptors[15] =
+{
+ {
+ "Run_Value",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverResponse, has_run_value),
+ offsetof(StubL6470DriverResponse, run_value),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Mov_Value",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverResponse, has_mov_value),
+ offsetof(StubL6470DriverResponse, mov_value),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestBool_1",
+ 3,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubL6470DriverResponse, has_testbool_1),
+ offsetof(StubL6470DriverResponse, testbool_1),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestBool_2",
+ 4,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubL6470DriverResponse, has_testbool_2),
+ offsetof(StubL6470DriverResponse, testbool_2),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestBool_3",
+ 5,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubL6470DriverResponse, has_testbool_3),
+ offsetof(StubL6470DriverResponse, testbool_3),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestBool_4",
+ 6,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubL6470DriverResponse, has_testbool_4),
+ offsetof(StubL6470DriverResponse, testbool_4),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestBool_5",
+ 7,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubL6470DriverResponse, has_testbool_5),
+ offsetof(StubL6470DriverResponse, testbool_5),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestUint32_1",
+ 8,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverResponse, has_testuint32_1),
+ offsetof(StubL6470DriverResponse, testuint32_1),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestUint32_2",
+ 9,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverResponse, has_testuint32_2),
+ offsetof(StubL6470DriverResponse, testuint32_2),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestUint32_3",
+ 10,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverResponse, has_testuint32_3),
+ offsetof(StubL6470DriverResponse, testuint32_3),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestUint32_4",
+ 11,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverResponse, has_testuint32_4),
+ offsetof(StubL6470DriverResponse, testuint32_4),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestUint32_5",
+ 12,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverResponse, has_testuint32_5),
+ offsetof(StubL6470DriverResponse, testuint32_5),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TestUint32_6",
+ 13,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverResponse, has_testuint32_6),
+ offsetof(StubL6470DriverResponse, testuint32_6),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Status",
+ 14,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_STRING,
+ 0, /* quantifier_offset */
+ offsetof(StubL6470DriverResponse, status),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "StatusWord",
+ 15,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubL6470DriverResponse, has_statusword),
+ offsetof(StubL6470DriverResponse, statusword),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_l6470_driver_response__field_indices_by_name[] = {
+ 1, /* field[1] = Mov_Value */
+ 0, /* field[0] = Run_Value */
+ 13, /* field[13] = Status */
+ 14, /* field[14] = StatusWord */
+ 2, /* field[2] = TestBool_1 */
+ 3, /* field[3] = TestBool_2 */
+ 4, /* field[4] = TestBool_3 */
+ 5, /* field[5] = TestBool_4 */
+ 6, /* field[6] = TestBool_5 */
+ 7, /* field[7] = TestUint32_1 */
+ 8, /* field[8] = TestUint32_2 */
+ 9, /* field[9] = TestUint32_3 */
+ 10, /* field[10] = TestUint32_4 */
+ 11, /* field[11] = TestUint32_5 */
+ 12, /* field[12] = TestUint32_6 */
+};
+static const ProtobufCIntRange stub_l6470_driver_response__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 15 }
+};
+const ProtobufCMessageDescriptor stub_l6470_driver_response__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubL6470DriverResponse",
+ "StubL6470DriverResponse",
+ "StubL6470DriverResponse",
+ "",
+ sizeof(StubL6470DriverResponse),
+ 15,
+ stub_l6470_driver_response__field_descriptors,
+ stub_l6470_driver_response__field_indices_by_name,
+ 1, stub_l6470_driver_response__number_ranges,
+ (ProtobufCMessageInit) stub_l6470_driver_response__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubL6470DriverResponse.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubL6470DriverResponse.pb-c.h
new file mode 100644
index 000000000..ca18da2a9
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubL6470DriverResponse.pb-c.h
@@ -0,0 +1,105 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubL6470DriverResponse.proto */
+
+#ifndef PROTOBUF_C_StubL6470DriverResponse_2eproto__INCLUDED
+#define PROTOBUF_C_StubL6470DriverResponse_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubL6470DriverResponse StubL6470DriverResponse;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubL6470DriverResponse
+{
+ ProtobufCMessage base;
+ protobuf_c_boolean has_run_value;
+ uint32_t run_value;
+ protobuf_c_boolean has_mov_value;
+ uint32_t mov_value;
+ protobuf_c_boolean has_testbool_1;
+ protobuf_c_boolean testbool_1;
+ protobuf_c_boolean has_testbool_2;
+ protobuf_c_boolean testbool_2;
+ protobuf_c_boolean has_testbool_3;
+ protobuf_c_boolean testbool_3;
+ protobuf_c_boolean has_testbool_4;
+ protobuf_c_boolean testbool_4;
+ protobuf_c_boolean has_testbool_5;
+ protobuf_c_boolean testbool_5;
+ protobuf_c_boolean has_testuint32_1;
+ uint32_t testuint32_1;
+ protobuf_c_boolean has_testuint32_2;
+ uint32_t testuint32_2;
+ protobuf_c_boolean has_testuint32_3;
+ uint32_t testuint32_3;
+ protobuf_c_boolean has_testuint32_4;
+ uint32_t testuint32_4;
+ protobuf_c_boolean has_testuint32_5;
+ uint32_t testuint32_5;
+ protobuf_c_boolean has_testuint32_6;
+ uint32_t testuint32_6;
+ /*
+ * Passed/Failed
+ */
+ char *status;
+ /*
+ * Error number/bit when the status is Failed
+ */
+ protobuf_c_boolean has_statusword;
+ uint32_t statusword;
+};
+#define STUB_L6470_DRIVER_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_l6470_driver_response__descriptor) \
+ , 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, NULL, 0, 0 }
+
+
+/* StubL6470DriverResponse methods */
+void stub_l6470_driver_response__init
+ (StubL6470DriverResponse *message);
+size_t stub_l6470_driver_response__get_packed_size
+ (const StubL6470DriverResponse *message);
+size_t stub_l6470_driver_response__pack
+ (const StubL6470DriverResponse *message,
+ uint8_t *out);
+size_t stub_l6470_driver_response__pack_to_buffer
+ (const StubL6470DriverResponse *message,
+ ProtobufCBuffer *buffer);
+StubL6470DriverResponse *
+ stub_l6470_driver_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_l6470_driver_response__free_unpacked
+ (StubL6470DriverResponse *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubL6470DriverResponse_Closure)
+ (const StubL6470DriverResponse *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_l6470_driver_response__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubL6470DriverResponse_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorInitRequest.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorInitRequest.pb-c.c
new file mode 100644
index 000000000..0f01b16d4
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorInitRequest.pb-c.c
@@ -0,0 +1,196 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorInitRequest.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubMotorInitRequest.pb-c.h"
+void stub_motor_init_request__init
+ (StubMotorInitRequest *message)
+{
+ static const StubMotorInitRequest init_value = STUB_MOTOR_INIT_REQUEST__INIT;
+ *message = init_value;
+}
+size_t stub_motor_init_request__get_packed_size
+ (const StubMotorInitRequest *message)
+{
+ assert(message->base.descriptor == &stub_motor_init_request__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_motor_init_request__pack
+ (const StubMotorInitRequest *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_motor_init_request__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_motor_init_request__pack_to_buffer
+ (const StubMotorInitRequest *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_motor_init_request__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubMotorInitRequest *
+ stub_motor_init_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubMotorInitRequest *)
+ protobuf_c_message_unpack (&stub_motor_init_request__descriptor,
+ allocator, len, data);
+}
+void stub_motor_init_request__free_unpacked
+ (StubMotorInitRequest *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_motor_init_request__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_motor_init_request__field_descriptors[9] =
+{
+ {
+ "Motor_ID",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorInitRequest, has_motor_id),
+ offsetof(StubMotorInitRequest, motor_id),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Micro_Steps",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorInitRequest, has_micro_steps),
+ offsetof(StubMotorInitRequest, micro_steps),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Set_Micro_Steps",
+ 3,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorInitRequest, has_set_micro_steps),
+ offsetof(StubMotorInitRequest, set_micro_steps),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "ACC",
+ 4,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorInitRequest, has_acc),
+ offsetof(StubMotorInitRequest, acc),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Set_ACC",
+ 5,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorInitRequest, has_set_acc),
+ offsetof(StubMotorInitRequest, set_acc),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "DEC",
+ 6,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorInitRequest, has_dec),
+ offsetof(StubMotorInitRequest, dec),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Set_Dec",
+ 7,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorInitRequest, has_set_dec),
+ offsetof(StubMotorInitRequest, set_dec),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Max_Speed",
+ 8,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorInitRequest, has_max_speed),
+ offsetof(StubMotorInitRequest, max_speed),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Set_Max_Speed",
+ 9,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorInitRequest, has_set_max_speed),
+ offsetof(StubMotorInitRequest, set_max_speed),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_motor_init_request__field_indices_by_name[] = {
+ 3, /* field[3] = ACC */
+ 5, /* field[5] = DEC */
+ 7, /* field[7] = Max_Speed */
+ 1, /* field[1] = Micro_Steps */
+ 0, /* field[0] = Motor_ID */
+ 4, /* field[4] = Set_ACC */
+ 6, /* field[6] = Set_Dec */
+ 8, /* field[8] = Set_Max_Speed */
+ 2, /* field[2] = Set_Micro_Steps */
+};
+static const ProtobufCIntRange stub_motor_init_request__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 9 }
+};
+const ProtobufCMessageDescriptor stub_motor_init_request__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubMotorInitRequest",
+ "StubMotorInitRequest",
+ "StubMotorInitRequest",
+ "",
+ sizeof(StubMotorInitRequest),
+ 9,
+ stub_motor_init_request__field_descriptors,
+ stub_motor_init_request__field_indices_by_name,
+ 1, stub_motor_init_request__number_ranges,
+ (ProtobufCMessageInit) stub_motor_init_request__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorInitRequest.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorInitRequest.pb-c.h
new file mode 100644
index 000000000..29b1f6036
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorInitRequest.pb-c.h
@@ -0,0 +1,91 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorInitRequest.proto */
+
+#ifndef PROTOBUF_C_StubMotorInitRequest_2eproto__INCLUDED
+#define PROTOBUF_C_StubMotorInitRequest_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubMotorInitRequest StubMotorInitRequest;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubMotorInitRequest
+{
+ ProtobufCMessage base;
+ protobuf_c_boolean has_motor_id;
+ uint32_t motor_id;
+ /*
+ * 1/2/4/8/16/32/64/128
+ */
+ protobuf_c_boolean has_micro_steps;
+ uint32_t micro_steps;
+ protobuf_c_boolean has_set_micro_steps;
+ protobuf_c_boolean set_micro_steps;
+ protobuf_c_boolean has_acc;
+ uint32_t acc;
+ protobuf_c_boolean has_set_acc;
+ protobuf_c_boolean set_acc;
+ protobuf_c_boolean has_dec;
+ uint32_t dec;
+ protobuf_c_boolean has_set_dec;
+ protobuf_c_boolean set_dec;
+ protobuf_c_boolean has_max_speed;
+ uint32_t max_speed;
+ protobuf_c_boolean has_set_max_speed;
+ protobuf_c_boolean set_max_speed;
+};
+#define STUB_MOTOR_INIT_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_motor_init_request__descriptor) \
+ , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+
+
+/* StubMotorInitRequest methods */
+void stub_motor_init_request__init
+ (StubMotorInitRequest *message);
+size_t stub_motor_init_request__get_packed_size
+ (const StubMotorInitRequest *message);
+size_t stub_motor_init_request__pack
+ (const StubMotorInitRequest *message,
+ uint8_t *out);
+size_t stub_motor_init_request__pack_to_buffer
+ (const StubMotorInitRequest *message,
+ ProtobufCBuffer *buffer);
+StubMotorInitRequest *
+ stub_motor_init_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_motor_init_request__free_unpacked
+ (StubMotorInitRequest *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubMotorInitRequest_Closure)
+ (const StubMotorInitRequest *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_motor_init_request__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubMotorInitRequest_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorInitResponse.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorInitResponse.pb-c.c
new file mode 100644
index 000000000..17c436fa3
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorInitResponse.pb-c.c
@@ -0,0 +1,105 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorInitResponse.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubMotorInitResponse.pb-c.h"
+void stub_motor_init_response__init
+ (StubMotorInitResponse *message)
+{
+ static const StubMotorInitResponse init_value = STUB_MOTOR_INIT_RESPONSE__INIT;
+ *message = init_value;
+}
+size_t stub_motor_init_response__get_packed_size
+ (const StubMotorInitResponse *message)
+{
+ assert(message->base.descriptor == &stub_motor_init_response__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_motor_init_response__pack
+ (const StubMotorInitResponse *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_motor_init_response__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_motor_init_response__pack_to_buffer
+ (const StubMotorInitResponse *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_motor_init_response__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubMotorInitResponse *
+ stub_motor_init_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubMotorInitResponse *)
+ protobuf_c_message_unpack (&stub_motor_init_response__descriptor,
+ allocator, len, data);
+}
+void stub_motor_init_response__free_unpacked
+ (StubMotorInitResponse *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_motor_init_response__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_motor_init_response__field_descriptors[2] =
+{
+ {
+ "Motor_ID",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorInitResponse, has_motor_id),
+ offsetof(StubMotorInitResponse, motor_id),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Status",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorInitResponse, has_status),
+ offsetof(StubMotorInitResponse, status),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_motor_init_response__field_indices_by_name[] = {
+ 0, /* field[0] = Motor_ID */
+ 1, /* field[1] = Status */
+};
+static const ProtobufCIntRange stub_motor_init_response__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 2 }
+};
+const ProtobufCMessageDescriptor stub_motor_init_response__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubMotorInitResponse",
+ "StubMotorInitResponse",
+ "StubMotorInitResponse",
+ "",
+ sizeof(StubMotorInitResponse),
+ 2,
+ stub_motor_init_response__field_descriptors,
+ stub_motor_init_response__field_indices_by_name,
+ 1, stub_motor_init_response__number_ranges,
+ (ProtobufCMessageInit) stub_motor_init_response__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorInitResponse.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorInitResponse.pb-c.h
new file mode 100644
index 000000000..c4f825818
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorInitResponse.pb-c.h
@@ -0,0 +1,74 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorInitResponse.proto */
+
+#ifndef PROTOBUF_C_StubMotorInitResponse_2eproto__INCLUDED
+#define PROTOBUF_C_StubMotorInitResponse_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubMotorInitResponse StubMotorInitResponse;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubMotorInitResponse
+{
+ ProtobufCMessage base;
+ protobuf_c_boolean has_motor_id;
+ uint32_t motor_id;
+ protobuf_c_boolean has_status;
+ uint32_t status;
+};
+#define STUB_MOTOR_INIT_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_motor_init_response__descriptor) \
+ , 0, 0, 0, 0 }
+
+
+/* StubMotorInitResponse methods */
+void stub_motor_init_response__init
+ (StubMotorInitResponse *message);
+size_t stub_motor_init_response__get_packed_size
+ (const StubMotorInitResponse *message);
+size_t stub_motor_init_response__pack
+ (const StubMotorInitResponse *message,
+ uint8_t *out);
+size_t stub_motor_init_response__pack_to_buffer
+ (const StubMotorInitResponse *message,
+ ProtobufCBuffer *buffer);
+StubMotorInitResponse *
+ stub_motor_init_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_motor_init_response__free_unpacked
+ (StubMotorInitResponse *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubMotorInitResponse_Closure)
+ (const StubMotorInitResponse *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_motor_init_response__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubMotorInitResponse_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorMovRequest.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorMovRequest.pb-c.c
new file mode 100644
index 000000000..ed5152830
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorMovRequest.pb-c.c
@@ -0,0 +1,118 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorMovRequest.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubMotorMovRequest.pb-c.h"
+void stub_motor_mov_request__init
+ (StubMotorMovRequest *message)
+{
+ static const StubMotorMovRequest init_value = STUB_MOTOR_MOV_REQUEST__INIT;
+ *message = init_value;
+}
+size_t stub_motor_mov_request__get_packed_size
+ (const StubMotorMovRequest *message)
+{
+ assert(message->base.descriptor == &stub_motor_mov_request__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_motor_mov_request__pack
+ (const StubMotorMovRequest *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_motor_mov_request__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_motor_mov_request__pack_to_buffer
+ (const StubMotorMovRequest *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_motor_mov_request__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubMotorMovRequest *
+ stub_motor_mov_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubMotorMovRequest *)
+ protobuf_c_message_unpack (&stub_motor_mov_request__descriptor,
+ allocator, len, data);
+}
+void stub_motor_mov_request__free_unpacked
+ (StubMotorMovRequest *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_motor_mov_request__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_motor_mov_request__field_descriptors[3] =
+{
+ {
+ "Motor_ID",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorMovRequest, has_motor_id),
+ offsetof(StubMotorMovRequest, motor_id),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Direction",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorMovRequest, has_direction),
+ offsetof(StubMotorMovRequest, direction),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Position",
+ 3,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorMovRequest, has_position),
+ offsetof(StubMotorMovRequest, position),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_motor_mov_request__field_indices_by_name[] = {
+ 1, /* field[1] = Direction */
+ 0, /* field[0] = Motor_ID */
+ 2, /* field[2] = Position */
+};
+static const ProtobufCIntRange stub_motor_mov_request__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 3 }
+};
+const ProtobufCMessageDescriptor stub_motor_mov_request__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubMotorMovRequest",
+ "StubMotorMovRequest",
+ "StubMotorMovRequest",
+ "",
+ sizeof(StubMotorMovRequest),
+ 3,
+ stub_motor_mov_request__field_descriptors,
+ stub_motor_mov_request__field_indices_by_name,
+ 1, stub_motor_mov_request__number_ranges,
+ (ProtobufCMessageInit) stub_motor_mov_request__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorMovRequest.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorMovRequest.pb-c.h
new file mode 100644
index 000000000..8957b336a
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorMovRequest.pb-c.h
@@ -0,0 +1,76 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorMovRequest.proto */
+
+#ifndef PROTOBUF_C_StubMotorMovRequest_2eproto__INCLUDED
+#define PROTOBUF_C_StubMotorMovRequest_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubMotorMovRequest StubMotorMovRequest;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubMotorMovRequest
+{
+ 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_position;
+ uint32_t position;
+};
+#define STUB_MOTOR_MOV_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_motor_mov_request__descriptor) \
+ , 0, 0, 0, 0, 0, 0 }
+
+
+/* StubMotorMovRequest methods */
+void stub_motor_mov_request__init
+ (StubMotorMovRequest *message);
+size_t stub_motor_mov_request__get_packed_size
+ (const StubMotorMovRequest *message);
+size_t stub_motor_mov_request__pack
+ (const StubMotorMovRequest *message,
+ uint8_t *out);
+size_t stub_motor_mov_request__pack_to_buffer
+ (const StubMotorMovRequest *message,
+ ProtobufCBuffer *buffer);
+StubMotorMovRequest *
+ stub_motor_mov_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_motor_mov_request__free_unpacked
+ (StubMotorMovRequest *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubMotorMovRequest_Closure)
+ (const StubMotorMovRequest *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_motor_mov_request__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubMotorMovRequest_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorMovResponse.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorMovResponse.pb-c.c
new file mode 100644
index 000000000..e0da6c0b3
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorMovResponse.pb-c.c
@@ -0,0 +1,170 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorMovResponse.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubMotorMovResponse.pb-c.h"
+void stub_motor_mov_response__init
+ (StubMotorMovResponse *message)
+{
+ static const StubMotorMovResponse init_value = STUB_MOTOR_MOV_RESPONSE__INIT;
+ *message = init_value;
+}
+size_t stub_motor_mov_response__get_packed_size
+ (const StubMotorMovResponse *message)
+{
+ assert(message->base.descriptor == &stub_motor_mov_response__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_motor_mov_response__pack
+ (const StubMotorMovResponse *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_motor_mov_response__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_motor_mov_response__pack_to_buffer
+ (const StubMotorMovResponse *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_motor_mov_response__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubMotorMovResponse *
+ stub_motor_mov_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubMotorMovResponse *)
+ protobuf_c_message_unpack (&stub_motor_mov_response__descriptor,
+ allocator, len, data);
+}
+void stub_motor_mov_response__free_unpacked
+ (StubMotorMovResponse *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_motor_mov_response__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_motor_mov_response__field_descriptors[7] =
+{
+ {
+ "Motor_ID",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorMovResponse, has_motor_id),
+ offsetof(StubMotorMovResponse, motor_id),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Position",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorMovResponse, has_position),
+ offsetof(StubMotorMovResponse, position),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Status_Reg",
+ 3,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorMovResponse, has_status_reg),
+ offsetof(StubMotorMovResponse, status_reg),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Direction",
+ 4,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorMovResponse, has_direction),
+ offsetof(StubMotorMovResponse, direction),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Mot_Status",
+ 5,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorMovResponse, has_mot_status),
+ offsetof(StubMotorMovResponse, 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(StubMotorMovResponse, has_step_loss_a),
+ offsetof(StubMotorMovResponse, 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(StubMotorMovResponse, has_step_loss_b),
+ offsetof(StubMotorMovResponse, step_loss_b),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_motor_mov_response__field_indices_by_name[] = {
+ 3, /* field[3] = Direction */
+ 4, /* field[4] = Mot_Status */
+ 0, /* field[0] = Motor_ID */
+ 1, /* field[1] = Position */
+ 5, /* field[5] = STEP_LOSS_A */
+ 6, /* field[6] = STEP_LOSS_B */
+ 2, /* field[2] = Status_Reg */
+};
+static const ProtobufCIntRange stub_motor_mov_response__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 7 }
+};
+const ProtobufCMessageDescriptor stub_motor_mov_response__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubMotorMovResponse",
+ "StubMotorMovResponse",
+ "StubMotorMovResponse",
+ "",
+ sizeof(StubMotorMovResponse),
+ 7,
+ stub_motor_mov_response__field_descriptors,
+ stub_motor_mov_response__field_indices_by_name,
+ 1, stub_motor_mov_response__number_ranges,
+ (ProtobufCMessageInit) stub_motor_mov_response__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorMovResponse.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorMovResponse.pb-c.h
new file mode 100644
index 000000000..cd80996ed
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorMovResponse.pb-c.h
@@ -0,0 +1,90 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorMovResponse.proto */
+
+#ifndef PROTOBUF_C_StubMotorMovResponse_2eproto__INCLUDED
+#define PROTOBUF_C_StubMotorMovResponse_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubMotorMovResponse StubMotorMovResponse;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubMotorMovResponse
+{
+ ProtobufCMessage base;
+ protobuf_c_boolean has_motor_id;
+ uint32_t motor_id;
+ protobuf_c_boolean has_position;
+ uint32_t position;
+ 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;
+};
+#define STUB_MOTOR_MOV_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_motor_mov_response__descriptor) \
+ , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+
+
+/* StubMotorMovResponse methods */
+void stub_motor_mov_response__init
+ (StubMotorMovResponse *message);
+size_t stub_motor_mov_response__get_packed_size
+ (const StubMotorMovResponse *message);
+size_t stub_motor_mov_response__pack
+ (const StubMotorMovResponse *message,
+ uint8_t *out);
+size_t stub_motor_mov_response__pack_to_buffer
+ (const StubMotorMovResponse *message,
+ ProtobufCBuffer *buffer);
+StubMotorMovResponse *
+ stub_motor_mov_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_motor_mov_response__free_unpacked
+ (StubMotorMovResponse *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubMotorMovResponse_Closure)
+ (const StubMotorMovResponse *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_motor_mov_response__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubMotorMovResponse_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorPositionRequest.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorPositionRequest.pb-c.c
new file mode 100644
index 000000000..08f43e778
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorPositionRequest.pb-c.c
@@ -0,0 +1,92 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorPositionRequest.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubMotorPositionRequest.pb-c.h"
+void stub_motor_position_request__init
+ (StubMotorPositionRequest *message)
+{
+ static const StubMotorPositionRequest init_value = STUB_MOTOR_POSITION_REQUEST__INIT;
+ *message = init_value;
+}
+size_t stub_motor_position_request__get_packed_size
+ (const StubMotorPositionRequest *message)
+{
+ assert(message->base.descriptor == &stub_motor_position_request__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_motor_position_request__pack
+ (const StubMotorPositionRequest *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_motor_position_request__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_motor_position_request__pack_to_buffer
+ (const StubMotorPositionRequest *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_motor_position_request__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubMotorPositionRequest *
+ stub_motor_position_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubMotorPositionRequest *)
+ protobuf_c_message_unpack (&stub_motor_position_request__descriptor,
+ allocator, len, data);
+}
+void stub_motor_position_request__free_unpacked
+ (StubMotorPositionRequest *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_motor_position_request__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_motor_position_request__field_descriptors[1] =
+{
+ {
+ "Motor_ID",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorPositionRequest, has_motor_id),
+ offsetof(StubMotorPositionRequest, motor_id),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_motor_position_request__field_indices_by_name[] = {
+ 0, /* field[0] = Motor_ID */
+};
+static const ProtobufCIntRange stub_motor_position_request__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 1 }
+};
+const ProtobufCMessageDescriptor stub_motor_position_request__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubMotorPositionRequest",
+ "StubMotorPositionRequest",
+ "StubMotorPositionRequest",
+ "",
+ sizeof(StubMotorPositionRequest),
+ 1,
+ stub_motor_position_request__field_descriptors,
+ stub_motor_position_request__field_indices_by_name,
+ 1, stub_motor_position_request__number_ranges,
+ (ProtobufCMessageInit) stub_motor_position_request__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorPositionRequest.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorPositionRequest.pb-c.h
new file mode 100644
index 000000000..439a0f31d
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorPositionRequest.pb-c.h
@@ -0,0 +1,72 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorPositionRequest.proto */
+
+#ifndef PROTOBUF_C_StubMotorPositionRequest_2eproto__INCLUDED
+#define PROTOBUF_C_StubMotorPositionRequest_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubMotorPositionRequest StubMotorPositionRequest;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubMotorPositionRequest
+{
+ ProtobufCMessage base;
+ protobuf_c_boolean has_motor_id;
+ uint32_t motor_id;
+};
+#define STUB_MOTOR_POSITION_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_motor_position_request__descriptor) \
+ , 0, 0 }
+
+
+/* StubMotorPositionRequest methods */
+void stub_motor_position_request__init
+ (StubMotorPositionRequest *message);
+size_t stub_motor_position_request__get_packed_size
+ (const StubMotorPositionRequest *message);
+size_t stub_motor_position_request__pack
+ (const StubMotorPositionRequest *message,
+ uint8_t *out);
+size_t stub_motor_position_request__pack_to_buffer
+ (const StubMotorPositionRequest *message,
+ ProtobufCBuffer *buffer);
+StubMotorPositionRequest *
+ stub_motor_position_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_motor_position_request__free_unpacked
+ (StubMotorPositionRequest *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubMotorPositionRequest_Closure)
+ (const StubMotorPositionRequest *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_motor_position_request__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubMotorPositionRequest_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorPositionResponse.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorPositionResponse.pb-c.c
new file mode 100644
index 000000000..4354eb2da
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorPositionResponse.pb-c.c
@@ -0,0 +1,105 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorPositionResponse.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubMotorPositionResponse.pb-c.h"
+void stub_motor_position_response__init
+ (StubMotorPositionResponse *message)
+{
+ static const StubMotorPositionResponse init_value = STUB_MOTOR_POSITION_RESPONSE__INIT;
+ *message = init_value;
+}
+size_t stub_motor_position_response__get_packed_size
+ (const StubMotorPositionResponse *message)
+{
+ assert(message->base.descriptor == &stub_motor_position_response__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_motor_position_response__pack
+ (const StubMotorPositionResponse *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_motor_position_response__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_motor_position_response__pack_to_buffer
+ (const StubMotorPositionResponse *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_motor_position_response__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubMotorPositionResponse *
+ stub_motor_position_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubMotorPositionResponse *)
+ protobuf_c_message_unpack (&stub_motor_position_response__descriptor,
+ allocator, len, data);
+}
+void stub_motor_position_response__free_unpacked
+ (StubMotorPositionResponse *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_motor_position_response__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_motor_position_response__field_descriptors[2] =
+{
+ {
+ "Motor_ID",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorPositionResponse, has_motor_id),
+ offsetof(StubMotorPositionResponse, motor_id),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Position",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorPositionResponse, has_position),
+ offsetof(StubMotorPositionResponse, position),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_motor_position_response__field_indices_by_name[] = {
+ 0, /* field[0] = Motor_ID */
+ 1, /* field[1] = Position */
+};
+static const ProtobufCIntRange stub_motor_position_response__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 2 }
+};
+const ProtobufCMessageDescriptor stub_motor_position_response__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubMotorPositionResponse",
+ "StubMotorPositionResponse",
+ "StubMotorPositionResponse",
+ "",
+ sizeof(StubMotorPositionResponse),
+ 2,
+ stub_motor_position_response__field_descriptors,
+ stub_motor_position_response__field_indices_by_name,
+ 1, stub_motor_position_response__number_ranges,
+ (ProtobufCMessageInit) stub_motor_position_response__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorPositionResponse.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorPositionResponse.pb-c.h
new file mode 100644
index 000000000..13c7c3c95
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorPositionResponse.pb-c.h
@@ -0,0 +1,74 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorPositionResponse.proto */
+
+#ifndef PROTOBUF_C_StubMotorPositionResponse_2eproto__INCLUDED
+#define PROTOBUF_C_StubMotorPositionResponse_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubMotorPositionResponse StubMotorPositionResponse;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubMotorPositionResponse
+{
+ ProtobufCMessage base;
+ protobuf_c_boolean has_motor_id;
+ uint32_t motor_id;
+ protobuf_c_boolean has_position;
+ uint32_t position;
+};
+#define STUB_MOTOR_POSITION_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_motor_position_response__descriptor) \
+ , 0, 0, 0, 0 }
+
+
+/* StubMotorPositionResponse methods */
+void stub_motor_position_response__init
+ (StubMotorPositionResponse *message);
+size_t stub_motor_position_response__get_packed_size
+ (const StubMotorPositionResponse *message);
+size_t stub_motor_position_response__pack
+ (const StubMotorPositionResponse *message,
+ uint8_t *out);
+size_t stub_motor_position_response__pack_to_buffer
+ (const StubMotorPositionResponse *message,
+ ProtobufCBuffer *buffer);
+StubMotorPositionResponse *
+ stub_motor_position_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_motor_position_response__free_unpacked
+ (StubMotorPositionResponse *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubMotorPositionResponse_Closure)
+ (const StubMotorPositionResponse *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_motor_position_response__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubMotorPositionResponse_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunRequest.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunRequest.pb-c.c
new file mode 100644
index 000000000..30cf9ccf2
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunRequest.pb-c.c
@@ -0,0 +1,118 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorRunRequest.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubMotorRunRequest.pb-c.h"
+void stub_motor_run_request__init
+ (StubMotorRunRequest *message)
+{
+ static const StubMotorRunRequest init_value = STUB_MOTOR_RUN_REQUEST__INIT;
+ *message = init_value;
+}
+size_t stub_motor_run_request__get_packed_size
+ (const StubMotorRunRequest *message)
+{
+ assert(message->base.descriptor == &stub_motor_run_request__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_motor_run_request__pack
+ (const StubMotorRunRequest *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_motor_run_request__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_motor_run_request__pack_to_buffer
+ (const StubMotorRunRequest *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_motor_run_request__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubMotorRunRequest *
+ stub_motor_run_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubMotorRunRequest *)
+ protobuf_c_message_unpack (&stub_motor_run_request__descriptor,
+ allocator, len, data);
+}
+void stub_motor_run_request__free_unpacked
+ (StubMotorRunRequest *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_motor_run_request__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_motor_run_request__field_descriptors[3] =
+{
+ {
+ "Motor_ID",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorRunRequest, has_motor_id),
+ offsetof(StubMotorRunRequest, motor_id),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Direction",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorRunRequest, has_direction),
+ offsetof(StubMotorRunRequest, direction),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Speed",
+ 3,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(StubMotorRunRequest, has_speed),
+ offsetof(StubMotorRunRequest, speed),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_motor_run_request__field_indices_by_name[] = {
+ 1, /* field[1] = Direction */
+ 0, /* field[0] = Motor_ID */
+ 2, /* field[2] = Speed */
+};
+static const ProtobufCIntRange stub_motor_run_request__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 3 }
+};
+const ProtobufCMessageDescriptor stub_motor_run_request__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubMotorRunRequest",
+ "StubMotorRunRequest",
+ "StubMotorRunRequest",
+ "",
+ sizeof(StubMotorRunRequest),
+ 3,
+ stub_motor_run_request__field_descriptors,
+ stub_motor_run_request__field_indices_by_name,
+ 1, stub_motor_run_request__number_ranges,
+ (ProtobufCMessageInit) stub_motor_run_request__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunRequest.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunRequest.pb-c.h
new file mode 100644
index 000000000..5c4ce2efd
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunRequest.pb-c.h
@@ -0,0 +1,76 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorRunRequest.proto */
+
+#ifndef PROTOBUF_C_StubMotorRunRequest_2eproto__INCLUDED
+#define PROTOBUF_C_StubMotorRunRequest_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubMotorRunRequest StubMotorRunRequest;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubMotorRunRequest
+{
+ 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_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_motor_run_request__descriptor) \
+ , 0, 0, 0, 0, 0, 0 }
+
+
+/* StubMotorRunRequest methods */
+void stub_motor_run_request__init
+ (StubMotorRunRequest *message);
+size_t stub_motor_run_request__get_packed_size
+ (const StubMotorRunRequest *message);
+size_t stub_motor_run_request__pack
+ (const StubMotorRunRequest *message,
+ uint8_t *out);
+size_t stub_motor_run_request__pack_to_buffer
+ (const StubMotorRunRequest *message,
+ ProtobufCBuffer *buffer);
+StubMotorRunRequest *
+ stub_motor_run_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_motor_run_request__free_unpacked
+ (StubMotorRunRequest *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubMotorRunRequest_Closure)
+ (const StubMotorRunRequest *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_motor_run_request__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubMotorRunRequest_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunResponse.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunResponse.pb-c.c
new file mode 100644
index 000000000..ccbd85dbf
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunResponse.pb-c.c
@@ -0,0 +1,170 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorRunResponse.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubMotorRunResponse.pb-c.h"
+void stub_motor_run_response__init
+ (StubMotorRunResponse *message)
+{
+ static const StubMotorRunResponse init_value = STUB_MOTOR_RUN_RESPONSE__INIT;
+ *message = init_value;
+}
+size_t stub_motor_run_response__get_packed_size
+ (const StubMotorRunResponse *message)
+{
+ assert(message->base.descriptor == &stub_motor_run_response__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_motor_run_response__pack
+ (const StubMotorRunResponse *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_motor_run_response__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_motor_run_response__pack_to_buffer
+ (const StubMotorRunResponse *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_motor_run_response__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubMotorRunResponse *
+ stub_motor_run_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubMotorRunResponse *)
+ protobuf_c_message_unpack (&stub_motor_run_response__descriptor,
+ allocator, len, data);
+}
+void stub_motor_run_response__free_unpacked
+ (StubMotorRunResponse *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_motor_run_response__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_motor_run_response__field_descriptors[7] =
+{
+ {
+ "Motor_ID",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorRunResponse, has_motor_id),
+ offsetof(StubMotorRunResponse, motor_id),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Speed",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(StubMotorRunResponse, has_speed),
+ offsetof(StubMotorRunResponse, speed),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Status_Reg",
+ 3,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorRunResponse, has_status_reg),
+ offsetof(StubMotorRunResponse, status_reg),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Direction",
+ 4,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorRunResponse, has_direction),
+ offsetof(StubMotorRunResponse, direction),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Mot_Status",
+ 5,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorRunResponse, has_mot_status),
+ offsetof(StubMotorRunResponse, 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(StubMotorRunResponse, has_step_loss_a),
+ offsetof(StubMotorRunResponse, 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(StubMotorRunResponse, has_step_loss_b),
+ offsetof(StubMotorRunResponse, step_loss_b),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_motor_run_response__field_indices_by_name[] = {
+ 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_response__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 7 }
+};
+const ProtobufCMessageDescriptor stub_motor_run_response__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubMotorRunResponse",
+ "StubMotorRunResponse",
+ "StubMotorRunResponse",
+ "",
+ sizeof(StubMotorRunResponse),
+ 7,
+ stub_motor_run_response__field_descriptors,
+ stub_motor_run_response__field_indices_by_name,
+ 1, stub_motor_run_response__number_ranges,
+ (ProtobufCMessageInit) stub_motor_run_response__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunResponse.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunResponse.pb-c.h
new file mode 100644
index 000000000..ad4f33de8
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorRunResponse.pb-c.h
@@ -0,0 +1,90 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorRunResponse.proto */
+
+#ifndef PROTOBUF_C_StubMotorRunResponse_2eproto__INCLUDED
+#define PROTOBUF_C_StubMotorRunResponse_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubMotorRunResponse StubMotorRunResponse;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubMotorRunResponse
+{
+ 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;
+};
+#define STUB_MOTOR_RUN_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_motor_run_response__descriptor) \
+ , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+
+
+/* StubMotorRunResponse methods */
+void stub_motor_run_response__init
+ (StubMotorRunResponse *message);
+size_t stub_motor_run_response__get_packed_size
+ (const StubMotorRunResponse *message);
+size_t stub_motor_run_response__pack
+ (const StubMotorRunResponse *message,
+ uint8_t *out);
+size_t stub_motor_run_response__pack_to_buffer
+ (const StubMotorRunResponse *message,
+ ProtobufCBuffer *buffer);
+StubMotorRunResponse *
+ stub_motor_run_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_motor_run_response__free_unpacked
+ (StubMotorRunResponse *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubMotorRunResponse_Closure)
+ (const StubMotorRunResponse *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_motor_run_response__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubMotorRunResponse_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorSpeedRequest.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorSpeedRequest.pb-c.c
new file mode 100644
index 000000000..c8acbfdfd
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorSpeedRequest.pb-c.c
@@ -0,0 +1,92 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorSpeedRequest.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubMotorSpeedRequest.pb-c.h"
+void stub_motor_speed_request__init
+ (StubMotorSpeedRequest *message)
+{
+ static const StubMotorSpeedRequest init_value = STUB_MOTOR_SPEED_REQUEST__INIT;
+ *message = init_value;
+}
+size_t stub_motor_speed_request__get_packed_size
+ (const StubMotorSpeedRequest *message)
+{
+ assert(message->base.descriptor == &stub_motor_speed_request__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_motor_speed_request__pack
+ (const StubMotorSpeedRequest *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_motor_speed_request__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_motor_speed_request__pack_to_buffer
+ (const StubMotorSpeedRequest *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_motor_speed_request__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubMotorSpeedRequest *
+ stub_motor_speed_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubMotorSpeedRequest *)
+ protobuf_c_message_unpack (&stub_motor_speed_request__descriptor,
+ allocator, len, data);
+}
+void stub_motor_speed_request__free_unpacked
+ (StubMotorSpeedRequest *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_motor_speed_request__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_motor_speed_request__field_descriptors[1] =
+{
+ {
+ "Motor_ID",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorSpeedRequest, has_motor_id),
+ offsetof(StubMotorSpeedRequest, motor_id),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_motor_speed_request__field_indices_by_name[] = {
+ 0, /* field[0] = Motor_ID */
+};
+static const ProtobufCIntRange stub_motor_speed_request__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 1 }
+};
+const ProtobufCMessageDescriptor stub_motor_speed_request__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubMotorSpeedRequest",
+ "StubMotorSpeedRequest",
+ "StubMotorSpeedRequest",
+ "",
+ sizeof(StubMotorSpeedRequest),
+ 1,
+ stub_motor_speed_request__field_descriptors,
+ stub_motor_speed_request__field_indices_by_name,
+ 1, stub_motor_speed_request__number_ranges,
+ (ProtobufCMessageInit) stub_motor_speed_request__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorSpeedRequest.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorSpeedRequest.pb-c.h
new file mode 100644
index 000000000..537ca4da6
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorSpeedRequest.pb-c.h
@@ -0,0 +1,72 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorSpeedRequest.proto */
+
+#ifndef PROTOBUF_C_StubMotorSpeedRequest_2eproto__INCLUDED
+#define PROTOBUF_C_StubMotorSpeedRequest_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubMotorSpeedRequest StubMotorSpeedRequest;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubMotorSpeedRequest
+{
+ ProtobufCMessage base;
+ protobuf_c_boolean has_motor_id;
+ uint32_t motor_id;
+};
+#define STUB_MOTOR_SPEED_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_motor_speed_request__descriptor) \
+ , 0, 0 }
+
+
+/* StubMotorSpeedRequest methods */
+void stub_motor_speed_request__init
+ (StubMotorSpeedRequest *message);
+size_t stub_motor_speed_request__get_packed_size
+ (const StubMotorSpeedRequest *message);
+size_t stub_motor_speed_request__pack
+ (const StubMotorSpeedRequest *message,
+ uint8_t *out);
+size_t stub_motor_speed_request__pack_to_buffer
+ (const StubMotorSpeedRequest *message,
+ ProtobufCBuffer *buffer);
+StubMotorSpeedRequest *
+ stub_motor_speed_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_motor_speed_request__free_unpacked
+ (StubMotorSpeedRequest *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubMotorSpeedRequest_Closure)
+ (const StubMotorSpeedRequest *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_motor_speed_request__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubMotorSpeedRequest_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorSpeedResponse.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorSpeedResponse.pb-c.c
new file mode 100644
index 000000000..34d826880
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorSpeedResponse.pb-c.c
@@ -0,0 +1,105 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorSpeedResponse.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubMotorSpeedResponse.pb-c.h"
+void stub_motor_speed_response__init
+ (StubMotorSpeedResponse *message)
+{
+ static const StubMotorSpeedResponse init_value = STUB_MOTOR_SPEED_RESPONSE__INIT;
+ *message = init_value;
+}
+size_t stub_motor_speed_response__get_packed_size
+ (const StubMotorSpeedResponse *message)
+{
+ assert(message->base.descriptor == &stub_motor_speed_response__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_motor_speed_response__pack
+ (const StubMotorSpeedResponse *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_motor_speed_response__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_motor_speed_response__pack_to_buffer
+ (const StubMotorSpeedResponse *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_motor_speed_response__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubMotorSpeedResponse *
+ stub_motor_speed_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubMotorSpeedResponse *)
+ protobuf_c_message_unpack (&stub_motor_speed_response__descriptor,
+ allocator, len, data);
+}
+void stub_motor_speed_response__free_unpacked
+ (StubMotorSpeedResponse *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_motor_speed_response__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_motor_speed_response__field_descriptors[2] =
+{
+ {
+ "Motor_ID",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorSpeedResponse, has_motor_id),
+ offsetof(StubMotorSpeedResponse, motor_id),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Speed",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(StubMotorSpeedResponse, has_speed),
+ offsetof(StubMotorSpeedResponse, speed),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_motor_speed_response__field_indices_by_name[] = {
+ 0, /* field[0] = Motor_ID */
+ 1, /* field[1] = Speed */
+};
+static const ProtobufCIntRange stub_motor_speed_response__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 2 }
+};
+const ProtobufCMessageDescriptor stub_motor_speed_response__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubMotorSpeedResponse",
+ "StubMotorSpeedResponse",
+ "StubMotorSpeedResponse",
+ "",
+ sizeof(StubMotorSpeedResponse),
+ 2,
+ stub_motor_speed_response__field_descriptors,
+ stub_motor_speed_response__field_indices_by_name,
+ 1, stub_motor_speed_response__number_ranges,
+ (ProtobufCMessageInit) stub_motor_speed_response__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorSpeedResponse.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorSpeedResponse.pb-c.h
new file mode 100644
index 000000000..d113e02d9
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorSpeedResponse.pb-c.h
@@ -0,0 +1,74 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorSpeedResponse.proto */
+
+#ifndef PROTOBUF_C_StubMotorSpeedResponse_2eproto__INCLUDED
+#define PROTOBUF_C_StubMotorSpeedResponse_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubMotorSpeedResponse StubMotorSpeedResponse;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubMotorSpeedResponse
+{
+ ProtobufCMessage base;
+ protobuf_c_boolean has_motor_id;
+ uint32_t motor_id;
+ protobuf_c_boolean has_speed;
+ double speed;
+};
+#define STUB_MOTOR_SPEED_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_motor_speed_response__descriptor) \
+ , 0, 0, 0, 0 }
+
+
+/* StubMotorSpeedResponse methods */
+void stub_motor_speed_response__init
+ (StubMotorSpeedResponse *message);
+size_t stub_motor_speed_response__get_packed_size
+ (const StubMotorSpeedResponse *message);
+size_t stub_motor_speed_response__pack
+ (const StubMotorSpeedResponse *message,
+ uint8_t *out);
+size_t stub_motor_speed_response__pack_to_buffer
+ (const StubMotorSpeedResponse *message,
+ ProtobufCBuffer *buffer);
+StubMotorSpeedResponse *
+ stub_motor_speed_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_motor_speed_response__free_unpacked
+ (StubMotorSpeedResponse *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubMotorSpeedResponse_Closure)
+ (const StubMotorSpeedResponse *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_motor_speed_response__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubMotorSpeedResponse_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStatusRequest.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStatusRequest.pb-c.c
new file mode 100644
index 000000000..21ff45bab
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStatusRequest.pb-c.c
@@ -0,0 +1,105 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorStatusRequest.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubMotorStatusRequest.pb-c.h"
+void stub_motor_status_request__init
+ (StubMotorStatusRequest *message)
+{
+ static const StubMotorStatusRequest init_value = STUB_MOTOR_STATUS_REQUEST__INIT;
+ *message = init_value;
+}
+size_t stub_motor_status_request__get_packed_size
+ (const StubMotorStatusRequest *message)
+{
+ assert(message->base.descriptor == &stub_motor_status_request__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_motor_status_request__pack
+ (const StubMotorStatusRequest *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_motor_status_request__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_motor_status_request__pack_to_buffer
+ (const StubMotorStatusRequest *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_motor_status_request__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubMotorStatusRequest *
+ stub_motor_status_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubMotorStatusRequest *)
+ protobuf_c_message_unpack (&stub_motor_status_request__descriptor,
+ allocator, len, data);
+}
+void stub_motor_status_request__free_unpacked
+ (StubMotorStatusRequest *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_motor_status_request__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_motor_status_request__field_descriptors[2] =
+{
+ {
+ "Motor_ID",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorStatusRequest, has_motor_id),
+ offsetof(StubMotorStatusRequest, motor_id),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "ClearStatus",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorStatusRequest, has_clearstatus),
+ offsetof(StubMotorStatusRequest, clearstatus),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_motor_status_request__field_indices_by_name[] = {
+ 1, /* field[1] = ClearStatus */
+ 0, /* field[0] = Motor_ID */
+};
+static const ProtobufCIntRange stub_motor_status_request__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 2 }
+};
+const ProtobufCMessageDescriptor stub_motor_status_request__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubMotorStatusRequest",
+ "StubMotorStatusRequest",
+ "StubMotorStatusRequest",
+ "",
+ sizeof(StubMotorStatusRequest),
+ 2,
+ stub_motor_status_request__field_descriptors,
+ stub_motor_status_request__field_indices_by_name,
+ 1, stub_motor_status_request__number_ranges,
+ (ProtobufCMessageInit) stub_motor_status_request__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStatusRequest.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStatusRequest.pb-c.h
new file mode 100644
index 000000000..84fbd6080
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStatusRequest.pb-c.h
@@ -0,0 +1,74 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorStatusRequest.proto */
+
+#ifndef PROTOBUF_C_StubMotorStatusRequest_2eproto__INCLUDED
+#define PROTOBUF_C_StubMotorStatusRequest_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubMotorStatusRequest StubMotorStatusRequest;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubMotorStatusRequest
+{
+ ProtobufCMessage base;
+ protobuf_c_boolean has_motor_id;
+ uint32_t motor_id;
+ protobuf_c_boolean has_clearstatus;
+ protobuf_c_boolean clearstatus;
+};
+#define STUB_MOTOR_STATUS_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_motor_status_request__descriptor) \
+ , 0, 0, 0, 0 }
+
+
+/* StubMotorStatusRequest methods */
+void stub_motor_status_request__init
+ (StubMotorStatusRequest *message);
+size_t stub_motor_status_request__get_packed_size
+ (const StubMotorStatusRequest *message);
+size_t stub_motor_status_request__pack
+ (const StubMotorStatusRequest *message,
+ uint8_t *out);
+size_t stub_motor_status_request__pack_to_buffer
+ (const StubMotorStatusRequest *message,
+ ProtobufCBuffer *buffer);
+StubMotorStatusRequest *
+ stub_motor_status_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_motor_status_request__free_unpacked
+ (StubMotorStatusRequest *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubMotorStatusRequest_Closure)
+ (const StubMotorStatusRequest *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_motor_status_request__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubMotorStatusRequest_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStatusResponse.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStatusResponse.pb-c.c
new file mode 100644
index 000000000..9236abdea
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStatusResponse.pb-c.c
@@ -0,0 +1,287 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorStatusResponse.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubMotorStatusResponse.pb-c.h"
+void stub_motor_status_response__init
+ (StubMotorStatusResponse *message)
+{
+ static const StubMotorStatusResponse init_value = STUB_MOTOR_STATUS_RESPONSE__INIT;
+ *message = init_value;
+}
+size_t stub_motor_status_response__get_packed_size
+ (const StubMotorStatusResponse *message)
+{
+ assert(message->base.descriptor == &stub_motor_status_response__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_motor_status_response__pack
+ (const StubMotorStatusResponse *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_motor_status_response__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_motor_status_response__pack_to_buffer
+ (const StubMotorStatusResponse *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_motor_status_response__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubMotorStatusResponse *
+ stub_motor_status_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubMotorStatusResponse *)
+ protobuf_c_message_unpack (&stub_motor_status_response__descriptor,
+ allocator, len, data);
+}
+void stub_motor_status_response__free_unpacked
+ (StubMotorStatusResponse *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_motor_status_response__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_motor_status_response__field_descriptors[16] =
+{
+ {
+ "Motor_ID",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorStatusResponse, has_motor_id),
+ offsetof(StubMotorStatusResponse, motor_id),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "SCK_MOD",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorStatusResponse, has_sck_mod),
+ offsetof(StubMotorStatusResponse, sck_mod),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "STEP_LOSS_B",
+ 3,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorStatusResponse, has_step_loss_b),
+ offsetof(StubMotorStatusResponse, step_loss_b),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "STEP_LOSS_A",
+ 4,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorStatusResponse, has_step_loss_a),
+ offsetof(StubMotorStatusResponse, step_loss_a),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "OCD",
+ 5,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorStatusResponse, has_ocd),
+ offsetof(StubMotorStatusResponse, ocd),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TH_SD",
+ 6,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorStatusResponse, has_th_sd),
+ offsetof(StubMotorStatusResponse, th_sd),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "TH_WRN",
+ 7,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorStatusResponse, has_th_wrn),
+ offsetof(StubMotorStatusResponse, th_wrn),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "UVLO",
+ 8,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorStatusResponse, has_uvlo),
+ offsetof(StubMotorStatusResponse, uvlo),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "WRONG_CMD",
+ 9,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorStatusResponse, has_wrong_cmd),
+ offsetof(StubMotorStatusResponse, wrong_cmd),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "NOTPERF_CMD",
+ 10,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorStatusResponse, has_notperf_cmd),
+ offsetof(StubMotorStatusResponse, notperf_cmd),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "MOT_STATUS",
+ 11,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorStatusResponse, has_mot_status),
+ offsetof(StubMotorStatusResponse, mot_status),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "DIR",
+ 12,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorStatusResponse, has_dir),
+ offsetof(StubMotorStatusResponse, dir),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "SW_EVN",
+ 13,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorStatusResponse, has_sw_evn),
+ offsetof(StubMotorStatusResponse, sw_evn),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "SW_F",
+ 14,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorStatusResponse, has_sw_f),
+ offsetof(StubMotorStatusResponse, sw_f),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "BUSY",
+ 15,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorStatusResponse, has_busy),
+ offsetof(StubMotorStatusResponse, busy),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "HiZ",
+ 16,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorStatusResponse, has_hiz),
+ offsetof(StubMotorStatusResponse, hiz),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_motor_status_response__field_indices_by_name[] = {
+ 14, /* field[14] = BUSY */
+ 11, /* field[11] = DIR */
+ 15, /* field[15] = HiZ */
+ 10, /* field[10] = MOT_STATUS */
+ 0, /* field[0] = Motor_ID */
+ 9, /* field[9] = NOTPERF_CMD */
+ 4, /* field[4] = OCD */
+ 1, /* field[1] = SCK_MOD */
+ 3, /* field[3] = STEP_LOSS_A */
+ 2, /* field[2] = STEP_LOSS_B */
+ 12, /* field[12] = SW_EVN */
+ 13, /* field[13] = SW_F */
+ 5, /* field[5] = TH_SD */
+ 6, /* field[6] = TH_WRN */
+ 7, /* field[7] = UVLO */
+ 8, /* field[8] = WRONG_CMD */
+};
+static const ProtobufCIntRange stub_motor_status_response__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 16 }
+};
+const ProtobufCMessageDescriptor stub_motor_status_response__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubMotorStatusResponse",
+ "StubMotorStatusResponse",
+ "StubMotorStatusResponse",
+ "",
+ sizeof(StubMotorStatusResponse),
+ 16,
+ stub_motor_status_response__field_descriptors,
+ stub_motor_status_response__field_indices_by_name,
+ 1, stub_motor_status_response__number_ranges,
+ (ProtobufCMessageInit) stub_motor_status_response__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStatusResponse.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStatusResponse.pb-c.h
new file mode 100644
index 000000000..440830b3b
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStatusResponse.pb-c.h
@@ -0,0 +1,102 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorStatusResponse.proto */
+
+#ifndef PROTOBUF_C_StubMotorStatusResponse_2eproto__INCLUDED
+#define PROTOBUF_C_StubMotorStatusResponse_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubMotorStatusResponse StubMotorStatusResponse;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubMotorStatusResponse
+{
+ ProtobufCMessage base;
+ protobuf_c_boolean has_motor_id;
+ uint32_t motor_id;
+ protobuf_c_boolean has_sck_mod;
+ protobuf_c_boolean sck_mod;
+ protobuf_c_boolean has_step_loss_b;
+ protobuf_c_boolean step_loss_b;
+ protobuf_c_boolean has_step_loss_a;
+ protobuf_c_boolean step_loss_a;
+ protobuf_c_boolean has_ocd;
+ protobuf_c_boolean ocd;
+ protobuf_c_boolean has_th_sd;
+ protobuf_c_boolean th_sd;
+ protobuf_c_boolean has_th_wrn;
+ protobuf_c_boolean th_wrn;
+ protobuf_c_boolean has_uvlo;
+ protobuf_c_boolean uvlo;
+ protobuf_c_boolean has_wrong_cmd;
+ protobuf_c_boolean wrong_cmd;
+ protobuf_c_boolean has_notperf_cmd;
+ protobuf_c_boolean notperf_cmd;
+ protobuf_c_boolean has_mot_status;
+ uint32_t mot_status;
+ protobuf_c_boolean has_dir;
+ protobuf_c_boolean dir;
+ protobuf_c_boolean has_sw_evn;
+ protobuf_c_boolean sw_evn;
+ protobuf_c_boolean has_sw_f;
+ protobuf_c_boolean sw_f;
+ protobuf_c_boolean has_busy;
+ protobuf_c_boolean busy;
+ protobuf_c_boolean has_hiz;
+ protobuf_c_boolean hiz;
+};
+#define STUB_MOTOR_STATUS_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_motor_status_response__descriptor) \
+ , 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 }
+
+
+/* StubMotorStatusResponse methods */
+void stub_motor_status_response__init
+ (StubMotorStatusResponse *message);
+size_t stub_motor_status_response__get_packed_size
+ (const StubMotorStatusResponse *message);
+size_t stub_motor_status_response__pack
+ (const StubMotorStatusResponse *message,
+ uint8_t *out);
+size_t stub_motor_status_response__pack_to_buffer
+ (const StubMotorStatusResponse *message,
+ ProtobufCBuffer *buffer);
+StubMotorStatusResponse *
+ stub_motor_status_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_motor_status_response__free_unpacked
+ (StubMotorStatusResponse *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubMotorStatusResponse_Closure)
+ (const StubMotorStatusResponse *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_motor_status_response__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubMotorStatusResponse_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStopRequest.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStopRequest.pb-c.c
new file mode 100644
index 000000000..1bcdca7be
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStopRequest.pb-c.c
@@ -0,0 +1,105 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorStopRequest.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubMotorStopRequest.pb-c.h"
+void stub_motor_stop_request__init
+ (StubMotorStopRequest *message)
+{
+ static const StubMotorStopRequest init_value = STUB_MOTOR_STOP_REQUEST__INIT;
+ *message = init_value;
+}
+size_t stub_motor_stop_request__get_packed_size
+ (const StubMotorStopRequest *message)
+{
+ assert(message->base.descriptor == &stub_motor_stop_request__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_motor_stop_request__pack
+ (const StubMotorStopRequest *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_motor_stop_request__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_motor_stop_request__pack_to_buffer
+ (const StubMotorStopRequest *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_motor_stop_request__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubMotorStopRequest *
+ stub_motor_stop_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubMotorStopRequest *)
+ protobuf_c_message_unpack (&stub_motor_stop_request__descriptor,
+ allocator, len, data);
+}
+void stub_motor_stop_request__free_unpacked
+ (StubMotorStopRequest *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_motor_stop_request__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_motor_stop_request__field_descriptors[2] =
+{
+ {
+ "Motor_ID",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorStopRequest, has_motor_id),
+ offsetof(StubMotorStopRequest, motor_id),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Stop_CMD",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorStopRequest, has_stop_cmd),
+ offsetof(StubMotorStopRequest, stop_cmd),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_motor_stop_request__field_indices_by_name[] = {
+ 0, /* field[0] = Motor_ID */
+ 1, /* field[1] = Stop_CMD */
+};
+static const ProtobufCIntRange stub_motor_stop_request__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 2 }
+};
+const ProtobufCMessageDescriptor stub_motor_stop_request__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubMotorStopRequest",
+ "StubMotorStopRequest",
+ "StubMotorStopRequest",
+ "",
+ sizeof(StubMotorStopRequest),
+ 2,
+ stub_motor_stop_request__field_descriptors,
+ stub_motor_stop_request__field_indices_by_name,
+ 1, stub_motor_stop_request__number_ranges,
+ (ProtobufCMessageInit) stub_motor_stop_request__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStopRequest.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStopRequest.pb-c.h
new file mode 100644
index 000000000..2c89fc185
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStopRequest.pb-c.h
@@ -0,0 +1,77 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorStopRequest.proto */
+
+#ifndef PROTOBUF_C_StubMotorStopRequest_2eproto__INCLUDED
+#define PROTOBUF_C_StubMotorStopRequest_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubMotorStopRequest StubMotorStopRequest;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubMotorStopRequest
+{
+ ProtobufCMessage base;
+ protobuf_c_boolean has_motor_id;
+ uint32_t motor_id;
+ /*
+ * 1 - Hard_Stop/ 2 - Soft_Stop/ 3 - Hard_Hiz/ 4 - Soft_Hiz
+ */
+ protobuf_c_boolean has_stop_cmd;
+ uint32_t stop_cmd;
+};
+#define STUB_MOTOR_STOP_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_motor_stop_request__descriptor) \
+ , 0, 0, 0, 0 }
+
+
+/* StubMotorStopRequest methods */
+void stub_motor_stop_request__init
+ (StubMotorStopRequest *message);
+size_t stub_motor_stop_request__get_packed_size
+ (const StubMotorStopRequest *message);
+size_t stub_motor_stop_request__pack
+ (const StubMotorStopRequest *message,
+ uint8_t *out);
+size_t stub_motor_stop_request__pack_to_buffer
+ (const StubMotorStopRequest *message,
+ ProtobufCBuffer *buffer);
+StubMotorStopRequest *
+ stub_motor_stop_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_motor_stop_request__free_unpacked
+ (StubMotorStopRequest *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubMotorStopRequest_Closure)
+ (const StubMotorStopRequest *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_motor_stop_request__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubMotorStopRequest_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStopResponse.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStopResponse.pb-c.c
new file mode 100644
index 000000000..d829d6b68
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStopResponse.pb-c.c
@@ -0,0 +1,118 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorStopResponse.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "StubMotorStopResponse.pb-c.h"
+void stub_motor_stop_response__init
+ (StubMotorStopResponse *message)
+{
+ static const StubMotorStopResponse init_value = STUB_MOTOR_STOP_RESPONSE__INIT;
+ *message = init_value;
+}
+size_t stub_motor_stop_response__get_packed_size
+ (const StubMotorStopResponse *message)
+{
+ assert(message->base.descriptor == &stub_motor_stop_response__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t stub_motor_stop_response__pack
+ (const StubMotorStopResponse *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &stub_motor_stop_response__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t stub_motor_stop_response__pack_to_buffer
+ (const StubMotorStopResponse *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &stub_motor_stop_response__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+StubMotorStopResponse *
+ stub_motor_stop_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (StubMotorStopResponse *)
+ protobuf_c_message_unpack (&stub_motor_stop_response__descriptor,
+ allocator, len, data);
+}
+void stub_motor_stop_response__free_unpacked
+ (StubMotorStopResponse *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &stub_motor_stop_response__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor stub_motor_stop_response__field_descriptors[3] =
+{
+ {
+ "Motor_ID",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorStopResponse, has_motor_id),
+ offsetof(StubMotorStopResponse, motor_id),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Mot_Status",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(StubMotorStopResponse, has_mot_status),
+ offsetof(StubMotorStopResponse, mot_status),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "HiZ",
+ 3,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(StubMotorStopResponse, has_hiz),
+ offsetof(StubMotorStopResponse, hiz),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned stub_motor_stop_response__field_indices_by_name[] = {
+ 2, /* field[2] = HiZ */
+ 1, /* field[1] = Mot_Status */
+ 0, /* field[0] = Motor_ID */
+};
+static const ProtobufCIntRange stub_motor_stop_response__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 3 }
+};
+const ProtobufCMessageDescriptor stub_motor_stop_response__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "StubMotorStopResponse",
+ "StubMotorStopResponse",
+ "StubMotorStopResponse",
+ "",
+ sizeof(StubMotorStopResponse),
+ 3,
+ stub_motor_stop_response__field_descriptors,
+ stub_motor_stop_response__field_indices_by_name,
+ 1, stub_motor_stop_response__number_ranges,
+ (ProtobufCMessageInit) stub_motor_stop_response__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStopResponse.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStopResponse.pb-c.h
new file mode 100644
index 000000000..ca3fd9d38
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Stubs/StubMotorStopResponse.pb-c.h
@@ -0,0 +1,82 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: StubMotorStopResponse.proto */
+
+#ifndef PROTOBUF_C_StubMotorStopResponse_2eproto__INCLUDED
+#define PROTOBUF_C_StubMotorStopResponse_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+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 _StubMotorStopResponse StubMotorStopResponse;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _StubMotorStopResponse
+{
+ ProtobufCMessage base;
+ protobuf_c_boolean has_motor_id;
+ uint32_t motor_id;
+ /*
+ * Stopped / Acceleration / Deceleration / Constant speed
+ */
+ protobuf_c_boolean has_mot_status;
+ uint32_t mot_status;
+ /*
+ * 1 - high impedance state.
+ */
+ protobuf_c_boolean has_hiz;
+ protobuf_c_boolean hiz;
+};
+#define STUB_MOTOR_STOP_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&stub_motor_stop_response__descriptor) \
+ , 0, 0, 0, 0, 0, 0 }
+
+
+/* StubMotorStopResponse methods */
+void stub_motor_stop_response__init
+ (StubMotorStopResponse *message);
+size_t stub_motor_stop_response__get_packed_size
+ (const StubMotorStopResponse *message);
+size_t stub_motor_stop_response__pack
+ (const StubMotorStopResponse *message,
+ uint8_t *out);
+size_t stub_motor_stop_response__pack_to_buffer
+ (const StubMotorStopResponse *message,
+ ProtobufCBuffer *buffer);
+StubMotorStopResponse *
+ stub_motor_stop_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void stub_motor_stop_response__free_unpacked
+ (StubMotorStopResponse *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*StubMotorStopResponse_Closure)
+ (const StubMotorStopResponse *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor stub_motor_stop_response__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_StubMotorStopResponse_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Calculate.c b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Calculate.c
index 6bd5cb703..cc6841261 100644
--- a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Calculate.c
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Calculate.c
@@ -1,4 +1,6 @@
+#include <PMR/Stubs/CalculateRequest.pb-c.h>
+#include <PMR/Stubs/CalculateResponse.pb-c.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
@@ -14,9 +16,6 @@
#include "usb_serial_adapter.h"
#include "graphics_adapter.h"
#include "MessageContainer.pb-c.h"
-#include "CalculateRequest.pb-c.h"
-#include "CalculateResponse.pb-c.h"
-
#include "Container.h"
void Stub_CalculateRequest(MessageContainer* requestContainer)
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 570ead28f..d8627bf1c 100644
--- a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Container.c
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Container.c
@@ -25,6 +25,10 @@
#include "Stub_SteperMotor.h"
#include "Stub_Valve.h"
#include "Stub_ExtFlash.h"
+#include "Stub_FPGAReadBackReg.h"
+#include "Stub_FPGAReadVersion.h"
+#include "Stub_L6470.h"
+#include "Stub_Motor.h"
MessageContainer createContainer(MessageType type, char* token, protobuf_c_boolean completed, void* response, size_t (*packPtr)(void*, uint8_t*), size_t (*sizePtr)(void*))
{
@@ -113,6 +117,36 @@ void receive_callback(char* buffer, size_t length)
case MESSAGE_TYPE__StubExtFlashWriteRequest:
Stub_ExtFlashWriteRequest(requestContainer);
break;
+ case MESSAGE_TYPE__StubFPGAReadBackRegRequest:
+ Stub_FPGAReadBackRegRequest(requestContainer);
+ break;
+ case MESSAGE_TYPE__StubFPGAReadVersionRequest:
+ Stub_FPGAReadVersionRequest(requestContainer);
+ break;
+ case MESSAGE_TYPE__StubL6470DriverRequest:
+ Stub_L6470DriverRequest(requestContainer);
+ break;
+ case MESSAGE_TYPE__StubMotorInitRequest:
+ Stub_MotorInitRequest(requestContainer);
+ break;
+ case MESSAGE_TYPE__StubMotorRunRequest:
+ Stub_MotorRunRequest(requestContainer);
+ break;
+ case MESSAGE_TYPE__StubMotorStopRequest:
+ Stub_MotorStopRequest(requestContainer);
+ break;
+ case MESSAGE_TYPE__StubMotorStatusRequest:
+ Stub_MotorStatusRequest(requestContainer);
+ break;
+ case MESSAGE_TYPE__StubMotorPositionRequest:
+ Stub_MotorPositionRequest(requestContainer);
+ break;
+ case MESSAGE_TYPE__StubMotorSpeedRequest:
+ Stub_MotorSpeedRequest(requestContainer);
+ break;
+ case MESSAGE_TYPE__StubMotorMovRequest:
+ Stub_MotorMovRequest(requestContainer);
+ break;
default:
//unsupported message type !!
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 08da87c09..c7e41d2b8 100644
--- a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/DataDef.h
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/DataDef.h
@@ -4,6 +4,7 @@
#define EVALUATION_BOARD // to use the LCD only when using the evaluation board
#define USE_HIGH_SPEED_GPIO // to use AHB GPIO (A..J) ports A-J APB or AHB, ports K-Q on AHB only
+
#define ON 1
#define OFF 0
@@ -25,18 +26,27 @@ enum
#define NEW 0
#define USED 1
-#define START 1
-#define STOP 0
+#define START 0
+#define STOP 1
+#define NOSTOP 2
+#define CONTINUE 2
+
+#define NOTBUSY 0
+#define BUSY 1
+//
+//#define SPI_BUSY 0
+//#define SPI_NOTBUSY 1
+
// motor direction
-#define CW 1 // clockwise
-#define CCW 0 // counter clockwise
+#define CW 0 // clockwise
+#define CCW 1 // counter clockwise
#define TRUE 1
#define FALSE 0
-#define INPUT 1
-#define OUTPUT 0
+#define INPUT 0x0
+#define OUTPUT 0x1
#define PULLDOWN 0
#define PULLUP 1
@@ -45,6 +55,54 @@ enum
#define RX 1
#define TXRX 2
+#define ODD 0
+#define EVEN 1
+
+#define READY 0
+#define NOTREADY 1
+#define WAIT 2
+
+#define LOW 0x0
+#define HIGH 0x1
+
+#define WR 0
+#define RD 1
+
+#define FLAGSTART 1
+#define FLAGSET 1
+#define FLAGCLEAR 0
+
+#define IN 2
+#define OUT 3
+
+#define INIT 1
+#define SKIP_INIT 0
+
+#define byte uint8_t//char
+#define boolean bool
+
+#define SERIAL 0x0
+#define DISPLAY 0x1
+
+#define LSBFIRST 0
+#define MSBFIRST 1
+
+#define CHANGE 1
+#define FALLING 2
+#define RISING 3
+
+//typedef union
+//{
+// struct
+// {
+// unsigned char MSB;
+// unsigned char 3RD;
+// unsigned char 2ND;
+// unsigned char LSB;
+// }byte;
+// long LONG;
+//}LONG2BYTE;
+
//---------------------------------------------------------------------
#pragma diag_suppress 169 /* Avoid warnings on VOID * conversions (protobuf issue)
The warning:
diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Progress.c b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Progress.c
index efd4c7eac..8d55b2933 100644
--- a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Progress.c
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Progress.c
@@ -1,4 +1,6 @@
+#include <PMR/Stubs/ProgressRequest.pb-c.h>
+#include <PMR/Stubs/ProgressResponse.pb-c.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
@@ -14,9 +16,6 @@
#include "usb_serial_adapter.h"
#include "graphics_adapter.h"
#include "MessageContainer.pb-c.h"
-#include "ProgressRequest.pb-c.h"
-#include "ProgressResponse.pb-c.h"
-
#include "Container.h"
void Stub_ProgressRequest(MessageContainer* requestContainer)
diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Cartridge.c b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Cartridge.c
index e97831e67..5bb71dd9c 100644
--- a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Cartridge.c
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Cartridge.c
@@ -1,5 +1,9 @@
+#include <PMR/Stubs/StubCartridgeReadRequest.pb-c.h>
+#include <PMR/Stubs/StubCartridgeReadResponse.pb-c.h>
+#include <PMR/Stubs/StubCartridgeWriteRequest.pb-c.h>
+#include <PMR/Stubs/StubCartridgeWriteResponse.pb-c.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
@@ -17,11 +21,6 @@
#include "MessageContainer.pb-c.h"
-#include "StubCartridgeReadResponse.pb-c.h"
-#include "StubCartridgeReadRequest.pb-c.h"
-#include "StubCartridgeWriteResponse.pb-c.h"
-#include "StubCartridgeWriteRequest.pb-c.h"
-
#include "Container.h"
#include "Stub_Status.h"
diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Dispenser.c b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Dispenser.c
index bb2ceaea9..cc1f1e4ea 100644
--- a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Dispenser.c
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Dispenser.c
@@ -1,5 +1,7 @@
+#include <PMR/Stubs/StubDispenserRequest.pb-c.h>
+#include <PMR/Stubs/StubDispenserResponse.pb-c.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
@@ -17,9 +19,6 @@
#include "MessageContainer.pb-c.h"
-#include "StubDispenserResponse.pb-c.h"
-#include "StubDispenserRequest.pb-c.h"
-
#include "Container.h"
#include "Stub_Status.h"
diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_ExtFlash.c b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_ExtFlash.c
index c7ef4aaa8..4994736e6 100644
--- a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_ExtFlash.c
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_ExtFlash.c
@@ -1,5 +1,9 @@
#include <drivers/Flash_Memory/Flash_Memory.h>
+#include <PMR/Stubs/StubExtFlashReadRequest.pb-c.h>
+#include <PMR/Stubs/StubExtFlashReadResponse.pb-c.h>
+#include <PMR/Stubs/StubExtFlashWriteRequest.pb-c.h>
+#include <PMR/Stubs/StubExtFlashWriteResponse.pb-c.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
@@ -16,12 +20,6 @@
#include "MessageContainer.pb-c.h"
-#include "StubExtFlashWriteRequest.pb-c.h"
-#include "StubExtFlashWriteResponse.pb-c.h"
-
-#include "StubExtFlashReadRequest.pb-c.h"
-#include "StubExtFlashReadResponse.pb-c.h"
-
#include "Container.h"
#include "Stub_Status.h"
diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_FPGAReadBackReg.c b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_FPGAReadBackReg.c
new file mode 100644
index 000000000..2ca985d12
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_FPGAReadBackReg.c
@@ -0,0 +1,69 @@
+
+#include <PMR/Stubs/StubFPGAReadBackRegRequest.pb-c.h>
+#include <PMR/Stubs/StubFPGAReadBackRegResponse.pb-c.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#include <Stubs_Handler/DataDef.h>
+#include "inc/hw_memmap.h"
+#include "inc/hw_types.h"
+#include "inc/hw_uart.h"
+
+#include "usb_serial_adapter.h"
+#include "graphics_adapter.h"
+
+#include "MessageContainer.pb-c.h"
+
+#include "Container.h"
+#include "Stub_Status.h"
+#include "drivers/FPGA/FPGA.h"
+
+void Stub_FPGAReadBackRegRequest(MessageContainer* requestContainer)
+{
+ uint32_t status = FAILED;
+
+ unsigned short ReadBack_Value;
+
+ MessageContainer responseContainer;
+
+ StubFPGAReadBackRegRequest* request = stub_fpgaread_back_reg_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);
+
+ writeLine("ReadBack Request: ");
+
+ writeFloat(request->fpgaid);
+ writeString(", ");
+ writeFloat(request->value);
+
+ status = Test_FPGA_ReadBack((unsigned char) request->fpgaid, (unsigned short) request->value, &ReadBack_Value);
+
+ StubFPGAReadBackRegResponse response = STUB_FPGAREAD_BACK_REG_RESPONSE__INIT;
+
+ status_response(status,&response.status, &response.statusword ,&response.has_statusword);
+
+ response.fpgaid = request->fpgaid;
+ response.has_fpgaid = true;
+ response.readbackvalue = ReadBack_Value;
+ response.has_readbackvalue = true;
+
+ responseContainer = createContainer(MESSAGE_TYPE__StubFPGAReadBackRegResponse, requestContainer->token, true, &response, &stub_fpgaread_back_reg_response__pack, &stub_fpgaread_back_reg_response__get_packed_size);
+
+ writeLine("Sending Response: ");
+
+ writeFloat(response.fpgaid);
+ writeString(", ");
+ writeFloat(response.readbackvalue);
+ writeString(", ");
+
+ Write_status_response(status);
+
+ 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_FPGAReadBackReg.h b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_FPGAReadBackReg.h
new file mode 100644
index 000000000..14e245225
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_FPGAReadBackReg.h
@@ -0,0 +1,11 @@
+#ifndef STUB_READBACK_H
+#define STUB_READBACK_H
+
+void Stub_FPGAReadBackRegRequest(MessageContainer* requestContainer);
+
+#endif //STUB_READBACK_H
+
+
+
+
+
diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_FPGAReadVersion.c b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_FPGAReadVersion.c
new file mode 100644
index 000000000..0861ddb5f
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_FPGAReadVersion.c
@@ -0,0 +1,81 @@
+
+#include <PMR/Stubs/StubFPGAReadVersionResponse.pb-c.h>
+#include <PMR/Stubs/StubFPGAReadVersionRequest.pb-c.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#include <Stubs_Handler/DataDef.h>
+#include "inc/hw_memmap.h"
+#include "inc/hw_types.h"
+#include "inc/hw_uart.h"
+
+#include "usb_serial_adapter.h"
+#include "graphics_adapter.h"
+
+#include "MessageContainer.pb-c.h"
+
+#include "Container.h"
+#include "Stub_Status.h"
+#include "drivers/FPGA/FPGA.h"
+
+void Stub_FPGAReadVersionRequest(MessageContainer* requestContainer)
+{
+ uint32_t status = FAILED;
+ unsigned char Version;
+ unsigned char Year;
+ unsigned char Month;
+ unsigned char Day;
+
+ MessageContainer responseContainer;
+
+ StubFPGAReadVersionRequest* request = stub_fpgaread_version_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);
+
+ writeLine("ReadBack Request: ");
+
+ writeFloat(request->fpgaid);
+
+ status = FPGA_ReadVersion((unsigned char)request->fpgaid, &Version, &Year, &Month, &Day);
+
+ StubFPGAReadVersionResponse response = STUB_FPGAREAD_VERSION_RESPONSE__INIT;
+
+ status_response(status,&response.status, &response.statusword ,&response.has_statusword);
+
+ response.fpgaid = request->fpgaid;
+ response.has_fpgaid = true;
+ response.day = Day;
+ response.has_day = true;
+ response.month = Month;
+ response.has_month = true;
+ response.year = Year;
+ response.has_year = true;
+ response.ver_num = Version;
+ response.has_ver_num = true;
+
+ responseContainer = createContainer(MESSAGE_TYPE__StubFPGAReadVersionResponse, requestContainer->token, true, &response, &stub_fpgaread_version_response__pack, &stub_fpgaread_version_response__get_packed_size);
+
+ writeLine("Sending Response: ");
+
+ writeFloat(response.fpgaid);
+ writeString(", ");
+ writeFloat(response.day);
+ writeString(", ");
+ writeFloat(response.month);
+ writeString(", ");
+ writeFloat(response.year);
+ writeString(", ");
+ writeFloat(response.ver_num);
+ writeString(", ");
+
+ Write_status_response(status);
+
+ 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_FPGAReadVersion.h b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_FPGAReadVersion.h
new file mode 100644
index 000000000..d9c33b8b8
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_FPGAReadVersion.h
@@ -0,0 +1,6 @@
+#ifndef STUB_FPGAVER_H
+#define STUB_FPGAVER_H
+
+void Stub_FPGAReadVersionRequest(MessageContainer* requestContainer);
+
+#endif //STUB_FPGAVER_H
diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_GPIO.c b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_GPIO.c
index 0d0896517..b02c79539 100644
--- a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_GPIO.c
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_GPIO.c
@@ -1,4 +1,14 @@
+#include <PMR/Stubs/StubGPIOInputSetupRequest.pb-c.h>
+#include <PMR/Stubs/StubGPIOInputSetupResponse.pb-c.h>
+#include <PMR/Stubs/StubGPIOReadBitRequest.pb-c.h>
+#include <PMR/Stubs/StubGPIOReadBitResponse.pb-c.h>
+#include <PMR/Stubs/StubGPIOReadByteRequest.pb-c.h>
+#include <PMR/Stubs/StubGPIOReadByteResponse.pb-c.h>
+#include <PMR/Stubs/StubGPIOWriteBitRequest.pb-c.h>
+#include <PMR/Stubs/StubGPIOWriteBitResponse.pb-c.h>
+#include <PMR/Stubs/StubGPIOWriteByteRequest.pb-c.h>
+#include <PMR/Stubs/StubGPIOWriteByteResponse.pb-c.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
@@ -16,21 +26,6 @@
#include "MessageContainer.pb-c.h"
-#include "StubGPIOWriteBitRequest.pb-c.h"
-#include "StubGPIOWriteBitResponse.pb-c.h"
-
-#include "StubGPIOReadByteResponse.pb-c.h"
-#include "StubGPIOReadByteRequest.pb-c.h"
-
-#include "StubGPIOReadBitResponse.pb-c.h"
-#include "StubGPIOReadBitRequest.pb-c.h"
-
-#include "StubGPIOWriteByteResponse.pb-c.h"
-#include "StubGPIOWriteByteRequest.pb-c.h"
-
-#include "StubGPIOInputSetupRequest.pb-c.h"
-#include "StubGPIOInputSetupResponse.pb-c.h"
-
#include "Container.h"
#include <Stubs_Handler/User_Leds.h>
diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Heater.c b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Heater.c
index 38193f180..8cc5c515a 100644
--- a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Heater.c
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Heater.c
@@ -1,5 +1,7 @@
+#include <PMR/Stubs/StubHeaterRequest.pb-c.h>
+#include <PMR/Stubs/StubHeaterResponse.pb-c.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
@@ -17,9 +19,6 @@
#include "MessageContainer.pb-c.h"
-#include "StubHeaterResponse.pb-c.h"
-#include "StubHeaterRequest.pb-c.h"
-
#include "Container.h"
#include "Stub_Status.h"
diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_L6470.c b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_L6470.c
new file mode 100644
index 000000000..a8be5cd19
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_L6470.c
@@ -0,0 +1,133 @@
+
+#include <PMR/Stubs/StubL6470DriverResponse.pb-c.h>
+#include <PMR/Stubs/StubL6470DriverRequest.pb-c.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#include <Stubs_Handler/DataDef.h>
+#include "inc/hw_memmap.h"
+#include "inc/hw_types.h"
+#include "inc/hw_uart.h"
+
+#include "usb_serial_adapter.h"
+#include "graphics_adapter.h"
+
+#include "MessageContainer.pb-c.h"
+
+#include "Container.h"
+#include "Stub_Status.h"
+#include "drivers/FPGA/FPGA.h"
+#include "drivers/SPI/SPI_Comm.h"
+
+#include "drivers/FPGA/Moters_Driver/L6470.h"
+
+#include "driverlib/ssi.h"
+
+ unsigned long Run_Value = 136902 ;
+ unsigned long Pos_Value;
+ unsigned long Mov_Value ;
+ bool Direction ;
+ unsigned long Time_2_Change_Direction ;
+ bool Display_Tx_ON_LCD;
+ bool Display_Rx_on_LCD;
+ unsigned long Init_MicroStep ;
+ unsigned long Init_Acc;
+ unsigned long Init_Dec;
+ bool TestBool_1;
+ bool TestBool_2;
+ bool TestBool_3;
+ bool TestBool_4;
+ bool TestBool_5;
+ unsigned long TestUint32_1;
+ unsigned long TestUint32_2;
+ unsigned long TestUint32_3;
+ unsigned long TestUint32_4;
+ unsigned long TestUint32_5;
+ unsigned long TestUint32_6;
+
+void Stub_L6470DriverRequest(MessageContainer* requestContainer)
+{
+ uint32_t status = PASSED;
+
+ MessageContainer responseContainer;
+
+ StubL6470DriverRequest* request = stub_l6470_driver_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);
+
+ Run_Value = request->run_value;
+ Mov_Value = request->mov_value;
+ Direction = request->direction;
+ Time_2_Change_Direction = request->time_2_change_direction;
+ Display_Tx_ON_LCD = request->display_tx_on_lcd;
+ Display_Rx_on_LCD = request->display_rx_on_lcd;
+ Init_MicroStep = request->init_microstep;
+ Init_Acc = request->init_acc;
+ Init_Dec = request->init_dec;
+ TestBool_1 = request->testbool_1;
+ TestBool_2 = request->testbool_2;
+ TestBool_3 = request->testbool_3;
+ TestBool_4 = request->testbool_4;
+ TestBool_5 = request->testbool_5;
+ TestUint32_1 = request->testuint32_1;
+ TestUint32_2 = request->testuint32_2;
+ TestUint32_3 = request->testuint32_3;
+ TestUint32_4 = request->testuint32_4;
+ TestUint32_5 = request->testuint32_5;
+ TestUint32_6 = request->testuint32_6;
+
+ writeLine("L6470 Request: ");
+
+ writeFloat(request->run_value);
+
+ //status = FPGA_ReadVersion((unsigned char)request->fpgaid, &Version, &Year, &Month, &Day);
+ SPI_Control(INIT);
+
+ //temp_init_spi2();
+
+
+ StubL6470DriverResponse response = STUB_L6470_DRIVER_RESPONSE__INIT;
+
+ status_response(status,&response.status, &response.statusword ,&response.has_statusword);
+
+ //response.run_value = Get_Param(x_SPEED);
+ /*
+ response.mov_value = ;
+ response.day = Day;
+ response.has_day = true;
+ response.month = Month;
+ response.has_month = true;
+ response.year = Year;
+ response.has_year = true;
+ response.ver_num = Version;
+ response.has_ver_num = true;
+*/
+ responseContainer = createContainer(MESSAGE_TYPE__StubL6470DriverResponse, requestContainer->token, true, &response, &stub_l6470_driver_response__pack, &stub_l6470_driver_response__get_packed_size);
+
+ writeLine("Sending Response: ");
+
+ writeFloat(response.run_value);
+ /*
+ writeString(", ");
+ writeFloat(response.day);
+ writeString(", ");
+ writeFloat(response.month);
+ writeString(", ");
+ writeFloat(response.year);
+ writeString(", ");
+ writeFloat(response.ver_num);
+ writeString(", ");
+*/
+ Write_status_response(status);
+
+ 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);
+
+
+ //StartUSB(ui32SysClock); //todo to test the USB comm problem after using 6470
+}
diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_L6470.h b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_L6470.h
new file mode 100644
index 000000000..0b4702861
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_L6470.h
@@ -0,0 +1,3 @@
+void Stub_L6470DriverRequest(MessageContainer* requestContainer);
+
+void temp_init_spi2();
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
new file mode 100644
index 000000000..ef77db30d
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Motor.c
@@ -0,0 +1,448 @@
+
+#include <PMR/Stubs/StubMotorInitRequest.pb-c.h>
+#include <PMR/Stubs/StubMotorInitResponse.pb-c.h>
+#include <PMR/Stubs/StubMotorRunRequest.pb-c.h>
+#include <PMR/Stubs/StubMotorRunResponse.pb-c.h>
+#include <PMR/Stubs/StubMotorStopRequest.pb-c.h>
+#include <PMR/Stubs/StubMotorStopResponse.pb-c.h>
+#include <PMR/Stubs/StubMotorStatusRequest.pb-c.h>
+#include <PMR/Stubs/StubMotorStatusResponse.pb-c.h>
+#include <PMR/Stubs/StubMotorSpeedResponse.pb-c.h>
+#include <PMR/Stubs/StubMotorSpeedRequest.pb-c.h>
+#include <PMR/Stubs/StubMotorPositionRequest.pb-c.h>
+#include <PMR/Stubs/StubMotorPositionResponse.pb-c.h>
+#include <PMR/Stubs/StubMotorMovRequest.pb-c.h>
+#include <PMR/Stubs/StubMotorMovResponse.pb-c.h>
+
+#include <stdbool.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#include <Stubs_Handler/DataDef.h>
+#include "inc/hw_memmap.h"
+#include "inc/hw_types.h"
+#include "inc/hw_uart.h"
+
+#include "usb_serial_adapter.h"
+#include "graphics_adapter.h"
+
+#include "MessageContainer.pb-c.h"
+
+#include "Container.h"
+#include "Stub_Status.h"
+#include "drivers/FPGA/FPGA.h"
+#include "drivers/SPI/SPI_Comm.h"
+
+#include "drivers/FPGA/Moters_Driver/L6470.h"
+
+#include "driverlib/ssi.h"
+
+
+extern unsigned long Run_Value ;
+extern unsigned long Pos_Value ;
+extern bool Direction ;
+unsigned char Stop_Command = 0 ;
+
+
+
+void Stub_MotorInitRequest(MessageContainer* requestContainer)
+{
+ //uint32_t status = FAILED;
+
+ MessageContainer responseContainer;
+
+ StubMotorInitRequest* request = stub_motor_init_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);
+
+ //SPI_Control(INIT);
+
+ SPI2_Init();
+ init_BUSY_Pin();
+ //while(SSIBusy(SSI2_BASE)){};
+ //init_BUSY_Pin();
+
+
+ setup(request);
+ //setup();
+
+ //init_BUSY_Pin();
+ //while(SSIBusy(SSI2_BASE)){};
+ //ResetPos();
+ //while(SSIBusy(SSI2_BASE)){};
+
+ //Run_Value = request->run_value;
+ //Mov_Value = request->mov_value;
+ //Direction = request->direction;
+
+
+ //writeLine("L6470 Request: ");
+
+ //writeFloat(request->run_value);
+
+ //status = FPGA_ReadVersion((unsigned char)request->fpgaid, &Version, &Year, &Month, &Day);
+ //SPI_Control();
+
+ //temp_init_spi2();
+
+
+ StubMotorInitResponse response = STUB_MOTOR_INIT_RESPONSE__INIT;
+
+ // status_response(status,&response.status, &response.statusword ,&response.has_statusword);
+
+
+ response.motor_id = request->motor_id;
+ response.has_motor_id = true;
+ response.status = 0;
+
+ responseContainer = createContainer(MESSAGE_TYPE__StubMotorInitResponse, requestContainer->token, true, &response, &stub_motor_init_response__pack, &stub_motor_init_response__get_packed_size);
+
+ writeLine("Sending Response: ");
+
+ writeFloat(response.motor_id);
+ writeString(", ");
+ writeFloat(response.status);
+
+ //writeString(", ");
+ //
+ //Write_status_response(status);
+
+ 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_MotorRunRequest(MessageContainer* requestContainer)
+{
+ //uint32_t status = FAILED;
+
+ uint32_t read_status;
+
+ MessageContainer responseContainer;
+
+ StubMotorRunRequest* request = stub_motor_run_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);
+
+ float temp = (float)request->speed;
+ Run_Value = SpdCalc(temp);
+ Direction = request->direction;
+
+ //SPI_Control(SKIP_INIT);
+ Mot_Run();
+
+ //writeLine("L6470 Request: ");
+
+ //writeFloat(request->run_value);
+
+ //status = FPGA_ReadVersion((unsigned char)request->fpgaid, &Version, &Year, &Month, &Day);
+
+
+
+ StubMotorRunResponse response = STUB_MOTOR_RUN_RESPONSE__INIT;
+
+ // status_response(status,&response.status, &response.statusword ,&response.has_statusword);
+
+
+ response.motor_id = request->motor_id;
+ response.has_motor_id = true;
+
+ read_status = Get_and_Clear_Status();
+
+ response.speed = (double)(CurrentSpdCalc(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;
+
+
+
+ responseContainer = createContainer(MESSAGE_TYPE__StubMotorRunResponse, requestContainer->token, true, &response, &stub_motor_run_response__pack, &stub_motor_run_response__get_packed_size);
+
+ writeLine("Sending Response: ");
+
+ writeFloat(response.motor_id);
+
+ //writeString(", ");
+ //writeFloat(response.day);
+
+ //Write_status_response(status);
+
+ 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_MotorStopRequest(MessageContainer* requestContainer)
+{
+ uint32_t read_status;
+ //uint32_t status = FAILED;
+
+ MessageContainer responseContainer;
+
+ StubMotorStopRequest* request = stub_motor_stop_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);
+
+
+ Stop_Command = request->stop_cmd;
+
+ //SPI_Control(SKIP_INIT);
+ Mot_Stop();
+
+ //writeLine("L6470 Request: ");
+
+ //writeFloat(request->run_value);
+
+ //status = FPGA_ReadVersion((unsigned char)request->fpgaid, &Version, &Year, &Month, &Day);
+
+
+
+ StubMotorStopResponse response = STUB_MOTOR_STOP_RESPONSE__INIT;
+
+ // status_response(status,&response.status, &response.statusword ,&response.has_statusword);
+
+
+ response.motor_id = request->motor_id;
+ response.has_motor_id = true;
+
+ read_status = Get_and_Clear_Status();
+
+ response.mot_status = ((read_status & x_STATUS_MOT_STATUS)>>5);
+ response.has_mot_status = true;
+
+ response.hiz = (read_status & x_STATUS_HIZ);
+ response.has_hiz = true;
+
+ responseContainer = createContainer(MESSAGE_TYPE__StubMotorStopResponse, requestContainer->token, true, &response, &stub_motor_stop_response__pack, &stub_motor_stop_response__get_packed_size);
+
+ writeLine("Sending Response: ");
+
+ writeFloat(response.motor_id);
+
+ //writeString(", ");
+ //writeFloat(response.day);
+
+ //Write_status_response(status);
+
+ 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_MotorStatusRequest(MessageContainer* requestContainer)
+{
+ uint32_t read_status;
+
+ MessageContainer responseContainer;
+
+ StubMotorStatusRequest* request = stub_motor_status_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);
+
+
+ if(request->clearstatus)
+ {
+ read_status = Get_and_Clear_Status();
+ }
+ else
+ {
+ read_status = Get_Param(x_STATUS);
+ }
+
+ StubMotorStatusResponse response = STUB_MOTOR_STATUS_RESPONSE__INIT;
+
+ response.motor_id = request->motor_id;
+ response.has_motor_id = true;
+
+ response.sck_mod = ((read_status & x_STATUS_SCK_MOD)>>15);
+ response.has_sck_mod = true;
+
+ response.step_loss_b = ((read_status & x_STATUS_STEP_LOSS_B)>>14);
+ response.has_step_loss_b = true;
+
+ response.step_loss_a = ((read_status & x_STATUS_STEP_LOSS_A)>>13);
+ response.has_step_loss_a = true;
+
+ response.ocd = ((read_status & x_STATUS_OCD)>>12);
+ response.has_ocd = true;
+
+ response.th_sd = ((read_status & x_STATUS_TH_SD)>>11);
+ response.has_th_sd = true;
+
+ response.th_wrn = ((read_status & x_STATUS_TH_WRN)>>10);
+ response.has_th_wrn = true;
+
+ response.uvlo = ((read_status & x_STATUS_UVLO)>>9);
+ response.has_uvlo = true;
+
+ response.wrong_cmd = ((read_status & x_STATUS_WRONG_CMD)>>8);
+ response.has_wrong_cmd = true;
+
+ response.notperf_cmd = ((read_status & x_STATUS_NOTPERF_CMD)>>7);
+ response.has_notperf_cmd = true;
+
+ response.mot_status = ((read_status & x_STATUS_MOT_STATUS)>>5);
+ response.has_mot_status = true;
+
+ response.dir = ((read_status & x_STATUS_DIR)>>4);
+ response.has_dir = true;
+
+ response.sw_evn = ((read_status & x_STATUS_SW_EVN)>>3);
+ response.has_sw_evn = true;
+
+ response.sw_f = ((read_status & x_STATUS_SW_F)>>2);
+ response.has_sw_f = true;
+
+ response.busy = ((read_status & x_STATUS_BUSY)>>1);
+ response.has_busy = true;
+
+ response.hiz = (read_status & x_STATUS_HIZ);
+ response.has_hiz = true;
+
+ responseContainer = createContainer(MESSAGE_TYPE__StubMotorStatusResponse, requestContainer->token, true, &response, &stub_motor_status_response__pack, &stub_motor_status_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);
+}
+
+
+void Stub_MotorSpeedRequest(MessageContainer* requestContainer)
+{
+
+ MessageContainer responseContainer;
+
+ StubMotorSpeedRequest* request = stub_motor_speed_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);
+
+ StubMotorSpeedResponse response = STUB_MOTOR_SPEED_RESPONSE__INIT;
+
+ response.motor_id = request->motor_id;
+ response.has_motor_id = true;
+
+ //response.speed = Get_Param(x_SPEED);
+ response.speed = (double)(CurrentSpdCalc(Get_Param(x_SPEED)));
+ response.has_speed = true;
+
+ responseContainer = createContainer(MESSAGE_TYPE__StubMotorSpeedResponse, requestContainer->token, true, &response, &stub_motor_speed_response__pack, &stub_motor_speed_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_MotorPositionRequest(MessageContainer* requestContainer)
+{
+
+ MessageContainer responseContainer;
+
+ StubMotorPositionRequest* request = stub_motor_position_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);
+
+ StubMotorPositionResponse response = STUB_MOTOR_POSITION_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__StubMotorPositionResponse, requestContainer->token, true, &response, &stub_motor_position_response__pack, &stub_motor_position_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_MotorMovRequest(MessageContainer* requestContainer)
+{
+ uint32_t read_status;
+
+ MessageContainer responseContainer;
+
+ StubMotorMovRequest* request = stub_motor_mov_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);
+
+ Pos_Value = request->position;
+ Direction = request->direction;
+
+ Mot_Mov();
+
+ StubMotorMovResponse response = STUB_MOTOR_MOV_RESPONSE__INIT;
+
+ response.motor_id = request->motor_id;
+ response.has_motor_id = true;
+
+
+ response.position = Get_Param(x_ABS_POS);
+ response.has_position = true;
+
+ while(SSIBusy(SSI2_BASE)){};
+
+ read_status = Get_and_Clear_Status();
+
+
+ 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;
+
+ responseContainer = createContainer(MESSAGE_TYPE__StubMotorMovResponse, requestContainer->token, true, &response, &stub_motor_mov_response__pack, &stub_motor_mov_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);
+}
+
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
new file mode 100644
index 000000000..95f82353f
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Motor.h
@@ -0,0 +1,7 @@
+void Stub_MotorInitRequest(MessageContainer* requestContainer);
+void Stub_MotorRunRequest(MessageContainer* requestContainer);
+void Stub_MotorStopRequest(MessageContainer* requestContainer);
+void Stub_MotorStatusRequest(MessageContainer* requestContainer);
+void Stub_MotorSpeedRequest(MessageContainer* requestContainer);
+void Stub_MotorPositionRequest(MessageContainer* requestContainer);
+void Stub_MotorMovRequest(MessageContainer* requestContainer);
diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_MotorEncoder.c b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_MotorEncoder.c
index 9380ec65f..6478e0ca0 100644
--- a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_MotorEncoder.c
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_MotorEncoder.c
@@ -1,4 +1,6 @@
+#include <PMR/Stubs/StubMotorEncoderRequest.pb-c.h>
+#include <PMR/Stubs/StubMotorEncoderResponse.pb-c.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
@@ -16,9 +18,6 @@
#include "MessageContainer.pb-c.h"
-#include "StubMotorEncoderResponse.pb-c.h"
-#include "StubMotorEncoderRequest.pb-c.h"
-
#include "Container.h"
#include "Stub_Status.h"
diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_OptLimitSwitch.c b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_OptLimitSwitch.c
index c7064b0ea..a885cc0c0 100644
--- a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_OptLimitSwitch.c
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_OptLimitSwitch.c
@@ -1,5 +1,7 @@
+#include <PMR/Stubs/StubOptLimitSwitchRequest.pb-c.h>
+#include <PMR/Stubs/StubOptLimitSwitchResponse.pb-c.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
@@ -17,9 +19,6 @@
#include "MessageContainer.pb-c.h"
-#include "StubOptLimitSwitchResponse.pb-c.h"
-#include "StubOptLimitSwitchRequest.pb-c.h"
-
#include "Container.h"
#include "Stub_Status.h"
diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_SteperMotor.c b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_SteperMotor.c
index 47ff8a0d5..a54ac9a10 100644
--- a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_SteperMotor.c
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_SteperMotor.c
@@ -1,5 +1,7 @@
+#include <PMR/Stubs/StubSteperMotorRequest.pb-c.h>
+#include <PMR/Stubs/StubSteperMotorResponse.pb-c.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
@@ -17,9 +19,6 @@
#include "MessageContainer.pb-c.h"
-#include "StubSteperMotorRequest.pb-c.h"
-#include "StubSteperMotorResponse.pb-c.h"
-
#include "Container.h"
#include "Stub_Status.h"
diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Valve.c b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Valve.c
index 08c74611c..c4fe7b08f 100644
--- a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Valve.c
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/Stub_Valve.c
@@ -1,4 +1,6 @@
+#include <PMR/Stubs/StubValveRequest.pb-c.h>
+#include <PMR/Stubs/StubValveResponse.pb-c.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
@@ -16,9 +18,6 @@
#include "MessageContainer.pb-c.h"
-#include "StubValveResponse.pb-c.h"
-#include "StubValveRequest.pb-c.h"
-
#include "Container.h"
#include "Stub_Status.h"
diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/temperature_sensor.c b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/temperature_sensor.c
new file mode 100644
index 000000000..0d7c95943
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/temperature_sensor.c
@@ -0,0 +1,263 @@
+//*****************************************************************************
+//
+// temperature_sensor.c - Example demonstrating the internal ADC temperature
+// sensor.
+//
+// Copyright (c) 2010-2014 Texas Instruments Incorporated. All rights reserved.
+// Software License Agreement
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the
+// distribution.
+//
+// Neither the name of Texas Instruments Incorporated nor the names of
+// its contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// This is part of revision 2.1.0.12573 of the Tiva Firmware Development Package.
+//
+//*****************************************************************************
+/*
+ * This code was made to show a simple ADC read.
+ *
+ * It was made from the example provided by TivaWare but it was a some modifications
+ * like the math
+ *
+ *
+ * Lu?s Afonso
+ * https://sites.google.com/site/luiselectronicprojects/tutorials/tiva-tutorials/tiva-adc/internal-temperature-sensor
+ *
+ */
+
+#include <stdint.h>
+#include <stdbool.h>
+#include "stdlib.h"
+#include "inc/hw_ints.h"
+#include "inc/hw_memmap.h"
+#include "inc/hw_uart.h"
+#include "inc/hw_gpio.h"
+#include "inc/hw_pwm.h"
+#include "inc/hw_types.h"
+#include "driverlib/adc.h"
+#include "driverlib/timer.h"
+#include "driverlib/gpio.h"
+#include "driverlib/interrupt.h"
+#include "driverlib/pin_map.h"
+#include "driverlib/rom.h"
+#include "driverlib/rom_map.h"
+#include "driverlib/sysctl.h"
+#include "driverlib/uart.h"
+#include "driverlib/udma.h"
+#include "driverlib/pwm.h"
+#include "driverlib/ssi.h"
+#include "driverlib/systick.h"
+#include "driverlib/adc.h"
+#include "utils/uartstdio.h"
+#include "utils/uartstdio.c"
+#include <string.h>
+
+#include "graphics_adapter.h"
+
+//*****************************************************************************
+//
+// This function sets up UART0 to be used for a console to display information
+// as the example is running.
+//
+//*****************************************************************************
+void
+InitConsole(void)
+{
+ //
+ // Enable GPIO port A which is used for UART0 pins.
+ // TODO: change this to whichever GPIO port you are using.
+ //
+ SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
+
+ //
+ // Configure the pin muxing for UART0 functions on port A0 and A1.
+ // This step is not necessary if your part does not support pin muxing.
+ // TODO: change this to select the port/pin you are using.
+ //
+ GPIOPinConfigure(GPIO_PA0_U0RX);
+ GPIOPinConfigure(GPIO_PA1_U0TX);
+
+ //
+ // Enable UART0 so that we can configure the clock.
+ //
+ SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
+
+ //
+ // Use the internal 16MHz oscillator as the UART clock source.
+ //
+ UARTClockSourceSet(UART0_BASE, UART_CLOCK_PIOSC);
+
+ //
+ // Select the alternate (UART) function for these pins.
+ // TODO: change this to select the port/pin you are using.
+ //
+ GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
+
+ //
+ // Initialize the UART for console I/O.
+ //
+ UARTStdioConfig(0, 115200, 16000000);
+}
+
+int temperature_main(){
+ SysCtlClockSet(SYSCTL_SYSDIV_2_5|SYSCTL_USE_PLL|SYSCTL_OSC_MAIN|SYSCTL_XTAL_16MHZ);
+ InitConsole();
+ //
+ // This array is used for storing the data read from the ADC FIFO. It
+ // must be as large as the FIFO for the sequencer in use. This example
+ // uses sequence 3 which has a FIFO depth of 1. If another sequence
+ // was used with a deeper FIFO, then the array size must be changed.
+ //
+ uint32_t ADCValues[1];
+
+ //
+ // These variables are used to store the temperature conversions for
+ // Celsius and Fahrenheit.
+ //
+ uint32_t TempValueC ;
+ uint32_t TempValueF ;
+
+
+ //
+ // Display the setup on the console.
+ //
+ UARTprintf("ADC ->\n");
+ UARTprintf(" Type: Internal Temperature Sensor\n");
+ UARTprintf(" Samples: One\n");
+ UARTprintf(" Update Rate: 250ms\n");
+ UARTprintf(" Input Pin: Internal temperature sensor\n\n");
+
+ writeLine("ADC ->\n");
+ writeLine(" Type: Internal Temperature Sensor\n");
+ writeLine(" Samples: One\n");
+ writeLine(" Update Rate: 250ms\n");
+ writeLine(" Input Pin: Internal temperature sensor\n\n");
+
+ //
+ // The ADC0 peripheral must be enabled for use.
+ //
+ SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0);
+ SysCtlDelay(3);//3 wait cycles after enabling a clock on a peripheral
+
+ //
+ // Enable sample sequence 3 with a processor signal trigger. Sequence 3
+ // will do a single sample when the processor sends a singal to start the
+ // conversion. Each ADC module has 4 programmable sequences, sequence 0
+ // to sequence 3. This example is arbitrarily using sequence 3.
+ //
+ ADCSequenceConfigure(ADC0_BASE, 3, ADC_TRIGGER_PROCESSOR, 0);
+
+ //
+ // Configure step 0 on sequence 3. Sample the temperature sensor
+ // (ADC_CTL_TS) and configure the interrupt flag (ADC_CTL_IE) to be set
+ // when the sample is done. Tell the ADC logic that this is the last
+ // conversion on sequence 3 (ADC_CTL_END). Sequence 3 has only one
+ // programmable step. Sequence 1 and 2 have 4 steps, and sequence 0 has
+ // 8 programmable steps. Since we are only doing a single conversion using
+ // sequence 3 we will only configure step 0. For more information on the
+ // ADC sequences and steps, reference the datasheet.
+ //
+ ADCSequenceStepConfigure(ADC0_BASE, 3, 0, ADC_CTL_TS | ADC_CTL_IE |
+ ADC_CTL_END);
+
+ //ADCHardwareOversampleConfigure(ADC0_BASE,64);//This will configure to do averages of 64 values (powers of 2, from 2 to 64 )
+
+ //
+ // Since sample sequence 3 is now configured, it must be enabled.
+ //
+ ADCSequenceEnable(ADC0_BASE, 3);
+
+ //
+ // Clear the interrupt status flag. This is done to make sure the
+ // interrupt flag is cleared before we sample.
+ //
+ ADCIntClear(ADC0_BASE, 3);
+
+ //
+ // Sample the temperature sensor forever. Display the value on the
+ // console.
+ //
+ while(1)
+ {
+ //
+ // Trigger the ADC conversion.
+ //
+ ADCProcessorTrigger(ADC0_BASE, 3);
+
+ //
+ // Wait for conversion to be completed.
+ //
+ while(!ADCIntStatus(ADC0_BASE, 3, false))
+ {
+ }
+
+ //
+ // Clear the ADC interrupt flag.
+ //
+ ADCIntClear(ADC0_BASE, 3);
+
+ //
+ // Read ADC Value.
+ //
+ ADCSequenceDataGet(ADC0_BASE, 3, ADCValues);
+
+ //
+ // Use non-calibrated conversion provided in the data sheet. I use floats in intermediate
+ // math but you could use intergers with multiplied by powers of 10 and divide on the end
+ // Make sure you divide last to avoid dropout.
+ //
+ TempValueC = (uint32_t)(147.5 - ((75.0*3.3 *(float)ADCValues[0])) / 4096.0);
+
+ //float Temaraure_C = 147.5 - ((75.0*3.3 *(float)ADCValues[0])) / 4096.0;
+
+ //
+ // Get Fahrenheit value. Make sure you divide last to avoid dropout.
+ //
+ TempValueF = ((TempValueC * 9) + 160) / 5;
+
+ //
+ // Display the temperature value on the console.
+ //
+ UARTprintf("Temperature = %3d*C or %3d*F\r", TempValueC,
+ TempValueF);
+
+ writeLine("Temperature(Celsius): ");
+ writeFloat(TempValueC);
+
+ //
+ // This function provides a means of generating a constant length
+ // delay. The function delay (in cycles) = 3 * parameter. Delay
+ // 250ms arbitrarily.
+ //
+ SysCtlDelay(80000000 / 12);
+
+ ///SysCtlDelay(80000000);
+ }
+
+
+
+}
diff --git a/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/temperature_sensor.h b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/temperature_sensor.h
new file mode 100644
index 000000000..6368cf744
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/Stubs_Handler/temperature_sensor.h
@@ -0,0 +1 @@
+int temperature_main();
diff --git a/Software/Code_Composer/twine_usblib_demo/drivers/ADC_Sampling/ADC.c b/Software/Code_Composer/twine_usblib_demo/drivers/ADC_Sampling/ADC.c
new file mode 100644
index 000000000..b230f8bf8
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/drivers/ADC_Sampling/ADC.c
@@ -0,0 +1,295 @@
+// *****************************************************************************
+//
+// This is the data acquisition module. It performs acquisition of data from
+// selected channels, starting and stopping data logging, storing acquired
+// data, and running the strip chart display.
+//
+// *****************************************************************************
+
+#include "ADC.h"
+#include <stdbool.h>
+#include <ti/sysbios/knl/Task.h>
+#include <ti/sysbios/BIOS.h>
+#include <ti/sysbios/knl/Clock.h>
+#include <ti/sysbios/knl/Semaphore.h>
+
+#include <driverlib/adc.h>
+#include <driverlib/rom_map.h>
+#include <driverlib/interrupt.h>
+
+#include <inc/hw_memmap.h>
+#include <inc/hw_ints.h>
+#include "Drivers/I2C_Communication/I2C.h"
+// *****************************************************************************
+//
+// The following defines which ADC channel control should be used for each
+// kind of data item. Basically it maps how the ADC channels are connected
+// on the board. This is a hardware pinmap configuration.
+// Physical ADC connected channels in the TIVA
+// *****************************************************************************
+#define CHAN_DISPENSER_TEMP_3 ADC_CTL_CH0
+#define CHAN_DISPENSER_TEMP_1 ADC_CTL_CH1
+#define CHAN_RGB_RED ADC_CTL_CH2
+#define CHAN_TEMP_3 ADC_CTL_CH3
+#define CHAN_POS_WINDER ADC_CTL_CH10
+#define CHAN_RGB_GREEN ADC_CTL_CH12
+#define CHAN_RGB_BLUE ADC_CTL_CH13
+#define CHAN_DISPENSER_TEMP_5 ADC_CTL_CH16
+#define CHAN_DISPENSER_TEMP_6 ADC_CTL_CH17
+#define CHAN_TEMP_1 ADC_CTL_CH18
+#define CHAN_TEMP_2 ADC_CTL_CH19
+#define CHAN_DISPENSER_TEMP_4 ADC_CTL_CH20
+#define CHAN_POS_POOLER ADC_CTL_CH21
+#define CHAN_DISPENSER_TEMP_2 ADC_CTL_CH23
+
+// *****************************************************************************
+//
+// The following maps the order that items are acquired and stored by the
+// ADC sequencers. Note that 16 samples are specified, using 2 of the
+// 8 sample sequencers. The current is sampled multiple times deliberately
+// because that value tends to bounce around. It is sampled multiple
+// times and will be averaged.
+//
+// *****************************************************************************
+uint32_t g_pui32ADCSeq[] =
+{
+ CHAN_DISPENSER_TEMP_3, CHAN_DISPENSER_TEMP_1, CHAN_RGB_RED, CHAN_TEMP_3,
+ CHAN_POS_POOLER, CHAN_RGB_GREEN, CHAN_RGB_BLUE, CHAN_DISPENSER_TEMP_5,
+ CHAN_DISPENSER_TEMP_6, CHAN_TEMP_1, CHAN_TEMP_2, CHAN_DISPENSER_TEMP_4,
+ CHAN_DISPENSER_TEMP_2, CHAN_POS_WINDER
+};
+
+#define NUM_ADC_CHANNELS (sizeof(g_pui32ADCSeq) / \
+ sizeof(g_pui32ADCSeq[0]))
+
+#define SAMPLE_ARRAY_SIZE (NUM_ADC_CHANNELS + I2C_NUM_OF_CHANNELS)
+
+static bool isInitialized = false;
+// *****************************************************************************
+//
+// Global _storage for most recent sampaled Sensor Data
+//
+// *****************************************************************************
+//
+// A buffer to hold one set of ADC data that is acquired per sample time.
+//
+// *****************************************************************************
+static uint32_t g_pui32ADCData[SAMPLE_ARRAY_SIZE];
+
+// *****************************************************************************
+//configured in the cfg file and thats why should be defined as extern
+// *****************************************************************************
+extern Semaphore_Handle adcResultSem;
+
+static Clock_Handle adcSampleClock;
+static Clock_Params clkParams;
+static ProcessCallback processCallBack;
+
+// *****************************************************************************
+// ADCClockHandle: clock event handler - initiates trigger for the adc sampaling
+// *****************************************************************************
+// This function starts an ADC Conversion.
+static void ADCClockHandle(UArg arg0)
+{
+ //
+ // Kick off the next ADC acquisition. When these are done they will
+ // cause an ADC interrupt.
+ //
+ MAP_ADCProcessorTrigger(ADC1_BASE, 0);
+ MAP_ADCProcessorTrigger(ADC0_BASE, 0);
+}
+
+// *****************************************************************************
+//
+// This is the handler for the ADC interrupt. Even though more than one
+// sequencer is used, they are configured so that this one runs last.
+// Therefor when this ADC sequencer interrupt occurs, we know all of the ADC
+// data has been acquired.
+//
+// *****************************************************************************
+void ADC0SS0Handler(void)
+{
+ //
+ // Clear the interrupts for all ADC sequencers that are used.
+ //
+ MAP_ADCIntClear(ADC0_BASE, 0);
+ MAP_ADCIntClear(ADC1_BASE, 0);
+
+ //
+ // Retrieve the data from all ADC sequencers
+ //
+ MAP_ADCSequenceDataGet(ADC0_BASE, 0, &g_pui32ADCData[0]);
+ //offset in the array calculated as sempeling of 16 channels each one of 16 bits
+ MAP_ADCSequenceDataGet(ADC1_BASE, 0, &g_pui32ADCData[8]);
+
+ //
+ // Release adc result semaphore
+ //
+ Semaphore_post(adcResultSem);
+}
+
+// *****************************************************************************
+//
+// *****************************************************************************
+Void ADCProcessTask(UArg arg0, UArg arg1)
+{
+ while(1)
+ {
+ //
+ // Wait until new ADC data is available
+ //
+ Semaphore_pend(adcResultSem, BIOS_WAIT_FOREVER);
+
+ //
+ // Process the ADC data
+ //
+ if (processCallBack != NULL)
+ {
+ processCallBack(g_pui32ADCData);
+ }
+ }
+}
+
+// *****************************************************************************
+//
+// This function initializes the ADC hardware in preparation for data
+// acquisition.
+//
+// *****************************************************************************
+void ADCAcquireInit(void)
+{
+ uint32_t ui32Chan, ui32Base, ui32Seq;
+
+ //Avaraging 8
+ MAP_ADCHardwareOversampleConfigure(ADC0_BASE, 8);
+ MAP_ADCHardwareOversampleConfigure(ADC1_BASE, 8);
+ //
+ // Initialize both ADC peripherals using sequencer 0 and processor trigger.
+ //
+ MAP_ADCSequenceConfigure(ADC0_BASE, 0, ADC_TRIGGER_PROCESSOR, 0);
+ MAP_ADCSequenceConfigure(ADC1_BASE, 0, ADC_TRIGGER_PROCESSOR, 0);
+
+
+ //
+ // Enter loop to configure all of the ADC sequencer steps needed to
+ // acquire the data for the data logger. Multiple ADC and sequencers
+ // will be used in order to acquire all the channels.
+ //
+ for(ui32Chan = 0; ui32Chan < NUM_ADC_CHANNELS; ui32Chan++)
+ {
+ //
+ // If this is the first ADC then set the base for ADC0
+ //
+ if(ui32Chan < 8)
+ {
+ ui32Base = ADC0_BASE;
+ ui32Seq = 0;
+ }
+ else if(ui32Chan < 16)
+ {
+ //
+ // Second ADC, set the base for ADC1
+ //
+ ui32Base = ADC1_BASE;
+ ui32Seq = 0;
+ }
+
+ //
+ // Get the channel control for each channel. Test to see if it is the
+ // last channel for the sequencer, and if so then also set the
+ // interrupt and "end" flags.
+ //
+ uint32_t ui32ChCtl = g_pui32ADCSeq[ui32Chan];
+ //TODO define all the numbers under #define and not here
+ if((ui32Chan == 7) || (ui32Chan == 15) || (ui32Chan == (NUM_ADC_CHANNELS - 1)))
+ {
+ ui32ChCtl |= ADC_CTL_IE | ADC_CTL_END;
+ }
+
+ //
+ // Configure the sequence step
+ //
+ MAP_ADCSequenceStepConfigure(ui32Base, ui32Seq, ui32Chan % 8, ui32ChCtl);
+ }
+
+ if (!isInitialized)
+ {
+ // Create a periodic Clock Instance with _period - triggers the ADC sampling
+ Clock_Params_init(&clkParams);
+ clkParams.period = 0;
+ clkParams.startFlag = FALSE;
+ adcSampleClock = Clock_create(ADCClockHandle, 11, &clkParams, NULL);
+ isInitialized = true;
+
+ InitI2C();
+ }
+}
+
+// *****************************************************************************
+//
+// This function is called to start an acquisition running. It determines
+// which channels are to be logged, enables the ADC/I2C sequencers.
+// This will start the acquisition running.
+//
+// *****************************************************************************
+void ADCAcquireStart(ProcessCallback _callback, uint32_t _period)
+{
+ //
+ // Enable the ADC sequencers
+ //
+ MAP_ADCSequenceEnable(ADC0_BASE, 0);
+ MAP_ADCSequenceEnable(ADC1_BASE, 0);
+
+ //
+ // Flush the ADC sequencers to be sure there is no lingering/ trush data.
+ //
+ MAP_ADCSequenceDataGet(ADC0_BASE, 0, g_pui32ADCData);
+ MAP_ADCSequenceDataGet(ADC1_BASE, 0, g_pui32ADCData);
+
+ //
+ // Enable ADC interrupts
+ //
+ MAP_ADCIntClear(ADC0_BASE, 0);
+ MAP_ADCIntClear(ADC1_BASE, 0);
+ MAP_ADCIntEnable(ADC0_BASE, 0);
+ MAP_IntEnable(INT_ADC0SS0);
+
+ uint8_t i;
+ for (i = NUM_ADC_CHANNELS; i < SAMPLE_ARRAY_SIZE; ++i)
+ {
+ g_pui32ADCData[i] = MAX_DIGITAL_POTENTIOMETER_READ;
+ }
+ // Store process
+ processCallBack = _callback;
+ // Start a periodic Clock Instance with _period - triggers the ADC sampling
+ Clock_setPeriod(adcSampleClock, _period);
+ Clock_start(adcSampleClock);
+ //
+ // Logging data should now start running
+ //
+}
+
+// *****************************************************************************
+//
+// This function is called to stop an acquisition running. It disables the
+// ADC sequencers.
+//
+// *****************************************************************************
+void ADCAcquireStop(void)
+{
+ //Stop trigger adc sampling
+ Clock_stop(adcSampleClock);
+
+ //
+ // Disable ADC interrupts
+ //
+ MAP_IntDisable(INT_ADC0SS0);
+ MAP_IntDisable(INT_ADC1SS0);
+
+ //
+ // Disable ADC sequencers
+ //
+ MAP_ADCSequenceDisable(ADC0_BASE, 0);
+ MAP_ADCSequenceDisable(ADC1_BASE, 0);
+}
+
diff --git a/Software/Code_Composer/twine_usblib_demo/drivers/ADC_Sampling/ADC.h b/Software/Code_Composer/twine_usblib_demo/drivers/ADC_Sampling/ADC.h
new file mode 100644
index 000000000..f04c2d512
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/drivers/ADC_Sampling/ADC.h
@@ -0,0 +1,40 @@
+
+#ifndef DRIVERS_ADC_H_
+#define DRIVERS_ADC_H_
+
+#include <stdint.h>
+
+//*****************************************************************************
+//
+// The following are indexes for values returned from the ADC's. These index's
+// map directly to g_pui32ADCSeq[], and inside this array there is a directly
+// ADC copied data
+//*****************************************************************************
+#define ADCSEQ_DISPENSER_TEMP_3 0
+#define ADCSEQ_DISPENSER_TEMP_1 1
+#define ADCSEQ_RGB_RED 2
+#define ADCSEQ_TEMP_3 3
+#define ADCSEQ_POS_POOLER 4
+#define ADCSEQ_RGB_GREEN 5
+#define ADCSEQ_RGB_BLUE 6
+#define ADCSEQ_DISPENSER_TEMP_5 7
+#define ADCSEQ_DISPENSER_TEMP_6 8
+#define ADCSEQ_TEMP_1 9
+#define ADCSEQ_TEMP_2 10
+#define ADCSEQ_DISPENSER_TEMP_4 11
+#define ADCSEQ_DISPENSER_TEMP_2 12
+#define ADCSEQ_POS_WINDER 13
+
+//max potentiometer read in I2C protocol
+#define MAX_DIGITAL_POTENTIOMETER_READ 0x660D
+
+typedef void (*ProcessCallback)(uint32_t* adcData);
+
+void ADCAcquireInit(void);
+
+void ADCAcquireStart(ProcessCallback _callback, uint32_t _period);
+
+void ADCAcquireStop(void);
+
+#endif // DRIVERS_ADC_H_
+
diff --git a/Software/Code_Composer/twine_usblib_demo/drivers/FPGA/FPGA.c b/Software/Code_Composer/twine_usblib_demo/drivers/FPGA/FPGA.c
new file mode 100644
index 000000000..fafd84375
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/drivers/FPGA/FPGA.c
@@ -0,0 +1,88 @@
+#include "FPGA_COMM.h"
+#include "Stubs_Handler/DataDef.h"
+
+
+unsigned short GPO_01_Reg;
+
+int test_FPGA()
+{
+ GP_Out_01 Gpo_01;
+
+ Gpo_01.bits.F3_GPO_LED4 = 1;
+ Gpo_01.bits.F3_GPO_LED3 = 1;
+ Gpo_01.bits.F3_GPO_LED2 = 0;
+ Gpo_01.bits.F3_GPO_LED1 = 1;
+ Gpo_01.bits.F3_GPO_EXTWINDER_SSR11_CTRL = 1;
+ Gpo_01.bits.F3_GPO_BUZZER = 0;
+ Gpo_01.bits.F3_SPARE2_ROTENC_CLK = 1;
+ Gpo_01.bits.F3_SPARE1_ROTENC_CLK = 1;
+ Gpo_01.bits.RESERVE = 0xF5;
+
+ GPO_01_Reg = Gpo_01.ushort;
+
+ return 0;
+}
+
+int Test_FPGA_ReadBack(unsigned char FPGA_NUM, unsigned short Value, unsigned short *ReadBackValue)// = 0x1234)
+{
+
+ //unsigned short Temp = 0x1234;
+
+ if(FPGA_NUM == 1)
+ {
+ FPGA1_Test = Value;
+ *ReadBackValue = FPGA1_Test;
+ if(Value == !FPGA1_Test)
+ return PASSED;
+ }
+
+ if(FPGA_NUM == 2)
+ {
+ FPGA2_Test = Value;
+ *ReadBackValue = FPGA2_Test;
+ if(Value == !FPGA2_Test)
+ return PASSED;
+ }
+
+ if(FPGA_NUM == 3)
+ {
+ FPGA3_Test = Value;
+ *ReadBackValue = FPGA3_Test;
+ if(Value == !FPGA3_Test)
+ return PASSED;
+ }
+
+ return FAILED;
+}
+
+
+int FPGA_ReadVersion(unsigned char FPGA_NUM, unsigned char *Version, unsigned char *Year, unsigned char *Month, unsigned char *Day)
+{
+ VER1 Ver1;
+ VER2 Ver2;
+
+ switch(FPGA_NUM)
+ {
+ case 1:
+ Ver1.ushort = FPGA1_Ver1_D;
+ Ver2.ushort = FPGA1_Ver2_D;
+ break;
+ case 2:
+ Ver1.ushort = FPGA2_Ver1_D;
+ Ver2.ushort = FPGA2_Ver2_D;
+ break;
+ case 3:
+ Ver1.ushort = FPGA3_Ver1_D;
+ Ver2.ushort = FPGA3_Ver2_D;
+ break;
+ default:
+ break;
+ }
+
+ *Month = Ver1.bytes.Month;
+ *Day = Ver1.bytes.Day;
+ *Year = Ver2.bytes.Year; // to check how many digits is needed
+ *Version = Ver2.bytes.Ver_num;
+
+ return PASSED;
+}
diff --git a/Software/Code_Composer/twine_usblib_demo/drivers/FPGA/FPGA.h b/Software/Code_Composer/twine_usblib_demo/drivers/FPGA/FPGA.h
new file mode 100644
index 000000000..a0e845296
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/drivers/FPGA/FPGA.h
@@ -0,0 +1,9 @@
+#ifndef FPGA_H
+#define FPGA_H
+
+int test_FPGA();
+int Test_FPGA_ReadBack(unsigned char FPGA_NUM, unsigned short Value, unsigned short *ReadBackValue);
+int FPGA_ReadVersion(unsigned char FPGA_NUM, unsigned char *Version, unsigned char *Year, unsigned char *Month, unsigned char *Day);
+
+
+#endif //FPGA_H
diff --git a/Software/Code_Composer/twine_usblib_demo/drivers/FPGA/FPGA_Comm.h b/Software/Code_Composer/twine_usblib_demo/drivers/FPGA/FPGA_Comm.h
new file mode 100644
index 000000000..4a124092f
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/drivers/FPGA/FPGA_Comm.h
@@ -0,0 +1,731 @@
+#include <stdbool.h>
+
+//TODO update the addresses WordOrByte !!!
+
+//Address is = 4bit_base + 3bit_fpga_base + 9bit_WordOrByte
+//Base Address 0X000
+
+#define BASE 0x0000 << 12
+#define FPGA1_BASE (BASE | (0x00 << 0x09))
+#define FPGA2_BASE (BASE | (0x01 << 0x09))
+#define FPGA3_BASE (BASE | (0x02 << 0x09))
+
+#define WordOrByte 0x01//0x01 for Word, 0x02 for Byte
+
+//Registers definitions
+
+// * * * * * * * * * * * * * * * * FPGA 1 * * * * * * * * * * * * * * * * //
+
+//Version1
+#define FPGA1_Ver1_D (*((volatile short *)(FPGA1_BASE | (0x0 * WordOrByte)))) //Version of Fpga is held here
+#define FPGA1_Ver1_L (*((volatile short *)(FPGA1_BASE | (0x1 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define FPGA1_Ver1_M (*((volatile short *)(FPGA1_BASE | (0x2 * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+
+//Version2
+#define FPGA1_Ver2_D (*((volatile short *)(FPGA1_BASE | (0x8 * WordOrByte)))) //Version of Fpga is held here
+#define FPGA1_Ver2_L (*((volatile short *)(FPGA1_BASE | (0x9 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define FPGA1_Ver2_M (*((volatile short *)(FPGA1_BASE | (0xa * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+
+//GPI shorterrupt LS_01 Registers
+#define F1_GPI_LS1_D (*((volatile short *)(FPGA1_BASE | (0x10 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define F1_GPI_LS1_L (*((volatile short *)(FPGA1_BASE | (0x11 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define F1_GPI_LS1_M (*((volatile short *)(FPGA1_BASE | (0x12 * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+
+//GPI shorterrupt LS_02 Registers
+#define F1_GPI_LS2_D (*((volatile short *)(FPGA1_BASE | (0x18 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define F1_GPI_LS2_L (*((volatile short *)(FPGA1_BASE | (0x19 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define F1_GPI_LS2_M (*((volatile short *)(FPGA1_BASE | (0x1a * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+
+//GPI shorterrupt LS_03 Registers
+#define GPI_LS3_D (*((volatile short *)(FPGA1_BASE | (0x20 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define GPI_LS3_L (*((volatile short *)(FPGA1_BASE | (0x21 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define GPI_LS3_M (*((volatile short *)(FPGA1_BASE | (0x22 * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+
+//Moto_Driver_NBUSY_register1
+#define Moto_Driver_NBUSY1_D (*((volatile short *)(FPGA1_BASE | (0x28 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define Moto_Driver_NBUSY1_L (*((volatile short *)(FPGA1_BASE | (0x29 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define Moto_Driver_NBUSY1_M (*((volatile short *)(FPGA1_BASE | (0x2a * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+
+//Moto_Driver_NBUSY_register2
+#define Moto_Driver_NBUSY2_D (*((volatile short *)(FPGA1_BASE | (0x30 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define Moto_Driver_NBUSY2_L (*((volatile short *)(FPGA1_BASE | (0x31 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define Moto_Driver_NBUSY2_M (*((volatile short *)(FPGA1_BASE | (0x32 * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+
+//GPI_EXTWINDER_and_TFEED_BRK
+#define GPI_EXTWINDER_D (*((volatile short *)(FPGA1_BASE | (0x38 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define GPI_EXTWINDER_L (*((volatile short *)(FPGA1_BASE | (0x39 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define GPI_EXTWINDER_M (*((volatile short *)(FPGA1_BASE | (0x3a * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+
+//Prescaler
+#define F1_Prescaler1_reg1 (*((volatile short *)(FPGA1_BASE | (0x40 * WordOrByte)))) //Parameter for prescaler divisions
+#define F1_Prescaler1_reg2 (*((volatile short *)(FPGA1_BASE | (0x41 * WordOrByte)))) //Parameter for prescaler divisions
+#define F1_Prescaler1_reg3 (*((volatile short *)(FPGA1_BASE | (0x42 * WordOrByte)))) //Parameter for prescaler divisions
+#define F1_Prescaler1_reg4 (*((volatile short *)(FPGA1_BASE | (0x43 * WordOrByte)))) //Parameter for prescaler divisions
+
+//SPI_Busy_register1
+#define SPI_Busy1_D (*((volatile short *)(FPGA1_BASE | (0x048 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define SPI_Busy1_L (*((volatile short *)(FPGA1_BASE | (0x049 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define SPI_Busy1_M (*((volatile short *)(FPGA1_BASE | (0x04a * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+
+//SPI_Busy_register2
+#define SPI_Busy2_D (*((volatile short *)(FPGA1_BASE | (0x050 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define SPI_Busy2_L (*((volatile short *)(FPGA1_BASE | (0x051 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define SPI_Busy2_M (*((volatile short *)(FPGA1_BASE | (0x052 * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+
+//Moto_Driver_NSTBYRST_register1
+#define F1_Moto_Driver_NSTBYRST1 (*((volatile short *)(FPGA1_BASE | (0x059 * WordOrByte)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
+
+//Moto_Driver_NSTBYRST_register2
+#define Moto_Driver_NSTBYRST2 (*((volatile short *)(FPGA1_BASE | (0x061 * WordOrByte)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
+
+//Moto_Driver_SW_register1
+#define F1_Moto_Driver_SW1 (*((volatile short *)(FPGA1_BASE | (0x069 * WordOrByte)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
+
+//Moto_Driver_SW_register2
+#define Moto_Driver_SW2 (*((volatile short *)(FPGA1_BASE | (0x071 * WordOrByte)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
+
+//QEI_SCREW_ROTENC
+#define SCREW_ROTENC_L (*((volatile short *)(FPGA1_BASE | (0x080 * WordOrByte)))) //Value of the lsb of the QEI register
+#define SCREW_ROTENC_M (*((volatile short *)(FPGA1_BASE | (0x081 * WordOrByte)))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
+#define SCREW_ROTENC_I (*((volatile short *)(FPGA1_BASE | (0x082 * WordOrByte)))) //value of index counter
+
+//QEI_RSPARE_ROTENC
+#define RSPARE_ROTENC_L (*((volatile short *)(FPGA1_BASE | (0x088 * WordOrByte)))) //Value of the lsb of the QEI register
+#define RSPARE_ROTENC_M (*((volatile short *)(FPGA1_BASE | (0x089 * WordOrByte)))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
+#define RSPARE_ROTENC_I (*((volatile short *)(FPGA1_BASE | (0x08a * WordOrByte)))) //value of index counter
+
+//QEI_LSPARE1_ROTENC
+#define LSPARE1_ROTENC_L (*((volatile short *)(FPGA1_BASE | (0x090 * WordOrByte)))) //Value of the lsb of the QEI register
+#define LSPARE1_ROTENC_M (*((volatile short *)(FPGA1_BASE | (0x091 * WordOrByte)))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
+#define LSPARE1_ROTENC_I (*((volatile short *)(FPGA1_BASE | (0x092 * WordOrByte)))) //value of index counter
+
+//QEI_RSPEEDSENS_ROTENC
+#define RSPEEDSENS_ROTENC_L (*((volatile short *)(FPGA1_BASE | (0x098 * WordOrByte)))) //Value of the lsb of the QEI register
+#define RSPEEDSENS_ROTENC_M (*((volatile short *)(FPGA1_BASE | (0x099 * WordOrByte)))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
+#define RSPEEDSENS_ROTENC_I (*((volatile short *)(FPGA1_BASE | (0x09a * WordOrByte)))) //value of index counter
+
+//QEI_LSPARE2_ROTENC
+#define LSPARE2_ROTENC_L (*((volatile short *)(FPGA1_BASE | (0x0A0 * WordOrByte)))) //Value of the lsb of the QEI register
+#define LSPARE2_ROTENC_M (*((volatile short *)(FPGA1_BASE | (0x0A1 * WordOrByte)))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
+#define LSPARE2_ROTENC_I (*((volatile short *)(FPGA1_BASE | (0x0A2 * WordOrByte)))) //value of index counter
+
+//QEI_DRYER_LOADARM_ROTENC
+#define DRYER_LOADARM_ROTENC_L (*((volatile short *)(FPGA1_BASE | (0x0a8 * WordOrByte)))) //Value of the lsb of the QEI register
+#define DRYER_LOADARM_ROTENC_M (*((volatile short *)(FPGA1_BASE | (0x0a9 * WordOrByte)))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
+#define DRYER_LOADARM_ROTENC_I (*((volatile short *)(FPGA1_BASE | (0x0aa * WordOrByte)))) //value of index counter
+
+//SPI_MOTO_RLOADING_A1
+#define MOTO_RLOADING_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x100 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_RLOADING_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x101 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_RLOADING_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x102 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_RLOADING_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x103 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+
+//SPI_MOTO_RDRIVING_A1
+#define MOTO_RDRIVING_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x108 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_RDRIVING_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x109 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_RDRIVING_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x10A * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_RDRIVING_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x10B * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+
+//SPI_F1_MOTO_LDRIVING_A1
+#define MOTO_LDRIVING_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x110 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_LDRIVING_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x111 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_LDRIVING_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x112 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_LDRIVING_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x113 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//SPI_F1_MOTO_LLOADING_A1
+#define MOTO_LLOADING_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x118 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_LLOADING_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x119 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_LLOADING_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x11A * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_LLOADING_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x11B * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+
+//SPI_F1_MOTO_DRYER_LOADARM_A1
+#define MOTO_DRYER_LOADARM_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x120 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DRYER_LOADARM_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x121 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DRYER_LOADARM_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x122 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_DRYER_LOADARM_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x123 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//SPI_F1_MOTO_DRYER_DRIVING_A1
+#define MOTO_DRYER_DRIVING_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x128 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DRYER_DRIVING_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x129 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DRYER_DRIVING_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x12A * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_DRYER_DRIVING_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x12B * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//SPI_F1_MOTO_DH_CLEANHEAD_A1
+#define MOTO_DH_CLEANHEAD_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x130 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DH_CLEANHEAD_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x131 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DH_CLEANHEAD_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x132 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_DH_CLEANHEAD_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x133 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//SPI_F1_MOTO_DH_CLEANMECH_A1
+#define MOTO_DH_CLEANMECH_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x138 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DH_CLEANMECH_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x139 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DH_CLEANMECH_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x13A * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_DH_CLEANMECH_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x13B * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+
+//SPI_F1_MOTO_SCREW_A1
+#define MOTO_SCREW_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x140 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_SCREW_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x141 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_SCREW_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x142 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_SCREW_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x143 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//SPI_F1_MOTO_WINDER_A1
+#define MOTO_WINDER_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x148 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_WINDER_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x149 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_WINDER_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x14A * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_WINDER_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x14B * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//SPI_MOTO_RLOADARM_A1
+#define MOTO_RLOADARM_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x150 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_RLOADARM_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x151 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_RLOADARM_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x152 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_RLOADARM_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x153 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//SPI_MOTO_RDANCER_A1
+#define MOTO_RDANCER_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x158 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_RDANCER_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x159 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_RDANCER_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x15A * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_RDANCER_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x15B * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//SPI_MOTO_LDANCER1_A1
+#define MOTO_LDANCER1_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x160 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_LDANCER1_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x161 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_LDANCER1_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x162 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_LDANCER1_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x163 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//SPI_MOTO_LDANCER2_A1
+#define MOTO_LDANCER2_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x168 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_LDANCER2_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x169 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_LDANCER2_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x16A * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_LDANCER2_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x16B * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//SPI_MOTO_DRYER_LID_A1
+#define MOTO_DRYER_LID_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x170 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DRYER_LID_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x171 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DRYER_LID_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x172 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_DRYER_LID_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x173 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//SPI_MOTO_DH_LID_A1
+#define MOTO_DH_LID_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x178 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DH_LID_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x179 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DH_LID_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x17A * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_DH_LID_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x17B * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//SPI_MOTO_LPIVOT1_A1
+#define MOTO_LPIVOT1_A1_TX_00 (*((volatile short *)(FPGA1_BASE | (0x180 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_LPIVOT1_A1_TX_01 (*((volatile short *)(FPGA1_BASE | (0x181 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_LPIVOT1_A1_RX_00 (*((volatile short *)(FPGA1_BASE | (0x182 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_LPIVOT1_A1_RX_01 (*((volatile short *)(FPGA1_BASE | (0x183 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//SSI
+#define F1_LDANCER1_ROTENC_DATA_p_RX_msb (*((volatile short *)(FPGA1_BASE | (0x190 * WordOrByte)))) //16 bit MSB if nessesary
+#define F1_LDANCER1_ROTENC_DATA_p_RX_lsb (*((volatile short *)(FPGA1_BASE | (0x191 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+#define LDANCER2_ROTENC_DATA_p_RX_msb (*((volatile short *)(FPGA1_BASE | (0x198 * WordOrByte)))) //16 bit MSB if nessesary
+#define LDANCER2_ROTENC_DATA_p_RX_lsb (*((volatile short *)(FPGA1_BASE | (0x199 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+#define LSPARE_ROTENC_DATA_p_RX_msb (*((volatile short *)(FPGA1_BASE | (0x1a0 * WordOrByte)))) //16 bit MSB if nessesary
+#define LSPARE_ROTENC_DATA_p_RX_lsb (*((volatile short *)(FPGA1_BASE | (0x1a1 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+#define RDANCER_ROTENC_DATA_p_RX_msb (*((volatile short *)(FPGA1_BASE | (0x1a8 * WordOrByte)))) //16 bit MSB if nessesary
+#define RDANCER_ROTENC_DATA_p_RX_lsb (*((volatile short *)(FPGA1_BASE | (0x1a9 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+#define F1_RSPARE_ROTENC_DATA_p_RX_msb (*((volatile short *)(FPGA1_BASE | (0x1b0 * WordOrByte)))) //16 bit MSB if nessesary
+#define F1_RSPARE_ROTENC_DATA_p_RX_lsb (*((volatile short *)(FPGA1_BASE | (0x1b1 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//Test
+#define FPGA1_Test (*((volatile short *)(FPGA1_BASE | (0x1f8 * WordOrByte)))) //Readback not -gives the inverse of the written to value
+
+// * * * * * * * * * * * * * * * * FPGA 2 * * * * * * * * * * * * * * * * //
+//Version1
+#define FPGA2_Ver1_D (*((volatile short *)(FPGA2_BASE | (0x0 * WordOrByte)))) //Version of Fpga is held here
+#define FPGA2_Ver1_L (*((volatile short *)(FPGA2_BASE | (0x1 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define FPGA2_Ver1_M (*((volatile short *)(FPGA2_BASE | (0x2 * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+
+//Version2
+#define FPGA2_Ver2_D (*((volatile short *)(FPGA2_BASE | (0x8 * WordOrByte)))) //Version of Fpga is held here
+#define FPGA2_Ver2_L (*((volatile short *)(FPGA2_BASE | (0x9 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define FPGA2_Ver2_M (*((volatile short *)(FPGA2_BASE | (0xa * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+
+//GPI shorterrupt LS_01 Registers
+#define F2_GPI_LS1_D (*((volatile short *)(FPGA2_BASE | (0x10 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define F2_GPI_LS1_L (*((volatile short *)(FPGA2_BASE | (0x11 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define F2_GPI_LS1_M (*((volatile short *)(FPGA2_BASE | (0x12 * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+
+//GPI shorterrupt LS_02 Registers
+#define F2_GPI_LS2_D (*((volatile short *)(FPGA2_BASE | (0x18 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define F2_GPI_LS2_L (*((volatile short *)(FPGA2_BASE | (0x19 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define F2_GPI_LS2_M (*((volatile short *)(FPGA2_BASE | (0x1a * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+
+//GPI shorterrupt LS_03 Registers
+#define F2_GPI_LS3_D (*((volatile short *)(FPGA2_BASE | (0x20 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define F2_GPI_LS3_L (*((volatile short *)(FPGA2_BASE | (0x21 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define F2_GPI_LS3_M (*((volatile short *)(FPGA2_BASE | (0x22 * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+
+//Moto_Driver_NBUSY_register1
+#define F2_Moto_Driver_NBUSY1_D (*((volatile short *)(FPGA2_BASE | (0x28 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define F2_Moto_Driver_NBUSY1_L (*((volatile short *)(FPGA2_BASE | (0x29 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define F2_Moto_Driver_NBUSY1_M (*((volatile short *)(FPGA2_BASE | (0x2a * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+
+//DISPENSER_VALVE_IN
+#define DISPENSER_VALVE_IN_Direct (*((volatile short *)(FPGA2_BASE | (0x030 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define DISPENSER_VALVE_IN_Latched (*((volatile short *)(FPGA2_BASE | (0x031 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define DISPENSER_VALVE_IN_Mask (*((volatile short *)(FPGA2_BASE | (0x032 * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+//GPI_REGISTER1
+#define GPI_REGISTER1_Direct (*((volatile short *)(FPGA2_BASE | (0x038 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define GPI_REGISTER1_Latched (*((volatile short *)(FPGA2_BASE | (0x039 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define GPI_REGISTER1_Mask (*((volatile short *)(FPGA2_BASE | (0x03A * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+//LS_04
+#define LS_04_Direct (*((volatile short *)(FPGA2_BASE | (0x040 * WordOrByte)))) //Version of Fpga is held here
+#define LS_04_Latched (*((volatile short *)(FPGA2_BASE | (0x041 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define LS_04_Mask (*((volatile short *)(FPGA2_BASE | (0x042 * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+//SPI_Busy_register1
+#define SPI_Busy1_Direct (*((volatile short *)(FPGA2_BASE | (0x048 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define SPI_Busy1_Latched (*((volatile short *)(FPGA2_BASE | (0x049 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define SPI_Busy1_Mask (*((volatile short *)(FPGA2_BASE | (0x04a * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+//SPI_Busy_register2
+#define SPI_Busy2_Direct (*((volatile short *)(FPGA2_BASE | (0x050 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define SPI_Busy2_Latched (*((volatile short *)(FPGA2_BASE | (0x051 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define SPI_Busy2_Mask (*((volatile short *)(FPGA2_BASE | (0x052 * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+//Moto_Driver_NSTBYRST_register1
+#define F2_Moto_Driver_NSTBYRST1 (*((volatile short *)(FPGA2_BASE | (0x059 * WordOrByte)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
+//DISPENSER_VALVE_OUT
+#define F2_DISPENSER_VALVE_OUT (*((volatile short *)(FPGA2_BASE | (0x061 * WordOrByte)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
+//Moto_Driver_SW_register1
+#define F2_Moto_Driver_SW1 (*((volatile short *)(FPGA2_BASE | (0x069 * WordOrByte)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
+//CTRL
+#define CTRL (*((volatile short *)(FPGA2_BASE | (0x071 * WordOrByte)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
+//GPO_REGISTER
+#define GPO_REGISTER (*((volatile short *)(FPGA2_BASE | (0x079 * WordOrByte)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
+//SSI
+#define DISPENSER_ROTENC_DATA_p_7_RX_msb (*((volatile short *)(FPGA2_BASE | (0x080 * WordOrByte)))) //16 bit MSB if nessesary
+#define DISPENSER_ROTENC_DATA_p_7_RX_lsb (*((volatile short *)(FPGA2_BASE | (0x081 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+#define DISPENSER_ROTENC_DATA_p_8_RX_msb (*((volatile short *)(FPGA2_BASE | (0x088 * WordOrByte)))) //16 bit MSB if nessesary
+#define DISPENSER_ROTENC_DATA_p_8_RX_lsb (*((volatile short *)(FPGA2_BASE | (0x089 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//ANALOG_DYEINGH_TEMP1_1
+#define ANALOG_DYEINGH_TEMP1_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x100 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define ANALOG_DYEINGH_TEMP1_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x101 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define ANALOG_DYEINGH_TEMP1_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x102 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define ANALOG_DYEINGH_TEMP1_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x103 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//AN_ENCLOSURETEMP1_1
+#define AN_ENCLOSURETEMP1_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x108 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define AN_ENCLOSURETEMP1_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x109 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define AN_ENCLOSURETEMP1_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x10A * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define AN_ENCLOSURETEMP1_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x10B * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//ANALOG_DYEINGH_TEMP2
+#define ANALOG_DYEINGH_TEMP2_TX_00 (*((volatile short *)(FPGA2_BASE | (0x110 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define ANALOG_DYEINGH_TEMP2_TX_01 (*((volatile short *)(FPGA2_BASE | (0x111 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define ANALOG_DYEINGH_TEMP2_RX_00 (*((volatile short *)(FPGA2_BASE | (0x112 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define ANALOG_DYEINGH_TEMP2_RX_01 (*((volatile short *)(FPGA2_BASE | (0x113 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//AN_ENCLOSURETEMP2_1
+#define AN_ENCLOSURETEMP2_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x118 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define AN_ENCLOSURETEMP2_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x119 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define AN_ENCLOSURETEMP2_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x11A * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define AN_ENCLOSURETEMP2_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x11B * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//ANALOG_DYEINGH_TEMP3
+#define ANALOG_DYEINGH_TEMP3_TX_00 (*((volatile short *)(FPGA2_BASE | (0x120 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define ANALOG_DYEINGH_TEMP3_TX_01 (*((volatile short *)(FPGA2_BASE | (0x121 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define ANALOG_DYEINGH_TEMP3_RX_00 (*((volatile short *)(FPGA2_BASE | (0x122 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define ANALOG_DYEINGH_TEMP3_RX_01 (*((volatile short *)(FPGA2_BASE | (0x123 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//AN_ENCLOSURETEMP3_1
+#define AN_ENCLOSURETEMP3_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x128 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define AN_ENCLOSURETEMP3_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x129 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define AN_ENCLOSURETEMP3_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x12A * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define AN_ENCLOSURETEMP3_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x12B * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//ANALOG_DYEINGH_TEMP4
+#define ANALOG_DYEINGH_TEMP4_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x130 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define ANALOG_DYEINGH_TEMP4_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x131 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define ANALOG_DYEINGH_TEMP4_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x132 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define ANALOG_DYEINGH_TEMP4_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x133 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//ANALOG_DRYER_TEMP1
+#define ANALOG_DRYER_TEMP1_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x138 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define ANALOG_DRYER_TEMP1_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x139 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define ANALOG_DRYER_TEMP1_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x13A * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define ANALOG_DRYER_TEMP1_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x13B * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//ANALOG_DYEINGH_TEMP5
+#define ANALOG_DYEINGH_TEMP5_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x140 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define ANALOG_DYEINGH_TEMP5_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x141 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define ANALOG_DYEINGH_TEMP5_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x142 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define ANALOG_DYEINGH_TEMP5_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x143 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//ANALOG_DRYER_TEMP2
+#define ANALOG_DRYER_TEMP2_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x148 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define ANALOG_DRYER_TEMP2_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x149 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define ANALOG_DRYER_TEMP2_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x14A * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define ANALOG_DRYER_TEMP2_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x14B * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//ANALOG_MIXCHIP_TEMP
+#define ANALOG_MIXCHIP_TEMP_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x150 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define ANALOG_MIXCHIP_TEMP_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x151 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define ANALOG_MIXCHIP_TEMP_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x152 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define ANALOG_MIXCHIP_TEMP_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x153 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//ANALOG_DRYER_TEMP3
+#define ANALOG_DRYER_TEMP3_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x158 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define ANALOG_DRYER_TEMP3_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x159 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define ANALOG_DRYER_TEMP3_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x15A * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define ANALOG_DRYER_TEMP3_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x15B * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//SSI
+#define DISPENSER_ROTENC_DATA_p_1_RX_msb (*((volatile short *)(FPGA2_BASE | (0x160 * WordOrByte)))) //16 bit MSB if nessesary
+#define DISPENSER_ROTENC_DATA_p_1_RX_lsb (*((volatile short *)(FPGA2_BASE | (0x161 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+#define DISPENSER_ROTENC_DATA_p_2_RX_msb (*((volatile short *)(FPGA2_BASE | (0x168 * WordOrByte)))) //16 bit MSB if nessesary
+#define DISPENSER_ROTENC_DATA_p_2_RX_lsb (*((volatile short *)(FPGA2_BASE | (0x169 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+#define DISPENSER_ROTENC_DATA_p_3_RX_msb (*((volatile short *)(FPGA2_BASE | (0x170 * WordOrByte)))) //16 bit MSB if nessesary
+#define DISPENSER_ROTENC_DATA_p_3_RX_lsb (*((volatile short *)(FPGA2_BASE | (0x171 * WordOrByte)))) //16 bit MSB if nessesary
+#define DISPENSER_ROTENC_DATA_p_4_RX_msb (*((volatile short *)(FPGA2_BASE | (0x178 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+#define DISPENSER_ROTENC_DATA_p_4_RX_lsb (*((volatile short *)(FPGA2_BASE | (0x179 * WordOrByte)))) //16 bit MSB if nessesary
+#define DISPENSER_ROTENC_DATA_p_5_RX_msb (*((volatile short *)(FPGA2_BASE | (0x180 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+#define DISPENSER_ROTENC_DATA_p_5_RX_lsb (*((volatile short *)(FPGA2_BASE | (0x181 * WordOrByte)))) //16 bit MSB if nessesary
+#define DISPENSER_ROTENC_DATA_p_6_RX_msb (*((volatile short *)(FPGA2_BASE | (0x188 * WordOrByte)))) //16 bit MSB if nessesary
+#define DISPENSER_ROTENC_DATA_p_6_RX_lsb (*((volatile short *)(FPGA2_BASE | (0x189 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//MOTO_DISPENSER_A1
+#define MOTO_DISPENSER_A1_1_TX_00 (*((volatile short *)(FPGA2_BASE | (0x190 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DISPENSER_A1_1_TX_01 (*((volatile short *)(FPGA2_BASE | (0x191 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DISPENSER_A1_1_RX_00 (*((volatile short *)(FPGA2_BASE | (0x192 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_DISPENSER_A1_1_RX_01 (*((volatile short *)(FPGA2_BASE | (0x193 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//MOTO_DISPENSER_A1_2
+#define MOTO_DISPENSER_A1_2_TX_00 (*((volatile short *)(FPGA2_BASE | (0x198 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DISPENSER_A1_2_TX_01 (*((volatile short *)(FPGA2_BASE | (0x199 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DISPENSER_A1_2_RX_00 (*((volatile short *)(FPGA2_BASE | (0x19A * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_DISPENSER_A1_2_RX_01 (*((volatile short *)(FPGA2_BASE | (0x19B * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//MOTO_DISPENSER_A1_3
+#define MOTO_DISPENSER_A1_3_TX_00 (*((volatile short *)(FPGA2_BASE | (0x1A0 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DISPENSER_A1_3_TX_01 (*((volatile short *)(FPGA2_BASE | (0x1A1 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DISPENSER_A1_3_RX_00 (*((volatile short *)(FPGA2_BASE | (0x1A2 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_DISPENSER_A1_3_RX_01 (*((volatile short *)(FPGA2_BASE | (0x1A3 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//MOTO_DISPENSER_A1_4
+#define MOTO_DISPENSER_A1_4_TX_00 (*((volatile short *)(FPGA2_BASE | (0x1A8 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DISPENSER_A1_4_TX_01 (*((volatile short *)(FPGA2_BASE | (0x1A9 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DISPENSER_A1_4_RX_00 (*((volatile short *)(FPGA2_BASE | (0x1AA * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_DISPENSER_A1_4_RX_01 (*((volatile short *)(FPGA2_BASE | (0x1AB * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//MOTO_DISPENSER_A1_5
+#define MOTO_DISPENSER_A1_5_TX_00 (*((volatile short *)(FPGA2_BASE | (0x1B0 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DISPENSER_A1_5_TX_01 (*((volatile short *)(FPGA2_BASE | (0x1B1 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DISPENSER_A1_5_RX_00 (*((volatile short *)(FPGA2_BASE | (0x1B2 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_DISPENSER_A1_5_RX_01 (*((volatile short *)(FPGA2_BASE | (0x1B3 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//MOTO_DISPENSER_A1_6
+#define MOTO_DISPENSER_A1_6_TX_00 (*((volatile short *)(FPGA2_BASE | (0x1B8 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DISPENSER_A1_6_TX_01 (*((volatile short *)(FPGA2_BASE | (0x1B9 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DISPENSER_A1_6_RX_00 (*((volatile short *)(FPGA2_BASE | (0x1BA * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_DISPENSER_A1_6_RX_01 (*((volatile short *)(FPGA2_BASE | (0x1BB * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//MOTO_DISPENSER_A1_7
+#define MOTO_DISPENSER_A1_7_TX_00 (*((volatile short *)(FPGA2_BASE | (0x1C0 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DISPENSER_A1_7_TX_01 (*((volatile short *)(FPGA2_BASE | (0x1C1 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DISPENSER_A1_7_RX_00 (*((volatile short *)(FPGA2_BASE | (0x1C2 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_DISPENSER_A1_7_RX_01 (*((volatile short *)(FPGA2_BASE | (0x1C3 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//MOTO_DISPENSER_A1_8
+#define MOTO_DISPENSER_A1_8_TX_00 (*((volatile short *)(FPGA2_BASE | (0x1C8 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DISPENSER_A1_8_TX_01 (*((volatile short *)(FPGA2_BASE | (0x1C9 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_DISPENSER_A1_8_RX_00 (*((volatile short *)(FPGA2_BASE | (0x1CA * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_DISPENSER_A1_8_RX_01 (*((volatile short *)(FPGA2_BASE | (0x1CB * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//Prescaler
+#define F2_Prescaler1_reg1 (*((volatile short *)(FPGA2_BASE | (0x1f0 * WordOrByte)))) //Parameter for prescaler divisions
+#define F2_Prescaler1_reg2 (*((volatile short *)(FPGA2_BASE | (0x1f1 * WordOrByte)))) //Parameter for prescaler divisions
+#define F2_Prescaler1_reg3 (*((volatile short *)(FPGA2_BASE | (0x1f2 * WordOrByte)))) //Parameter for prescaler divisions
+#define F2_Prescaler1_reg4 (*((volatile short *)(FPGA2_BASE | (0x1f3 * WordOrByte)))) //Parameter for prescaler divisions
+//Test
+#define FPGA2_Test (*((volatile short *)(FPGA2_BASE | (0x1f8 * WordOrByte)))) //Readback not - gives the inverse of the written to value
+
+// * * * * * * * * * * * * * * * * FPGA 3 * * * * * * * * * * * * * * * * //
+
+//Version1
+#define FPGA3_Ver1_D (*((volatile short *)(FPGA3_BASE | (0x0 * WordOrByte)))) //Version of Fpga is held here
+#define FPGA3_Ver1_L (*((volatile short *)(FPGA3_BASE | (0x1 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define FPGA3_Ver1_M (*((volatile short *)(FPGA3_BASE | (0x2 * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+
+//Version2
+#define FPGA3_Ver2_D (*((volatile short *)(FPGA3_BASE | (0x8 * WordOrByte)))) //Version of Fpga is held here
+#define FPGA3_Ver2_L (*((volatile short *)(FPGA3_BASE | (0x9 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define FPGA3_Ver2_M (*((volatile short *)(FPGA3_BASE | (0xa * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+
+//GPI 01
+#define GPI_01_D (*((volatile short *)(FPGA3_BASE | (0x10 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define GPI_01_L (*((volatile short *)(FPGA3_BASE | (0x11 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define GPI_01_M (*((volatile short *)(FPGA3_BASE | (0x12 * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+
+//MIDTANK 01
+#define MIDTANK_01_Direct (*((volatile short *)(FPGA3_BASE | (0x018 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define MIDTANK_01_Latched (*((volatile short *)(FPGA3_BASE | (0x019 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define MIDTANK_01_Mask (*((volatile short *)(FPGA3_BASE | (0x01a * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+//MIDTANK 02
+#define MIDTANK_02_Direct (*((volatile short *)(FPGA3_BASE | (0x020 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define MIDTANK_02_Latched (*((volatile short *)(FPGA3_BASE | (0x021 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define MIDTANK_02_Mask (*((volatile short *)(FPGA3_BASE | (0x022 * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+//DISPENSER_ROTENC_IN
+#define DISPENSER_ROTENC_IN_Direct (*((volatile short *)(FPGA3_BASE | (0x028 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define DISPENSER_ROTENC_IN_Latched (*((volatile short *)(FPGA3_BASE | (0x029 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define DISPENSER_ROTENC_IN_Mask (*((volatile short *)(FPGA3_BASE | (0x02A * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+//Moto_Driver_NBUSY_register1
+#define Moto_Driver_NBUSY1_Direct (*((volatile short *)(FPGA3_BASE | (0x030 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define Moto_Driver_NBUSY1_Latched (*((volatile short *)(FPGA3_BASE | (0x031 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define Moto_Driver_NBUSY1_Mask (*((volatile short *)(FPGA3_BASE | (0x032 * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+//CARTx_PRES
+#define CARTx_PRES_02_Direct (*((volatile short *)(FPGA3_BASE | (0x038 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define CARTx_PRES_02_Latched (*((volatile short *)(FPGA3_BASE | (0x039 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define CARTx_PRES_02_Mask (*((volatile short *)(FPGA3_BASE | (0x03A * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+//LS_01
+#define LS_01_Direct (*((volatile short *)(FPGA3_BASE | (0x040 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define LS_01_Latched (*((volatile short *)(FPGA3_BASE | (0x041 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define LS_01_Mask (*((volatile short *)(FPGA3_BASE | (0x042 * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+//Spi_Busy_01
+#define busy_01_Direct (*((volatile short *)(FPGA3_BASE | (0x050 * WordOrByte)))) //Reads the direct values that are currently being sent to the fpga.
+#define busy_01_Latched (*((volatile short *)(FPGA3_BASE | (0x051 * WordOrByte)))) //Value of the latched shorterrupts that have occurred
+#define busy_01_Mask (*((volatile short *)(FPGA3_BASE | (0x052 * WordOrByte)))) //Value of the shorterrupt mask, Default is 0x0000
+//Moto_Driver_NSTBYRST_register1
+#define F3_Moto_Driver_NSTBYRST1 (*((volatile short *)(FPGA3_BASE | (0x059 * WordOrByte)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
+//GPO_01
+#define /*F3_DISPENSER_VALVE_OUT*/GPO_01 (*((volatile short *)(FPGA3_BASE | (0x061 * WordOrByte)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
+//Moto_Driver_SW_register1
+#define F3_Moto_Driver_SW1 (*((volatile short *)(FPGA3_BASE | (0x069 * WordOrByte)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
+//VALVE_OUT
+#define VALVE_OUT (*((volatile short *)(FPGA3_BASE | (0x071 * WordOrByte)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
+//DISPENSER_ROTENC_OUT
+#define DISPENSER_ROTENC_OUT (*((volatile short *)(FPGA3_BASE | (0x079 * WordOrByte)))) //Writes to values. Readback thevaluessthat are currently in the GPO register
+//QEI_SCREW_ROTENC
+#define SPARE1_ROTENC_lsb (*((volatile short *)(FPGA3_BASE | (0x080 * WordOrByte)))) //Value of the lsb of the QEI register
+#define SPARE1_ROTENC_msb (*((volatile short *)(FPGA3_BASE | (0x081 * WordOrByte)))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
+#define SPARE1_ROTENC_index (*((volatile short *)(FPGA3_BASE | (0x082 * WordOrByte)))) //value of index counter
+//QEI_RSPARE_ROTENC
+#define RSPARE_ROTENC_lsb (*((volatile short *)(FPGA3_BASE | (0x088 * WordOrByte)))) //Value of the lsb of the QEI register
+#define RSPARE_ROTENC_msb (*((volatile short *)(FPGA3_BASE | (0x089 * WordOrByte)))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
+#define RSPARE_ROTENC_index (*((volatile short *)(FPGA3_BASE | (0x08a * WordOrByte)))) //value of index counter
+//SPI_MOTO_RLOADING_A1
+#define MOTO_SPARE1_1_A1_TX_00 (*((volatile short *)(FPGA3_BASE | (0x100 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_SPARE1_1_A1_TX_01 (*((volatile short *)(FPGA3_BASE | (0x101 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_SPARE1_1_A1_RX_00 (*((volatile short *)(FPGA3_BASE | (0x102 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_SPARE1_1_A1_RX_01 (*((volatile short *)(FPGA3_BASE | (0x103 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//SPI_MOTO_RDRIVING_A1
+#define MOTO_SPARE1_2_A1_TX_00 (*((volatile short *)(FPGA3_BASE | (0x108 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_SPARE1_2_A1_TX_01 (*((volatile short *)(FPGA3_BASE | (0x109 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_SPARE1_2_A1_RX_00 (*((volatile short *)(FPGA3_BASE | (0x10A * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_SPARE1_2_A1_RX_01 (*((volatile short *)(FPGA3_BASE | (0x10B * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//SPI_F1_MOTO_LDRIVING_A1
+#define MOTO_SPARE2_1_A1_TX_00 (*((volatile short *)(FPGA3_BASE | (0x110 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_SPARE2_1_A1_TX_01 (*((volatile short *)(FPGA3_BASE | (0x111 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_SPARE2_1_A1_RX_00 (*((volatile short *)(FPGA3_BASE | (0x112 * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_SPARE2_1_A1_RX_01 (*((volatile short *)(FPGA3_BASE | (0x113 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//SPI_F1_MOTO_LLOADING_A1
+#define MOTO_SPARE2_2_A1_TX_00 (*((volatile short *)(FPGA3_BASE | (0x118 * WordOrByte)))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_SPARE2_2_A1_TX_01 (*((volatile short *)(FPGA3_BASE | (0x119 * WordOrByte)))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+#define MOTO_SPARE2_2_A1_RX_00 (*((volatile short *)(FPGA3_BASE | (0x11A * WordOrByte)))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+#define MOTO_SPARE2_2_A1_RX_01 (*((volatile short *)(FPGA3_BASE | (0x11B * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//SSI
+#define SPARE1_ROTENC_DATA_p_1_RX_msb (*((volatile short *)(FPGA3_BASE | (0x160 * WordOrByte)))) //16 bit MSB if nessesary
+#define SPARE1_ROTENC_DATA_p_1_RX_lsb (*((volatile short *)(FPGA3_BASE | (0x161 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+#define SPARE2_ROTENC_DATA_p_2_RX_msb (*((volatile short *)(FPGA3_BASE | (0x168 * WordOrByte)))) //16 bit MSB if nessesary
+#define SPARE2_ROTENC_DATA_p_2_RX_lsb (*((volatile short *)(FPGA3_BASE | (0x169 * WordOrByte)))) //The 16 Lsb bits of the shifted in data.
+//Prescaler
+#define F3_Prescaler1_reg1 (*((volatile short *)(FPGA3_BASE | (0x1f0 * WordOrByte)))) //Parameter for prescaler divisions
+#define F3_Prescaler1_reg2 (*((volatile short *)(FPGA3_BASE | (0x1f1 * WordOrByte)))) //Parameter for prescaler divisions
+#define F3_Prescaler1_reg3 (*((volatile short *)(FPGA3_BASE | (0x1f2 * WordOrByte)))) //Parameter for prescaler divisions
+#define F3_Prescaler1_reg4 (*((volatile short *)(FPGA3_BASE | (0x1f3 * WordOrByte)))) //Parameter for prescaler divisions
+//Test
+#define FPGA3_Test (*((volatile short *)(FPGA3_BASE | (0x1f8 * WordOrByte)))) //Readback not - gives the inverse of the written to value
+
+//1 Version1_Direct
+typedef union
+{
+ struct
+ {
+ unsigned char Month; //0-7
+ unsigned char Day; //8-15
+ }bytes;
+ unsigned short ushort;
+}VER1;
+
+//4 Version2_Direct
+typedef union
+{
+ struct
+ {
+ unsigned char Ver_num; //0-7
+ unsigned char Year; //8-15
+ }bytes;
+ unsigned short ushort;
+}VER2;
+
+//16 Moto_Driver_NBUSY_register1
+typedef union
+{
+ struct
+ {
+ bool F1_MOTO_LPIVOT1_A1_NBUSY : 1; //0
+ bool F1_MOTO_LLOADING_A1_NBUSY : 1; //1
+ bool F1_MOTO_LDRIVING_A1_NBUSY : 1; //2
+ bool F1_MOTO_LDANCER2_A1_NBUSY : 1; //3
+ bool F1_MOTO_LDANCER1_A1_NBUSY : 1; //4
+ bool F1_MOTO_DRYER_LOADARM_A1_NBUSY : 1; //5
+ bool F1_MOTO_DRYER_LID_A1_NBUSY : 1; //6
+ bool F1_MOTO_DRYER_DRIVING_A1_NBUSY : 1; //7
+ bool F1_MOTO_DH_LID_A1_NBUSY : 1; //8
+ bool F1_MOTO_DH_CLEANMECH_A1_NBUSY : 1; //9
+ bool F1_MOTO_DH_CLEANHEAD_A1_NBUSY : 1; //10
+ unsigned char RESERVE:5; //11-15
+ }bits;
+ unsigned short ushort;
+}Mot_NBUSY1;
+
+//19 Moto_Driver_NBUSY_register2
+typedef union
+{
+ struct
+ {
+ bool F1_MOTO_WINDER_A1_NBUSY : 1; //0
+ bool F1_MOTO_SCREW_A1_NBUSY : 1; //1
+ bool F1_MOTO_RLOADING_A1_NBUSY : 1; //2
+ bool F1_MOTO_RLOADARM_A1_NBUSY : 1; //3
+ bool F1_MOTO_RDRIVING_A1_NBUSY : 1; //4
+ bool F1_MOTO_RDANCER_A1_NBUSY : 1; //5
+ unsigned char RESERVE1 : 2; // 6-7
+ unsigned char RESERVE2; // 8-15
+ }bits;
+ unsigned short ushort;
+}Mot_NBUSY2;
+
+
+//29 + 32 SPI_Busy_register1 + SPI_Busy_register2
+typedef union
+{
+ struct
+ {
+ unsigned char SPI_Busy_1_D;
+ unsigned char SPI_Busy_2_D;
+ }ushort;
+ unsigned int uint;
+}SPI_BUSY;
+
+//35 Moto_Driver_NSTBYRST1
+typedef union
+{
+ struct
+ {
+ bool LPIVOT1 : 1; //0
+ bool LLOADING : 1; //1
+ bool LDRIVING : 1; //2
+ bool LDANCER2 : 1; //3
+ bool LDANCER1 : 1; //4
+ bool DRYER_LOADARM : 1; //5
+ bool DRYER_LID : 1; //6
+ bool DRYER_DRIVING : 1; //7
+ bool DH_LID : 1; //8
+ bool DH_CLEANMECH : 1; //9
+ bool DH_CLEANHEAD : 1; //10
+ unsigned char RESERVE:5; //11-15
+ }bits;
+ unsigned short ushort;
+}MOT_NSTBYRST1;
+
+
+
+//36 Moto_Driver_NSTBYRST2
+typedef union
+{
+ struct
+ {
+ bool WINDER : 1; //0
+ bool SCREW : 1; //1
+ bool RLOADING : 1; //2
+ bool RLOADARM : 1; //3
+ bool RDRIVING : 1; //4
+ bool RDANCER : 1; //5
+ unsigned char RESERVE1:2; // 6-7
+ unsigned char RESERVE2; // 8-15
+ }bits;
+ unsigned short ushort;
+}MOT_NSTBYRST2;
+
+//37 Moto_Driver_SW_register1 - Moto_Driver_SW1
+typedef union
+{
+ struct
+ {
+ bool LPIVOT1 : 1; //0
+ bool LLOADING : 1; //1
+ bool LDRIVING : 1; //2
+ bool LDANCER2 : 1; //3
+ bool LDANCER1 : 1; //4
+ bool DRYER_LOADARM : 1; //5
+ bool DRYER_LID : 1; //6
+ bool DRYER_DRIVING; //7
+ bool DH_LID : 1; //8
+ bool DH_CLEANMECH : 1; //9
+ bool DH_CLEANHEAD : 1; //10
+ bool GPO_TFEED_BREAK_1 : 1; //11
+ bool GPO_TFEED_BREAK_2 : 1; //12
+ unsigned char RESERVE:3; // 13-15
+ }bits;
+ unsigned short ushort;
+}MOT_SW1;
+
+//38 Moto_Driver_SW_register2 - Moto_Driver_SW2
+typedef union
+{
+ struct
+ {
+ bool F1_MOTO_WINDER_A1_SW : 1; //0
+ bool F1_MOTO_SCREW_A1_SW : 1; //1
+ bool F1_MOTO_RLOADING_A1_SW : 1; //2
+ bool F1_MOTO_RLOADARM_A1_SW : 1; //3
+ bool F1_MOTO_RDRIVING_A1_SW : 1; //4
+ bool F1_MOTO_RDANCER_A1_SW : 1; //5
+ unsigned char RESERVE1:2; // 6-7
+ unsigned char RESERVE2; // 8-15
+ }bits;
+ unsigned short ushort;
+}MOT_SW2;
+
+
+
+//308 GPO_01
+typedef union
+{
+ struct
+ {
+ bool F3_GPO_LED4 : 1; //0
+ bool F3_GPO_LED3 : 1; //1
+ bool F3_GPO_LED2 : 1; //2
+ bool F3_GPO_LED1 : 1; //3
+ bool F3_GPO_EXTWINDER_SSR11_CTRL : 1; //4
+ bool F3_GPO_BUZZER : 1; //4
+ bool F3_SPARE2_ROTENC_CLK : 1; //6
+ bool F3_SPARE1_ROTENC_CLK : 1; //7
+ unsigned char RESERVE; // 8-15
+ }bits;
+ unsigned short ushort;
+}GP_Out_01;
+
+
+
+//------------------------------ MOTOR DRIVER L_6470 ------------------------------
+
+typedef union
+{
+ struct
+ {
+ unsigned short LSB;
+ unsigned short MSB;
+ }ushort;
+ unsigned int uint;
+}INT2SHORT;//16->32
+
+enum
+{
+ RLOADING,
+ RDRIVING,
+ F1_LDRIVING,
+ F1_LLOADING,
+ F1_DRYER_LOADARM,
+ F1_DRYER_DRIVING,
+ F1_DH_CLEANHEAD,
+ F1_DH_CLEANMECH,
+ F1_SCREW,
+ F1_WINDER,
+ RLOADARM,
+ RDANCER,
+ LDANCER1,
+ LDANCER2,
+ DRYER_LID,
+ DH_LID,
+ LPIVOT1,
+}SPI_TYPE;
+
+//SPI
+typedef struct //S_SPI
+{
+ unsigned char Type;
+ unsigned int TX_MOSI; //32bit (Master Output Slave Input )
+ unsigned int RX_MISO; //24bit (Master Input Slave Output)
+ //unsigned int BUSY; //32bit
+
+}SPI;//SPI
+
+/*
+#define L6470_MOSI (*((volatile short *)(BASE | 0x0100)))
+#define L6470_MISO (*((volatile short *)(BASE | 0x0200)))
+#define L6470_CS (*((volatile short *)(BASE | 0x0300)))
+#define L6470_CLK (*((volatile short *)(BASE | 0x0400)))
+#define L6470_BUSY (*((volatile short *)(BASE | 0x0500)))
+#define L6470_RESET (*((volatile short *)(BASE | 0x0600)))
+#define L6470_TX (*((volatile char *)(BASE | 0x0700)))
+#define L6470_RX (*((volatile char *)(BASE | 0x0800)))
+*/
+
+//L6470_MOSI = 0x00;
diff --git a/Software/Code_Composer/twine_usblib_demo/drivers/FPGA/FPGA_SPI_Comm.c b/Software/Code_Composer/twine_usblib_demo/drivers/FPGA/FPGA_SPI_Comm.c
new file mode 100644
index 000000000..11e9231c7
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/drivers/FPGA/FPGA_SPI_Comm.c
@@ -0,0 +1,281 @@
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <drivers/FPGA/FPGA_Comm.h>
+#include "Stubs_Handler/DataDef.h"
+
+uint8_t SPI_Transnit(SPI Spi)
+{
+
+ INT2SHORT Int2Short;
+
+ //Check Busy register and see if the SPI desired is available
+ while((SPI_Busy1_D != NOTBUSY ) || (SPI_Busy2_D != NOTBUSY ));
+
+ Int2Short.uint = Spi.TX_MOSI;
+
+ switch(Spi.Type)
+ {
+ case RLOADING:
+ MOTO_RLOADING_A1_TX_01 = Int2Short.ushort.MSB;
+ //Read the TX_01 register and make sure that the value was written properly.
+ while( Int2Short.ushort.MSB != MOTO_RLOADING_A1_TX_01);
+
+ //Send a write to TX_00
+ MOTO_RLOADING_A1_TX_00 = Int2Short.ushort.LSB;
+ //Read the TX_00 register and make sure that the value was written properly.
+ while( Int2Short.ushort.LSB != MOTO_RLOADING_A1_TX_00);
+ break;
+ case RDRIVING:
+ MOTO_RDRIVING_A1_TX_01 = Int2Short.ushort.MSB;
+ //Read the TX_01 register and make sure that the value was written properly.
+ while( Int2Short.ushort.MSB != MOTO_RDRIVING_A1_TX_01);
+
+ //Send a write to TX_00
+ MOTO_RDRIVING_A1_TX_00 = Int2Short.ushort.LSB;
+ //Read the TX_00 register and make sure that the value was written properly.
+ while( Int2Short.ushort.LSB != MOTO_RDRIVING_A1_TX_00);
+ break;
+ case F1_LDRIVING:
+ MOTO_LDRIVING_A1_TX_01 = Int2Short.ushort.MSB;
+ //Read the TX_01 register and make sure that the value was written properly.
+ while( Int2Short.ushort.MSB != MOTO_LDRIVING_A1_TX_01);
+
+ //Send a write to TX_00
+ MOTO_LDRIVING_A1_TX_00 = Int2Short.ushort.LSB;
+ //Read the TX_00 register and make sure that the value was written properly.
+ while( Int2Short.ushort.LSB != MOTO_LDRIVING_A1_TX_00);
+ break;
+ case F1_LLOADING:
+ MOTO_LLOADING_A1_TX_01 = Int2Short.ushort.MSB;
+ //Read the TX_01 register and make sure that the value was written properly.
+ while( Int2Short.ushort.MSB != MOTO_LLOADING_A1_TX_01);
+
+ //Send a write to TX_00
+ MOTO_LLOADING_A1_TX_00 = Int2Short.ushort.LSB;
+ //Read the TX_00 register and make sure that the value was written properly.
+ while( Int2Short.ushort.LSB != MOTO_LLOADING_A1_TX_00);
+ break;
+ case F1_DRYER_LOADARM:
+ MOTO_DRYER_LOADARM_A1_TX_01 = Int2Short.ushort.MSB;
+ //Read the TX_01 register and make sure that the value was written properly.
+ while( Int2Short.ushort.MSB != MOTO_DRYER_LOADARM_A1_TX_01);
+
+ //Send a write to TX_00
+ MOTO_DRYER_LOADARM_A1_TX_00 = Int2Short.ushort.LSB;
+ //Read the TX_00 register and make sure that the value was written properly.
+ while( Int2Short.ushort.LSB != MOTO_DRYER_LOADARM_A1_TX_00);
+ break;
+ case F1_DRYER_DRIVING:
+ MOTO_DRYER_DRIVING_A1_TX_01 = Int2Short.ushort.MSB;
+ //Read the TX_01 register and make sure that the value was written properly.
+ while( Int2Short.ushort.MSB != MOTO_DRYER_DRIVING_A1_TX_01);
+
+ //Send a write to TX_00
+ MOTO_DRYER_DRIVING_A1_TX_00 = Int2Short.ushort.LSB;
+ //Read the TX_00 register and make sure that the value was written properly.
+ while( Int2Short.ushort.LSB != MOTO_DRYER_DRIVING_A1_TX_00);
+ break;
+ case F1_DH_CLEANHEAD:
+ MOTO_DH_CLEANHEAD_A1_TX_01 = Int2Short.ushort.MSB;
+ //Read the TX_01 register and make sure that the value was written properly.
+ while( Int2Short.ushort.MSB != MOTO_DH_CLEANHEAD_A1_TX_01);
+
+ //Send a write to TX_00
+ MOTO_DH_CLEANHEAD_A1_TX_00 = Int2Short.ushort.LSB;
+ //Read the TX_00 register and make sure that the value was written properly.
+ while( Int2Short.ushort.LSB != MOTO_DH_CLEANHEAD_A1_TX_00);
+ break;
+ case F1_DH_CLEANMECH:
+ MOTO_DH_CLEANMECH_A1_TX_01 = Int2Short.ushort.MSB;
+ //Read the TX_01 register and make sure that the value was written properly.
+ while( Int2Short.ushort.MSB != MOTO_DH_CLEANMECH_A1_TX_01);
+
+ //Send a write to TX_00
+ MOTO_DH_CLEANMECH_A1_TX_00 = Int2Short.ushort.LSB;
+ //Read the TX_00 register and make sure that the value was written properly.
+ while( Int2Short.ushort.LSB != MOTO_DH_CLEANMECH_A1_TX_00);
+ break;
+ case F1_SCREW:
+ MOTO_SCREW_A1_TX_01 = Int2Short.ushort.MSB;
+ //Read the TX_01 register and make sure that the value was written properly.
+ while( Int2Short.ushort.MSB != MOTO_SCREW_A1_TX_01);
+
+ //Send a write to TX_00
+ MOTO_SCREW_A1_TX_00 = Int2Short.ushort.LSB;
+ //Read the TX_00 register and make sure that the value was written properly.
+ while( Int2Short.ushort.LSB != MOTO_SCREW_A1_TX_00);
+ break;
+ case F1_WINDER:
+ MOTO_WINDER_A1_TX_01 = Int2Short.ushort.MSB;
+ //Read the TX_01 register and make sure that the value was written properly.
+ while( Int2Short.ushort.MSB != MOTO_WINDER_A1_TX_01);
+
+ //Send a write to TX_00
+ MOTO_WINDER_A1_TX_00 = Int2Short.ushort.LSB;
+ //Read the TX_00 register and make sure that the value was written properly.
+ while( Int2Short.ushort.LSB != MOTO_WINDER_A1_TX_00);
+ break;
+ case RLOADARM:
+ MOTO_RLOADARM_A1_TX_01 = Int2Short.ushort.MSB;
+ //Read the TX_01 register and make sure that the value was written properly.
+ while( Int2Short.ushort.MSB != MOTO_RLOADARM_A1_TX_01);
+
+ //Send a write to TX_00
+ MOTO_RLOADARM_A1_TX_00 = Int2Short.ushort.LSB;
+ //Read the TX_00 register and make sure that the value was written properly.
+ while( Int2Short.ushort.LSB != MOTO_RLOADARM_A1_TX_00);
+ break;
+ case RDANCER:
+ MOTO_RDANCER_A1_TX_01 = Int2Short.ushort.MSB;
+ //Read the TX_01 register and make sure that the value was written properly.
+ while( Int2Short.ushort.MSB != MOTO_RDANCER_A1_TX_01);
+
+ //Send a write to TX_00
+ MOTO_RDANCER_A1_TX_00 = Int2Short.ushort.LSB;
+ //Read the TX_00 register and make sure that the value was written properly.
+ while( Int2Short.ushort.LSB != MOTO_RDANCER_A1_TX_00);
+ break;
+ case LDANCER1:
+ MOTO_LDANCER1_A1_TX_01 = Int2Short.ushort.MSB;
+ //Read the TX_01 register and make sure that the value was written properly.
+ while( Int2Short.ushort.MSB != MOTO_LDANCER1_A1_TX_01);
+
+ //Send a write to TX_00
+ MOTO_LDANCER1_A1_TX_00 = Int2Short.ushort.LSB;
+ //Read the TX_00 register and make sure that the value was written properly.
+ while( Int2Short.ushort.LSB != MOTO_LDANCER1_A1_TX_00);
+ break;
+ case LDANCER2:
+ MOTO_LDANCER2_A1_TX_01 = Int2Short.ushort.MSB;
+ //Read the TX_01 register and make sure that the value was written properly.
+ while( Int2Short.ushort.MSB != MOTO_LDANCER2_A1_TX_01);
+
+ //Send a write to TX_00
+ MOTO_LDANCER2_A1_TX_00 = Int2Short.ushort.LSB;
+ //Read the TX_00 register and make sure that the value was written properly.
+ while( Int2Short.ushort.LSB != MOTO_LDANCER2_A1_TX_00);
+ break;
+ case DRYER_LID:
+ MOTO_DRYER_LID_A1_TX_01 = Int2Short.ushort.MSB;
+ //Read the TX_01 register and make sure that the value was written properly.
+ while( Int2Short.ushort.MSB != MOTO_DRYER_LID_A1_TX_01);
+
+ //Send a write to TX_00
+ MOTO_DRYER_LID_A1_TX_00 = Int2Short.ushort.LSB;
+ //Read the TX_00 register and make sure that the value was written properly.
+ while( Int2Short.ushort.LSB != MOTO_DRYER_LID_A1_TX_00);
+ break;
+ case DH_LID:
+ MOTO_DH_LID_A1_TX_01 = Int2Short.ushort.MSB;
+ //Read the TX_01 register and make sure that the value was written properly.
+ while( Int2Short.ushort.MSB != MOTO_DH_LID_A1_TX_01);
+
+ //Send a write to TX_00
+ MOTO_DH_LID_A1_TX_00 = Int2Short.ushort.LSB;
+ //Read the TX_00 register and make sure that the value was written properly.
+ while( Int2Short.ushort.LSB != MOTO_DH_LID_A1_TX_00);
+ break;
+ case LPIVOT1:
+ MOTO_LPIVOT1_A1_TX_01 = Int2Short.ushort.MSB;
+ //Read the TX_01 register and make sure that the value was written properly.
+ while( Int2Short.ushort.MSB != MOTO_LPIVOT1_A1_TX_01);
+
+ //Send a write to TX_00
+ MOTO_LPIVOT1_A1_TX_00 = Int2Short.ushort.LSB;
+ //Read the TX_00 register and make sure that the value was written properly.
+ while( Int2Short.ushort.LSB != MOTO_LPIVOT1_A1_TX_00);
+ break;
+ default:
+ break;
+ }
+
+ return 0;
+}
+
+uint8_t SPI_Receive (SPI Spi)
+{
+
+ INT2SHORT Int2Short;
+
+ //Check busy before trying to read RX registers.
+ while((SPI_Busy1_D != NOTBUSY ) || (SPI_Busy2_D != NOTBUSY ));
+
+ switch(Spi.Type)
+ {
+ case RLOADING:
+ Int2Short.ushort.LSB = MOTO_RLOADING_A1_RX_00;
+ Int2Short.ushort.MSB = MOTO_RLOADING_A1_RX_01;
+ break;
+ case RDRIVING:
+ Int2Short.ushort.LSB = MOTO_RDRIVING_A1_RX_00;
+ Int2Short.ushort.MSB = MOTO_RDRIVING_A1_RX_01;
+ break;
+ case F1_LDRIVING:
+ Int2Short.ushort.LSB = MOTO_LDRIVING_A1_RX_00;
+ Int2Short.ushort.MSB = MOTO_LDRIVING_A1_RX_01;
+ break;
+ case F1_LLOADING:
+ Int2Short.ushort.LSB = MOTO_LLOADING_A1_RX_00;
+ Int2Short.ushort.MSB = MOTO_LLOADING_A1_RX_01;
+ break;
+ case F1_DRYER_LOADARM:
+ Int2Short.ushort.LSB = MOTO_DRYER_LOADARM_A1_RX_00;
+ Int2Short.ushort.MSB = MOTO_DRYER_LOADARM_A1_RX_01;
+ break;
+ case F1_DRYER_DRIVING:
+ Int2Short.ushort.LSB = MOTO_DRYER_DRIVING_A1_RX_00;
+ Int2Short.ushort.MSB = MOTO_DRYER_DRIVING_A1_RX_01;
+ break;
+ case F1_DH_CLEANHEAD:
+ Int2Short.ushort.LSB = MOTO_DH_CLEANHEAD_A1_RX_00;
+ Int2Short.ushort.MSB = MOTO_DH_CLEANHEAD_A1_RX_01;
+ break;
+ case F1_DH_CLEANMECH:
+ Int2Short.ushort.LSB = MOTO_DH_CLEANMECH_A1_RX_00;
+ Int2Short.ushort.MSB = MOTO_DH_CLEANMECH_A1_RX_01;
+ break;
+ case F1_SCREW:
+ Int2Short.ushort.LSB = MOTO_SCREW_A1_RX_00;
+ Int2Short.ushort.MSB = MOTO_SCREW_A1_RX_01;
+ break;
+ case F1_WINDER:
+ Int2Short.ushort.LSB = MOTO_WINDER_A1_RX_00;
+ Int2Short.ushort.MSB = MOTO_WINDER_A1_RX_01;
+ break;
+ case RLOADARM:
+ Int2Short.ushort.LSB = MOTO_RLOADARM_A1_RX_00;
+ Int2Short.ushort.MSB = MOTO_RLOADARM_A1_RX_01;
+ break;
+ case RDANCER:
+ Int2Short.ushort.LSB = MOTO_RDANCER_A1_RX_00;
+ Int2Short.ushort.MSB = MOTO_RDANCER_A1_RX_01;
+ break;
+ case LDANCER1:
+ Int2Short.ushort.LSB = MOTO_LDANCER1_A1_RX_00;
+ Int2Short.ushort.MSB = MOTO_LDANCER1_A1_RX_01;
+ break;
+ case LDANCER2:
+ Int2Short.ushort.LSB = MOTO_LDANCER2_A1_RX_00;
+ Int2Short.ushort.MSB = MOTO_LDANCER2_A1_RX_01;
+ break;
+ case DRYER_LID:
+ Int2Short.ushort.LSB = MOTO_DRYER_LID_A1_RX_00;
+ Int2Short.ushort.MSB = MOTO_DRYER_LID_A1_RX_01;
+ break;
+ case DH_LID:
+ Int2Short.ushort.LSB = MOTO_DH_LID_A1_RX_00;
+ Int2Short.ushort.MSB = MOTO_DH_LID_A1_RX_01;
+ break;
+ case LPIVOT1:
+ Int2Short.ushort.LSB = MOTO_LPIVOT1_A1_RX_00;
+ Int2Short.ushort.MSB = MOTO_LPIVOT1_A1_RX_01;
+ break;
+ default:
+ break;
+ }
+
+ Spi.RX_MISO = Int2Short.uint;
+
+ return 0;
+}
diff --git a/Software/Code_Composer/twine_usblib_demo/drivers/FPGA/Moters_Driver/L6470.c b/Software/Code_Composer/twine_usblib_demo/drivers/FPGA/Moters_Driver/L6470.c
new file mode 100644
index 000000000..0a648ea31
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/drivers/FPGA/Moters_Driver/L6470.c
@@ -0,0 +1,706 @@
+/*
+* cL6470.cpp
+*
+* Created: 6/22/2016 8:41:00 PM
+* Author: Atif
+*/
+#include "graphics_adapter.h"
+#include <stdint.h>
+#include <stdbool.h>
+#include <drivers/FPGA/FPGA_Comm.h>
+#include "Stubs_Handler/DataDef.h"
+
+#include "drivers/SPI/SPI_Comm.h"
+#include "inc/hw_memmap.h"
+
+
+
+
+
+//////////////
+//#include "stdafx.h"
+#include "L6470.h"
+//#include "FPGA_Comm.h"
+// To use time library of C
+#include <time.h>
+
+//int volatile * const MOSI_Reg = (int *)MOSI_BASE;
+//int volatile * const MISO_Reg = (int *)MISO_BASE;
+//int volatile * const CS_Reg = (int *)CS_BASE;
+//int volatile * const CLK_Reg = (int *)CLK_BASE;
+//int volatile * const BUSY_Reg = (int *)BUSY_BASE;
+//int volatile * const RESET_Reg = (int *)RESET_BASE;
+//char volatile * const TX_Reg = (char *)TX_BASE;
+//char volatile * const RX_Reg = (char *)RX_BASE;
+
+
+
+
+//void cL6470(int MOSI, int MISO, int CS, int CLK, int BUSY, int RESET)
+//{
+// _Set_MISO(MISO);
+// _Set_MOSI(MOSI);
+// _Set_CS(CS);
+// _Set_CLK(CLK);
+// _Set_BUSY(BUSY);
+// _Set_RESET(RESET);
+//
+//}
+/*
+void delay(int number_of_seconds)
+{
+ // Converting time into milli_seconds
+ int milli_seconds = 1000 * number_of_seconds;
+
+ // Stroing start time
+ clock_t start_time = clock();
+
+ // looping till required time is not acheived
+ while (clock() < start_time + milli_seconds);
+}
+*/
+
+/*
+void init()
+{
+ //pinMode(_CS, OUTPUT);
+ //digitalWrite(_CS, HIGH);
+ L6470_CS = HIGH;
+ //pinMode(_MOSI, OUTPUT);
+ //pinMode(_MISO, INPUT);
+ //pinMode(_CLK, OUTPUT);
+ //pinMode(_BUSY, INPUT);
+ //pinMode(_RESET, OUTPUT);
+
+ //digitalWrite(_RESET, HIGH);
+ L6470_RESET = HIGH;
+ //AVI : TODO add deley
+ delay(1);
+ //digitalWrite(_RESET, LOW);
+ L6470_RESET = LOW;
+ delay(1);
+ //digitalWrite(_RESET, HIGH);
+ L6470_RESET = HIGH;
+ delay(1);
+
+ //SPI.begin();
+ //SPI.setBitOrder(MSBFIRST);
+ //SPI.setClockDivider(SPI_CLOCK_DIV16); // or 2, 8, 16, 32, 64
+ //SPI.setDataMode(SPI_MODE3);
+}
+*/
+
+void SetParam(byte param, unsigned long value)
+{
+ Data_To_Transfer(x_SET_PARAM | param);
+ ParamHandler(param, value);
+}
+
+
+unsigned long GetParam(byte param)
+{
+ Data_To_Transfer(x_GET_PARAM | param);
+ return ParamHandler(param, 0);
+}
+
+// Enable or disable the low-speed optimization option. If enabling,
+// the other 12 bits of
+void SetLSPDOpt(boolean enable)
+{
+ Data_To_Transfer(x_SET_PARAM | x_MIN_SPEED);
+
+ if (enable)
+ Param(0x1000, 13);
+ else
+ Param(0, 13);
+}
+
+// RUN sets the motor spinning in a direction (defined by the constants
+// FWD and REV). Maximum speed and minimum speed are defined
+// by the MAX_SPEED and MIN_SPEED registers; exceeding the FS_SPD value
+// will switch the device into full-step mode.
+// The SpdCalc() function is provided to convert steps/s values into
+// appropriate integer values for this function.
+void Run(byte dir, unsigned long spd)
+{
+ Data_To_Transfer(x_RUN | dir);
+ if (spd > 0xFFFFF) spd = 0xFFFFF;
+ Data_To_Transfer((byte)((spd >> 16)&0xFF));
+ Data_To_Transfer((byte)((spd >> 8)&0xFF));
+ Data_To_Transfer((byte)((spd)&0xFF));
+}
+byte Write_Byte(uint8_t WByte);
+void Run_tx_test(byte dir, unsigned long spd)
+{
+ uint32_t temp = 0;
+ uint32_t rx = 0;
+
+ temp = Write_Byte(x_RUN | dir);
+ rx |= (temp & 0xFF) << 24;
+
+ temp = Write_Byte((spd >> 16)&0xFF);
+ rx |= (temp & 0xFF) << 16;
+
+ temp = Write_Byte((spd >> 8)&0xFF);
+ rx |= (temp & 0xFF) << 8;
+
+ temp = Write_Byte((spd)&0xFF);
+ rx |= temp & 0xFF;
+
+ //return rx;
+}
+
+// STEP_CLOCK puts the device in external step clocking mode. When active,
+// pin 25, STCK, becomes the step clock for the device, and steps it in
+// the direction (set by the FWD and REV constants) imposed by the call
+// of this function. Motion commands (RUN, MOVE, etc) will cause the device
+// to exit step clocking mode.
+void Step_Clock(byte dir)
+{
+ Data_To_Transfer(x_STEP_CLOCK | dir);
+}
+
+// MOVE will send the motor n_step steps (size based on step mode) in the
+// direction imposed by dir (FWD or REV constants may be used). The motor
+// will accelerate according the acceleration and deceleration curves, and
+// will run at MAX_SPEED. Stepping mode will adhere to FS_SPD value, as well.
+void Move(byte dir, unsigned long n_step)
+{
+ Data_To_Transfer(x_MOVE | dir);
+ if (n_step > 0x3FFFFF) n_step = 0x3FFFFF;
+ Data_To_Transfer((byte)(n_step >> 16));
+ Data_To_Transfer((byte)(n_step >> 8));
+ Data_To_Transfer((byte)(n_step));
+}
+
+// GOTO operates much like MOVE, except it produces absolute motion instead
+// of relative motion. The motor will be moved to the indicated position
+// in the shortest possible fashion.
+void GoTo(unsigned long pos)
+{
+
+ Data_To_Transfer(x_GOTO);
+ if (pos > 0x3FFFFF) pos = 0x3FFFFF;
+ Data_To_Transfer((byte)(pos >> 16));
+ Data_To_Transfer((byte)(pos >> 8));
+ Data_To_Transfer((byte)(pos));
+}
+
+// Same as GOTO, but with user constrained rotational direction.
+void GoTo_DIR(byte dir, unsigned long pos)
+{
+
+ Data_To_Transfer(x_GOTO_DIR);
+ if (pos > 0x3FFFFF) pos = 0x3FFFFF;
+ Data_To_Transfer((byte)(pos >> 16));
+ Data_To_Transfer((byte)(pos >> 8));
+ Data_To_Transfer((byte)(pos));
+}
+
+// GoUntil will set the motor running with direction dir (REV or
+// FWD) until a falling edge is detected on the SW pin. Depending
+// on bit SW_MODE in CONFIG, either a hard stop or a soft stop is
+// performed at the falling edge, and depending on the value of
+// act (either RESET or COPY) the value in the ABS_POS register is
+// either RESET to 0 or COPY-ed into the MARK register.
+void GoUntil(byte act, byte dir, unsigned long spd)
+{
+ Data_To_Transfer(x_GO_UNTIL | act | dir);
+ if (spd > 0x3FFFFF) spd = 0x3FFFFF;
+ Data_To_Transfer((byte)(spd >> 16));
+ Data_To_Transfer((byte)(spd >> 8));
+ Data_To_Transfer((byte)(spd));
+}
+
+// Similar in nature to GoUntil, ReleaseSW produces motion at the
+// higher of two speeds: the value in MIN_SPEED or 5 steps/s.
+// The motor continues to run at this speed until a rising edge
+// is detected on the switch input, then a hard stop is performed
+// and the ABS_POS register is either COPY-ed into MARK or RESET to
+// 0, depending on whether RESET or COPY was passed to the function
+// for act.
+void ReleaseSW(byte act, byte dir)
+{
+ Data_To_Transfer(x_RELEASE_SW | act | dir);
+}
+
+// GoHome is equivalent to GoTo(0), but requires less time to send.
+// Note that no direction is provided; motion occurs through shortest
+// path. If a direction is required, use GoTo_DIR().
+void GoHome()
+{
+ Data_To_Transfer(x_GO_HOME);
+}
+
+// GoMark is equivalent to GoTo(MARK), but requires less time to send.
+// Note that no direction is provided; motion occurs through shortest
+// path. If a direction is required, use GoTo_DIR().
+void GoMark()
+{
+ Data_To_Transfer(x_GO_MARK);
+}
+
+// Sets the ABS_POS register to 0, effectively declaring the current
+// position to be "HOME".
+void ResetPos()
+{
+ byte value = x_RESET_POS;
+ Data_To_Transfer(value);
+}
+
+// Reset device to power up conditions. Equivalent to toggling the STBY
+// pin or cycling power.
+void ResetDev()
+{
+ byte value = x_RESET_DEVICE;
+ Data_To_Transfer(value);
+}
+
+// Bring the motor to a halt using the deceleration curve.
+void SoftStop()
+{
+ byte value = x_SOFT_STOP;
+ Data_To_Transfer(value);
+}
+
+// Stop the motor with infinite deceleration.
+void HardStop()
+{
+ byte value = x_HARD_STOP;
+ Data_To_Transfer(value);
+}
+
+// Decelerate the motor and put the bridges in Hi-Z state.
+void SoftHiZ()
+{
+ byte value = x_SOFT_HIZ;
+ Data_To_Transfer(value);
+}
+
+// Put the bridges in Hi-Z state immediately with no deceleration.
+void HardHiZ()
+{
+ byte value = x_HARD_HIZ;
+ Data_To_Transfer(value);
+}
+
+// Fetch and return the 16-bit value in the STATUS register. Resets
+// any warning flags and exits any error states. Using GetParam()
+// to read STATUS does not clear these values.
+int GetStatus()
+{
+ int temp = 0;
+ Data_To_Transfer(x_GET_STATUS);
+ temp = Data_To_Transfer(0) << 8;
+ temp |= Data_To_Transfer(0);
+ return temp;
+}
+
+
+
+
+unsigned long AccCalc(float stepsPerSecPerSec)
+{
+ float temp = (float)(stepsPerSecPerSec * 0.137438);
+ if ( ((unsigned long) ( (long)(temp) )) > 0x00000FFF )
+ return 0x00000FFF;
+ else return (unsigned long) (long)(temp);
+}
+
+// The calculation for DEC is the same as for ACC. Value is 0x08A on boot.
+// This is a 12-bit value, so we need to make sure the value is at or below 0xFFF.
+unsigned long DecCalc(float stepsPerSecPerSec)
+{
+ float temp = (float)(stepsPerSecPerSec * 0.137438);
+ if ((unsigned long) (long)(temp) > 0x00000FFF) return 0x00000FFF;
+ else return (unsigned long) (long)(temp);
+}
+
+// The value in the MAX_SPD register is [(steps/s)*(tick)]/(2^-18) where tick is
+// 250ns (datasheet value)- 0x041 on boot.
+// Multiply desired steps/s by .065536 to get an appropriate value for this register
+// This is a 10-bit value, so we need to make sure it remains at or below 0x3FF
+unsigned long MaxSpdCalc(float stepsPerSec)
+{
+ float temp = (float)(stepsPerSec * .065536);
+ if ((unsigned long) (long)(temp) > 0x000003FF) return 0x000003FF;
+ else return (unsigned long) (long)(temp);
+}
+
+// The value in the MIN_SPD register is [(steps/s)*(tick)]/(2^-24) where tick is
+// 250ns (datasheet value)- 0x000 on boot.
+// Multiply desired steps/s by 4.1943 to get an appropriate value for this register
+// This is a 12-bit value, so we need to make sure the value is at or below 0xFFF.
+unsigned long MinSpdCalc(float stepsPerSec)
+{
+ float temp = (float)(stepsPerSec * 4.1943);
+ if ((unsigned long) (long)(temp) > 0x00000FFF) return 0x00000FFF;
+ else return (unsigned long) (long)(temp);
+}
+
+// The value in the FS_SPD register is ([(steps/s)*(tick)]/(2^-18))-0.5 where tick is
+// 250ns (datasheet value)- 0x027 on boot.
+// Multiply desired steps/s by .065536 and subtract .5 to get an appropriate value for this register
+// This is a 10-bit value, so we need to make sure the value is at or below 0x3FF.
+unsigned long FSCalc(float stepsPerSec)
+{
+ float temp = (float)((stepsPerSec * .065536) - .5);
+ if ((unsigned long) (long)(temp) > 0x000003FF) return 0x000003FF;
+ else return (unsigned long) (long)(temp);
+}
+
+// The value in the INT_SPD register is [(steps/s)*(tick)]/(2^-24) where tick is
+// 250ns (datasheet value)- 0x408 on boot.
+// Multiply desired steps/s by 4.1943 to get an appropriate value for this register
+// This is a 14-bit value, so we need to make sure the value is at or below 0x3FFF.
+unsigned long IntSpdCalc(float stepsPerSec)
+{
+ float temp = (float)(stepsPerSec * 4.1943);
+ if ((unsigned long) (long)(temp) > 0x00003FFF) return 0x00003FFF;
+ else return (unsigned long) (long)(temp);
+}
+
+// When issuing RUN command, the 20-bit speed is [(steps/s)*(tick)]/(2^-28) where tick is
+// 250ns (datasheet value).
+// Multiply desired steps/s by 67.106 to get an appropriate value for this register
+// This is a 20-bit value, so we need to make sure the value is at or below 0xFFFFF.
+uint32_t SpdCalc(float stepsPerSec)// for run request
+{
+ /*float temp = (float)(stepsPerSec * 67.106);
+ if ((unsigned long) (long)(temp) > 0x000FFFFF) return 0x000FFFFF;
+ else return (unsigned long)temp;*/
+ uint32_t temp = 67106 * stepsPerSec;
+ uint32_t stepspertick = temp/1000 ;
+ if(stepspertick > 0xFFFFF)
+ stepspertick = 0xFFFFF;
+ return stepspertick;
+}
+float CurrentSpdCalc(uint32_t stepspertick)// for Speed response
+{
+ /*float temp = (float)(stepspertick);
+ float stepsPerSec = (float)(temp / 67.106);
+ if(stepsPerSec>15625) stepsPerSec = 15625;*/
+ uint32_t temp = stepspertick *1000;
+ float stepsPerSec = (float)(temp/67106);
+ if(stepsPerSec>15625) stepsPerSec = 15625;
+ return stepsPerSec;
+}
+
+
+
+// This simple function shifts a byte out over SPI and receives a byte over
+// SPI. Unusually for SPI devices, the x requires a toggling of the
+// CS (slaveSelect) pin after each byte sent. That makes this function
+// a bit more reasonable, because we can include more functionality in it.
+byte Data_To_Transfer(byte data)
+{
+
+ //while(SSIBusy(SSI2_BASE)){};
+ //while(Check_SPI_Busy() == BUSY){};
+
+ byte data_out = 0;
+ /*
+ //digitalWrite(_CS, LOW);
+ L6470_CS = LOW;
+ //data_out = SPI.transfer(data);
+ L6470_TX = data;
+ data_out = L6470_RX;
+
+ //digitalWrite(_CS, HIGH);
+ L6470_CS = HIGH;
+ return data_out;
+ */
+
+ data_out = Transfer_tx(data/*, &data_out*/ );
+ return data_out;
+}
+
+
+// the register will be automatically zero.
+// When disabling, the value will have to be explicitly written by
+// the user with a SetParam() call. See the datasheet for further
+// information about low-speed optimization.// Much of the functionality between "get parameter" and "set parameter" is
+// very similar, so we deal with that by putting all of it in one function
+// here to save memory space and simplify the program.
+unsigned long ParamHandler(byte param, unsigned long value)
+{
+ unsigned long ret_val = 0; // This is a temp for the value to return.
+ // This switch structure handles the appropriate action for each register.
+ // This is necessary since not all registers are of the same length, either
+ // bit-wise or byte-wise, so we want to make sure we mask out any spurious
+ // bits and do the right number of transfers. That is handled by the x_Param()
+ // function, in most cases, but for 1-byte or smaller transfers, we call
+ // Data_To_Transfer() directly.
+ switch (param)
+ {
+ // ABS_POS is the current absolute offset from home. It is a 22 bit number expressed
+ // in two's complement. At power up, this value is 0. It cannot be written when
+ // the motor is running, but at any other time, it can be updated to change the
+ // interpreted position of the motor.
+ case x_ABS_POS:
+ ret_val = Param(value, 22);
+ break;
+ // EL_POS is the current electrical position in the step generation cycle. It can
+ // be set when the motor is not in motion. Value is 0 on power up.
+ case x_EL_POS:
+ ret_val = Param(value, 9);
+ break;
+ // MARK is a second position other than 0 that the motor can be told to go to. As
+ // with ABS_POS, it is 22-bit two's complement. Value is 0 on power up.
+ case x_MARK:
+ ret_val = Param(value, 22);
+ break;
+ // SPEED contains information about the current speed. It is read-only. It does
+ // NOT provide direction information.
+ case x_SPEED:
+ ret_val = Param(0, 32);
+// writeLine("ParamHandler: ");
+// writeFloat(ret_val);
+ break;
+ // ACC and DEC set the acceleration and deceleration rates. Set ACC to 0xFFF
+ // to get infinite acceleration/decelaeration- there is no way to get infinite
+ // deceleration w/o infinite acceleration (except the HARD STOP command).
+ // Cannot be written while motor is running. Both default to 0x08A on power up.
+ // AccCalc() and DecCalc() functions exist to convert steps/s/s values into
+ // 12-bit values for these two registers.
+ case x_ACC:
+ ret_val = Param(value, 12);
+ break;
+ case x_DEC:
+ ret_val = Param(value, 12);
+ break;
+ // MAX_SPEED is just what it says- any command which attempts to set the speed
+ // of the motor above this value will simply cause the motor to turn at this
+ // speed. Value is 0x041 on power up.
+ // MaxSpdCalc() function exists to convert steps/s value into a 10-bit value
+ // for this register.
+ case x_MAX_SPEED:
+ ret_val = Param(value, 10);
+ break;
+ // MIN_SPEED controls two things- the activation of the low-speed optimization
+ // feature and the lowest speed the motor will be allowed to operate at. LSPD_OPT
+ // is the 13th bit, and when it is set, the minimum allowed speed is automatically
+ // set to zero. This value is 0 on startup.
+ // MinSpdCalc() function exists to convert steps/s value into a 12-bit value for this
+ // register. SetLSPDOpt() function exists to enable/disable the optimization feature.
+ case x_MIN_SPEED:
+ ret_val = Param(value, 12);
+ break;
+ // FS_SPD register contains a threshold value above which microstepping is disabled
+ // and the x operates in full-step mode. Defaults to 0x027 on power up.
+ // FSCalc() function exists to convert steps/s value into 10-bit integer for this
+ // register.
+ case x_FS_SPD:
+ ret_val = Param(value, 10);
+ break;
+ // KVAL is the maximum voltage of the PWM outputs. These 8-bit values are ratiometric
+ // representations: 255 for full output voltage, 128 for half, etc. Default is 0x29.
+ // The implications of different KVAL settings is too complex to dig into here, but
+ // it will usually work to max the value for RUN, ACC, and DEC. Maxing the value for
+ // HOLD may result in excessive power dissipation when the motor is not running.
+ case x_KVAL_HOLD:
+ ret_val = Data_To_Transfer((byte)value);
+ break;
+ case x_KVAL_RUN:
+ ret_val = Data_To_Transfer((byte)value);
+ break;
+ case x_KVAL_ACC:
+ ret_val = Data_To_Transfer((byte)value);
+ break;
+ case x_KVAL_DEC:
+ ret_val = Data_To_Transfer((byte)value);
+ break;
+ // INT_SPD, ST_SLP, FN_SLP_ACC and FN_SLP_DEC are all related to the back EMF
+ // compensation functionality. Please see the datasheet for details of this
+ // function- it is too complex to discuss here. Default values seem to work
+ // well enough.
+ case x_INT_SPD:
+ ret_val = Param(value, 14);
+ break;
+ case x_ST_SLP:
+ ret_val = Data_To_Transfer((byte)value);
+ break;
+ case x_FN_SLP_ACC:
+ ret_val = Data_To_Transfer((byte)value);
+ break;
+ case x_FN_SLP_DEC:
+ ret_val = Data_To_Transfer((byte)value);
+ break;
+ // K_THERM is motor winding thermal drift compensation. Please see the datasheet
+ // for full details on operation- the default value should be okay for most users.
+ case x_K_THERM:
+ ret_val = Data_To_Transfer((byte)value & 0x0F);
+ break;
+ // ADC_OUT is a read-only register containing the result of the ADC measurements.
+ // This is less useful than it sounds; see the datasheet for more information.
+ case x_ADC_OUT:
+ ret_val = Data_To_Transfer(0);
+ break;
+ // Set the overcurrent threshold. Ranges from 375mA to 6A in steps of 375mA.
+ // A set of defined constants is provided for the user's convenience. Default
+ // value is 3.375A- 0x08. This is a 4-bit value.
+ case x_OCD_TH:
+ ret_val = Data_To_Transfer((byte)value & 0x0F);
+ break;
+ // Stall current threshold. Defaults to 0x40, or 2.03A. Value is from 31.25mA to
+ // 4A in 31.25mA steps. This is a 7-bit value.
+ case x_STALL_TH:
+ ret_val = Data_To_Transfer((byte)value & 0x7F);
+ break;
+ // STEP_MODE controls the microstepping settings, as well as the generation of an
+ // output signal from the x. Bits 2:0 control the number of microsteps per
+ // step the part will generate. Bit 7 controls whether the BUSY/SYNC pin outputs
+ // a BUSY signal or a step synchronization signal. Bits 6:4 control the frequency
+ // of the output signal relative to the full-step frequency; see datasheet for
+ // that relationship as it is too complex to reproduce here.
+ // Most likely, only the microsteps per step value will be needed; there is a set
+ // of constants provided for ease of use of these values.
+ case x_STEP_MODE:
+ ret_val = Data_To_Transfer((byte)value);
+ break;
+ // ALARM_EN controls which alarms will cause the FLAG pin to fall. A set of constants
+ // is provided to make this easy to interpret. By default, ALL alarms will trigger the
+ // FLAG pin.
+ case x_ALARM_EN:
+ ret_val = Data_To_Transfer((byte)value);
+ break;
+ // CONFIG contains some assorted configuration bits and fields. A fairly comprehensive
+ // set of reasonably self-explanatory constants is provided, but users should refer
+ // to the datasheet before modifying the contents of this register to be certain they
+ // understand the implications of their modifications. Value on boot is 0x2E88; this
+ // can be a useful way to verify proper start up and operation of the x chip.
+ case x_CONFIG:
+ ret_val = Param(value, 16);
+ break;
+ // STATUS contains read-only information about the current condition of the chip. A
+ // comprehensive set of constants for masking and testing this register is provided, but
+ // users should refer to the datasheet to ensure that they fully understand each one of
+ // the bits in the register.
+ case x_STATUS: // STATUS is a read-only register
+ ret_val = Param(0, 16);
+ break;
+ default:
+ ret_val = Data_To_Transfer((byte)(value));
+ break;
+ }
+ return ret_val;
+}
+
+// Generalization of the subsections of the register read/write functionality.
+// We want the end user to just write the value without worrying about length,
+// so we pass a bit length parameter from the calling function.
+unsigned long Param(unsigned long value, byte bit_len)
+{
+ unsigned long ret_val = 0; // We'll return this to generalize this function
+ // for both read and write of registers.
+ byte byte_len = bit_len / 8; // How many BYTES do we have?
+ if (bit_len % 8 > 0) byte_len++; // Make sure not to lose any partial byte values.
+ // Let's make sure our value has no spurious bits set, and if the value was too
+ // high, max it out.
+ unsigned long mask = 0xffffffff >> (32 - bit_len);
+ if (value > mask)
+ value = mask;
+ // The following three if statements handle the various possible byte length
+ // transfers- it'll be no less than 1 but no more than 3 bytes of data.
+ // Data_To_Transfer() sends a byte out through SPI and returns a byte received
+ // over SPI- when calling it, we typecast a shifted version of the masked
+ // value, then we shift the received value back by the same amount and
+ // store it until return time.
+ if (byte_len == 3) {
+ ret_val |= Data_To_Transfer((byte)(value >> 16)) << 16;
+ //Serial.println(ret_val, HEX);
+ }
+ if (byte_len >= 2) {
+ ret_val |= Data_To_Transfer((byte)(value >> 8)) << 8;
+ //Serial.println(ret_val, HEX);
+ }
+ if (byte_len >= 1) {
+ //Serial.print("Value = ");
+ //Serial.println(value);
+ //Serial.print("ret_val = ");
+ //Serial.println(ret_val);
+
+ ret_val |= Data_To_Transfer((byte)value);
+
+ //Serial.print("ret_val = ");
+ //Serial.println(ret_val);
+
+ //Serial.println(ret_val, HEX);
+ }
+ // Return the received values. Mask off any unnecessary bits, just for
+ // the sake of thoroughness- we don't EXPECT to see anything outside
+ // the bit length range but better to be safe than sorry.
+ return (ret_val & mask);
+}
+
+// This simple function shifts a byte out over SPI and receives a byte over
+// SPI. Unusually for SPI devices, the x requires a toggling of the
+// CS (slaveSelect) pin after each byte sent. That makes this function
+// a bit more reasonable, because we can include more functionality in it.
+
+//
+//void Set_MOSI(int MOSI)
+//
+//{
+// _MOSI = MOSI;
+//}
+//
+//void Set_MISO(int MISO)
+//
+//{
+// _MISO = MISO;
+//}
+//
+//void Set_CS(int CS)
+//
+//{
+// _CS = CS;
+//}
+//
+//void Set_CLK(int CLK)
+//
+//{
+// _CLK = CLK;
+//}
+//
+//void Set_BUSY(int BUSY)
+//
+//{
+// _BUSY = BUSY;
+//}
+//
+//void Set_RESET(int RESET)
+//
+//{
+// _RESET = RESET;
+//}
+//
+//int Get_MOSI()
+//{
+// return MOSI;
+//}
+//
+//int Get_MISO()
+//{
+// return MISO;
+//}
+//
+//int Get_CS()
+//{
+// return CS;
+//}
+//int Get_CLK()
+//{
+// return CLK;
+//}
+//
+//int Get_BUSY()
+//{
+// return BUSY;
+//}
+//int Get_RESET()
+//{
+// return RESET;
+//}
+
+
diff --git a/Software/Code_Composer/twine_usblib_demo/drivers/FPGA/Moters_Driver/L6470.h b/Software/Code_Composer/twine_usblib_demo/drivers/FPGA/Moters_Driver/L6470.h
new file mode 100644
index 000000000..3f91c8e4b
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/drivers/FPGA/Moters_Driver/L6470.h
@@ -0,0 +1,338 @@
+/*
+* cL6470.h
+*
+* Created: 6/22/2016 8:40:34 PM
+* Author: Atif
+*/
+
+
+#ifndef CL6470_H_
+#define CL6470_H_
+
+//#include <Arduino.h>
+//#include <SPI.h>
+
+//
+
+//
+
+// constant definitions for overcurrent thresholds. Write these values to
+// register x_OCD_TH to set the level at which an overcurrent even occurs.
+#define x_OCD_TH_375mA 0x00
+#define x_OCD_TH_750mA 0x01
+#define x_OCD_TH_1125mA 0x02
+#define x_OCD_TH_1500mA 0x03
+#define x_OCD_TH_1875mA 0x04
+#define x_OCD_TH_2250mA 0x05
+#define x_OCD_TH_2625mA 0x06
+#define x_OCD_TH_3000mA 0x07
+#define x_OCD_TH_3375mA 0x08
+#define x_OCD_TH_3750mA 0x09
+#define x_OCD_TH_4125mA 0x0A
+#define x_OCD_TH_4500mA 0x0B
+#define x_OCD_TH_4875mA 0x0C
+#define x_OCD_TH_5250mA 0x0D
+#define x_OCD_TH_5625mA 0x0E
+#define x_OCD_TH_6000mA 0x0F
+
+// STEP_MODE option values.
+// First comes the "microsteps per step" options...
+#define x_STEP_MODE_STEP_SEL 0x07 // Mask for these bits only.
+#define x_STEP_SEL_1 0x00
+#define x_STEP_SEL_1_2 0x01
+#define x_STEP_SEL_1_4 0x02
+#define x_STEP_SEL_1_8 0x03
+#define x_STEP_SEL_1_16 0x04
+#define x_STEP_SEL_1_32 0x05
+#define x_STEP_SEL_1_64 0x06
+#define x_STEP_SEL_1_128 0x07
+
+// ...next, define the SYNC_EN bit. When set, the BUSYN pin will instead
+// output a clock related to the full-step frequency as defined by the
+// SYNC_SEL bits below.
+#define x_STEP_MODE_SYNC_EN 0x80 // Mask for this bit
+#define x_SYNC_EN 0x80
+
+// ...last, define the SYNC_SEL modes. The clock output is defined by
+// the full-step frequency and the value in these bits- see the datasheet
+// for a matrix describing that relationship (page 46).
+#define x_STEP_MODE_SYNC_SEL 0x70
+#define x_SYNC_SEL_1_2 0x00
+#define x_SYNC_SEL_1 0x10
+#define x_SYNC_SEL_2 0x20
+#define x_SYNC_SEL_4 0x30
+#define x_SYNC_SEL_8 0x40
+#define x_SYNC_SEL_16 0x50
+#define x_SYNC_SEL_32 0x60
+#define x_SYNC_SEL_64 0x70
+
+// Bit names for the ALARM_EN register.
+// Each of these bits defines one potential alarm condition.
+// When one of these conditions occurs and the respective bit in ALARM_EN is set,
+// the FLAG pin will go low. The register must be queried to determine which event
+// caused the alarm.
+#define x_ALARM_EN_OVERCURRENT 0x01
+#define x_ALARM_EN_THERMAL_SHUTDOWN 0x02
+#define x_ALARM_EN_THERMAL_WARNING 0x04
+#define x_ALARM_EN_UNDER_VOLTAGE 0x08
+#define x_ALARM_EN_STALL_DET_A 0x10
+#define x_ALARM_EN_STALL_DET_B 0x20
+#define x_ALARM_EN_SW_TURN_ON 0x40
+#define x_ALARM_EN_WRONG_NPERF_CMD 0x80
+
+// CONFIG register renames.
+
+// Oscillator options.
+// The x needs to know what the clock frequency is because it uses that for some
+// calculations during operation.
+#define x_CONFIG_OSC_SEL 0x000F // Mask for this bit field.
+#define x_CONFIG_INT_16MHZ 0x0000 // Internal 16MHz, no output
+#define x_CONFIG_INT_16MHZ_OSCOUT_2MHZ 0x0008 // Default; internal 16MHz, 2MHz output
+#define x_CONFIG_INT_16MHZ_OSCOUT_4MHZ 0x0009 // Internal 16MHz, 4MHz output
+#define x_CONFIG_INT_16MHZ_OSCOUT_8MHZ 0x000A // Internal 16MHz, 8MHz output
+#define x_CONFIG_INT_16MHZ_OSCOUT_16MHZ 0x000B // Internal 16MHz, 16MHz output
+#define x_CONFIG_EXT_8MHZ_XTAL_DRIVE 0x0004 // External 8MHz crystal
+#define x_CONFIG_EXT_16MHZ_XTAL_DRIVE 0x0005 // External 16MHz crystal
+#define x_CONFIG_EXT_24MHZ_XTAL_DRIVE 0x0006 // External 24MHz crystal
+#define x_CONFIG_EXT_32MHZ_XTAL_DRIVE 0x0007 // External 32MHz crystal
+#define x_CONFIG_EXT_8MHZ_OSCOUT_INVERT 0x000C // External 8MHz crystal, output inverted
+#define x_CONFIG_EXT_16MHZ_OSCOUT_INVERT 0x000D // External 16MHz crystal, output inverted
+#define x_CONFIG_EXT_24MHZ_OSCOUT_INVERT 0x000E // External 24MHz crystal, output inverted
+#define x_CONFIG_EXT_32MHZ_OSCOUT_INVERT 0x000F // External 32MHz crystal, output inverted
+
+// Configure the functionality of the external switch input
+#define x_CONFIG_SW_MODE 0x0010 // Mask for this bit.
+#define x_CONFIG_SW_HARD_STOP 0x0000 // Default; hard stop motor on switch.
+#define x_CONFIG_SW_USER 0x0010 // Tie to the GoUntil and ReleaseSW
+// commands to provide jog function.
+// See page 25 of datasheet.
+
+// Configure the motor voltage compensation mode (see page 34 of datasheet)
+#define x_CONFIG_EN_VSCOMP 0x0020 // Mask for this bit.
+#define x_CONFIG_VS_COMP_DISABLE 0x0000 // Disable motor voltage compensation.
+#define x_CONFIG_VS_COMP_ENABLE 0x0020 // Enable motor voltage compensation.
+
+// Configure overcurrent detection event handling
+#define x_CONFIG_OC_SD 0x0080 // Mask for this bit.
+#define x_CONFIG_OC_SD_DISABLE 0x0000 // Bridges do NOT shutdown on OC detect
+#define x_CONFIG_OC_SD_ENABLE 0x0080 // Bridges shutdown on OC detect
+
+// Configure the slew rate of the power bridge output
+#define x_CONFIG_POW_SR 0x0300 // Mask for this bit field.
+#define x_CONFIG_SR_180V_us 0x0000 // 180V/us
+#define x_CONFIG_SR_290V_us 0x0200 // 290V/us
+#define x_CONFIG_SR_530V_us 0x0300 // 530V/us
+
+// Integer divisors for PWM sinewave generation
+// See page 32 of the datasheet for more information on this.
+#define x_CONFIG_F_PWM_DEC 0x1C00 // mask for this bit field
+#define x_CONFIG_PWM_MUL_0_625 (0x00)<<10
+#define x_CONFIG_PWM_MUL_0_75 (0x01)<<10
+#define x_CONFIG_PWM_MUL_0_875 (0x02)<<10
+#define x_CONFIG_PWM_MUL_1 (0x03)<<10
+#define x_CONFIG_PWM_MUL_1_25 (0x04)<<10
+#define x_CONFIG_PWM_MUL_1_5 (0x05)<<10
+#define x_CONFIG_PWM_MUL_1_75 (0x06)<<10
+#define x_CONFIG_PWM_MUL_2 (0x07)<<10
+
+// Multiplier for the PWM sinewave frequency
+#define x_CONFIG_F_PWM_INT 0xE000 // mask for this bit field.
+#define x_CONFIG_PWM_DIV_1 (0x00)<<13
+#define x_CONFIG_PWM_DIV_2 (0x01)<<13
+#define x_CONFIG_PWM_DIV_3 (0x02)<<13
+#define x_CONFIG_PWM_DIV_4 (0x03)<<13
+#define x_CONFIG_PWM_DIV_5 (0x04)<<13
+#define x_CONFIG_PWM_DIV_6 (0x05)<<13
+#define x_CONFIG_PWM_DIV_7 (0x06)<<13
+
+// Status register bit renames- read-only bits conferring information about the
+// device to the user.
+#define x_STATUS_HIZ 0x0001 // high when bridges are in HiZ mode
+#define x_STATUS_BUSY 0x0002 // mirrors BUSY pin
+#define x_STATUS_SW_F 0x0004 // low when switch open, high when closed
+#define x_STATUS_SW_EVN 0x0008 // active high, set on switch falling edge,
+// cleared by reading STATUS
+#define x_STATUS_DIR 0x0010 // Indicates current motor direction.
+// High is FWD, Low is REV.
+#define x_STATUS_NOTPERF_CMD 0x0080 // Last command not performed.
+#define x_STATUS_WRONG_CMD 0x0100 // Last command not valid.
+#define x_STATUS_UVLO 0x0200 // Undervoltage lockout is active
+#define x_STATUS_TH_WRN 0x0400 // Thermal warning
+#define x_STATUS_TH_SD 0x0800 // Thermal shutdown
+#define x_STATUS_OCD 0x1000 // Overcurrent detected
+#define x_STATUS_STEP_LOSS_A 0x2000 // Stall detected on A bridge
+#define x_STATUS_STEP_LOSS_B 0x4000 // Stall detected on B bridge
+#define x_STATUS_SCK_MOD 0x8000 // Step clock mode is active
+
+// Status register motor status field
+#define x_STATUS_MOT_STATUS 0x0060 // field mask
+#define x_STATUS_MOT_STATUS_STOPPED (0x0000)<<13 // Motor stopped
+#define x_STATUS_MOT_STATUS_ACCELERATION (0x0001)<<13 // Motor accelerating
+#define x_STATUS_MOT_STATUS_DECELERATION (0x0002)<<13 // Motor decelerating
+#define x_STATUS_MOT_STATUS_CONST_SPD (0x0003)<<13 // Motor at constant speed
+
+// Register address redefines.
+// See the x_Param_Handler() function for more info about these.
+#define x_ABS_POS 0x01
+#define x_EL_POS 0x02
+#define x_MARK 0x03
+#define x_SPEED 0x04
+#define x_ACC 0x05
+#define x_DEC 0x06
+#define x_MAX_SPEED 0x07
+#define x_MIN_SPEED 0x08
+#define x_FS_SPD 0x15
+#define x_KVAL_HOLD 0x09
+#define x_KVAL_RUN 0x0A
+#define x_KVAL_ACC 0x0B
+#define x_KVAL_DEC 0x0C
+#define x_INT_SPD 0x0D
+#define x_ST_SLP 0x0E
+#define x_FN_SLP_ACC 0x0F
+#define x_FN_SLP_DEC 0x10
+#define x_K_THERM 0x11
+#define x_ADC_OUT 0x12
+#define x_OCD_TH 0x13
+#define x_STALL_TH 0x14
+#define x_STEP_MODE 0x16
+#define x_ALARM_EN 0x17
+#define x_CONFIG 0x18
+#define x_STATUS 0x19
+
+//x commands
+#define x_NOP 0x00
+#define x_SET_PARAM 0x00
+#define x_GET_PARAM 0x20
+#define x_RUN 0x50
+#define x_STEP_CLOCK 0x58
+#define x_MOVE 0x40
+#define x_GOTO 0x60
+#define x_GOTO_DIR 0x68
+#define x_GO_UNTIL 0x82
+#define x_RELEASE_SW 0x92
+#define x_GO_HOME 0x70
+#define x_GO_MARK 0x78
+#define x_RESET_POS 0xD8
+#define x_RESET_DEVICE 0xC0
+#define x_SOFT_STOP 0xB0
+#define x_HARD_STOP 0xB8
+#define x_SOFT_HIZ 0xA0
+#define x_HARD_HIZ 0xA8
+#define x_GET_STATUS 0xD0 // use Get_and_Clear_Status
+
+/* x direction options */
+#define FWD 0x01
+#define REV 0x00
+
+/* x action options */
+#define ACTION_RESET 0x00
+#define ACTION_COPY 0x01
+
+
+
+//class cL6470 {
+//public:
+
+//Default constuctot
+//cL6470();
+
+//Overload Constructor
+//@param int MOSI, int MISO, int CS, int CLK, int BUSY, int RESET
+//cL6470(int, int, int, int, int, int);
+void init();
+unsigned long GetParam(byte);
+byte Data_To_Transfer(byte);
+unsigned long ParamHandler(byte, unsigned long);
+void SetParam(byte, unsigned long);
+unsigned long Param(unsigned long, byte);
+int GetStatus();
+uint32_t SpdCalc(float);
+unsigned long IntSpdCalc(float);
+unsigned long FSCalc(float);
+unsigned long MinSpdCalc(float);
+unsigned long MaxSpdCalc(float);
+unsigned long DecCalc(float);
+unsigned long AccCalc(float);
+void SetLSPDOpt(boolean);
+void Run(byte, unsigned long);
+void Step_Clock(byte);
+void Move(byte, unsigned long);
+void GoTo(unsigned long);
+void GoTo_DIR(byte, unsigned long);
+void GoUntil(byte, byte, unsigned long);
+void ReleaseSW(byte, byte);
+void GoHome();
+void GoMark();
+void ResetPos();
+void ResetDev();
+void SoftStop();
+void HardStop();
+void SoftHiZ();
+void HardHiZ();
+float CurrentSpdCalc(uint32_t stepspertick);// for Speed response
+void delay(int number_of_seconds);
+void Run_tx_test(byte dir, unsigned long spd);
+////TODO update the addresses
+//#define MOSI_BASE 0x00000001 //
+//#define MISO_BASE 0x00000002 //
+//#define CS_BASE 0x00000003 //
+//#define CLK_BASE 0x00000004 //
+//#define BUSY_BASE 0x00000005 //
+//#define RESET_BASE 0x00000006 //
+//#define TX_BASE 0x00000006 //
+//#define RX_BASE 0x00000007 //
+
+
+//extern int volatile * const MOSI_Reg;
+//extern int volatile * const MISO_Reg;
+//extern int volatile * const CS_Reg;
+//extern int volatile * const CLK_Reg;
+//extern int volatile * const BUSY_Reg;
+//extern int volatile * const RESET_Reg;
+//extern char volatile * const TX_Reg;
+//extern char volatile * const RX_Reg;
+
+//*MOSI = value; /* write to port */
+//value = *MOSI; /* read from port */
+
+
+
+///////////////
+
+
+////@param int MOSI
+//void Set_MOSI(int);
+////@param int MISO
+//void Set_MISO(int);
+////@param int CS
+//void Set_CS(int);
+////@param int CLK
+//void Set_CLK(int);
+////@param int BUSY
+//void Set_BUSY(int);
+////@param int RESET
+//void Set_RESET(int);
+
+
+
+//int Get_MOSI();
+//int Get_MISO();
+//int Get_CS();
+//int Get_CLK();
+//int Get_BUSY();
+//int Get_RESET();
+
+
+//private:
+// Member Variable
+
+//int MOSI = 0;
+//int MISO = 0;
+//int CS = 0;
+//int CLK = 0;
+//int BUSY = 0;
+//int RESET = 0;
+//};
+
+
+#endif /* CL6470_H_ */
diff --git a/Software/Code_Composer/twine_usblib_demo/drivers/I2C_Communication/I2C.h b/Software/Code_Composer/twine_usblib_demo/drivers/I2C_Communication/I2C.h
new file mode 100644
index 000000000..125b7eb2c
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/drivers/I2C_Communication/I2C.h
@@ -0,0 +1,31 @@
+
+#ifndef DRIVERS_I2C_H_
+#define DRIVERS_I2C_H_
+
+
+#include <stdbool.h>
+#include <stdint.h>
+
+#define I2C_NUM_OF_CHANNELS 7 // 6 dispensers and feeder
+//front panel date saved in the same array of sampeled ADC data g_pui32ADCSeq[]
+
+#define I2C_START_INDEX 14
+#define I2C_ADC_DISP_1_POT 20
+#define I2C_ADC_DISP_2_POT 19
+#define I2C_ADC_DISP_3_POT 14
+#define I2C_ADC_DISP_4_POT 17
+#define I2C_ADC_DISP_5_POT 16
+#define I2C_ADC_DISP_6_POT 15
+#define I2C_ADC_FEEDER_POT 18
+
+
+/*********************************************************************************************
+ * this function is responsible for recieving a to d data of the potentiometers that connected
+ * to front panel and arrives in I2C communication protocol.
+ * input parameters - slave addres of I2C device
+ * buffer to write the result into
+ * index inside the beffer from where to atart writing
+ *********************************************************************************************/
+void SampleI2CData(uint32_t* _resultData);
+void InitI2C(void);
+#endif /* DRIVERS_I2C_H_ */
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
new file mode 100644
index 000000000..d11555de1
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/drivers/SPI/SPI_Comm.c
@@ -0,0 +1,1031 @@
+
+#include <stdbool.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+
+#include "inc/hw_memmap.h"
+#include "driverlib/gpio.h"
+#include "driverlib/pin_map.h"
+#include "driverlib/ssi.h"
+#include "driverlib/sysctl.h"
+#include "utils/uartstdio.h"
+
+#include "graphics_adapter.h"
+#include <Stubs_Handler/DataDef.h>
+
+#include "drivers/FPGA/Moters_Driver/L6470.h"
+
+#include "drivers/FPGA/FPGA_Comm.h"
+
+#include <driverlib/rom.h>
+#include <driverlib/rom_map.h>
+
+#include <PMR/Stubs/StubMotorInitRequest.pb-c.h>
+
+void temp_init_spi2();
+void temp_setup();
+
+void Avi_test_get_speed();
+//uint32_t Get_Param_Status(byte param);
+uint32_t Get_and_Clear_Status();
+
+uint32_t Get_Param(byte param);
+unsigned long MaxSpdCalc(float stepsPerSec);
+
+extern unsigned long Run_Value ;
+extern unsigned long Mov_Value ;
+extern unsigned long Pos_Value;
+extern bool Direction ;
+extern unsigned long Time_2_Change_Direction ;
+extern bool Display_Tx_ON_LCD;
+extern bool Display_Rx_on_LCD;
+extern unsigned long Init_MicroStep ;
+extern unsigned long Init_Acc;
+extern unsigned long Init_Dec;
+extern bool TestBool_1;
+extern bool TestBool_2;
+extern bool TestBool_3;
+extern bool TestBool_4;
+extern bool TestBool_5;
+extern unsigned long TestUint32_1;
+extern unsigned long TestUint32_2;
+extern unsigned long TestUint32_3;
+extern unsigned long TestUint32_4;
+extern unsigned long TestUint32_5;
+extern unsigned long TestUint32_6;
+
+extern unsigned char Stop_Command;
+
+//#define SPI_EVA_LCD_ENABLED
+
+
+void SPI2_Init()
+{
+ #if defined(TARGET_IS_TM4C129_RA0) || \
+ defined(TARGET_IS_TM4C129_RA1) || \
+ defined(TARGET_IS_TM4C129_RA2)
+ uint32_t ui32SysClock;
+ #endif
+
+
+
+ //
+ // Set the clocking to run directly from the external crystal/oscillator.
+ // TODO: The SYSCTL_XTAL_ value must be changed to match the value of the
+ // crystal on your board.
+ //
+ #if defined(TARGET_IS_TM4C129_RA0) || \
+ defined(TARGET_IS_TM4C129_RA1) || \
+ defined(TARGET_IS_TM4C129_RA2)
+ /*ui32SysClock = SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
+ SYSCTL_OSC_MAIN |
+ SYSCTL_USE_OSC), 25000000);*/
+ ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
+ SYSCTL_OSC_MAIN | SYSCTL_USE_PLL |
+ SYSCTL_CFG_VCO_480), 120000000);
+ #else
+ SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
+ SYSCTL_XTAL_16MHZ);
+ #endif
+#ifdef SPI_EVA_LCD_ENABLED
+ writeLine("SSI:");
+ writeLine(" Mode: SPI");
+ writeLine(" Data: 8-bit");
+#endif
+
+ // The SSI2 peripheral must be enabled for use.
+ //
+ SysCtlPeripheralReset(SYSCTL_PERIPH_SSI2);
+ SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI2);
+
+ //
+ // For this example SSI2 is used with PortG[7:4]. GPIO port G needs to be
+ // enabled so these pins can be used.
+ //
+ SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOG);
+
+
+
+ /* Configure pad settings */ // AVI
+ GPIOPadConfigSet(GPIO_PORTG_BASE,
+ GPIO_PIN_7 | GPIO_PIN_5,
+ GPIO_STRENGTH_4MA, GPIO_PIN_TYPE_STD);
+
+
+ GPIOPadConfigSet(GPIO_PORTG_BASE,
+ GPIO_PIN_4,
+ GPIO_STRENGTH_4MA, GPIO_PIN_TYPE_STD_WPU);
+
+ GPIOPadConfigSet(GPIO_PORTG_BASE,
+ GPIO_PIN_6,
+ GPIO_STRENGTH_4MA, GPIO_PIN_TYPE_STD);
+
+
+ //
+ // Configure the pin muxing for SSI2 functions on port G4, G5, G6 and G7.
+ // This step is not necessary if your part does not support pin muxing.
+
+
+ #define GPIO_PG4_SSI2TX GPIO_PG4_SSI2XDAT1 // AVI
+ #define GPIO_PG5_SSI2RX GPIO_PG5_SSI2XDAT0 // AVI
+
+ //
+ GPIOPinConfigure(GPIO_PG7_SSI2CLK);
+ GPIOPinConfigure(GPIO_PG6_SSI2FSS);
+ GPIOPinConfigure(GPIO_PG5_SSI2RX);
+ GPIOPinConfigure(GPIO_PG4_SSI2TX);
+
+ //
+ // Configure the GPIO settings for the SSI pins. This function also gives
+ // control of these pins to the SSI hardware. Consult the data sheet to
+ // see which functions are allocated per pin.
+ // The pins are assigned as follows:
+ // PG4 - SSI2Tx
+ // PG5 - SSI2Rx
+ // PG6 - SSI2Fss
+ // PG7 - SSI2CLK
+ //
+ GPIOPinTypeSSI(GPIO_PORTG_BASE, GPIO_PIN_7 | GPIO_PIN_6 | GPIO_PIN_5 |
+ GPIO_PIN_4);
+
+ //
+ // Configure and enable the SSI2 port for SPI Master mode.
+ //
+ #if defined(TARGET_IS_TM4C129_RA0) || \
+ defined(TARGET_IS_TM4C129_RA1) || \
+ defined(TARGET_IS_TM4C129_RA2)
+ SSIConfigSetExpClk(SSI2_BASE, ui32SysClock, SSI_FRF_MOTO_MODE_0,
+ SSI_MODE_MASTER, 1000000, 8);
+ #else
+ SSIConfigSetExpClk(SSI2_BASE, SysCtlClockGet(), SSI_FRF_MOTO_MODE_0,
+ SSI_MODE_MASTER, 1000000, 8);
+ #endif
+
+ SSIAdvModeSet(SSI2_BASE,SSI_ADV_MODE_READ_WRITE);//data is written to and read from the slave // AVI
+ //
+ // Enable the SSI2 module.
+ //
+ SSIEnable(SSI2_BASE);
+ //----------------------------------------------------------------
+
+}
+
+void init_BUSY_Pin(void)
+{
+ MAP_GPIOPinTypeGPIOInput(GPIO_PORTG_BASE, GPIO_PIN_0); // Enable pin for GPIOInput
+ SysCtlDelay(10000);
+ GPIOPadConfigSet(GPIO_PORTG_BASE,GPIO_PIN_0,GPIO_STRENGTH_2MA,GPIO_PIN_TYPE_STD_WPU );//Configure GPIO PULL UP resistors. NOTE: does not work if ROM_GPIOPinTypeGPIOInput() isnt called before.
+}
+
+bool Check_SPI_Busy(void)
+{
+
+ if(ROM_GPIOPinRead(GPIO_PORTG_BASE, GPIO_PIN_0) == GPIO_PIN_0)
+ return NOTBUSY;
+ else
+ return BUSY;
+}
+
+bool Polling_SPI_Busy(void)
+{
+ uint32_t timeout = 10000; // todo - check this value
+ char temp;
+
+ do
+ {
+ timeout--;
+ temp = ROM_GPIOPinRead(GPIO_PORTG_BASE, GPIO_PIN_0);
+ } while(( temp != GPIO_PIN_0) && (timeout));
+
+ if(temp != GPIO_PIN_0)
+ return BUSY;//After time out
+ else
+ return NOTBUSY;
+}
+
+void SPI_TX(unsigned int SSI_BASE,uint32_t *pui32DataTx, uint32_t *pui32DataRx, unsigned int Num_SSI_Data)
+{
+ uint32_t ui32Index;
+ //
+ // Read any residual data from the SSI port. This makes sure the receive
+ // FIFOs are empty, so we don't read any unwanted junk. This is done here
+ // because the SPI SSI mode is full-duplex, which allows you to send and
+ // receive at the same time. The SSIDataGetNonBlocking function returns
+ // "true" when data was returned, and "false" when no data was returned.
+ // The "non-blocking" function checks if there is any data in the receive
+ // FIFO and does not "hang" if there isn't.
+ //
+ while(SSIDataGetNonBlocking(SSI_BASE, &pui32DataRx[0]))
+ {
+ }
+
+
+ //
+ // Display indication that the SSI is transmitting data.
+ //
+ //UARTprintf("Sent:\n ");
+#ifdef SPI_EVA_LCD_ENABLED
+ writeLine("Sent: ");
+#endif
+ //
+ // Send 3 bytes of data.
+ //
+
+ for(ui32Index = 0; ui32Index < Num_SSI_Data; ui32Index++)
+ {
+ #ifdef SPI_EVA_LCD_ENABLED
+#ifdef SPI_EVA_LCD_ENABLED
+ // Display the data that SSI is transferring.
+ writeFloat (pui32DataTx[ui32Index]);
+ writeString(" ");
+#endif
+ #endif
+
+
+ //
+ // Send the data using the "blocking" put function. This function
+ // will wait until there is room in the send FIFO before returning.
+ // This allows you to assure that all the data you send makes it into
+ // the send FIFO.
+ //
+ SSIDataPut(SSI_BASE, pui32DataTx[ui32Index]);
+ }
+
+ //
+ // Wait until SSI2 is done transferring all the data in the transmit FIFO.
+ //
+ while(SSIBusy(SSI_BASE))
+ {
+ }
+}
+
+void SPI_RX(unsigned int SSI_Bsae, uint32_t* RxBuf, uint32_t NumOfWords)
+{
+
+/*
+ uint32_t ui32Index;
+#define DUMMY_BYTE 0x00
+
+ NumOfWords = 2;
+
+ writeLine("Starting Read Operations...");
+
+ for(ui32Index=0;ui32Index<NumOfWords-1;ui32Index++)
+ {
+ SSIDataPut(SSI_Bsae,DUMMY_BYTE);
+ SSIDataGet(SSI_Bsae,&RxBuf[ui32Index]);
+ }
+ SSIAdvDataPutFrameEnd(SSI_Bsae,DUMMY_BYTE);
+ SSIDataGet(SSI_Bsae,&RxBuf[NumOfWords-1]);
+
+
+ writeFloat (RxBuf[0]);
+ writeFloat (RxBuf[1]);
+//
+ writeLine("Read Completed...");
+
+*/
+
+ uint32_t ui32Index;
+#ifdef SPI_EVA_LCD_ENABLED
+ // Display indication that the SSI is receiving data.
+ writeLine("Received: ");
+#endif
+ //
+ // Receive 3 bytes of data.
+
+// while(SSIBusy(SSI_Bsae))
+// {
+// }
+ //
+ unsigned char Num_SSI_Data = 1;
+ uint32_t pui32DataRx[1];
+
+ for(ui32Index = 0; ui32Index < Num_SSI_Data; ui32Index++)
+ {
+ //
+ // Receive the data using the "blocking" Get function. This function
+ // will wait until there is data in the receive FIFO before returning.
+ //
+ SSIDataGet(SSI_Bsae, &pui32DataRx[ui32Index]);
+
+ writeLine("SPI_RX: ");
+ writeFloat (pui32DataRx[ui32Index]);
+ writeString(" ");
+
+
+ //
+ // Since we are using 8-bit data, mask off the MSB.
+ //
+ pui32DataRx[ui32Index] &= 0x00FF;
+
+ //
+ // Display the data that SSI2 received.
+ //
+ //UARTprintf("'%c' ", pui32DataRx[ui32Index]);
+
+ //temp[0] = pui32DataRx[ui32Index];
+ //writeString(temp);
+//#ifdef SPI_EVA_LCD_ENABLED
+// writeFloat (pui32DataRx[ui32Index]);
+// writeString(" ");
+//#endif
+ }
+
+ RxBuf[0] = pui32DataRx[0];
+
+ //
+ // Return no errors
+ //
+
+
+}
+
+///////////////
+
+void setup(StubMotorInitRequest* request)
+//void setup()
+{
+
+ unsigned long read_status, NOP;
+
+ // // Standard serial port initialization for debugging.
+ //Serial.begin(9600);
+ //Serial.setTimeout(50);
+ //delay(500);
+
+ //if (GetParam(x_CONFIG) == 0x2E88) // the default value of the CONFIG register
+ // The following function calls are for this demo application-
+ // you will need to adjust them for your particular
+ // application, and you may need to configure additional
+ // registers.
+
+ // First, let's set the step mode register:
+ // - x_SYNC_EN controls whether the BUSY/SYNC pin reflects
+ // the step frequency or the BUSY status of the chip. We
+ // want it to be the BUSY status.
+ // - x_STEP_SEL_x is the microstepping rate- we'll go full
+ // step.
+ // - x_SYNC_SEL_x is the ratio of (micro)steps to toggles
+ // on the BUSY/SYNC pin (when that pin is used for SYNC).
+ // Make it 1:1, despite not using that pin.
+
+
+ //Step mode can only be changed when bridges are disabled:
+ HardHiZ();
+ read_status = Get_Param(x_STATUS);
+ while((read_status & x_STATUS_HIZ) != x_STATUS_HIZ)
+ {
+ NOP++;
+ }
+
+ while(SSIBusy(SSI2_BASE)){};
+
+ if(request->set_micro_steps)
+ {
+ SetParam(x_STEP_MODE,
+ !x_SYNC_EN |
+ request->micro_steps |
+ x_SYNC_SEL_1);
+ }
+ else
+ {
+ SetParam(x_STEP_MODE,
+ !x_SYNC_EN |
+ x_STEP_SEL_1_8 |
+ x_SYNC_SEL_1);
+ }
+
+ // Configure the MAX_SPEED register- this is the maximum number
+ // of (micro)steps per second allowed. You'll want to mess
+ // around with your desired application to see how far you can
+ // push it before the motor starts to slip. The ACTUAL
+ // parameter passed to this function is in steps/tick;
+ // MaxSpdCalc() will convert a number of steps/s into an
+ // appropriate value for this function. Note that for any move
+ // or goto type function where no speed is specified, this
+ // value will be used.
+ while(SSIBusy(SSI2_BASE)){};
+
+ if(request->set_max_speed)
+ {
+ SetParam(x_MAX_SPEED, MaxSpdCalc(request->max_speed));
+ }
+ else
+ {
+ SetParam(x_MAX_SPEED, MaxSpdCalc(1120));
+ }
+
+
+ // Configure the FS_SPD register- this is the speed at which the
+ // driver ceases microstepping and goes to full stepping.
+ // FSCalc() converts a value in steps/s to a value suitable for
+ // this register; to disable full-step switching, you can pass
+ // 0x3FF to this register.
+ while(SSIBusy(SSI2_BASE)){};
+ SetParam(x_FS_SPD, FSCalc(0x3FF));
+
+ // Configure the acceleration rate, in steps/tick/tick. There is
+ // also a DEC register; both of them have a function (AccCalc()
+ // and DecCalc() respectively) that convert from steps/s/s into
+ // the appropriate value for the register. Writing ACC to 0xfff
+ // sets the acceleration and deceleration to 'infinite' (or as
+ // near as the driver can manage). If ACC is set to 0xfff, DEC
+ // is ignored. To get infinite deceleration without infinite
+ // acceleration, only hard stop will work.
+
+ //SoftStop(); // ACC + DEC writable only when motor is stopped
+ //SysCtlDelay(10000000);
+ while(SSIBusy(SSI2_BASE)){};
+
+ HardHiZ();
+ read_status = Get_Param(x_STATUS);
+ while((read_status & x_STATUS_HIZ) != x_STATUS_HIZ)
+ {
+ SysCtlDelay(1000000);
+ read_status = Get_Param(x_STATUS);
+ }
+ // ACC + DEC writable only when motor is stopped
+
+ if(request->set_acc)
+ {
+ SetParam(x_ACC, request->acc);//roll-over after 0x7F - 7 bit ??? (should be 12 bit) AVI
+ }
+ else
+ {
+ SetParam(x_ACC, 0x8A);//roll-over after 0x7F - 7 bit ??? (should be 12 bit) AVI
+ }
+
+ while(SSIBusy(SSI2_BASE)){};
+
+ if(request->set_dec)
+ {
+ SetParam(x_ACC, request->dec);//roll-over after 0x7F - 7 bit ??? (should be 12 bit) AVI
+ }
+ else
+ {
+ SetParam(x_DEC, 0x8A);//roll-over after 0x7F - 7 bit ??? (should be 12 bit) AVI
+ }
+
+
+
+ // Configure the overcurrent detection threshold. The constants
+ // for this are defined in the L6470.h file.
+ while(SSIBusy(SSI2_BASE)){};
+ SetParam(x_OCD_TH, x_OCD_TH_1500mA);
+
+ // Set up the CONFIG register as follows:
+ // PWM frequency divisor = 1
+ // PWM frequency multiplier = 2 (62.5kHz PWM frequency)
+ // Slew rate is 290V/us
+ // Do NOT shut down bridges on overcurrent
+ // Disable motor voltage compensation
+ // Hard stop on switch low
+ // 16MHz internal oscillator, nothing on output
+
+ //Get_Param(x_STATUS); //High impedance state
+ //while(SSIBusy(SSI2_BASE)){};
+ //GetStatus();
+ //SysCtlDelay(10000000);
+ while(SSIBusy(SSI2_BASE)){};
+
+ HardHiZ();
+ read_status = Get_Param(x_STATUS);
+ while((read_status & x_STATUS_HIZ) != x_STATUS_HIZ)
+ {
+ SysCtlDelay(1000000);
+ read_status = Get_Param(x_STATUS);
+ }
+
+ //writable only when outputs are in high impedance:
+ SetParam(x_CONFIG,
+ x_CONFIG_PWM_DIV_1 |
+ x_CONFIG_PWM_MUL_2 |
+ x_CONFIG_SR_180V_us |
+ x_CONFIG_OC_SD_ENABLE |
+ x_CONFIG_VS_COMP_DISABLE |
+ x_CONFIG_SW_HARD_STOP |
+ x_CONFIG_INT_16MHZ);
+
+ while(SSIBusy(SSI2_BASE)){};
+
+ SetParam(x_ALARM_EN,0xFF);
+ //----------->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Special Section <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+ // Configure the RUN KVAL. This defines the duty cycle of the
+ // PWM of the bridges during running. 0xFF means that they are
+ // essentially NOT PWMed during run; this MAY result in more
+ // power being dissipated than you actually need for the task.
+ // Setting this value too low may result in failure to turn.
+ // There are ACC, DEC, and HOLD KVAL registers as well; you may
+ // need to play with those values to get acceptable performance
+ // for a given application.
+ SetParam(x_KVAL_HOLD, /*0x0B);// */ 0x05);
+ SetParam(x_KVAL_RUN, /*0x4B);// */ 0x23);
+ SetParam(x_KVAL_ACC, /*0x4B);// */ 0x23);
+ SetParam(x_KVAL_DEC, /*0x4B);// */ 0x23);
+ SetParam(x_ST_SLP, 0x18);
+ SetParam(x_INT_SPD, /*0x1A13);// */ 0x3550);
+ SetParam(x_FN_SLP_ACC, /*0x48);// */ 0x23);
+ SetParam(x_FN_SLP_DEC, /*0x48);// */ 0x23);
+
+ //https://www.youtube.com/watch?v=8C7qdjPbhlg MIN 2:20
+
+ //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+ // Calling GetStatus() clears the UVLO bit in the status
+ // register, which is set by default on power-up. The driver
+ // may not run without that bit cleared by this read operation.
+ GetStatus();
+
+ // Now we're going to set up a counter to track pulses from an
+ // encoder, to verify against the expected values.
+ //TCCR1A = 0; // No waveform generation stuff.
+ //TCCR1B = B00000110; // Clock on falling edge, T1 pin.
+ //TCNT1 = 0; // Clear the count.
+}
+
+void Mot_Run()
+{
+ while(SSIBusy(SSI2_BASE)){};
+ Run(Direction,Run_Value );
+ //Run_tx_test(Direction,Run_Value );
+}
+
+void Mot_Mov()
+{
+ while(SSIBusy(SSI2_BASE)){};
+ Move(Direction,Pos_Value );
+}
+
+
+
+void Mot_Stop()
+{
+ while(SSIBusy(SSI2_BASE)){};
+ switch(Stop_Command)
+ {
+ case 0:
+ SoftHiZ();
+ break;
+ case 1:
+ HardHiZ();
+ break;
+ case 2:
+ SoftStop();
+ break;
+ case 3:
+ HardStop();
+ break;
+ default:
+ break;
+ }
+}
+
+void loop()
+{
+ GetStatus(); // Clear the error
+
+ //unsigned long i;
+ //unsigned long ReadSpeed;
+// ResetPos();
+// SoftStop();
+// SysCtlDelay(17500000);
+
+// HardStop();
+ // writeLine("Received: ");
+ //while(1)
+ {
+
+ ResetPos();
+ //for(i=0;i<0x3FFFFF;i++)
+// {
+// Run(FWD,i );
+// HardStop();
+// writeLine("Tx ");
+// writeFloat(i);
+// SysCtlDelay(5000000);
+// }
+ //i = 100000;
+
+ unsigned long Read_Speed,
+ //Read_MaxSpeed,
+ //Read_Acc,
+ //Read_Dec,
+ //speed,
+ Read_pos,
+ //Pos_Value,
+ //Read_ELpos,
+ read_status;
+ //unsigned long SpeedStepPerSec,
+ // MaxSpeedStepPerSec;
+
+ //Direction = FWD;
+ //Run_Value = 0x10625; // 1000 step/sec
+ //Pos_Value = 0x111111; // 1000 step/sec
+ unsigned k = 1;
+
+ //SetParam(x_MAX_SPEED, MaxSpdCalc(1100)); // >1000 step/sec
+ //SetParam(x_MAX_SPEED, 0x10680); // >1000 step/sec
+
+ while(k)
+ {
+
+ while(SSIBusy(SSI2_BASE)){};
+ //Avi_test_get_speed(); //OK !!!
+ Read_Speed = Get_Param(x_SPEED);
+ writeLine("Read_Speed: ");
+ writeFloat(Read_Speed);
+
+ while(SSIBusy(SSI2_BASE)){};
+ //SysCtlDelay(17500000);
+ Read_pos = Get_Param(x_ABS_POS);
+ writeLine("Read_pos: ");
+ writeFloat(Read_pos);
+ while(SSIBusy(SSI2_BASE)){};
+
+/* Read_ELpos = Get_Param(x_EL_POS);
+ writeLine("Read_EL_pos: ");
+ writeFloat(Read_ELpos);
+ while(SSIBusy(SSI2_BASE)){};*/
+
+
+ writeLine("Tx ");
+ writeFloat(Run_Value);
+ Run(Direction,Run_Value );
+
+ switch(Stop_Command)
+ {
+ case 1:
+ HardStop();
+ break;
+ case 2:
+ SoftStop();
+ break;
+ case 3:
+ HardHiZ();
+ break;
+ case 4:
+ SoftHiZ();
+ break;
+ default:
+ break;
+ }
+
+/* if(k>5)
+ Move(Direction,Pos_Value );
+ else
+ //GoTo_DIR(Direction,Pos_Value );
+ GoTo(Pos_Value );*/
+
+ read_status = Get_Param(x_STATUS);
+
+ switch((read_status & x_STATUS_MOT_STATUS)>>5)
+ {
+ case 0://Stopped
+ writeLine("-");
+ break;
+ case 1://Acceleration
+ if(read_status & x_STATUS_DIR)
+ writeLine(">>>");
+ else
+ writeLine("<<<");
+ break;
+ case 2://Deceleration
+ if(read_status & x_STATUS_DIR)
+ writeLine(">");
+ else
+ writeLine("<");
+ break;
+ case 3://Constant speed
+ if(read_status & x_STATUS_DIR)
+ writeLine(">>");
+ else
+ writeLine("<<");
+ break;
+ }
+ //read_status = GetStatus();
+ //read_status = Get_Param_Status( x_GET_STATUS); // The GetStatus command resets the STATUS register warning flags.
+ read_status = Get_and_Clear_Status();
+
+ if((read_status & x_STATUS_UVLO)==0)
+ writeLine("Undervoltage");
+
+ Get_Param(x_STEP_MODE);
+
+ /*
+ //speed = Get_Param(x_SPEED);
+ speed = GetParam(x_SPEED);
+ if(speed & 0xfffff == Run_Value )
+ writeLine(" XXXXXXX ");
+ writeLine(" Speed: ");
+ writeFloat(speed);
+ */
+ //SysCtlDelay(17500000);
+ ///while(SSIBusy(SSI2_BASE)){};
+ //Avi_test_get_speed(); //OK !!!
+ // Get_Param(x_SPEED);
+
+ // while(SSIBusy(SSI2_BASE)){};
+ //SysCtlDelay(17500000);
+ // Get_Param(x_ABS_POS);
+ //SysCtlDelay(17500000);
+ //GetParam(x_SPEED); // wrong value;
+
+
+ //unsigned long read_status;
+/*
+ if(k<2)
+ {
+ HardHiZ();
+ read_status = Get_Param(x_STATUS);
+ while((read_status & x_STATUS_HIZ) != x_STATUS_HIZ)
+ {
+ read_status = Get_Param(x_STATUS);
+ SysCtlDelay(1000000);
+ }
+
+
+ Read_Acc = Get_Param(x_ACC);
+ writeLine("x_ACC: ");
+ writeFloat(Read_Acc);
+
+
+ // while(SSIBusy(SSI2_BASE)){};
+
+ Read_Dec = Get_Param(x_DEC);
+ writeLine("x_ACC: ");
+ writeFloat(Read_Dec);
+
+ while(SSIBusy(SSI2_BASE)){};
+
+ Get_Param(x_CONFIG);
+ }*/
+ //Get_Param(x_ALARM_EN);
+ k--;
+ }
+
+
+
+
+
+//
+// Read_MaxSpeed = Get_Param(x_MAX_SPEED);
+// writeLine("Max Speed: ");
+// writeFloat(Read_MaxSpeed);
+//
+// MaxSpeedStepPerSec = MaxSpdCalc(Read_MaxSpeed);
+//
+// writeLine("Max Speed (Step Per Sec): ");
+// writeFloat(MaxSpeedStepPerSec);
+
+
+
+/*
+ Read_KvalAcc = Get_Param(x_KVAL_ACC);
+ writeLine("x_KVAL_ACC: ");
+ writeFloat(Read_KvalAcc);
+
+ Read_KvalDec = Get_Param(x_KVAL_DEC);
+ writeLine("x_KVAL_DEC: ");
+ writeFloat(Read_KvalDec);
+*/
+
+ /* while (1)
+ {
+ //Run(Direction,Run_Value );
+
+ writeLine("Tx ");
+ writeFloat(Run_Value);
+
+ SysCtlDelay(7500000);
+ Read_Speed = Get_Param(x_SPEED);
+ writeLine("Speed: ");
+ writeFloat(Read_Speed);
+
+ SpeedStepPerSec = MaxSpdCalc(Read_Speed);
+
+ writeLine("Speed (Step Per Sec): ");
+ writeFloat(SpeedStepPerSec);
+ }
+*/
+
+/*
+
+ //for(i=0xFFFFF;i>0;i--)
+ //{
+
+ //Move(FWD, 25600);
+
+ //Move(FWD, 25600);
+
+ Run(FWD, 0xFFFFF);
+ //while (digitalRead(Get_BUSY()) == LOW); // Until the movement completes, the
+ //while(L6470_BUSY == LOW){} // BUSYN pin will be low.
+ //SetParam(x_MAX_SPEED, MaxSpdCalc(1)); // Change the Speed
+ // SetParam(x_MIN_SPEED, MinSpdCalc(300));
+
+ //writeLine("Tx ");
+ // writeFloat(i);
+ // writeLine("Rx ");
+ //delay(5);
+ //SysCtlDelay(7500000); // need #include "driverlib/sysctl.h"
+ //ReadSpeed = GetParam(x_SPEED);
+
+ //writeFloat(ReadSpeed);
+
+
+ //SysCtlDelay(17500000);
+ SysCtlDelay(10000000); // need #include "driverlib/sysctl.h"
+ //SoftStop();
+ // HardStop();
+// }
+// //SetParam(x_MAX_SPEED, MaxSpdCalc(300)); // Change the Speed
+// //delay(5);
+// // for(i=0;i<10;i++)
+// {
+// //Move(REV, 25600);
+ //Move(REV, 25600);
+
+ Run(REV, 0xFFFFF);
+
+ //SetParam(x_MAX_SPEED, MaxSpdCalc(30)); // Change the Speed
+ SysCtlDelay(10000000);
+ //SoftStop();
+// //while (digitalRead(Get_BUSY()) == LOW); // Until the movement completes, the
+// //while (*BUSY_Reg == LOW){} // BUSYN pin will be low.
+// //SetParam(x_MAX_SPEED, MaxSpdCalc(50)); // Change the Speed
+// //delay(5);
+ // HardStop();
+// }
+
+ //GoHome();
+
+ // SysCtlDelay(17500000);
+ //for(i=0;i<10;i++);
+*/
+ }
+}
+///////////////
+
+int SPI_Control(bool Init)
+{
+ if(Init == INIT)
+ {
+ SPI2_Init();
+ init_BUSY_Pin();
+ //setup();
+ setup(NULL);
+ }
+ loop();
+
+ return(0);
+}
+
+byte Transfer_tx(byte data/*, byte data_out*/ )
+{
+ #define NUM_SSI_DATA 1
+ byte data_out;
+
+ uint32_t pui32DataTx[NUM_SSI_DATA];
+ uint32_t pui32DataRx[NUM_SSI_DATA];
+
+ pui32DataTx[0] = data;
+ //pui32DataRx[0] = data_out;
+
+ SPI_TX(SSI2_BASE, &pui32DataTx, &pui32DataRx, NUM_SSI_DATA );
+
+ SPI_RX(SSI2_BASE, &pui32DataRx, NUM_SSI_DATA );
+
+ //writeLine("Transfer_tx: ");
+ //writeFloat(pui32DataRx[0]);
+
+ data_out = pui32DataRx[0];
+
+ return data_out;
+
+}
+
+
+byte Write_Byte(uint8_t WByte)
+{
+ uint32_t RByte;
+
+ SSIDataPut(SSI2_BASE, WByte);
+
+ while(SSIBusy(SSI2_BASE))
+ {
+ }
+
+ while(Check_SPI_Busy() == BUSY)
+ {
+ }
+
+ SSIDataGet(SSI2_BASE, &RByte);
+
+ return (RByte & 0xff);
+
+}
+
+uint32_t Get_Param(byte param)//OK
+{
+ uint32_t temp = 0;
+ uint32_t rx = 0;
+ while(SSIBusy(SSI2_BASE)){};
+ while(Check_SPI_Busy() == BUSY){};
+ /* Send GetParam operation code to dSPIN */
+ temp = Write_Byte((uint8_t)x_GET_PARAM | (uint8_t)param);
+ /* MSB which should be 0 */
+ rx |= (temp & 0xFF) << 24;
+ switch (param)
+ {
+ case x_ABS_POS: ;
+ case x_MARK: ;
+ case x_SPEED:
+ while(SSIBusy(SSI2_BASE)){};
+ while(Check_SPI_Busy() == BUSY){};
+ temp = Write_Byte((uint8_t)(0x00));
+ rx |= (temp & 0xFF) << 16;
+ case x_EL_POS: ;
+ case x_ACC: ;
+ case x_DEC: ;
+ case x_MAX_SPEED: ;
+ case x_MIN_SPEED: ;
+ case x_FS_SPD: ;
+ case x_INT_SPD: ;
+ case x_CONFIG: ;
+ case x_STATUS:
+ while(SSIBusy(SSI2_BASE)){};
+ while(Check_SPI_Busy() == BUSY){};
+ temp = Write_Byte((uint8_t)(0x00));
+ rx |= (temp & 0xFF) << 8;
+ default:
+ while(SSIBusy(SSI2_BASE)){};
+ while(Check_SPI_Busy() == BUSY){};
+ temp = Write_Byte((uint8_t)(0x00));
+ rx |= temp & 0xFF;
+ }
+
+ return rx;
+}
+/*
+void Avi_test_get_speed()// Working as expected read the speed
+{
+
+ unsigned char i;
+
+ uint32_t pui32DataRx[10];
+
+ while(SSIDataGetNonBlocking(SSI2_BASE, &pui32DataRx[0]))
+ {
+ }
+
+ SSIDataPut(SSI2_BASE, 0x24);//get speed
+
+ while(SSIBusy(SSI2_BASE))
+ {
+ }
+
+ writeLine("Received: ");
+
+
+ for(i = 0; i < 4; i++)
+ {
+ if(i>0)
+ SSIDataPut(SSI2_BASE, 0x00);
+
+ while(SSIBusy(SSI2_BASE))
+ {
+ }
+
+ SSIDataGet(SSI2_BASE, &pui32DataRx[i]);
+
+ pui32DataRx[i] &= 0x00FF;
+
+ writeFloat (pui32DataRx[i]);
+ writeString(" ");
+ }
+
+}
+
+*/
+uint32_t Get_and_Clear_Status()// Tested OK AVI
+{
+ uint32_t temp = 0;
+ uint32_t rx = 0;
+
+ /* Send GetParam operation code to dSPIN */
+ temp = Write_Byte(x_GET_STATUS);
+ /* MSB which should be 0 */
+ rx |= (temp & 0xFF) << 24;
+
+ temp = Write_Byte((uint8_t)(0x00));
+ rx |= (temp & 0xFF) << 8;
+
+ temp = Write_Byte((uint8_t)(0x00));
+ rx |= temp & 0xFF;
+
+ return rx;
+}
diff --git a/Software/Code_Composer/twine_usblib_demo/drivers/SPI/SPI_Comm.h b/Software/Code_Composer/twine_usblib_demo/drivers/SPI/SPI_Comm.h
new file mode 100644
index 000000000..6b4d5ecf1
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/drivers/SPI/SPI_Comm.h
@@ -0,0 +1,16 @@
+int SPI_Control(bool Init);
+
+byte Transfer_tx(byte data/*, byte data_out*/ );
+uint32_t Get_Param(byte param);
+void SPI2_Init();
+
+//void temp_init_spi2();
+void Mot_Mov();
+void Mot_Run();
+
+void Mot_Stop();
+uint32_t Get_and_Clear_Status();
+void setup();
+void init_BUSY_Pin(void);
+#include <PMR/Stubs/StubMotorInitRequest.pb-c.h>
+void setup(StubMotorInitRequest* request);
diff --git a/Software/Code_Composer/twine_usblib_demo/drivers/SPI/spi_master.c b/Software/Code_Composer/twine_usblib_demo/drivers/SPI/spi_master.c
new file mode 100644
index 000000000..73eaa7468
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/drivers/SPI/spi_master.c
@@ -0,0 +1,519 @@
+//*****************************************************************************
+//
+// spi_master.c - Example demonstrating how to configure SSI0 in SPI master
+// mode.
+//
+// Copyright (c) 2010-2017 Texas Instruments Incorporated. All rights reserved.
+// Software License Agreement
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the
+// distribution.
+//
+// Neither the name of Texas Instruments Incorporated nor the names of
+// its contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// This is part of revision 2.1.4.178 of the Tiva Firmware Development Package.
+//
+//*****************************************************************************
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "inc/hw_memmap.h"
+#include "driverlib/gpio.h"
+#include "driverlib/pin_map.h"
+#include "driverlib/ssi.h"
+#include "driverlib/sysctl.h"
+//#include "driverlib/uart.h"
+#include "utils/uartstdio.h"
+
+#include "graphics_adapter.h"
+
+//*****************************************************************************
+//
+//! \addtogroup ssi_examples_list
+//! <h1>SPI Master (spi_master)</h1>
+//!
+//! This example shows how to configure the SSI0 as SPI Master. The code will
+//! send three characters on the master Tx then polls the receive FIFO until
+//! 3 characters are received on the master Rx.
+//!
+//! This example uses the following peripherals and I/O signals. You must
+//! review these and change as needed for your own board:
+//! - SSI0 peripheral
+//! - GPIO Port A peripheral (for SSI0 pins)
+//! - SSI0Clk - PA2
+//! - SSI0Fss - PA3
+//! - SSI0Rx - PA4
+//! - SSI0Tx - PA5
+//!
+//! The following UART signals are configured only for displaying console
+//! messages for this example. These are not required for operation of SSI0.
+//! - UART0 peripheral
+//! - GPIO Port A peripheral (for UART0 pins)
+//! - UART0RX - PA0
+//! - UART0TX - PA1
+//!
+//! This example uses the following interrupt handlers. To use this example
+//! in your own application you must add these interrupt handlers to your
+//! vector table.
+//! - None.
+//
+//*****************************************************************************
+
+//*****************************************************************************
+//
+// Number of bytes to send and receive.
+//
+//*****************************************************************************
+#define NUM_SSI_DATA 5
+
+//*****************************************************************************
+//
+// This function sets up UART0 to be used for a console to display information
+// as the example is running.
+//
+//*****************************************************************************
+/*
+void InitSPI2(void)
+{
+ //
+ // The SSI2 peripheral must be enabled for use.
+ //
+ SysCtlPeripheralReset(SYSCTL_PERIPH_SSI2);
+ SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI2);
+
+ //
+ // For this example SSI2 is used with PortG[7:4]. GPIO port G needs to be
+ // enabled so these pins can be used.
+ //
+ SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOG);
+
+ //
+ // Configure the pin muxing for SSI2 functions on port G4, G5, G6 and G7.
+ // This step is not necessary if your part does not support pin muxing.
+
+
+ #define GPIO_PG4_SSI2TX GPIO_PG4_SSI2XDAT1
+ #define GPIO_PG5_SSI2RX GPIO_PG5_SSI2XDAT0
+ //
+ GPIOPinConfigure(GPIO_PG7_SSI2CLK);
+ GPIOPinConfigure(GPIO_PG6_SSI2FSS);
+ GPIOPinConfigure(GPIO_PG5_SSI2RX);
+ GPIOPinConfigure(GPIO_PG4_SSI2TX);
+
+ //
+ // Configure the GPIO settings for the SSI pins. This function also gives
+ // control of these pins to the SSI hardware. Consult the data sheet to
+ // see which functions are allocated per pin.
+ // The pins are assigned as follows:
+ // PG4 - SSI2Tx
+ // PG5 - SSI2Rx
+ // PG6 - SSI2Fss
+ // PG7 - SSI2CLK
+ //
+ GPIOPinTypeSSI(GPIO_PORTG_BASE, GPIO_PIN_7 | GPIO_PIN_6 | GPIO_PIN_5 |
+ GPIO_PIN_4);
+
+ //
+ // Configure and enable the SSI2 port for SPI Master mode.
+ //
+#if defined(TARGET_IS_TM4C129_RA0) || \
+ defined(TARGET_IS_TM4C129_RA1) || \
+ defined(TARGET_IS_TM4C129_RA2)
+ SSIConfigSetExpClk(SSI2_BASE, ui32SysClock, SSI_FRF_MOTO_MODE_0,
+ SSI_MODE_MASTER, 1000000, 8);
+#else
+ SSIConfigSetExpClk(SSI2_BASE, SysCtlClockGet(), SSI_FRF_MOTO_MODE_0,
+ SSI_MODE_MASTER, 1000000, 8);
+#endif
+ ///--------------------------------
+
+ ///----------------------------
+
+ //
+ // Enable the SSI2 module.
+ //
+ SSIEnable(SSI2_BASE);
+}
+*/
+
+/*
+void
+InitConsole2(void)
+{
+ //
+ // Enable GPIO port A which is used for UART0 pins.
+ // TODO: change this to whichever GPIO port you are using.
+ //
+ SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
+
+ //
+ // Configure the pin muxing for UART0 functions on port A0 and A1.
+ // This step is not necessary if your part does not support pin muxing.
+ // TODO: change this to select the port/pin you are using.
+ //
+ GPIOPinConfigure(GPIO_PA0_U0RX);
+ GPIOPinConfigure(GPIO_PA1_U0TX);
+
+ //
+ // Enable UART0 so that we can configure the clock.
+ //
+ SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
+
+ //
+ // Use the internal 16MHz oscillator as the UART clock source.
+ //
+ UARTClockSourceSet(UART0_BASE, UART_CLOCK_PIOSC);
+
+ //
+ // Select the alternate (UART) function for these pins.
+ // TODO: change this to select the port/pin you are using.
+ //
+ GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
+
+ //
+ // Initialize the UART for console I/O.
+ //
+ UARTStdioConfig(0, 115200, 16000000);
+}
+*/
+//*****************************************************************************
+//
+// Configure SSI2 in master Freescale (SPI) mode. This example will send out
+// 3 bytes of data, then wait for 3 bytes of data to come in. This will all be
+// done using the polling method.
+//
+//*****************************************************************************
+int SPI_main(void)
+{
+#if defined(TARGET_IS_TM4C129_RA0) || \
+ defined(TARGET_IS_TM4C129_RA1) || \
+ defined(TARGET_IS_TM4C129_RA2)
+ uint32_t ui32SysClock;
+#endif
+
+ uint32_t pui32DataTx[NUM_SSI_DATA];
+ uint32_t pui32DataRx[NUM_SSI_DATA];
+ uint32_t ui32Index;
+
+ //
+ // Set the clocking to run directly from the external crystal/oscillator.
+ // TODO: The SYSCTL_XTAL_ value must be changed to match the value of the
+ // crystal on your board.
+ //
+#if defined(TARGET_IS_TM4C129_RA0) || \
+ defined(TARGET_IS_TM4C129_RA1) || \
+ defined(TARGET_IS_TM4C129_RA2)
+ ui32SysClock = SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
+ SYSCTL_OSC_MAIN |
+ SYSCTL_USE_OSC), 25000000);
+#else
+ SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
+ SYSCTL_XTAL_16MHZ);
+#endif
+
+ //
+ // Set up the serial console to use for displaying messages. This is
+ // just for this example program and is not needed for SSI operation.
+ //
+ //InitConsole2();
+
+ //
+ // Display the setup on the console.
+ //
+ //UARTprintf("SSI ->\n");
+ //UARTprintf(" Mode: SPI\n");
+ //UARTprintf(" Data: 8-bit\n\n");
+
+ writeLine("SSI:");
+ writeLine(" Mode: SPI");
+ writeLine(" Data: 8-bit");
+
+
+ //------------------------------------------------------------
+
+// //GPIO pull ups
+// GPIOPadConfigSet(GPIO_PORTG_BASE, GPIO_PIN_4,GPIO_STRENGTH_2MA,GPIO_PIN_TYPE_STD_WPU);
+// GPIOPadConfigSet(GPIO_PORTG_BASE, GPIO_PIN_5,GPIO_STRENGTH_2MA,GPIO_PIN_TYPE_STD_WPU);
+// GPIOPadConfigSet(GPIO_PORTG_BASE, GPIO_PIN_6,GPIO_STRENGTH_2MA,GPIO_PIN_TYPE_STD_WPU);
+// GPIOPadConfigSet(GPIO_PORTG_BASE, GPIO_PIN_7,GPIO_STRENGTH_2MA,GPIO_PIN_TYPE_STD_WPU);
+
+ //
+ // The SSI2 peripheral must be enabled for use.
+ //
+ SysCtlPeripheralReset(SYSCTL_PERIPH_SSI2);
+ SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI2);
+
+ //
+ // For this example SSI2 is used with PortG[7:4]. GPIO port G needs to be
+ // enabled so these pins can be used.
+ //
+ SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOG);
+
+ //
+ // Configure the pin muxing for SSI2 functions on port G4, G5, G6 and G7.
+ // This step is not necessary if your part does not support pin muxing.
+
+
+ #define GPIO_PG4_SSI2TX GPIO_PG4_SSI2XDAT1 // AVI?
+ #define GPIO_PG5_SSI2RX GPIO_PG5_SSI2XDAT0 // AVI?
+
+
+
+ //
+ GPIOPinConfigure(GPIO_PG7_SSI2CLK);
+ GPIOPinConfigure(GPIO_PG6_SSI2FSS);
+ GPIOPinConfigure(GPIO_PG5_SSI2RX);
+ GPIOPinConfigure(GPIO_PG4_SSI2TX);
+
+ //
+ // Configure the GPIO settings for the SSI pins. This function also gives
+ // control of these pins to the SSI hardware. Consult the data sheet to
+ // see which functions are allocated per pin.
+ // The pins are assigned as follows:
+ // PG4 - SSI2Tx
+ // PG5 - SSI2Rx
+ // PG6 - SSI2Fss
+ // PG7 - SSI2CLK
+ //
+ GPIOPinTypeSSI(GPIO_PORTG_BASE, GPIO_PIN_7 | GPIO_PIN_6 | GPIO_PIN_5 |
+ GPIO_PIN_4);
+
+ //
+ // Configure and enable the SSI2 port for SPI Master mode.
+ //
+ #if defined(TARGET_IS_TM4C129_RA0) || \
+ defined(TARGET_IS_TM4C129_RA1) || \
+ defined(TARGET_IS_TM4C129_RA2)
+ SSIConfigSetExpClk(SSI2_BASE, ui32SysClock, SSI_FRF_MOTO_MODE_0,
+ SSI_MODE_MASTER, 1000000, 8);
+ #else
+ SSIConfigSetExpClk(SSI2_BASE, SysCtlClockGet(), SSI_FRF_MOTO_MODE_0,
+ SSI_MODE_MASTER, 1000000, 8);
+ #endif
+ ///--------------------------------
+
+ ///----------------------------
+
+ //
+ // Enable the SSI2 module.
+ //
+ SSIEnable(SSI2_BASE);
+ //----------------------------------------------------------------
+
+
+/*//---------------------------------------------------------------------
+ //
+ // The SSI0 peripheral must be enabled for use.
+ //
+ SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI0);
+
+ //
+ // For this example SSI0 is used with PortA[5:2]. The actual port and pins
+ // used may be different on your part, consult the data sheet for more
+ // information. GPIO port A needs to be enabled so these pins can be used.
+ // TODO: change this to whichever GPIO port you are using.
+ //
+ SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
+
+ //
+ // Configure the pin muxing for SSI0 functions on port A2, A3, A4, and A5.
+ // This step is not necessary if your part does not support pin muxing.
+ // TODO: change this to select the port/pin you are using.
+ //
+ #define GPIO_PA4_SSI0RX 0x00001002 AVI?
+ #define GPIO_PA5_SSI0TX 0x00001402 AVI ?
+
+ GPIOPinConfigure(GPIO_PA2_SSI0CLK);
+ GPIOPinConfigure(GPIO_PA3_SSI0FSS);
+ GPIOPinConfigure(GPIO_PA4_SSI0RX);
+ GPIOPinConfigure(GPIO_PA5_SSI0TX);
+
+ //
+ // Configure the GPIO settings for the SSI pins. This function also gives
+ // control of these pins to the SSI hardware. Consult the data sheet to
+ // see which functions are allocated per pin.
+ // The pins are assigned as follows:
+ // PA5 - SSI0Tx
+ // PA4 - SSI0Rx
+ // PA3 - SSI0Fss
+ // PA2 - SSI0CLK
+ // TODO: change this to select the port/pin you are using.
+ //
+ GPIOPinTypeSSI(GPIO_PORTA_BASE, GPIO_PIN_5 | GPIO_PIN_4 | GPIO_PIN_3 |
+ GPIO_PIN_2);
+
+ //
+ // Configure and enable the SSI port for SPI master mode. Use SSI0,
+ // system clock supply, idle clock level low and active low clock in
+ // freescale SPI mode, master mode, 1MHz SSI frequency, and 8-bit data.
+ // For SPI mode, you can set the polarity of the SSI clock when the SSI
+ // unit is idle. You can also configure what clock edge you want to
+ // capture data on. Please reference the datasheet for more information on
+ // the different SPI modes.
+ //
+#if defined(TARGET_IS_TM4C129_RA0) || \
+ defined(TARGET_IS_TM4C129_RA1) || \
+ defined(TARGET_IS_TM4C129_RA2)
+ SSIConfigSetExpClk(SSI0_BASE, ui32SysClock, SSI_FRF_MOTO_MODE_0,
+ SSI_MODE_MASTER, 1000000, 8);
+#else
+ SSIConfigSetExpClk(SSI0_BASE, SysCtlClockGet(), SSI_FRF_MOTO_MODE_0,
+ SSI_MODE_MASTER, 1000000, 8);
+#endif
+
+ //
+ // Enable the SSI0 module.
+ //
+ SSIEnable(SSI0_BASE);*/
+
+ unsigned char Loops = 1;
+ while (Loops){
+ //Loops--;
+ //
+ // Read any residual data from the SSI port. This makes sure the receive
+ // FIFOs are empty, so we don't read any unwanted junk. This is done here
+ // because the SPI SSI mode is full-duplex, which allows you to send and
+ // receive at the same time. The SSIDataGetNonBlocking function returns
+ // "true" when data was returned, and "false" when no data was returned.
+ // The "non-blocking" function checks if there is any data in the receive
+ // FIFO and does not "hang" if there isn't.
+ //
+ while(SSIDataGetNonBlocking(SSI2_BASE, &pui32DataRx[0]))
+ {
+ }
+
+
+ //-------------------------------------------------------------------------------------------
+ //SDSPI_init();
+ //SDSPITiva_open();
+
+/* SSIDataPut(SSI2_BASE,0xC0);
+ SSIDataPut(SSI2_BASE,0x51);
+ SSIDataPut(SSI2_BASE,0x0);
+ SSIDataPut(SSI2_BASE,0xff);
+ SSIDataPut(SSI2_BASE,0x0);*/
+
+ pui32DataTx[0] = 0xC0;
+ pui32DataTx[1] = 0x51;
+ pui32DataTx[2] = 0x0;
+ pui32DataTx[3] = 0xff;
+ pui32DataTx[4] = 0x0;
+
+ //------------------------------------------------------------------------------------------
+ //
+ // Initialize the data to send.
+ //
+/*
+ pui32DataTx[0] = 'A';
+ pui32DataTx[1] = 's';
+ pui32DataTx[2] = 'p';
+ pui32DataTx[3] = 'i';
+ pui32DataTx[4] = 'A';
+*/
+ //
+ // Display indication that the SSI is transmitting data.
+ //
+ //UARTprintf("Sent:\n ");
+
+ writeLine("Sent: ");
+
+ //
+ // Send 3 bytes of data.
+ //
+ // char temp[2];
+ //temp[1] = '\0';
+
+ for(ui32Index = 0; ui32Index < NUM_SSI_DATA; ui32Index++)
+ {
+ //
+ // Display the data that SSI is transferring.
+ //
+ //UARTprintf("'%c' ", pui32DataTx[ui32Index]);
+
+
+ //temp[0] = pui32DataTx[ui32Index];
+ //writeString(temp);
+ writeFloat (pui32DataTx[ui32Index]);
+ writeString(" ");
+
+
+ //
+ // Send the data using the "blocking" put function. This function
+ // will wait until there is room in the send FIFO before returning.
+ // This allows you to assure that all the data you send makes it into
+ // the send FIFO.
+ //
+ SSIDataPut(SSI2_BASE, pui32DataTx[ui32Index]);
+ }
+
+ //
+ // Wait until SSI2 is done transferring all the data in the transmit FIFO.
+ //
+ while(SSIBusy(SSI2_BASE))
+ {
+ }
+
+ //
+ // Display indication that the SSI is receiving data.
+ //
+ //UARTprintf("\nReceived:\n ");
+ writeLine("Received: ");
+
+ //
+ // Receive 3 bytes of data.
+ //
+ for(ui32Index = 0; ui32Index < NUM_SSI_DATA; ui32Index++)
+ {
+ //
+ // Receive the data using the "blocking" Get function. This function
+ // will wait until there is data in the receive FIFO before returning.
+ //
+ SSIDataGet(SSI2_BASE, &pui32DataRx[ui32Index]);
+
+ //
+ // Since we are using 8-bit data, mask off the MSB.
+ //
+ pui32DataRx[ui32Index] &= 0x00FF;
+
+ //
+ // Display the data that SSI2 received.
+ //
+ //UARTprintf("'%c' ", pui32DataRx[ui32Index]);
+
+ //temp[0] = pui32DataRx[ui32Index];
+ //writeString(temp);
+ writeFloat (pui32DataRx[ui32Index]);
+ writeString(" ");
+ }
+
+ //
+ // Return no errors
+ //
+ Loops =2;
+
+ }//while(1)
+ return(0);
+}
diff --git a/Software/Code_Composer/twine_usblib_demo/drivers/SPI/spi_master.h b/Software/Code_Composer/twine_usblib_demo/drivers/SPI/spi_master.h
new file mode 100644
index 000000000..1a047b695
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/drivers/SPI/spi_master.h
@@ -0,0 +1 @@
+int SPI_main(void);
diff --git a/Software/Code_Composer/twine_usblib_demo/main.c b/Software/Code_Composer/twine_usblib_demo/main.c
index 7ffd95043..7c497f869 100644
--- a/Software/Code_Composer/twine_usblib_demo/main.c
+++ b/Software/Code_Composer/twine_usblib_demo/main.c
@@ -1,4 +1,5 @@
#include <drivers/Flash_Memory/Flash_Memory.h>
+#include <drivers/FPGA/FPGA.h>
#include <protobuf-c/person-pb-c.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -45,6 +46,12 @@
#include <Stubs_Handler/DataDef.h>
//#include "Stubs_Handler/Buzzer.h"
+#include "Stubs_Handler/temperature_sensor.h"
+
+#include "drivers/SPI/spi_master.h"
+#include "drivers/SPI/SPI_Comm.h"
+
+
//*****************************************************************************
//
@@ -87,10 +94,20 @@ void USB0Handler(void)
InitUSB();
}
+
+int a = 5;
+
+void HandleSSI2(void)
+{
+ a++;
+}
+
+
int main(void)
{
uint32_t ui32SysClock, ui32PLLRate;
+
// Set the system clock to run at 120MHz from the PLL.
ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
SYSCTL_OSC_MAIN | SYSCTL_USE_PLL |
@@ -102,6 +119,8 @@ int main(void)
// Save the PLL rate used by this application.
SysCtlVCOGet(SYSCTL_XTAL_25MHZ, &ui32PLLRate);
+
+
// Enable the system tick.
ROM_SysTickPeriodSet(ui32SysClock / TICKS_PER_SECOND);
ROM_SysTickIntEnable();
@@ -113,10 +132,19 @@ int main(void)
/////////////// tests by AVI
//Ext_Flash_Operation(TX,5);
//SoundExample();
+ //temperature_main();
+ //test_FPGA();
+
+ //SPI_main();
+ // SPI_Control();
+
+
/////////////////////
RegisterReceiveCallback(&receive_callback);
StartUSB(ui32SysClock);
+
+
while(1){};
}
diff --git a/Software/Code_Composer/twine_usblib_demo/tm4c129xnczad_startup_ccs.c b/Software/Code_Composer/twine_usblib_demo/tm4c129xnczad_startup_ccs.c
index 562bb6ff8..578215d2a 100644
--- a/Software/Code_Composer/twine_usblib_demo/tm4c129xnczad_startup_ccs.c
+++ b/Software/Code_Composer/twine_usblib_demo/tm4c129xnczad_startup_ccs.c
@@ -60,6 +60,7 @@ extern uint32_t __STACK_TOP;
extern void SysTickHandler(void);
extern void USB0Handler(void);
extern void USB0DeviceIntHandler(void);
+extern void HandleSSI2(void);
//*****************************************************************************
//
@@ -142,7 +143,7 @@ void (* const g_pfnVectors[])(void) =
IntDefaultHandler, // GPIO Port J
IntDefaultHandler, // GPIO Port K
IntDefaultHandler, // GPIO Port L
- IntDefaultHandler, // SSI2 Rx and Tx
+ HandleSSI2, // SSI2 Rx and Tx
IntDefaultHandler, // SSI3 Rx and Tx
IntDefaultHandler, // UART3 Rx and Tx
IntDefaultHandler, // UART4 Rx and Tx
diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf
index f5927f4c7..b5c6eee11 100644
--- a/Software/DB/Tango.mdf
+++ b/Software/DB/Tango.mdf
Binary files differ
diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf
index 8da12b281..0c95978dc 100644
--- a/Software/DB/Tango_log.ldf
+++ b/Software/DB/Tango_log.ldf
Binary files differ
diff --git a/Software/Graphics/external-bridge-tcp.png b/Software/Graphics/external-bridge-tcp.png
new file mode 100644
index 000000000..192cbcaa7
--- /dev/null
+++ b/Software/Graphics/external-bridge-tcp.png
Binary files differ
diff --git a/Software/Graphics/external-bridge-usb.png b/Software/Graphics/external-bridge-usb.png
new file mode 100644
index 000000000..414bbab04
--- /dev/null
+++ b/Software/Graphics/external-bridge-usb.png
Binary files differ
diff --git a/Software/Graphics/machine-trans.png b/Software/Graphics/machine-trans.png
new file mode 100644
index 000000000..a7cf65852
--- /dev/null
+++ b/Software/Graphics/machine-trans.png
Binary files differ
diff --git a/Software/PMR/Messages/Common/MessageType.proto b/Software/PMR/Messages/Common/MessageType.proto
index d1b34ba77..d18eb6621 100644
--- a/Software/PMR/Messages/Common/MessageType.proto
+++ b/Software/PMR/Messages/Common/MessageType.proto
@@ -45,7 +45,26 @@ enum MessageType
StubExtFlashReadResponse = 34;
StubExtFlashWriteRequest = 35;
StubExtFlashWriteResponse = 36;
-
+ StubFPGAReadBackRegRequest = 37;
+ StubFPGAReadBackRegResponse = 38;
+ StubFPGAReadVersionRequest = 39;
+ StubFPGAReadVersionResponse = 40;
+ StubL6470DriverRequest = 41;
+ StubL6470DriverResponse = 42;
+ StubMotorInitRequest = 43;
+ StubMotorInitResponse = 44;
+ StubMotorRunRequest = 45;
+ StubMotorRunResponse = 46;
+ StubMotorStopRequest = 47;
+ StubMotorStopResponse = 48;
+ StubMotorStatusRequest = 49;
+ StubMotorStatusResponse = 50;
+ StubMotorMovRequest = 51;
+ StubMotorMovResponse = 52;
+ StubMotorSpeedRequest = 53;
+ StubMotorSpeedResponse = 54;
+ StubMotorPositionRequest = 55;
+ StubMotorPositionResponse = 56;
//Integration
ExternalBridgeUdpDiscoveryPacket = 1000;
diff --git a/Software/PMR/Messages/Stubs/StubFPGAReadBackRegRequest.proto b/Software/PMR/Messages/Stubs/StubFPGAReadBackRegRequest.proto
new file mode 100644
index 000000000..6f306433a
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubFPGAReadBackRegRequest.proto
@@ -0,0 +1,10 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubFPGAReadBackRegRequest
+{
+ uint32 FPGAId = 1; // 0..2
+ uint32 Value = 2; // 16 bit
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Stubs/StubFPGAReadBackRegResponse.proto b/Software/PMR/Messages/Stubs/StubFPGAReadBackRegResponse.proto
new file mode 100644
index 000000000..1c3ad1f0b
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubFPGAReadBackRegResponse.proto
@@ -0,0 +1,12 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubFPGAReadBackRegResponse
+{
+ uint32 FPGAId = 1; // 0..2
+ uint32 ReadBackValue = 2; // 16 bit
+ string Status = 4; // Passed/Failed
+ uint32 StatusWord = 5; // Error number/bit when the status is Failed
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Stubs/StubFPGAReadVersionRequest.proto b/Software/PMR/Messages/Stubs/StubFPGAReadVersionRequest.proto
new file mode 100644
index 000000000..944dfab45
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubFPGAReadVersionRequest.proto
@@ -0,0 +1,9 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubFPGAReadVersionRequest
+{
+ uint32 FPGAId = 1; // 0..2
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Stubs/StubFPGAReadVersionResponse.proto b/Software/PMR/Messages/Stubs/StubFPGAReadVersionResponse.proto
new file mode 100644
index 000000000..88cde1e86
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubFPGAReadVersionResponse.proto
@@ -0,0 +1,15 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubFPGAReadVersionResponse
+{
+ uint32 FPGAId = 1; // 0..2
+ uint32 Day = 2;
+ uint32 Month = 3;
+ uint32 Year = 4;
+ uint32 Ver_num = 5;
+ string Status = 6; // Passed/Failed
+ uint32 StatusWord = 7; // Error number/bit when the status is Failed
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Stubs/StubL6470DriverRequest.proto b/Software/PMR/Messages/Stubs/StubL6470DriverRequest.proto
new file mode 100644
index 000000000..f481031da
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubL6470DriverRequest.proto
@@ -0,0 +1,28 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubL6470DriverRequest
+{
+ uint32 Run_Value = 1;
+ uint32 Mov_Value = 2;
+ bool Direction = 3;
+ uint32 Time_2_Change_Direction = 4;
+ bool Display_Tx_ON_LCD = 5;
+ bool Display_Rx_on_LCD = 6;
+ uint32 Init_MicroStep = 7;
+ uint32 Init_Acc = 8;
+ uint32 Init_Dec = 9;
+ bool TestBool_1 = 10;
+ bool TestBool_2 = 11;
+ bool TestBool_3 = 12;
+ bool TestBool_4 = 13;
+ bool TestBool_5 = 14;
+ uint32 TestUint32_1 = 15;
+ uint32 TestUint32_2 = 16;
+ uint32 TestUint32_3 = 17;
+ uint32 TestUint32_4 = 18;
+ uint32 TestUint32_5 = 19;
+ uint32 TestUint32_6 = 20;
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Stubs/StubL6470DriverResponse.proto b/Software/PMR/Messages/Stubs/StubL6470DriverResponse.proto
new file mode 100644
index 000000000..30953abc7
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubL6470DriverResponse.proto
@@ -0,0 +1,23 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubL6470DriverResponse
+{
+ uint32 Run_Value = 1;
+ uint32 Mov_Value = 2;
+ bool TestBool_1 = 3;
+ bool TestBool_2 = 4;
+ bool TestBool_3 = 5;
+ bool TestBool_4 = 6;
+ bool TestBool_5 = 7;
+ uint32 TestUint32_1 = 8;
+ uint32 TestUint32_2 = 9;
+ uint32 TestUint32_3 = 10;
+ uint32 TestUint32_4 = 11;
+ uint32 TestUint32_5 = 12;
+ uint32 TestUint32_6 = 13;
+ string Status = 14; // Passed/Failed
+ uint32 StatusWord = 15; // Error number/bit when the status is Failed
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Stubs/StubMotorInitRequest.proto b/Software/PMR/Messages/Stubs/StubMotorInitRequest.proto
new file mode 100644
index 000000000..9661f6f7a
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubMotorInitRequest.proto
@@ -0,0 +1,17 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubMotorInitRequest
+{
+ uint32 Motor_ID = 1;
+ uint32 Micro_Steps = 2; // 1/2/4/8/16/32/64/128
+ bool Set_Micro_Steps = 3;
+ uint32 ACC = 4;
+ bool Set_ACC = 5;
+ uint32 DEC = 6;
+ bool Set_Dec = 7;
+ uint32 Max_Speed = 8;
+ bool Set_Max_Speed = 9;
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Stubs/StubMotorInitResponse.proto b/Software/PMR/Messages/Stubs/StubMotorInitResponse.proto
new file mode 100644
index 000000000..c8cd3b10a
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubMotorInitResponse.proto
@@ -0,0 +1,10 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubMotorInitResponse
+{
+ uint32 Motor_ID = 1;
+ uint32 Status = 2;
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Stubs/StubMotorMovRequest.proto b/Software/PMR/Messages/Stubs/StubMotorMovRequest.proto
new file mode 100644
index 000000000..fa5708f70
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubMotorMovRequest.proto
@@ -0,0 +1,11 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubMotorMovRequest
+{
+ uint32 Motor_ID = 1;
+ bool Direction = 2;
+ uint32 Position = 3;
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Stubs/StubMotorMovResponse.proto b/Software/PMR/Messages/Stubs/StubMotorMovResponse.proto
new file mode 100644
index 000000000..d39f584ad
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubMotorMovResponse.proto
@@ -0,0 +1,16 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubMotorMovResponse
+{
+ uint32 Motor_ID = 1;
+ uint32 Position = 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;
+
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Stubs/StubMotorPositionRequest.proto b/Software/PMR/Messages/Stubs/StubMotorPositionRequest.proto
new file mode 100644
index 000000000..096c3793e
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubMotorPositionRequest.proto
@@ -0,0 +1,9 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubMotorPositionRequest
+{
+ uint32 Motor_ID = 1;
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Stubs/StubMotorPositionResponse.proto b/Software/PMR/Messages/Stubs/StubMotorPositionResponse.proto
new file mode 100644
index 000000000..adc347992
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubMotorPositionResponse.proto
@@ -0,0 +1,10 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubMotorPositionResponse
+{
+ uint32 Motor_ID = 1;
+ uint32 Position = 2;
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Stubs/StubMotorRunRequest.proto b/Software/PMR/Messages/Stubs/StubMotorRunRequest.proto
new file mode 100644
index 000000000..f3533930a
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubMotorRunRequest.proto
@@ -0,0 +1,11 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubMotorRunRequest
+{
+ uint32 Motor_ID = 1;
+ bool Direction = 2;
+ double Speed = 3;
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Stubs/StubMotorRunResponse.proto b/Software/PMR/Messages/Stubs/StubMotorRunResponse.proto
new file mode 100644
index 000000000..5ea4edf29
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubMotorRunResponse.proto
@@ -0,0 +1,16 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubMotorRunResponse
+{
+ 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;
+
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Stubs/StubMotorSpeedRequest.proto b/Software/PMR/Messages/Stubs/StubMotorSpeedRequest.proto
new file mode 100644
index 000000000..0f5df6e77
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubMotorSpeedRequest.proto
@@ -0,0 +1,9 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubMotorSpeedRequest
+{
+ uint32 Motor_ID = 1;
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Stubs/StubMotorSpeedResponse.proto b/Software/PMR/Messages/Stubs/StubMotorSpeedResponse.proto
new file mode 100644
index 000000000..9348b9545
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubMotorSpeedResponse.proto
@@ -0,0 +1,10 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubMotorSpeedResponse
+{
+ uint32 Motor_ID = 1;
+ double Speed = 2;
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Stubs/StubMotorStatusRequest.proto b/Software/PMR/Messages/Stubs/StubMotorStatusRequest.proto
new file mode 100644
index 000000000..d8d956343
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubMotorStatusRequest.proto
@@ -0,0 +1,10 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubMotorStatusRequest
+{
+ uint32 Motor_ID = 1;
+ bool ClearStatus = 2;
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Stubs/StubMotorStatusResponse.proto b/Software/PMR/Messages/Stubs/StubMotorStatusResponse.proto
new file mode 100644
index 000000000..b25df3a0c
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubMotorStatusResponse.proto
@@ -0,0 +1,24 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubMotorStatusResponse
+{
+ uint32 Motor_ID = 1;
+ bool SCK_MOD = 2;
+ bool STEP_LOSS_B = 3;
+ bool STEP_LOSS_A = 4;
+ bool OCD = 5;
+ bool TH_SD = 6;
+ bool TH_WRN = 7;
+ bool UVLO = 8;
+ bool WRONG_CMD = 9;
+ bool NOTPERF_CMD = 10;
+ uint32 MOT_STATUS = 11;
+ bool DIR = 12;
+ bool SW_EVN = 13;
+ bool SW_F = 14;
+ bool BUSY = 15;
+ bool HiZ = 16;
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Stubs/StubMotorStopRequest.proto b/Software/PMR/Messages/Stubs/StubMotorStopRequest.proto
new file mode 100644
index 000000000..9963ab955
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubMotorStopRequest.proto
@@ -0,0 +1,10 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubMotorStopRequest
+{
+ uint32 Motor_ID = 1;
+ uint32 Stop_CMD = 2; // 1 - Hard_Stop/ 2 - Soft_Stop/ 3 - Hard_Hiz/ 4 - Soft_Hiz
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Stubs/StubMotorStopResponse.proto b/Software/PMR/Messages/Stubs/StubMotorStopResponse.proto
new file mode 100644
index 000000000..efc4db1c2
--- /dev/null
+++ b/Software/PMR/Messages/Stubs/StubMotorStopResponse.proto
@@ -0,0 +1,11 @@
+syntax = "proto3";
+
+package Tango.PMR.Stubs;
+option java_package = "com.twine.tango.pmr.stubs";
+
+message StubMotorStopResponse
+{
+ uint32 Motor_ID = 1;
+ uint32 Mot_Status = 2;// Stopped / Acceleration / Deceleration / Constant speed
+ bool HiZ = 3;// 1 - high impedance state.
+} \ 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 ac20a4ef6..e99b7459d 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(
- "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbiqECgoLTWVz",
+ "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbiq8DgoLTWVz",
"c2FnZVR5cGUSBwoDUkdCEAASBwoDSm9iEAESCwoHU2VnbWVudBACEhQKEENh",
"bGN1bGF0ZVJlcXVlc3QQAxIVChFDYWxjdWxhdGVSZXNwb25zZRAEEhMKD1By",
"b2dyZXNzUmVxdWVzdBAFEhQKEFByb2dyZXNzUmVzcG9uc2UQBhIcChhTdHVi",
@@ -45,14 +45,26 @@ namespace Tango.PMR.Common {
"U3R1YlZhbHZlUmVzcG9uc2UQIBIbChdTdHViRXh0Rmxhc2hSZWFkUmVxdWVz",
"dBAhEhwKGFN0dWJFeHRGbGFzaFJlYWRSZXNwb25zZRAiEhwKGFN0dWJFeHRG",
"bGFzaFdyaXRlUmVxdWVzdBAjEh0KGVN0dWJFeHRGbGFzaFdyaXRlUmVzcG9u",
- "c2UQJBIlCiBFeHRlcm5hbEJyaWRnZVVkcERpc2NvdmVyeVBhY2tldBDoBxIf",
- "ChpFeHRlcm5hbENsaWVudExvZ2luUmVxdWVzdBDpBxIgChtFeHRlcm5hbENs",
- "aWVudExvZ2luUmVzcG9uc2UQ6gcSIQocRGlyZWN0U3luY2hyb25pemF0aW9u",
- "UmVxdWVzdBDrBxIiCh1EaXJlY3RTeW5jaHJvbml6YXRpb25SZXNwb25zZRDs",
- "BxIcChdPdmVycmlkZURhdGFCYXNlUmVxdWVzdBDtBxIdChhPdmVycmlkZURh",
- "dGFCYXNlUmVzcG9uc2UQ7gcSFQoQS2VlcEFsaXZlUmVxdWVzdBDvBxIWChFL",
- "ZWVwQWxpdmVSZXNwb25zZRDwB0IcChpjb20udHdpbmUudGFuZ28ucG1yLmNv",
- "bW1vbmIGcHJvdG8z"));
+ "c2UQJBIeChpTdHViRlBHQVJlYWRCYWNrUmVnUmVxdWVzdBAlEh8KG1N0dWJG",
+ "UEdBUmVhZEJhY2tSZWdSZXNwb25zZRAmEh4KGlN0dWJGUEdBUmVhZFZlcnNp",
+ "b25SZXF1ZXN0ECcSHwobU3R1YkZQR0FSZWFkVmVyc2lvblJlc3BvbnNlECgS",
+ "GgoWU3R1Ykw2NDcwRHJpdmVyUmVxdWVzdBApEhsKF1N0dWJMNjQ3MERyaXZl",
+ "clJlc3BvbnNlECoSGAoUU3R1Yk1vdG9ySW5pdFJlcXVlc3QQKxIZChVTdHVi",
+ "TW90b3JJbml0UmVzcG9uc2UQLBIXChNTdHViTW90b3JSdW5SZXF1ZXN0EC0S",
+ "GAoUU3R1Yk1vdG9yUnVuUmVzcG9uc2UQLhIYChRTdHViTW90b3JTdG9wUmVx",
+ "dWVzdBAvEhkKFVN0dWJNb3RvclN0b3BSZXNwb25zZRAwEhoKFlN0dWJNb3Rv",
+ "clN0YXR1c1JlcXVlc3QQMRIbChdTdHViTW90b3JTdGF0dXNSZXNwb25zZRAy",
+ "EhcKE1N0dWJNb3Rvck1vdlJlcXVlc3QQMxIYChRTdHViTW90b3JNb3ZSZXNw",
+ "b25zZRA0EhkKFVN0dWJNb3RvclNwZWVkUmVxdWVzdBA1EhoKFlN0dWJNb3Rv",
+ "clNwZWVkUmVzcG9uc2UQNhIcChhTdHViTW90b3JQb3NpdGlvblJlcXVlc3QQ",
+ "NxIdChlTdHViTW90b3JQb3NpdGlvblJlc3BvbnNlEDgSJQogRXh0ZXJuYWxC",
+ "cmlkZ2VVZHBEaXNjb3ZlcnlQYWNrZXQQ6AcSHwoaRXh0ZXJuYWxDbGllbnRM",
+ "b2dpblJlcXVlc3QQ6QcSIAobRXh0ZXJuYWxDbGllbnRMb2dpblJlc3BvbnNl",
+ "EOoHEiEKHERpcmVjdFN5bmNocm9uaXphdGlvblJlcXVlc3QQ6wcSIgodRGly",
+ "ZWN0U3luY2hyb25pemF0aW9uUmVzcG9uc2UQ7AcSHAoXT3ZlcnJpZGVEYXRh",
+ "QmFzZVJlcXVlc3QQ7QcSHQoYT3ZlcnJpZGVEYXRhQmFzZVJlc3BvbnNlEO4H",
+ "EhUKEEtlZXBBbGl2ZVJlcXVlc3QQ7wcSFgoRS2VlcEFsaXZlUmVzcG9uc2UQ",
+ "8AdCHAoaY29tLnR3aW5lLnRhbmdvLnBtci5jb21tb25iBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Common.MessageType), }, null));
@@ -102,6 +114,26 @@ namespace Tango.PMR.Common {
[pbr::OriginalName("StubExtFlashReadResponse")] StubExtFlashReadResponse = 34,
[pbr::OriginalName("StubExtFlashWriteRequest")] StubExtFlashWriteRequest = 35,
[pbr::OriginalName("StubExtFlashWriteResponse")] StubExtFlashWriteResponse = 36,
+ [pbr::OriginalName("StubFPGAReadBackRegRequest")] StubFpgareadBackRegRequest = 37,
+ [pbr::OriginalName("StubFPGAReadBackRegResponse")] StubFpgareadBackRegResponse = 38,
+ [pbr::OriginalName("StubFPGAReadVersionRequest")] StubFpgareadVersionRequest = 39,
+ [pbr::OriginalName("StubFPGAReadVersionResponse")] StubFpgareadVersionResponse = 40,
+ [pbr::OriginalName("StubL6470DriverRequest")] StubL6470DriverRequest = 41,
+ [pbr::OriginalName("StubL6470DriverResponse")] StubL6470DriverResponse = 42,
+ [pbr::OriginalName("StubMotorInitRequest")] StubMotorInitRequest = 43,
+ [pbr::OriginalName("StubMotorInitResponse")] StubMotorInitResponse = 44,
+ [pbr::OriginalName("StubMotorRunRequest")] StubMotorRunRequest = 45,
+ [pbr::OriginalName("StubMotorRunResponse")] StubMotorRunResponse = 46,
+ [pbr::OriginalName("StubMotorStopRequest")] StubMotorStopRequest = 47,
+ [pbr::OriginalName("StubMotorStopResponse")] StubMotorStopResponse = 48,
+ [pbr::OriginalName("StubMotorStatusRequest")] StubMotorStatusRequest = 49,
+ [pbr::OriginalName("StubMotorStatusResponse")] StubMotorStatusResponse = 50,
+ [pbr::OriginalName("StubMotorMovRequest")] StubMotorMovRequest = 51,
+ [pbr::OriginalName("StubMotorMovResponse")] StubMotorMovResponse = 52,
+ [pbr::OriginalName("StubMotorSpeedRequest")] StubMotorSpeedRequest = 53,
+ [pbr::OriginalName("StubMotorSpeedResponse")] StubMotorSpeedResponse = 54,
+ [pbr::OriginalName("StubMotorPositionRequest")] StubMotorPositionRequest = 55,
+ [pbr::OriginalName("StubMotorPositionResponse")] StubMotorPositionResponse = 56,
/// <summary>
///Integration
/// </summary>
diff --git a/Software/Visual_Studio/Tango.PMR/Jobs/Job.cs b/Software/Visual_Studio/Tango.PMR/Jobs/Job.cs
index d505436d4..82b6160ba 100644
--- a/Software/Visual_Studio/Tango.PMR/Jobs/Job.cs
+++ b/Software/Visual_Studio/Tango.PMR/Jobs/Job.cs
@@ -22,14 +22,19 @@ namespace Tango.PMR.Jobs {
static JobReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
- "CglKb2IucHJvdG8SDlRhbmdvLlBNUi5Kb2JzGg1TZWdtZW50LnByb3RvIj4K",
- "A0pvYhIMCgROYW1lGAEgASgJEikKCFNlZ21lbnRzGAIgAygLMhcuVGFuZ28u",
- "UE1SLkpvYnMuU2VnbWVudEIaChhjb20udHdpbmUudGFuZ28ucG1yLmpvYnNi",
- "BnByb3RvMw=="));
+ "CglKb2IucHJvdG8SDlRhbmdvLlBNUi5Kb2JzGg1TZWdtZW50LnByb3RvGgtt",
+ "b3Rvci5wcm90byKyAgoDSm9iEgwKBE5hbWUYASABKAkSFgoOaW50ZXJTZWdF",
+ "bmFibGUYAiABKAgSHQoVZGlzdGFuc2VUb1Nwb29sRW5hYmxlGAMgASgIEh0K",
+ "FWRpc3RhbmNlVG9TcG9vbExlbmd0aBgEIAEoDRIZChFzdGFydE9mZnNldFB1",
+ "bHNlcxgFIAEoDRIYChBzcG9vbEJhY2tpbmdSYXRlGAYgASgNEhsKE3NlZ21l",
+ "bnRPZmZzZXRQdWxzZXMYByABKA0SHQoVbWlsaW1ldGVyc1BlclJvdGF0aW9u",
+ "GAggASgNEikKCFNlZ21lbnRzGAkgAygLMhcuVGFuZ28uUE1SLkpvYnMuU2Vn",
+ "bWVudBIrCgZNb3RvcnMYCiADKAsyGy5UYW5nby5QTVIuSm9icy5Nb3RvckNv",
+ "bmZpZ0IaChhjb20udHdpbmUudGFuZ28ucG1yLmpvYnNiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
- new pbr::FileDescriptor[] { global::Tango.PMR.Jobs.SegmentReflection.Descriptor, },
+ new pbr::FileDescriptor[] { global::Tango.PMR.Jobs.SegmentReflection.Descriptor, global::Tango.PMR.Jobs.MotorReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Jobs.Job), global::Tango.PMR.Jobs.Job.Parser, new[]{ "Name", "Segments" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Jobs.Job), global::Tango.PMR.Jobs.Job.Parser, new[]{ "Name", "InterSegEnable", "DistanseToSpoolEnable", "DistanceToSpoolLength", "StartOffsetPulses", "SpoolBackingRate", "SegmentOffsetPulses", "MilimetersPerRotation", "Segments", "Motors" }, null, null, null)
}));
}
#endregion
@@ -61,7 +66,15 @@ namespace Tango.PMR.Jobs {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Job(Job other) : this() {
name_ = other.name_;
+ interSegEnable_ = other.interSegEnable_;
+ distanseToSpoolEnable_ = other.distanseToSpoolEnable_;
+ distanceToSpoolLength_ = other.distanceToSpoolLength_;
+ startOffsetPulses_ = other.startOffsetPulses_;
+ spoolBackingRate_ = other.spoolBackingRate_;
+ segmentOffsetPulses_ = other.segmentOffsetPulses_;
+ milimetersPerRotation_ = other.milimetersPerRotation_;
segments_ = other.segments_.Clone();
+ motors_ = other.motors_.Clone();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -80,16 +93,116 @@ namespace Tango.PMR.Jobs {
}
}
+ /// <summary>Field number for the "interSegEnable" field.</summary>
+ public const int InterSegEnableFieldNumber = 2;
+ private bool interSegEnable_;
+ /// <summary>
+ ///does user have chosen inter segment enable option
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool InterSegEnable {
+ get { return interSegEnable_; }
+ set {
+ interSegEnable_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "distanseToSpoolEnable" field.</summary>
+ public const int DistanseToSpoolEnableFieldNumber = 3;
+ private bool distanseToSpoolEnable_;
+ /// <summary>
+ ///does user have chosen distanse to spool enable option
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool DistanseToSpoolEnable {
+ get { return distanseToSpoolEnable_; }
+ set {
+ distanseToSpoolEnable_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "distanceToSpoolLength" field.</summary>
+ public const int DistanceToSpoolLengthFieldNumber = 4;
+ private uint distanceToSpoolLength_;
+ /// <summary>
+ ///had distance to spool finished?
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint DistanceToSpoolLength {
+ get { return distanceToSpoolLength_; }
+ set {
+ distanceToSpoolLength_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "startOffsetPulses" field.</summary>
+ public const int StartOffsetPulsesFieldNumber = 5;
+ private uint startOffsetPulses_;
+ /// <summary>
+ ///repeated temperatureSensorsSetting[Dryer,Head, Mixer]; //temp sensor wanted temperaure in celzius
+ ///SCREW:
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint StartOffsetPulses {
+ get { return startOffsetPulses_; }
+ set {
+ startOffsetPulses_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "spoolBackingRate" field.</summary>
+ public const int SpoolBackingRateFieldNumber = 6;
+ private uint spoolBackingRate_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint SpoolBackingRate {
+ get { return spoolBackingRate_; }
+ set {
+ spoolBackingRate_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "segmentOffsetPulses" field.</summary>
+ public const int SegmentOffsetPulsesFieldNumber = 7;
+ private uint segmentOffsetPulses_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint SegmentOffsetPulses {
+ get { return segmentOffsetPulses_; }
+ set {
+ segmentOffsetPulses_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "milimetersPerRotation" field.</summary>
+ public const int MilimetersPerRotationFieldNumber = 8;
+ private uint milimetersPerRotation_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MilimetersPerRotation {
+ get { return milimetersPerRotation_; }
+ set {
+ milimetersPerRotation_ = value;
+ }
+ }
+
/// <summary>Field number for the "Segments" field.</summary>
- public const int SegmentsFieldNumber = 2;
+ public const int SegmentsFieldNumber = 9;
private static readonly pb::FieldCodec<global::Tango.PMR.Jobs.Segment> _repeated_segments_codec
- = pb::FieldCodec.ForMessage(18, global::Tango.PMR.Jobs.Segment.Parser);
+ = pb::FieldCodec.ForMessage(74, global::Tango.PMR.Jobs.Segment.Parser);
private readonly pbc::RepeatedField<global::Tango.PMR.Jobs.Segment> segments_ = new pbc::RepeatedField<global::Tango.PMR.Jobs.Segment>();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Tango.PMR.Jobs.Segment> Segments {
get { return segments_; }
}
+ /// <summary>Field number for the "Motors" field.</summary>
+ public const int MotorsFieldNumber = 10;
+ private static readonly pb::FieldCodec<global::Tango.PMR.Jobs.MotorConfig> _repeated_motors_codec
+ = pb::FieldCodec.ForMessage(82, global::Tango.PMR.Jobs.MotorConfig.Parser);
+ private readonly pbc::RepeatedField<global::Tango.PMR.Jobs.MotorConfig> motors_ = new pbc::RepeatedField<global::Tango.PMR.Jobs.MotorConfig>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Tango.PMR.Jobs.MotorConfig> Motors {
+ get { return motors_; }
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as Job);
@@ -104,7 +217,15 @@ namespace Tango.PMR.Jobs {
return true;
}
if (Name != other.Name) return false;
+ if (InterSegEnable != other.InterSegEnable) return false;
+ if (DistanseToSpoolEnable != other.DistanseToSpoolEnable) return false;
+ if (DistanceToSpoolLength != other.DistanceToSpoolLength) return false;
+ if (StartOffsetPulses != other.StartOffsetPulses) return false;
+ if (SpoolBackingRate != other.SpoolBackingRate) return false;
+ if (SegmentOffsetPulses != other.SegmentOffsetPulses) return false;
+ if (MilimetersPerRotation != other.MilimetersPerRotation) return false;
if(!segments_.Equals(other.segments_)) return false;
+ if(!motors_.Equals(other.motors_)) return false;
return true;
}
@@ -112,7 +233,15 @@ namespace Tango.PMR.Jobs {
public override int GetHashCode() {
int hash = 1;
if (Name.Length != 0) hash ^= Name.GetHashCode();
+ if (InterSegEnable != false) hash ^= InterSegEnable.GetHashCode();
+ if (DistanseToSpoolEnable != false) hash ^= DistanseToSpoolEnable.GetHashCode();
+ if (DistanceToSpoolLength != 0) hash ^= DistanceToSpoolLength.GetHashCode();
+ if (StartOffsetPulses != 0) hash ^= StartOffsetPulses.GetHashCode();
+ if (SpoolBackingRate != 0) hash ^= SpoolBackingRate.GetHashCode();
+ if (SegmentOffsetPulses != 0) hash ^= SegmentOffsetPulses.GetHashCode();
+ if (MilimetersPerRotation != 0) hash ^= MilimetersPerRotation.GetHashCode();
hash ^= segments_.GetHashCode();
+ hash ^= motors_.GetHashCode();
return hash;
}
@@ -127,7 +256,36 @@ namespace Tango.PMR.Jobs {
output.WriteRawTag(10);
output.WriteString(Name);
}
+ if (InterSegEnable != false) {
+ output.WriteRawTag(16);
+ output.WriteBool(InterSegEnable);
+ }
+ if (DistanseToSpoolEnable != false) {
+ output.WriteRawTag(24);
+ output.WriteBool(DistanseToSpoolEnable);
+ }
+ if (DistanceToSpoolLength != 0) {
+ output.WriteRawTag(32);
+ output.WriteUInt32(DistanceToSpoolLength);
+ }
+ if (StartOffsetPulses != 0) {
+ output.WriteRawTag(40);
+ output.WriteUInt32(StartOffsetPulses);
+ }
+ if (SpoolBackingRate != 0) {
+ output.WriteRawTag(48);
+ output.WriteUInt32(SpoolBackingRate);
+ }
+ if (SegmentOffsetPulses != 0) {
+ output.WriteRawTag(56);
+ output.WriteUInt32(SegmentOffsetPulses);
+ }
+ if (MilimetersPerRotation != 0) {
+ output.WriteRawTag(64);
+ output.WriteUInt32(MilimetersPerRotation);
+ }
segments_.WriteTo(output, _repeated_segments_codec);
+ motors_.WriteTo(output, _repeated_motors_codec);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -136,7 +294,29 @@ namespace Tango.PMR.Jobs {
if (Name.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
}
+ if (InterSegEnable != false) {
+ size += 1 + 1;
+ }
+ if (DistanseToSpoolEnable != false) {
+ size += 1 + 1;
+ }
+ if (DistanceToSpoolLength != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(DistanceToSpoolLength);
+ }
+ if (StartOffsetPulses != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(StartOffsetPulses);
+ }
+ if (SpoolBackingRate != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(SpoolBackingRate);
+ }
+ if (SegmentOffsetPulses != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(SegmentOffsetPulses);
+ }
+ if (MilimetersPerRotation != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MilimetersPerRotation);
+ }
size += segments_.CalculateSize(_repeated_segments_codec);
+ size += motors_.CalculateSize(_repeated_motors_codec);
return size;
}
@@ -148,7 +328,29 @@ namespace Tango.PMR.Jobs {
if (other.Name.Length != 0) {
Name = other.Name;
}
+ if (other.InterSegEnable != false) {
+ InterSegEnable = other.InterSegEnable;
+ }
+ if (other.DistanseToSpoolEnable != false) {
+ DistanseToSpoolEnable = other.DistanseToSpoolEnable;
+ }
+ if (other.DistanceToSpoolLength != 0) {
+ DistanceToSpoolLength = other.DistanceToSpoolLength;
+ }
+ if (other.StartOffsetPulses != 0) {
+ StartOffsetPulses = other.StartOffsetPulses;
+ }
+ if (other.SpoolBackingRate != 0) {
+ SpoolBackingRate = other.SpoolBackingRate;
+ }
+ if (other.SegmentOffsetPulses != 0) {
+ SegmentOffsetPulses = other.SegmentOffsetPulses;
+ }
+ if (other.MilimetersPerRotation != 0) {
+ MilimetersPerRotation = other.MilimetersPerRotation;
+ }
segments_.Add(other.segments_);
+ motors_.Add(other.motors_);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -163,10 +365,42 @@ namespace Tango.PMR.Jobs {
Name = input.ReadString();
break;
}
- case 18: {
+ case 16: {
+ InterSegEnable = input.ReadBool();
+ break;
+ }
+ case 24: {
+ DistanseToSpoolEnable = input.ReadBool();
+ break;
+ }
+ case 32: {
+ DistanceToSpoolLength = input.ReadUInt32();
+ break;
+ }
+ case 40: {
+ StartOffsetPulses = input.ReadUInt32();
+ break;
+ }
+ case 48: {
+ SpoolBackingRate = input.ReadUInt32();
+ break;
+ }
+ case 56: {
+ SegmentOffsetPulses = input.ReadUInt32();
+ break;
+ }
+ case 64: {
+ MilimetersPerRotation = input.ReadUInt32();
+ break;
+ }
+ case 74: {
segments_.AddEntriesFrom(input, _repeated_segments_codec);
break;
}
+ case 82: {
+ motors_.AddEntriesFrom(input, _repeated_motors_codec);
+ break;
+ }
}
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/Jobs/Segment.cs b/Software/Visual_Studio/Tango.PMR/Jobs/Segment.cs
index 440650812..d990ac5d1 100644
--- a/Software/Visual_Studio/Tango.PMR/Jobs/Segment.cs
+++ b/Software/Visual_Studio/Tango.PMR/Jobs/Segment.cs
@@ -22,14 +22,15 @@ namespace Tango.PMR.Jobs {
static SegmentReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
- "Cg1TZWdtZW50LnByb3RvEg5UYW5nby5QTVIuSm9icxoJUkdCLnByb3RvIk0K",
- "B1NlZ21lbnQSDAoETmFtZRgBIAEoCRIOCgZMZW5ndGgYAiABKAUSJAoFQ29s",
- "b3IYAyABKAsyFS5UYW5nby5QTVIuQ29tbW9uLlJHQkIaChhjb20udHdpbmUu",
- "dGFuZ28ucG1yLmpvYnNiBnByb3RvMw=="));
+ "Cg1TZWdtZW50LnByb3RvEg5UYW5nby5QTVIuSm9icxoJUkdCLnByb3RvGg9k",
+ "aXNwZW5zZXIucHJvdG8iegoHU2VnbWVudBIMCgROYW1lGAEgASgJEg4KBkxl",
+ "bmd0aBgCIAEoBRIkCgVDb2xvchgDIAEoCzIVLlRhbmdvLlBNUi5Db21tb24u",
+ "UkdCEisKCWRpc3BlbnNlchgEIAMoCzIYLlRhbmdvLlBNUi5Kb2JzLkRpc3Bl",
+ "bnNlQhoKGGNvbS50d2luZS50YW5nby5wbXIuam9ic2IGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
- new pbr::FileDescriptor[] { global::Tango.PMR.Common.RGBReflection.Descriptor, },
+ new pbr::FileDescriptor[] { global::Tango.PMR.Common.RGBReflection.Descriptor, global::Tango.PMR.Jobs.DispenserReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Jobs.Segment), global::Tango.PMR.Jobs.Segment.Parser, new[]{ "Name", "Length", "Color" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Jobs.Segment), global::Tango.PMR.Jobs.Segment.Parser, new[]{ "Name", "Length", "Color", "Dispenser" }, null, null, null)
}));
}
#endregion
@@ -63,6 +64,7 @@ namespace Tango.PMR.Jobs {
name_ = other.name_;
length_ = other.length_;
Color = other.color_ != null ? other.Color.Clone() : null;
+ dispenser_ = other.dispenser_.Clone();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -103,6 +105,16 @@ namespace Tango.PMR.Jobs {
}
}
+ /// <summary>Field number for the "dispenser" field.</summary>
+ public const int DispenserFieldNumber = 4;
+ private static readonly pb::FieldCodec<global::Tango.PMR.Jobs.Dispense> _repeated_dispenser_codec
+ = pb::FieldCodec.ForMessage(34, global::Tango.PMR.Jobs.Dispense.Parser);
+ private readonly pbc::RepeatedField<global::Tango.PMR.Jobs.Dispense> dispenser_ = new pbc::RepeatedField<global::Tango.PMR.Jobs.Dispense>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Tango.PMR.Jobs.Dispense> Dispenser {
+ get { return dispenser_; }
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as Segment);
@@ -119,6 +131,7 @@ namespace Tango.PMR.Jobs {
if (Name != other.Name) return false;
if (Length != other.Length) return false;
if (!object.Equals(Color, other.Color)) return false;
+ if(!dispenser_.Equals(other.dispenser_)) return false;
return true;
}
@@ -128,6 +141,7 @@ namespace Tango.PMR.Jobs {
if (Name.Length != 0) hash ^= Name.GetHashCode();
if (Length != 0) hash ^= Length.GetHashCode();
if (color_ != null) hash ^= Color.GetHashCode();
+ hash ^= dispenser_.GetHashCode();
return hash;
}
@@ -150,6 +164,7 @@ namespace Tango.PMR.Jobs {
output.WriteRawTag(26);
output.WriteMessage(Color);
}
+ dispenser_.WriteTo(output, _repeated_dispenser_codec);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -164,6 +179,7 @@ namespace Tango.PMR.Jobs {
if (color_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Color);
}
+ size += dispenser_.CalculateSize(_repeated_dispenser_codec);
return size;
}
@@ -184,6 +200,7 @@ namespace Tango.PMR.Jobs {
}
Color.MergeFrom(other.Color);
}
+ dispenser_.Add(other.dispenser_);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -209,6 +226,10 @@ namespace Tango.PMR.Jobs {
input.ReadMessage(color_);
break;
}
+ case 34: {
+ dispenser_.AddEntriesFrom(input, _repeated_dispenser_codec);
+ break;
+ }
}
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubFPGAReadBackRegRequest.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubFPGAReadBackRegRequest.cs
new file mode 100644
index 000000000..fd0f8b625
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubFPGAReadBackRegRequest.cs
@@ -0,0 +1,194 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubFPGAReadBackRegRequest.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 {
+
+ /// <summary>Holder for reflection information generated from StubFPGAReadBackRegRequest.proto</summary>
+ public static partial class StubFPGAReadBackRegRequestReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubFPGAReadBackRegRequest.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubFPGAReadBackRegRequestReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "CiBTdHViRlBHQVJlYWRCYWNrUmVnUmVxdWVzdC5wcm90bxIPVGFuZ28uUE1S",
+ "LlN0dWJzIjsKGlN0dWJGUEdBUmVhZEJhY2tSZWdSZXF1ZXN0Eg4KBkZQR0FJ",
+ "ZBgBIAEoDRINCgVWYWx1ZRgCIAEoDUIbChljb20udHdpbmUudGFuZ28ucG1y",
+ "LnN0dWJzYgZwcm90bzM="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubFPGAReadBackRegRequest), global::Tango.PMR.Stubs.StubFPGAReadBackRegRequest.Parser, new[]{ "FPGAId", "Value" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubFPGAReadBackRegRequest : pb::IMessage<StubFPGAReadBackRegRequest> {
+ private static readonly pb::MessageParser<StubFPGAReadBackRegRequest> _parser = new pb::MessageParser<StubFPGAReadBackRegRequest>(() => new StubFPGAReadBackRegRequest());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubFPGAReadBackRegRequest> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubFPGAReadBackRegRequestReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubFPGAReadBackRegRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubFPGAReadBackRegRequest(StubFPGAReadBackRegRequest other) : this() {
+ fPGAId_ = other.fPGAId_;
+ value_ = other.value_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubFPGAReadBackRegRequest Clone() {
+ return new StubFPGAReadBackRegRequest(this);
+ }
+
+ /// <summary>Field number for the "FPGAId" field.</summary>
+ public const int FPGAIdFieldNumber = 1;
+ private uint fPGAId_;
+ /// <summary>
+ /// 0..2
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint FPGAId {
+ get { return fPGAId_; }
+ set {
+ fPGAId_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Value" field.</summary>
+ public const int ValueFieldNumber = 2;
+ private uint value_;
+ /// <summary>
+ /// 16 bit
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint Value {
+ get { return value_; }
+ set {
+ value_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as StubFPGAReadBackRegRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubFPGAReadBackRegRequest other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (FPGAId != other.FPGAId) return false;
+ if (Value != other.Value) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (FPGAId != 0) hash ^= FPGAId.GetHashCode();
+ if (Value != 0) hash ^= Value.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 (FPGAId != 0) {
+ output.WriteRawTag(8);
+ output.WriteUInt32(FPGAId);
+ }
+ if (Value != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(Value);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (FPGAId != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(FPGAId);
+ }
+ if (Value != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Value);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(StubFPGAReadBackRegRequest other) {
+ if (other == null) {
+ return;
+ }
+ if (other.FPGAId != 0) {
+ FPGAId = other.FPGAId;
+ }
+ if (other.Value != 0) {
+ Value = other.Value;
+ }
+ }
+
+ [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: {
+ FPGAId = input.ReadUInt32();
+ break;
+ }
+ case 16: {
+ Value = input.ReadUInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubFPGAReadBackRegResponse.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubFPGAReadBackRegResponse.cs
new file mode 100644
index 000000000..46183c009
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubFPGAReadBackRegResponse.cs
@@ -0,0 +1,257 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubFPGAReadBackRegResponse.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 {
+
+ /// <summary>Holder for reflection information generated from StubFPGAReadBackRegResponse.proto</summary>
+ public static partial class StubFPGAReadBackRegResponseReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubFPGAReadBackRegResponse.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubFPGAReadBackRegResponseReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "CiFTdHViRlBHQVJlYWRCYWNrUmVnUmVzcG9uc2UucHJvdG8SD1RhbmdvLlBN",
+ "Ui5TdHVicyJoChtTdHViRlBHQVJlYWRCYWNrUmVnUmVzcG9uc2USDgoGRlBH",
+ "QUlkGAEgASgNEhUKDVJlYWRCYWNrVmFsdWUYAiABKA0SDgoGU3RhdHVzGAQg",
+ "ASgJEhIKClN0YXR1c1dvcmQYBSABKA1CGwoZY29tLnR3aW5lLnRhbmdvLnBt",
+ "ci5zdHVic2IGcHJvdG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubFPGAReadBackRegResponse), global::Tango.PMR.Stubs.StubFPGAReadBackRegResponse.Parser, new[]{ "FPGAId", "ReadBackValue", "Status", "StatusWord" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubFPGAReadBackRegResponse : pb::IMessage<StubFPGAReadBackRegResponse> {
+ private static readonly pb::MessageParser<StubFPGAReadBackRegResponse> _parser = new pb::MessageParser<StubFPGAReadBackRegResponse>(() => new StubFPGAReadBackRegResponse());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubFPGAReadBackRegResponse> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubFPGAReadBackRegResponseReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubFPGAReadBackRegResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubFPGAReadBackRegResponse(StubFPGAReadBackRegResponse other) : this() {
+ fPGAId_ = other.fPGAId_;
+ readBackValue_ = other.readBackValue_;
+ status_ = other.status_;
+ statusWord_ = other.statusWord_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubFPGAReadBackRegResponse Clone() {
+ return new StubFPGAReadBackRegResponse(this);
+ }
+
+ /// <summary>Field number for the "FPGAId" field.</summary>
+ public const int FPGAIdFieldNumber = 1;
+ private uint fPGAId_;
+ /// <summary>
+ /// 0..2
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint FPGAId {
+ get { return fPGAId_; }
+ set {
+ fPGAId_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "ReadBackValue" field.</summary>
+ public const int ReadBackValueFieldNumber = 2;
+ private uint readBackValue_;
+ /// <summary>
+ /// 16 bit
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint ReadBackValue {
+ get { return readBackValue_; }
+ set {
+ readBackValue_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Status" field.</summary>
+ public const int StatusFieldNumber = 4;
+ private string status_ = "";
+ /// <summary>
+ /// Passed/Failed
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string Status {
+ get { return status_; }
+ set {
+ status_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// <summary>Field number for the "StatusWord" field.</summary>
+ public const int StatusWordFieldNumber = 5;
+ private uint statusWord_;
+ /// <summary>
+ /// Error number/bit when the status is Failed
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint StatusWord {
+ get { return statusWord_; }
+ set {
+ statusWord_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as StubFPGAReadBackRegResponse);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubFPGAReadBackRegResponse other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (FPGAId != other.FPGAId) return false;
+ if (ReadBackValue != other.ReadBackValue) return false;
+ if (Status != other.Status) return false;
+ if (StatusWord != other.StatusWord) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (FPGAId != 0) hash ^= FPGAId.GetHashCode();
+ if (ReadBackValue != 0) hash ^= ReadBackValue.GetHashCode();
+ if (Status.Length != 0) hash ^= Status.GetHashCode();
+ if (StatusWord != 0) hash ^= StatusWord.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 (FPGAId != 0) {
+ output.WriteRawTag(8);
+ output.WriteUInt32(FPGAId);
+ }
+ if (ReadBackValue != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(ReadBackValue);
+ }
+ if (Status.Length != 0) {
+ output.WriteRawTag(34);
+ output.WriteString(Status);
+ }
+ if (StatusWord != 0) {
+ output.WriteRawTag(40);
+ output.WriteUInt32(StatusWord);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (FPGAId != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(FPGAId);
+ }
+ if (ReadBackValue != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(ReadBackValue);
+ }
+ if (Status.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Status);
+ }
+ if (StatusWord != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(StatusWord);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(StubFPGAReadBackRegResponse other) {
+ if (other == null) {
+ return;
+ }
+ if (other.FPGAId != 0) {
+ FPGAId = other.FPGAId;
+ }
+ if (other.ReadBackValue != 0) {
+ ReadBackValue = other.ReadBackValue;
+ }
+ if (other.Status.Length != 0) {
+ Status = other.Status;
+ }
+ if (other.StatusWord != 0) {
+ StatusWord = other.StatusWord;
+ }
+ }
+
+ [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: {
+ FPGAId = input.ReadUInt32();
+ break;
+ }
+ case 16: {
+ ReadBackValue = input.ReadUInt32();
+ break;
+ }
+ case 34: {
+ Status = input.ReadString();
+ break;
+ }
+ case 40: {
+ StatusWord = input.ReadUInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubFPGAReadVersionRequest.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubFPGAReadVersionRequest.cs
new file mode 100644
index 000000000..6ab1e5b6b
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubFPGAReadVersionRequest.cs
@@ -0,0 +1,162 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubFPGAReadVersionRequest.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 {
+
+ /// <summary>Holder for reflection information generated from StubFPGAReadVersionRequest.proto</summary>
+ public static partial class StubFPGAReadVersionRequestReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubFPGAReadVersionRequest.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubFPGAReadVersionRequestReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "CiBTdHViRlBHQVJlYWRWZXJzaW9uUmVxdWVzdC5wcm90bxIPVGFuZ28uUE1S",
+ "LlN0dWJzIiwKGlN0dWJGUEdBUmVhZFZlcnNpb25SZXF1ZXN0Eg4KBkZQR0FJ",
+ "ZBgBIAEoDUIbChljb20udHdpbmUudGFuZ28ucG1yLnN0dWJzYgZwcm90bzM="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubFPGAReadVersionRequest), global::Tango.PMR.Stubs.StubFPGAReadVersionRequest.Parser, new[]{ "FPGAId" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubFPGAReadVersionRequest : pb::IMessage<StubFPGAReadVersionRequest> {
+ private static readonly pb::MessageParser<StubFPGAReadVersionRequest> _parser = new pb::MessageParser<StubFPGAReadVersionRequest>(() => new StubFPGAReadVersionRequest());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubFPGAReadVersionRequest> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubFPGAReadVersionRequestReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubFPGAReadVersionRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubFPGAReadVersionRequest(StubFPGAReadVersionRequest other) : this() {
+ fPGAId_ = other.fPGAId_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubFPGAReadVersionRequest Clone() {
+ return new StubFPGAReadVersionRequest(this);
+ }
+
+ /// <summary>Field number for the "FPGAId" field.</summary>
+ public const int FPGAIdFieldNumber = 1;
+ private uint fPGAId_;
+ /// <summary>
+ /// 0..2
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint FPGAId {
+ get { return fPGAId_; }
+ set {
+ fPGAId_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as StubFPGAReadVersionRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubFPGAReadVersionRequest other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (FPGAId != other.FPGAId) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (FPGAId != 0) hash ^= FPGAId.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 (FPGAId != 0) {
+ output.WriteRawTag(8);
+ output.WriteUInt32(FPGAId);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (FPGAId != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(FPGAId);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(StubFPGAReadVersionRequest other) {
+ if (other == null) {
+ return;
+ }
+ if (other.FPGAId != 0) {
+ FPGAId = other.FPGAId;
+ }
+ }
+
+ [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: {
+ FPGAId = input.ReadUInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubFPGAReadVersionResponse.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubFPGAReadVersionResponse.cs
new file mode 100644
index 000000000..6d73a2dd1
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubFPGAReadVersionResponse.cs
@@ -0,0 +1,339 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubFPGAReadVersionResponse.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 {
+
+ /// <summary>Holder for reflection information generated from StubFPGAReadVersionResponse.proto</summary>
+ public static partial class StubFPGAReadVersionResponseReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubFPGAReadVersionResponse.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubFPGAReadVersionResponseReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "CiFTdHViRlBHQVJlYWRWZXJzaW9uUmVzcG9uc2UucHJvdG8SD1RhbmdvLlBN",
+ "Ui5TdHVicyKMAQobU3R1YkZQR0FSZWFkVmVyc2lvblJlc3BvbnNlEg4KBkZQ",
+ "R0FJZBgBIAEoDRILCgNEYXkYAiABKA0SDQoFTW9udGgYAyABKA0SDAoEWWVh",
+ "chgEIAEoDRIPCgdWZXJfbnVtGAUgASgNEg4KBlN0YXR1cxgGIAEoCRISCgpT",
+ "dGF0dXNXb3JkGAcgASgNQhsKGWNvbS50d2luZS50YW5nby5wbXIuc3R1YnNi",
+ "BnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubFPGAReadVersionResponse), global::Tango.PMR.Stubs.StubFPGAReadVersionResponse.Parser, new[]{ "FPGAId", "Day", "Month", "Year", "VerNum", "Status", "StatusWord" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubFPGAReadVersionResponse : pb::IMessage<StubFPGAReadVersionResponse> {
+ private static readonly pb::MessageParser<StubFPGAReadVersionResponse> _parser = new pb::MessageParser<StubFPGAReadVersionResponse>(() => new StubFPGAReadVersionResponse());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubFPGAReadVersionResponse> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubFPGAReadVersionResponseReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubFPGAReadVersionResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubFPGAReadVersionResponse(StubFPGAReadVersionResponse other) : this() {
+ fPGAId_ = other.fPGAId_;
+ day_ = other.day_;
+ month_ = other.month_;
+ year_ = other.year_;
+ verNum_ = other.verNum_;
+ status_ = other.status_;
+ statusWord_ = other.statusWord_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubFPGAReadVersionResponse Clone() {
+ return new StubFPGAReadVersionResponse(this);
+ }
+
+ /// <summary>Field number for the "FPGAId" field.</summary>
+ public const int FPGAIdFieldNumber = 1;
+ private uint fPGAId_;
+ /// <summary>
+ /// 0..2
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint FPGAId {
+ get { return fPGAId_; }
+ set {
+ fPGAId_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Day" field.</summary>
+ public const int DayFieldNumber = 2;
+ private uint day_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint Day {
+ get { return day_; }
+ set {
+ day_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Month" field.</summary>
+ public const int MonthFieldNumber = 3;
+ private uint month_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint Month {
+ get { return month_; }
+ set {
+ month_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Year" field.</summary>
+ public const int YearFieldNumber = 4;
+ private uint year_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint Year {
+ get { return year_; }
+ set {
+ year_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Ver_num" field.</summary>
+ public const int VerNumFieldNumber = 5;
+ private uint verNum_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint VerNum {
+ get { return verNum_; }
+ set {
+ verNum_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Status" field.</summary>
+ public const int StatusFieldNumber = 6;
+ private string status_ = "";
+ /// <summary>
+ /// Passed/Failed
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string Status {
+ get { return status_; }
+ set {
+ status_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// <summary>Field number for the "StatusWord" field.</summary>
+ public const int StatusWordFieldNumber = 7;
+ private uint statusWord_;
+ /// <summary>
+ /// Error number/bit when the status is Failed
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint StatusWord {
+ get { return statusWord_; }
+ set {
+ statusWord_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as StubFPGAReadVersionResponse);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubFPGAReadVersionResponse other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (FPGAId != other.FPGAId) return false;
+ if (Day != other.Day) return false;
+ if (Month != other.Month) return false;
+ if (Year != other.Year) return false;
+ if (VerNum != other.VerNum) return false;
+ if (Status != other.Status) return false;
+ if (StatusWord != other.StatusWord) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (FPGAId != 0) hash ^= FPGAId.GetHashCode();
+ if (Day != 0) hash ^= Day.GetHashCode();
+ if (Month != 0) hash ^= Month.GetHashCode();
+ if (Year != 0) hash ^= Year.GetHashCode();
+ if (VerNum != 0) hash ^= VerNum.GetHashCode();
+ if (Status.Length != 0) hash ^= Status.GetHashCode();
+ if (StatusWord != 0) hash ^= StatusWord.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 (FPGAId != 0) {
+ output.WriteRawTag(8);
+ output.WriteUInt32(FPGAId);
+ }
+ if (Day != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(Day);
+ }
+ if (Month != 0) {
+ output.WriteRawTag(24);
+ output.WriteUInt32(Month);
+ }
+ if (Year != 0) {
+ output.WriteRawTag(32);
+ output.WriteUInt32(Year);
+ }
+ if (VerNum != 0) {
+ output.WriteRawTag(40);
+ output.WriteUInt32(VerNum);
+ }
+ if (Status.Length != 0) {
+ output.WriteRawTag(50);
+ output.WriteString(Status);
+ }
+ if (StatusWord != 0) {
+ output.WriteRawTag(56);
+ output.WriteUInt32(StatusWord);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (FPGAId != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(FPGAId);
+ }
+ if (Day != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Day);
+ }
+ if (Month != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Month);
+ }
+ if (Year != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Year);
+ }
+ if (VerNum != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(VerNum);
+ }
+ if (Status.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Status);
+ }
+ if (StatusWord != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(StatusWord);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(StubFPGAReadVersionResponse other) {
+ if (other == null) {
+ return;
+ }
+ if (other.FPGAId != 0) {
+ FPGAId = other.FPGAId;
+ }
+ if (other.Day != 0) {
+ Day = other.Day;
+ }
+ if (other.Month != 0) {
+ Month = other.Month;
+ }
+ if (other.Year != 0) {
+ Year = other.Year;
+ }
+ if (other.VerNum != 0) {
+ VerNum = other.VerNum;
+ }
+ if (other.Status.Length != 0) {
+ Status = other.Status;
+ }
+ if (other.StatusWord != 0) {
+ StatusWord = other.StatusWord;
+ }
+ }
+
+ [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: {
+ FPGAId = input.ReadUInt32();
+ break;
+ }
+ case 16: {
+ Day = input.ReadUInt32();
+ break;
+ }
+ case 24: {
+ Month = input.ReadUInt32();
+ break;
+ }
+ case 32: {
+ Year = input.ReadUInt32();
+ break;
+ }
+ case 40: {
+ VerNum = input.ReadUInt32();
+ break;
+ }
+ case 50: {
+ Status = input.ReadString();
+ break;
+ }
+ case 56: {
+ StatusWord = input.ReadUInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubL6470DriverRequest.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubL6470DriverRequest.cs
new file mode 100644
index 000000000..74a13832a
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubL6470DriverRequest.cs
@@ -0,0 +1,701 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubL6470DriverRequest.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 {
+
+ /// <summary>Holder for reflection information generated from StubL6470DriverRequest.proto</summary>
+ public static partial class StubL6470DriverRequestReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubL6470DriverRequest.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubL6470DriverRequestReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChxTdHViTDY0NzBEcml2ZXJSZXF1ZXN0LnByb3RvEg9UYW5nby5QTVIuU3R1",
+ "YnMizAMKFlN0dWJMNjQ3MERyaXZlclJlcXVlc3QSEQoJUnVuX1ZhbHVlGAEg",
+ "ASgNEhEKCU1vdl9WYWx1ZRgCIAEoDRIRCglEaXJlY3Rpb24YAyABKAgSHwoX",
+ "VGltZV8yX0NoYW5nZV9EaXJlY3Rpb24YBCABKA0SGQoRRGlzcGxheV9UeF9P",
+ "Tl9MQ0QYBSABKAgSGQoRRGlzcGxheV9SeF9vbl9MQ0QYBiABKAgSFgoOSW5p",
+ "dF9NaWNyb1N0ZXAYByABKA0SEAoISW5pdF9BY2MYCCABKA0SEAoISW5pdF9E",
+ "ZWMYCSABKA0SEgoKVGVzdEJvb2xfMRgKIAEoCBISCgpUZXN0Qm9vbF8yGAsg",
+ "ASgIEhIKClRlc3RCb29sXzMYDCABKAgSEgoKVGVzdEJvb2xfNBgNIAEoCBIS",
+ "CgpUZXN0Qm9vbF81GA4gASgIEhQKDFRlc3RVaW50MzJfMRgPIAEoDRIUCgxU",
+ "ZXN0VWludDMyXzIYECABKA0SFAoMVGVzdFVpbnQzMl8zGBEgASgNEhQKDFRl",
+ "c3RVaW50MzJfNBgSIAEoDRIUCgxUZXN0VWludDMyXzUYEyABKA0SFAoMVGVz",
+ "dFVpbnQzMl82GBQgASgNQhsKGWNvbS50d2luZS50YW5nby5wbXIuc3R1YnNi",
+ "BnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubL6470DriverRequest), global::Tango.PMR.Stubs.StubL6470DriverRequest.Parser, new[]{ "RunValue", "MovValue", "Direction", "Time2ChangeDirection", "DisplayTxONLCD", "DisplayRxOnLCD", "InitMicroStep", "InitAcc", "InitDec", "TestBool1", "TestBool2", "TestBool3", "TestBool4", "TestBool5", "TestUint321", "TestUint322", "TestUint323", "TestUint324", "TestUint325", "TestUint326" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubL6470DriverRequest : pb::IMessage<StubL6470DriverRequest> {
+ private static readonly pb::MessageParser<StubL6470DriverRequest> _parser = new pb::MessageParser<StubL6470DriverRequest>(() => new StubL6470DriverRequest());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubL6470DriverRequest> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubL6470DriverRequestReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubL6470DriverRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubL6470DriverRequest(StubL6470DriverRequest other) : this() {
+ runValue_ = other.runValue_;
+ movValue_ = other.movValue_;
+ direction_ = other.direction_;
+ time2ChangeDirection_ = other.time2ChangeDirection_;
+ displayTxONLCD_ = other.displayTxONLCD_;
+ displayRxOnLCD_ = other.displayRxOnLCD_;
+ initMicroStep_ = other.initMicroStep_;
+ initAcc_ = other.initAcc_;
+ initDec_ = other.initDec_;
+ testBool1_ = other.testBool1_;
+ testBool2_ = other.testBool2_;
+ testBool3_ = other.testBool3_;
+ testBool4_ = other.testBool4_;
+ testBool5_ = other.testBool5_;
+ testUint321_ = other.testUint321_;
+ testUint322_ = other.testUint322_;
+ testUint323_ = other.testUint323_;
+ testUint324_ = other.testUint324_;
+ testUint325_ = other.testUint325_;
+ testUint326_ = other.testUint326_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubL6470DriverRequest Clone() {
+ return new StubL6470DriverRequest(this);
+ }
+
+ /// <summary>Field number for the "Run_Value" field.</summary>
+ public const int RunValueFieldNumber = 1;
+ private uint runValue_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint RunValue {
+ get { return runValue_; }
+ set {
+ runValue_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Mov_Value" field.</summary>
+ public const int MovValueFieldNumber = 2;
+ private uint movValue_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MovValue {
+ get { return movValue_; }
+ set {
+ movValue_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Direction" field.</summary>
+ public const int DirectionFieldNumber = 3;
+ private bool direction_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Direction {
+ get { return direction_; }
+ set {
+ direction_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Time_2_Change_Direction" field.</summary>
+ public const int Time2ChangeDirectionFieldNumber = 4;
+ private uint time2ChangeDirection_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint Time2ChangeDirection {
+ get { return time2ChangeDirection_; }
+ set {
+ time2ChangeDirection_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Display_Tx_ON_LCD" field.</summary>
+ public const int DisplayTxONLCDFieldNumber = 5;
+ private bool displayTxONLCD_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool DisplayTxONLCD {
+ get { return displayTxONLCD_; }
+ set {
+ displayTxONLCD_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Display_Rx_on_LCD" field.</summary>
+ public const int DisplayRxOnLCDFieldNumber = 6;
+ private bool displayRxOnLCD_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool DisplayRxOnLCD {
+ get { return displayRxOnLCD_; }
+ set {
+ displayRxOnLCD_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Init_MicroStep" field.</summary>
+ public const int InitMicroStepFieldNumber = 7;
+ private uint initMicroStep_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint InitMicroStep {
+ get { return initMicroStep_; }
+ set {
+ initMicroStep_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Init_Acc" field.</summary>
+ public const int InitAccFieldNumber = 8;
+ private uint initAcc_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint InitAcc {
+ get { return initAcc_; }
+ set {
+ initAcc_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Init_Dec" field.</summary>
+ public const int InitDecFieldNumber = 9;
+ private uint initDec_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint InitDec {
+ get { return initDec_; }
+ set {
+ initDec_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestBool_1" field.</summary>
+ public const int TestBool1FieldNumber = 10;
+ private bool testBool1_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool TestBool1 {
+ get { return testBool1_; }
+ set {
+ testBool1_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestBool_2" field.</summary>
+ public const int TestBool2FieldNumber = 11;
+ private bool testBool2_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool TestBool2 {
+ get { return testBool2_; }
+ set {
+ testBool2_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestBool_3" field.</summary>
+ public const int TestBool3FieldNumber = 12;
+ private bool testBool3_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool TestBool3 {
+ get { return testBool3_; }
+ set {
+ testBool3_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestBool_4" field.</summary>
+ public const int TestBool4FieldNumber = 13;
+ private bool testBool4_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool TestBool4 {
+ get { return testBool4_; }
+ set {
+ testBool4_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestBool_5" field.</summary>
+ public const int TestBool5FieldNumber = 14;
+ private bool testBool5_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool TestBool5 {
+ get { return testBool5_; }
+ set {
+ testBool5_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestUint32_1" field.</summary>
+ public const int TestUint321FieldNumber = 15;
+ private uint testUint321_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint TestUint321 {
+ get { return testUint321_; }
+ set {
+ testUint321_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestUint32_2" field.</summary>
+ public const int TestUint322FieldNumber = 16;
+ private uint testUint322_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint TestUint322 {
+ get { return testUint322_; }
+ set {
+ testUint322_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestUint32_3" field.</summary>
+ public const int TestUint323FieldNumber = 17;
+ private uint testUint323_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint TestUint323 {
+ get { return testUint323_; }
+ set {
+ testUint323_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestUint32_4" field.</summary>
+ public const int TestUint324FieldNumber = 18;
+ private uint testUint324_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint TestUint324 {
+ get { return testUint324_; }
+ set {
+ testUint324_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestUint32_5" field.</summary>
+ public const int TestUint325FieldNumber = 19;
+ private uint testUint325_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint TestUint325 {
+ get { return testUint325_; }
+ set {
+ testUint325_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestUint32_6" field.</summary>
+ public const int TestUint326FieldNumber = 20;
+ private uint testUint326_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint TestUint326 {
+ get { return testUint326_; }
+ set {
+ testUint326_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as StubL6470DriverRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubL6470DriverRequest other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (RunValue != other.RunValue) return false;
+ if (MovValue != other.MovValue) return false;
+ if (Direction != other.Direction) return false;
+ if (Time2ChangeDirection != other.Time2ChangeDirection) return false;
+ if (DisplayTxONLCD != other.DisplayTxONLCD) return false;
+ if (DisplayRxOnLCD != other.DisplayRxOnLCD) return false;
+ if (InitMicroStep != other.InitMicroStep) return false;
+ if (InitAcc != other.InitAcc) return false;
+ if (InitDec != other.InitDec) return false;
+ if (TestBool1 != other.TestBool1) return false;
+ if (TestBool2 != other.TestBool2) return false;
+ if (TestBool3 != other.TestBool3) return false;
+ if (TestBool4 != other.TestBool4) return false;
+ if (TestBool5 != other.TestBool5) return false;
+ if (TestUint321 != other.TestUint321) return false;
+ if (TestUint322 != other.TestUint322) return false;
+ if (TestUint323 != other.TestUint323) return false;
+ if (TestUint324 != other.TestUint324) return false;
+ if (TestUint325 != other.TestUint325) return false;
+ if (TestUint326 != other.TestUint326) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (RunValue != 0) hash ^= RunValue.GetHashCode();
+ if (MovValue != 0) hash ^= MovValue.GetHashCode();
+ if (Direction != false) hash ^= Direction.GetHashCode();
+ if (Time2ChangeDirection != 0) hash ^= Time2ChangeDirection.GetHashCode();
+ if (DisplayTxONLCD != false) hash ^= DisplayTxONLCD.GetHashCode();
+ if (DisplayRxOnLCD != false) hash ^= DisplayRxOnLCD.GetHashCode();
+ if (InitMicroStep != 0) hash ^= InitMicroStep.GetHashCode();
+ if (InitAcc != 0) hash ^= InitAcc.GetHashCode();
+ if (InitDec != 0) hash ^= InitDec.GetHashCode();
+ if (TestBool1 != false) hash ^= TestBool1.GetHashCode();
+ if (TestBool2 != false) hash ^= TestBool2.GetHashCode();
+ if (TestBool3 != false) hash ^= TestBool3.GetHashCode();
+ if (TestBool4 != false) hash ^= TestBool4.GetHashCode();
+ if (TestBool5 != false) hash ^= TestBool5.GetHashCode();
+ if (TestUint321 != 0) hash ^= TestUint321.GetHashCode();
+ if (TestUint322 != 0) hash ^= TestUint322.GetHashCode();
+ if (TestUint323 != 0) hash ^= TestUint323.GetHashCode();
+ if (TestUint324 != 0) hash ^= TestUint324.GetHashCode();
+ if (TestUint325 != 0) hash ^= TestUint325.GetHashCode();
+ if (TestUint326 != 0) hash ^= TestUint326.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 (RunValue != 0) {
+ output.WriteRawTag(8);
+ output.WriteUInt32(RunValue);
+ }
+ if (MovValue != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(MovValue);
+ }
+ if (Direction != false) {
+ output.WriteRawTag(24);
+ output.WriteBool(Direction);
+ }
+ if (Time2ChangeDirection != 0) {
+ output.WriteRawTag(32);
+ output.WriteUInt32(Time2ChangeDirection);
+ }
+ if (DisplayTxONLCD != false) {
+ output.WriteRawTag(40);
+ output.WriteBool(DisplayTxONLCD);
+ }
+ if (DisplayRxOnLCD != false) {
+ output.WriteRawTag(48);
+ output.WriteBool(DisplayRxOnLCD);
+ }
+ if (InitMicroStep != 0) {
+ output.WriteRawTag(56);
+ output.WriteUInt32(InitMicroStep);
+ }
+ if (InitAcc != 0) {
+ output.WriteRawTag(64);
+ output.WriteUInt32(InitAcc);
+ }
+ if (InitDec != 0) {
+ output.WriteRawTag(72);
+ output.WriteUInt32(InitDec);
+ }
+ if (TestBool1 != false) {
+ output.WriteRawTag(80);
+ output.WriteBool(TestBool1);
+ }
+ if (TestBool2 != false) {
+ output.WriteRawTag(88);
+ output.WriteBool(TestBool2);
+ }
+ if (TestBool3 != false) {
+ output.WriteRawTag(96);
+ output.WriteBool(TestBool3);
+ }
+ if (TestBool4 != false) {
+ output.WriteRawTag(104);
+ output.WriteBool(TestBool4);
+ }
+ if (TestBool5 != false) {
+ output.WriteRawTag(112);
+ output.WriteBool(TestBool5);
+ }
+ if (TestUint321 != 0) {
+ output.WriteRawTag(120);
+ output.WriteUInt32(TestUint321);
+ }
+ if (TestUint322 != 0) {
+ output.WriteRawTag(128, 1);
+ output.WriteUInt32(TestUint322);
+ }
+ if (TestUint323 != 0) {
+ output.WriteRawTag(136, 1);
+ output.WriteUInt32(TestUint323);
+ }
+ if (TestUint324 != 0) {
+ output.WriteRawTag(144, 1);
+ output.WriteUInt32(TestUint324);
+ }
+ if (TestUint325 != 0) {
+ output.WriteRawTag(152, 1);
+ output.WriteUInt32(TestUint325);
+ }
+ if (TestUint326 != 0) {
+ output.WriteRawTag(160, 1);
+ output.WriteUInt32(TestUint326);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (RunValue != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(RunValue);
+ }
+ if (MovValue != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MovValue);
+ }
+ if (Direction != false) {
+ size += 1 + 1;
+ }
+ if (Time2ChangeDirection != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Time2ChangeDirection);
+ }
+ if (DisplayTxONLCD != false) {
+ size += 1 + 1;
+ }
+ if (DisplayRxOnLCD != false) {
+ size += 1 + 1;
+ }
+ if (InitMicroStep != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(InitMicroStep);
+ }
+ if (InitAcc != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(InitAcc);
+ }
+ if (InitDec != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(InitDec);
+ }
+ if (TestBool1 != false) {
+ size += 1 + 1;
+ }
+ if (TestBool2 != false) {
+ size += 1 + 1;
+ }
+ if (TestBool3 != false) {
+ size += 1 + 1;
+ }
+ if (TestBool4 != false) {
+ size += 1 + 1;
+ }
+ if (TestBool5 != false) {
+ size += 1 + 1;
+ }
+ if (TestUint321 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(TestUint321);
+ }
+ if (TestUint322 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeUInt32Size(TestUint322);
+ }
+ if (TestUint323 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeUInt32Size(TestUint323);
+ }
+ if (TestUint324 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeUInt32Size(TestUint324);
+ }
+ if (TestUint325 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeUInt32Size(TestUint325);
+ }
+ if (TestUint326 != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeUInt32Size(TestUint326);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(StubL6470DriverRequest other) {
+ if (other == null) {
+ return;
+ }
+ if (other.RunValue != 0) {
+ RunValue = other.RunValue;
+ }
+ if (other.MovValue != 0) {
+ MovValue = other.MovValue;
+ }
+ if (other.Direction != false) {
+ Direction = other.Direction;
+ }
+ if (other.Time2ChangeDirection != 0) {
+ Time2ChangeDirection = other.Time2ChangeDirection;
+ }
+ if (other.DisplayTxONLCD != false) {
+ DisplayTxONLCD = other.DisplayTxONLCD;
+ }
+ if (other.DisplayRxOnLCD != false) {
+ DisplayRxOnLCD = other.DisplayRxOnLCD;
+ }
+ if (other.InitMicroStep != 0) {
+ InitMicroStep = other.InitMicroStep;
+ }
+ if (other.InitAcc != 0) {
+ InitAcc = other.InitAcc;
+ }
+ if (other.InitDec != 0) {
+ InitDec = other.InitDec;
+ }
+ if (other.TestBool1 != false) {
+ TestBool1 = other.TestBool1;
+ }
+ if (other.TestBool2 != false) {
+ TestBool2 = other.TestBool2;
+ }
+ if (other.TestBool3 != false) {
+ TestBool3 = other.TestBool3;
+ }
+ if (other.TestBool4 != false) {
+ TestBool4 = other.TestBool4;
+ }
+ if (other.TestBool5 != false) {
+ TestBool5 = other.TestBool5;
+ }
+ if (other.TestUint321 != 0) {
+ TestUint321 = other.TestUint321;
+ }
+ if (other.TestUint322 != 0) {
+ TestUint322 = other.TestUint322;
+ }
+ if (other.TestUint323 != 0) {
+ TestUint323 = other.TestUint323;
+ }
+ if (other.TestUint324 != 0) {
+ TestUint324 = other.TestUint324;
+ }
+ if (other.TestUint325 != 0) {
+ TestUint325 = other.TestUint325;
+ }
+ if (other.TestUint326 != 0) {
+ TestUint326 = other.TestUint326;
+ }
+ }
+
+ [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: {
+ RunValue = input.ReadUInt32();
+ break;
+ }
+ case 16: {
+ MovValue = input.ReadUInt32();
+ break;
+ }
+ case 24: {
+ Direction = input.ReadBool();
+ break;
+ }
+ case 32: {
+ Time2ChangeDirection = input.ReadUInt32();
+ break;
+ }
+ case 40: {
+ DisplayTxONLCD = input.ReadBool();
+ break;
+ }
+ case 48: {
+ DisplayRxOnLCD = input.ReadBool();
+ break;
+ }
+ case 56: {
+ InitMicroStep = input.ReadUInt32();
+ break;
+ }
+ case 64: {
+ InitAcc = input.ReadUInt32();
+ break;
+ }
+ case 72: {
+ InitDec = input.ReadUInt32();
+ break;
+ }
+ case 80: {
+ TestBool1 = input.ReadBool();
+ break;
+ }
+ case 88: {
+ TestBool2 = input.ReadBool();
+ break;
+ }
+ case 96: {
+ TestBool3 = input.ReadBool();
+ break;
+ }
+ case 104: {
+ TestBool4 = input.ReadBool();
+ break;
+ }
+ case 112: {
+ TestBool5 = input.ReadBool();
+ break;
+ }
+ case 120: {
+ TestUint321 = input.ReadUInt32();
+ break;
+ }
+ case 128: {
+ TestUint322 = input.ReadUInt32();
+ break;
+ }
+ case 136: {
+ TestUint323 = input.ReadUInt32();
+ break;
+ }
+ case 144: {
+ TestUint324 = input.ReadUInt32();
+ break;
+ }
+ case 152: {
+ TestUint325 = input.ReadUInt32();
+ break;
+ }
+ case 160: {
+ TestUint326 = input.ReadUInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubL6470DriverResponse.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubL6470DriverResponse.cs
new file mode 100644
index 000000000..9f6facff4
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubL6470DriverResponse.cs
@@ -0,0 +1,564 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubL6470DriverResponse.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 {
+
+ /// <summary>Holder for reflection information generated from StubL6470DriverResponse.proto</summary>
+ public static partial class StubL6470DriverResponseReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubL6470DriverResponse.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubL6470DriverResponseReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Ch1TdHViTDY0NzBEcml2ZXJSZXNwb25zZS5wcm90bxIPVGFuZ28uUE1SLlN0",
+ "dWJzIssCChdTdHViTDY0NzBEcml2ZXJSZXNwb25zZRIRCglSdW5fVmFsdWUY",
+ "ASABKA0SEQoJTW92X1ZhbHVlGAIgASgNEhIKClRlc3RCb29sXzEYAyABKAgS",
+ "EgoKVGVzdEJvb2xfMhgEIAEoCBISCgpUZXN0Qm9vbF8zGAUgASgIEhIKClRl",
+ "c3RCb29sXzQYBiABKAgSEgoKVGVzdEJvb2xfNRgHIAEoCBIUCgxUZXN0VWlu",
+ "dDMyXzEYCCABKA0SFAoMVGVzdFVpbnQzMl8yGAkgASgNEhQKDFRlc3RVaW50",
+ "MzJfMxgKIAEoDRIUCgxUZXN0VWludDMyXzQYCyABKA0SFAoMVGVzdFVpbnQz",
+ "Ml81GAwgASgNEhQKDFRlc3RVaW50MzJfNhgNIAEoDRIOCgZTdGF0dXMYDiAB",
+ "KAkSEgoKU3RhdHVzV29yZBgPIAEoDUIbChljb20udHdpbmUudGFuZ28ucG1y",
+ "LnN0dWJzYgZwcm90bzM="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubL6470DriverResponse), global::Tango.PMR.Stubs.StubL6470DriverResponse.Parser, new[]{ "RunValue", "MovValue", "TestBool1", "TestBool2", "TestBool3", "TestBool4", "TestBool5", "TestUint321", "TestUint322", "TestUint323", "TestUint324", "TestUint325", "TestUint326", "Status", "StatusWord" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubL6470DriverResponse : pb::IMessage<StubL6470DriverResponse> {
+ private static readonly pb::MessageParser<StubL6470DriverResponse> _parser = new pb::MessageParser<StubL6470DriverResponse>(() => new StubL6470DriverResponse());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubL6470DriverResponse> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubL6470DriverResponseReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubL6470DriverResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubL6470DriverResponse(StubL6470DriverResponse other) : this() {
+ runValue_ = other.runValue_;
+ movValue_ = other.movValue_;
+ testBool1_ = other.testBool1_;
+ testBool2_ = other.testBool2_;
+ testBool3_ = other.testBool3_;
+ testBool4_ = other.testBool4_;
+ testBool5_ = other.testBool5_;
+ testUint321_ = other.testUint321_;
+ testUint322_ = other.testUint322_;
+ testUint323_ = other.testUint323_;
+ testUint324_ = other.testUint324_;
+ testUint325_ = other.testUint325_;
+ testUint326_ = other.testUint326_;
+ status_ = other.status_;
+ statusWord_ = other.statusWord_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubL6470DriverResponse Clone() {
+ return new StubL6470DriverResponse(this);
+ }
+
+ /// <summary>Field number for the "Run_Value" field.</summary>
+ public const int RunValueFieldNumber = 1;
+ private uint runValue_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint RunValue {
+ get { return runValue_; }
+ set {
+ runValue_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Mov_Value" field.</summary>
+ public const int MovValueFieldNumber = 2;
+ private uint movValue_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MovValue {
+ get { return movValue_; }
+ set {
+ movValue_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestBool_1" field.</summary>
+ public const int TestBool1FieldNumber = 3;
+ private bool testBool1_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool TestBool1 {
+ get { return testBool1_; }
+ set {
+ testBool1_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestBool_2" field.</summary>
+ public const int TestBool2FieldNumber = 4;
+ private bool testBool2_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool TestBool2 {
+ get { return testBool2_; }
+ set {
+ testBool2_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestBool_3" field.</summary>
+ public const int TestBool3FieldNumber = 5;
+ private bool testBool3_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool TestBool3 {
+ get { return testBool3_; }
+ set {
+ testBool3_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestBool_4" field.</summary>
+ public const int TestBool4FieldNumber = 6;
+ private bool testBool4_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool TestBool4 {
+ get { return testBool4_; }
+ set {
+ testBool4_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestBool_5" field.</summary>
+ public const int TestBool5FieldNumber = 7;
+ private bool testBool5_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool TestBool5 {
+ get { return testBool5_; }
+ set {
+ testBool5_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestUint32_1" field.</summary>
+ public const int TestUint321FieldNumber = 8;
+ private uint testUint321_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint TestUint321 {
+ get { return testUint321_; }
+ set {
+ testUint321_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestUint32_2" field.</summary>
+ public const int TestUint322FieldNumber = 9;
+ private uint testUint322_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint TestUint322 {
+ get { return testUint322_; }
+ set {
+ testUint322_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestUint32_3" field.</summary>
+ public const int TestUint323FieldNumber = 10;
+ private uint testUint323_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint TestUint323 {
+ get { return testUint323_; }
+ set {
+ testUint323_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestUint32_4" field.</summary>
+ public const int TestUint324FieldNumber = 11;
+ private uint testUint324_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint TestUint324 {
+ get { return testUint324_; }
+ set {
+ testUint324_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestUint32_5" field.</summary>
+ public const int TestUint325FieldNumber = 12;
+ private uint testUint325_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint TestUint325 {
+ get { return testUint325_; }
+ set {
+ testUint325_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TestUint32_6" field.</summary>
+ public const int TestUint326FieldNumber = 13;
+ private uint testUint326_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint TestUint326 {
+ get { return testUint326_; }
+ set {
+ testUint326_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Status" field.</summary>
+ public const int StatusFieldNumber = 14;
+ private string status_ = "";
+ /// <summary>
+ /// Passed/Failed
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string Status {
+ get { return status_; }
+ set {
+ status_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// <summary>Field number for the "StatusWord" field.</summary>
+ public const int StatusWordFieldNumber = 15;
+ private uint statusWord_;
+ /// <summary>
+ /// Error number/bit when the status is Failed
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint StatusWord {
+ get { return statusWord_; }
+ set {
+ statusWord_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as StubL6470DriverResponse);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubL6470DriverResponse other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (RunValue != other.RunValue) return false;
+ if (MovValue != other.MovValue) return false;
+ if (TestBool1 != other.TestBool1) return false;
+ if (TestBool2 != other.TestBool2) return false;
+ if (TestBool3 != other.TestBool3) return false;
+ if (TestBool4 != other.TestBool4) return false;
+ if (TestBool5 != other.TestBool5) return false;
+ if (TestUint321 != other.TestUint321) return false;
+ if (TestUint322 != other.TestUint322) return false;
+ if (TestUint323 != other.TestUint323) return false;
+ if (TestUint324 != other.TestUint324) return false;
+ if (TestUint325 != other.TestUint325) return false;
+ if (TestUint326 != other.TestUint326) return false;
+ if (Status != other.Status) return false;
+ if (StatusWord != other.StatusWord) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (RunValue != 0) hash ^= RunValue.GetHashCode();
+ if (MovValue != 0) hash ^= MovValue.GetHashCode();
+ if (TestBool1 != false) hash ^= TestBool1.GetHashCode();
+ if (TestBool2 != false) hash ^= TestBool2.GetHashCode();
+ if (TestBool3 != false) hash ^= TestBool3.GetHashCode();
+ if (TestBool4 != false) hash ^= TestBool4.GetHashCode();
+ if (TestBool5 != false) hash ^= TestBool5.GetHashCode();
+ if (TestUint321 != 0) hash ^= TestUint321.GetHashCode();
+ if (TestUint322 != 0) hash ^= TestUint322.GetHashCode();
+ if (TestUint323 != 0) hash ^= TestUint323.GetHashCode();
+ if (TestUint324 != 0) hash ^= TestUint324.GetHashCode();
+ if (TestUint325 != 0) hash ^= TestUint325.GetHashCode();
+ if (TestUint326 != 0) hash ^= TestUint326.GetHashCode();
+ if (Status.Length != 0) hash ^= Status.GetHashCode();
+ if (StatusWord != 0) hash ^= StatusWord.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 (RunValue != 0) {
+ output.WriteRawTag(8);
+ output.WriteUInt32(RunValue);
+ }
+ if (MovValue != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(MovValue);
+ }
+ if (TestBool1 != false) {
+ output.WriteRawTag(24);
+ output.WriteBool(TestBool1);
+ }
+ if (TestBool2 != false) {
+ output.WriteRawTag(32);
+ output.WriteBool(TestBool2);
+ }
+ if (TestBool3 != false) {
+ output.WriteRawTag(40);
+ output.WriteBool(TestBool3);
+ }
+ if (TestBool4 != false) {
+ output.WriteRawTag(48);
+ output.WriteBool(TestBool4);
+ }
+ if (TestBool5 != false) {
+ output.WriteRawTag(56);
+ output.WriteBool(TestBool5);
+ }
+ if (TestUint321 != 0) {
+ output.WriteRawTag(64);
+ output.WriteUInt32(TestUint321);
+ }
+ if (TestUint322 != 0) {
+ output.WriteRawTag(72);
+ output.WriteUInt32(TestUint322);
+ }
+ if (TestUint323 != 0) {
+ output.WriteRawTag(80);
+ output.WriteUInt32(TestUint323);
+ }
+ if (TestUint324 != 0) {
+ output.WriteRawTag(88);
+ output.WriteUInt32(TestUint324);
+ }
+ if (TestUint325 != 0) {
+ output.WriteRawTag(96);
+ output.WriteUInt32(TestUint325);
+ }
+ if (TestUint326 != 0) {
+ output.WriteRawTag(104);
+ output.WriteUInt32(TestUint326);
+ }
+ if (Status.Length != 0) {
+ output.WriteRawTag(114);
+ output.WriteString(Status);
+ }
+ if (StatusWord != 0) {
+ output.WriteRawTag(120);
+ output.WriteUInt32(StatusWord);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (RunValue != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(RunValue);
+ }
+ if (MovValue != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MovValue);
+ }
+ if (TestBool1 != false) {
+ size += 1 + 1;
+ }
+ if (TestBool2 != false) {
+ size += 1 + 1;
+ }
+ if (TestBool3 != false) {
+ size += 1 + 1;
+ }
+ if (TestBool4 != false) {
+ size += 1 + 1;
+ }
+ if (TestBool5 != false) {
+ size += 1 + 1;
+ }
+ if (TestUint321 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(TestUint321);
+ }
+ if (TestUint322 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(TestUint322);
+ }
+ if (TestUint323 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(TestUint323);
+ }
+ if (TestUint324 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(TestUint324);
+ }
+ if (TestUint325 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(TestUint325);
+ }
+ if (TestUint326 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(TestUint326);
+ }
+ if (Status.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Status);
+ }
+ if (StatusWord != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(StatusWord);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(StubL6470DriverResponse other) {
+ if (other == null) {
+ return;
+ }
+ if (other.RunValue != 0) {
+ RunValue = other.RunValue;
+ }
+ if (other.MovValue != 0) {
+ MovValue = other.MovValue;
+ }
+ if (other.TestBool1 != false) {
+ TestBool1 = other.TestBool1;
+ }
+ if (other.TestBool2 != false) {
+ TestBool2 = other.TestBool2;
+ }
+ if (other.TestBool3 != false) {
+ TestBool3 = other.TestBool3;
+ }
+ if (other.TestBool4 != false) {
+ TestBool4 = other.TestBool4;
+ }
+ if (other.TestBool5 != false) {
+ TestBool5 = other.TestBool5;
+ }
+ if (other.TestUint321 != 0) {
+ TestUint321 = other.TestUint321;
+ }
+ if (other.TestUint322 != 0) {
+ TestUint322 = other.TestUint322;
+ }
+ if (other.TestUint323 != 0) {
+ TestUint323 = other.TestUint323;
+ }
+ if (other.TestUint324 != 0) {
+ TestUint324 = other.TestUint324;
+ }
+ if (other.TestUint325 != 0) {
+ TestUint325 = other.TestUint325;
+ }
+ if (other.TestUint326 != 0) {
+ TestUint326 = other.TestUint326;
+ }
+ if (other.Status.Length != 0) {
+ Status = other.Status;
+ }
+ if (other.StatusWord != 0) {
+ StatusWord = other.StatusWord;
+ }
+ }
+
+ [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: {
+ RunValue = input.ReadUInt32();
+ break;
+ }
+ case 16: {
+ MovValue = input.ReadUInt32();
+ break;
+ }
+ case 24: {
+ TestBool1 = input.ReadBool();
+ break;
+ }
+ case 32: {
+ TestBool2 = input.ReadBool();
+ break;
+ }
+ case 40: {
+ TestBool3 = input.ReadBool();
+ break;
+ }
+ case 48: {
+ TestBool4 = input.ReadBool();
+ break;
+ }
+ case 56: {
+ TestBool5 = input.ReadBool();
+ break;
+ }
+ case 64: {
+ TestUint321 = input.ReadUInt32();
+ break;
+ }
+ case 72: {
+ TestUint322 = input.ReadUInt32();
+ break;
+ }
+ case 80: {
+ TestUint323 = input.ReadUInt32();
+ break;
+ }
+ case 88: {
+ TestUint324 = input.ReadUInt32();
+ break;
+ }
+ case 96: {
+ TestUint325 = input.ReadUInt32();
+ break;
+ }
+ case 104: {
+ TestUint326 = input.ReadUInt32();
+ break;
+ }
+ case 114: {
+ Status = input.ReadString();
+ break;
+ }
+ case 120: {
+ StatusWord = input.ReadUInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorInitRequest.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorInitRequest.cs
new file mode 100644
index 000000000..65fe8d524
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorInitRequest.cs
@@ -0,0 +1,390 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubMotorInitRequest.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 {
+
+ /// <summary>Holder for reflection information generated from StubMotorInitRequest.proto</summary>
+ public static partial class StubMotorInitRequestReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubMotorInitRequest.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubMotorInitRequestReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChpTdHViTW90b3JJbml0UmVxdWVzdC5wcm90bxIPVGFuZ28uUE1SLlN0dWJz",
+ "IrwBChRTdHViTW90b3JJbml0UmVxdWVzdBIQCghNb3Rvcl9JRBgBIAEoDRIT",
+ "CgtNaWNyb19TdGVwcxgCIAEoDRIXCg9TZXRfTWljcm9fU3RlcHMYAyABKAgS",
+ "CwoDQUNDGAQgASgNEg8KB1NldF9BQ0MYBSABKAgSCwoDREVDGAYgASgNEg8K",
+ "B1NldF9EZWMYByABKAgSEQoJTWF4X1NwZWVkGAggASgNEhUKDVNldF9NYXhf",
+ "U3BlZWQYCSABKAhCGwoZY29tLnR3aW5lLnRhbmdvLnBtci5zdHVic2IGcHJv",
+ "dG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorInitRequest), global::Tango.PMR.Stubs.StubMotorInitRequest.Parser, new[]{ "MotorID", "MicroSteps", "SetMicroSteps", "ACC", "SetACC", "DEC", "SetDec", "MaxSpeed", "SetMaxSpeed" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubMotorInitRequest : pb::IMessage<StubMotorInitRequest> {
+ private static readonly pb::MessageParser<StubMotorInitRequest> _parser = new pb::MessageParser<StubMotorInitRequest>(() => new StubMotorInitRequest());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubMotorInitRequest> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubMotorInitRequestReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorInitRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorInitRequest(StubMotorInitRequest other) : this() {
+ motorID_ = other.motorID_;
+ microSteps_ = other.microSteps_;
+ setMicroSteps_ = other.setMicroSteps_;
+ aCC_ = other.aCC_;
+ setACC_ = other.setACC_;
+ dEC_ = other.dEC_;
+ setDec_ = other.setDec_;
+ maxSpeed_ = other.maxSpeed_;
+ setMaxSpeed_ = other.setMaxSpeed_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorInitRequest Clone() {
+ return new StubMotorInitRequest(this);
+ }
+
+ /// <summary>Field number for the "Motor_ID" field.</summary>
+ public const int MotorIDFieldNumber = 1;
+ private uint motorID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MotorID {
+ get { return motorID_; }
+ set {
+ motorID_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Micro_Steps" field.</summary>
+ public const int MicroStepsFieldNumber = 2;
+ private uint microSteps_;
+ /// <summary>
+ /// 1/2/4/8/16/32/64/128
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MicroSteps {
+ get { return microSteps_; }
+ set {
+ microSteps_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Set_Micro_Steps" field.</summary>
+ public const int SetMicroStepsFieldNumber = 3;
+ private bool setMicroSteps_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool SetMicroSteps {
+ get { return setMicroSteps_; }
+ set {
+ setMicroSteps_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "ACC" field.</summary>
+ public const int ACCFieldNumber = 4;
+ private uint aCC_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint ACC {
+ get { return aCC_; }
+ set {
+ aCC_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Set_ACC" field.</summary>
+ public const int SetACCFieldNumber = 5;
+ private bool setACC_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool SetACC {
+ get { return setACC_; }
+ set {
+ setACC_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "DEC" field.</summary>
+ public const int DECFieldNumber = 6;
+ private uint dEC_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint DEC {
+ get { return dEC_; }
+ set {
+ dEC_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Set_Dec" field.</summary>
+ public const int SetDecFieldNumber = 7;
+ private bool setDec_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool SetDec {
+ get { return setDec_; }
+ set {
+ setDec_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Max_Speed" field.</summary>
+ public const int MaxSpeedFieldNumber = 8;
+ private uint maxSpeed_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MaxSpeed {
+ get { return maxSpeed_; }
+ set {
+ maxSpeed_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Set_Max_Speed" field.</summary>
+ public const int SetMaxSpeedFieldNumber = 9;
+ private bool setMaxSpeed_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool SetMaxSpeed {
+ get { return setMaxSpeed_; }
+ set {
+ setMaxSpeed_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as StubMotorInitRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubMotorInitRequest other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (MotorID != other.MotorID) return false;
+ if (MicroSteps != other.MicroSteps) return false;
+ if (SetMicroSteps != other.SetMicroSteps) return false;
+ if (ACC != other.ACC) return false;
+ if (SetACC != other.SetACC) return false;
+ if (DEC != other.DEC) return false;
+ if (SetDec != other.SetDec) return false;
+ if (MaxSpeed != other.MaxSpeed) return false;
+ if (SetMaxSpeed != other.SetMaxSpeed) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (MotorID != 0) hash ^= MotorID.GetHashCode();
+ if (MicroSteps != 0) hash ^= MicroSteps.GetHashCode();
+ if (SetMicroSteps != false) hash ^= SetMicroSteps.GetHashCode();
+ if (ACC != 0) hash ^= ACC.GetHashCode();
+ if (SetACC != false) hash ^= SetACC.GetHashCode();
+ if (DEC != 0) hash ^= DEC.GetHashCode();
+ if (SetDec != false) hash ^= SetDec.GetHashCode();
+ if (MaxSpeed != 0) hash ^= MaxSpeed.GetHashCode();
+ if (SetMaxSpeed != false) hash ^= SetMaxSpeed.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 (MicroSteps != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(MicroSteps);
+ }
+ if (SetMicroSteps != false) {
+ output.WriteRawTag(24);
+ output.WriteBool(SetMicroSteps);
+ }
+ if (ACC != 0) {
+ output.WriteRawTag(32);
+ output.WriteUInt32(ACC);
+ }
+ if (SetACC != false) {
+ output.WriteRawTag(40);
+ output.WriteBool(SetACC);
+ }
+ if (DEC != 0) {
+ output.WriteRawTag(48);
+ output.WriteUInt32(DEC);
+ }
+ if (SetDec != false) {
+ output.WriteRawTag(56);
+ output.WriteBool(SetDec);
+ }
+ if (MaxSpeed != 0) {
+ output.WriteRawTag(64);
+ output.WriteUInt32(MaxSpeed);
+ }
+ if (SetMaxSpeed != false) {
+ output.WriteRawTag(72);
+ output.WriteBool(SetMaxSpeed);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (MotorID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MotorID);
+ }
+ if (MicroSteps != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MicroSteps);
+ }
+ if (SetMicroSteps != false) {
+ size += 1 + 1;
+ }
+ if (ACC != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(ACC);
+ }
+ if (SetACC != false) {
+ size += 1 + 1;
+ }
+ if (DEC != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(DEC);
+ }
+ if (SetDec != false) {
+ size += 1 + 1;
+ }
+ if (MaxSpeed != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MaxSpeed);
+ }
+ if (SetMaxSpeed != false) {
+ size += 1 + 1;
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(StubMotorInitRequest other) {
+ if (other == null) {
+ return;
+ }
+ if (other.MotorID != 0) {
+ MotorID = other.MotorID;
+ }
+ if (other.MicroSteps != 0) {
+ MicroSteps = other.MicroSteps;
+ }
+ if (other.SetMicroSteps != false) {
+ SetMicroSteps = other.SetMicroSteps;
+ }
+ if (other.ACC != 0) {
+ ACC = other.ACC;
+ }
+ if (other.SetACC != false) {
+ SetACC = other.SetACC;
+ }
+ if (other.DEC != 0) {
+ DEC = other.DEC;
+ }
+ if (other.SetDec != false) {
+ SetDec = other.SetDec;
+ }
+ if (other.MaxSpeed != 0) {
+ MaxSpeed = other.MaxSpeed;
+ }
+ if (other.SetMaxSpeed != false) {
+ SetMaxSpeed = other.SetMaxSpeed;
+ }
+ }
+
+ [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: {
+ MicroSteps = input.ReadUInt32();
+ break;
+ }
+ case 24: {
+ SetMicroSteps = input.ReadBool();
+ break;
+ }
+ case 32: {
+ ACC = input.ReadUInt32();
+ break;
+ }
+ case 40: {
+ SetACC = input.ReadBool();
+ break;
+ }
+ case 48: {
+ DEC = input.ReadUInt32();
+ break;
+ }
+ case 56: {
+ SetDec = input.ReadBool();
+ break;
+ }
+ case 64: {
+ MaxSpeed = input.ReadUInt32();
+ break;
+ }
+ case 72: {
+ SetMaxSpeed = input.ReadBool();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorInitResponse.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorInitResponse.cs
new file mode 100644
index 000000000..5d9c9616d
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorInitResponse.cs
@@ -0,0 +1,188 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubMotorInitResponse.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 {
+
+ /// <summary>Holder for reflection information generated from StubMotorInitResponse.proto</summary>
+ public static partial class StubMotorInitResponseReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubMotorInitResponse.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubMotorInitResponseReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChtTdHViTW90b3JJbml0UmVzcG9uc2UucHJvdG8SD1RhbmdvLlBNUi5TdHVi",
+ "cyI5ChVTdHViTW90b3JJbml0UmVzcG9uc2USEAoITW90b3JfSUQYASABKA0S",
+ "DgoGU3RhdHVzGAIgASgNQhsKGWNvbS50d2luZS50YW5nby5wbXIuc3R1YnNi",
+ "BnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorInitResponse), global::Tango.PMR.Stubs.StubMotorInitResponse.Parser, new[]{ "MotorID", "Status" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubMotorInitResponse : pb::IMessage<StubMotorInitResponse> {
+ private static readonly pb::MessageParser<StubMotorInitResponse> _parser = new pb::MessageParser<StubMotorInitResponse>(() => new StubMotorInitResponse());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubMotorInitResponse> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubMotorInitResponseReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorInitResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorInitResponse(StubMotorInitResponse other) : this() {
+ motorID_ = other.motorID_;
+ status_ = other.status_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorInitResponse Clone() {
+ return new StubMotorInitResponse(this);
+ }
+
+ /// <summary>Field number for the "Motor_ID" field.</summary>
+ public const int MotorIDFieldNumber = 1;
+ private uint motorID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MotorID {
+ get { return motorID_; }
+ set {
+ motorID_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Status" field.</summary>
+ public const int StatusFieldNumber = 2;
+ private uint status_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint Status {
+ get { return status_; }
+ set {
+ status_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as StubMotorInitResponse);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubMotorInitResponse other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (MotorID != other.MotorID) return false;
+ if (Status != other.Status) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (MotorID != 0) hash ^= MotorID.GetHashCode();
+ if (Status != 0) hash ^= Status.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 (Status != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(Status);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (MotorID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MotorID);
+ }
+ if (Status != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Status);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(StubMotorInitResponse other) {
+ if (other == null) {
+ return;
+ }
+ if (other.MotorID != 0) {
+ MotorID = other.MotorID;
+ }
+ if (other.Status != 0) {
+ Status = other.Status;
+ }
+ }
+
+ [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: {
+ Status = input.ReadUInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorMovRequest.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorMovRequest.cs
new file mode 100644
index 000000000..6c355459d
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorMovRequest.cs
@@ -0,0 +1,216 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubMotorMovRequest.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 {
+
+ /// <summary>Holder for reflection information generated from StubMotorMovRequest.proto</summary>
+ public static partial class StubMotorMovRequestReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubMotorMovRequest.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubMotorMovRequestReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChlTdHViTW90b3JNb3ZSZXF1ZXN0LnByb3RvEg9UYW5nby5QTVIuU3R1YnMi",
+ "TAoTU3R1Yk1vdG9yTW92UmVxdWVzdBIQCghNb3Rvcl9JRBgBIAEoDRIRCglE",
+ "aXJlY3Rpb24YAiABKAgSEAoIUG9zaXRpb24YAyABKA1CGwoZY29tLnR3aW5l",
+ "LnRhbmdvLnBtci5zdHVic2IGcHJvdG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorMovRequest), global::Tango.PMR.Stubs.StubMotorMovRequest.Parser, new[]{ "MotorID", "Direction", "Position" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubMotorMovRequest : pb::IMessage<StubMotorMovRequest> {
+ private static readonly pb::MessageParser<StubMotorMovRequest> _parser = new pb::MessageParser<StubMotorMovRequest>(() => new StubMotorMovRequest());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubMotorMovRequest> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubMotorMovRequestReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorMovRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorMovRequest(StubMotorMovRequest other) : this() {
+ motorID_ = other.motorID_;
+ direction_ = other.direction_;
+ position_ = other.position_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorMovRequest Clone() {
+ return new StubMotorMovRequest(this);
+ }
+
+ /// <summary>Field number for the "Motor_ID" field.</summary>
+ public const int MotorIDFieldNumber = 1;
+ private uint motorID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MotorID {
+ get { return motorID_; }
+ set {
+ motorID_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Direction" field.</summary>
+ public const int DirectionFieldNumber = 2;
+ private bool direction_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Direction {
+ get { return direction_; }
+ set {
+ direction_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Position" field.</summary>
+ public const int PositionFieldNumber = 3;
+ 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 StubMotorMovRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubMotorMovRequest 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 (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 (Direction != false) hash ^= Direction.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 (Direction != false) {
+ output.WriteRawTag(16);
+ output.WriteBool(Direction);
+ }
+ if (Position != 0) {
+ output.WriteRawTag(24);
+ output.WriteUInt32(Position);
+ }
+ }
+
+ [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 (Position != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Position);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(StubMotorMovRequest other) {
+ if (other == null) {
+ return;
+ }
+ if (other.MotorID != 0) {
+ MotorID = other.MotorID;
+ }
+ if (other.Direction != false) {
+ Direction = other.Direction;
+ }
+ 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: {
+ Direction = input.ReadBool();
+ break;
+ }
+ case 24: {
+ Position = input.ReadUInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorMovResponse.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorMovResponse.cs
new file mode 100644
index 000000000..dcddc97e3
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorMovResponse.cs
@@ -0,0 +1,336 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubMotorMovResponse.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 {
+
+ /// <summary>Holder for reflection information generated from StubMotorMovResponse.proto</summary>
+ public static partial class StubMotorMovResponseReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubMotorMovResponse.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubMotorMovResponseReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChpTdHViTW90b3JNb3ZSZXNwb25zZS5wcm90bxIPVGFuZ28uUE1SLlN0dWJz",
+ "Ip8BChRTdHViTW90b3JNb3ZSZXNwb25zZRIQCghNb3Rvcl9JRBgBIAEoDRIQ",
+ "CghQb3NpdGlvbhgCIAEoDRISCgpTdGF0dXNfUmVnGAMgASgNEhEKCURpcmVj",
+ "dGlvbhgEIAEoCBISCgpNb3RfU3RhdHVzGAUgASgNEhMKC1NURVBfTE9TU19B",
+ "GAYgASgIEhMKC1NURVBfTE9TU19CGAcgASgIQhsKGWNvbS50d2luZS50YW5n",
+ "by5wbXIuc3R1YnNiBnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorMovResponse), global::Tango.PMR.Stubs.StubMotorMovResponse.Parser, new[]{ "MotorID", "Position", "StatusReg", "Direction", "MotStatus", "STEPLOSSA", "STEPLOSSB" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubMotorMovResponse : pb::IMessage<StubMotorMovResponse> {
+ private static readonly pb::MessageParser<StubMotorMovResponse> _parser = new pb::MessageParser<StubMotorMovResponse>(() => new StubMotorMovResponse());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubMotorMovResponse> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubMotorMovResponseReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorMovResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorMovResponse(StubMotorMovResponse other) : this() {
+ motorID_ = other.motorID_;
+ position_ = other.position_;
+ statusReg_ = other.statusReg_;
+ direction_ = other.direction_;
+ motStatus_ = other.motStatus_;
+ sTEPLOSSA_ = other.sTEPLOSSA_;
+ sTEPLOSSB_ = other.sTEPLOSSB_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorMovResponse Clone() {
+ return new StubMotorMovResponse(this);
+ }
+
+ /// <summary>Field number for the "Motor_ID" field.</summary>
+ public const int MotorIDFieldNumber = 1;
+ private uint motorID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MotorID {
+ get { return motorID_; }
+ set {
+ motorID_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Position" field.</summary>
+ public const int PositionFieldNumber = 2;
+ private uint position_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint Position {
+ get { return position_; }
+ set {
+ position_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Status_Reg" field.</summary>
+ public const int StatusRegFieldNumber = 3;
+ private uint statusReg_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint StatusReg {
+ get { return statusReg_; }
+ set {
+ statusReg_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Direction" field.</summary>
+ public const int DirectionFieldNumber = 4;
+ private bool direction_;
+ /// <summary>
+ /// Reverse / Forward
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Direction {
+ get { return direction_; }
+ set {
+ direction_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Mot_Status" field.</summary>
+ public const int MotStatusFieldNumber = 5;
+ private uint motStatus_;
+ /// <summary>
+ ///Stopped / Acceleration / Deceleration / Constant speed
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MotStatus {
+ get { return motStatus_; }
+ set {
+ motStatus_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "STEP_LOSS_A" field.</summary>
+ public const int STEPLOSSAFieldNumber = 6;
+ private bool sTEPLOSSA_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool STEPLOSSA {
+ get { return sTEPLOSSA_; }
+ set {
+ sTEPLOSSA_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "STEP_LOSS_B" field.</summary>
+ public const int STEPLOSSBFieldNumber = 7;
+ private bool sTEPLOSSB_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool STEPLOSSB {
+ get { return sTEPLOSSB_; }
+ set {
+ sTEPLOSSB_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as StubMotorMovResponse);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubMotorMovResponse 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;
+ 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;
+ 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();
+ 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();
+ 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);
+ }
+ 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);
+ }
+ }
+
+ [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);
+ }
+ 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;
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(StubMotorMovResponse other) {
+ if (other == null) {
+ return;
+ }
+ if (other.MotorID != 0) {
+ MotorID = other.MotorID;
+ }
+ if (other.Position != 0) {
+ Position = other.Position;
+ }
+ 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;
+ }
+ }
+
+ [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;
+ }
+ 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;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorPositionRequest.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorPositionRequest.cs
new file mode 100644
index 000000000..b803ae9be
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorPositionRequest.cs
@@ -0,0 +1,159 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubMotorPositionRequest.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 {
+
+ /// <summary>Holder for reflection information generated from StubMotorPositionRequest.proto</summary>
+ public static partial class StubMotorPositionRequestReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubMotorPositionRequest.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubMotorPositionRequestReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Ch5TdHViTW90b3JQb3NpdGlvblJlcXVlc3QucHJvdG8SD1RhbmdvLlBNUi5T",
+ "dHVicyIsChhTdHViTW90b3JQb3NpdGlvblJlcXVlc3QSEAoITW90b3JfSUQY",
+ "ASABKA1CGwoZY29tLnR3aW5lLnRhbmdvLnBtci5zdHVic2IGcHJvdG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorPositionRequest), global::Tango.PMR.Stubs.StubMotorPositionRequest.Parser, new[]{ "MotorID" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubMotorPositionRequest : pb::IMessage<StubMotorPositionRequest> {
+ private static readonly pb::MessageParser<StubMotorPositionRequest> _parser = new pb::MessageParser<StubMotorPositionRequest>(() => new StubMotorPositionRequest());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubMotorPositionRequest> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubMotorPositionRequestReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorPositionRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorPositionRequest(StubMotorPositionRequest other) : this() {
+ motorID_ = other.motorID_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorPositionRequest Clone() {
+ return new StubMotorPositionRequest(this);
+ }
+
+ /// <summary>Field number for the "Motor_ID" field.</summary>
+ public const int MotorIDFieldNumber = 1;
+ private uint motorID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MotorID {
+ get { return motorID_; }
+ set {
+ motorID_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as StubMotorPositionRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubMotorPositionRequest other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (MotorID != other.MotorID) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (MotorID != 0) hash ^= MotorID.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);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (MotorID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MotorID);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(StubMotorPositionRequest other) {
+ if (other == null) {
+ return;
+ }
+ if (other.MotorID != 0) {
+ MotorID = other.MotorID;
+ }
+ }
+
+ [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;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorPositionResponse.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorPositionResponse.cs
new file mode 100644
index 000000000..f86fc1b19
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorPositionResponse.cs
@@ -0,0 +1,188 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubMotorPositionResponse.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 {
+
+ /// <summary>Holder for reflection information generated from StubMotorPositionResponse.proto</summary>
+ public static partial class StubMotorPositionResponseReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubMotorPositionResponse.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubMotorPositionResponseReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Ch9TdHViTW90b3JQb3NpdGlvblJlc3BvbnNlLnByb3RvEg9UYW5nby5QTVIu",
+ "U3R1YnMiPwoZU3R1Yk1vdG9yUG9zaXRpb25SZXNwb25zZRIQCghNb3Rvcl9J",
+ "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.StubMotorPositionResponse), global::Tango.PMR.Stubs.StubMotorPositionResponse.Parser, new[]{ "MotorID", "Position" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubMotorPositionResponse : pb::IMessage<StubMotorPositionResponse> {
+ private static readonly pb::MessageParser<StubMotorPositionResponse> _parser = new pb::MessageParser<StubMotorPositionResponse>(() => new StubMotorPositionResponse());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubMotorPositionResponse> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubMotorPositionResponseReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorPositionResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorPositionResponse(StubMotorPositionResponse other) : this() {
+ motorID_ = other.motorID_;
+ position_ = other.position_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorPositionResponse Clone() {
+ return new StubMotorPositionResponse(this);
+ }
+
+ /// <summary>Field number for the "Motor_ID" field.</summary>
+ public const int MotorIDFieldNumber = 1;
+ private uint motorID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MotorID {
+ get { return motorID_; }
+ set {
+ motorID_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Position" field.</summary>
+ 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 StubMotorPositionResponse);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubMotorPositionResponse 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(StubMotorPositionResponse 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/StubMotorRunRequest.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorRunRequest.cs
new file mode 100644
index 000000000..88fdb3726
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorRunRequest.cs
@@ -0,0 +1,216 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubMotorRunRequest.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 {
+
+ /// <summary>Holder for reflection information generated from StubMotorRunRequest.proto</summary>
+ public static partial class StubMotorRunRequestReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubMotorRunRequest.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubMotorRunRequestReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChlTdHViTW90b3JSdW5SZXF1ZXN0LnByb3RvEg9UYW5nby5QTVIuU3R1YnMi",
+ "SQoTU3R1Yk1vdG9yUnVuUmVxdWVzdBIQCghNb3Rvcl9JRBgBIAEoDRIRCglE",
+ "aXJlY3Rpb24YAiABKAgSDQoFU3BlZWQYAyABKAFCGwoZY29tLnR3aW5lLnRh",
+ "bmdvLnBtci5zdHVic2IGcHJvdG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorRunRequest), global::Tango.PMR.Stubs.StubMotorRunRequest.Parser, new[]{ "MotorID", "Direction", "Speed" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubMotorRunRequest : pb::IMessage<StubMotorRunRequest> {
+ private static readonly pb::MessageParser<StubMotorRunRequest> _parser = new pb::MessageParser<StubMotorRunRequest>(() => new StubMotorRunRequest());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubMotorRunRequest> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubMotorRunRequestReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorRunRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorRunRequest(StubMotorRunRequest other) : this() {
+ motorID_ = other.motorID_;
+ direction_ = other.direction_;
+ speed_ = other.speed_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorRunRequest Clone() {
+ return new StubMotorRunRequest(this);
+ }
+
+ /// <summary>Field number for the "Motor_ID" field.</summary>
+ public const int MotorIDFieldNumber = 1;
+ private uint motorID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MotorID {
+ get { return motorID_; }
+ set {
+ motorID_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Direction" field.</summary>
+ public const int DirectionFieldNumber = 2;
+ private bool direction_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Direction {
+ get { return direction_; }
+ set {
+ direction_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Speed" field.</summary>
+ 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 StubMotorRunRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubMotorRunRequest 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(StubMotorRunRequest 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/StubMotorRunResponse.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorRunResponse.cs
new file mode 100644
index 000000000..ea8a714ec
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorRunResponse.cs
@@ -0,0 +1,336 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubMotorRunResponse.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 {
+
+ /// <summary>Holder for reflection information generated from StubMotorRunResponse.proto</summary>
+ public static partial class StubMotorRunResponseReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubMotorRunResponse.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubMotorRunResponseReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChpTdHViTW90b3JSdW5SZXNwb25zZS5wcm90bxIPVGFuZ28uUE1SLlN0dWJz",
+ "IpwBChRTdHViTW90b3JSdW5SZXNwb25zZRIQCghNb3Rvcl9JRBgBIAEoDRIN",
+ "CgVTcGVlZBgCIAEoARISCgpTdGF0dXNfUmVnGAMgASgNEhEKCURpcmVjdGlv",
+ "bhgEIAEoCBISCgpNb3RfU3RhdHVzGAUgASgNEhMKC1NURVBfTE9TU19BGAYg",
+ "ASgIEhMKC1NURVBfTE9TU19CGAcgASgIQhsKGWNvbS50d2luZS50YW5nby5w",
+ "bXIuc3R1YnNiBnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorRunResponse), global::Tango.PMR.Stubs.StubMotorRunResponse.Parser, new[]{ "MotorID", "Speed", "StatusReg", "Direction", "MotStatus", "STEPLOSSA", "STEPLOSSB" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubMotorRunResponse : pb::IMessage<StubMotorRunResponse> {
+ private static readonly pb::MessageParser<StubMotorRunResponse> _parser = new pb::MessageParser<StubMotorRunResponse>(() => new StubMotorRunResponse());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubMotorRunResponse> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubMotorRunResponseReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorRunResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorRunResponse(StubMotorRunResponse other) : this() {
+ motorID_ = other.motorID_;
+ speed_ = other.speed_;
+ statusReg_ = other.statusReg_;
+ direction_ = other.direction_;
+ motStatus_ = other.motStatus_;
+ sTEPLOSSA_ = other.sTEPLOSSA_;
+ sTEPLOSSB_ = other.sTEPLOSSB_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorRunResponse Clone() {
+ return new StubMotorRunResponse(this);
+ }
+
+ /// <summary>Field number for the "Motor_ID" field.</summary>
+ public const int MotorIDFieldNumber = 1;
+ private uint motorID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MotorID {
+ get { return motorID_; }
+ set {
+ motorID_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Speed" field.</summary>
+ public const int SpeedFieldNumber = 2;
+ private double speed_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double Speed {
+ get { return speed_; }
+ set {
+ speed_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Status_Reg" field.</summary>
+ public const int StatusRegFieldNumber = 3;
+ private uint statusReg_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint StatusReg {
+ get { return statusReg_; }
+ set {
+ statusReg_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Direction" field.</summary>
+ public const int DirectionFieldNumber = 4;
+ private bool direction_;
+ /// <summary>
+ /// Reverse / Forward
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Direction {
+ get { return direction_; }
+ set {
+ direction_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Mot_Status" field.</summary>
+ public const int MotStatusFieldNumber = 5;
+ private uint motStatus_;
+ /// <summary>
+ ///Stopped / Acceleration / Deceleration / Constant speed
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MotStatus {
+ get { return motStatus_; }
+ set {
+ motStatus_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "STEP_LOSS_A" field.</summary>
+ public const int STEPLOSSAFieldNumber = 6;
+ private bool sTEPLOSSA_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool STEPLOSSA {
+ get { return sTEPLOSSA_; }
+ set {
+ sTEPLOSSA_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "STEP_LOSS_B" field.</summary>
+ public const int STEPLOSSBFieldNumber = 7;
+ private bool sTEPLOSSB_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool STEPLOSSB {
+ get { return sTEPLOSSB_; }
+ set {
+ sTEPLOSSB_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as StubMotorRunResponse);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubMotorRunResponse 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;
+ 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();
+ 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);
+ }
+ }
+
+ [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;
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(StubMotorRunResponse 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;
+ }
+ }
+
+ [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;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorSpeedRequest.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorSpeedRequest.cs
new file mode 100644
index 000000000..1222cc5d9
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorSpeedRequest.cs
@@ -0,0 +1,159 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubMotorSpeedRequest.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 {
+
+ /// <summary>Holder for reflection information generated from StubMotorSpeedRequest.proto</summary>
+ public static partial class StubMotorSpeedRequestReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubMotorSpeedRequest.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubMotorSpeedRequestReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChtTdHViTW90b3JTcGVlZFJlcXVlc3QucHJvdG8SD1RhbmdvLlBNUi5TdHVi",
+ "cyIpChVTdHViTW90b3JTcGVlZFJlcXVlc3QSEAoITW90b3JfSUQYASABKA1C",
+ "GwoZY29tLnR3aW5lLnRhbmdvLnBtci5zdHVic2IGcHJvdG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorSpeedRequest), global::Tango.PMR.Stubs.StubMotorSpeedRequest.Parser, new[]{ "MotorID" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubMotorSpeedRequest : pb::IMessage<StubMotorSpeedRequest> {
+ private static readonly pb::MessageParser<StubMotorSpeedRequest> _parser = new pb::MessageParser<StubMotorSpeedRequest>(() => new StubMotorSpeedRequest());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubMotorSpeedRequest> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubMotorSpeedRequestReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorSpeedRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorSpeedRequest(StubMotorSpeedRequest other) : this() {
+ motorID_ = other.motorID_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorSpeedRequest Clone() {
+ return new StubMotorSpeedRequest(this);
+ }
+
+ /// <summary>Field number for the "Motor_ID" field.</summary>
+ public const int MotorIDFieldNumber = 1;
+ private uint motorID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MotorID {
+ get { return motorID_; }
+ set {
+ motorID_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as StubMotorSpeedRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubMotorSpeedRequest other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (MotorID != other.MotorID) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (MotorID != 0) hash ^= MotorID.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);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (MotorID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MotorID);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(StubMotorSpeedRequest other) {
+ if (other == null) {
+ return;
+ }
+ if (other.MotorID != 0) {
+ MotorID = other.MotorID;
+ }
+ }
+
+ [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;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorSpeedResponse.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorSpeedResponse.cs
new file mode 100644
index 000000000..53220e764
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorSpeedResponse.cs
@@ -0,0 +1,188 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubMotorSpeedResponse.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 {
+
+ /// <summary>Holder for reflection information generated from StubMotorSpeedResponse.proto</summary>
+ public static partial class StubMotorSpeedResponseReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubMotorSpeedResponse.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubMotorSpeedResponseReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChxTdHViTW90b3JTcGVlZFJlc3BvbnNlLnByb3RvEg9UYW5nby5QTVIuU3R1",
+ "YnMiOQoWU3R1Yk1vdG9yU3BlZWRSZXNwb25zZRIQCghNb3Rvcl9JRBgBIAEo",
+ "DRINCgVTcGVlZBgCIAEoAUIbChljb20udHdpbmUudGFuZ28ucG1yLnN0dWJz",
+ "YgZwcm90bzM="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorSpeedResponse), global::Tango.PMR.Stubs.StubMotorSpeedResponse.Parser, new[]{ "MotorID", "Speed" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubMotorSpeedResponse : pb::IMessage<StubMotorSpeedResponse> {
+ private static readonly pb::MessageParser<StubMotorSpeedResponse> _parser = new pb::MessageParser<StubMotorSpeedResponse>(() => new StubMotorSpeedResponse());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubMotorSpeedResponse> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubMotorSpeedResponseReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorSpeedResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorSpeedResponse(StubMotorSpeedResponse other) : this() {
+ motorID_ = other.motorID_;
+ speed_ = other.speed_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorSpeedResponse Clone() {
+ return new StubMotorSpeedResponse(this);
+ }
+
+ /// <summary>Field number for the "Motor_ID" field.</summary>
+ public const int MotorIDFieldNumber = 1;
+ private uint motorID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MotorID {
+ get { return motorID_; }
+ set {
+ motorID_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Speed" field.</summary>
+ public const int SpeedFieldNumber = 2;
+ 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 StubMotorSpeedResponse);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubMotorSpeedResponse 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;
+ 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();
+ 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);
+ }
+ }
+
+ [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;
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(StubMotorSpeedResponse other) {
+ if (other == null) {
+ return;
+ }
+ if (other.MotorID != 0) {
+ MotorID = other.MotorID;
+ }
+ 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 17: {
+ Speed = input.ReadDouble();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorStatusRequest.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorStatusRequest.cs
new file mode 100644
index 000000000..81b2d44f7
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorStatusRequest.cs
@@ -0,0 +1,188 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubMotorStatusRequest.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 {
+
+ /// <summary>Holder for reflection information generated from StubMotorStatusRequest.proto</summary>
+ public static partial class StubMotorStatusRequestReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubMotorStatusRequest.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubMotorStatusRequestReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChxTdHViTW90b3JTdGF0dXNSZXF1ZXN0LnByb3RvEg9UYW5nby5QTVIuU3R1",
+ "YnMiPwoWU3R1Yk1vdG9yU3RhdHVzUmVxdWVzdBIQCghNb3Rvcl9JRBgBIAEo",
+ "DRITCgtDbGVhclN0YXR1cxgCIAEoCEIbChljb20udHdpbmUudGFuZ28ucG1y",
+ "LnN0dWJzYgZwcm90bzM="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorStatusRequest), global::Tango.PMR.Stubs.StubMotorStatusRequest.Parser, new[]{ "MotorID", "ClearStatus" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubMotorStatusRequest : pb::IMessage<StubMotorStatusRequest> {
+ private static readonly pb::MessageParser<StubMotorStatusRequest> _parser = new pb::MessageParser<StubMotorStatusRequest>(() => new StubMotorStatusRequest());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubMotorStatusRequest> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubMotorStatusRequestReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorStatusRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorStatusRequest(StubMotorStatusRequest other) : this() {
+ motorID_ = other.motorID_;
+ clearStatus_ = other.clearStatus_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorStatusRequest Clone() {
+ return new StubMotorStatusRequest(this);
+ }
+
+ /// <summary>Field number for the "Motor_ID" field.</summary>
+ public const int MotorIDFieldNumber = 1;
+ private uint motorID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MotorID {
+ get { return motorID_; }
+ set {
+ motorID_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "ClearStatus" field.</summary>
+ public const int ClearStatusFieldNumber = 2;
+ private bool clearStatus_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool ClearStatus {
+ get { return clearStatus_; }
+ set {
+ clearStatus_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as StubMotorStatusRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubMotorStatusRequest other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (MotorID != other.MotorID) return false;
+ if (ClearStatus != other.ClearStatus) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (MotorID != 0) hash ^= MotorID.GetHashCode();
+ if (ClearStatus != false) hash ^= ClearStatus.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 (ClearStatus != false) {
+ output.WriteRawTag(16);
+ output.WriteBool(ClearStatus);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (MotorID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MotorID);
+ }
+ if (ClearStatus != false) {
+ size += 1 + 1;
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(StubMotorStatusRequest other) {
+ if (other == null) {
+ return;
+ }
+ if (other.MotorID != 0) {
+ MotorID = other.MotorID;
+ }
+ if (other.ClearStatus != false) {
+ ClearStatus = other.ClearStatus;
+ }
+ }
+
+ [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: {
+ ClearStatus = input.ReadBool();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorStatusResponse.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorStatusResponse.cs
new file mode 100644
index 000000000..e59311d05
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorStatusResponse.cs
@@ -0,0 +1,585 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubMotorStatusResponse.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 {
+
+ /// <summary>Holder for reflection information generated from StubMotorStatusResponse.proto</summary>
+ public static partial class StubMotorStatusResponseReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubMotorStatusResponse.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubMotorStatusResponseReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Ch1TdHViTW90b3JTdGF0dXNSZXNwb25zZS5wcm90bxIPVGFuZ28uUE1SLlN0",
+ "dWJzIqICChdTdHViTW90b3JTdGF0dXNSZXNwb25zZRIQCghNb3Rvcl9JRBgB",
+ "IAEoDRIPCgdTQ0tfTU9EGAIgASgIEhMKC1NURVBfTE9TU19CGAMgASgIEhMK",
+ "C1NURVBfTE9TU19BGAQgASgIEgsKA09DRBgFIAEoCBINCgVUSF9TRBgGIAEo",
+ "CBIOCgZUSF9XUk4YByABKAgSDAoEVVZMTxgIIAEoCBIRCglXUk9OR19DTUQY",
+ "CSABKAgSEwoLTk9UUEVSRl9DTUQYCiABKAgSEgoKTU9UX1NUQVRVUxgLIAEo",
+ "DRILCgNESVIYDCABKAgSDgoGU1dfRVZOGA0gASgIEgwKBFNXX0YYDiABKAgS",
+ "DAoEQlVTWRgPIAEoCBILCgNIaVoYECABKAhCGwoZY29tLnR3aW5lLnRhbmdv",
+ "LnBtci5zdHVic2IGcHJvdG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorStatusResponse), global::Tango.PMR.Stubs.StubMotorStatusResponse.Parser, new[]{ "MotorID", "SCKMOD", "STEPLOSSB", "STEPLOSSA", "OCD", "THSD", "THWRN", "UVLO", "WRONGCMD", "NOTPERFCMD", "MOTSTATUS", "DIR", "SWEVN", "SWF", "BUSY", "HiZ" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubMotorStatusResponse : pb::IMessage<StubMotorStatusResponse> {
+ private static readonly pb::MessageParser<StubMotorStatusResponse> _parser = new pb::MessageParser<StubMotorStatusResponse>(() => new StubMotorStatusResponse());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubMotorStatusResponse> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubMotorStatusResponseReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorStatusResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorStatusResponse(StubMotorStatusResponse other) : this() {
+ motorID_ = other.motorID_;
+ sCKMOD_ = other.sCKMOD_;
+ sTEPLOSSB_ = other.sTEPLOSSB_;
+ sTEPLOSSA_ = other.sTEPLOSSA_;
+ oCD_ = other.oCD_;
+ tHSD_ = other.tHSD_;
+ tHWRN_ = other.tHWRN_;
+ uVLO_ = other.uVLO_;
+ wRONGCMD_ = other.wRONGCMD_;
+ nOTPERFCMD_ = other.nOTPERFCMD_;
+ mOTSTATUS_ = other.mOTSTATUS_;
+ dIR_ = other.dIR_;
+ sWEVN_ = other.sWEVN_;
+ sWF_ = other.sWF_;
+ bUSY_ = other.bUSY_;
+ hiZ_ = other.hiZ_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorStatusResponse Clone() {
+ return new StubMotorStatusResponse(this);
+ }
+
+ /// <summary>Field number for the "Motor_ID" field.</summary>
+ public const int MotorIDFieldNumber = 1;
+ private uint motorID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MotorID {
+ get { return motorID_; }
+ set {
+ motorID_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "SCK_MOD" field.</summary>
+ public const int SCKMODFieldNumber = 2;
+ private bool sCKMOD_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool SCKMOD {
+ get { return sCKMOD_; }
+ set {
+ sCKMOD_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "STEP_LOSS_B" field.</summary>
+ public const int STEPLOSSBFieldNumber = 3;
+ private bool sTEPLOSSB_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool STEPLOSSB {
+ get { return sTEPLOSSB_; }
+ set {
+ sTEPLOSSB_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "STEP_LOSS_A" field.</summary>
+ public const int STEPLOSSAFieldNumber = 4;
+ private bool sTEPLOSSA_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool STEPLOSSA {
+ get { return sTEPLOSSA_; }
+ set {
+ sTEPLOSSA_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "OCD" field.</summary>
+ public const int OCDFieldNumber = 5;
+ private bool oCD_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool OCD {
+ get { return oCD_; }
+ set {
+ oCD_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TH_SD" field.</summary>
+ public const int THSDFieldNumber = 6;
+ private bool tHSD_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool THSD {
+ get { return tHSD_; }
+ set {
+ tHSD_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "TH_WRN" field.</summary>
+ public const int THWRNFieldNumber = 7;
+ private bool tHWRN_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool THWRN {
+ get { return tHWRN_; }
+ set {
+ tHWRN_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "UVLO" field.</summary>
+ public const int UVLOFieldNumber = 8;
+ private bool uVLO_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool UVLO {
+ get { return uVLO_; }
+ set {
+ uVLO_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "WRONG_CMD" field.</summary>
+ public const int WRONGCMDFieldNumber = 9;
+ private bool wRONGCMD_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool WRONGCMD {
+ get { return wRONGCMD_; }
+ set {
+ wRONGCMD_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "NOTPERF_CMD" field.</summary>
+ public const int NOTPERFCMDFieldNumber = 10;
+ private bool nOTPERFCMD_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool NOTPERFCMD {
+ get { return nOTPERFCMD_; }
+ set {
+ nOTPERFCMD_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "MOT_STATUS" field.</summary>
+ public const int MOTSTATUSFieldNumber = 11;
+ private uint mOTSTATUS_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MOTSTATUS {
+ get { return mOTSTATUS_; }
+ set {
+ mOTSTATUS_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "DIR" field.</summary>
+ public const int DIRFieldNumber = 12;
+ private bool dIR_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool DIR {
+ get { return dIR_; }
+ set {
+ dIR_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "SW_EVN" field.</summary>
+ public const int SWEVNFieldNumber = 13;
+ private bool sWEVN_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool SWEVN {
+ get { return sWEVN_; }
+ set {
+ sWEVN_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "SW_F" field.</summary>
+ public const int SWFFieldNumber = 14;
+ private bool sWF_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool SWF {
+ get { return sWF_; }
+ set {
+ sWF_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "BUSY" field.</summary>
+ public const int BUSYFieldNumber = 15;
+ private bool bUSY_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool BUSY {
+ get { return bUSY_; }
+ set {
+ bUSY_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "HiZ" field.</summary>
+ public const int HiZFieldNumber = 16;
+ private bool hiZ_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HiZ {
+ get { return hiZ_; }
+ set {
+ hiZ_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as StubMotorStatusResponse);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubMotorStatusResponse other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (MotorID != other.MotorID) return false;
+ if (SCKMOD != other.SCKMOD) return false;
+ if (STEPLOSSB != other.STEPLOSSB) return false;
+ if (STEPLOSSA != other.STEPLOSSA) return false;
+ if (OCD != other.OCD) return false;
+ if (THSD != other.THSD) return false;
+ if (THWRN != other.THWRN) return false;
+ if (UVLO != other.UVLO) return false;
+ if (WRONGCMD != other.WRONGCMD) return false;
+ if (NOTPERFCMD != other.NOTPERFCMD) return false;
+ if (MOTSTATUS != other.MOTSTATUS) return false;
+ if (DIR != other.DIR) return false;
+ if (SWEVN != other.SWEVN) return false;
+ if (SWF != other.SWF) return false;
+ if (BUSY != other.BUSY) return false;
+ if (HiZ != other.HiZ) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (MotorID != 0) hash ^= MotorID.GetHashCode();
+ if (SCKMOD != false) hash ^= SCKMOD.GetHashCode();
+ if (STEPLOSSB != false) hash ^= STEPLOSSB.GetHashCode();
+ if (STEPLOSSA != false) hash ^= STEPLOSSA.GetHashCode();
+ if (OCD != false) hash ^= OCD.GetHashCode();
+ if (THSD != false) hash ^= THSD.GetHashCode();
+ if (THWRN != false) hash ^= THWRN.GetHashCode();
+ if (UVLO != false) hash ^= UVLO.GetHashCode();
+ if (WRONGCMD != false) hash ^= WRONGCMD.GetHashCode();
+ if (NOTPERFCMD != false) hash ^= NOTPERFCMD.GetHashCode();
+ if (MOTSTATUS != 0) hash ^= MOTSTATUS.GetHashCode();
+ if (DIR != false) hash ^= DIR.GetHashCode();
+ if (SWEVN != false) hash ^= SWEVN.GetHashCode();
+ if (SWF != false) hash ^= SWF.GetHashCode();
+ if (BUSY != false) hash ^= BUSY.GetHashCode();
+ if (HiZ != false) hash ^= HiZ.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 (SCKMOD != false) {
+ output.WriteRawTag(16);
+ output.WriteBool(SCKMOD);
+ }
+ if (STEPLOSSB != false) {
+ output.WriteRawTag(24);
+ output.WriteBool(STEPLOSSB);
+ }
+ if (STEPLOSSA != false) {
+ output.WriteRawTag(32);
+ output.WriteBool(STEPLOSSA);
+ }
+ if (OCD != false) {
+ output.WriteRawTag(40);
+ output.WriteBool(OCD);
+ }
+ if (THSD != false) {
+ output.WriteRawTag(48);
+ output.WriteBool(THSD);
+ }
+ if (THWRN != false) {
+ output.WriteRawTag(56);
+ output.WriteBool(THWRN);
+ }
+ if (UVLO != false) {
+ output.WriteRawTag(64);
+ output.WriteBool(UVLO);
+ }
+ if (WRONGCMD != false) {
+ output.WriteRawTag(72);
+ output.WriteBool(WRONGCMD);
+ }
+ if (NOTPERFCMD != false) {
+ output.WriteRawTag(80);
+ output.WriteBool(NOTPERFCMD);
+ }
+ if (MOTSTATUS != 0) {
+ output.WriteRawTag(88);
+ output.WriteUInt32(MOTSTATUS);
+ }
+ if (DIR != false) {
+ output.WriteRawTag(96);
+ output.WriteBool(DIR);
+ }
+ if (SWEVN != false) {
+ output.WriteRawTag(104);
+ output.WriteBool(SWEVN);
+ }
+ if (SWF != false) {
+ output.WriteRawTag(112);
+ output.WriteBool(SWF);
+ }
+ if (BUSY != false) {
+ output.WriteRawTag(120);
+ output.WriteBool(BUSY);
+ }
+ if (HiZ != false) {
+ output.WriteRawTag(128, 1);
+ output.WriteBool(HiZ);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (MotorID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MotorID);
+ }
+ if (SCKMOD != false) {
+ size += 1 + 1;
+ }
+ if (STEPLOSSB != false) {
+ size += 1 + 1;
+ }
+ if (STEPLOSSA != false) {
+ size += 1 + 1;
+ }
+ if (OCD != false) {
+ size += 1 + 1;
+ }
+ if (THSD != false) {
+ size += 1 + 1;
+ }
+ if (THWRN != false) {
+ size += 1 + 1;
+ }
+ if (UVLO != false) {
+ size += 1 + 1;
+ }
+ if (WRONGCMD != false) {
+ size += 1 + 1;
+ }
+ if (NOTPERFCMD != false) {
+ size += 1 + 1;
+ }
+ if (MOTSTATUS != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MOTSTATUS);
+ }
+ if (DIR != false) {
+ size += 1 + 1;
+ }
+ if (SWEVN != false) {
+ size += 1 + 1;
+ }
+ if (SWF != false) {
+ size += 1 + 1;
+ }
+ if (BUSY != false) {
+ size += 1 + 1;
+ }
+ if (HiZ != false) {
+ size += 2 + 1;
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(StubMotorStatusResponse other) {
+ if (other == null) {
+ return;
+ }
+ if (other.MotorID != 0) {
+ MotorID = other.MotorID;
+ }
+ if (other.SCKMOD != false) {
+ SCKMOD = other.SCKMOD;
+ }
+ if (other.STEPLOSSB != false) {
+ STEPLOSSB = other.STEPLOSSB;
+ }
+ if (other.STEPLOSSA != false) {
+ STEPLOSSA = other.STEPLOSSA;
+ }
+ if (other.OCD != false) {
+ OCD = other.OCD;
+ }
+ if (other.THSD != false) {
+ THSD = other.THSD;
+ }
+ if (other.THWRN != false) {
+ THWRN = other.THWRN;
+ }
+ if (other.UVLO != false) {
+ UVLO = other.UVLO;
+ }
+ if (other.WRONGCMD != false) {
+ WRONGCMD = other.WRONGCMD;
+ }
+ if (other.NOTPERFCMD != false) {
+ NOTPERFCMD = other.NOTPERFCMD;
+ }
+ if (other.MOTSTATUS != 0) {
+ MOTSTATUS = other.MOTSTATUS;
+ }
+ if (other.DIR != false) {
+ DIR = other.DIR;
+ }
+ if (other.SWEVN != false) {
+ SWEVN = other.SWEVN;
+ }
+ if (other.SWF != false) {
+ SWF = other.SWF;
+ }
+ if (other.BUSY != false) {
+ BUSY = other.BUSY;
+ }
+ if (other.HiZ != false) {
+ HiZ = other.HiZ;
+ }
+ }
+
+ [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: {
+ SCKMOD = input.ReadBool();
+ break;
+ }
+ case 24: {
+ STEPLOSSB = input.ReadBool();
+ break;
+ }
+ case 32: {
+ STEPLOSSA = input.ReadBool();
+ break;
+ }
+ case 40: {
+ OCD = input.ReadBool();
+ break;
+ }
+ case 48: {
+ THSD = input.ReadBool();
+ break;
+ }
+ case 56: {
+ THWRN = input.ReadBool();
+ break;
+ }
+ case 64: {
+ UVLO = input.ReadBool();
+ break;
+ }
+ case 72: {
+ WRONGCMD = input.ReadBool();
+ break;
+ }
+ case 80: {
+ NOTPERFCMD = input.ReadBool();
+ break;
+ }
+ case 88: {
+ MOTSTATUS = input.ReadUInt32();
+ break;
+ }
+ case 96: {
+ DIR = input.ReadBool();
+ break;
+ }
+ case 104: {
+ SWEVN = input.ReadBool();
+ break;
+ }
+ case 112: {
+ SWF = input.ReadBool();
+ break;
+ }
+ case 120: {
+ BUSY = input.ReadBool();
+ break;
+ }
+ case 128: {
+ HiZ = input.ReadBool();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorStopRequest.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorStopRequest.cs
new file mode 100644
index 000000000..0947d7b37
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorStopRequest.cs
@@ -0,0 +1,191 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubMotorStopRequest.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 {
+
+ /// <summary>Holder for reflection information generated from StubMotorStopRequest.proto</summary>
+ public static partial class StubMotorStopRequestReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubMotorStopRequest.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubMotorStopRequestReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChpTdHViTW90b3JTdG9wUmVxdWVzdC5wcm90bxIPVGFuZ28uUE1SLlN0dWJz",
+ "IjoKFFN0dWJNb3RvclN0b3BSZXF1ZXN0EhAKCE1vdG9yX0lEGAEgASgNEhAK",
+ "CFN0b3BfQ01EGAIgASgNQhsKGWNvbS50d2luZS50YW5nby5wbXIuc3R1YnNi",
+ "BnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorStopRequest), global::Tango.PMR.Stubs.StubMotorStopRequest.Parser, new[]{ "MotorID", "StopCMD" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubMotorStopRequest : pb::IMessage<StubMotorStopRequest> {
+ private static readonly pb::MessageParser<StubMotorStopRequest> _parser = new pb::MessageParser<StubMotorStopRequest>(() => new StubMotorStopRequest());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubMotorStopRequest> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubMotorStopRequestReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorStopRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorStopRequest(StubMotorStopRequest other) : this() {
+ motorID_ = other.motorID_;
+ stopCMD_ = other.stopCMD_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorStopRequest Clone() {
+ return new StubMotorStopRequest(this);
+ }
+
+ /// <summary>Field number for the "Motor_ID" field.</summary>
+ public const int MotorIDFieldNumber = 1;
+ private uint motorID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MotorID {
+ get { return motorID_; }
+ set {
+ motorID_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Stop_CMD" field.</summary>
+ public const int StopCMDFieldNumber = 2;
+ private uint stopCMD_;
+ /// <summary>
+ /// 1 - Hard_Stop/ 2 - Soft_Stop/ 3 - Hard_Hiz/ 4 - Soft_Hiz
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint StopCMD {
+ get { return stopCMD_; }
+ set {
+ stopCMD_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as StubMotorStopRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubMotorStopRequest other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (MotorID != other.MotorID) return false;
+ if (StopCMD != other.StopCMD) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (MotorID != 0) hash ^= MotorID.GetHashCode();
+ if (StopCMD != 0) hash ^= StopCMD.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 (StopCMD != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(StopCMD);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (MotorID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MotorID);
+ }
+ if (StopCMD != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(StopCMD);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(StubMotorStopRequest other) {
+ if (other == null) {
+ return;
+ }
+ if (other.MotorID != 0) {
+ MotorID = other.MotorID;
+ }
+ if (other.StopCMD != 0) {
+ StopCMD = other.StopCMD;
+ }
+ }
+
+ [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: {
+ StopCMD = input.ReadUInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorStopResponse.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorStopResponse.cs
new file mode 100644
index 000000000..59fc68fe2
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubMotorStopResponse.cs
@@ -0,0 +1,222 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: StubMotorStopResponse.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 {
+
+ /// <summary>Holder for reflection information generated from StubMotorStopResponse.proto</summary>
+ public static partial class StubMotorStopResponseReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for StubMotorStopResponse.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static StubMotorStopResponseReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChtTdHViTW90b3JTdG9wUmVzcG9uc2UucHJvdG8SD1RhbmdvLlBNUi5TdHVi",
+ "cyJKChVTdHViTW90b3JTdG9wUmVzcG9uc2USEAoITW90b3JfSUQYASABKA0S",
+ "EgoKTW90X1N0YXR1cxgCIAEoDRILCgNIaVoYAyABKAhCGwoZY29tLnR3aW5l",
+ "LnRhbmdvLnBtci5zdHVic2IGcHJvdG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorStopResponse), global::Tango.PMR.Stubs.StubMotorStopResponse.Parser, new[]{ "MotorID", "MotStatus", "HiZ" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class StubMotorStopResponse : pb::IMessage<StubMotorStopResponse> {
+ private static readonly pb::MessageParser<StubMotorStopResponse> _parser = new pb::MessageParser<StubMotorStopResponse>(() => new StubMotorStopResponse());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<StubMotorStopResponse> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Stubs.StubMotorStopResponseReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorStopResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorStopResponse(StubMotorStopResponse other) : this() {
+ motorID_ = other.motorID_;
+ motStatus_ = other.motStatus_;
+ hiZ_ = other.hiZ_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public StubMotorStopResponse Clone() {
+ return new StubMotorStopResponse(this);
+ }
+
+ /// <summary>Field number for the "Motor_ID" field.</summary>
+ public const int MotorIDFieldNumber = 1;
+ private uint motorID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MotorID {
+ get { return motorID_; }
+ set {
+ motorID_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Mot_Status" field.</summary>
+ public const int MotStatusFieldNumber = 2;
+ private uint motStatus_;
+ /// <summary>
+ /// Stopped / Acceleration / Deceleration / Constant speed
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MotStatus {
+ get { return motStatus_; }
+ set {
+ motStatus_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "HiZ" field.</summary>
+ public const int HiZFieldNumber = 3;
+ private bool hiZ_;
+ /// <summary>
+ /// 1 - high impedance state.
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HiZ {
+ get { return hiZ_; }
+ set {
+ hiZ_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as StubMotorStopResponse);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(StubMotorStopResponse other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (MotorID != other.MotorID) return false;
+ if (MotStatus != other.MotStatus) return false;
+ if (HiZ != other.HiZ) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (MotorID != 0) hash ^= MotorID.GetHashCode();
+ if (MotStatus != 0) hash ^= MotStatus.GetHashCode();
+ if (HiZ != false) hash ^= HiZ.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 (MotStatus != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(MotStatus);
+ }
+ if (HiZ != false) {
+ output.WriteRawTag(24);
+ output.WriteBool(HiZ);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (MotorID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MotorID);
+ }
+ if (MotStatus != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MotStatus);
+ }
+ if (HiZ != false) {
+ size += 1 + 1;
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(StubMotorStopResponse other) {
+ if (other == null) {
+ return;
+ }
+ if (other.MotorID != 0) {
+ MotorID = other.MotorID;
+ }
+ if (other.MotStatus != 0) {
+ MotStatus = other.MotStatus;
+ }
+ if (other.HiZ != false) {
+ HiZ = other.HiZ;
+ }
+ }
+
+ [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: {
+ MotStatus = input.ReadUInt32();
+ break;
+ }
+ case 24: {
+ HiZ = input.ReadBool();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/App_Data/Tango.db b/Software/Visual_Studio/Web/Tango.MachineService/App_Data/Tango.db
index d676fc8c3..12c88039d 100644
--- a/Software/Visual_Studio/Web/Tango.MachineService/App_Data/Tango.db
+++ b/Software/Visual_Studio/Web/Tango.MachineService/App_Data/Tango.db
Binary files differ