aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Code_Composer/twine_usblib_demo
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-01-07 18:39:32 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-01-07 18:39:32 +0200
commite7a30d51c85b2d9be2f675769506c1faa8667c89 (patch)
tree43cbc5ee686f6aa9bb3894b4d5ded64b187ba710 /Software/Code_Composer/twine_usblib_demo
parentc0e3c58693d59462398d0cae57923635f89ae47a (diff)
downloadTango-e7a30d51c85b2d9be2f675769506c1faa8667c89.tar.gz
Tango-e7a30d51c85b2d9be2f675769506c1faa8667c89.zip
Implemented External Bridge Client USB Connection.
Diffstat (limited to 'Software/Code_Composer/twine_usblib_demo')
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Job.pb-c.c114
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Job.pb-c.h28
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Segment.pb-c.c19
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Segment.pb-c.h5
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Jobs/dispenser.pb-c.c201
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Jobs/dispenser.pb-c.h111
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Jobs/motor.pb-c.c293
-rw-r--r--Software/Code_Composer/twine_usblib_demo/PMR/Jobs/motor.pb-c.h106
8 files changed, 867 insertions, 10 deletions
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Job.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Job.pb-c.c
index 0213521e5..2602d5927 100644
--- a/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Job.pb-c.c
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Job.pb-c.c
@@ -52,7 +52,7 @@ void job__free_unpacked
assert(message->base.descriptor == &job__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
-static const ProtobufCFieldDescriptor job__field_descriptors[2] =
+static const ProtobufCFieldDescriptor job__field_descriptors[10] =
{
{
"Name",
@@ -67,8 +67,92 @@ static const ProtobufCFieldDescriptor job__field_descriptors[2] =
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
- "Segments",
+ "interSegEnable",
2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(Job, has_intersegenable),
+ offsetof(Job, intersegenable),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "distanseToSpoolEnable",
+ 3,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(Job, has_distansetospoolenable),
+ offsetof(Job, distansetospoolenable),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "distanceToSpoolLength",
+ 4,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(Job, has_distancetospoollength),
+ offsetof(Job, distancetospoollength),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "startOffsetPulses",
+ 5,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(Job, has_startoffsetpulses),
+ offsetof(Job, startoffsetpulses),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "spoolBackingRate",
+ 6,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(Job, has_spoolbackingrate),
+ offsetof(Job, spoolbackingrate),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "segmentOffsetPulses",
+ 7,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(Job, has_segmentoffsetpulses),
+ offsetof(Job, segmentoffsetpulses),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "milimetersPerRotation",
+ 8,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(Job, has_milimetersperrotation),
+ offsetof(Job, milimetersperrotation),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Segments",
+ 9,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(Job, n_segments),
@@ -78,15 +162,35 @@ static const ProtobufCFieldDescriptor job__field_descriptors[2] =
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
+ {
+ "Motors",
+ 10,
+ PROTOBUF_C_LABEL_REPEATED,
+ PROTOBUF_C_TYPE_MESSAGE,
+ offsetof(Job, n_motors),
+ offsetof(Job, motors),
+ &motor_config__descriptor,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
};
static const unsigned job__field_indices_by_name[] = {
+ 9, /* field[9] = Motors */
0, /* field[0] = Name */
- 1, /* field[1] = Segments */
+ 8, /* field[8] = Segments */
+ 3, /* field[3] = distanceToSpoolLength */
+ 2, /* field[2] = distanseToSpoolEnable */
+ 1, /* field[1] = interSegEnable */
+ 7, /* field[7] = milimetersPerRotation */
+ 6, /* field[6] = segmentOffsetPulses */
+ 5, /* field[5] = spoolBackingRate */
+ 4, /* field[4] = startOffsetPulses */
};
static const ProtobufCIntRange job__number_ranges[1 + 1] =
{
{ 1, 0 },
- { 0, 2 }
+ { 0, 10 }
};
const ProtobufCMessageDescriptor job__descriptor =
{
@@ -96,7 +200,7 @@ const ProtobufCMessageDescriptor job__descriptor =
"Job",
"",
sizeof(Job),
- 2,
+ 10,
job__field_descriptors,
job__field_indices_by_name,
1, job__number_ranges,
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 c94f78bbb..dbb1f8046 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
@@ -15,6 +15,7 @@ PROTOBUF_C__BEGIN_DECLS
#endif
#include "Segment.pb-c.h"
+#include "motor.pb-c.h"
typedef struct _Job Job;
@@ -28,12 +29,37 @@ struct _Job
{
ProtobufCMessage base;
char *name;
+ /*
+ *does user have chosen inter segment enable option
+ */
+ protobuf_c_boolean has_intersegenable;
+ protobuf_c_boolean intersegenable;
+ /*
+ *does user have chosen distanse to spool enable option
+ */
+ protobuf_c_boolean has_distansetospoolenable;
+ protobuf_c_boolean distansetospoolenable;
+ /*
+ *had distance to spool finished?
+ */
+ protobuf_c_boolean has_distancetospoollength;
+ uint32_t distancetospoollength;
+ protobuf_c_boolean has_startoffsetpulses;
+ uint32_t startoffsetpulses;
+ protobuf_c_boolean has_spoolbackingrate;
+ uint32_t spoolbackingrate;
+ protobuf_c_boolean has_segmentoffsetpulses;
+ uint32_t segmentoffsetpulses;
+ protobuf_c_boolean has_milimetersperrotation;
+ uint32_t milimetersperrotation;
size_t n_segments;
Segment **segments;
+ size_t n_motors;
+ MotorConfig **motors;
};
#define JOB__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&job__descriptor) \
- , NULL, 0,NULL }
+ , NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,NULL, 0,NULL }
/* Job methods */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Segment.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Segment.pb-c.c
index 764b6721b..77c858bc9 100644
--- a/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Segment.pb-c.c
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Segment.pb-c.c
@@ -52,7 +52,7 @@ void segment__free_unpacked
assert(message->base.descriptor == &segment__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
-static const ProtobufCFieldDescriptor segment__field_descriptors[3] =
+static const ProtobufCFieldDescriptor segment__field_descriptors[4] =
{
{
"Name",
@@ -90,16 +90,29 @@ static const ProtobufCFieldDescriptor segment__field_descriptors[3] =
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
+ {
+ "dispenser",
+ 4,
+ PROTOBUF_C_LABEL_REPEATED,
+ PROTOBUF_C_TYPE_MESSAGE,
+ offsetof(Segment, n_dispenser),
+ offsetof(Segment, dispenser),
+ &dispense__descriptor,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
};
static const unsigned segment__field_indices_by_name[] = {
2, /* field[2] = Color */
1, /* field[1] = Length */
0, /* field[0] = Name */
+ 3, /* field[3] = dispenser */
};
static const ProtobufCIntRange segment__number_ranges[1 + 1] =
{
{ 1, 0 },
- { 0, 3 }
+ { 0, 4 }
};
const ProtobufCMessageDescriptor segment__descriptor =
{
@@ -109,7 +122,7 @@ const ProtobufCMessageDescriptor segment__descriptor =
"Segment",
"",
sizeof(Segment),
- 3,
+ 4,
segment__field_descriptors,
segment__field_indices_by_name,
1, segment__number_ranges,
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Segment.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Segment.pb-c.h
index 5991f3228..5b7172c58 100644
--- a/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Segment.pb-c.h
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/Segment.pb-c.h
@@ -15,6 +15,7 @@ PROTOBUF_C__BEGIN_DECLS
#endif
#include "RGB.pb-c.h"
+#include "dispenser.pb-c.h"
typedef struct _Segment Segment;
@@ -31,10 +32,12 @@ struct _Segment
protobuf_c_boolean has_length;
int32_t length;
RGB *color;
+ size_t n_dispenser;
+ Dispense **dispenser;
};
#define SEGMENT__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&segment__descriptor) \
- , NULL, 0, 0, NULL }
+ , NULL, 0, 0, NULL, 0,NULL }
/* Segment methods */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/dispenser.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/dispenser.pb-c.c
new file mode 100644
index 000000000..165436be2
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/dispenser.pb-c.c
@@ -0,0 +1,201 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: dispenser.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "dispenser.pb-c.h"
+void gradient_flow__init
+ (GradientFlow *message)
+{
+ static const GradientFlow init_value = GRADIENT_FLOW__INIT;
+ *message = init_value;
+}
+size_t gradient_flow__get_packed_size
+ (const GradientFlow *message)
+{
+ assert(message->base.descriptor == &gradient_flow__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t gradient_flow__pack
+ (const GradientFlow *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &gradient_flow__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t gradient_flow__pack_to_buffer
+ (const GradientFlow *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &gradient_flow__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+GradientFlow *
+ gradient_flow__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (GradientFlow *)
+ protobuf_c_message_unpack (&gradient_flow__descriptor,
+ allocator, len, data);
+}
+void gradient_flow__free_unpacked
+ (GradientFlow *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &gradient_flow__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+void dispense__init
+ (Dispense *message)
+{
+ static const Dispense init_value = DISPENSE__INIT;
+ *message = init_value;
+}
+size_t dispense__get_packed_size
+ (const Dispense *message)
+{
+ assert(message->base.descriptor == &dispense__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t dispense__pack
+ (const Dispense *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &dispense__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t dispense__pack_to_buffer
+ (const Dispense *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &dispense__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+Dispense *
+ dispense__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (Dispense *)
+ protobuf_c_message_unpack (&dispense__descriptor,
+ allocator, len, data);
+}
+void dispense__free_unpacked
+ (Dispense *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &dispense__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor gradient_flow__field_descriptors[1] =
+{
+ {
+ "NLflow",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(GradientFlow, has_nlflow),
+ offsetof(GradientFlow, nlflow),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned gradient_flow__field_indices_by_name[] = {
+ 0, /* field[0] = NLflow */
+};
+static const ProtobufCIntRange gradient_flow__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 1 }
+};
+const ProtobufCMessageDescriptor gradient_flow__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "gradientFlow",
+ "GradientFlow",
+ "GradientFlow",
+ "",
+ sizeof(GradientFlow),
+ 1,
+ gradient_flow__field_descriptors,
+ gradient_flow__field_indices_by_name,
+ 1, gradient_flow__number_ranges,
+ (ProtobufCMessageInit) gradient_flow__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
+static const ProtobufCFieldDescriptor dispense__field_descriptors[3] =
+{
+ {
+ "Id",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_INT32,
+ offsetof(Dispense, has_id),
+ offsetof(Dispense, id),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "startFlow",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(Dispense, has_startflow),
+ offsetof(Dispense, startflow),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "gradient",
+ 3,
+ PROTOBUF_C_LABEL_REPEATED,
+ PROTOBUF_C_TYPE_MESSAGE,
+ offsetof(Dispense, n_gradient),
+ offsetof(Dispense, gradient),
+ &gradient_flow__descriptor,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned dispense__field_indices_by_name[] = {
+ 0, /* field[0] = Id */
+ 2, /* field[2] = gradient */
+ 1, /* field[1] = startFlow */
+};
+static const ProtobufCIntRange dispense__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 3 }
+};
+const ProtobufCMessageDescriptor dispense__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "Dispense",
+ "Dispense",
+ "Dispense",
+ "",
+ sizeof(Dispense),
+ 3,
+ dispense__field_descriptors,
+ dispense__field_indices_by_name,
+ 1, dispense__number_ranges,
+ (ProtobufCMessageInit) dispense__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/dispenser.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/dispenser.pb-c.h
new file mode 100644
index 000000000..2027dace0
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/dispenser.pb-c.h
@@ -0,0 +1,111 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: dispenser.proto */
+
+#ifndef PROTOBUF_C_dispenser_2eproto__INCLUDED
+#define PROTOBUF_C_dispenser_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 _GradientFlow GradientFlow;
+typedef struct _Dispense Dispense;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _GradientFlow
+{
+ ProtobufCMessage base;
+ protobuf_c_boolean has_nlflow;
+ double nlflow;
+};
+#define GRADIENT_FLOW__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&gradient_flow__descriptor) \
+ , 0, 0 }
+
+
+struct _Dispense
+{
+ ProtobufCMessage base;
+ protobuf_c_boolean has_id;
+ int32_t id;
+ protobuf_c_boolean has_startflow;
+ double startflow;
+ size_t n_gradient;
+ GradientFlow **gradient;
+};
+#define DISPENSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&dispense__descriptor) \
+ , 0, 0, 0, 0, 0,NULL }
+
+
+/* GradientFlow methods */
+void gradient_flow__init
+ (GradientFlow *message);
+size_t gradient_flow__get_packed_size
+ (const GradientFlow *message);
+size_t gradient_flow__pack
+ (const GradientFlow *message,
+ uint8_t *out);
+size_t gradient_flow__pack_to_buffer
+ (const GradientFlow *message,
+ ProtobufCBuffer *buffer);
+GradientFlow *
+ gradient_flow__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void gradient_flow__free_unpacked
+ (GradientFlow *message,
+ ProtobufCAllocator *allocator);
+/* Dispense methods */
+void dispense__init
+ (Dispense *message);
+size_t dispense__get_packed_size
+ (const Dispense *message);
+size_t dispense__pack
+ (const Dispense *message,
+ uint8_t *out);
+size_t dispense__pack_to_buffer
+ (const Dispense *message,
+ ProtobufCBuffer *buffer);
+Dispense *
+ dispense__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void dispense__free_unpacked
+ (Dispense *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*GradientFlow_Closure)
+ (const GradientFlow *message,
+ void *closure_data);
+typedef void (*Dispense_Closure)
+ (const Dispense *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor gradient_flow__descriptor;
+extern const ProtobufCMessageDescriptor dispense__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_dispenser_2eproto__INCLUDED */
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/motor.pb-c.c b/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/motor.pb-c.c
new file mode 100644
index 000000000..9c219010d
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/motor.pb-c.c
@@ -0,0 +1,293 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: motor.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "motor.pb-c.h"
+void motor_config__init
+ (MotorConfig *message)
+{
+ static const MotorConfig init_value = MOTOR_CONFIG__INIT;
+ *message = init_value;
+}
+size_t motor_config__get_packed_size
+ (const MotorConfig *message)
+{
+ assert(message->base.descriptor == &motor_config__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t motor_config__pack
+ (const MotorConfig *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &motor_config__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t motor_config__pack_to_buffer
+ (const MotorConfig *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &motor_config__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+MotorConfig *
+ motor_config__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (MotorConfig *)
+ protobuf_c_message_unpack (&motor_config__descriptor,
+ allocator, len, data);
+}
+void motor_config__free_unpacked
+ (MotorConfig *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &motor_config__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor motor_config__field_descriptors[14] =
+{
+ {
+ "Id",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_ENUM,
+ offsetof(MotorConfig, has_id),
+ offsetof(MotorConfig, id),
+ &motor_id__descriptor,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "minfreq",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(MotorConfig, has_minfreq),
+ offsetof(MotorConfig, minfreq),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "maxfreq",
+ 3,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(MotorConfig, has_maxfreq),
+ offsetof(MotorConfig, maxfreq),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "minmicrostep",
+ 4,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(MotorConfig, has_minmicrostep),
+ offsetof(MotorConfig, minmicrostep),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "maxmicrostep",
+ 5,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(MotorConfig, has_maxmicrostep),
+ offsetof(MotorConfig, maxmicrostep),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "linearratio",
+ 6,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(MotorConfig, has_linearratio),
+ offsetof(MotorConfig, linearratio),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "medianposition",
+ 7,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(MotorConfig, has_medianposition),
+ offsetof(MotorConfig, medianposition),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "correctiongain",
+ 8,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(MotorConfig, has_correctiongain),
+ offsetof(MotorConfig, correctiongain),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "ration2dryerspd",
+ 9,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(MotorConfig, has_ration2dryerspd),
+ offsetof(MotorConfig, ration2dryerspd),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Kp",
+ 10,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(MotorConfig, has_kp),
+ offsetof(MotorConfig, kp),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Ki",
+ 11,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(MotorConfig, has_ki),
+ offsetof(MotorConfig, ki),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Kd",
+ 12,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(MotorConfig, has_kd),
+ offsetof(MotorConfig, kd),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "changeSlope",
+ 13,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(MotorConfig, has_changeslope),
+ offsetof(MotorConfig, changeslope),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "hightimeoutmSec",
+ 14,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(MotorConfig, has_hightimeoutmsec),
+ offsetof(MotorConfig, hightimeoutmsec),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned motor_config__field_indices_by_name[] = {
+ 0, /* field[0] = Id */
+ 11, /* field[11] = Kd */
+ 10, /* field[10] = Ki */
+ 9, /* field[9] = Kp */
+ 12, /* field[12] = changeSlope */
+ 7, /* field[7] = correctiongain */
+ 13, /* field[13] = hightimeoutmSec */
+ 5, /* field[5] = linearratio */
+ 2, /* field[2] = maxfreq */
+ 4, /* field[4] = maxmicrostep */
+ 6, /* field[6] = medianposition */
+ 1, /* field[1] = minfreq */
+ 3, /* field[3] = minmicrostep */
+ 8, /* field[8] = ration2dryerspd */
+};
+static const ProtobufCIntRange motor_config__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 14 }
+};
+const ProtobufCMessageDescriptor motor_config__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "MotorConfig",
+ "MotorConfig",
+ "MotorConfig",
+ "",
+ sizeof(MotorConfig),
+ 14,
+ motor_config__field_descriptors,
+ motor_config__field_indices_by_name,
+ 1, motor_config__number_ranges,
+ (ProtobufCMessageInit) motor_config__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
+static const ProtobufCEnumValue motor_id__enum_values_by_number[4] =
+{
+ { "Feeder", "MOTOR_ID__Feeder", 0 },
+ { "Dryer", "MOTOR_ID__Dryer", 1 },
+ { "Pooler", "MOTOR_ID__Pooler", 2 },
+ { "Winder", "MOTOR_ID__Winder", 3 },
+};
+static const ProtobufCIntRange motor_id__value_ranges[] = {
+{0, 0},{0, 4}
+};
+static const ProtobufCEnumValueIndex motor_id__enum_values_by_name[4] =
+{
+ { "Dryer", 1 },
+ { "Feeder", 0 },
+ { "Pooler", 2 },
+ { "Winder", 3 },
+};
+const ProtobufCEnumDescriptor motor_id__descriptor =
+{
+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
+ "MotorId",
+ "MotorId",
+ "MotorId",
+ "",
+ 4,
+ motor_id__enum_values_by_number,
+ 4,
+ motor_id__enum_values_by_name,
+ 1,
+ motor_id__value_ranges,
+ NULL,NULL,NULL,NULL /* reserved[1234] */
+};
diff --git a/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/motor.pb-c.h b/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/motor.pb-c.h
new file mode 100644
index 000000000..1266d57d1
--- /dev/null
+++ b/Software/Code_Composer/twine_usblib_demo/PMR/Jobs/motor.pb-c.h
@@ -0,0 +1,106 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: motor.proto */
+
+#ifndef PROTOBUF_C_motor_2eproto__INCLUDED
+#define PROTOBUF_C_motor_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 _MotorConfig MotorConfig;
+
+
+/* --- enums --- */
+
+typedef enum _MotorId {
+ MOTOR_ID__Feeder = 0,
+ MOTOR_ID__Dryer = 1,
+ MOTOR_ID__Pooler = 2,
+ MOTOR_ID__Winder = 3
+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(MOTOR_ID)
+} MotorId;
+
+/* --- messages --- */
+
+struct _MotorConfig
+{
+ ProtobufCMessage base;
+ protobuf_c_boolean has_id;
+ MotorId id;
+ protobuf_c_boolean has_minfreq;
+ uint32_t minfreq;
+ protobuf_c_boolean has_maxfreq;
+ uint32_t maxfreq;
+ protobuf_c_boolean has_minmicrostep;
+ uint32_t minmicrostep;
+ protobuf_c_boolean has_maxmicrostep;
+ uint32_t maxmicrostep;
+ protobuf_c_boolean has_linearratio;
+ double linearratio;
+ protobuf_c_boolean has_medianposition;
+ uint32_t medianposition;
+ protobuf_c_boolean has_correctiongain;
+ double correctiongain;
+ protobuf_c_boolean has_ration2dryerspd;
+ double ration2dryerspd;
+ protobuf_c_boolean has_kp;
+ double kp;
+ protobuf_c_boolean has_ki;
+ double ki;
+ protobuf_c_boolean has_kd;
+ double kd;
+ protobuf_c_boolean has_changeslope;
+ double changeslope;
+ protobuf_c_boolean has_hightimeoutmsec;
+ double hightimeoutmsec;
+};
+#define MOTOR_CONFIG__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&motor_config__descriptor) \
+ , 0, MOTOR_ID__Feeder, 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 }
+
+
+/* MotorConfig methods */
+void motor_config__init
+ (MotorConfig *message);
+size_t motor_config__get_packed_size
+ (const MotorConfig *message);
+size_t motor_config__pack
+ (const MotorConfig *message,
+ uint8_t *out);
+size_t motor_config__pack_to_buffer
+ (const MotorConfig *message,
+ ProtobufCBuffer *buffer);
+MotorConfig *
+ motor_config__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void motor_config__free_unpacked
+ (MotorConfig *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*MotorConfig_Closure)
+ (const MotorConfig *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCEnumDescriptor motor_id__descriptor;
+extern const ProtobufCMessageDescriptor motor_config__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_motor_2eproto__INCLUDED */