diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-12-18 09:00:24 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-12-18 09:00:24 +0200 |
| commit | 1b92f30f6dfa27392ffd8460ebeb17c17550db7b (patch) | |
| tree | 5bfafc883cbed960766b4455f024f208f1f76375 /Software/Embedded_SW | |
| parent | e1ef835095c9a6f98c8b15fedc585e2caf77ecd6 (diff) | |
| download | Tango-1b92f30f6dfa27392ffd8460ebeb17c17550db7b.tar.gz Tango-1b92f30f6dfa27392ffd8460ebeb17c17550db7b.zip | |
version 1.4.6.1 PMR: thread load and power down reporting. fix USB driver large files bug. ids pressure relief. some looking into the thread load sequence
Diffstat (limited to 'Software/Embedded_SW')
51 files changed, 2027 insertions, 510 deletions
diff --git a/Software/Embedded_SW/Embedded/.cproject b/Software/Embedded_SW/Embedded/.cproject index b1d8a3283..7463c7147 100644 --- a/Software/Embedded_SW/Embedded/.cproject +++ b/Software/Embedded_SW/Embedded/.cproject @@ -170,7 +170,7 @@ </toolChain> </folderInfo> <sourceEntries> - <entry excluding="Drivers/I2C_Communication/Head_Card/ADC/Head_ADC_old.c|Drivers/I2C_Communication/WHS_Card/IO_Ports_TCA9555|Drivers/I2C_Communication/WHS_Card/PT100|src|EmbParam.cfg" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> + <entry excluding="Drivers/I2C_Communication/Head_Card/ADC/Head_ADC_old.c|Drivers/I2C_Communication/WHS_Card|Drivers/I2C_Communication/WHS_Card/PT100|src|EmbParam.cfg" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> </sourceEntries> </configuration> </storageModule> @@ -288,7 +288,7 @@ </extensions> </storageModule> <storageModule moduleId="cdtBuildSystem" version="4.0.0"> - <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="builds also the PMR" errorParsers="org.eclipse.rtsc.xdctools.parsers.ErrorParser;com.ti.ccstudio.errorparser.CoffErrorParser;com.ti.ccstudio.errorparser.LinkErrorParser;com.ti.ccstudio.errorparser.AsmErrorParser;org.eclipse.cdt.core.GmakeErrorParser" id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.87225697.838615887" name="debug_w_pmr" parent="com.ti.ccstudio.buildDefinitions.TMS470.Debug" postbuildStep=""${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/armofd" "${CG_TOOL_ROOT}/bin/armhex" "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin";" prebuildStep=""../../../Visual_Studio/Build/Debug/proto-tc.exe" -i ../../../PMR/Messages -o ../Communication/PMR -l C -c"Common,Connection,Diagnostics,Hardware,Printing,Debugging,Stubs,IO,FirmwareUpgrade,EmbeddedParameters,MachineStatus";"> + <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="builds also the PMR" errorParsers="org.eclipse.rtsc.xdctools.parsers.ErrorParser;com.ti.ccstudio.errorparser.CoffErrorParser;com.ti.ccstudio.errorparser.LinkErrorParser;com.ti.ccstudio.errorparser.AsmErrorParser;org.eclipse.cdt.core.GmakeErrorParser" id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.87225697.838615887" name="debug_w_pmr" parent="com.ti.ccstudio.buildDefinitions.TMS470.Debug" postbuildStep=""${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/armofd" "${CG_TOOL_ROOT}/bin/armhex" "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin";" prebuildStep=""../../../Visual_Studio/Build/Debug/proto-tc.exe" -i ../../../PMR/Messages -o ../Communication/PMR -l C -c"Common,Connection,Diagnostics,Hardware,Printing,Debugging,Stubs,IO,FirmwareUpgrade,EmbeddedParameters,MachineStatus,Power,ThreadLoading";"> <folderInfo id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.87225697.838615887." name="/" resourcePath=""> <toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_16.9.exe.DebugToolchain.374121404" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.TMS470_16.9.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.TMS470_16.9.exe.linkerDebug.2015775392"> <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1715586318" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList"> diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c index b23b4361b..d7592ccba 100644 --- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c +++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c @@ -49,7 +49,7 @@ FIL *UploadFileHandle = 0; //the system supports a single active file FIL *DownloadFileHandle = 0; //the system supports a single active file char FileHandleChar[5]; char ErrorMsg[100]; -#define MAX_CHUNK_LENGTH 3500 +#define MAX_CHUNK_LENGTH 5500 int32_t FileLength = 0; int32_t FileReceivedLength = 0; int32_t FileSentLength = 0; @@ -158,14 +158,16 @@ uint32_t FileChunkUploadRequestFunc(MessageContainer* requestContainer) FIL *ReceivedFileHandle; //the system supports a single active file + uint32_t save_milisec = 0; // if (request->uploadid == 1) ReceivedFileHandle = UploadFileHandle; // memcpy (&ReceivedFileHandle,request->uploadid,sizeof(ReceivedFileHandle)); //if (ReceivedFileHandle == FileHandle) //{ - Control_WD(ENABLE,55); //activate heaters/dispenser watchdog, 0.5 seconds - GeneralHwReady = false; + //Control_WD(ENABLE,55); //activate heaters/dispenser watchdog, 0.5 seconds + //GeneralHwReady = false; KeepAliveOneSecondCounter = 0; + save_milisec = msec_millisecondCounter; Fresult = f_write(ReceivedFileHandle,request->buffer.data,request->buffer.len,&WrittenBytes ); lFresult = Fresult; if(Fresult != FR_OK) @@ -176,7 +178,7 @@ uint32_t FileChunkUploadRequestFunc(MessageContainer* requestContainer) else { FileReceivedLength += WrittenBytes; - ReportWithPackageFilter(CommFilter,"Chunk received", __FILE__,WrittenBytes,FileReceivedLength, RpMessage,msec_millisecondCounter, 0); + ReportWithPackageFilter(CommFilter,"Chunk received", __FILE__,WrittenBytes,FileReceivedLength, RpMessage,msec_millisecondCounter-save_milisec, 0); //REPORT_MSG (FileReceivedLength,"file upload chunk"); if (FileReceivedLength == FileLength) @@ -226,12 +228,25 @@ uint32_t FileChunkUploadRequestFunc(MessageContainer* requestContainer) if (FileDone == true) { Task_setPri(CommRxTaskHandle, 9); - GeneralHwReady = true; Semaphore_post(FFS_Sem); //Report("Task_setPri", __FILE__, __LINE__, 9, RpWarning, (int)CommRxTaskHandle, 0); } return OK; } +void FileChunkUploadError(void) +{ + if (FileDone == false) + { + REPORT_MSG (FileReceivedLength,"file upload too much data!"); + f_close(UploadFileHandle); + my_free (UploadFileHandle); + UploadFileHandle = 0; + FileReceivedLength = 0; + FileDone = true; + Task_setPri(CommRxTaskHandle, 9); + Semaphore_post(FFS_Sem); + } +} uint32_t FileDownloadRequestFunc(MessageContainer* requestContainer) { //uint32_t status = OK; diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.h b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.h index 0f6fd9d5d..d32788c8b 100644 --- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.h +++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.h @@ -22,6 +22,8 @@ uint32_t GetFilesRequestFunc(MessageContainer* requestContainer); uint32_t FileDownloadRequestFunc(MessageContainer* requestContainer); uint32_t FileChunkDownloadRequestFunc(MessageContainer* requestContainer); +void FileChunkUploadError(void); + FRESULT FileWrite(void * buffer, uint16_t size,char *path, uint32_t timeout); FRESULT FileRead(char *path, uint32_t *Size, void **Buffer); FRESULT FileOpen(char *path, uint32_t *Size, FIL *FileHandle); diff --git a/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c b/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c index e9a785727..de10a4c99 100644 --- a/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c +++ b/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c @@ -36,25 +36,37 @@ struct serialBuffer { } typedef SerialBuffer; #define SHORT_BUFFER_SIZE 200 char CommShortRxBuffer[10][SHORT_BUFFER_SIZE]; -char CommRxBuffer[COMM_MAX_BUFFER_SIZE]; -SerialBuffer inBuffer[11]; -bool SerialBufferUsed[11] = {false,false,false,false,false,false,false,false,false,false,false}; +char CommRxBuffer[2][COMM_MAX_BUFFER_SIZE]; +SerialBuffer inBuffer[12]; +bool SerialBufferUsed[12] = {false,false,false,false,false,false,false,false,false,false,false,false}; uint32_t initArray(size_t initialSize) { if (initialSize >= COMM_MAX_BUFFER_SIZE) return 0xFF; if (initialSize > SHORT_BUFFER_SIZE) { - if (SerialBufferUsed[10] == true) + if ((SerialBufferUsed[10] == true)&&(SerialBufferUsed[11] == true)) { return 0xFF; } else { - SerialBufferUsed[10] = true; - inBuffer[10].buffer = CommRxBuffer; - inBuffer[10].used = 0; - inBuffer[10].size = initialSize; - return 10; + if (SerialBufferUsed[10] == false) + { + SerialBufferUsed[10] = true; + inBuffer[10].buffer = CommRxBuffer; + inBuffer[10].used = 0; + inBuffer[10].size = initialSize; + return 10; + } + else if (SerialBufferUsed[11] == false) + { + SerialBufferUsed[11] = true; + inBuffer[11].buffer = CommRxBuffer; + inBuffer[11].used = 0; + inBuffer[11].size = initialSize; + return 11; + } + else return 0xFF; } } else @@ -82,13 +94,18 @@ uint32_t initArray(size_t initialSize) return initialSize;*/ } -void insertArray(uint32_t buffer,char element) +bool insertArray(uint32_t buffer,char element) { - assert(buffer<11); + if (buffer>=12) + { + LOG_ERROR(buffer,"insertArray"); + return false; + } SerialBuffer *a = &inBuffer[buffer]; // a->used is the number of used entries, because a->array[a->used++] updates a->used only *after* the array has been accessed. // Therefore a->used can go up to a->size a->buffer[a->used++] = element; + return true; } void freeArray(uint32_t buffer) diff --git a/Software/Embedded_SW/Embedded/Communication/CommunicationTask.h b/Software/Embedded_SW/Embedded/Communication/CommunicationTask.h index 09278580c..d3d4a292c 100644 --- a/Software/Embedded_SW/Embedded/Communication/CommunicationTask.h +++ b/Software/Embedded_SW/Embedded/Communication/CommunicationTask.h @@ -13,7 +13,7 @@ void RegisterReceiveCallback(void (*callback_ptr)(char* buffer, size_t length)); uint32_t initArray( size_t initialSize); -void insertArray(uint32_t buffer, char element); +bool insertArray(uint32_t buffer, char element); void freeArray(uint32_t buffer); diff --git a/Software/Embedded_SW/Embedded/Communication/Container.c b/Software/Embedded_SW/Embedded/Communication/Container.c index 8cc4d883f..220a83110 100644 --- a/Software/Embedded_SW/Embedded/Communication/Container.c +++ b/Software/Embedded_SW/Embedded/Communication/Container.c @@ -47,6 +47,8 @@ #include "StateMachines/Printing/PrintingSTM.h" #include "StateMachines/Initialization/PowerIdle.h" +#include "StateMachines/Initialization/PowerOffSequence.h" + #include "Common/report/report.h" #include "Connection.h" #include "Modules/IFS/ifs.h" @@ -456,6 +458,18 @@ void receive_callback(char* buffer, size_t length) case MESSAGE_TYPE__StopMachineStatusUpdateRequest: StopMachineUpdateFunc(requestContainer); break; + case MESSAGE_TYPE__StartPowerDownRequest: + PowerDownUpdateFunc(requestContainer); + break; + case MESSAGE_TYPE__AbortPowerDownRequest: + AbortPowerDownFunc(requestContainer); + break; + case MESSAGE_TYPE__StartThreadLoadingRequest: + StartThreadLoadingFunc(requestContainer); + break; + case MESSAGE_TYPE__ContinueThreadLoadingRequest: + ContinueThreadLoadingFunc(requestContainer); + break; default: //unsupported message type !! LOG_ERROR (requestContainer->type,"unsupported message type"); diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c index aae3b8d5e..11b3ec7b2 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c @@ -7,7 +7,7 @@ #endif #include "MessageType.pb-c.h" -static const ProtobufCEnumValue message_type__enum_values_by_number[229] = +static const ProtobufCEnumValue message_type__enum_values_by_number[237] = { { "None", "MESSAGE_TYPE__None", 0 }, { "ErrorResponse", "MESSAGE_TYPE__ErrorResponse", 1 }, @@ -238,14 +238,24 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[229] = { "StartMachineStatusUpdateResponse", "MESSAGE_TYPE__StartMachineStatusUpdateResponse", 9001 }, { "StopMachineStatusUpdateRequest", "MESSAGE_TYPE__StopMachineStatusUpdateRequest", 9002 }, { "StopMachineStatusUpdateResponse", "MESSAGE_TYPE__StopMachineStatusUpdateResponse", 9003 }, + { "StartPowerDownRequest", "MESSAGE_TYPE__StartPowerDownRequest", 10000 }, + { "StartPowerDownResponse", "MESSAGE_TYPE__StartPowerDownResponse", 10001 }, + { "AbortPowerDownRequest", "MESSAGE_TYPE__AbortPowerDownRequest", 10002 }, + { "AbortPowerDownResponse", "MESSAGE_TYPE__AbortPowerDownResponse", 10003 }, + { "StartThreadLoadingRequest", "MESSAGE_TYPE__StartThreadLoadingRequest", 11000 }, + { "StartThreadLoadingResponse", "MESSAGE_TYPE__StartThreadLoadingResponse", 11001 }, + { "ContinueThreadLoadingRequest", "MESSAGE_TYPE__ContinueThreadLoadingRequest", 11002 }, + { "ContinueThreadLoadingResponse", "MESSAGE_TYPE__ContinueThreadLoadingResponse", 11003 }, }; static const ProtobufCIntRange message_type__value_ranges[] = { -{0, 0},{3, 2},{1000, 104},{2000, 121},{3000, 167},{4000, 177},{5000, 185},{6000, 189},{7000, 195},{8000, 219},{9000, 225},{0, 229} +{0, 0},{3, 2},{1000, 104},{2000, 121},{3000, 167},{4000, 177},{5000, 185},{6000, 189},{7000, 195},{8000, 219},{9000, 225},{10000, 229},{11000, 233},{0, 237} }; -static const ProtobufCEnumValueIndex message_type__enum_values_by_name[229] = +static const ProtobufCEnumValueIndex message_type__enum_values_by_name[237] = { { "AbortJobRequest", 169 }, { "AbortJobResponse", 170 }, + { "AbortPowerDownRequest", 231 }, + { "AbortPowerDownResponse", 232 }, { "ActivateVersionRequest", 217 }, { "ActivateVersionResponse", 218 }, { "CalculateRequest", 2 }, @@ -256,6 +266,8 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[229] = { "ColorProfileResponse", 118 }, { "ConnectRequest", 191 }, { "ConnectResponse", 192 }, + { "ContinueThreadLoadingRequest", 235 }, + { "ContinueThreadLoadingResponse", 236 }, { "CreateRequest", 203 }, { "CreateResponse", 204 }, { "CurrentJobRequest", 173 }, @@ -349,6 +361,10 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[229] = { "StartEventsNotificationResponse", 152 }, { "StartMachineStatusUpdateRequest", 225 }, { "StartMachineStatusUpdateResponse", 226 }, + { "StartPowerDownRequest", 229 }, + { "StartPowerDownResponse", 230 }, + { "StartThreadLoadingRequest", 233 }, + { "StartThreadLoadingResponse", 234 }, { "StopApplicationLogsRequest", 115 }, { "StopApplicationLogsResponse", 116 }, { "StopCartridgesUpdateRequest", 163 }, @@ -481,11 +497,11 @@ const ProtobufCEnumDescriptor message_type__descriptor = "MessageType", "MessageType", "", - 229, + 237, message_type__enum_values_by_number, - 229, + 237, message_type__enum_values_by_name, - 11, + 13, message_type__value_ranges, NULL,NULL,NULL,NULL /* reserved[1234] */ }; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h index 7cb8306df..1989c473a 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h @@ -248,7 +248,15 @@ typedef enum _MessageType { MESSAGE_TYPE__StartMachineStatusUpdateRequest = 9000, MESSAGE_TYPE__StartMachineStatusUpdateResponse = 9001, MESSAGE_TYPE__StopMachineStatusUpdateRequest = 9002, - MESSAGE_TYPE__StopMachineStatusUpdateResponse = 9003 + MESSAGE_TYPE__StopMachineStatusUpdateResponse = 9003, + MESSAGE_TYPE__StartPowerDownRequest = 10000, + MESSAGE_TYPE__StartPowerDownResponse = 10001, + MESSAGE_TYPE__AbortPowerDownRequest = 10002, + MESSAGE_TYPE__AbortPowerDownResponse = 10003, + MESSAGE_TYPE__StartThreadLoadingRequest = 11000, + MESSAGE_TYPE__StartThreadLoadingResponse = 11001, + MESSAGE_TYPE__ContinueThreadLoadingRequest = 11002, + MESSAGE_TYPE__ContinueThreadLoadingResponse = 11003 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(MESSAGE_TYPE) } MessageType; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartThreadLoadingUpdateRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartThreadLoadingUpdateRequest.pb-c.c deleted file mode 100644 index 2809668e3..000000000 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartThreadLoadingUpdateRequest.pb-c.c +++ /dev/null @@ -1,72 +0,0 @@ -/* Generated by the protocol buffer compiler. DO NOT EDIT! */ -/* Generated from: StartThreadLoadingUpdateRequest.proto */ - -/* Do not generate deprecated warnings for self */ -#ifndef PROTOBUF_C__NO_DEPRECATED -#define PROTOBUF_C__NO_DEPRECATED -#endif - -#include "StartThreadLoadingUpdateRequest.pb-c.h" -void start_thread_loading_update_request__init - (StartThreadLoadingUpdateRequest *message) -{ - static const StartThreadLoadingUpdateRequest init_value = START_THREAD_LOADING_UPDATE_REQUEST__INIT; - *message = init_value; -} -size_t start_thread_loading_update_request__get_packed_size - (const StartThreadLoadingUpdateRequest *message) -{ - assert(message->base.descriptor == &start_thread_loading_update_request__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t start_thread_loading_update_request__pack - (const StartThreadLoadingUpdateRequest *message, - uint8_t *out) -{ - assert(message->base.descriptor == &start_thread_loading_update_request__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t start_thread_loading_update_request__pack_to_buffer - (const StartThreadLoadingUpdateRequest *message, - ProtobufCBuffer *buffer) -{ - assert(message->base.descriptor == &start_thread_loading_update_request__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -StartThreadLoadingUpdateRequest * - start_thread_loading_update_request__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (StartThreadLoadingUpdateRequest *) - protobuf_c_message_unpack (&start_thread_loading_update_request__descriptor, - allocator, len, data); -} -void start_thread_loading_update_request__free_unpacked - (StartThreadLoadingUpdateRequest *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->base.descriptor == &start_thread_loading_update_request__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -#define start_thread_loading_update_request__field_descriptors NULL -#define start_thread_loading_update_request__field_indices_by_name NULL -#define start_thread_loading_update_request__number_ranges NULL -const ProtobufCMessageDescriptor start_thread_loading_update_request__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "StartThreadLoadingUpdateRequest", - "StartThreadLoadingUpdateRequest", - "StartThreadLoadingUpdateRequest", - "", - sizeof(StartThreadLoadingUpdateRequest), - 0, - start_thread_loading_update_request__field_descriptors, - start_thread_loading_update_request__field_indices_by_name, - 0, start_thread_loading_update_request__number_ranges, - (ProtobufCMessageInit) start_thread_loading_update_request__init, - NULL,NULL,NULL /* reserved[123] */ -}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartThreadLoadingUpdateRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartThreadLoadingUpdateRequest.pb-c.h deleted file mode 100644 index 1ba64b8c1..000000000 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartThreadLoadingUpdateRequest.pb-c.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Generated by the protocol buffer compiler. DO NOT EDIT! */ -/* Generated from: StartThreadLoadingUpdateRequest.proto */ - -#ifndef PROTOBUF_C_StartThreadLoadingUpdateRequest_2eproto__INCLUDED -#define PROTOBUF_C_StartThreadLoadingUpdateRequest_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 _StartThreadLoadingUpdateRequest StartThreadLoadingUpdateRequest; - - -/* --- enums --- */ - - -/* --- messages --- */ - -struct _StartThreadLoadingUpdateRequest -{ - ProtobufCMessage base; -}; -#define START_THREAD_LOADING_UPDATE_REQUEST__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&start_thread_loading_update_request__descriptor) \ - } - - -/* StartThreadLoadingUpdateRequest methods */ -void start_thread_loading_update_request__init - (StartThreadLoadingUpdateRequest *message); -size_t start_thread_loading_update_request__get_packed_size - (const StartThreadLoadingUpdateRequest *message); -size_t start_thread_loading_update_request__pack - (const StartThreadLoadingUpdateRequest *message, - uint8_t *out); -size_t start_thread_loading_update_request__pack_to_buffer - (const StartThreadLoadingUpdateRequest *message, - ProtobufCBuffer *buffer); -StartThreadLoadingUpdateRequest * - start_thread_loading_update_request__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void start_thread_loading_update_request__free_unpacked - (StartThreadLoadingUpdateRequest *message, - ProtobufCAllocator *allocator); -/* --- per-message closures --- */ - -typedef void (*StartThreadLoadingUpdateRequest_Closure) - (const StartThreadLoadingUpdateRequest *message, - void *closure_data); - -/* --- services --- */ - - -/* --- descriptors --- */ - -extern const ProtobufCMessageDescriptor start_thread_loading_update_request__descriptor; - -PROTOBUF_C__END_DECLS - - -#endif /* PROTOBUF_C_StartThreadLoadingUpdateRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartThreadLoadingUpdateResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartThreadLoadingUpdateResponse.pb-c.c deleted file mode 100644 index b7e1c9346..000000000 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartThreadLoadingUpdateResponse.pb-c.c +++ /dev/null @@ -1,92 +0,0 @@ -/* Generated by the protocol buffer compiler. DO NOT EDIT! */ -/* Generated from: StartThreadLoadingUpdateResponse.proto */ - -/* Do not generate deprecated warnings for self */ -#ifndef PROTOBUF_C__NO_DEPRECATED -#define PROTOBUF_C__NO_DEPRECATED -#endif - -#include "StartThreadLoadingUpdateResponse.pb-c.h" -void start_thread_loading_update_response__init - (StartThreadLoadingUpdateResponse *message) -{ - static const StartThreadLoadingUpdateResponse init_value = START_THREAD_LOADING_UPDATE_RESPONSE__INIT; - *message = init_value; -} -size_t start_thread_loading_update_response__get_packed_size - (const StartThreadLoadingUpdateResponse *message) -{ - assert(message->base.descriptor == &start_thread_loading_update_response__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t start_thread_loading_update_response__pack - (const StartThreadLoadingUpdateResponse *message, - uint8_t *out) -{ - assert(message->base.descriptor == &start_thread_loading_update_response__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t start_thread_loading_update_response__pack_to_buffer - (const StartThreadLoadingUpdateResponse *message, - ProtobufCBuffer *buffer) -{ - assert(message->base.descriptor == &start_thread_loading_update_response__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -StartThreadLoadingUpdateResponse * - start_thread_loading_update_response__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (StartThreadLoadingUpdateResponse *) - protobuf_c_message_unpack (&start_thread_loading_update_response__descriptor, - allocator, len, data); -} -void start_thread_loading_update_response__free_unpacked - (StartThreadLoadingUpdateResponse *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->base.descriptor == &start_thread_loading_update_response__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -static const ProtobufCFieldDescriptor start_thread_loading_update_response__field_descriptors[1] = -{ - { - "ThreadLoadingState", - 1, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_ENUM, - offsetof(StartThreadLoadingUpdateResponse, has_threadloadingstate), - offsetof(StartThreadLoadingUpdateResponse, threadloadingstate), - &thread_loading_state__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned start_thread_loading_update_response__field_indices_by_name[] = { - 0, /* field[0] = ThreadLoadingState */ -}; -static const ProtobufCIntRange start_thread_loading_update_response__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 1 } -}; -const ProtobufCMessageDescriptor start_thread_loading_update_response__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "StartThreadLoadingUpdateResponse", - "StartThreadLoadingUpdateResponse", - "StartThreadLoadingUpdateResponse", - "", - sizeof(StartThreadLoadingUpdateResponse), - 1, - start_thread_loading_update_response__field_descriptors, - start_thread_loading_update_response__field_indices_by_name, - 1, start_thread_loading_update_response__number_ranges, - (ProtobufCMessageInit) start_thread_loading_update_response__init, - NULL,NULL,NULL /* reserved[123] */ -}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartThreadLoadingUpdateResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartThreadLoadingUpdateResponse.pb-c.h deleted file mode 100644 index 894969b80..000000000 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartThreadLoadingUpdateResponse.pb-c.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Generated by the protocol buffer compiler. DO NOT EDIT! */ -/* Generated from: StartThreadLoadingUpdateResponse.proto */ - -#ifndef PROTOBUF_C_StartThreadLoadingUpdateResponse_2eproto__INCLUDED -#define PROTOBUF_C_StartThreadLoadingUpdateResponse_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 "ThreadLoadingState.pb-c.h" - -typedef struct _StartThreadLoadingUpdateResponse StartThreadLoadingUpdateResponse; - - -/* --- enums --- */ - - -/* --- messages --- */ - -struct _StartThreadLoadingUpdateResponse -{ - ProtobufCMessage base; - protobuf_c_boolean has_threadloadingstate; - ThreadLoadingState threadloadingstate; -}; -#define START_THREAD_LOADING_UPDATE_RESPONSE__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&start_thread_loading_update_response__descriptor) \ - , 0, THREAD_LOADING_STATE__ThreadLoadInit } - - -/* StartThreadLoadingUpdateResponse methods */ -void start_thread_loading_update_response__init - (StartThreadLoadingUpdateResponse *message); -size_t start_thread_loading_update_response__get_packed_size - (const StartThreadLoadingUpdateResponse *message); -size_t start_thread_loading_update_response__pack - (const StartThreadLoadingUpdateResponse *message, - uint8_t *out); -size_t start_thread_loading_update_response__pack_to_buffer - (const StartThreadLoadingUpdateResponse *message, - ProtobufCBuffer *buffer); -StartThreadLoadingUpdateResponse * - start_thread_loading_update_response__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void start_thread_loading_update_response__free_unpacked - (StartThreadLoadingUpdateResponse *message, - ProtobufCAllocator *allocator); -/* --- per-message closures --- */ - -typedef void (*StartThreadLoadingUpdateResponse_Closure) - (const StartThreadLoadingUpdateResponse *message, - void *closure_data); - -/* --- services --- */ - - -/* --- descriptors --- */ - -extern const ProtobufCMessageDescriptor start_thread_loading_update_response__descriptor; - -PROTOBUF_C__END_DECLS - - -#endif /* PROTOBUF_C_StartThreadLoadingUpdateResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ThreadLoadingState.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ThreadLoadingState.pb-c.c deleted file mode 100644 index c193bd981..000000000 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ThreadLoadingState.pb-c.c +++ /dev/null @@ -1,63 +0,0 @@ -/* Generated by the protocol buffer compiler. DO NOT EDIT! */ -/* Generated from: ThreadLoadingState.proto */ - -/* Do not generate deprecated warnings for self */ -#ifndef PROTOBUF_C__NO_DEPRECATED -#define PROTOBUF_C__NO_DEPRECATED -#endif - -#include "ThreadLoadingState.pb-c.h" -static const ProtobufCEnumValue thread_loading_state__enum_values_by_number[15] = -{ - { "ThreadLoadInit", "THREAD_LOADING_STATE__ThreadLoadInit", 0 }, - { "ThreadLoadReduceHeat", "THREAD_LOADING_STATE__ThreadLoadReduceHeat", 1 }, - { "ThreadLoadSetLoadArmToStartPosition", "THREAD_LOADING_STATE__ThreadLoadSetLoadArmToStartPosition", 2 }, - { "ThreadLoadOpenCovers", "THREAD_LOADING_STATE__ThreadLoadOpenCovers", 3 }, - { "ThreadLoadLiftDancers", "THREAD_LOADING_STATE__ThreadLoadLiftDancers", 4 }, - { "ThreadLoadLiftRockers", "THREAD_LOADING_STATE__ThreadLoadLiftRockers", 5 }, - { "ThreadLoadInitialTension", "THREAD_LOADING_STATE__ThreadLoadInitialTension", 6 }, - { "ThreadLoadCloseRockers", "THREAD_LOADING_STATE__ThreadLoadCloseRockers", 7 }, - { "ThreadLoadCloseDancers", "THREAD_LOADING_STATE__ThreadLoadCloseDancers", 8 }, - { "ThreadLoadCloseLids", "THREAD_LOADING_STATE__ThreadLoadCloseLids", 9 }, - { "ThreadLoadJogFeederToMiddlePoint", "THREAD_LOADING_STATE__ThreadLoadJogFeederToMiddlePoint", 10 }, - { "ThreadLoadDryerLoading", "THREAD_LOADING_STATE__ThreadLoadDryerLoading", 11 }, - { "ThreadLoadResumeHeating", "THREAD_LOADING_STATE__ThreadLoadResumeHeating", 12 }, - { "ThreadLoadJogThread", "THREAD_LOADING_STATE__ThreadLoadJogThread", 13 }, - { "ThreadLoadEnd", "THREAD_LOADING_STATE__ThreadLoadEnd", 14 }, -}; -static const ProtobufCIntRange thread_loading_state__value_ranges[] = { -{0, 0},{0, 15} -}; -static const ProtobufCEnumValueIndex thread_loading_state__enum_values_by_name[15] = -{ - { "ThreadLoadCloseDancers", 8 }, - { "ThreadLoadCloseLids", 9 }, - { "ThreadLoadCloseRockers", 7 }, - { "ThreadLoadDryerLoading", 11 }, - { "ThreadLoadEnd", 14 }, - { "ThreadLoadInit", 0 }, - { "ThreadLoadInitialTension", 6 }, - { "ThreadLoadJogFeederToMiddlePoint", 10 }, - { "ThreadLoadJogThread", 13 }, - { "ThreadLoadLiftDancers", 4 }, - { "ThreadLoadLiftRockers", 5 }, - { "ThreadLoadOpenCovers", 3 }, - { "ThreadLoadReduceHeat", 1 }, - { "ThreadLoadResumeHeating", 12 }, - { "ThreadLoadSetLoadArmToStartPosition", 2 }, -}; -const ProtobufCEnumDescriptor thread_loading_state__descriptor = -{ - PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, - "ThreadLoadingState", - "ThreadLoadingState", - "ThreadLoadingState", - "", - 15, - thread_loading_state__enum_values_by_number, - 15, - thread_loading_state__enum_values_by_name, - 1, - thread_loading_state__value_ranges, - NULL,NULL,NULL,NULL /* reserved[1234] */ -}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/FirmwareUpgrade/VersionFileDescriptor.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/FirmwareUpgrade/VersionFileDescriptor.pb-c.c index 53b9f5bfd..b72c0158e 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/FirmwareUpgrade/VersionFileDescriptor.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/FirmwareUpgrade/VersionFileDescriptor.pb-c.c @@ -52,7 +52,7 @@ void version_file_descriptor__free_unpacked 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] = +static const ProtobufCFieldDescriptor version_file_descriptor__field_descriptors[3] = { { "FileName", @@ -90,21 +90,8 @@ static const ProtobufCFieldDescriptor version_file_descriptor__field_descriptors 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 */ @@ -112,7 +99,7 @@ static const unsigned version_file_descriptor__field_indices_by_name[] = { static const ProtobufCIntRange version_file_descriptor__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 4 } + { 0, 3 } }; const ProtobufCMessageDescriptor version_file_descriptor__descriptor = { @@ -122,7 +109,7 @@ const ProtobufCMessageDescriptor version_file_descriptor__descriptor = "VersionFileDescriptor", "", sizeof(VersionFileDescriptor), - 4, + 3, version_file_descriptor__field_descriptors, version_file_descriptor__field_indices_by_name, 1, version_file_descriptor__number_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/FirmwareUpgrade/VersionFileDescriptor.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/FirmwareUpgrade/VersionFileDescriptor.pb-c.h index 692dc6722..4df201097 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/FirmwareUpgrade/VersionFileDescriptor.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/FirmwareUpgrade/VersionFileDescriptor.pb-c.h @@ -31,12 +31,10 @@ struct _VersionFileDescriptor 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} } + , NULL, NULL, 0, VERSION_FILE_DESTINATION__MCU } /* VersionFileDescriptor methods */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Power/AbortPowerDownRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Power/AbortPowerDownRequest.pb-c.c new file mode 100644 index 000000000..f5cd92cd6 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Power/AbortPowerDownRequest.pb-c.c @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: AbortPowerDownRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "AbortPowerDownRequest.pb-c.h" +void abort_power_down_request__init + (AbortPowerDownRequest *message) +{ + static const AbortPowerDownRequest init_value = ABORT_POWER_DOWN_REQUEST__INIT; + *message = init_value; +} +size_t abort_power_down_request__get_packed_size + (const AbortPowerDownRequest *message) +{ + assert(message->base.descriptor == &abort_power_down_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t abort_power_down_request__pack + (const AbortPowerDownRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &abort_power_down_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t abort_power_down_request__pack_to_buffer + (const AbortPowerDownRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &abort_power_down_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +AbortPowerDownRequest * + abort_power_down_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (AbortPowerDownRequest *) + protobuf_c_message_unpack (&abort_power_down_request__descriptor, + allocator, len, data); +} +void abort_power_down_request__free_unpacked + (AbortPowerDownRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &abort_power_down_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +#define abort_power_down_request__field_descriptors NULL +#define abort_power_down_request__field_indices_by_name NULL +#define abort_power_down_request__number_ranges NULL +const ProtobufCMessageDescriptor abort_power_down_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "AbortPowerDownRequest", + "AbortPowerDownRequest", + "AbortPowerDownRequest", + "", + sizeof(AbortPowerDownRequest), + 0, + abort_power_down_request__field_descriptors, + abort_power_down_request__field_indices_by_name, + 0, abort_power_down_request__number_ranges, + (ProtobufCMessageInit) abort_power_down_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Power/AbortPowerDownRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Power/AbortPowerDownRequest.pb-c.h new file mode 100644 index 000000000..d7d8f7c20 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Power/AbortPowerDownRequest.pb-c.h @@ -0,0 +1,70 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: AbortPowerDownRequest.proto */ + +#ifndef PROTOBUF_C_AbortPowerDownRequest_2eproto__INCLUDED +#define PROTOBUF_C_AbortPowerDownRequest_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 _AbortPowerDownRequest AbortPowerDownRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _AbortPowerDownRequest +{ + ProtobufCMessage base; +}; +#define ABORT_POWER_DOWN_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&abort_power_down_request__descriptor) \ + } + + +/* AbortPowerDownRequest methods */ +void abort_power_down_request__init + (AbortPowerDownRequest *message); +size_t abort_power_down_request__get_packed_size + (const AbortPowerDownRequest *message); +size_t abort_power_down_request__pack + (const AbortPowerDownRequest *message, + uint8_t *out); +size_t abort_power_down_request__pack_to_buffer + (const AbortPowerDownRequest *message, + ProtobufCBuffer *buffer); +AbortPowerDownRequest * + abort_power_down_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void abort_power_down_request__free_unpacked + (AbortPowerDownRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*AbortPowerDownRequest_Closure) + (const AbortPowerDownRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor abort_power_down_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_AbortPowerDownRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Power/AbortPowerDownResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Power/AbortPowerDownResponse.pb-c.c new file mode 100644 index 000000000..f14d3b4fa --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Power/AbortPowerDownResponse.pb-c.c @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: AbortPowerDownResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "AbortPowerDownResponse.pb-c.h" +void abort_power_down_response__init + (AbortPowerDownResponse *message) +{ + static const AbortPowerDownResponse init_value = ABORT_POWER_DOWN_RESPONSE__INIT; + *message = init_value; +} +size_t abort_power_down_response__get_packed_size + (const AbortPowerDownResponse *message) +{ + assert(message->base.descriptor == &abort_power_down_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t abort_power_down_response__pack + (const AbortPowerDownResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &abort_power_down_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t abort_power_down_response__pack_to_buffer + (const AbortPowerDownResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &abort_power_down_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +AbortPowerDownResponse * + abort_power_down_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (AbortPowerDownResponse *) + protobuf_c_message_unpack (&abort_power_down_response__descriptor, + allocator, len, data); +} +void abort_power_down_response__free_unpacked + (AbortPowerDownResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &abort_power_down_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +#define abort_power_down_response__field_descriptors NULL +#define abort_power_down_response__field_indices_by_name NULL +#define abort_power_down_response__number_ranges NULL +const ProtobufCMessageDescriptor abort_power_down_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "AbortPowerDownResponse", + "AbortPowerDownResponse", + "AbortPowerDownResponse", + "", + sizeof(AbortPowerDownResponse), + 0, + abort_power_down_response__field_descriptors, + abort_power_down_response__field_indices_by_name, + 0, abort_power_down_response__number_ranges, + (ProtobufCMessageInit) abort_power_down_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Power/AbortPowerDownResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Power/AbortPowerDownResponse.pb-c.h new file mode 100644 index 000000000..3809eb1aa --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Power/AbortPowerDownResponse.pb-c.h @@ -0,0 +1,70 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: AbortPowerDownResponse.proto */ + +#ifndef PROTOBUF_C_AbortPowerDownResponse_2eproto__INCLUDED +#define PROTOBUF_C_AbortPowerDownResponse_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 _AbortPowerDownResponse AbortPowerDownResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _AbortPowerDownResponse +{ + ProtobufCMessage base; +}; +#define ABORT_POWER_DOWN_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&abort_power_down_response__descriptor) \ + } + + +/* AbortPowerDownResponse methods */ +void abort_power_down_response__init + (AbortPowerDownResponse *message); +size_t abort_power_down_response__get_packed_size + (const AbortPowerDownResponse *message); +size_t abort_power_down_response__pack + (const AbortPowerDownResponse *message, + uint8_t *out); +size_t abort_power_down_response__pack_to_buffer + (const AbortPowerDownResponse *message, + ProtobufCBuffer *buffer); +AbortPowerDownResponse * + abort_power_down_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void abort_power_down_response__free_unpacked + (AbortPowerDownResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*AbortPowerDownResponse_Closure) + (const AbortPowerDownResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor abort_power_down_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_AbortPowerDownResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Power/PowerDownState.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Power/PowerDownState.pb-c.c new file mode 100644 index 000000000..4b0b6db1a --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Power/PowerDownState.pb-c.c @@ -0,0 +1,65 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: PowerDownState.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "PowerDownState.pb-c.h" +static const ProtobufCEnumValue power_down_state__enum_values_by_number[16] = +{ + { "None", "POWER_DOWN_STATE__None", 0 }, + { "Init", "POWER_DOWN_STATE__Init", 1 }, + { "StopRunningJob", "POWER_DOWN_STATE__StopRunningJob", 2 }, + { "HeadClean", "POWER_DOWN_STATE__HeadClean", 3 }, + { "MixerFlush", "POWER_DOWN_STATE__MixerFlush", 4 }, + { "HeatersOff", "POWER_DOWN_STATE__HeatersOff", 5 }, + { "StoreData", "POWER_DOWN_STATE__StoreData", 6 }, + { "SetValvePosition", "POWER_DOWN_STATE__SetValvePosition", 7 }, + { "WaitForTemperature", "POWER_DOWN_STATE__WaitForTemperature", 8 }, + { "WaitForProcesses", "POWER_DOWN_STATE__WaitForProcesses", 9 }, + { "TurnOffDryerFan", "POWER_DOWN_STATE__TurnOffDryerFan", 10 }, + { "TurnOffCooler", "POWER_DOWN_STATE__TurnOffCooler", 11 }, + { "TurnOffBlower", "POWER_DOWN_STATE__TurnOffBlower", 12 }, + { "PowerOffCompleted", "POWER_DOWN_STATE__PowerOffCompleted", 13 }, + { "Error", "POWER_DOWN_STATE__Error", 14 }, + { "Cancelled", "POWER_DOWN_STATE__Cancelled", 15 }, +}; +static const ProtobufCIntRange power_down_state__value_ranges[] = { +{0, 0},{0, 16} +}; +static const ProtobufCEnumValueIndex power_down_state__enum_values_by_name[16] = +{ + { "Cancelled", 15 }, + { "Error", 14 }, + { "HeadClean", 3 }, + { "HeatersOff", 5 }, + { "Init", 1 }, + { "MixerFlush", 4 }, + { "None", 0 }, + { "PowerOffCompleted", 13 }, + { "SetValvePosition", 7 }, + { "StopRunningJob", 2 }, + { "StoreData", 6 }, + { "TurnOffBlower", 12 }, + { "TurnOffCooler", 11 }, + { "TurnOffDryerFan", 10 }, + { "WaitForProcesses", 9 }, + { "WaitForTemperature", 8 }, +}; +const ProtobufCEnumDescriptor power_down_state__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "PowerDownState", + "PowerDownState", + "PowerDownState", + "", + 16, + power_down_state__enum_values_by_number, + 16, + power_down_state__enum_values_by_name, + 1, + power_down_state__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Power/PowerDownState.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Power/PowerDownState.pb-c.h new file mode 100644 index 000000000..64a2b75ea --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Power/PowerDownState.pb-c.h @@ -0,0 +1,57 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: PowerDownState.proto */ + +#ifndef PROTOBUF_C_PowerDownState_2eproto__INCLUDED +#define PROTOBUF_C_PowerDownState_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 _PowerDownState { + POWER_DOWN_STATE__None = 0, + POWER_DOWN_STATE__Init = 1, + POWER_DOWN_STATE__StopRunningJob = 2, + POWER_DOWN_STATE__HeadClean = 3, + POWER_DOWN_STATE__MixerFlush = 4, + POWER_DOWN_STATE__HeatersOff = 5, + POWER_DOWN_STATE__StoreData = 6, + POWER_DOWN_STATE__SetValvePosition = 7, + POWER_DOWN_STATE__WaitForTemperature = 8, + POWER_DOWN_STATE__WaitForProcesses = 9, + POWER_DOWN_STATE__TurnOffDryerFan = 10, + POWER_DOWN_STATE__TurnOffCooler = 11, + POWER_DOWN_STATE__TurnOffBlower = 12, + POWER_DOWN_STATE__PowerOffCompleted = 13, + POWER_DOWN_STATE__Error = 14, + POWER_DOWN_STATE__Cancelled = 15 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(POWER_DOWN_STATE) +} PowerDownState; + +/* --- messages --- */ + +/* --- per-message closures --- */ + + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCEnumDescriptor power_down_state__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_PowerDownState_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Power/StartPowerDownRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Power/StartPowerDownRequest.pb-c.c new file mode 100644 index 000000000..eca93874f --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Power/StartPowerDownRequest.pb-c.c @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StartPowerDownRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "StartPowerDownRequest.pb-c.h" +void start_power_down_request__init + (StartPowerDownRequest *message) +{ + static const StartPowerDownRequest init_value = START_POWER_DOWN_REQUEST__INIT; + *message = init_value; +} +size_t start_power_down_request__get_packed_size + (const StartPowerDownRequest *message) +{ + assert(message->base.descriptor == &start_power_down_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t start_power_down_request__pack + (const StartPowerDownRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &start_power_down_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t start_power_down_request__pack_to_buffer + (const StartPowerDownRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &start_power_down_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +StartPowerDownRequest * + start_power_down_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (StartPowerDownRequest *) + protobuf_c_message_unpack (&start_power_down_request__descriptor, + allocator, len, data); +} +void start_power_down_request__free_unpacked + (StartPowerDownRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &start_power_down_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +#define start_power_down_request__field_descriptors NULL +#define start_power_down_request__field_indices_by_name NULL +#define start_power_down_request__number_ranges NULL +const ProtobufCMessageDescriptor start_power_down_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "StartPowerDownRequest", + "StartPowerDownRequest", + "StartPowerDownRequest", + "", + sizeof(StartPowerDownRequest), + 0, + start_power_down_request__field_descriptors, + start_power_down_request__field_indices_by_name, + 0, start_power_down_request__number_ranges, + (ProtobufCMessageInit) start_power_down_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Power/StartPowerDownRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Power/StartPowerDownRequest.pb-c.h new file mode 100644 index 000000000..76b69da50 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Power/StartPowerDownRequest.pb-c.h @@ -0,0 +1,70 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StartPowerDownRequest.proto */ + +#ifndef PROTOBUF_C_StartPowerDownRequest_2eproto__INCLUDED +#define PROTOBUF_C_StartPowerDownRequest_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 _StartPowerDownRequest StartPowerDownRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _StartPowerDownRequest +{ + ProtobufCMessage base; +}; +#define START_POWER_DOWN_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&start_power_down_request__descriptor) \ + } + + +/* StartPowerDownRequest methods */ +void start_power_down_request__init + (StartPowerDownRequest *message); +size_t start_power_down_request__get_packed_size + (const StartPowerDownRequest *message); +size_t start_power_down_request__pack + (const StartPowerDownRequest *message, + uint8_t *out); +size_t start_power_down_request__pack_to_buffer + (const StartPowerDownRequest *message, + ProtobufCBuffer *buffer); +StartPowerDownRequest * + start_power_down_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void start_power_down_request__free_unpacked + (StartPowerDownRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*StartPowerDownRequest_Closure) + (const StartPowerDownRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor start_power_down_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_StartPowerDownRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Power/StartPowerDownResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Power/StartPowerDownResponse.pb-c.c new file mode 100644 index 000000000..c8f69122e --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Power/StartPowerDownResponse.pb-c.c @@ -0,0 +1,118 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StartPowerDownResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "StartPowerDownResponse.pb-c.h" +void start_power_down_response__init + (StartPowerDownResponse *message) +{ + static const StartPowerDownResponse init_value = START_POWER_DOWN_RESPONSE__INIT; + *message = init_value; +} +size_t start_power_down_response__get_packed_size + (const StartPowerDownResponse *message) +{ + assert(message->base.descriptor == &start_power_down_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t start_power_down_response__pack + (const StartPowerDownResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &start_power_down_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t start_power_down_response__pack_to_buffer + (const StartPowerDownResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &start_power_down_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +StartPowerDownResponse * + start_power_down_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (StartPowerDownResponse *) + protobuf_c_message_unpack (&start_power_down_response__descriptor, + allocator, len, data); +} +void start_power_down_response__free_unpacked + (StartPowerDownResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &start_power_down_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor start_power_down_response__field_descriptors[3] = +{ + { + "State", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(StartPowerDownResponse, has_state), + offsetof(StartPowerDownResponse, state), + &power_down_state__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "ProgressPercentage", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(StartPowerDownResponse, has_progresspercentage), + offsetof(StartPowerDownResponse, progresspercentage), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "Message", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(StartPowerDownResponse, message), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned start_power_down_response__field_indices_by_name[] = { + 2, /* field[2] = Message */ + 1, /* field[1] = ProgressPercentage */ + 0, /* field[0] = State */ +}; +static const ProtobufCIntRange start_power_down_response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 3 } +}; +const ProtobufCMessageDescriptor start_power_down_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "StartPowerDownResponse", + "StartPowerDownResponse", + "StartPowerDownResponse", + "", + sizeof(StartPowerDownResponse), + 3, + start_power_down_response__field_descriptors, + start_power_down_response__field_indices_by_name, + 1, start_power_down_response__number_ranges, + (ProtobufCMessageInit) start_power_down_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Power/StartPowerDownResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Power/StartPowerDownResponse.pb-c.h new file mode 100644 index 000000000..d47b4b423 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Power/StartPowerDownResponse.pb-c.h @@ -0,0 +1,76 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StartPowerDownResponse.proto */ + +#ifndef PROTOBUF_C_StartPowerDownResponse_2eproto__INCLUDED +#define PROTOBUF_C_StartPowerDownResponse_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 "PowerDownState.pb-c.h" + +typedef struct _StartPowerDownResponse StartPowerDownResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _StartPowerDownResponse +{ + ProtobufCMessage base; + protobuf_c_boolean has_state; + PowerDownState state; + protobuf_c_boolean has_progresspercentage; + double progresspercentage; + char *message; +}; +#define START_POWER_DOWN_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&start_power_down_response__descriptor) \ + , 0, POWER_DOWN_STATE__None, 0, 0, NULL } + + +/* StartPowerDownResponse methods */ +void start_power_down_response__init + (StartPowerDownResponse *message); +size_t start_power_down_response__get_packed_size + (const StartPowerDownResponse *message); +size_t start_power_down_response__pack + (const StartPowerDownResponse *message, + uint8_t *out); +size_t start_power_down_response__pack_to_buffer + (const StartPowerDownResponse *message, + ProtobufCBuffer *buffer); +StartPowerDownResponse * + start_power_down_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void start_power_down_response__free_unpacked + (StartPowerDownResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*StartPowerDownResponse_Closure) + (const StartPowerDownResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor start_power_down_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_StartPowerDownResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/ContinueThreadLoadingRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/ContinueThreadLoadingRequest.pb-c.c new file mode 100644 index 000000000..2fc811bf7 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/ContinueThreadLoadingRequest.pb-c.c @@ -0,0 +1,92 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: ContinueThreadLoadingRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "ContinueThreadLoadingRequest.pb-c.h" +void continue_thread_loading_request__init + (ContinueThreadLoadingRequest *message) +{ + static const ContinueThreadLoadingRequest init_value = CONTINUE_THREAD_LOADING_REQUEST__INIT; + *message = init_value; +} +size_t continue_thread_loading_request__get_packed_size + (const ContinueThreadLoadingRequest *message) +{ + assert(message->base.descriptor == &continue_thread_loading_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t continue_thread_loading_request__pack + (const ContinueThreadLoadingRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &continue_thread_loading_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t continue_thread_loading_request__pack_to_buffer + (const ContinueThreadLoadingRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &continue_thread_loading_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +ContinueThreadLoadingRequest * + continue_thread_loading_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (ContinueThreadLoadingRequest *) + protobuf_c_message_unpack (&continue_thread_loading_request__descriptor, + allocator, len, data); +} +void continue_thread_loading_request__free_unpacked + (ContinueThreadLoadingRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &continue_thread_loading_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor continue_thread_loading_request__field_descriptors[1] = +{ + { + "ProcessParameters", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(ContinueThreadLoadingRequest, processparameters), + &process_parameters__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned continue_thread_loading_request__field_indices_by_name[] = { + 0, /* field[0] = ProcessParameters */ +}; +static const ProtobufCIntRange continue_thread_loading_request__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor continue_thread_loading_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "ContinueThreadLoadingRequest", + "ContinueThreadLoadingRequest", + "ContinueThreadLoadingRequest", + "", + sizeof(ContinueThreadLoadingRequest), + 1, + continue_thread_loading_request__field_descriptors, + continue_thread_loading_request__field_indices_by_name, + 1, continue_thread_loading_request__number_ranges, + (ProtobufCMessageInit) continue_thread_loading_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/ContinueThreadLoadingRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/ContinueThreadLoadingRequest.pb-c.h new file mode 100644 index 000000000..e37669179 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/ContinueThreadLoadingRequest.pb-c.h @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: ContinueThreadLoadingRequest.proto */ + +#ifndef PROTOBUF_C_ContinueThreadLoadingRequest_2eproto__INCLUDED +#define PROTOBUF_C_ContinueThreadLoadingRequest_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 "ProcessParameters.pb-c.h" + +typedef struct _ContinueThreadLoadingRequest ContinueThreadLoadingRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _ContinueThreadLoadingRequest +{ + ProtobufCMessage base; + ProcessParameters *processparameters; +}; +#define CONTINUE_THREAD_LOADING_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&continue_thread_loading_request__descriptor) \ + , NULL } + + +/* ContinueThreadLoadingRequest methods */ +void continue_thread_loading_request__init + (ContinueThreadLoadingRequest *message); +size_t continue_thread_loading_request__get_packed_size + (const ContinueThreadLoadingRequest *message); +size_t continue_thread_loading_request__pack + (const ContinueThreadLoadingRequest *message, + uint8_t *out); +size_t continue_thread_loading_request__pack_to_buffer + (const ContinueThreadLoadingRequest *message, + ProtobufCBuffer *buffer); +ContinueThreadLoadingRequest * + continue_thread_loading_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void continue_thread_loading_request__free_unpacked + (ContinueThreadLoadingRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*ContinueThreadLoadingRequest_Closure) + (const ContinueThreadLoadingRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor continue_thread_loading_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_ContinueThreadLoadingRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/ContinueThreadLoadingResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/ContinueThreadLoadingResponse.pb-c.c new file mode 100644 index 000000000..aa61cd30e --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/ContinueThreadLoadingResponse.pb-c.c @@ -0,0 +1,105 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: ContinueThreadLoadingResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "ContinueThreadLoadingResponse.pb-c.h" +void continue_thread_loading_response__init + (ContinueThreadLoadingResponse *message) +{ + static const ContinueThreadLoadingResponse init_value = CONTINUE_THREAD_LOADING_RESPONSE__INIT; + *message = init_value; +} +size_t continue_thread_loading_response__get_packed_size + (const ContinueThreadLoadingResponse *message) +{ + assert(message->base.descriptor == &continue_thread_loading_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t continue_thread_loading_response__pack + (const ContinueThreadLoadingResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &continue_thread_loading_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t continue_thread_loading_response__pack_to_buffer + (const ContinueThreadLoadingResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &continue_thread_loading_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +ContinueThreadLoadingResponse * + continue_thread_loading_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (ContinueThreadLoadingResponse *) + protobuf_c_message_unpack (&continue_thread_loading_response__descriptor, + allocator, len, data); +} +void continue_thread_loading_response__free_unpacked + (ContinueThreadLoadingResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &continue_thread_loading_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor continue_thread_loading_response__field_descriptors[2] = +{ + { + "State", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(ContinueThreadLoadingResponse, has_state), + offsetof(ContinueThreadLoadingResponse, state), + &thread_loading_state__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "ErrorReason", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(ContinueThreadLoadingResponse, errorreason), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned continue_thread_loading_response__field_indices_by_name[] = { + 1, /* field[1] = ErrorReason */ + 0, /* field[0] = State */ +}; +static const ProtobufCIntRange continue_thread_loading_response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor continue_thread_loading_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "ContinueThreadLoadingResponse", + "ContinueThreadLoadingResponse", + "ContinueThreadLoadingResponse", + "", + sizeof(ContinueThreadLoadingResponse), + 2, + continue_thread_loading_response__field_descriptors, + continue_thread_loading_response__field_indices_by_name, + 1, continue_thread_loading_response__number_ranges, + (ProtobufCMessageInit) continue_thread_loading_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/ContinueThreadLoadingResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/ContinueThreadLoadingResponse.pb-c.h new file mode 100644 index 000000000..ae83a671f --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/ContinueThreadLoadingResponse.pb-c.h @@ -0,0 +1,74 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: ContinueThreadLoadingResponse.proto */ + +#ifndef PROTOBUF_C_ContinueThreadLoadingResponse_2eproto__INCLUDED +#define PROTOBUF_C_ContinueThreadLoadingResponse_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 "ThreadLoadingState.pb-c.h" + +typedef struct _ContinueThreadLoadingResponse ContinueThreadLoadingResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _ContinueThreadLoadingResponse +{ + ProtobufCMessage base; + protobuf_c_boolean has_state; + ThreadLoadingState state; + char *errorreason; +}; +#define CONTINUE_THREAD_LOADING_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&continue_thread_loading_response__descriptor) \ + , 0, THREAD_LOADING_STATE__None, NULL } + + +/* ContinueThreadLoadingResponse methods */ +void continue_thread_loading_response__init + (ContinueThreadLoadingResponse *message); +size_t continue_thread_loading_response__get_packed_size + (const ContinueThreadLoadingResponse *message); +size_t continue_thread_loading_response__pack + (const ContinueThreadLoadingResponse *message, + uint8_t *out); +size_t continue_thread_loading_response__pack_to_buffer + (const ContinueThreadLoadingResponse *message, + ProtobufCBuffer *buffer); +ContinueThreadLoadingResponse * + continue_thread_loading_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void continue_thread_loading_response__free_unpacked + (ContinueThreadLoadingResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*ContinueThreadLoadingResponse_Closure) + (const ContinueThreadLoadingResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor continue_thread_loading_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_ContinueThreadLoadingResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/StartThreadLoadingRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/StartThreadLoadingRequest.pb-c.c new file mode 100644 index 000000000..505d8e416 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/StartThreadLoadingRequest.pb-c.c @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StartThreadLoadingRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "StartThreadLoadingRequest.pb-c.h" +void start_thread_loading_request__init + (StartThreadLoadingRequest *message) +{ + static const StartThreadLoadingRequest init_value = START_THREAD_LOADING_REQUEST__INIT; + *message = init_value; +} +size_t start_thread_loading_request__get_packed_size + (const StartThreadLoadingRequest *message) +{ + assert(message->base.descriptor == &start_thread_loading_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t start_thread_loading_request__pack + (const StartThreadLoadingRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &start_thread_loading_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t start_thread_loading_request__pack_to_buffer + (const StartThreadLoadingRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &start_thread_loading_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +StartThreadLoadingRequest * + start_thread_loading_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (StartThreadLoadingRequest *) + protobuf_c_message_unpack (&start_thread_loading_request__descriptor, + allocator, len, data); +} +void start_thread_loading_request__free_unpacked + (StartThreadLoadingRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &start_thread_loading_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +#define start_thread_loading_request__field_descriptors NULL +#define start_thread_loading_request__field_indices_by_name NULL +#define start_thread_loading_request__number_ranges NULL +const ProtobufCMessageDescriptor start_thread_loading_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "StartThreadLoadingRequest", + "StartThreadLoadingRequest", + "StartThreadLoadingRequest", + "", + sizeof(StartThreadLoadingRequest), + 0, + start_thread_loading_request__field_descriptors, + start_thread_loading_request__field_indices_by_name, + 0, start_thread_loading_request__number_ranges, + (ProtobufCMessageInit) start_thread_loading_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/StartThreadLoadingRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/StartThreadLoadingRequest.pb-c.h new file mode 100644 index 000000000..a21a7ba7f --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/StartThreadLoadingRequest.pb-c.h @@ -0,0 +1,70 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StartThreadLoadingRequest.proto */ + +#ifndef PROTOBUF_C_StartThreadLoadingRequest_2eproto__INCLUDED +#define PROTOBUF_C_StartThreadLoadingRequest_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 _StartThreadLoadingRequest StartThreadLoadingRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _StartThreadLoadingRequest +{ + ProtobufCMessage base; +}; +#define START_THREAD_LOADING_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&start_thread_loading_request__descriptor) \ + } + + +/* StartThreadLoadingRequest methods */ +void start_thread_loading_request__init + (StartThreadLoadingRequest *message); +size_t start_thread_loading_request__get_packed_size + (const StartThreadLoadingRequest *message); +size_t start_thread_loading_request__pack + (const StartThreadLoadingRequest *message, + uint8_t *out); +size_t start_thread_loading_request__pack_to_buffer + (const StartThreadLoadingRequest *message, + ProtobufCBuffer *buffer); +StartThreadLoadingRequest * + start_thread_loading_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void start_thread_loading_request__free_unpacked + (StartThreadLoadingRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*StartThreadLoadingRequest_Closure) + (const StartThreadLoadingRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor start_thread_loading_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_StartThreadLoadingRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/StartThreadLoadingResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/StartThreadLoadingResponse.pb-c.c new file mode 100644 index 000000000..01a110489 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/StartThreadLoadingResponse.pb-c.c @@ -0,0 +1,105 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StartThreadLoadingResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "StartThreadLoadingResponse.pb-c.h" +void start_thread_loading_response__init + (StartThreadLoadingResponse *message) +{ + static const StartThreadLoadingResponse init_value = START_THREAD_LOADING_RESPONSE__INIT; + *message = init_value; +} +size_t start_thread_loading_response__get_packed_size + (const StartThreadLoadingResponse *message) +{ + assert(message->base.descriptor == &start_thread_loading_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t start_thread_loading_response__pack + (const StartThreadLoadingResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &start_thread_loading_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t start_thread_loading_response__pack_to_buffer + (const StartThreadLoadingResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &start_thread_loading_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +StartThreadLoadingResponse * + start_thread_loading_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (StartThreadLoadingResponse *) + protobuf_c_message_unpack (&start_thread_loading_response__descriptor, + allocator, len, data); +} +void start_thread_loading_response__free_unpacked + (StartThreadLoadingResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &start_thread_loading_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor start_thread_loading_response__field_descriptors[2] = +{ + { + "State", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(StartThreadLoadingResponse, has_state), + offsetof(StartThreadLoadingResponse, state), + &thread_loading_state__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "ErrorReason", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(StartThreadLoadingResponse, errorreason), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned start_thread_loading_response__field_indices_by_name[] = { + 1, /* field[1] = ErrorReason */ + 0, /* field[0] = State */ +}; +static const ProtobufCIntRange start_thread_loading_response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor start_thread_loading_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "StartThreadLoadingResponse", + "StartThreadLoadingResponse", + "StartThreadLoadingResponse", + "", + sizeof(StartThreadLoadingResponse), + 2, + start_thread_loading_response__field_descriptors, + start_thread_loading_response__field_indices_by_name, + 1, start_thread_loading_response__number_ranges, + (ProtobufCMessageInit) start_thread_loading_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/StartThreadLoadingResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/StartThreadLoadingResponse.pb-c.h new file mode 100644 index 000000000..559f04bb9 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/StartThreadLoadingResponse.pb-c.h @@ -0,0 +1,74 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StartThreadLoadingResponse.proto */ + +#ifndef PROTOBUF_C_StartThreadLoadingResponse_2eproto__INCLUDED +#define PROTOBUF_C_StartThreadLoadingResponse_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 "ThreadLoadingState.pb-c.h" + +typedef struct _StartThreadLoadingResponse StartThreadLoadingResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _StartThreadLoadingResponse +{ + ProtobufCMessage base; + protobuf_c_boolean has_state; + ThreadLoadingState state; + char *errorreason; +}; +#define START_THREAD_LOADING_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&start_thread_loading_response__descriptor) \ + , 0, THREAD_LOADING_STATE__None, NULL } + + +/* StartThreadLoadingResponse methods */ +void start_thread_loading_response__init + (StartThreadLoadingResponse *message); +size_t start_thread_loading_response__get_packed_size + (const StartThreadLoadingResponse *message); +size_t start_thread_loading_response__pack + (const StartThreadLoadingResponse *message, + uint8_t *out); +size_t start_thread_loading_response__pack_to_buffer + (const StartThreadLoadingResponse *message, + ProtobufCBuffer *buffer); +StartThreadLoadingResponse * + start_thread_loading_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void start_thread_loading_response__free_unpacked + (StartThreadLoadingResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*StartThreadLoadingResponse_Closure) + (const StartThreadLoadingResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor start_thread_loading_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_StartThreadLoadingResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/ThreadLoadingState.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/ThreadLoadingState.pb-c.c new file mode 100644 index 000000000..bf926cdfa --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/ThreadLoadingState.pb-c.c @@ -0,0 +1,47 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: ThreadLoadingState.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "ThreadLoadingState.pb-c.h" +static const ProtobufCEnumValue thread_loading_state__enum_values_by_number[7] = +{ + { "None", "THREAD_LOADING_STATE__None", 0 }, + { "Preparing", "THREAD_LOADING_STATE__Preparing", 1 }, + { "ReadyForLoading", "THREAD_LOADING_STATE__ReadyForLoading", 2 }, + { "PreparationError", "THREAD_LOADING_STATE__PreparationError", 3 }, + { "Finalizing", "THREAD_LOADING_STATE__Finalizing", 4 }, + { "FinalizationError", "THREAD_LOADING_STATE__FinalizationError", 5 }, + { "Completed", "THREAD_LOADING_STATE__Completed", 6 }, +}; +static const ProtobufCIntRange thread_loading_state__value_ranges[] = { +{0, 0},{0, 7} +}; +static const ProtobufCEnumValueIndex thread_loading_state__enum_values_by_name[7] = +{ + { "Completed", 6 }, + { "FinalizationError", 5 }, + { "Finalizing", 4 }, + { "None", 0 }, + { "PreparationError", 3 }, + { "Preparing", 1 }, + { "ReadyForLoading", 2 }, +}; +const ProtobufCEnumDescriptor thread_loading_state__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "ThreadLoadingState", + "ThreadLoadingState", + "ThreadLoadingState", + "", + 7, + thread_loading_state__enum_values_by_number, + 7, + thread_loading_state__enum_values_by_name, + 1, + thread_loading_state__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ThreadLoadingState.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/ThreadLoadingState.pb-c.h index d9ae6b614..4a08ce913 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ThreadLoadingState.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/ThreadLoadingState.pb-c.h @@ -20,21 +20,13 @@ PROTOBUF_C__BEGIN_DECLS /* --- enums --- */ typedef enum _ThreadLoadingState { - THREAD_LOADING_STATE__ThreadLoadInit = 0, - THREAD_LOADING_STATE__ThreadLoadReduceHeat = 1, - THREAD_LOADING_STATE__ThreadLoadSetLoadArmToStartPosition = 2, - THREAD_LOADING_STATE__ThreadLoadOpenCovers = 3, - THREAD_LOADING_STATE__ThreadLoadLiftDancers = 4, - THREAD_LOADING_STATE__ThreadLoadLiftRockers = 5, - THREAD_LOADING_STATE__ThreadLoadInitialTension = 6, - THREAD_LOADING_STATE__ThreadLoadCloseRockers = 7, - THREAD_LOADING_STATE__ThreadLoadCloseDancers = 8, - THREAD_LOADING_STATE__ThreadLoadCloseLids = 9, - THREAD_LOADING_STATE__ThreadLoadJogFeederToMiddlePoint = 10, - THREAD_LOADING_STATE__ThreadLoadDryerLoading = 11, - THREAD_LOADING_STATE__ThreadLoadResumeHeating = 12, - THREAD_LOADING_STATE__ThreadLoadJogThread = 13, - THREAD_LOADING_STATE__ThreadLoadEnd = 14 + THREAD_LOADING_STATE__None = 0, + THREAD_LOADING_STATE__Preparing = 1, + THREAD_LOADING_STATE__ReadyForLoading = 2, + THREAD_LOADING_STATE__PreparationError = 3, + THREAD_LOADING_STATE__Finalizing = 4, + THREAD_LOADING_STATE__FinalizationError = 5, + THREAD_LOADING_STATE__Completed = 6 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(THREAD_LOADING_STATE) } ThreadLoadingState; diff --git a/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c b/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c index 3b8599a5c..7e1653847 100644 --- a/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c +++ b/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c @@ -255,6 +255,7 @@ uint32_t MotorVerifiedCallBackFunction(uint32_t IfIndex, uint32_t ArmPosition) / MotorStop(MotorId,Hard_Hiz ); Task_sleep(5); MotorMove(MotorId,DrierBackLashDirection,DryerBackLash ); + Report("Motor to stopper move to backlash",__FILE__,MotorId,DryerBackLash,RpWarning,DrierBackLashDirection,0); Task_sleep(100); if (MotorId == HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM) MotorStop(MotorId,Hard_Stop ); diff --git a/Software/Embedded_SW/Embedded/Drivers/USB_Communication/USBCDCD.c b/Software/Embedded_SW/Embedded/Drivers/USB_Communication/USBCDCD.c index 22a734781..3079b85d9 100644 --- a/Software/Embedded_SW/Embedded/Drivers/USB_Communication/USBCDCD.c +++ b/Software/Embedded_SW/Embedded/Drivers/USB_Communication/USBCDCD.c @@ -623,16 +623,17 @@ uint32_t ULength[MAX_USB_LOG+1] = {0}; uint32_t UDataLength[MAX_USB_LOG] = {0}; byte URxIndex = 0; */ +uint8_t size[4]; +int size_bar = 0; + void handleRx(void) { uint32_t ui32Read; uint8_t ui8Char; - uint8_t size[4]; - int size_bar = 0; -if (expected_message_size == 0) + if (expected_message_size == 0) { - do + while (size_bar < 4) { ui32Read = USBBufferRead((tUSBBuffer *)&rxBuffer, &ui8Char, 1); @@ -640,44 +641,67 @@ if (expected_message_size == 0) { size[size_bar++] = ui8Char; } - - } while(size_bar < 4); - - expected_message_size = *(int *)size; - // ULength[URxIndex] = expected_message_size; - buffId = initArray( expected_message_size); - if (buffId == 0xFF) - { - keep_expected_message_size = expected_message_size; - expected_message_size = 0; - } + //else + // return; + } + if (size_bar == 4) + { + expected_message_size = *(int *)size; + size_bar = 0; + //ULength[URxIndex] = expected_message_size; + if (expected_message_size) + { + buffId = initArray( expected_message_size); + if (buffId == 0xFF) + { + LOG_ERROR(expected_message_size,"usb message length error"); + keep_expected_message_size = expected_message_size; + expected_message_size = 0; + size_bar = 0; + FileChunkUploadError(); + } + //Report("usb message length", __FILE__, __LINE__, expected_message_size, RpWarning, (int)buffId, 0); + } + } } - do + if (expected_message_size) { - ui32Read = USBBufferRead((tUSBBuffer *)&rxBuffer, &ui8Char, 1); - - // Did we get a character? - if(ui32Read) + do { - insertArray(buffId,ui8Char); - current_message_size++; -// UDataLength[URxIndex] = current_message_size; - } + ui32Read = USBBufferRead((tUSBBuffer *)&rxBuffer, &ui8Char, 1); - if (current_message_size == expected_message_size) - { - g_RxCount += current_message_size; -/* UDataLength[URxIndex] = current_message_size; - if (URxIndex++>= MAX_USB_LOG) - URxIndex = 0;*/ - CommunicationTaskMessageReceived(buffId,current_message_size); - expected_message_size = 0; - current_message_size = 0; - break; - } + // Did we get a character? + if(ui32Read) + { + if (insertArray(buffId,ui8Char) == false) + { + expected_message_size = 0; + current_message_size = 0; + LOG_ERROR(buffId,"usb message aborted"); + ui32Read = 0; + break; + } + current_message_size++; + //UDataLength[URxIndex] = current_message_size; + } + + if (current_message_size >= expected_message_size) + { + g_RxCount += current_message_size; + /*UDataLength[URxIndex] = current_message_size; + if (URxIndex++>= MAX_USB_LOG) + URxIndex = 0;*/ + CommunicationTaskMessageReceived(buffId,current_message_size); + expected_message_size = 0; + current_message_size = 0; + size_bar = 0; + break; + } + + } while(ui32Read); - } while(ui32Read); + } } //***************************************************************************** diff --git a/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.c b/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.c index aae9ce2e9..c3a74efa9 100644 --- a/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.c +++ b/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.c @@ -113,6 +113,27 @@ uint32_t MCU_E2PromSerialNumRead(char* *Data) return len; } +uint32_t MCU_E2PromDryerBacklashProgram(char *Data) +{ + char * Backlash = Data; + int len = strlen(Backlash); + if (len > 4) + { + Report("MCU_E2PromDryerBacklashProgram length error",__FILE__,__LINE__,len,RpWarning,(int)0,0); + return ERROR; + } + EEPROMProgram((uint32_t *)Backlash, DRYER_BACKLASH_ADDR*4, 4); + return OK; +} +float MCU_E2PromDryerBacklashRead() +{ + float Data; + EEPROMRead((uint32_t *)&Data,DRYER_BACKLASH_ADDR*4, 4); + + Report("MCU_E2PromDryerBacklashRead length ",__FILE__,__LINE__,DRYER_BACKLASH_ADDR*4,RpWarning,(int)(Data*100),0); + + return Data; +} //Each word may not be subject to more than a specific number of programming cycles before an //erase cycle is required. In other words, for any given word, FlashProgram can only be called diff --git a/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.h b/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.h index 9bd17894e..5cab24587 100644 --- a/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.h +++ b/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.h @@ -33,11 +33,14 @@ typedef enum { EEPROM_STORAGE_MIDTANK_8_B, EEPROM_STORAGE_SERIAL_NUM, EEPROM_STORAGE_MAC_ADDR, + EEPROM_STORAGE_DRYER_BACKLASH, MAX_EEPROM_STORAGE }EEPROM_STORAGE_USAGE_ENUM; #define MAX_SERIAL_NUM_LEN 20 +#define MAX_MAC_ADDR_LEN 8 #define SERIAL_NUM_ADDR EEPROM_STORAGE_SERIAL_NUM*4 #define MAC_ADDR_ADDR (SERIAL_NUM_ADDR + MAX_SERIAL_NUM_LEN) +#define DRYER_BACKLASH_ADDR (MAC_ADDR_ADDR + MAX_MAC_ADDR_LEN) uint32_t MCU_E2PromProgram(int Address,uint32_t Data); uint32_t MCU_E2PromRead(int Address,uint32_t *Data); @@ -47,6 +50,8 @@ float MCU_E2PromReadMidtank_B(int MidtankId); void MCU_E2PromInit(void); uint32_t MCU_E2PromSerialNumProgram(char *Data); uint32_t MCU_E2PromSerialNumRead(char* *Data); +uint32_t MCU_E2PromDryerBacklashProgram(char *Data); +float MCU_E2PromDryerBacklashRead(void); extern char Serial[21]; diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index 93246979b..eea72d6b5 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -72,7 +72,6 @@ uint8_t alarm_response_buffer[500]; /******************** Functions ********************************************/ void SendEventNotifications(void); -//uint32_t Control_Delta_Position_Pass(uint32_t Current_Read,uint32_t Previous_Read); //********************************************************************** typedef enum { diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 76b7aa7a1..b5fff9340 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -113,7 +113,6 @@ static GateMutex_Handle gateMillisecDB; uint32_t Millisec_timerBase = TIMER1_BASE; //Timer handle /******************** Functions ********************************************/ -uint32_t Control_Delta_Position_Pass(uint32_t Current_Read,uint32_t Previous_Read); void CalculateVOCAlarms(void); //********************************************************************** /******************** CODE ********************************************/ diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c index b60fb3aa4..b75e44001 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/control.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c @@ -53,9 +53,11 @@ #include "drivers/adc_sampling/adc.h" #include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" +#include "drivers/FPGA/FPGA_SPI_Comm.h" #include "Modules/General/buttons.h" #include "Modules/General/GeneralHardware.h" +#include "Modules/AlarmHandling/AlarmHandling.h" #include "StateMachines/Printing/PrintingSTM.h" diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c index 4c373bb54..6b2cf0021 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c @@ -140,7 +140,6 @@ bool blowervolatgedisplay = false; bool midtankDisplay = false; double diagvoltage = 0; /******************** Functions ********************************************/ -//uint32_t Control_Delta_Position_Pass(uint32_t Current_Read,uint32_t Previous_Read); //********************************************************************** typedef enum { @@ -256,7 +255,7 @@ void DiagnosticLoadMotor(int MotorId, int frequency) { if (MotorId >= MAX_THREAD_MOTORS_NUM) { - LOG_ERROR(MotorId,"wrong Heater Id"); + ReportWithPackageFilter(DiagnosticsFilter,"wrong Motor Id",__FILE__,__LINE__,(int)MotorId,RpError,(int)0,0); return; } @@ -332,7 +331,7 @@ void DiagnosticLoadTemperature(int HeaterId, int temperature) double temp = temperature; if (HeaterId >= HEATER_TYPE_MAX_HEATERS) { - LOG_ERROR(HeaterId,"wrong Heater Id"); + ReportWithPackageFilter(DiagnosticsFilter,"wrong Heater Id",__FILE__,__LINE__,(int)HeaterId,RpError,(int)0,0); return; } if ((temperature < 1000)||(temperature>28000)) //error read, all 0xF or all 0 @@ -357,7 +356,7 @@ void DiagnosticLoadDancer(int DancerId, uint16_t value) { if (DancerId >= NUM_OF_DANCERS) { - LOG_ERROR(DancerId,"wrong Dancer Id"); + ReportWithPackageFilter(DiagnosticsFilter,"wrong Dancer Id",__FILE__,__LINE__,(int)DancerId,RpError,(int)0,0); return; } DancerValue[DancerId][DancerCounterIndex[DancerId]] = value; @@ -370,7 +369,7 @@ void DiagnosticLoadDancerError(int DancerId, double value) { if (DancerId >= NUM_OF_DANCERS) { - LOG_ERROR(DancerId,"wrong Dancer Id"); + ReportWithPackageFilter(DiagnosticsFilter,"wrong Dancer Id",__FILE__,__LINE__,(int)DancerId,RpError,(int)0,0); return; } DancerErrorValue[DancerId][DancerErrorCounterIndex[DancerId]] = value; @@ -871,20 +870,20 @@ void SendDiagnostics(void) } else { - LOG_ERROR(Task_self(),"my_malloc failed"); + ReportWithPackageFilter(DiagnosticsFilter,"my_malloc failed, DiagnosticsStop ",__FILE__,__LINE__,(int)Task_self(),RpError,(int)0,0); DiagnosticsStop(); //CommunicationMailboxFlush(); } } else { - LOG_ERROR(Task_self(),"previous packet not sent"); + ReportWithPackageFilter(DiagnosticsFilter,"previous packet not sent",__FILE__,__LINE__,(int)Task_self(),RpError,(int)0,0); } //my_free(diagnosticsresponseContainer.data.data); } else { - LOG_ERROR(Task_self(),"my_malloc failed"); + ReportWithPackageFilter(DiagnosticsFilter,"my_malloc failed, DiagnosticsStop ",__FILE__,__LINE__,(int)Task_self(),RpError,(int)0,0); DiagnosticsStop(); } DiagnosticsReset(); @@ -905,19 +904,19 @@ uint32_t DiagnosticsStart(void) if (DiagnosticsControlId == 0xFF) DiagnosticsControlId = AddControlCallback(NULL,Diagnostics_ControlTrigger,DiagnosticLimit,TemplateDataReadCBFunction,0,0,0); else - LOG_ERROR(DiagnosticsControlId,"Diagnostics restarted"); + ReportWithPackageFilter(DiagnosticsFilter,"Diagnostics restarted ",__FILE__,__LINE__,(int)DiagnosticLimit,RpWarning,(int)DiagnosticsControlId,0); if (Diagnostics10MSControlId == 0xFF) Diagnostics10MSControlId = AddControlCallback(NULL,Diagnostics_TenMiliControlTrigger,DiagnosticFastLimit,TemplateDataReadCBFunction,0,0,0); else - LOG_ERROR(DiagnosticsControlId,"Diagnostics restarted"); + ReportWithPackageFilter(DiagnosticsFilter,"Diagnostics restarted ",__FILE__,__LINE__,(int)DiagnosticFastLimit,RpWarning,(int)Diagnostics10MSControlId,0); if (Diagnostics1SecControlId == 0xFF) Diagnostics1SecControlId = AddControlCallback(NULL,Diagnostics_OneSecControlTrigger,eOneSecond,TemplateDataReadCBFunction,0,0,0); else - LOG_ERROR(Diagnostics1SecControlId,"Diagnostics restarted"); + ReportWithPackageFilter(DiagnosticsFilter,"Diagnostics restarted ",__FILE__,__LINE__,(int)eOneSecond,RpWarning,(int)Diagnostics1SecControlId,0); if (Diagnostics1MinControlId == 0xFF) Diagnostics1MinControlId = AddControlCallback(NULL,Diagnostics_OneMinControlTrigger,eOneMinute,TemplateDataReadCBFunction,0,0,0); else - LOG_ERROR(Diagnostics1MinControlId,"Diagnostics restarted"); + ReportWithPackageFilter(DiagnosticsFilter,"Diagnostics restarted ",__FILE__,__LINE__,(int)eOneMinute,RpWarning,(int)Diagnostics1MinControlId,0); } } diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c index 0e28ec736..c49fd81f0 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c @@ -509,7 +509,8 @@ uint32_t IDS_Check_Pressure_Callback(uint32_t DispenserId, uint32_t ReadValue) if (GetDispenserPressure(DispenserId)>3.0) { Report("Pulling dispenser down to reduce pressure",__FILE__,DispenserId,(int)(GetDispenserPressure(DispenserId)*100),RpWarning,200,0); - MotorMove(HW_Motor_Id,1-MotorsCfg[HW_Motor_Id].directionthreadwize,200); + + MotorMove(HW_Motor_Id,1-MotorsCfg[HW_Motor_Id].directionthreadwize,200*MotorsCfg[HW_Motor_Id].microstep); } return OK; } @@ -525,6 +526,6 @@ void IDS_Dispenser_Init(uint8_t DispenserId) Valve_Set(IDS_Id_to_AirValve[DispenserId], Atm_MidTank_OFF); Control3WayValvesWithCallback ((Valves_t)DispenserId, MidTank_Dispenser, NULL); //direction: MidTank_Dispenser or Dispenser_Mixer if (ControlIdtoInactiveDispenserId[DispenserId] == 0xFF) - ControlIdtoInactiveDispenserId[DispenserId] = AddControlCallback("IDS_Check_Pressure", IDS_Check_Pressure_Callback, eOneMinute,TemplateDataReadCBFunction ,0, 0, 0 ); + ControlIdtoInactiveDispenserId[DispenserId] = AddControlCallback("IDS_Check_Pressure", IDS_Check_Pressure_Callback, eOneMinute,TemplateDataReadCBFunction ,DispenserId, 0, 0 ); } diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h index 56fb79c23..d1d23598f 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h @@ -82,6 +82,7 @@ void SetKeepWindingCone(bool value); void SetWinderBackToBaseTime(uint32_t value); uint32_t DancerConfigMessage(HardwareDancer * request); +uint32_t Control_Delta_Position_Pass(uint32_t Current_Read,uint32_t Previous_Read); void SetOriginMotorSpeed(float process_speed); diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c index 852c19a1a..aeacde455 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c @@ -36,6 +36,10 @@ #include "PMR/Stubs/StubHeatingTestResponse.pb-c.h" #include "PMR/Stubs/StubHeatingTestPollRequest.pb-c.h" #include "PMR/Stubs/StubHeatingTestPollResponse.pb-c.h" +#include "PMR/ThreadLoading/StartThreadLoadingRequest.pb-c.h" +#include "PMR/ThreadLoading/StartThreadLoadingResponse.pb-c.h" +#include "PMR/ThreadLoading/ContinueThreadLoadingRequest.pb-c.h" +#include "PMR/ThreadLoading/ContinueThreadLoadingResponse.pb-c.h" //#include <stdint.h> //#include <stdbool.h> @@ -62,6 +66,8 @@ THREAD_LOAD_STAGES_ENUM LoadStages = THREAD_LOAD_INIT; ProcessParameters ProcessParametersClear,ProcessParametersRecover; + uint32_t LoadStatus = OK; + char LoadErrorMsg[100]; int32_t keepmicrostep; int32_t keepkvalrun,keepkvalhold; uint8_t CallbackCounter = 0; @@ -70,10 +76,16 @@ uint32_t UnloadingStart = 0; uint8_t NumberOfDrierLoaderCycles = 0; uint32_t status = OK; - uint32_t LoadingControlId = 0xFF,PullerControlId = 0xFF,WinderControlId = 0xFF; + uint32_t LoadingControlId = 0xFF,PullerControlId = 0xFF,WinderControlId = 0xFF, SpeedTControlId = 0xFF; + uint32_t previousPosition = 0, currentPosition = 0,Tinitialpos = 0xFFFF; + uint32_t LoadCounter = 0; + double TotalProcessedLen = 0.0; + double LengthCalculationMultiplier; uint32_t ThreadLoadStateMachine( THREAD_LOAD_STAGES_ENUM LoadStages); uint32_t ThreadLoadControlCBFunction(uint32_t index, uint32_t ReadValue); + uint32_t ThreadLoadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue); uint32_t Thread_Load_Dryer_UnLoading(void); + uint32_t ThreadLoadingReport(void); typedef struct { @@ -104,13 +116,17 @@ //FRESULT Fresult = FR_OK; REPORT_MSG(LoadStages, "Thread Load State Machine step"); - LoadArmInfo.LoadArmBackLash = 5; + LoadStatus = OK; + LoadArmInfo.LoadArmBackLash = MCU_E2PromDryerBacklashRead(); + REPORT_MSG(LoadArmInfo.LoadArmBackLash, "Thread Load MCU_E2PromDryerBacklashRead"); + if (LoadArmInfo.LoadArmBackLash > 10) + LoadArmInfo.LoadArmBackLash = 5; //LoadArmInfo.LoadArmRounds = 0xFF; //EEPROM_STORAGE_DRYER_CYCLES MCU_E2PromRead(EEPROM_STORAGE_DRYER_CYCLES,&LoadArmInfo.LoadArmRounds); + if (LoadArmInfo.LoadArmRounds <= 2) LoadArmInfo.LoadArmRounds = 20; - MCU_E2PromRead(EEPROM_STORAGE_DRYER_CYCLES,&LoadArmInfo.LoadArmRounds); Report("MotorMovetoEncoderPosition",__FILE__,__LINE__,LoadArmInfo.LoadArmRounds,RpWarning,LoadArmInfo.LoadArmBackLash,0); /*Fresult = f_mkdir(SW_INFO_DIR); @@ -156,6 +172,8 @@ if (HandleProcessParameters(&ProcessParametersClear,false)!= OK) { LOG_ERROR (LoadStages, "Thread_Load_Init failed"); + strcpy(LoadErrorMsg,"Thread_Load_Init failed"); + LoadStatus = ERROR; } else { @@ -294,6 +312,9 @@ LOG_ERROR(LoadStages,"Load sequence timeout"); TimeoutsCounter = 0; load.color = fastBILNK; + usnprintf(LoadErrorMsg, 100, "Load sequence timeout %d motor %d",LoadStages, MotorId); + LoadStatus = ERROR; + ThreadLoadingReport(); } else { @@ -310,6 +331,7 @@ else { load.color = fastBILNK; + ThreadLoadingReport(); } } } @@ -472,6 +494,13 @@ RemoveControlCallback(LoadingControlId, ThreadLoadControlCBFunction ); LoadingControlId = 0xFF; } + if (SpeedTControlId != 0xFF) + { + RemoveControlCallback(SpeedTControlId, ThreadLoadLengthCBFunction ); + SpeedTControlId = 0xFF; + } + Report("Total Feeder load",__FILE__,__LINE__,dryerbufferCentimeters,RpMessage,TotalProcessedLen,0); + if (CallbackCounter) { CallbackCounter--; @@ -546,6 +575,15 @@ LoadingControlId = AddControlCallback(NULL,ThreadLoadControlCBFunction, eOneMillisecond,Control_Read_Dancer_Position,(IfTypeThread*0x100+FEEDER_MOTOR),FEEDER_DANCER,FEEDER_MOTOR); Report("AddControlCallback feeder",__FILE__,__LINE__,LoadingControlId,RpMessage,IfTypeThread*0x100+FEEDER_MOTOR,0); + if (SpeedTControlId != 0xFF) + { + RemoveControlCallback(SpeedTControlId,ThreadLoadLengthCBFunction); + SpeedTControlId = 0xFF; + } + //SetMotHome(ThreadMotorIdToMotorId[Motor_i]); + LengthCalculationMultiplier = (MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDRIVING].pulleyradius*2*PI)/(MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDRIVING].pulseperround*MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDRIVING].microstep); + SpeedTControlId = AddControlCallback(NULL,ThreadLoadLengthCBFunction, eHundredMillisecond,MotorGetPositionFromFPGA,(IfTypeThread*0x100+HARDWARE_MOTOR_TYPE__MOTO_RDRIVING),HARDWARE_MOTOR_TYPE__MOTO_RDRIVING,0); + Tinitialpos = 0xFFFF;previousPosition = 0; currentPosition = 0; CallbackCounter++; Report("Thread_Load_Dryer_Loading",__FILE__,__LINE__,LoadStages,RpMessage,CallbackCounter,0); MotorMoveWithCallback (HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM, MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM].directionthreadwize, @@ -596,6 +634,11 @@ RemoveControlCallback(WinderControlId, ThreadLoadControlCBFunction ); WinderControlId = 0xFF; } + if (SpeedTControlId != 0xFF) + { + RemoveControlCallback(SpeedTControlId, ThreadLoadLengthCBFunction ); + SpeedTControlId = 0xFF; + } MotorStopAction(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM); MotorStopAction(HARDWARE_MOTOR_TYPE__MOTO_RLOADING); @@ -673,12 +716,10 @@ // numberOfSteps, Thread_Load_Dryer_Loading_Callback, 100000); UnloadingStart = msec_millisecondCounter; Report("Thread_Load_Set_Load_Arm_To_Start_Position",__FILE__,UnloadingStart,LoadStages,RpMessage,NumberOfDrierLoaderCycles,0); - LoadArmInfo.LoadArmBackLash = 5; status |= MotorMoveToStopper(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM, (1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM].directionthreadwize), MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM].pulseperround/2, Thread_Load_Set_Load_Arm_To_Stopper_Callback,LoadArmInfo.LoadArmBackLash,1000); //Keep Notation How Many Rotations In The Dryer - //LoadArmInfo.LoadArmBackLash = 0; LoadArmInfo.LoadArmRounds = (int)dryerbufferlength; load.color = BLINK; return OK; @@ -752,6 +793,7 @@ case THREAD_LOAD_JOG_THREAD: //JOG THREAD SHORTLY TO MAKE SURE SPOOL IS RUNNING. REPORT END OF LOADING //LoadStages++; Thread_Load_Jog_Thread(); + ThreadLoadingReport(); break; case THREAD_LOAD_END: LoadStages = THREAD_LOAD_END; @@ -770,6 +812,11 @@ uint32_t ThreadLoadButton(THREAD_LOAD_STAGES_ENUM ReadValue) Report("ThreadLoadButton called on job",__FILE__,__LINE__,LoadStages,RpMessage,ReadValue,0); return ERROR; } + if (CallbackCounter) + { + Report("ThreadLoadButton called when the loading is active",__FILE__,__LINE__,LoadStages,RpMessage,CallbackCounter,0); + return ERROR; + } Report("ThreadLoadButton",__FILE__,__LINE__,LoadStages,RpMessage,ReadValue,0); if (LoadStages > ReadValue) { @@ -781,8 +828,60 @@ uint32_t ThreadLoadButton(THREAD_LOAD_STAGES_ENUM ReadValue) } return OK; } -uint32_t LoadCounter = 0; +uint32_t ThreadLoadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) +{ + uint32_t positionDiff = 0,prevprev; + double length = 0.0; + char lenstr[150]; + + int index = MAX_THREAD_MOTORS_NUM; + if (IfIndex>>8 != IfTypeThread) + { + LOG_ERROR (IfIndex, "Wrong Interface type"); + return 0xFFFFFFFF; + } + index = IfIndex&0xFF; +// if (CurrentRequestedLength == 0.0) +// return OK; + if (index != HARDWARE_MOTOR_TYPE__MOTO_RDRIVING) + { + LOG_ERROR (IfIndex, "Wrong Motor"); + return 0xFFFFFFFF; + } + currentPosition = MotorGetPosition(HARDWARE_MOTOR_TYPE__MOTO_RDRIVING); + if (currentPosition != 0) + { + if (Tinitialpos == 0xFFFF) + { + previousPosition = currentPosition; + Tinitialpos = 0; + } + prevprev = previousPosition; + positionDiff = Control_Delta_Position_Pass(currentPosition,previousPosition); + //positionDiff = positionDiff / MotorsCfg[ThreadMotorIdToMotorId[index]].microstep; + previousPosition = currentPosition; + + // total length = (position diff / full cycle) * pulley perimeter + //(positionDiff/pulseperround)*((2*PI*motor_Radius) + + //positionDiff = positionDiff / MotorsCfg[ThreadMotorIdToMotorId[index]].microstep; + length = (double)(positionDiff)*LengthCalculationMultiplier; + + //if (length > 1000) + { + usnprintf(lenstr, 100, " length %d, diff 0x%x, pos 0x%x prev 0x%x",(int)length*100,(int)positionDiff,previousPosition,prevprev); + SendJobProgress(0.0,0,false, lenstr); + ReportWithPackageFilter(ThreadFilter,lenstr,__FILE__,__LINE__,(int)TotalProcessedLen,RpWarning,(int)TotalProcessedLen,0); + length = 0; + + } + + } + TotalProcessedLen += length; + + return OK; +} uint32_t ThreadLoadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) { //read value is the dancer angle @@ -911,6 +1010,7 @@ void ThreadLoadRequest(MessageContainer* requestContainer) // return ERROR; //#endif } + void ThreadLoadPollRequest(MessageContainer* requestContainer) { uint8_t* container_buffer; @@ -936,3 +1036,86 @@ void ThreadLoadPollRequest(MessageContainer* requestContainer) SendChars(container_buffer, container_size); stub_heating_test_poll_request__free_unpacked(request,NULL); } +char ThreadLoadingToken[36+1] = {0}; +int MessageState = 0; //0 - none, 1 = start, 2 = continue +uint32_t ThreadLoadingReport(void) +{ + MessageContainer responseContainer; + bool last = false; + StartThreadLoadingResponse response = START_THREAD_LOADING_RESPONSE__INIT; + ContinueThreadLoadingResponse Cresponse = CONTINUE_THREAD_LOADING_RESPONSE__INIT; + + if (ThreadLoadingToken[0] == 0) + return OK; + + if (MessageState == 1) + { + response.has_state = true; + if (LoadStatus == OK) + { + response.state = THREAD_LOADING_STATE__Preparing; + if (LoadStages == THREAD_LOAD_INITIAL_TENSION) + { + response.state = THREAD_LOADING_STATE__ReadyForLoading; + last = true; + } + } + else + { + response.state = THREAD_LOADING_STATE__PreparationError; + response.errorreason = LoadErrorMsg; + } + responseContainer = createContainer(MESSAGE_TYPE__StartThreadLoadingResponse, ThreadLoadingToken, last, &response, &start_thread_loading_response__pack, &start_thread_loading_response__get_packed_size); + responseContainer.continuous = true; + } + else if (MessageState == 2) + { + Cresponse.has_state = true; + if (LoadStatus == OK) + { + Cresponse.state = THREAD_LOADING_STATE__Finalizing; + if (LoadStages >= THREAD_LOAD_JOG_THREAD) + { + Cresponse.state = THREAD_LOADING_STATE__Completed; + last = true; + } + } + else + { + Cresponse.state = THREAD_LOADING_STATE__FinalizationError; + Cresponse.errorreason = LoadErrorMsg; + } + responseContainer = createContainer(MESSAGE_TYPE__ContinueThreadLoadingResponse, ThreadLoadingToken, last, &Cresponse, &continue_thread_loading_response__pack, &continue_thread_loading_response__get_packed_size); + responseContainer.continuous = true; + } + else return ERROR; + + //------------------------------------------------------------------------------------------- + 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((char*)container_buffer, container_size); + + return OK; + +} + +uint32_t StartThreadLoadingFunc(MessageContainer* requestContainer) +{ + StartThreadLoadingRequest *request = start_thread_loading_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + ustrncpy (ThreadLoadingToken, requestContainer->token,36); + MessageState = 1; + ThreadLoadingReport(); + return OK; + +} + +uint32_t ContinueThreadLoadingFunc(MessageContainer* requestContainer) +{ + ContinueThreadLoadingRequest *request = continue_thread_loading_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + ustrncpy (ThreadLoadingToken, requestContainer->token,36); + MessageState = 2; + ThreadLoadingReport(); + return OK; + +} diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h index 29876549e..772025072 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h @@ -74,6 +74,9 @@ bool ThreadLoadingActive(void); void ThreadLoadPollRequest(MessageContainer* requestContainer); void ThreadLoadRequest(MessageContainer* requestContainer); +uint32_t StartThreadLoadingFunc(MessageContainer* requestContainer); +uint32_t ContinueThreadLoadingFunc(MessageContainer* requestContainer); + uint32_t Thread_Load_End(void); #endif diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 34934af0c..f0331b4bc 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -158,7 +158,7 @@ uint32_t ThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) #endif if (IfIndex>>8 != IfTypeThread) { - LOG_ERROR (IfIndex, "Wrong Interface type"); + ReportWithPackageFilter(ThreadFilter,"Wrong Interface type",__FILE__,__LINE__,(int)IfIndex,RpError,(int)PoolerTotalProcessedLength,0); return 0xFFFFFFFF; } index = IfIndex&0xFF; @@ -166,7 +166,7 @@ uint32_t ThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) // return OK; if (index != FEEDER_MOTOR) { - LOG_ERROR (IfIndex, "Wrong Motor"); + ReportWithPackageFilter(ThreadFilter,"Wrong Motor",__FILE__,__LINE__,(int)IfIndex,RpError,(int)index,0); return 0xFFFFFFFF; } CurrentPosition = MotorGetPosition(ThreadMotorIdToMotorId[index]); @@ -248,7 +248,7 @@ uint32_t PoolerThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) #endif if (IfIndex>>8 != IfTypeThread) { - LOG_ERROR (IfIndex, "Wrong Interface type"); + ReportWithPackageFilter(ThreadFilter,"Wrong Interface type",__FILE__,__LINE__,(int)IfIndex,RpError,(int)PoolerTotalProcessedLength,0); return 0xFFFFFFFF; } index = IfIndex&0xFF; @@ -256,7 +256,7 @@ uint32_t PoolerThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) // return OK; if (index != POOLER_MOTOR) { - LOG_ERROR (IfIndex, "Wrong Motor"); + ReportWithPackageFilter(ThreadFilter,"Wrong Motor",__FILE__,__LINE__,(int)IfIndex,RpError,(int)index,0); return 0xFFFFFFFF; } PoolerCurrentPosition = MotorGetPosition(ThreadMotorIdToMotorId[index]); @@ -343,7 +343,7 @@ uint32_t ThreadSpeedControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) float speed = getSensorSpeedData(); if (IfIndex>>8 != IfTypeThread) { - LOG_ERROR (IfIndex, "Wrong Interface type"); + ReportWithPackageFilter(ThreadFilter,"Wrong Interface type",__FILE__,__LINE__,(int)IfIndex,RpError,(int)PoolerTotalProcessedLength,0); return 0xFFFFFFFF; } index = IfIndex&0xFF; @@ -375,7 +375,7 @@ uint32_t ThreadControlSpeedReadFunction(uint32_t IfIndex, uint32_t ReadValue) int index; if (IfIndex>>8 != IfTypeThread) { - LOG_ERROR (IfIndex, "Wrong Interface type"); + ReportWithPackageFilter(ThreadFilter,"Wrong Interface type",__FILE__,__LINE__,(int)IfIndex,RpError,(int)PoolerTotalProcessedLength,0); return 0xFFFFFFFF; } index = IfIndex&0xFF; @@ -468,7 +468,7 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) #endif if (IfIndex>>8 != IfTypeThread) { - LOG_ERROR (IfIndex, "Wrong Interface type"); + ReportWithPackageFilter(ThreadFilter,"Wrong Interface type",__FILE__,__LINE__,(int)IfIndex,RpError,(int)PoolerTotalProcessedLength,0); return 0xFFFFFFFF; } index = IfIndex&0xFF; @@ -490,7 +490,7 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) if (dancerinvalid == false) { dancerinvalid = true; - LOG_ERROR(index, "Dancer value invalid."); + ReportWithPackageFilter(ThreadFilter,"Dancer value invalid.",__FILE__,__LINE__,(int)IfIndex,RpError,(int)ReadValue,0); } return OK; } @@ -795,7 +795,7 @@ uint32_t ThreadInitialTestStub(HardwareMotor * request) if (PoolerSpeedControlId != 0xFF) { if (RemoveControlCallback(PoolerSpeedControlId,PoolerThreadLengthCBFunction)!=OK) - LOG_ERROR(Motor_i,"Remove Control Failed"); + ReportWithPackageFilter(ThreadFilter,"Remove Control Failed.",__FILE__,__LINE__,(int)Motor_i,RpError,(int)PoolerSpeedControlId,0); PoolerSpeedControlId = 0xFF; } //SetMotHome(ThreadMotorIdToMotorId[Motor_i]); @@ -807,7 +807,7 @@ uint32_t ThreadInitialTestStub(HardwareMotor * request) if (ControlIdtoMotorId[Motor_i] != 0xFF) { if(RemoveControlCallback(ControlIdtoMotorId[Motor_i],ThreadControlCBFunction)!=OK) - LOG_ERROR(Motor_i,"Remove Control Failed"); + ReportWithPackageFilter(ThreadFilter,"Remove Control Failed.",__FILE__,__LINE__,(int)Motor_i,RpError,(int)PoolerSpeedControlId,0); ControlIdtoMotorId[Motor_i] = 0xFF; CurrentControlledSpeed[Motor_i] = 0; } @@ -821,7 +821,7 @@ uint32_t ThreadInitialTestStub(HardwareMotor * request) if (ControlIdtoMotorId[Motor_i] != 0xFF) { if(RemoveControlCallback(ControlIdtoMotorId[Motor_i],ThreadControlCBFunction)!=OK) - LOG_ERROR(Motor_i,"Remove Control Failed"); + ReportWithPackageFilter(ThreadFilter,"Remove Control Failed.",__FILE__,__LINE__,(int)Motor_i,RpError,(int)PoolerSpeedControlId,0); CurrentControlledSpeed[Motor_i] = 0; ControlIdtoMotorId[Motor_i] = 0xFF; } @@ -835,7 +835,7 @@ uint32_t ThreadInitialTestStub(HardwareMotor * request) if (ControlIdtoMotorId[Motor_i] != 0xFF) { if(RemoveControlCallback(ControlIdtoMotorId[Motor_i],ThreadControlCBFunction)!=OK) - LOG_ERROR(Motor_i,"Remove Control Failed"); + ReportWithPackageFilter(ThreadFilter,"Remove Control Failed.",__FILE__,__LINE__,(int)Motor_i,RpError,(int)PoolerSpeedControlId,0); CurrentControlledSpeed[Motor_i] = 0; ControlIdtoMotorId[Motor_i] = 0xFF; } @@ -913,10 +913,10 @@ uint32_t ThreadPreSegmentState(void *SegmentDetails, uint32_t SegmentId) float process_speed = dyeingspeed; if (dyeingspeed == 0) { - LOG_ERROR (dyeingspeed," job speed zero"); + ReportWithPackageFilter(ThreadFilter,"job speed zero.",__FILE__,__LINE__,(int)dyeingspeed,RpError,(int)SegmentId,0); return ERROR; } - REPORT_MSG (dyeingspeed," ThreadPreSegmentState"); + ReportWithPackageFilter(ThreadFilter,"ThreadPreSegmentState",__FILE__,__LINE__,(int)dyeingspeed,RpWarning,(int)SegmentId,0); if (SegmentId == 0) // do all this only in the beginning of the job. do not touch after that (assuming spool does not change mid job) { SetOriginMotorSpeed(process_speed); @@ -1060,13 +1060,13 @@ char Endstr[150]; if (SpeedControlId != 0xFF) { if(RemoveControlCallback(SpeedControlId,ThreadLengthCBFunction)!=OK) - LOG_ERROR(SpeedControlId,"RemoveControl Failed"); + ReportWithPackageFilter(ThreadFilter,"Remove Control Failed.",__FILE__,__LINE__,(int)Motor_i,RpError,(int)SpeedControlId,0); SpeedControlId = 0xFF; } if (PoolerSpeedControlId != 0xFF) { if(RemoveControlCallback(PoolerSpeedControlId,PoolerThreadLengthCBFunction)!=OK) - LOG_ERROR(PoolerSpeedControlId,"RemoveControl Failed"); + ReportWithPackageFilter(ThreadFilter,"Remove Control Failed.",__FILE__,__LINE__,(int)Motor_i,RpError,(int)PoolerSpeedControlId,0); PoolerSpeedControlId = 0xFF; } @@ -1077,7 +1077,7 @@ char Endstr[150]; if(RemoveControlCallback(ControlIdtoMotorId[Motor_i],ThreadControlCBFunction) == OK) ControlIdtoMotorId[Motor_i] = 0xFF; else - LOG_ERROR (ControlIdtoMotorId[Motor_i],"Remove Control failed"); + ReportWithPackageFilter(ThreadFilter,"Remove Control Failed.",__FILE__,__LINE__,(int)Motor_i,RpError,(int)ControlIdtoMotorId[Motor_i],0); } } Task_sleep(10); diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c index 01fcfb505..bba24e22f 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c @@ -174,10 +174,8 @@ uint32_t InitSequenceMidTankCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag else if (MidTankOperationCounter >= MidTankReadPressure) { //read pressure for midtank (MidTankOperationCounter-MidTankCloseAir) - for (portId = 0;portId < MAX_SYSTEM_DISPENSERS;portId++) - { - Read_MidTank_Pressure_Sensor(portId); - } + portId = MidTankOperationCounter%MAX_SYSTEM_DISPENSERS; + Read_MidTank_Pressure_Sensor(portId); } else if (MidTankOperationCounter >= MidTankOpenAir) { diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c index e4efad2a0..fac05fe2b 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c @@ -5,6 +5,11 @@ * Author: shlomo */ +#include "PMR/Power/StartPowerDownRequest.pb-c.h" +#include "PMR/Power/AbortPowerDownRequest.pb-c.h" +#include "PMR/Power/StartPowerDownResponse.pb-c.h" +#include "PMR/Power/AbortPowerDownResponse.pb-c.h" +#include "PMR/Power/PowerDownState.pb-c.h" #include "modules/General/GeneralHardware.h" #include "modules/General/Safety.h" @@ -57,6 +62,7 @@ POWER_OFF_STAGES_ENUM PowerOffMachineState = POWER_OFF_INIT,StoredMachineState = uint32_t PowerOffControlId = 0xFF; uint32_t WaitForProcessControlId = 0xFF; uint32_t PowerOffSequenceStateMachine( POWER_OFF_STAGES_ENUM ReadValue); +uint32_t PowerDownUpdate(POWER_OFF_STAGES_ENUM stage); bool PowerOffInProcess = false; #define POWER_OFF_TEMP_THRESHOLD 5000 //50 celsious int32_t PowerOffTemperatureThreshold = POWER_OFF_TEMP_THRESHOLD; @@ -112,7 +118,7 @@ uint32_t PowerOffHeadCleanCallback(uint32_t DispenserId, uint32_t ReadValue) { if ( JobIsActive()== false) { - //stop this control loop + //abort this control loop SafeRemoveControlCallback(PowerOffHeadCleanControlId, PowerOffHeadCleanCallback ); PowerOffHeadCleanControlId = 0xFF; PowerOffMachineState++; @@ -429,6 +435,7 @@ uint32_t PowerOffSequenceStateMachine( POWER_OFF_STAGES_ENUM ReadValue) uint32_t status = OK; REPORT_MSG(ReadValue,"PowerOffSequenceStateMachine"); + PowerDownUpdate(ReadValue); switch (ReadValue) { case POWER_OFF_INIT: @@ -485,3 +492,141 @@ uint32_t PowerOffSequenceStateMachine( POWER_OFF_STAGES_ENUM ReadValue) return status; } +char PowerDownToken[36+1] = {0}; +uint32_t PowerDownUpdate(POWER_OFF_STAGES_ENUM stage) +{ + uint32_t status = NOT_SUPPORTED; + + MessageContainer responseContainer; + + StartPowerDownResponse response = START_POWER_DOWN_REQUEST__INIT; + bool last = false; + + if (PowerDownToken[0] == 0) + return OK; + response.has_state = true; + response.has_progresspercentage = true; + response.message = "Hello world"; + switch (stage) + { + case POWER_OFF_INIT: + response.state = stage +1; + response.progresspercentage = 0.0; + break; + case POWER_OFF_HEAD_CLEAN: + response.state = stage +1; + response.progresspercentage = 5.0; + break; + case POWER_OFF_MIXER_FLUSH: + response.state = stage +1; + response.progresspercentage = 20.0; + break; + case POWER_OFF_HEATERS_OFF: + response.state = stage +1; + response.progresspercentage = 22.0; + break; + case POWER_OFF_STORE_DATA: + response.state = stage +1; + response.progresspercentage = 23.0; + break; + case POWER_OFF_WAIT_FOR_PROCESSES: //wait for waste emptying: ink filling: thread loading + response.state = stage +1; + response.progresspercentage = 30.0; + break; + case POWER_OFF_STOP_RUNNING_JOB: + response.state = stage +1; + response.progresspercentage = 31.0; + break; + case POWER_OFF_SET_VALVE_POSITION: + response.state = stage +1; + response.progresspercentage = 32.0; + break; + case POWER_OFF_WAIT_FOR_TEMPERATURE: + response.state = stage +1; + response.progresspercentage = 33.0; + break; + case POWER_OFF_TURN_OFF_DRYER_FAN: + response.state = stage +1; + response.progresspercentage = 97.0; + break; + case POWER_OFF_TURN_OFF_COOLER: + response.state = stage +1; + response.progresspercentage = 98.0; + break; + case POWER_OFF_TURN_OFF_BLOWER: + response.state = stage +1; + response.progresspercentage = 99.0; + break; + case POWER_OFF_POWER_OFF: + case POWER_OFF_ERROR: + case POWER_OFF_CANCELLED: + response.state = stage +1; + response.progresspercentage = 100.0; + last = true; + break; + } + responseContainer = createContainer(MESSAGE_TYPE__StartPowerDownResponse, PowerDownToken, last, &response, &start_power_down_response__pack, &start_power_down_response__get_packed_size); + responseContainer.continuous = true; + 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); + //USBCDCD_sendData(container_buffer, container_size,10); + + SendChars((char*)container_buffer, container_size); + //MessageContainer responseContainer; + + return status; +} +uint32_t PowerDownUpdateFunc(MessageContainer* requestContainer) +{ + uint32_t status = NOT_SUPPORTED; + //MessageContainer responseContainer; + +// MachineUpdateInitParams InitParams; + + StartPowerDownRequest* request = start_power_down_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + ustrncpy (PowerDownToken, requestContainer->token,36); + + PowerDownUpdate(POWER_OFF_INIT); + start_power_down_request__free_unpacked(request,NULL); + return status; +} +void PowerDownStopReporting(void) +{ + PowerDownToken[0] = 0; +} +uint32_t AbortPowerDownFunc(MessageContainer* requestContainer) +{ + + MessageContainer responseContainer; + + AbortPowerDownRequest* request = abort_power_down_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + + AbortPowerDownResponse response = ABORT_POWER_DOWN_REQUEST__INIT; + +//TODO Handle the request!!!! + PowerDownStopReporting(); + responseContainer = createContainer(MESSAGE_TYPE__AbortPowerDownResponse, requestContainer->token, false, &response, &abort_power_down_response__pack, &abort_power_down_response__get_packed_size); + responseContainer.continuous = true; + 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); + //USBCDCD_sendData(container_buffer, container_size,10); + + SendChars((char*)container_buffer, container_size); + Report("HWSystemResetRequest", __FILE__,__LINE__,0, RpMessage, 2, 0); + + //ROM_SysCtlDelay(SYS_CLK_FREQ); + Task_sleep(2000); + + //ROM_SysCtlDelay(SYS_CLK_FREQ); + Task_sleep(2000); + + SysCtlReset(); + + HWREG(NVIC_APINT) = NVIC_APINT_VECTKEY | NVIC_APINT_SYSRESETREQ; + + +return OK; +} + diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.h b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.h index afc5a3d9d..cf743c1a6 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.h +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.h @@ -35,4 +35,8 @@ void PowerOffSetTemperatureThreshold (int32_t temperature); //celsius temperatur bool PowerOffInProcessGetState(void); +uint32_t PowerDownUpdateFunc(MessageContainer* requestContainer); +uint32_t AbortPowerDownFunc(MessageContainer* requestContainer); + + #endif /* STATEMACHINES_INITIALIZATION_POWEROFFSEQUENCE_H_ */ |
