aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-07-26 16:02:44 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-07-26 16:02:44 +0300
commit9283a0917dc29aba1e89bf40bc59f255f73cec48 (patch)
tree03677bcdf84f75451009b727b5a9a6e17396d54d /Software
parentd70d3466cd6e67e2b87af4865ee6e629d2edb4ca (diff)
downloadTango-9283a0917dc29aba1e89bf40bc59f255f73cec48.tar.gz
Tango-9283a0917dc29aba1e89bf40bc59f255f73cec48.zip
Refactored proto C compiler to enable cross directory messages.
Refactored tech motors and dispensers to use types from hardware.
Diffstat (limited to 'Software')
-rw-r--r--Software/DB/Tango.mdfbin75497472 -> 75497472 bytes
-rw-r--r--Software/DB/Tango_log.ldfbin1835008 -> 1835008 bytes
-rw-r--r--Software/PMR/Messages/Diagnostics/DispenserAbortHomingRequest.proto2
-rw-r--r--Software/PMR/Messages/Diagnostics/DispenserAbortJoggingRequest.proto2
-rw-r--r--Software/PMR/Messages/Diagnostics/DispenserAbortJoggingResponse.proto2
-rw-r--r--Software/PMR/Messages/Diagnostics/DispenserHomingRequest.proto2
-rw-r--r--Software/PMR/Messages/Diagnostics/DispenserJoggingRequest.proto2
-rw-r--r--Software/PMR/Messages/Diagnostics/MotorAbortHomingRequest.proto4
-rw-r--r--Software/PMR/Messages/Diagnostics/MotorAbortJoggingRequest.proto4
-rw-r--r--Software/PMR/Messages/Diagnostics/MotorHomingRequest.proto4
-rw-r--r--Software/PMR/Messages/Diagnostics/MotorJoggingRequest.proto3
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs32
-rw-r--r--Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs36
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserAbortHomingRequest.cs40
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserAbortJoggingRequest.cs40
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserAbortJoggingResponse.cs40
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserHomingRequest.cs40
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserJoggingRequest.cs42
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/MotorAbortHomingRequest.cs43
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/MotorAbortJoggingRequest.cs47
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/MotorHomingRequest.cs43
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/MotorJoggingRequest.cs46
-rw-r--r--Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs2
-rw-r--r--Software/Visual_Studio/Tango.Protobuf/Compilers/CCompiler.cs24
24 files changed, 264 insertions, 236 deletions
diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf
index 9e5e297e4..63cd43949 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 6a6100d02..ced536d75 100644
--- a/Software/DB/Tango_log.ldf
+++ b/Software/DB/Tango_log.ldf
Binary files differ
diff --git a/Software/PMR/Messages/Diagnostics/DispenserAbortHomingRequest.proto b/Software/PMR/Messages/Diagnostics/DispenserAbortHomingRequest.proto
index a50c64c76..06f21aee5 100644
--- a/Software/PMR/Messages/Diagnostics/DispenserAbortHomingRequest.proto
+++ b/Software/PMR/Messages/Diagnostics/DispenserAbortHomingRequest.proto
@@ -5,5 +5,5 @@ option java_package = "com.twine.tango.pmr.diagnostics";
message DispenserAbortHomingRequest
{
- int32 Code = 1;
+ int32 Index = 1;
} \ No newline at end of file
diff --git a/Software/PMR/Messages/Diagnostics/DispenserAbortJoggingRequest.proto b/Software/PMR/Messages/Diagnostics/DispenserAbortJoggingRequest.proto
index 7767ea60f..c2398798c 100644
--- a/Software/PMR/Messages/Diagnostics/DispenserAbortJoggingRequest.proto
+++ b/Software/PMR/Messages/Diagnostics/DispenserAbortJoggingRequest.proto
@@ -5,5 +5,5 @@ option java_package = "com.twine.tango.pmr.diagnostics";
message DispenserAbortJoggingRequest
{
- int32 Code = 2;
+ int32 Index = 2;
} \ No newline at end of file
diff --git a/Software/PMR/Messages/Diagnostics/DispenserAbortJoggingResponse.proto b/Software/PMR/Messages/Diagnostics/DispenserAbortJoggingResponse.proto
index df0fa3fad..5ce30c844 100644
--- a/Software/PMR/Messages/Diagnostics/DispenserAbortJoggingResponse.proto
+++ b/Software/PMR/Messages/Diagnostics/DispenserAbortJoggingResponse.proto
@@ -5,5 +5,5 @@ option java_package = "com.twine.tango.pmr.diagnostics";
message DispenserAbortJoggingResponse
{
- int32 Code = 2;
+ int32 Index = 2;
} \ No newline at end of file
diff --git a/Software/PMR/Messages/Diagnostics/DispenserHomingRequest.proto b/Software/PMR/Messages/Diagnostics/DispenserHomingRequest.proto
index 6263b228c..a55392bc1 100644
--- a/Software/PMR/Messages/Diagnostics/DispenserHomingRequest.proto
+++ b/Software/PMR/Messages/Diagnostics/DispenserHomingRequest.proto
@@ -5,6 +5,6 @@ option java_package = "com.twine.tango.pmr.diagnostics";
message DispenserHomingRequest
{
- int32 Code = 1;
+ int32 Index = 1;
double Speed = 2;
} \ No newline at end of file
diff --git a/Software/PMR/Messages/Diagnostics/DispenserJoggingRequest.proto b/Software/PMR/Messages/Diagnostics/DispenserJoggingRequest.proto
index 2eba7cd1b..222157b3a 100644
--- a/Software/PMR/Messages/Diagnostics/DispenserJoggingRequest.proto
+++ b/Software/PMR/Messages/Diagnostics/DispenserJoggingRequest.proto
@@ -8,6 +8,6 @@ option java_package = "com.twine.tango.pmr.diagnostics";
message DispenserJoggingRequest
{
MotorDirection Direction = 1;
- int32 Code = 2;
+ int32 Index = 2;
double Speed = 3;
} \ No newline at end of file
diff --git a/Software/PMR/Messages/Diagnostics/MotorAbortHomingRequest.proto b/Software/PMR/Messages/Diagnostics/MotorAbortHomingRequest.proto
index a06dde1ef..c31904449 100644
--- a/Software/PMR/Messages/Diagnostics/MotorAbortHomingRequest.proto
+++ b/Software/PMR/Messages/Diagnostics/MotorAbortHomingRequest.proto
@@ -1,9 +1,11 @@
syntax = "proto3";
+import "HardwareMotorType.proto";
+
package Tango.PMR.Diagnostics;
option java_package = "com.twine.tango.pmr.diagnostics";
message MotorAbortHomingRequest
{
- int32 Code = 1;
+ PMR.Hardware.HardwareMotorType MotorType = 1;
} \ No newline at end of file
diff --git a/Software/PMR/Messages/Diagnostics/MotorAbortJoggingRequest.proto b/Software/PMR/Messages/Diagnostics/MotorAbortJoggingRequest.proto
index d568ea1ca..931a3380d 100644
--- a/Software/PMR/Messages/Diagnostics/MotorAbortJoggingRequest.proto
+++ b/Software/PMR/Messages/Diagnostics/MotorAbortJoggingRequest.proto
@@ -1,9 +1,11 @@
syntax = "proto3";
+import "HardwareMotorType.proto";
+
package Tango.PMR.Diagnostics;
option java_package = "com.twine.tango.pmr.diagnostics";
message MotorAbortJoggingRequest
{
- int32 Code = 2;
+ PMR.Hardware.HardwareMotorType MotorType = 1;
} \ No newline at end of file
diff --git a/Software/PMR/Messages/Diagnostics/MotorHomingRequest.proto b/Software/PMR/Messages/Diagnostics/MotorHomingRequest.proto
index b5a1fcb9e..8de1bf5d2 100644
--- a/Software/PMR/Messages/Diagnostics/MotorHomingRequest.proto
+++ b/Software/PMR/Messages/Diagnostics/MotorHomingRequest.proto
@@ -1,10 +1,12 @@
syntax = "proto3";
+import "HardwareMotorType.proto";
+
package Tango.PMR.Diagnostics;
option java_package = "com.twine.tango.pmr.diagnostics";
message MotorHomingRequest
{
- int32 Code = 1;
+ PMR.Hardware.HardwareMotorType MotorType = 1;
double Speed = 2;
} \ No newline at end of file
diff --git a/Software/PMR/Messages/Diagnostics/MotorJoggingRequest.proto b/Software/PMR/Messages/Diagnostics/MotorJoggingRequest.proto
index 9a2e0a6c5..40349f919 100644
--- a/Software/PMR/Messages/Diagnostics/MotorJoggingRequest.proto
+++ b/Software/PMR/Messages/Diagnostics/MotorJoggingRequest.proto
@@ -1,6 +1,7 @@
syntax = "proto3";
import "MotorDirection.proto";
+import "HardwareMotorType.proto";
package Tango.PMR.Diagnostics;
option java_package = "com.twine.tango.pmr.diagnostics";
@@ -8,6 +9,6 @@ option java_package = "com.twine.tango.pmr.diagnostics";
message MotorJoggingRequest
{
MotorDirection Direction = 1;
- int32 Code = 2;
+ PMR.Hardware.HardwareMotorType MotorType = 2;
double Speed = 3;
} \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs
index 54a790cbe..0c09850c1 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs
@@ -794,7 +794,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
await MachineOperator.StartMotorJogging(new MotorJoggingRequest()
{
- Code = item.HardwareMotorType.Code,
+ MotorType = (PMR.Hardware.HardwareMotorType)item.HardwareMotorType.Code,
Direction = MotorDirection.Forward,
});
}
@@ -802,14 +802,14 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
await MachineOperator.StopMotorJogging(new MotorAbortJoggingRequest()
{
- Code = item.HardwareMotorType.Code,
+ MotorType = (PMR.Hardware.HardwareMotorType)item.HardwareMotorType.Code,
});
}
else if (action == MotorActionType.BackwardPressed)
{
await MachineOperator.StartMotorJogging(new MotorJoggingRequest()
{
- Code = item.HardwareMotorType.Code,
+ MotorType = (PMR.Hardware.HardwareMotorType)item.HardwareMotorType.Code,
Direction = MotorDirection.Backward,
});
}
@@ -817,7 +817,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
await MachineOperator.StopMotorJogging(new MotorAbortJoggingRequest()
{
- Code = item.HardwareMotorType.Code,
+ MotorType = (PMR.Hardware.HardwareMotorType)item.HardwareMotorType.Code,
});
}
else if (action == MotorActionType.HomingStarted)
@@ -828,7 +828,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
MachineOperator.StartMotorHoming(new MotorHomingRequest()
{
- Code = item.HardwareMotorType.Code
+ MotorType = (PMR.Hardware.HardwareMotorType)item.HardwareMotorType.Code,
})
.Subscribe((response) =>
{
@@ -848,7 +848,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
await MachineOperator.StopMotorHoming(new MotorAbortHomingRequest()
{
- Code = item.HardwareMotorType.Code,
+ MotorType = (PMR.Hardware.HardwareMotorType)item.HardwareMotorType.Code,
});
item.IsHoming = false;
@@ -878,7 +878,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
await MachineOperator.StartDispenserJogging(new DispenserJoggingRequest()
{
- Code = item.TechDispenser.Code,
+ Index = item.TechDispenser.Code,
Direction = MotorDirection.Forward,
});
}
@@ -886,14 +886,14 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
await MachineOperator.StopDispenserJogging(new DispenserAbortJoggingRequest()
{
- Code = item.TechDispenser.Code,
+ Index = item.TechDispenser.Code,
});
}
else if (action == MotorActionType.BackwardPressed)
{
await MachineOperator.StartDispenserJogging(new DispenserJoggingRequest()
{
- Code = item.TechDispenser.Code,
+ Index = item.TechDispenser.Code,
Direction = MotorDirection.Backward,
});
}
@@ -901,7 +901,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
await MachineOperator.StopDispenserJogging(new DispenserAbortJoggingRequest()
{
- Code = item.TechDispenser.Code,
+ Index = item.TechDispenser.Code,
});
}
else if (action == MotorActionType.HomingStarted)
@@ -912,7 +912,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
MachineOperator.StartDispenserHoming(new DispenserHomingRequest()
{
- Code = item.TechDispenser.Code
+ Index = item.TechDispenser.Code
})
.Subscribe((response) =>
{
@@ -932,7 +932,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
await MachineOperator.StopDispenserHoming(new DispenserAbortHomingRequest()
{
- Code = item.TechDispenser.Code,
+ Index = item.TechDispenser.Code,
});
item.IsHoming = false;
@@ -1044,7 +1044,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
await Task.WhenAll(item.TechMotors.Select(motor => MachineOperator.StartMotorJogging(new MotorJoggingRequest()
{
- Code = motor.Code,
+ MotorType = (PMR.Hardware.HardwareMotorType)motor.Code,
Direction = MotorDirection.Forward,
})));
}
@@ -1052,14 +1052,14 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
await Task.WhenAll(item.TechMotors.Select(motor => MachineOperator.StopMotorJogging(new MotorAbortJoggingRequest()
{
- Code = motor.Code,
+ MotorType = (PMR.Hardware.HardwareMotorType)motor.Code,
})));
}
else if (action == MotorActionType.BackwardPressed)
{
await Task.WhenAll(item.TechMotors.Select(motor => MachineOperator.StartMotorJogging(new MotorJoggingRequest()
{
- Code = motor.Code,
+ MotorType = (PMR.Hardware.HardwareMotorType)motor.Code,
Direction = MotorDirection.Backward,
})));
}
@@ -1067,7 +1067,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
await Task.WhenAll(item.TechMotors.Select(motor => MachineOperator.StopMotorJogging(new MotorAbortJoggingRequest()
{
- Code = motor.Code,
+ MotorType = (PMR.Hardware.HardwareMotorType)motor.Code,
})));
}
//else if (action == MotorActionType.HomingStarted)
diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
index a3b7690ed..aec6e562b 100644
--- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
+++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
@@ -44,8 +44,8 @@ namespace Tango.Emulations.Emulators
private StartDiagnosticsRequest _diagnosticsRequest;
private bool _cancelJob;
- private List<int> _motorJoggingRequestCodes;
- private List<int> _motorHomingRequestCodes;
+ private List<PMR.Hardware.HardwareMotorType> _motorJoggingRequestTypes;
+ private List<PMR.Hardware.HardwareMotorType> _motorHomingRequestCodes;
private List<int> _dispenserJoggingRequestCodes;
private List<int> _dispenserHomingRequestCodes;
private double _graphAmplitude;
@@ -108,8 +108,8 @@ namespace Tango.Emulations.Emulators
EventsStates = MachineEventState.GetAllEventsStates();
_continousResponseTokens = new List<ContinousResponseToken>();
- _motorJoggingRequestCodes = new List<int>();
- _motorHomingRequestCodes = new List<int>();
+ _motorJoggingRequestTypes = new List<PMR.Hardware.HardwareMotorType>();
+ _motorHomingRequestCodes = new List<PMR.Hardware.HardwareMotorType>();
_dispenserJoggingRequestCodes = new List<int>();
_dispenserHomingRequestCodes = new List<int>();
_digitalOutputPinsStates = new List<DigitalPin>();
@@ -456,12 +456,12 @@ namespace Tango.Emulations.Emulators
{
var jogRequest = request.Message;
- _motorJoggingRequestCodes.Add(jogRequest.Code);
+ _motorJoggingRequestTypes.Add(jogRequest.MotorType);
Task.Factory.StartNew(() =>
{
- while (_motorJoggingRequestCodes.Contains(jogRequest.Code))
+ while (_motorJoggingRequestTypes.Contains(jogRequest.MotorType))
{
if (jogRequest.Direction == MotorDirection.Forward)
{
@@ -483,7 +483,7 @@ namespace Tango.Emulations.Emulators
private void HandleAbortMotorJoggingRequest(TangoMessage<MotorAbortJoggingRequest> request)
{
- _motorJoggingRequestCodes.RemoveAll(x => x == request.Message.Code);
+ _motorJoggingRequestTypes.RemoveAll(x => x == request.Message.MotorType);
ResetGraphFactors();
Transporter.SendResponse<MotorAbortJoggingResponse>(new MotorAbortJoggingResponse(), request.Container.Token);
}
@@ -492,7 +492,7 @@ namespace Tango.Emulations.Emulators
{
var homeRequest = request.Message;
- _motorHomingRequestCodes.Add(homeRequest.Code);
+ _motorHomingRequestCodes.Add(homeRequest.MotorType);
Task.Factory.StartNew(() =>
{
@@ -509,7 +509,7 @@ namespace Tango.Emulations.Emulators
Transporter.SendResponse<MotorHomingResponse>(new MotorHomingResponse() { MaxProgress = 100, Progress = i }, request.Container.Token);
- if (!_motorHomingRequestCodes.Contains(homeRequest.Code))
+ if (!_motorHomingRequestCodes.Contains(homeRequest.MotorType))
{
ResetGraphFactors();
return;
@@ -519,14 +519,14 @@ namespace Tango.Emulations.Emulators
}
Transporter.SendResponse<MotorHomingResponse>(new MotorHomingResponse() { MaxProgress = 100, Progress = 100 }, request.Container.Token, true);
- _motorHomingRequestCodes.Remove(homeRequest.Code);
+ _motorHomingRequestCodes.Remove(homeRequest.MotorType);
ResetGraphFactors();
});
}
private void HandleAbortMotorHomingRequest(TangoMessage<MotorAbortHomingRequest> request)
{
- _motorHomingRequestCodes.RemoveAll(x => x == request.Message.Code);
+ _motorHomingRequestCodes.RemoveAll(x => x == request.Message.MotorType);
ResetGraphFactors();
Transporter.SendResponse<MotorAbortHomingResponse>(new MotorAbortHomingResponse(), request.Container.Token);
}
@@ -535,11 +535,11 @@ namespace Tango.Emulations.Emulators
{
var jogRequest = request.Message;
- _dispenserJoggingRequestCodes.Add(jogRequest.Code);
+ _dispenserJoggingRequestCodes.Add(jogRequest.Index);
Task.Factory.StartNew(() =>
{
- while (_dispenserJoggingRequestCodes.Contains(jogRequest.Code))
+ while (_dispenserJoggingRequestCodes.Contains(jogRequest.Index))
{
if (jogRequest.Direction == MotorDirection.Forward)
{
@@ -561,7 +561,7 @@ namespace Tango.Emulations.Emulators
private void HandleAbortDispenserJoggingRequest(TangoMessage<DispenserAbortJoggingRequest> request)
{
- _dispenserJoggingRequestCodes.RemoveAll(x => x == request.Message.Code);
+ _dispenserJoggingRequestCodes.RemoveAll(x => x == request.Message.Index);
ResetGraphFactors();
Transporter.SendResponse<DispenserAbortJoggingResponse>(new DispenserAbortJoggingResponse(), request.Container.Token);
}
@@ -570,7 +570,7 @@ namespace Tango.Emulations.Emulators
{
var homeRequest = request.Message;
- _dispenserHomingRequestCodes.Add(homeRequest.Code);
+ _dispenserHomingRequestCodes.Add(homeRequest.Index);
Task.Factory.StartNew(() =>
{
@@ -580,7 +580,7 @@ namespace Tango.Emulations.Emulators
{
Transporter.SendResponse<DispenserHomingResponse>(new DispenserHomingResponse() { MaxProgress = 100, Progress = i }, request.Container.Token);
- if (!_dispenserHomingRequestCodes.Contains(homeRequest.Code))
+ if (!_dispenserHomingRequestCodes.Contains(homeRequest.Index))
{
ResetGraphFactors();
return;
@@ -590,14 +590,14 @@ namespace Tango.Emulations.Emulators
}
Transporter.SendResponse<DispenserHomingResponse>(new DispenserHomingResponse() { MaxProgress = 100, Progress = 100 }, request.Container.Token, true);
- _dispenserHomingRequestCodes.Remove(homeRequest.Code);
+ _dispenserHomingRequestCodes.Remove(homeRequest.Index);
ResetGraphFactors();
});
}
private void HandleAbortDispenserHomingRequest(TangoMessage<DispenserAbortHomingRequest> request)
{
- _dispenserHomingRequestCodes.RemoveAll(x => x == request.Message.Code);
+ _dispenserHomingRequestCodes.RemoveAll(x => x == request.Message.Index);
ResetGraphFactors();
Transporter.SendResponse<DispenserAbortHomingResponse>(new DispenserAbortHomingResponse(), request.Container.Token);
}
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserAbortHomingRequest.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserAbortHomingRequest.cs
index 492f9bdaf..f76c46c8f 100644
--- a/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserAbortHomingRequest.cs
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserAbortHomingRequest.cs
@@ -23,13 +23,13 @@ namespace Tango.PMR.Diagnostics {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CiFEaXNwZW5zZXJBYm9ydEhvbWluZ1JlcXVlc3QucHJvdG8SFVRhbmdvLlBN",
- "Ui5EaWFnbm9zdGljcyIrChtEaXNwZW5zZXJBYm9ydEhvbWluZ1JlcXVlc3QS",
- "DAoEQ29kZRgBIAEoBUIhCh9jb20udHdpbmUudGFuZ28ucG1yLmRpYWdub3N0",
- "aWNzYgZwcm90bzM="));
+ "Ui5EaWFnbm9zdGljcyIsChtEaXNwZW5zZXJBYm9ydEhvbWluZ1JlcXVlc3QS",
+ "DQoFSW5kZXgYASABKAVCIQofY29tLnR3aW5lLnRhbmdvLnBtci5kaWFnbm9z",
+ "dGljc2IGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.DispenserAbortHomingRequest), global::Tango.PMR.Diagnostics.DispenserAbortHomingRequest.Parser, new[]{ "Code" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.DispenserAbortHomingRequest), global::Tango.PMR.Diagnostics.DispenserAbortHomingRequest.Parser, new[]{ "Index" }, null, null, null)
}));
}
#endregion
@@ -60,7 +60,7 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public DispenserAbortHomingRequest(DispenserAbortHomingRequest other) : this() {
- code_ = other.code_;
+ index_ = other.index_;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -68,14 +68,14 @@ namespace Tango.PMR.Diagnostics {
return new DispenserAbortHomingRequest(this);
}
- /// <summary>Field number for the "Code" field.</summary>
- public const int CodeFieldNumber = 1;
- private int code_;
+ /// <summary>Field number for the "Index" field.</summary>
+ public const int IndexFieldNumber = 1;
+ private int index_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int Code {
- get { return code_; }
+ public int Index {
+ get { return index_; }
set {
- code_ = value;
+ index_ = value;
}
}
@@ -92,14 +92,14 @@ namespace Tango.PMR.Diagnostics {
if (ReferenceEquals(other, this)) {
return true;
}
- if (Code != other.Code) return false;
+ if (Index != other.Index) return false;
return true;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
- if (Code != 0) hash ^= Code.GetHashCode();
+ if (Index != 0) hash ^= Index.GetHashCode();
return hash;
}
@@ -110,17 +110,17 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
- if (Code != 0) {
+ if (Index != 0) {
output.WriteRawTag(8);
- output.WriteInt32(Code);
+ output.WriteInt32(Index);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
- if (Code != 0) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code);
+ if (Index != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Index);
}
return size;
}
@@ -130,8 +130,8 @@ namespace Tango.PMR.Diagnostics {
if (other == null) {
return;
}
- if (other.Code != 0) {
- Code = other.Code;
+ if (other.Index != 0) {
+ Index = other.Index;
}
}
@@ -144,7 +144,7 @@ namespace Tango.PMR.Diagnostics {
input.SkipLastField();
break;
case 8: {
- Code = input.ReadInt32();
+ Index = input.ReadInt32();
break;
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserAbortJoggingRequest.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserAbortJoggingRequest.cs
index 4f879102b..c17a8a8b2 100644
--- a/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserAbortJoggingRequest.cs
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserAbortJoggingRequest.cs
@@ -23,13 +23,13 @@ namespace Tango.PMR.Diagnostics {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CiJEaXNwZW5zZXJBYm9ydEpvZ2dpbmdSZXF1ZXN0LnByb3RvEhVUYW5nby5Q",
- "TVIuRGlhZ25vc3RpY3MiLAocRGlzcGVuc2VyQWJvcnRKb2dnaW5nUmVxdWVz",
- "dBIMCgRDb2RlGAIgASgFQiEKH2NvbS50d2luZS50YW5nby5wbXIuZGlhZ25v",
- "c3RpY3NiBnByb3RvMw=="));
+ "TVIuRGlhZ25vc3RpY3MiLQocRGlzcGVuc2VyQWJvcnRKb2dnaW5nUmVxdWVz",
+ "dBINCgVJbmRleBgCIAEoBUIhCh9jb20udHdpbmUudGFuZ28ucG1yLmRpYWdu",
+ "b3N0aWNzYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.DispenserAbortJoggingRequest), global::Tango.PMR.Diagnostics.DispenserAbortJoggingRequest.Parser, new[]{ "Code" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.DispenserAbortJoggingRequest), global::Tango.PMR.Diagnostics.DispenserAbortJoggingRequest.Parser, new[]{ "Index" }, null, null, null)
}));
}
#endregion
@@ -60,7 +60,7 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public DispenserAbortJoggingRequest(DispenserAbortJoggingRequest other) : this() {
- code_ = other.code_;
+ index_ = other.index_;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -68,14 +68,14 @@ namespace Tango.PMR.Diagnostics {
return new DispenserAbortJoggingRequest(this);
}
- /// <summary>Field number for the "Code" field.</summary>
- public const int CodeFieldNumber = 2;
- private int code_;
+ /// <summary>Field number for the "Index" field.</summary>
+ public const int IndexFieldNumber = 2;
+ private int index_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int Code {
- get { return code_; }
+ public int Index {
+ get { return index_; }
set {
- code_ = value;
+ index_ = value;
}
}
@@ -92,14 +92,14 @@ namespace Tango.PMR.Diagnostics {
if (ReferenceEquals(other, this)) {
return true;
}
- if (Code != other.Code) return false;
+ if (Index != other.Index) return false;
return true;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
- if (Code != 0) hash ^= Code.GetHashCode();
+ if (Index != 0) hash ^= Index.GetHashCode();
return hash;
}
@@ -110,17 +110,17 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
- if (Code != 0) {
+ if (Index != 0) {
output.WriteRawTag(16);
- output.WriteInt32(Code);
+ output.WriteInt32(Index);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
- if (Code != 0) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code);
+ if (Index != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Index);
}
return size;
}
@@ -130,8 +130,8 @@ namespace Tango.PMR.Diagnostics {
if (other == null) {
return;
}
- if (other.Code != 0) {
- Code = other.Code;
+ if (other.Index != 0) {
+ Index = other.Index;
}
}
@@ -144,7 +144,7 @@ namespace Tango.PMR.Diagnostics {
input.SkipLastField();
break;
case 16: {
- Code = input.ReadInt32();
+ Index = input.ReadInt32();
break;
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserAbortJoggingResponse.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserAbortJoggingResponse.cs
index e8e2c8efe..8a254f0e4 100644
--- a/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserAbortJoggingResponse.cs
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserAbortJoggingResponse.cs
@@ -23,13 +23,13 @@ namespace Tango.PMR.Diagnostics {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CiNEaXNwZW5zZXJBYm9ydEpvZ2dpbmdSZXNwb25zZS5wcm90bxIVVGFuZ28u",
- "UE1SLkRpYWdub3N0aWNzIi0KHURpc3BlbnNlckFib3J0Sm9nZ2luZ1Jlc3Bv",
- "bnNlEgwKBENvZGUYAiABKAVCIQofY29tLnR3aW5lLnRhbmdvLnBtci5kaWFn",
- "bm9zdGljc2IGcHJvdG8z"));
+ "UE1SLkRpYWdub3N0aWNzIi4KHURpc3BlbnNlckFib3J0Sm9nZ2luZ1Jlc3Bv",
+ "bnNlEg0KBUluZGV4GAIgASgFQiEKH2NvbS50d2luZS50YW5nby5wbXIuZGlh",
+ "Z25vc3RpY3NiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.DispenserAbortJoggingResponse), global::Tango.PMR.Diagnostics.DispenserAbortJoggingResponse.Parser, new[]{ "Code" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.DispenserAbortJoggingResponse), global::Tango.PMR.Diagnostics.DispenserAbortJoggingResponse.Parser, new[]{ "Index" }, null, null, null)
}));
}
#endregion
@@ -60,7 +60,7 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public DispenserAbortJoggingResponse(DispenserAbortJoggingResponse other) : this() {
- code_ = other.code_;
+ index_ = other.index_;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -68,14 +68,14 @@ namespace Tango.PMR.Diagnostics {
return new DispenserAbortJoggingResponse(this);
}
- /// <summary>Field number for the "Code" field.</summary>
- public const int CodeFieldNumber = 2;
- private int code_;
+ /// <summary>Field number for the "Index" field.</summary>
+ public const int IndexFieldNumber = 2;
+ private int index_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int Code {
- get { return code_; }
+ public int Index {
+ get { return index_; }
set {
- code_ = value;
+ index_ = value;
}
}
@@ -92,14 +92,14 @@ namespace Tango.PMR.Diagnostics {
if (ReferenceEquals(other, this)) {
return true;
}
- if (Code != other.Code) return false;
+ if (Index != other.Index) return false;
return true;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
- if (Code != 0) hash ^= Code.GetHashCode();
+ if (Index != 0) hash ^= Index.GetHashCode();
return hash;
}
@@ -110,17 +110,17 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
- if (Code != 0) {
+ if (Index != 0) {
output.WriteRawTag(16);
- output.WriteInt32(Code);
+ output.WriteInt32(Index);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
- if (Code != 0) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code);
+ if (Index != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Index);
}
return size;
}
@@ -130,8 +130,8 @@ namespace Tango.PMR.Diagnostics {
if (other == null) {
return;
}
- if (other.Code != 0) {
- Code = other.Code;
+ if (other.Index != 0) {
+ Index = other.Index;
}
}
@@ -144,7 +144,7 @@ namespace Tango.PMR.Diagnostics {
input.SkipLastField();
break;
case 16: {
- Code = input.ReadInt32();
+ Index = input.ReadInt32();
break;
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserHomingRequest.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserHomingRequest.cs
index f5b45c802..a760d7ece 100644
--- a/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserHomingRequest.cs
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserHomingRequest.cs
@@ -23,13 +23,13 @@ namespace Tango.PMR.Diagnostics {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChxEaXNwZW5zZXJIb21pbmdSZXF1ZXN0LnByb3RvEhVUYW5nby5QTVIuRGlh",
- "Z25vc3RpY3MiNQoWRGlzcGVuc2VySG9taW5nUmVxdWVzdBIMCgRDb2RlGAEg",
- "ASgFEg0KBVNwZWVkGAIgASgBQiEKH2NvbS50d2luZS50YW5nby5wbXIuZGlh",
- "Z25vc3RpY3NiBnByb3RvMw=="));
+ "Z25vc3RpY3MiNgoWRGlzcGVuc2VySG9taW5nUmVxdWVzdBINCgVJbmRleBgB",
+ "IAEoBRINCgVTcGVlZBgCIAEoAUIhCh9jb20udHdpbmUudGFuZ28ucG1yLmRp",
+ "YWdub3N0aWNzYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.DispenserHomingRequest), global::Tango.PMR.Diagnostics.DispenserHomingRequest.Parser, new[]{ "Code", "Speed" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.DispenserHomingRequest), global::Tango.PMR.Diagnostics.DispenserHomingRequest.Parser, new[]{ "Index", "Speed" }, null, null, null)
}));
}
#endregion
@@ -60,7 +60,7 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public DispenserHomingRequest(DispenserHomingRequest other) : this() {
- code_ = other.code_;
+ index_ = other.index_;
speed_ = other.speed_;
}
@@ -69,14 +69,14 @@ namespace Tango.PMR.Diagnostics {
return new DispenserHomingRequest(this);
}
- /// <summary>Field number for the "Code" field.</summary>
- public const int CodeFieldNumber = 1;
- private int code_;
+ /// <summary>Field number for the "Index" field.</summary>
+ public const int IndexFieldNumber = 1;
+ private int index_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int Code {
- get { return code_; }
+ public int Index {
+ get { return index_; }
set {
- code_ = value;
+ index_ = value;
}
}
@@ -104,7 +104,7 @@ namespace Tango.PMR.Diagnostics {
if (ReferenceEquals(other, this)) {
return true;
}
- if (Code != other.Code) return false;
+ if (Index != other.Index) return false;
if (Speed != other.Speed) return false;
return true;
}
@@ -112,7 +112,7 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
- if (Code != 0) hash ^= Code.GetHashCode();
+ if (Index != 0) hash ^= Index.GetHashCode();
if (Speed != 0D) hash ^= Speed.GetHashCode();
return hash;
}
@@ -124,9 +124,9 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
- if (Code != 0) {
+ if (Index != 0) {
output.WriteRawTag(8);
- output.WriteInt32(Code);
+ output.WriteInt32(Index);
}
if (Speed != 0D) {
output.WriteRawTag(17);
@@ -137,8 +137,8 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
- if (Code != 0) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code);
+ if (Index != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Index);
}
if (Speed != 0D) {
size += 1 + 8;
@@ -151,8 +151,8 @@ namespace Tango.PMR.Diagnostics {
if (other == null) {
return;
}
- if (other.Code != 0) {
- Code = other.Code;
+ if (other.Index != 0) {
+ Index = other.Index;
}
if (other.Speed != 0D) {
Speed = other.Speed;
@@ -168,7 +168,7 @@ namespace Tango.PMR.Diagnostics {
input.SkipLastField();
break;
case 8: {
- Code = input.ReadInt32();
+ Index = input.ReadInt32();
break;
}
case 17: {
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserJoggingRequest.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserJoggingRequest.cs
index 48894af8d..e4a3a9cb4 100644
--- a/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserJoggingRequest.cs
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/DispenserJoggingRequest.cs
@@ -23,15 +23,15 @@ namespace Tango.PMR.Diagnostics {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Ch1EaXNwZW5zZXJKb2dnaW5nUmVxdWVzdC5wcm90bxIVVGFuZ28uUE1SLkRp",
- "YWdub3N0aWNzGhRNb3RvckRpcmVjdGlvbi5wcm90byJwChdEaXNwZW5zZXJK",
+ "YWdub3N0aWNzGhRNb3RvckRpcmVjdGlvbi5wcm90byJxChdEaXNwZW5zZXJK",
"b2dnaW5nUmVxdWVzdBI4CglEaXJlY3Rpb24YASABKA4yJS5UYW5nby5QTVIu",
- "RGlhZ25vc3RpY3MuTW90b3JEaXJlY3Rpb24SDAoEQ29kZRgCIAEoBRINCgVT",
- "cGVlZBgDIAEoAUIhCh9jb20udHdpbmUudGFuZ28ucG1yLmRpYWdub3N0aWNz",
- "YgZwcm90bzM="));
+ "RGlhZ25vc3RpY3MuTW90b3JEaXJlY3Rpb24SDQoFSW5kZXgYAiABKAUSDQoF",
+ "U3BlZWQYAyABKAFCIQofY29tLnR3aW5lLnRhbmdvLnBtci5kaWFnbm9zdGlj",
+ "c2IGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Tango.PMR.Diagnostics.MotorDirectionReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.DispenserJoggingRequest), global::Tango.PMR.Diagnostics.DispenserJoggingRequest.Parser, new[]{ "Direction", "Code", "Speed" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.DispenserJoggingRequest), global::Tango.PMR.Diagnostics.DispenserJoggingRequest.Parser, new[]{ "Direction", "Index", "Speed" }, null, null, null)
}));
}
#endregion
@@ -63,7 +63,7 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public DispenserJoggingRequest(DispenserJoggingRequest other) : this() {
direction_ = other.direction_;
- code_ = other.code_;
+ index_ = other.index_;
speed_ = other.speed_;
}
@@ -83,14 +83,14 @@ namespace Tango.PMR.Diagnostics {
}
}
- /// <summary>Field number for the "Code" field.</summary>
- public const int CodeFieldNumber = 2;
- private int code_;
+ /// <summary>Field number for the "Index" field.</summary>
+ public const int IndexFieldNumber = 2;
+ private int index_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int Code {
- get { return code_; }
+ public int Index {
+ get { return index_; }
set {
- code_ = value;
+ index_ = value;
}
}
@@ -119,7 +119,7 @@ namespace Tango.PMR.Diagnostics {
return true;
}
if (Direction != other.Direction) return false;
- if (Code != other.Code) return false;
+ if (Index != other.Index) return false;
if (Speed != other.Speed) return false;
return true;
}
@@ -128,7 +128,7 @@ namespace Tango.PMR.Diagnostics {
public override int GetHashCode() {
int hash = 1;
if (Direction != 0) hash ^= Direction.GetHashCode();
- if (Code != 0) hash ^= Code.GetHashCode();
+ if (Index != 0) hash ^= Index.GetHashCode();
if (Speed != 0D) hash ^= Speed.GetHashCode();
return hash;
}
@@ -144,9 +144,9 @@ namespace Tango.PMR.Diagnostics {
output.WriteRawTag(8);
output.WriteEnum((int) Direction);
}
- if (Code != 0) {
+ if (Index != 0) {
output.WriteRawTag(16);
- output.WriteInt32(Code);
+ output.WriteInt32(Index);
}
if (Speed != 0D) {
output.WriteRawTag(25);
@@ -160,8 +160,8 @@ namespace Tango.PMR.Diagnostics {
if (Direction != 0) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Direction);
}
- if (Code != 0) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code);
+ if (Index != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Index);
}
if (Speed != 0D) {
size += 1 + 8;
@@ -177,8 +177,8 @@ namespace Tango.PMR.Diagnostics {
if (other.Direction != 0) {
Direction = other.Direction;
}
- if (other.Code != 0) {
- Code = other.Code;
+ if (other.Index != 0) {
+ Index = other.Index;
}
if (other.Speed != 0D) {
Speed = other.Speed;
@@ -198,7 +198,7 @@ namespace Tango.PMR.Diagnostics {
break;
}
case 16: {
- Code = input.ReadInt32();
+ Index = input.ReadInt32();
break;
}
case 25: {
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/MotorAbortHomingRequest.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/MotorAbortHomingRequest.cs
index d5385333c..08a07c4bc 100644
--- a/Software/Visual_Studio/Tango.PMR/Diagnostics/MotorAbortHomingRequest.cs
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/MotorAbortHomingRequest.cs
@@ -23,13 +23,14 @@ namespace Tango.PMR.Diagnostics {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Ch1Nb3RvckFib3J0SG9taW5nUmVxdWVzdC5wcm90bxIVVGFuZ28uUE1SLkRp",
- "YWdub3N0aWNzIicKF01vdG9yQWJvcnRIb21pbmdSZXF1ZXN0EgwKBENvZGUY",
- "ASABKAVCIQofY29tLnR3aW5lLnRhbmdvLnBtci5kaWFnbm9zdGljc2IGcHJv",
- "dG8z"));
+ "YWdub3N0aWNzGhdIYXJkd2FyZU1vdG9yVHlwZS5wcm90byJTChdNb3RvckFi",
+ "b3J0SG9taW5nUmVxdWVzdBI4CglNb3RvclR5cGUYASABKA4yJS5UYW5nby5Q",
+ "TVIuSGFyZHdhcmUuSGFyZHdhcmVNb3RvclR5cGVCIQofY29tLnR3aW5lLnRh",
+ "bmdvLnBtci5kaWFnbm9zdGljc2IGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
- new pbr::FileDescriptor[] { },
+ new pbr::FileDescriptor[] { global::Tango.PMR.Hardware.HardwareMotorTypeReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.MotorAbortHomingRequest), global::Tango.PMR.Diagnostics.MotorAbortHomingRequest.Parser, new[]{ "Code" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.MotorAbortHomingRequest), global::Tango.PMR.Diagnostics.MotorAbortHomingRequest.Parser, new[]{ "MotorType" }, null, null, null)
}));
}
#endregion
@@ -60,7 +61,7 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public MotorAbortHomingRequest(MotorAbortHomingRequest other) : this() {
- code_ = other.code_;
+ motorType_ = other.motorType_;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -68,14 +69,14 @@ namespace Tango.PMR.Diagnostics {
return new MotorAbortHomingRequest(this);
}
- /// <summary>Field number for the "Code" field.</summary>
- public const int CodeFieldNumber = 1;
- private int code_;
+ /// <summary>Field number for the "MotorType" field.</summary>
+ public const int MotorTypeFieldNumber = 1;
+ private global::Tango.PMR.Hardware.HardwareMotorType motorType_ = 0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int Code {
- get { return code_; }
+ public global::Tango.PMR.Hardware.HardwareMotorType MotorType {
+ get { return motorType_; }
set {
- code_ = value;
+ motorType_ = value;
}
}
@@ -92,14 +93,14 @@ namespace Tango.PMR.Diagnostics {
if (ReferenceEquals(other, this)) {
return true;
}
- if (Code != other.Code) return false;
+ if (MotorType != other.MotorType) return false;
return true;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
- if (Code != 0) hash ^= Code.GetHashCode();
+ if (MotorType != 0) hash ^= MotorType.GetHashCode();
return hash;
}
@@ -110,17 +111,17 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
- if (Code != 0) {
+ if (MotorType != 0) {
output.WriteRawTag(8);
- output.WriteInt32(Code);
+ output.WriteEnum((int) MotorType);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
- if (Code != 0) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code);
+ if (MotorType != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MotorType);
}
return size;
}
@@ -130,8 +131,8 @@ namespace Tango.PMR.Diagnostics {
if (other == null) {
return;
}
- if (other.Code != 0) {
- Code = other.Code;
+ if (other.MotorType != 0) {
+ MotorType = other.MotorType;
}
}
@@ -144,7 +145,7 @@ namespace Tango.PMR.Diagnostics {
input.SkipLastField();
break;
case 8: {
- Code = input.ReadInt32();
+ motorType_ = (global::Tango.PMR.Hardware.HardwareMotorType) input.ReadEnum();
break;
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/MotorAbortJoggingRequest.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/MotorAbortJoggingRequest.cs
index cf9f015d3..889a29e5f 100644
--- a/Software/Visual_Studio/Tango.PMR/Diagnostics/MotorAbortJoggingRequest.cs
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/MotorAbortJoggingRequest.cs
@@ -23,13 +23,14 @@ namespace Tango.PMR.Diagnostics {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Ch5Nb3RvckFib3J0Sm9nZ2luZ1JlcXVlc3QucHJvdG8SFVRhbmdvLlBNUi5E",
- "aWFnbm9zdGljcyIoChhNb3RvckFib3J0Sm9nZ2luZ1JlcXVlc3QSDAoEQ29k",
- "ZRgCIAEoBUIhCh9jb20udHdpbmUudGFuZ28ucG1yLmRpYWdub3N0aWNzYgZw",
- "cm90bzM="));
+ "aWFnbm9zdGljcxoXSGFyZHdhcmVNb3RvclR5cGUucHJvdG8iVAoYTW90b3JB",
+ "Ym9ydEpvZ2dpbmdSZXF1ZXN0EjgKCU1vdG9yVHlwZRgBIAEoDjIlLlRhbmdv",
+ "LlBNUi5IYXJkd2FyZS5IYXJkd2FyZU1vdG9yVHlwZUIhCh9jb20udHdpbmUu",
+ "dGFuZ28ucG1yLmRpYWdub3N0aWNzYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
- new pbr::FileDescriptor[] { },
+ new pbr::FileDescriptor[] { global::Tango.PMR.Hardware.HardwareMotorTypeReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.MotorAbortJoggingRequest), global::Tango.PMR.Diagnostics.MotorAbortJoggingRequest.Parser, new[]{ "Code" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.MotorAbortJoggingRequest), global::Tango.PMR.Diagnostics.MotorAbortJoggingRequest.Parser, new[]{ "MotorType" }, null, null, null)
}));
}
#endregion
@@ -60,7 +61,7 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public MotorAbortJoggingRequest(MotorAbortJoggingRequest other) : this() {
- code_ = other.code_;
+ motorType_ = other.motorType_;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -68,14 +69,14 @@ namespace Tango.PMR.Diagnostics {
return new MotorAbortJoggingRequest(this);
}
- /// <summary>Field number for the "Code" field.</summary>
- public const int CodeFieldNumber = 2;
- private int code_;
+ /// <summary>Field number for the "MotorType" field.</summary>
+ public const int MotorTypeFieldNumber = 1;
+ private global::Tango.PMR.Hardware.HardwareMotorType motorType_ = 0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int Code {
- get { return code_; }
+ public global::Tango.PMR.Hardware.HardwareMotorType MotorType {
+ get { return motorType_; }
set {
- code_ = value;
+ motorType_ = value;
}
}
@@ -92,14 +93,14 @@ namespace Tango.PMR.Diagnostics {
if (ReferenceEquals(other, this)) {
return true;
}
- if (Code != other.Code) return false;
+ if (MotorType != other.MotorType) return false;
return true;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
- if (Code != 0) hash ^= Code.GetHashCode();
+ if (MotorType != 0) hash ^= MotorType.GetHashCode();
return hash;
}
@@ -110,17 +111,17 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
- if (Code != 0) {
- output.WriteRawTag(16);
- output.WriteInt32(Code);
+ if (MotorType != 0) {
+ output.WriteRawTag(8);
+ output.WriteEnum((int) MotorType);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
- if (Code != 0) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code);
+ if (MotorType != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MotorType);
}
return size;
}
@@ -130,8 +131,8 @@ namespace Tango.PMR.Diagnostics {
if (other == null) {
return;
}
- if (other.Code != 0) {
- Code = other.Code;
+ if (other.MotorType != 0) {
+ MotorType = other.MotorType;
}
}
@@ -143,8 +144,8 @@ namespace Tango.PMR.Diagnostics {
default:
input.SkipLastField();
break;
- case 16: {
- Code = input.ReadInt32();
+ case 8: {
+ motorType_ = (global::Tango.PMR.Hardware.HardwareMotorType) input.ReadEnum();
break;
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/MotorHomingRequest.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/MotorHomingRequest.cs
index 5044fa2ed..b3bd7765a 100644
--- a/Software/Visual_Studio/Tango.PMR/Diagnostics/MotorHomingRequest.cs
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/MotorHomingRequest.cs
@@ -23,13 +23,14 @@ namespace Tango.PMR.Diagnostics {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChhNb3RvckhvbWluZ1JlcXVlc3QucHJvdG8SFVRhbmdvLlBNUi5EaWFnbm9z",
- "dGljcyIxChJNb3RvckhvbWluZ1JlcXVlc3QSDAoEQ29kZRgBIAEoBRINCgVT",
- "cGVlZBgCIAEoAUIhCh9jb20udHdpbmUudGFuZ28ucG1yLmRpYWdub3N0aWNz",
- "YgZwcm90bzM="));
+ "dGljcxoXSGFyZHdhcmVNb3RvclR5cGUucHJvdG8iXQoSTW90b3JIb21pbmdS",
+ "ZXF1ZXN0EjgKCU1vdG9yVHlwZRgBIAEoDjIlLlRhbmdvLlBNUi5IYXJkd2Fy",
+ "ZS5IYXJkd2FyZU1vdG9yVHlwZRINCgVTcGVlZBgCIAEoAUIhCh9jb20udHdp",
+ "bmUudGFuZ28ucG1yLmRpYWdub3N0aWNzYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
- new pbr::FileDescriptor[] { },
+ new pbr::FileDescriptor[] { global::Tango.PMR.Hardware.HardwareMotorTypeReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.MotorHomingRequest), global::Tango.PMR.Diagnostics.MotorHomingRequest.Parser, new[]{ "Code", "Speed" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.MotorHomingRequest), global::Tango.PMR.Diagnostics.MotorHomingRequest.Parser, new[]{ "MotorType", "Speed" }, null, null, null)
}));
}
#endregion
@@ -60,7 +61,7 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public MotorHomingRequest(MotorHomingRequest other) : this() {
- code_ = other.code_;
+ motorType_ = other.motorType_;
speed_ = other.speed_;
}
@@ -69,14 +70,14 @@ namespace Tango.PMR.Diagnostics {
return new MotorHomingRequest(this);
}
- /// <summary>Field number for the "Code" field.</summary>
- public const int CodeFieldNumber = 1;
- private int code_;
+ /// <summary>Field number for the "MotorType" field.</summary>
+ public const int MotorTypeFieldNumber = 1;
+ private global::Tango.PMR.Hardware.HardwareMotorType motorType_ = 0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int Code {
- get { return code_; }
+ public global::Tango.PMR.Hardware.HardwareMotorType MotorType {
+ get { return motorType_; }
set {
- code_ = value;
+ motorType_ = value;
}
}
@@ -104,7 +105,7 @@ namespace Tango.PMR.Diagnostics {
if (ReferenceEquals(other, this)) {
return true;
}
- if (Code != other.Code) return false;
+ if (MotorType != other.MotorType) return false;
if (Speed != other.Speed) return false;
return true;
}
@@ -112,7 +113,7 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
- if (Code != 0) hash ^= Code.GetHashCode();
+ if (MotorType != 0) hash ^= MotorType.GetHashCode();
if (Speed != 0D) hash ^= Speed.GetHashCode();
return hash;
}
@@ -124,9 +125,9 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
- if (Code != 0) {
+ if (MotorType != 0) {
output.WriteRawTag(8);
- output.WriteInt32(Code);
+ output.WriteEnum((int) MotorType);
}
if (Speed != 0D) {
output.WriteRawTag(17);
@@ -137,8 +138,8 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
- if (Code != 0) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code);
+ if (MotorType != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MotorType);
}
if (Speed != 0D) {
size += 1 + 8;
@@ -151,8 +152,8 @@ namespace Tango.PMR.Diagnostics {
if (other == null) {
return;
}
- if (other.Code != 0) {
- Code = other.Code;
+ if (other.MotorType != 0) {
+ MotorType = other.MotorType;
}
if (other.Speed != 0D) {
Speed = other.Speed;
@@ -168,7 +169,7 @@ namespace Tango.PMR.Diagnostics {
input.SkipLastField();
break;
case 8: {
- Code = input.ReadInt32();
+ motorType_ = (global::Tango.PMR.Hardware.HardwareMotorType) input.ReadEnum();
break;
}
case 17: {
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/MotorJoggingRequest.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/MotorJoggingRequest.cs
index 99f1a56c6..b25253961 100644
--- a/Software/Visual_Studio/Tango.PMR/Diagnostics/MotorJoggingRequest.cs
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/MotorJoggingRequest.cs
@@ -23,14 +23,16 @@ namespace Tango.PMR.Diagnostics {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChlNb3RvckpvZ2dpbmdSZXF1ZXN0LnByb3RvEhVUYW5nby5QTVIuRGlhZ25v",
- "c3RpY3MaFE1vdG9yRGlyZWN0aW9uLnByb3RvImwKE01vdG9ySm9nZ2luZ1Jl",
- "cXVlc3QSOAoJRGlyZWN0aW9uGAEgASgOMiUuVGFuZ28uUE1SLkRpYWdub3N0",
- "aWNzLk1vdG9yRGlyZWN0aW9uEgwKBENvZGUYAiABKAUSDQoFU3BlZWQYAyAB",
- "KAFCIQofY29tLnR3aW5lLnRhbmdvLnBtci5kaWFnbm9zdGljc2IGcHJvdG8z"));
+ "c3RpY3MaFE1vdG9yRGlyZWN0aW9uLnByb3RvGhdIYXJkd2FyZU1vdG9yVHlw",
+ "ZS5wcm90byKYAQoTTW90b3JKb2dnaW5nUmVxdWVzdBI4CglEaXJlY3Rpb24Y",
+ "ASABKA4yJS5UYW5nby5QTVIuRGlhZ25vc3RpY3MuTW90b3JEaXJlY3Rpb24S",
+ "OAoJTW90b3JUeXBlGAIgASgOMiUuVGFuZ28uUE1SLkhhcmR3YXJlLkhhcmR3",
+ "YXJlTW90b3JUeXBlEg0KBVNwZWVkGAMgASgBQiEKH2NvbS50d2luZS50YW5n",
+ "by5wbXIuZGlhZ25vc3RpY3NiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
- new pbr::FileDescriptor[] { global::Tango.PMR.Diagnostics.MotorDirectionReflection.Descriptor, },
+ new pbr::FileDescriptor[] { global::Tango.PMR.Diagnostics.MotorDirectionReflection.Descriptor, global::Tango.PMR.Hardware.HardwareMotorTypeReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.MotorJoggingRequest), global::Tango.PMR.Diagnostics.MotorJoggingRequest.Parser, new[]{ "Direction", "Code", "Speed" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.MotorJoggingRequest), global::Tango.PMR.Diagnostics.MotorJoggingRequest.Parser, new[]{ "Direction", "MotorType", "Speed" }, null, null, null)
}));
}
#endregion
@@ -62,7 +64,7 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public MotorJoggingRequest(MotorJoggingRequest other) : this() {
direction_ = other.direction_;
- code_ = other.code_;
+ motorType_ = other.motorType_;
speed_ = other.speed_;
}
@@ -82,14 +84,14 @@ namespace Tango.PMR.Diagnostics {
}
}
- /// <summary>Field number for the "Code" field.</summary>
- public const int CodeFieldNumber = 2;
- private int code_;
+ /// <summary>Field number for the "MotorType" field.</summary>
+ public const int MotorTypeFieldNumber = 2;
+ private global::Tango.PMR.Hardware.HardwareMotorType motorType_ = 0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int Code {
- get { return code_; }
+ public global::Tango.PMR.Hardware.HardwareMotorType MotorType {
+ get { return motorType_; }
set {
- code_ = value;
+ motorType_ = value;
}
}
@@ -118,7 +120,7 @@ namespace Tango.PMR.Diagnostics {
return true;
}
if (Direction != other.Direction) return false;
- if (Code != other.Code) return false;
+ if (MotorType != other.MotorType) return false;
if (Speed != other.Speed) return false;
return true;
}
@@ -127,7 +129,7 @@ namespace Tango.PMR.Diagnostics {
public override int GetHashCode() {
int hash = 1;
if (Direction != 0) hash ^= Direction.GetHashCode();
- if (Code != 0) hash ^= Code.GetHashCode();
+ if (MotorType != 0) hash ^= MotorType.GetHashCode();
if (Speed != 0D) hash ^= Speed.GetHashCode();
return hash;
}
@@ -143,9 +145,9 @@ namespace Tango.PMR.Diagnostics {
output.WriteRawTag(8);
output.WriteEnum((int) Direction);
}
- if (Code != 0) {
+ if (MotorType != 0) {
output.WriteRawTag(16);
- output.WriteInt32(Code);
+ output.WriteEnum((int) MotorType);
}
if (Speed != 0D) {
output.WriteRawTag(25);
@@ -159,8 +161,8 @@ namespace Tango.PMR.Diagnostics {
if (Direction != 0) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Direction);
}
- if (Code != 0) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code);
+ if (MotorType != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MotorType);
}
if (Speed != 0D) {
size += 1 + 8;
@@ -176,8 +178,8 @@ namespace Tango.PMR.Diagnostics {
if (other.Direction != 0) {
Direction = other.Direction;
}
- if (other.Code != 0) {
- Code = other.Code;
+ if (other.MotorType != 0) {
+ MotorType = other.MotorType;
}
if (other.Speed != 0D) {
Speed = other.Speed;
@@ -197,7 +199,7 @@ namespace Tango.PMR.Diagnostics {
break;
}
case 16: {
- Code = input.ReadInt32();
+ motorType_ = (global::Tango.PMR.Hardware.HardwareMotorType) input.ReadEnum();
break;
}
case 25: {
diff --git a/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs b/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs
index e021b66e4..c748cb5d3 100644
--- a/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs
+++ b/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs
@@ -12,7 +12,7 @@ using Tango.PMR.Common;
/// <summary>
/// Contains PMR extension methods.
/// </summary>
- public static class ExtensionMethods
+ public static class ExtensionMethods
{
/// <summary>
/// Gets the protobuf <see cref="OriginalNameAttribute"/> attribute value from the message type.
diff --git a/Software/Visual_Studio/Tango.Protobuf/Compilers/CCompiler.cs b/Software/Visual_Studio/Tango.Protobuf/Compilers/CCompiler.cs
index 1a8dc632f..91f8d1502 100644
--- a/Software/Visual_Studio/Tango.Protobuf/Compilers/CCompiler.cs
+++ b/Software/Visual_Studio/Tango.Protobuf/Compilers/CCompiler.cs
@@ -67,13 +67,29 @@ namespace Tango.Protobuf.Compilers
{
String str = File.ReadAllText(file);
- foreach (String dir in directories.Select(x => Path.GetFileName(x)))
+ var lines = str.ToLines();
+
+ lines.RemoveAll(x => x.Contains("package "));
+
+ for (int i = 0; i < lines.Count; i++)
{
- str = str.Replace(dir + ".", "");
+ if (!lines[i].Contains("import ") || lines[i].StartsWith("//"))
+ {
+ string[] wordsAndComments = lines[i].Split('/');
+
+ string lineWords = wordsAndComments.FirstOrDefault();
+
+ string[] words = lineWords.Split(' ');
+
+ for (int j = 0; j < words.Length; j++)
+ {
+ words[j] = words[j].Split('.').LastOrDefault();
+ }
+
+ lines[i] = String.Join(" ", words);
+ }
}
- var lines = str.ToLines();
- lines.RemoveAll(x => x.Contains("package "));
str = String.Join(Environment.NewLine, lines);
File.WriteAllText(file, str);
}