aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-12-02 14:24:44 +0200
committerShlomo Hecht <shlomo@twine-s.com>2018-12-02 14:24:44 +0200
commit2cbc3deb559323ac366e84b3e0ba40d27447347e (patch)
treedc9b3ad37d7d4f5e1639c13d8f49d9ef565b5d5d /Software/Embedded_SW/Embedded
parentae614a63f593122cd28c644625db179f298dd640 (diff)
downloadTango-2cbc3deb559323ac366e84b3e0ba40d27447347e.tar.gz
Tango-2cbc3deb559323ac366e84b3e0ba40d27447347e.zip
1.1.5.1 Thread jogging, thread PID preparation,
Diffstat (limited to 'Software/Embedded_SW/Embedded')
-rw-r--r--Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c124
-rw-r--r--Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c2
-rw-r--r--Software/Embedded_SW/Embedded/Communication/Container.c6
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/ActivateVersionRequest.pb-c.c92
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/ActivateVersionRequest.pb-c.h73
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/ActivateVersionResponse.pb-c.c72
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/ActivateVersionResponse.pb-c.h70
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkDownloadRequest.pb-c.c131
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkDownloadRequest.pb-c.h76
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkDownloadResponse.pb-c.c105
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkDownloadResponse.pb-c.h74
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/FileDownloadRequest.pb-c.c92
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/FileDownloadRequest.pb-c.h71
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/FileDownloadResponse.pb-c.c105
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/FileDownloadResponse.pb-c.h73
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoResponse.pb-c.c19
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoResponse.pb-c.h3
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/ValidateVersionRequest.pb-c.c92
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/ValidateVersionRequest.pb-c.h73
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/ValidateVersionResponse.pb-c.c72
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/ValidateVersionResponse.pb-c.h70
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/VersionFileDescriptor.pb-c.c131
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/VersionFileDescriptor.pb-c.h77
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/VersionFileDestination.pb-c.c41
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/IO/VersionFileDestination.pb-c.h45
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Printing/JobTicket.pb-c.c4
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/process.c4
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/process.h2
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c3
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c2
-rw-r--r--Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c110
-rw-r--r--Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h3
32 files changed, 1837 insertions, 80 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
index 3a6a6f924..6b7e816c4 100644
--- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
+++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
@@ -41,20 +41,16 @@ int FileReceivedLength = 0;
static char g_cCwdBuf[50] = "/";
uint32_t WrittenBytes = 0;
-/*ErrorCode FileError_to_ErrorCode[FILE_ERRORS_MAX+1] = {ERROR_CODE__NONE,ERROR_CODE__JOB_UNSPECIFIED_ERROR,ERROR_CODE__JOB_THREAD_BREAK,ERROR_CODE__JOB_WINDER_DANCER_FAIL,
- ERROR_CODE__JOB_POOLER_DANCER_FAIL,ERROR_CODE__JOB_FEEDER_DANCER_FAIL,ERROR_CODE__JOB_OUT_OF_DYE,ERROR_CODE__JOB_OTHER_ALARM,
- ERROR_CODE__JOB_TEMPERATURE_ALARM,ERROR_CODE__JOB_LS_ALARM,ERROR_CODE__JOB_PRESSURE_ALARM,ERROR_CODE__JOB_CURRENT_ALARM,ERROR_CODE__JOB_MOTOR_ALARM};
-*/
+ErrorCode FileError_to_ErrorCode[FR_INVALID_PARAMETER+1] = {ERROR_CODE__NONE,ERROR_CODE__FILE_REQUEST_DISK_ERR,ERROR_CODE__FILE_REQUEST_INT_ERR,ERROR_CODE__FILE_REQUEST_NOT_READY,ERROR_CODE__FILE_REQUEST_NO_FILE,
+ ERROR_CODE__FILE_REQUEST_NO_PATH,ERROR_CODE__FILE_REQUEST_INVALID_NAME,ERROR_CODE__FILE_REQUEST_DENIED,ERROR_CODE__FILE_REQUEST_EXIST,ERROR_CODE__FILE_REQUEST_INVALID_OBJECT,
+ ERROR_CODE__FILE_REQUEST_WRITE_PROTECTED,ERROR_CODE__FILE_REQUEST_INVALID_DRIVE,ERROR_CODE__FILE_REQUEST_NOT_ENABLED,ERROR_CODE__FILE_REQUEST_NO_FILESYSTEM,
+ ERROR_CODE__FILE_REQUEST_MKFS_ABORTED,ERROR_CODE__FILE_REQUEST_TIMEOUT,ERROR_CODE__FILE_REQUEST_LOCKED,ERROR_CODE__FILE_REQUEST_NOT_ENOUGH_CORE,ERROR_CODE__FILE_REQUEST_TOO_MANY_OPEN_FILES,
+ ERROR_CODE__FILE_REQUEST_INVALID_PARAMETER};
+
ErrorCode getErrorCode(FRESULT Fresult)
{
- switch (Fresult)
- {
- case FR_OK:
- return ERROR_CODE__NONE;
- default:
- return ERROR_CODE__FILE_LENGTH_OUT_OF_RANGE;
- }
+ return FileError_to_ErrorCode[Fresult];
}
bool isDirectory(FileAttribute FileAtt)
{
@@ -97,8 +93,8 @@ uint32_t FileUploadRequestFunc(MessageContainer* requestContainer)
responseContainer = createContainer(MESSAGE_TYPE__FileUploadResponse, requestContainer->token, false, &response, &file_upload_response__pack, &file_upload_response__get_packed_size);
if (Fresult!= FR_OK)
{
- responseContainer.error = ERROR_CODE__INVALID_PROCESS_ID;
- responseContainer.errormessage = "JOb Active or incorrect parameters";
+ responseContainer.error = getErrorCode(Fresult);
+ responseContainer.errormessage = "File operation error";
}
responseContainer.continuous = false;
uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer));
@@ -130,10 +126,6 @@ uint32_t FileChunkUploadRequestFunc(MessageContainer* requestContainer)
//if (ReceivedFileHandle == FileHandle)
//{
Fresult = f_write(ReceivedFileHandle,request->buffer.data,request->buffer.len,&WrittenBytes );
-// FIL *fp, /* Pointer to the file object */
-// const void *buff, /* Pointer to the data to be written */
-// UINT btw, /* Number of bytes to write */
-// UINT *bw /* Pointer to number of bytes written */
if(Fresult != FR_OK)
{
LOG_ERROR (Fresult,"f_write error");
@@ -167,10 +159,10 @@ uint32_t FileChunkUploadRequestFunc(MessageContainer* requestContainer)
}*/
responseContainer = createContainer(MESSAGE_TYPE__FileChunkUploadResponse, requestContainer->token, false, &response, &file_chunk_upload_response__pack, &file_chunk_upload_response__get_packed_size);
- if (status!= OK)
+ if (Fresult!= OK)
{
- responseContainer.error = ERROR_CODE__INVALID_PROCESS_ID;
- responseContainer.errormessage = "JOb Active or incorrect parameters";
+ responseContainer.error = getErrorCode(Fresult);
+ responseContainer.errormessage = "File operation error";
}
responseContainer.continuous = false;
uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer));
@@ -195,8 +187,8 @@ uint32_t ExecuteProcessRequestFunc(MessageContainer* requestContainer)
responseContainer = createContainer(MESSAGE_TYPE__ExecuteProcessResponse, requestContainer->token, false, &response, &execute_process_response__pack, &execute_process_response__get_packed_size);
if (status!= OK)
{
- responseContainer.error = ERROR_CODE__FILE_NOT_FOUND;
- responseContainer.errormessage = "JOb Active or incorrect parameters";
+ responseContainer.error = ERROR_CODE__GENERAL_ERROR;//getErrorCode(Fresult);
+ responseContainer.errormessage = "File operation error";
}
responseContainer.continuous = false;
uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer));
@@ -221,8 +213,8 @@ uint32_t KillProcessRequestFunc(MessageContainer* requestContainer)
responseContainer = createContainer(MESSAGE_TYPE__KillProcessResponse, requestContainer->token, false, &response, &kill_process_response__pack, &kill_process_response__get_packed_size);
if (status!= OK)
{
- responseContainer.error = ERROR_CODE__FILE_NOT_FOUND;
- responseContainer.errormessage = "JOb Active or incorrect parameters";
+ responseContainer.error = ERROR_CODE__GENERAL_ERROR;//getErrorCode(Fresult);
+ responseContainer.errormessage = "File operation error";
}
responseContainer.continuous = false;
uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer));
@@ -273,10 +265,10 @@ uint32_t CreateRequestFunc(MessageContainer* requestContainer)
free (FileHandle);
responseContainer = createContainer(MESSAGE_TYPE__CreateResponse, requestContainer->token, false, &response, &create_response__pack, &create_response__get_packed_size);
- if (status!= OK)
+ if (Fresult!= OK)
{
- responseContainer.error = ERROR_CODE__FILE_NOT_FOUND;
- responseContainer.errormessage = ErrorMsg;
+ responseContainer.error = getErrorCode(Fresult);
+ responseContainer.errormessage = "File operation error";
}
responseContainer.continuous = false;
uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer));
@@ -305,51 +297,49 @@ uint32_t DeleteRequestFunc(MessageContainer* requestContainer)
Fresult |= f_opendir(&dir, g_cCwdBuf);
if(Fresult != FR_OK)
{
- return(Fresult);
+ LOG_ERROR (Fresult,"f_write error");
}
-
- fno = my_malloc(sizeof(FILINFO));
- memset (fno,0,sizeof(FILINFO));
- Fresult = f_stat(request->path,fno);
- if (Fresult == FR_OK)
+ else
{
- if (isDirectory(fno->fattrib))
+
+ fno = my_malloc(sizeof(FILINFO));
+ memset (fno,0,sizeof(FILINFO));
+ Fresult = f_stat(request->path,fno);
+ if (Fresult == FR_OK)
{
- //============================
- Fresult = f_opendir(&dir, request->path); /* Open the directory */
- if (Fresult == FR_OK)
- {
- Fresult = f_readdir(&dir, &fno); /* Read a directory item */
+ if (isDirectory(fno->fattrib))
+ {
+ //============================
+ Fresult = f_opendir(&dir, request->path); /* Open the directory */
if (Fresult == FR_OK)
{
- if(fno->fname[0] ==0)
- {
- //no files
- Fresult = f_unlink(request->path);
- }
- else
+ Fresult = f_readdir(&dir, &fno); /* Read a directory item */
+ if (Fresult == FR_OK)
{
- LOG_ERROR (fno,"Directory not empty");
+ if(fno->fname[0] ==0)
+ {
+ //no files
+ Fresult = f_unlink(request->path);
+ }
+ else
+ {
+ LOG_ERROR (fno,"Directory not empty");
+ }
}
}
- }
- }
- else
- {
- Fresult = f_unlink(request->path);
+ }
+ else
+ {
+ Fresult = f_unlink(request->path);
+ }
}
}
- if (Fresult != FR_OK)
- {
- status = ERROR_CODE__FILE_NOT_FOUND;
- usnprintf(ErrorMsg, 100, "File Operation failed error code %d",Fresult);
- }
-
responseContainer = createContainer(MESSAGE_TYPE__DeleteResponse, requestContainer->token, false, &response, &delete_response__pack, &delete_response__get_packed_size);
- if (status!= OK)
+ if (Fresult!= OK)
{
- responseContainer.error = ERROR_CODE__FILE_NOT_FOUND;
- responseContainer.errormessage = "JOb Active or incorrect parameters";
+ usnprintf(ErrorMsg, 100, "File Operation failed error code %d",Fresult);
+ responseContainer.error = getErrorCode(Fresult);
+ responseContainer.errormessage = ErrorMsg;
}
responseContainer.continuous = false;
uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer));
@@ -391,10 +381,10 @@ uint32_t GetStorageInfoRequestFunc(MessageContainer* requestContainer)
responseContainer = createContainer(MESSAGE_TYPE__GetStorageInfoResponse, requestContainer->token, false, &response, &get_storage_info_response__pack, &get_storage_info_response__get_packed_size);
- if (status!= OK)
+ if (Fresult!= OK)
{
- responseContainer.error = ERROR_CODE__INVALID_PROCESS_ID;
- responseContainer.errormessage = "JOb Active or incorrect parameters";
+ responseContainer.error = getErrorCode(Fresult);
+ responseContainer.errormessage = "File operation error";
}
responseContainer.continuous = false;
uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer));
@@ -490,10 +480,10 @@ uint32_t GetFilesRequestFunc(MessageContainer* requestContainer)
}
responseContainer = createContainer(MESSAGE_TYPE__GetFilesResponse, requestContainer->token, false, &response, &get_files_response__pack, &get_files_response__get_packed_size);
- if (status!= OK)
+ if (Fresult!= OK)
{
- responseContainer.error = ERROR_CODE__FILE_NOT_FOUND;
- responseContainer.errormessage = "JOb Active or incorrect parameters";
+ responseContainer.error = getErrorCode(Fresult);
+ responseContainer.errormessage = "File operation error";
}
responseContainer.continuous = false;
uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer));
@@ -507,5 +497,5 @@ uint32_t GetFilesRequestFunc(MessageContainer* requestContainer)
if (fno[i])
my_free (fno[i]);
}
- return OK;
+ return Fresult;
}
diff --git a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
index e193938d3..bc27771a2 100644
--- a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
+++ b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
@@ -20,7 +20,7 @@ typedef struct
} TangoVersion_t;
-TangoVersion_t _gTangoVersion = {001,001,005,000};
+TangoVersion_t _gTangoVersion = {001,001,005,001};
#define BUILD_DATE __DATE__
char Dat[50] = BUILD_DATE;
char _gTangoName [MAX_STRING_LEN] = "Tango01 ";//d
diff --git a/Software/Embedded_SW/Embedded/Communication/Container.c b/Software/Embedded_SW/Embedded/Communication/Container.c
index 100dba7a8..7b5e44860 100644
--- a/Software/Embedded_SW/Embedded/Communication/Container.c
+++ b/Software/Embedded_SW/Embedded/Communication/Container.c
@@ -312,6 +312,12 @@ void receive_callback(char* buffer, size_t length)
case MESSAGE_TYPE__SetDigitalOutRequest:
SetDigitalOutRequestRequestFunc(requestContainer);
break;
+ case MESSAGE_TYPE__ThreadJoggingRequest:
+ ThreadJoggingRequestFunc(requestContainer);
+ break;
+ case MESSAGE_TYPE__ThreadAbortJoggingRequest:
+ ThreadAbortJoggingRequestFunc(requestContainer);
+ break;
case MESSAGE_TYPE__StubI2CReadBytesRequest:
Stub_I2CReadBytesRequest(requestContainer);
break;
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/ActivateVersionRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ActivateVersionRequest.pb-c.c
new file mode 100644
index 000000000..3602f7f9e
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ActivateVersionRequest.pb-c.c
@@ -0,0 +1,92 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: ActivateVersionRequest.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "ActivateVersionRequest.pb-c.h"
+void activate_version_request__init
+ (ActivateVersionRequest *message)
+{
+ static const ActivateVersionRequest init_value = ACTIVATE_VERSION_REQUEST__INIT;
+ *message = init_value;
+}
+size_t activate_version_request__get_packed_size
+ (const ActivateVersionRequest *message)
+{
+ assert(message->base.descriptor == &activate_version_request__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t activate_version_request__pack
+ (const ActivateVersionRequest *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &activate_version_request__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t activate_version_request__pack_to_buffer
+ (const ActivateVersionRequest *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &activate_version_request__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+ActivateVersionRequest *
+ activate_version_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (ActivateVersionRequest *)
+ protobuf_c_message_unpack (&activate_version_request__descriptor,
+ allocator, len, data);
+}
+void activate_version_request__free_unpacked
+ (ActivateVersionRequest *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &activate_version_request__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor activate_version_request__field_descriptors[1] =
+{
+ {
+ "FileDescriptors",
+ 1,
+ PROTOBUF_C_LABEL_REPEATED,
+ PROTOBUF_C_TYPE_MESSAGE,
+ offsetof(ActivateVersionRequest, n_filedescriptors),
+ offsetof(ActivateVersionRequest, filedescriptors),
+ &version_file_descriptor__descriptor,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned activate_version_request__field_indices_by_name[] = {
+ 0, /* field[0] = FileDescriptors */
+};
+static const ProtobufCIntRange activate_version_request__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 1 }
+};
+const ProtobufCMessageDescriptor activate_version_request__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "ActivateVersionRequest",
+ "ActivateVersionRequest",
+ "ActivateVersionRequest",
+ "",
+ sizeof(ActivateVersionRequest),
+ 1,
+ activate_version_request__field_descriptors,
+ activate_version_request__field_indices_by_name,
+ 1, activate_version_request__number_ranges,
+ (ProtobufCMessageInit) activate_version_request__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/ActivateVersionRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ActivateVersionRequest.pb-c.h
new file mode 100644
index 000000000..90fe6479d
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ActivateVersionRequest.pb-c.h
@@ -0,0 +1,73 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: ActivateVersionRequest.proto */
+
+#ifndef PROTOBUF_C_ActivateVersionRequest_2eproto__INCLUDED
+#define PROTOBUF_C_ActivateVersionRequest_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
+
+#include "VersionFileDescriptor.pb-c.h"
+
+typedef struct _ActivateVersionRequest ActivateVersionRequest;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _ActivateVersionRequest
+{
+ ProtobufCMessage base;
+ size_t n_filedescriptors;
+ VersionFileDescriptor **filedescriptors;
+};
+#define ACTIVATE_VERSION_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&activate_version_request__descriptor) \
+ , 0,NULL }
+
+
+/* ActivateVersionRequest methods */
+void activate_version_request__init
+ (ActivateVersionRequest *message);
+size_t activate_version_request__get_packed_size
+ (const ActivateVersionRequest *message);
+size_t activate_version_request__pack
+ (const ActivateVersionRequest *message,
+ uint8_t *out);
+size_t activate_version_request__pack_to_buffer
+ (const ActivateVersionRequest *message,
+ ProtobufCBuffer *buffer);
+ActivateVersionRequest *
+ activate_version_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void activate_version_request__free_unpacked
+ (ActivateVersionRequest *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*ActivateVersionRequest_Closure)
+ (const ActivateVersionRequest *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor activate_version_request__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_ActivateVersionRequest_2eproto__INCLUDED */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/ActivateVersionResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ActivateVersionResponse.pb-c.c
new file mode 100644
index 000000000..6f54f8708
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ActivateVersionResponse.pb-c.c
@@ -0,0 +1,72 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: ActivateVersionResponse.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "ActivateVersionResponse.pb-c.h"
+void activate_version_response__init
+ (ActivateVersionResponse *message)
+{
+ static const ActivateVersionResponse init_value = ACTIVATE_VERSION_RESPONSE__INIT;
+ *message = init_value;
+}
+size_t activate_version_response__get_packed_size
+ (const ActivateVersionResponse *message)
+{
+ assert(message->base.descriptor == &activate_version_response__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t activate_version_response__pack
+ (const ActivateVersionResponse *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &activate_version_response__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t activate_version_response__pack_to_buffer
+ (const ActivateVersionResponse *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &activate_version_response__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+ActivateVersionResponse *
+ activate_version_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (ActivateVersionResponse *)
+ protobuf_c_message_unpack (&activate_version_response__descriptor,
+ allocator, len, data);
+}
+void activate_version_response__free_unpacked
+ (ActivateVersionResponse *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &activate_version_response__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+#define activate_version_response__field_descriptors NULL
+#define activate_version_response__field_indices_by_name NULL
+#define activate_version_response__number_ranges NULL
+const ProtobufCMessageDescriptor activate_version_response__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "ActivateVersionResponse",
+ "ActivateVersionResponse",
+ "ActivateVersionResponse",
+ "",
+ sizeof(ActivateVersionResponse),
+ 0,
+ activate_version_response__field_descriptors,
+ activate_version_response__field_indices_by_name,
+ 0, activate_version_response__number_ranges,
+ (ProtobufCMessageInit) activate_version_response__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/ActivateVersionResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ActivateVersionResponse.pb-c.h
new file mode 100644
index 000000000..10dc41bcb
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ActivateVersionResponse.pb-c.h
@@ -0,0 +1,70 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: ActivateVersionResponse.proto */
+
+#ifndef PROTOBUF_C_ActivateVersionResponse_2eproto__INCLUDED
+#define PROTOBUF_C_ActivateVersionResponse_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 _ActivateVersionResponse ActivateVersionResponse;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _ActivateVersionResponse
+{
+ ProtobufCMessage base;
+};
+#define ACTIVATE_VERSION_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&activate_version_response__descriptor) \
+ }
+
+
+/* ActivateVersionResponse methods */
+void activate_version_response__init
+ (ActivateVersionResponse *message);
+size_t activate_version_response__get_packed_size
+ (const ActivateVersionResponse *message);
+size_t activate_version_response__pack
+ (const ActivateVersionResponse *message,
+ uint8_t *out);
+size_t activate_version_response__pack_to_buffer
+ (const ActivateVersionResponse *message,
+ ProtobufCBuffer *buffer);
+ActivateVersionResponse *
+ activate_version_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void activate_version_response__free_unpacked
+ (ActivateVersionResponse *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*ActivateVersionResponse_Closure)
+ (const ActivateVersionResponse *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor activate_version_response__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_ActivateVersionResponse_2eproto__INCLUDED */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkDownloadRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkDownloadRequest.pb-c.c
new file mode 100644
index 000000000..44c892aec
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkDownloadRequest.pb-c.c
@@ -0,0 +1,131 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: FileChunkDownloadRequest.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "FileChunkDownloadRequest.pb-c.h"
+void file_chunk_download_request__init
+ (FileChunkDownloadRequest *message)
+{
+ static const FileChunkDownloadRequest init_value = FILE_CHUNK_DOWNLOAD_REQUEST__INIT;
+ *message = init_value;
+}
+size_t file_chunk_download_request__get_packed_size
+ (const FileChunkDownloadRequest *message)
+{
+ assert(message->base.descriptor == &file_chunk_download_request__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t file_chunk_download_request__pack
+ (const FileChunkDownloadRequest *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &file_chunk_download_request__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t file_chunk_download_request__pack_to_buffer
+ (const FileChunkDownloadRequest *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &file_chunk_download_request__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+FileChunkDownloadRequest *
+ file_chunk_download_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (FileChunkDownloadRequest *)
+ protobuf_c_message_unpack (&file_chunk_download_request__descriptor,
+ allocator, len, data);
+}
+void file_chunk_download_request__free_unpacked
+ (FileChunkDownloadRequest *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &file_chunk_download_request__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor file_chunk_download_request__field_descriptors[4] =
+{
+ {
+ "DownloadID",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_STRING,
+ 0, /* quantifier_offset */
+ offsetof(FileChunkDownloadRequest, downloadid),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "FileName",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_STRING,
+ 0, /* quantifier_offset */
+ offsetof(FileChunkDownloadRequest, filename),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Position",
+ 3,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_INT64,
+ offsetof(FileChunkDownloadRequest, has_position),
+ offsetof(FileChunkDownloadRequest, position),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "IsCanceled",
+ 4,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(FileChunkDownloadRequest, has_iscanceled),
+ offsetof(FileChunkDownloadRequest, iscanceled),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned file_chunk_download_request__field_indices_by_name[] = {
+ 0, /* field[0] = DownloadID */
+ 1, /* field[1] = FileName */
+ 3, /* field[3] = IsCanceled */
+ 2, /* field[2] = Position */
+};
+static const ProtobufCIntRange file_chunk_download_request__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 4 }
+};
+const ProtobufCMessageDescriptor file_chunk_download_request__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "FileChunkDownloadRequest",
+ "FileChunkDownloadRequest",
+ "FileChunkDownloadRequest",
+ "",
+ sizeof(FileChunkDownloadRequest),
+ 4,
+ file_chunk_download_request__field_descriptors,
+ file_chunk_download_request__field_indices_by_name,
+ 1, file_chunk_download_request__number_ranges,
+ (ProtobufCMessageInit) file_chunk_download_request__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkDownloadRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkDownloadRequest.pb-c.h
new file mode 100644
index 000000000..1de5229cd
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkDownloadRequest.pb-c.h
@@ -0,0 +1,76 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: FileChunkDownloadRequest.proto */
+
+#ifndef PROTOBUF_C_FileChunkDownloadRequest_2eproto__INCLUDED
+#define PROTOBUF_C_FileChunkDownloadRequest_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 _FileChunkDownloadRequest FileChunkDownloadRequest;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _FileChunkDownloadRequest
+{
+ ProtobufCMessage base;
+ char *downloadid;
+ char *filename;
+ protobuf_c_boolean has_position;
+ int64_t position;
+ protobuf_c_boolean has_iscanceled;
+ protobuf_c_boolean iscanceled;
+};
+#define FILE_CHUNK_DOWNLOAD_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&file_chunk_download_request__descriptor) \
+ , NULL, NULL, 0, 0, 0, 0 }
+
+
+/* FileChunkDownloadRequest methods */
+void file_chunk_download_request__init
+ (FileChunkDownloadRequest *message);
+size_t file_chunk_download_request__get_packed_size
+ (const FileChunkDownloadRequest *message);
+size_t file_chunk_download_request__pack
+ (const FileChunkDownloadRequest *message,
+ uint8_t *out);
+size_t file_chunk_download_request__pack_to_buffer
+ (const FileChunkDownloadRequest *message,
+ ProtobufCBuffer *buffer);
+FileChunkDownloadRequest *
+ file_chunk_download_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void file_chunk_download_request__free_unpacked
+ (FileChunkDownloadRequest *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*FileChunkDownloadRequest_Closure)
+ (const FileChunkDownloadRequest *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor file_chunk_download_request__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_FileChunkDownloadRequest_2eproto__INCLUDED */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkDownloadResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkDownloadResponse.pb-c.c
new file mode 100644
index 000000000..f846a56b9
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkDownloadResponse.pb-c.c
@@ -0,0 +1,105 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: FileChunkDownloadResponse.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "FileChunkDownloadResponse.pb-c.h"
+void file_chunk_download_response__init
+ (FileChunkDownloadResponse *message)
+{
+ static const FileChunkDownloadResponse init_value = FILE_CHUNK_DOWNLOAD_RESPONSE__INIT;
+ *message = init_value;
+}
+size_t file_chunk_download_response__get_packed_size
+ (const FileChunkDownloadResponse *message)
+{
+ assert(message->base.descriptor == &file_chunk_download_response__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t file_chunk_download_response__pack
+ (const FileChunkDownloadResponse *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &file_chunk_download_response__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t file_chunk_download_response__pack_to_buffer
+ (const FileChunkDownloadResponse *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &file_chunk_download_response__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+FileChunkDownloadResponse *
+ file_chunk_download_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (FileChunkDownloadResponse *)
+ protobuf_c_message_unpack (&file_chunk_download_response__descriptor,
+ allocator, len, data);
+}
+void file_chunk_download_response__free_unpacked
+ (FileChunkDownloadResponse *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &file_chunk_download_response__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor file_chunk_download_response__field_descriptors[2] =
+{
+ {
+ "Buffer",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BYTES,
+ offsetof(FileChunkDownloadResponse, has_buffer),
+ offsetof(FileChunkDownloadResponse, buffer),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "IsCanceled",
+ 3,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(FileChunkDownloadResponse, has_iscanceled),
+ offsetof(FileChunkDownloadResponse, iscanceled),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned file_chunk_download_response__field_indices_by_name[] = {
+ 0, /* field[0] = Buffer */
+ 1, /* field[1] = IsCanceled */
+};
+static const ProtobufCIntRange file_chunk_download_response__number_ranges[1 + 1] =
+{
+ { 2, 0 },
+ { 0, 2 }
+};
+const ProtobufCMessageDescriptor file_chunk_download_response__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "FileChunkDownloadResponse",
+ "FileChunkDownloadResponse",
+ "FileChunkDownloadResponse",
+ "",
+ sizeof(FileChunkDownloadResponse),
+ 2,
+ file_chunk_download_response__field_descriptors,
+ file_chunk_download_response__field_indices_by_name,
+ 1, file_chunk_download_response__number_ranges,
+ (ProtobufCMessageInit) file_chunk_download_response__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkDownloadResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkDownloadResponse.pb-c.h
new file mode 100644
index 000000000..7461554c3
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkDownloadResponse.pb-c.h
@@ -0,0 +1,74 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: FileChunkDownloadResponse.proto */
+
+#ifndef PROTOBUF_C_FileChunkDownloadResponse_2eproto__INCLUDED
+#define PROTOBUF_C_FileChunkDownloadResponse_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 _FileChunkDownloadResponse FileChunkDownloadResponse;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _FileChunkDownloadResponse
+{
+ ProtobufCMessage base;
+ protobuf_c_boolean has_buffer;
+ ProtobufCBinaryData buffer;
+ protobuf_c_boolean has_iscanceled;
+ protobuf_c_boolean iscanceled;
+};
+#define FILE_CHUNK_DOWNLOAD_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&file_chunk_download_response__descriptor) \
+ , 0, {0,NULL}, 0, 0 }
+
+
+/* FileChunkDownloadResponse methods */
+void file_chunk_download_response__init
+ (FileChunkDownloadResponse *message);
+size_t file_chunk_download_response__get_packed_size
+ (const FileChunkDownloadResponse *message);
+size_t file_chunk_download_response__pack
+ (const FileChunkDownloadResponse *message,
+ uint8_t *out);
+size_t file_chunk_download_response__pack_to_buffer
+ (const FileChunkDownloadResponse *message,
+ ProtobufCBuffer *buffer);
+FileChunkDownloadResponse *
+ file_chunk_download_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void file_chunk_download_response__free_unpacked
+ (FileChunkDownloadResponse *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*FileChunkDownloadResponse_Closure)
+ (const FileChunkDownloadResponse *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor file_chunk_download_response__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_FileChunkDownloadResponse_2eproto__INCLUDED */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileDownloadRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileDownloadRequest.pb-c.c
new file mode 100644
index 000000000..b128e2d76
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileDownloadRequest.pb-c.c
@@ -0,0 +1,92 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: FileDownloadRequest.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "FileDownloadRequest.pb-c.h"
+void file_download_request__init
+ (FileDownloadRequest *message)
+{
+ static const FileDownloadRequest init_value = FILE_DOWNLOAD_REQUEST__INIT;
+ *message = init_value;
+}
+size_t file_download_request__get_packed_size
+ (const FileDownloadRequest *message)
+{
+ assert(message->base.descriptor == &file_download_request__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t file_download_request__pack
+ (const FileDownloadRequest *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &file_download_request__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t file_download_request__pack_to_buffer
+ (const FileDownloadRequest *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &file_download_request__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+FileDownloadRequest *
+ file_download_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (FileDownloadRequest *)
+ protobuf_c_message_unpack (&file_download_request__descriptor,
+ allocator, len, data);
+}
+void file_download_request__free_unpacked
+ (FileDownloadRequest *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &file_download_request__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor file_download_request__field_descriptors[1] =
+{
+ {
+ "FileName",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_STRING,
+ 0, /* quantifier_offset */
+ offsetof(FileDownloadRequest, filename),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned file_download_request__field_indices_by_name[] = {
+ 0, /* field[0] = FileName */
+};
+static const ProtobufCIntRange file_download_request__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 1 }
+};
+const ProtobufCMessageDescriptor file_download_request__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "FileDownloadRequest",
+ "FileDownloadRequest",
+ "FileDownloadRequest",
+ "",
+ sizeof(FileDownloadRequest),
+ 1,
+ file_download_request__field_descriptors,
+ file_download_request__field_indices_by_name,
+ 1, file_download_request__number_ranges,
+ (ProtobufCMessageInit) file_download_request__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileDownloadRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileDownloadRequest.pb-c.h
new file mode 100644
index 000000000..9be5758e5
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileDownloadRequest.pb-c.h
@@ -0,0 +1,71 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: FileDownloadRequest.proto */
+
+#ifndef PROTOBUF_C_FileDownloadRequest_2eproto__INCLUDED
+#define PROTOBUF_C_FileDownloadRequest_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 _FileDownloadRequest FileDownloadRequest;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _FileDownloadRequest
+{
+ ProtobufCMessage base;
+ char *filename;
+};
+#define FILE_DOWNLOAD_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&file_download_request__descriptor) \
+ , NULL }
+
+
+/* FileDownloadRequest methods */
+void file_download_request__init
+ (FileDownloadRequest *message);
+size_t file_download_request__get_packed_size
+ (const FileDownloadRequest *message);
+size_t file_download_request__pack
+ (const FileDownloadRequest *message,
+ uint8_t *out);
+size_t file_download_request__pack_to_buffer
+ (const FileDownloadRequest *message,
+ ProtobufCBuffer *buffer);
+FileDownloadRequest *
+ file_download_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void file_download_request__free_unpacked
+ (FileDownloadRequest *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*FileDownloadRequest_Closure)
+ (const FileDownloadRequest *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor file_download_request__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_FileDownloadRequest_2eproto__INCLUDED */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileDownloadResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileDownloadResponse.pb-c.c
new file mode 100644
index 000000000..ece764223
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileDownloadResponse.pb-c.c
@@ -0,0 +1,105 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: FileDownloadResponse.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "FileDownloadResponse.pb-c.h"
+void file_download_response__init
+ (FileDownloadResponse *message)
+{
+ static const FileDownloadResponse init_value = FILE_DOWNLOAD_RESPONSE__INIT;
+ *message = init_value;
+}
+size_t file_download_response__get_packed_size
+ (const FileDownloadResponse *message)
+{
+ assert(message->base.descriptor == &file_download_response__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t file_download_response__pack
+ (const FileDownloadResponse *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &file_download_response__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t file_download_response__pack_to_buffer
+ (const FileDownloadResponse *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &file_download_response__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+FileDownloadResponse *
+ file_download_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (FileDownloadResponse *)
+ protobuf_c_message_unpack (&file_download_response__descriptor,
+ allocator, len, data);
+}
+void file_download_response__free_unpacked
+ (FileDownloadResponse *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &file_download_response__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor file_download_response__field_descriptors[2] =
+{
+ {
+ "DownloadID",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_STRING,
+ 0, /* quantifier_offset */
+ offsetof(FileDownloadResponse, downloadid),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "MaxChunkLength",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_INT64,
+ offsetof(FileDownloadResponse, has_maxchunklength),
+ offsetof(FileDownloadResponse, maxchunklength),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned file_download_response__field_indices_by_name[] = {
+ 0, /* field[0] = DownloadID */
+ 1, /* field[1] = MaxChunkLength */
+};
+static const ProtobufCIntRange file_download_response__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 2 }
+};
+const ProtobufCMessageDescriptor file_download_response__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "FileDownloadResponse",
+ "FileDownloadResponse",
+ "FileDownloadResponse",
+ "",
+ sizeof(FileDownloadResponse),
+ 2,
+ file_download_response__field_descriptors,
+ file_download_response__field_indices_by_name,
+ 1, file_download_response__number_ranges,
+ (ProtobufCMessageInit) file_download_response__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileDownloadResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileDownloadResponse.pb-c.h
new file mode 100644
index 000000000..9f8bcfb2d
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileDownloadResponse.pb-c.h
@@ -0,0 +1,73 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: FileDownloadResponse.proto */
+
+#ifndef PROTOBUF_C_FileDownloadResponse_2eproto__INCLUDED
+#define PROTOBUF_C_FileDownloadResponse_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 _FileDownloadResponse FileDownloadResponse;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _FileDownloadResponse
+{
+ ProtobufCMessage base;
+ char *downloadid;
+ protobuf_c_boolean has_maxchunklength;
+ int64_t maxchunklength;
+};
+#define FILE_DOWNLOAD_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&file_download_response__descriptor) \
+ , NULL, 0, 0 }
+
+
+/* FileDownloadResponse methods */
+void file_download_response__init
+ (FileDownloadResponse *message);
+size_t file_download_response__get_packed_size
+ (const FileDownloadResponse *message);
+size_t file_download_response__pack
+ (const FileDownloadResponse *message,
+ uint8_t *out);
+size_t file_download_response__pack_to_buffer
+ (const FileDownloadResponse *message,
+ ProtobufCBuffer *buffer);
+FileDownloadResponse *
+ file_download_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void file_download_response__free_unpacked
+ (FileDownloadResponse *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*FileDownloadResponse_Closure)
+ (const FileDownloadResponse *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor file_download_response__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_FileDownloadResponse_2eproto__INCLUDED */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoResponse.pb-c.c
index 0ba9d355f..864b46201 100644
--- a/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoResponse.pb-c.c
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoResponse.pb-c.c
@@ -52,7 +52,7 @@ void get_storage_info_response__free_unpacked
assert(message->base.descriptor == &get_storage_info_response__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
-static const ProtobufCFieldDescriptor get_storage_info_response__field_descriptors[2] =
+static const ProtobufCFieldDescriptor get_storage_info_response__field_descriptors[3] =
{
{
"Capacity",
@@ -78,15 +78,28 @@ static const ProtobufCFieldDescriptor get_storage_info_response__field_descripto
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
+ {
+ "Root",
+ 3,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_STRING,
+ 0, /* quantifier_offset */
+ offsetof(GetStorageInfoResponse, root),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
};
static const unsigned get_storage_info_response__field_indices_by_name[] = {
0, /* field[0] = Capacity */
1, /* field[1] = FreeSpace */
+ 2, /* field[2] = Root */
};
static const ProtobufCIntRange get_storage_info_response__number_ranges[1 + 1] =
{
{ 1, 0 },
- { 0, 2 }
+ { 0, 3 }
};
const ProtobufCMessageDescriptor get_storage_info_response__descriptor =
{
@@ -96,7 +109,7 @@ const ProtobufCMessageDescriptor get_storage_info_response__descriptor =
"GetStorageInfoResponse",
"",
sizeof(GetStorageInfoResponse),
- 2,
+ 3,
get_storage_info_response__field_descriptors,
get_storage_info_response__field_indices_by_name,
1, get_storage_info_response__number_ranges,
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoResponse.pb-c.h
index 778512d4f..beda98113 100644
--- a/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoResponse.pb-c.h
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoResponse.pb-c.h
@@ -30,10 +30,11 @@ struct _GetStorageInfoResponse
int32_t capacity;
protobuf_c_boolean has_freespace;
int32_t freespace;
+ char *root;
};
#define GET_STORAGE_INFO_RESPONSE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&get_storage_info_response__descriptor) \
- , 0, 0, 0, 0 }
+ , 0, 0, 0, 0, NULL }
/* GetStorageInfoResponse methods */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/ValidateVersionRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ValidateVersionRequest.pb-c.c
new file mode 100644
index 000000000..f42b94737
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ValidateVersionRequest.pb-c.c
@@ -0,0 +1,92 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: ValidateVersionRequest.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "ValidateVersionRequest.pb-c.h"
+void validate_version_request__init
+ (ValidateVersionRequest *message)
+{
+ static const ValidateVersionRequest init_value = VALIDATE_VERSION_REQUEST__INIT;
+ *message = init_value;
+}
+size_t validate_version_request__get_packed_size
+ (const ValidateVersionRequest *message)
+{
+ assert(message->base.descriptor == &validate_version_request__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t validate_version_request__pack
+ (const ValidateVersionRequest *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &validate_version_request__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t validate_version_request__pack_to_buffer
+ (const ValidateVersionRequest *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &validate_version_request__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+ValidateVersionRequest *
+ validate_version_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (ValidateVersionRequest *)
+ protobuf_c_message_unpack (&validate_version_request__descriptor,
+ allocator, len, data);
+}
+void validate_version_request__free_unpacked
+ (ValidateVersionRequest *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &validate_version_request__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor validate_version_request__field_descriptors[1] =
+{
+ {
+ "FileDescriptors",
+ 1,
+ PROTOBUF_C_LABEL_REPEATED,
+ PROTOBUF_C_TYPE_MESSAGE,
+ offsetof(ValidateVersionRequest, n_filedescriptors),
+ offsetof(ValidateVersionRequest, filedescriptors),
+ &version_file_descriptor__descriptor,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned validate_version_request__field_indices_by_name[] = {
+ 0, /* field[0] = FileDescriptors */
+};
+static const ProtobufCIntRange validate_version_request__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 1 }
+};
+const ProtobufCMessageDescriptor validate_version_request__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "ValidateVersionRequest",
+ "ValidateVersionRequest",
+ "ValidateVersionRequest",
+ "",
+ sizeof(ValidateVersionRequest),
+ 1,
+ validate_version_request__field_descriptors,
+ validate_version_request__field_indices_by_name,
+ 1, validate_version_request__number_ranges,
+ (ProtobufCMessageInit) validate_version_request__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/ValidateVersionRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ValidateVersionRequest.pb-c.h
new file mode 100644
index 000000000..eeb30902e
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ValidateVersionRequest.pb-c.h
@@ -0,0 +1,73 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: ValidateVersionRequest.proto */
+
+#ifndef PROTOBUF_C_ValidateVersionRequest_2eproto__INCLUDED
+#define PROTOBUF_C_ValidateVersionRequest_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
+
+#include "VersionFileDescriptor.pb-c.h"
+
+typedef struct _ValidateVersionRequest ValidateVersionRequest;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _ValidateVersionRequest
+{
+ ProtobufCMessage base;
+ size_t n_filedescriptors;
+ VersionFileDescriptor **filedescriptors;
+};
+#define VALIDATE_VERSION_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&validate_version_request__descriptor) \
+ , 0,NULL }
+
+
+/* ValidateVersionRequest methods */
+void validate_version_request__init
+ (ValidateVersionRequest *message);
+size_t validate_version_request__get_packed_size
+ (const ValidateVersionRequest *message);
+size_t validate_version_request__pack
+ (const ValidateVersionRequest *message,
+ uint8_t *out);
+size_t validate_version_request__pack_to_buffer
+ (const ValidateVersionRequest *message,
+ ProtobufCBuffer *buffer);
+ValidateVersionRequest *
+ validate_version_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void validate_version_request__free_unpacked
+ (ValidateVersionRequest *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*ValidateVersionRequest_Closure)
+ (const ValidateVersionRequest *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor validate_version_request__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_ValidateVersionRequest_2eproto__INCLUDED */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/ValidateVersionResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ValidateVersionResponse.pb-c.c
new file mode 100644
index 000000000..9be2cce20
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ValidateVersionResponse.pb-c.c
@@ -0,0 +1,72 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: ValidateVersionResponse.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "ValidateVersionResponse.pb-c.h"
+void validate_version_response__init
+ (ValidateVersionResponse *message)
+{
+ static const ValidateVersionResponse init_value = VALIDATE_VERSION_RESPONSE__INIT;
+ *message = init_value;
+}
+size_t validate_version_response__get_packed_size
+ (const ValidateVersionResponse *message)
+{
+ assert(message->base.descriptor == &validate_version_response__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t validate_version_response__pack
+ (const ValidateVersionResponse *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &validate_version_response__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t validate_version_response__pack_to_buffer
+ (const ValidateVersionResponse *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &validate_version_response__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+ValidateVersionResponse *
+ validate_version_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (ValidateVersionResponse *)
+ protobuf_c_message_unpack (&validate_version_response__descriptor,
+ allocator, len, data);
+}
+void validate_version_response__free_unpacked
+ (ValidateVersionResponse *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &validate_version_response__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+#define validate_version_response__field_descriptors NULL
+#define validate_version_response__field_indices_by_name NULL
+#define validate_version_response__number_ranges NULL
+const ProtobufCMessageDescriptor validate_version_response__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "ValidateVersionResponse",
+ "ValidateVersionResponse",
+ "ValidateVersionResponse",
+ "",
+ sizeof(ValidateVersionResponse),
+ 0,
+ validate_version_response__field_descriptors,
+ validate_version_response__field_indices_by_name,
+ 0, validate_version_response__number_ranges,
+ (ProtobufCMessageInit) validate_version_response__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/ValidateVersionResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ValidateVersionResponse.pb-c.h
new file mode 100644
index 000000000..0032ec8c9
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ValidateVersionResponse.pb-c.h
@@ -0,0 +1,70 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: ValidateVersionResponse.proto */
+
+#ifndef PROTOBUF_C_ValidateVersionResponse_2eproto__INCLUDED
+#define PROTOBUF_C_ValidateVersionResponse_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 _ValidateVersionResponse ValidateVersionResponse;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _ValidateVersionResponse
+{
+ ProtobufCMessage base;
+};
+#define VALIDATE_VERSION_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&validate_version_response__descriptor) \
+ }
+
+
+/* ValidateVersionResponse methods */
+void validate_version_response__init
+ (ValidateVersionResponse *message);
+size_t validate_version_response__get_packed_size
+ (const ValidateVersionResponse *message);
+size_t validate_version_response__pack
+ (const ValidateVersionResponse *message,
+ uint8_t *out);
+size_t validate_version_response__pack_to_buffer
+ (const ValidateVersionResponse *message,
+ ProtobufCBuffer *buffer);
+ValidateVersionResponse *
+ validate_version_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void validate_version_response__free_unpacked
+ (ValidateVersionResponse *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*ValidateVersionResponse_Closure)
+ (const ValidateVersionResponse *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor validate_version_response__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_ValidateVersionResponse_2eproto__INCLUDED */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/VersionFileDescriptor.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/VersionFileDescriptor.pb-c.c
new file mode 100644
index 000000000..53b9f5bfd
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/VersionFileDescriptor.pb-c.c
@@ -0,0 +1,131 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: VersionFileDescriptor.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "VersionFileDescriptor.pb-c.h"
+void version_file_descriptor__init
+ (VersionFileDescriptor *message)
+{
+ static const VersionFileDescriptor init_value = VERSION_FILE_DESCRIPTOR__INIT;
+ *message = init_value;
+}
+size_t version_file_descriptor__get_packed_size
+ (const VersionFileDescriptor *message)
+{
+ assert(message->base.descriptor == &version_file_descriptor__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t version_file_descriptor__pack
+ (const VersionFileDescriptor *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &version_file_descriptor__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t version_file_descriptor__pack_to_buffer
+ (const VersionFileDescriptor *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &version_file_descriptor__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+VersionFileDescriptor *
+ version_file_descriptor__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (VersionFileDescriptor *)
+ protobuf_c_message_unpack (&version_file_descriptor__descriptor,
+ allocator, len, data);
+}
+void version_file_descriptor__free_unpacked
+ (VersionFileDescriptor *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &version_file_descriptor__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor version_file_descriptor__field_descriptors[4] =
+{
+ {
+ "FileName",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_STRING,
+ 0, /* quantifier_offset */
+ offsetof(VersionFileDescriptor, filename),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Version",
+ 2,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_STRING,
+ 0, /* quantifier_offset */
+ offsetof(VersionFileDescriptor, version),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Destination",
+ 3,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_ENUM,
+ offsetof(VersionFileDescriptor, has_destination),
+ offsetof(VersionFileDescriptor, destination),
+ &version_file_destination__descriptor,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "CheckSum",
+ 4,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BYTES,
+ offsetof(VersionFileDescriptor, has_checksum),
+ offsetof(VersionFileDescriptor, checksum),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned version_file_descriptor__field_indices_by_name[] = {
+ 3, /* field[3] = CheckSum */
+ 2, /* field[2] = Destination */
+ 0, /* field[0] = FileName */
+ 1, /* field[1] = Version */
+};
+static const ProtobufCIntRange version_file_descriptor__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 4 }
+};
+const ProtobufCMessageDescriptor version_file_descriptor__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "VersionFileDescriptor",
+ "VersionFileDescriptor",
+ "VersionFileDescriptor",
+ "",
+ sizeof(VersionFileDescriptor),
+ 4,
+ version_file_descriptor__field_descriptors,
+ version_file_descriptor__field_indices_by_name,
+ 1, version_file_descriptor__number_ranges,
+ (ProtobufCMessageInit) version_file_descriptor__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/VersionFileDescriptor.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/VersionFileDescriptor.pb-c.h
new file mode 100644
index 000000000..692dc6722
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/VersionFileDescriptor.pb-c.h
@@ -0,0 +1,77 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: VersionFileDescriptor.proto */
+
+#ifndef PROTOBUF_C_VersionFileDescriptor_2eproto__INCLUDED
+#define PROTOBUF_C_VersionFileDescriptor_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
+
+#include "VersionFileDestination.pb-c.h"
+
+typedef struct _VersionFileDescriptor VersionFileDescriptor;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _VersionFileDescriptor
+{
+ ProtobufCMessage base;
+ char *filename;
+ char *version;
+ protobuf_c_boolean has_destination;
+ VersionFileDestination destination;
+ protobuf_c_boolean has_checksum;
+ ProtobufCBinaryData checksum;
+};
+#define VERSION_FILE_DESCRIPTOR__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&version_file_descriptor__descriptor) \
+ , NULL, NULL, 0, VERSION_FILE_DESTINATION__MCU, 0, {0,NULL} }
+
+
+/* VersionFileDescriptor methods */
+void version_file_descriptor__init
+ (VersionFileDescriptor *message);
+size_t version_file_descriptor__get_packed_size
+ (const VersionFileDescriptor *message);
+size_t version_file_descriptor__pack
+ (const VersionFileDescriptor *message,
+ uint8_t *out);
+size_t version_file_descriptor__pack_to_buffer
+ (const VersionFileDescriptor *message,
+ ProtobufCBuffer *buffer);
+VersionFileDescriptor *
+ version_file_descriptor__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void version_file_descriptor__free_unpacked
+ (VersionFileDescriptor *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*VersionFileDescriptor_Closure)
+ (const VersionFileDescriptor *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor version_file_descriptor__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_VersionFileDescriptor_2eproto__INCLUDED */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/VersionFileDestination.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/VersionFileDestination.pb-c.c
new file mode 100644
index 000000000..3e45ece3e
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/VersionFileDestination.pb-c.c
@@ -0,0 +1,41 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: VersionFileDestination.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "VersionFileDestination.pb-c.h"
+static const ProtobufCEnumValue version_file_destination__enum_values_by_number[4] =
+{
+ { "MCU", "VERSION_FILE_DESTINATION__MCU", 0 },
+ { "FPGA1", "VERSION_FILE_DESTINATION__FPGA1", 1 },
+ { "FPGA2", "VERSION_FILE_DESTINATION__FPGA2", 2 },
+ { "FPGA3", "VERSION_FILE_DESTINATION__FPGA3", 3 },
+};
+static const ProtobufCIntRange version_file_destination__value_ranges[] = {
+{0, 0},{0, 4}
+};
+static const ProtobufCEnumValueIndex version_file_destination__enum_values_by_name[4] =
+{
+ { "FPGA1", 1 },
+ { "FPGA2", 2 },
+ { "FPGA3", 3 },
+ { "MCU", 0 },
+};
+const ProtobufCEnumDescriptor version_file_destination__descriptor =
+{
+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
+ "VersionFileDestination",
+ "VersionFileDestination",
+ "VersionFileDestination",
+ "",
+ 4,
+ version_file_destination__enum_values_by_number,
+ 4,
+ version_file_destination__enum_values_by_name,
+ 1,
+ version_file_destination__value_ranges,
+ NULL,NULL,NULL,NULL /* reserved[1234] */
+};
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/VersionFileDestination.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/VersionFileDestination.pb-c.h
new file mode 100644
index 000000000..83686d194
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/VersionFileDestination.pb-c.h
@@ -0,0 +1,45 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: VersionFileDestination.proto */
+
+#ifndef PROTOBUF_C_VersionFileDestination_2eproto__INCLUDED
+#define PROTOBUF_C_VersionFileDestination_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
+
+
+
+
+/* --- enums --- */
+
+typedef enum _VersionFileDestination {
+ VERSION_FILE_DESTINATION__MCU = 0,
+ VERSION_FILE_DESTINATION__FPGA1 = 1,
+ VERSION_FILE_DESTINATION__FPGA2 = 2,
+ VERSION_FILE_DESTINATION__FPGA3 = 3
+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(VERSION_FILE_DESTINATION)
+} VersionFileDestination;
+
+/* --- messages --- */
+
+/* --- per-message closures --- */
+
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCEnumDescriptor version_file_destination__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_VersionFileDestination_2eproto__INCLUDED */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Printing/JobTicket.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Printing/JobTicket.pb-c.c
index b24330f6c..c913c9d4c 100644
--- a/Software/Embedded_SW/Embedded/Communication/PMR/Printing/JobTicket.pb-c.c
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Printing/JobTicket.pb-c.c
@@ -55,7 +55,7 @@ void job_ticket__free_unpacked
static const ProtobufCFieldDescriptor job_ticket__field_descriptors[9] =
{
{
- "guid",
+ "Guid",
1,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_STRING,
@@ -165,6 +165,7 @@ static const ProtobufCFieldDescriptor job_ticket__field_descriptors[9] =
};
static const unsigned job_ticket__field_indices_by_name[] = {
2, /* field[2] = EnableInterSegment */
+ 0, /* field[0] = Guid */
3, /* field[3] = InterSegmentLength */
4, /* field[4] = Length */
1, /* field[1] = Name */
@@ -172,7 +173,6 @@ static const unsigned job_ticket__field_indices_by_name[] = {
8, /* field[8] = Segments */
7, /* field[7] = Spool */
6, /* field[6] = WindingMethod */
- 0, /* field[0] = guid */
};
static const ProtobufCIntRange job_ticket__number_ranges[1 + 1] =
{
diff --git a/Software/Embedded_SW/Embedded/Modules/General/process.c b/Software/Embedded_SW/Embedded/Modules/General/process.c
index 1ab1365d0..96248ab8b 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/process.c
+++ b/Software/Embedded_SW/Embedded/Modules/General/process.c
@@ -28,7 +28,7 @@ int32_t tableindex = 0;
#define MAX_ALLOWED_TEMPERATURE 280
-ProcessParameters* ProcessParametersKeep;
+ProcessParameters ProcessParametersKeep;
uint32_t HandleProcessParameters(ProcessParameters* ProcessParams)
{
@@ -47,7 +47,7 @@ uint32_t HandleProcessParameters(ProcessParameters* ProcessParams)
return status;
if (ProcessParams)
{
- ProcessParametersKeep = ProcessParams;
+ memcpy (&ProcessParametersKeep,ProcessParams,sizeof(ProcessParameters));
}
if (ProcessParams->mixertemp)
status |= HeaterCommandRequestMessage(
diff --git a/Software/Embedded_SW/Embedded/Modules/General/process.h b/Software/Embedded_SW/Embedded/Modules/General/process.h
index 520b5e626..12f1f8461 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/process.h
+++ b/Software/Embedded_SW/Embedded/Modules/General/process.h
@@ -19,7 +19,7 @@ extern double headairflow;
extern double dryerairflow;
extern int32_t tableindex;
-extern ProcessParameters* ProcessParametersKeep;
+extern ProcessParameters ProcessParametersKeep;
extern void ProcessRequestFunc(MessageContainer* requestContainer);
extern uint32_t HandleProcessParameters(ProcessParameters* ProcessParams);
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
index 2af2f63c0..958f481bf 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
@@ -379,8 +379,7 @@ uint32_t IDSPreSegmentState(void *JobDetails, int SegmentId)
int Dispenser_i;
TimerMotors_t HW_Motor_Id;
- Valve_Set(VALVE_MIXCHIP_WASTECH, Mixer_Waste);
-
+ Valve_Set(VALVE_MIXCHIP_WASTECH, Mixer_Waste); //#bug 323
for (Dispenser_i = 0;Dispenser_i < MAX_SYSTEM_DISPENSERS;Dispenser_i++)
{
HW_Motor_Id = DispenserIdToMotorId[Dispenser_i];
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
index 15ea5157b..6db7f616e 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
@@ -458,7 +458,7 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue)
NormalizedError = avreageSampleValue*NormalizedErrorCoEfficient[index];
MotorControlConfig[index].m_mesuredParam = NormalizedError;
DancerError[DancerId] = NormalizedError;
- MotorControlConfig[index].m_calculatedError = AdvancedPIDAlgorithmCalculation((float)MotorControlConfig[index].m_SetParam , (float)MotorControlConfig[index].m_mesuredParam,
+ MotorControlConfig[index].m_calculatedError = /*Advanced*/PIDAlgorithmCalculation((float)MotorControlConfig[index].m_SetParam , (float)MotorControlConfig[index].m_mesuredParam,
&MotorControlConfig[index].m_params, &MotorControlConfig[index].m_preError, &MotorControlConfig[index].m_integral);
if (index != FEEDER_MOTOR) //feeder unit handles errors opposite to left unit
{
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
index 2eed69f24..43700d8ff 100644
--- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
+++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
@@ -51,6 +51,12 @@
#include "PMR/Stubs/StubAbortJobRequest.pb-c.h"
#include "PMR/Stubs/StubAbortJobResponse.pb-c.h"
+#include "PMR/Diagnostics/ThreadJoggingRequest.pb-c.h"
+#include "PMR/Diagnostics/ThreadJoggingResponse.pb-c.h"
+#include "PMR/Diagnostics/ThreadAbortJoggingRequest.pb-c.h"
+#include "PMR/Diagnostics/ThreadAbortJoggingResponse.pb-c.h"
+
+
#include "./printingSTM.h"
#include "modules/thread/thread_ex.h"
#include "modules/ids/ids_ex.h"
@@ -330,6 +336,110 @@ double previousJobLength;
char ErrorMsg[100];
uint32_t StubControlId = 0xFF;
double StubLengthCounter = 0,StubLength = 0,StubSpeed=0;
+//#include "PMR/Diagnostics/ThreadJoggingResponse.pb-c.h"
+//#include "PMR/Diagnostics/ThreadAbortJoggingRequest.pb-c.h"
+JobTicket Ticket;
+JobSegment *TSegment;
+JobSpool *Tspool;
+bool CopyConfigured[MAX_SYSTEM_MODULES];
+void ThreadJoggingRequestFunc(MessageContainer* requestContainer)
+{
+ uint32_t status = OK;
+
+ MessageContainer responseContainer;
+ ProcessParameters ProcessParametersCopy;
+ ThreadJoggingRequest* request = thread_jogging_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);
+
+ ThreadJoggingResponse response = THREAD_JOGGING_RESPONSE__INIT;
+ if (JobIsActive() == true)
+ {
+ status = ERROR;
+ }
+ else
+ {
+ memcpy(&CopyConfigured,&Configured,sizeof(CopyConfigured));
+ //set the job handler to ignore heaters, ids and waste in the state machine
+ Configured[Module_Thread] = true;
+ Configured[Module_Winder] = true;
+ Configured[Module_IDS] = false;
+ Configured[Module_Heaters] = false;
+ Configured[Module_Waste] = false;
+ //set the requested speed without changing other process parameters
+ memcpy (&ProcessParametersCopy,&ProcessParametersKeep,sizeof(ProcessParameters));
+ if(request->speed)
+ ProcessParametersCopy.dyeingspeed = request->speed;
+ else
+ ProcessParametersCopy.dyeingspeed = 30;
+ if (HandleProcessParameters(&ProcessParametersCopy)!= OK)
+ {
+ status = FAILED;
+ }
+ else
+ {
+ //load essential job prameters to enable thread running
+ Ticket.n_segments = 1;
+ Ticket.segments = my_malloc(sizeof(Ticket.segments));
+ TSegment = my_malloc(sizeof(JobSegment));
+ Tspool = my_malloc(sizeof(JobSpool));
+ TSegment->length = 5000.0;
+ TSegment->n_brushstops = 0;
+ Ticket.segments[0] = TSegment;
+ Tspool->backingrate = 30;
+ Tspool->bottombackingrate = 18;
+ Tspool->segmentoffsetpulses = 1000;
+ Tspool->startoffsetpulses = 240;
+ Tspool->rotationsperpassage = 6;
+ Ticket.spool = Tspool;
+ CurrentJob = &Ticket;
+ InternalWindingConfigMessage(Tspool);
+ StartJob(&Ticket);
+ }
+ }
+ responseContainer = createContainer(MESSAGE_TYPE__ThreadJoggingResponse, requestContainer->token, true, &response, &thread_jogging_response__pack, &thread_jogging_response__get_packed_size);
+ if (status!= OK)
+ {
+ responseContainer.error = ERROR_CODE__INVALID_PARAMETER;
+ responseContainer.errormessage = "JOb Active or incorrect parameters";
+ }
+// responseContainer.continuous = false;
+ uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer));
+ size_t container_size = message_container__pack(&responseContainer, container_buffer);
+ SendChars(container_buffer, container_size);
+ my_free(responseContainer.data.data);
+
+ return ;
+
+}
+void ThreadAbortJoggingRequestFunc(MessageContainer* requestContainer)
+{
+ uint32_t status = OK;
+
+ MessageContainer responseContainer;
+
+ ThreadAbortJoggingRequest* request = thread_abort_jogging_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);
+
+ ThreadAbortJoggingResponse response = THREAD_ABORT_JOGGING_RESPONSE__INIT;
+
+ AbortJob(0);
+
+ //set the job handler to handle heaters, ids and waste in the state machine
+ memcpy(&Configured,&CopyConfigured,sizeof(CopyConfigured));
+ my_free(Ticket.segments);
+ my_free(TSegment);
+ my_free(Tspool);
+
+ responseContainer = createContainer(MESSAGE_TYPE__ThreadAbortJoggingResponse, requestContainer->token, false, &response, &thread_abort_jogging_response__pack, &thread_abort_jogging_response__get_packed_size);
+
+ responseContainer.continuous = false;
+ uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer));
+ size_t container_size = message_container__pack(&responseContainer, container_buffer);
+ my_free(responseContainer.data.data);
+ SendChars(container_buffer, container_size);
+
+ return ;
+
+}
+
//********************************************************************************************************************
uint32_t SendStubJobProgress(uint32_t IfIndex, uint32_t readValue)
{
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h b/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h
index 0b9c68394..503fbeed9 100644
--- a/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h
+++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h
@@ -156,6 +156,9 @@ void AbortJob(char *Msg);
void Stub_JobRequest(MessageContainer* requestContainer);
void Stub_AbortJobRequest(MessageContainer* requestContainer);
+void ThreadJoggingRequestFunc(MessageContainer* requestContainer);
+void ThreadAbortJoggingRequestFunc(MessageContainer* requestContainer);
+
uint32_t CurrentJobRequestFunc(MessageContainer* requestContainer);
uint32_t ResumeCurrentJobRequestFunc(MessageContainer* requestContainer);