From c04ec63bb31d471584c83ce3e013ccd72c968afd Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Wed, 17 Oct 2018 09:43:01 +0300 Subject: diagnostic sends calculated error in the tension info - every 10 msec --- Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h | 1 + .../Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h index 2961bd105..c5e3edc85 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h @@ -27,6 +27,7 @@ uint32_t InternalWindingConfigMessage(JobSpool* request); uint32_t ThreadConfigBreakSensor(void *request); uint32_t ThreadGetMotorSpeed(threadMotorsEnum MotorId); +double ThreadGetMotorCalculatedError(int DancerId); uint32_t ThreadPrepareState(void *JobDetails); uint32_t ThreadPreSegmentState(void *JobDetails); uint32_t ThreadSegmentState(void *JobDetails, int SegmentId); diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 503ef2c37..0ca0b7159 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -490,6 +490,21 @@ uint32_t ThreadGetMotorSpeed(threadMotorsEnum MotorId) { return CurrentControlledSpeed[MotorId]; } +//******************************************************************************************************************** +double ThreadGetMotorCalculatedError(int DancerId) +{ + switch (DancerId) + { + case FEEDER_DANCER: + return (double)MotorControlConfig[FEEDER_MOTOR].m_calculatedError; + case POOLER_DANCER: + return (double)MotorControlConfig[POOLER_MOTOR].m_calculatedError; + case WINDER_DANCER: + return (double)MotorControlConfig[WINDER_MOTOR].m_calculatedError; + + } + return 0; +} //******************************************************************************************************************** uint32_t ThreadInitialTestStub(HardwareMotor * request) -- cgit v1.3.1 From 40ae2d14550ff8d9948aac12ba2e8a90c9bad6cb Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Wed, 17 Oct 2018 09:59:56 +0300 Subject: fix pooler length calculation + heater PID band to float --- .../Embedded_SW/Embedded/Modules/Heaters/Heaters.h | 2 +- .../Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters.h b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters.h index f7a2f3079..d19e4e5dd 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters.h +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters.h @@ -24,7 +24,7 @@ typedef struct HeaterPIDControlConfigstruc int id; //HardwarePidControlType char name[20]; int32_t outputproportionalpowerlimit; - int32_t outputproportionalband; + float outputproportionalband; int32_t integraltime; int32_t derivativetime; int32_t sensorcorrectionadjustment; diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 503ef2c37..dec3b8323 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -137,12 +137,12 @@ void ThreadUpdateProcessLength (double length, void *Funcptr) initialpos = 0xFFFF; Poolerinitialpos = 0xFFFF; } - +char Lenstr[150]; uint32_t ThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) { uint32_t positionDiff = 0; double length = 0.0; - char str[150]; + int index = MAX_THREAD_MOTORS_NUM; // if (ThreadControlActive == false) // return OK; @@ -189,9 +189,9 @@ uint32_t ThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) if (PrepareState == true) { //later - add temperatures - TemperatureListString(str); + TemperatureListString(Lenstr); - SendJobProgress(0.0,0,false, str); + SendJobProgress(0.0,0,false, Lenstr); } else { @@ -201,9 +201,9 @@ uint32_t ThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) } if (CurrentProcessedLength>=CurrentRequestedLength ) { - usnprintf(str, 100, "Total processed length: Feeder: %d Pooler %d",(int)TotalProcessedLength,(int)PoolerTotalProcessedLength); - SendJobProgress(0.0,0,false, str); - Report(str,__FILE__,__LINE__,(int)TotalProcessedLength,RpWarning,(int)PoolerTotalProcessedLength,0); + usnprintf(Lenstr, 100, "Total processed length: Feeder: %d Pooler %d",(int)TotalProcessedLength,(int)PoolerTotalProcessedLength); + SendJobProgress(0.0,0,false, Lenstr); + Report(Lenstr,__FILE__,__LINE__,(int)TotalProcessedLength,RpWarning,(int)PoolerTotalProcessedLength,0); // segment/intersegment/distance to spool finished if (ProcessedLengthFuncPtr) ProcessedLengthFuncPtr(); @@ -439,7 +439,7 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) usnprintf(Message, 60, "Dancer %d limit %d value %d Zero %d",DancerId,DancerStopActivityLimit[index],avreageSampleValue,DancersCfg[DancerId].zeropoint); //JobAbortedByUser = true; ThreadControlActive = false; - JobEndReason = JOB_WINDER_DANCER_FAIL+index; + JobEndReason = JOB_WINDER_DANCER_FAIL+DancerId; SendJobProgress(0.0,0,false, Message); //EndState(CurrentJob,Message ); SegmentReady(Module_Thread,ModuleFail); @@ -561,7 +561,7 @@ uint32_t ThreadEmptyCBFunction(uint32_t IfIndex, uint32_t ReadValue) PoolerSpeedControlId = 0xFF; } //SetMotHome(ThreadMotorIdToMotorId[Motor_i]); - LengthCalculationMultiplier = (MotorsCfg[ThreadMotorIdToMotorId[Motor_i]].pulleyradius*2*PI)/(MotorsCfg[ThreadMotorIdToMotorId[Motor_i]].pulseperround*MotorsCfg[ThreadMotorIdToMotorId[Motor_i]].microstep); + PoolerLengthCalculationMultiplier = (MotorsCfg[ThreadMotorIdToMotorId[Motor_i]].pulleyradius*2*PI)/(MotorsCfg[ThreadMotorIdToMotorId[Motor_i]].pulseperround*MotorsCfg[ThreadMotorIdToMotorId[Motor_i]].microstep); PoolerSpeedControlId = AddControlCallback(PoolerThreadLengthCBFunction, eHundredMillisecond,MotorGetPositionFromFPGA,(IfTypeThread*0x100+Motor_i),ThreadMotorIdToMotorId[Motor_i],Motor_i); } if (Motor_i == FEEDER_MOTOR) // dryer motor is speed controlled. later a speed sensor will be utilized, but for now it will not be controlled -- cgit v1.3.1 From 24d42fbd0c7a3202039d0c0f014a91b49d2fab3d Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Wed, 17 Oct 2018 10:04:12 +0300 Subject: fix pooler counter (?) --- Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 576a2bd5a..28e2ecdf0 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -70,10 +70,12 @@ double TotalProcessedLength = 0.0; double LengthCalculationMultiplier; uint32_t PoolerPreviousPosition = 0, PoolerCurrentPosition = 0; -double PoolerCurrentProcessedLength = 0.0; double PoolerTotalProcessedLength = 0.0; double PoolerLengthCalculationMultiplier; +double TempPoolerTotalProcessedLength = 0.0; +double TempTotalProcessedLength = 0.0; + bool PrepareState = false; int CurrentSegmentId = 0; typedef void (* ProcessedLengthFunc)(void); @@ -132,7 +134,6 @@ void ThreadUpdateProcessLength (double length, void *Funcptr) { CurrentRequestedLength = length*100;//Centimetres CurrentProcessedLength = 0; - PoolerCurrentProcessedLength = 0; ProcessedLengthFuncPtr = (ProcessedLengthFunc)Funcptr; initialpos = 0xFFFF; Poolerinitialpos = 0xFFFF; @@ -184,6 +185,7 @@ uint32_t ThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) static int pooler_counter = 0; pooler_counter++; TotalProcessedLength+= (length/100); + TempTotalProcessedLength = TotalProcessedLength; if (pooler_counter%10 == 0) { if (PrepareState == true) @@ -247,7 +249,8 @@ uint32_t PoolerThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) PoolerPreviousPosition = PoolerCurrentPosition; length = (double)(positionDiff)*PoolerLengthCalculationMultiplier; - PoolerCurrentProcessedLength+=length; + PoolerTotalProcessedLength+= (length/100); + TempPoolerTotalProcessedLength = PoolerTotalProcessedLength; return OK; } -- cgit v1.3.1 From 8d8035d7c7382e9aa74f4a42aa1cd9080a4c2095 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Wed, 17 Oct 2018 12:11:53 +0300 Subject: fix diagnostics calculated error --- Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c | 3 ++- Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c index bda086251..44681fb29 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c @@ -426,7 +426,7 @@ void SendDiagnostics(void) DiagnosticsMonitor.n_windertension = DancerErrorCounterIndex[0]; DiagnosticsMonitor.n_pullertension = DancerErrorCounterIndex[1]; DiagnosticsMonitor.n_feedertension = DancerErrorCounterIndex[2]; - DiagnosticsMonitor.n_windertension = DancerErrorValue[0]; + DiagnosticsMonitor.windertension = DancerErrorValue[0]; DiagnosticsMonitor.pullertension = DancerErrorValue[1]; DiagnosticsMonitor.feedertension = DancerErrorValue[2]; DiagnosticsMonitor.n_threadspeed = SpeedCounterIndex; @@ -579,6 +579,7 @@ void SendDiagnostics(void) else { LOG_ERROR(Task_self(),"malloc failed"); + DiagnosticsStop(); } free(diagnosticsresponseContainer.data.data); } diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 28e2ecdf0..54309a187 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -737,7 +737,7 @@ char Endstr[150]; int Motor_i; ThreadControlActive = false; - usnprintf(Endstr, 100, "Total processed length: Feeder: %d Pooler %d",(int)TotalProcessedLength,(int)PoolerTotalProcessedLength); + usnprintf(Endstr, 100, "Total _processed length: Feeder: %d Pooler %d",(int)TotalProcessedLength,(int)PoolerTotalProcessedLength); SendJobProgress(0.0,0,false, Endstr); Report(Endstr,__FILE__,__LINE__,(int)TotalProcessedLength,RpWarning,(int)PoolerTotalProcessedLength,0); -- cgit v1.3.1 From e64ec3bb6dd7294f9765bf4ca032e4aea42509e8 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Mon, 22 Oct 2018 09:57:56 +0300 Subject: IDS - do not switch off valve between segments if used in the next segment. SCREW - preparations for interrupts. Alarm Handling - low temperature. Homing - bi-directional. --- .../PMR/Diagnostics/DispenserHomingRequest.pb-c.c | 19 ++++- .../PMR/Diagnostics/DispenserHomingRequest.pb-c.h | 5 +- .../PMR/Diagnostics/MotorHomingRequest.pb-c.c | 19 ++++- .../PMR/Diagnostics/MotorHomingRequest.pb-c.h | 5 +- .../Drivers/FPGA/FPGA_INTERRUPTS/FPGA_Interrupts.c | 24 ++++--- .../Drivers/FPGA/FPGA_INTERRUPTS/FPGA_Interrupts.h | 5 +- Software/Embedded_SW/Embedded/Main.c | 2 + .../Embedded/Modules/AlarmHandling/AlarmHandling.c | 84 ++++++++++++---------- .../Embedded/Modules/Control/MillisecTask.c | 78 +++++++++++++++++++- .../Embedded/Modules/Control/MillisecTask.h | 1 + .../Modules/Diagnostics/DiagnosticsHoming.c | 77 +++++++++++++------- Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h | 1 + .../Embedded_SW/Embedded/Modules/IDS/IDS_maint.c | 38 ++++++++++ .../Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 29 +++++++- .../Embedded/Modules/Thread/Thread_Winder.c | 7 +- 15 files changed, 312 insertions(+), 82 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserHomingRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserHomingRequest.pb-c.c index e8c084cf7..93ee869e6 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserHomingRequest.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserHomingRequest.pb-c.c @@ -52,7 +52,7 @@ void dispenser_homing_request__free_unpacked assert(message->base.descriptor == &dispenser_homing_request__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } -static const ProtobufCFieldDescriptor dispenser_homing_request__field_descriptors[2] = +static const ProtobufCFieldDescriptor dispenser_homing_request__field_descriptors[3] = { { "Index", @@ -78,15 +78,28 @@ static const ProtobufCFieldDescriptor dispenser_homing_request__field_descriptor 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, + { + "Direction", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(DispenserHomingRequest, has_direction), + offsetof(DispenserHomingRequest, direction), + &motor_direction__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned dispenser_homing_request__field_indices_by_name[] = { + 2, /* field[2] = Direction */ 0, /* field[0] = Index */ 1, /* field[1] = Speed */ }; static const ProtobufCIntRange dispenser_homing_request__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 2 } + { 0, 3 } }; const ProtobufCMessageDescriptor dispenser_homing_request__descriptor = { @@ -96,7 +109,7 @@ const ProtobufCMessageDescriptor dispenser_homing_request__descriptor = "DispenserHomingRequest", "", sizeof(DispenserHomingRequest), - 2, + 3, dispenser_homing_request__field_descriptors, dispenser_homing_request__field_indices_by_name, 1, dispenser_homing_request__number_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserHomingRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserHomingRequest.pb-c.h index 32bc8c117..be6e49a24 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserHomingRequest.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserHomingRequest.pb-c.h @@ -14,6 +14,7 @@ PROTOBUF_C__BEGIN_DECLS # 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 "MotorDirection.pb-c.h" typedef struct _DispenserHomingRequest DispenserHomingRequest; @@ -30,10 +31,12 @@ struct _DispenserHomingRequest int32_t index; protobuf_c_boolean has_speed; double speed; + protobuf_c_boolean has_direction; + MotorDirection direction; }; #define DISPENSER_HOMING_REQUEST__INIT \ { PROTOBUF_C_MESSAGE_INIT (&dispenser_homing_request__descriptor) \ - , 0, 0, 0, 0 } + , 0, 0, 0, 0, 0, MOTOR_DIRECTION__Forward } /* DispenserHomingRequest methods */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/MotorHomingRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/MotorHomingRequest.pb-c.c index 53b923973..6899399f5 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/MotorHomingRequest.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/MotorHomingRequest.pb-c.c @@ -52,7 +52,7 @@ void motor_homing_request__free_unpacked assert(message->base.descriptor == &motor_homing_request__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } -static const ProtobufCFieldDescriptor motor_homing_request__field_descriptors[2] = +static const ProtobufCFieldDescriptor motor_homing_request__field_descriptors[3] = { { "MotorType", @@ -78,15 +78,28 @@ static const ProtobufCFieldDescriptor motor_homing_request__field_descriptors[2] 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, + { + "Direction", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(MotorHomingRequest, has_direction), + offsetof(MotorHomingRequest, direction), + &motor_direction__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned motor_homing_request__field_indices_by_name[] = { + 2, /* field[2] = Direction */ 0, /* field[0] = MotorType */ 1, /* field[1] = Speed */ }; static const ProtobufCIntRange motor_homing_request__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 2 } + { 0, 3 } }; const ProtobufCMessageDescriptor motor_homing_request__descriptor = { @@ -96,7 +109,7 @@ const ProtobufCMessageDescriptor motor_homing_request__descriptor = "MotorHomingRequest", "", sizeof(MotorHomingRequest), - 2, + 3, motor_homing_request__field_descriptors, motor_homing_request__field_indices_by_name, 1, motor_homing_request__number_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/MotorHomingRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/MotorHomingRequest.pb-c.h index 137c6460a..b94b0465a 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/MotorHomingRequest.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/MotorHomingRequest.pb-c.h @@ -15,6 +15,7 @@ PROTOBUF_C__BEGIN_DECLS #endif #include "HardwareMotorType.pb-c.h" +#include "MotorDirection.pb-c.h" typedef struct _MotorHomingRequest MotorHomingRequest; @@ -31,10 +32,12 @@ struct _MotorHomingRequest HardwareMotorType motortype; protobuf_c_boolean has_speed; double speed; + protobuf_c_boolean has_direction; + MotorDirection direction; }; #define MOTOR_HOMING_REQUEST__INIT \ { PROTOBUF_C_MESSAGE_INIT (&motor_homing_request__descriptor) \ - , 0, HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD, 0, 0 } + , 0, HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD, 0, 0, 0, MOTOR_DIRECTION__Forward } /* MotorHomingRequest methods */ diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_INTERRUPTS/FPGA_Interrupts.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_INTERRUPTS/FPGA_Interrupts.c index 4da372ed5..e5c78cf79 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_INTERRUPTS/FPGA_Interrupts.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_INTERRUPTS/FPGA_Interrupts.c @@ -16,19 +16,21 @@ #include "Drivers/Motors/Motor.h" #include "drivers/FPGA/FPGA_SPI_Comm.h" +#include "drivers/FPGA/FPGA_INTERRUPTS/fpga_interrupts.h" #define Screw_Not_Busy_Mask 0x02 volatile uint32_t delay; static bool flag = 0; +SCREW_InterruptCallback Callback_Fptr = NULL; void PortPIntHandler(void)//FPGA1_INTn() { volatile uint32_t temp = F1_Moto_Driver_NBUSY2_D; // read the busy value - delay=400; + /*delay=400; if (GPIOIntStatus(GPIO_PORTP_BASE, false) & GPIO_PIN_0) { @@ -53,14 +55,18 @@ void PortPIntHandler(void)//FPGA1_INTn() while(delay) { delay -=1; - } + }*/ // must be done minimum 20uSec after the move command !!! - temp = F1_Moto_Driver_NBUSY2_L; // read the latch in order to clear the latch value (read it after moving to prevent interrupt before movement) +// temp = F1_Moto_Driver_NBUSY2_L; // read the latch in order to clear the latch value (read it after moving to prevent interrupt before movement) GPIOIntClear(GPIO_PORTP_BASE, GPIO_INT_PIN_0); + + if (Callback_Fptr) + Callback_Fptr(); } -void Screw_Interrupt(bool IsEnable) + +void Screw_Interrupt(bool IsEnable ,SCREW_InterruptCallback callback) { volatile short temp = F1_Moto_Driver_NBUSY2_M; @@ -69,12 +75,14 @@ void Screw_Interrupt(bool IsEnable) temp |= Screw_Not_Busy_Mask; // Mask F1_MOTO_SCREW_A1_NBUSY F1_Moto_Driver_NBUSY2_M = temp; temp = F1_Moto_Driver_NBUSY2_L; // read the latch in order to clear the latch value + Callback_Fptr = callback; } else { temp &= ~Screw_Not_Busy_Mask; // Unask F1_MOTO_SCREW_A1_NBUSY F1_Moto_Driver_NBUSY2_M = temp; temp = F1_Moto_Driver_NBUSY2_L; // read the latch in order to clear the latch value + Callback_Fptr = NULL; } } @@ -86,10 +94,10 @@ void Init_GPI_Interrupts() // **** Settings for FPGA1_INTn ***** // Pin P0 setup - SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOP); // Enable port p - SysCtlDelay(3); - GPIOPinTypeGPIOInput(GPIO_PORTP_BASE, GPIO_PIN_0); // Init PP0 as input - GPIOPadConfigSet(GPIO_PORTP_BASE, GPIO_PIN_0, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU); // Enable weak pullup resistor for PP0 + //SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOP); // Enable port p + //SysCtlDelay(3); + //GPIOPinTypeGPIOInput(GPIO_PORTP_BASE, GPIO_PIN_0); // Init PP0 as input + //GPIOPadConfigSet(GPIO_PORTP_BASE, GPIO_PIN_0, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU); // Enable weak pullup resistor for PP0 // Interrupt setup GPIOIntDisable(GPIO_PORTP_BASE, GPIO_PIN_0); // Disable interrupt for PP0 (in case it was enabled) diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_INTERRUPTS/FPGA_Interrupts.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_INTERRUPTS/FPGA_Interrupts.h index f17ce0bac..7eafc551b 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_INTERRUPTS/FPGA_Interrupts.h +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_INTERRUPTS/FPGA_Interrupts.h @@ -8,9 +8,12 @@ #ifndef DRIVERS_FPGA_FPGA_INTERRUPTS_FPGA_INTERRUPTS_H_ #define DRIVERS_FPGA_FPGA_INTERRUPTS_FPGA_INTERRUPTS_H_ +typedef void (* SCREW_InterruptCallback)(void); + + +void Screw_Interrupt(bool IsEnable ,SCREW_InterruptCallback callback); void Init_GPI_Interrupts(); -void Screw_Interrupt(bool IsEnable); #endif /* DRIVERS_FPGA_FPGA_INTERRUPTS_FPGA_INTERRUPTS_H_ */ diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index 4fa7c52b3..77ad2f6e1 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -51,6 +51,7 @@ extern Semaphore_Handle sdCardSem; #include "drivers/FPGA/FPGA.h" #include +#include #include #include "Drivers/I2C_Communication/I2C.h" @@ -129,6 +130,7 @@ int main(void) Calculateinit(); PortFunctionInit(); + Init_GPI_Interrupts(); #ifdef EVALUATION_BOARD Init_EVB(); #endif diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index 15ebfc632..4ec82cfc2 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -100,42 +100,54 @@ typedef struct char *EventName; }AlarmHandlingItem; AlarmHandlingItem AlarmItem[MAX_SYSTEM_ALARMS]={ -{100,LimitSwitchAlarm,LimitSwitchAlarmEmpty_1,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser1Empty,NULL,"Dispenser1Empty"}, -{100,LimitSwitchAlarm,LimitSwitchAlarmEmpty_2,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser2Empty,NULL,"Dispenser2Empty"}, -{100,LimitSwitchAlarm,LimitSwitchAlarmEmpty_3,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser3Empty,NULL,"Dispenser3Empty"}, -{100,LimitSwitchAlarm,LimitSwitchAlarmEmpty_4,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser4Empty,NULL,"Dispenser4Empty"}, -{100,LimitSwitchAlarm,LimitSwitchAlarmEmpty_5,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser5Empty,NULL,"Dispenser5Empty"}, -{100,LimitSwitchAlarm,LimitSwitchAlarmEmpty_6,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser6Empty,NULL,"Dispenser6Empty"}, -{100,LimitSwitchAlarm,LimitSwitchAlarmEmpty_7,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser7Empty,NULL,"Dispenser7Empty"}, -{100,LimitSwitchAlarm,LimitSwitchAlarmEmpty_8,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser8Empty,NULL,"Dispenser8Empty"}, -/*{100,LimitSwitchAlarm,LimitSwitchAlarmLow_1,false,true,DEBUG_LOG_CATEGORY__Warning,0,0,0,false,EVENT_TYPE__Dispenser1LowLevel,NULL,"Dispenser1LowLevel"}, -{100,LimitSwitchAlarm,LimitSwitchAlarmLow_2,false,true,DEBUG_LOG_CATEGORY__Warning,1,0,0,false,EVENT_TYPE__Dispenser2LowLevel,NULL,"Dispenser2LowLevel"}, -{100,LimitSwitchAlarm,LimitSwitchAlarmLow_3,false,true,DEBUG_LOG_CATEGORY__Warning,2,0,0,false,EVENT_TYPE__Dispenser3LowLevel,NULL,"Dispenser3LowLevel"}, -{100,LimitSwitchAlarm,LimitSwitchAlarmLow_4,false,true,DEBUG_LOG_CATEGORY__Warning,3,0,0,false,EVENT_TYPE__Dispenser4LowLevel,NULL,"Dispenser4LowLevel"}, -{100,LimitSwitchAlarm,LimitSwitchAlarmLow_5,false,true,DEBUG_LOG_CATEGORY__Warning,4,0,0,false,EVENT_TYPE__Dispenser5LowLevel,NULL,"Dispenser5LowLevel"}, -{100,LimitSwitchAlarm,LimitSwitchAlarmLow_6,false,true,DEBUG_LOG_CATEGORY__Warning,5,0,0,false,EVENT_TYPE__Dispenser6LowLevel,NULL,"Dispenser6LowLevel"}, -{100,LimitSwitchAlarm,LimitSwitchAlarmLow_7,false,true,DEBUG_LOG_CATEGORY__Warning,6,0,0,false,EVENT_TYPE__Dispenser7LowLevel,NULL,"Dispenser7LowLevel"}, -{100,LimitSwitchAlarm,LimitSwitchAlarmLow_8,false,true,DEBUG_LOG_CATEGORY__Warning,7,0,0,false,EVENT_TYPE__Dispenser8LowLevel,NULL,"Dispenser8LowLevel"},*/ -{100,TemperatureAlarm,TEMP_SENSE_AN_ENCLOSURETEMP3,300,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__GeneralInternalOverTemperature,NULL,"GeneralInternalOverTemperature"}, -//{100,TemperatureAlarm,TEMP_SENSE_AN_ENCLOSURETEMP1,250,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__GeneralInternalOverTemperature,NULL,"GeneralInternalOverTemperature"}, -//{100,TemperatureAlarm,TEMP_SENSE_AN_ENCLOSURETEMP2,80,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__GeneralInternalOverTemperature,NULL,"GeneralInternalOverTemperature"}, -{100,TemperatureAlarm,TEMP_SENSE_ANALOG_MIXCHIP_TEMP,300,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DyeingHead6OverTemperature,NULL,"DyeingHead6OverTemperature"}, -{100,TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP1,300,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DyeingHead1OverTemperature,NULL,"DyeingHead1OverTemperature"}, -{100,TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP2,300,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DyeingHead2OverTemperature,NULL,"DyeingHead2OverTemperature"}, -{100,TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP3,300,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DyeingHead3OverTemperature,NULL,"DyeingHead3OverTemperature"}, -{100,TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP4,300,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DyeingHead4OverTemperature,NULL,"DyeingHead4OverTemperature"}, -{100,TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP5,300,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DyeingHead5OverTemperature,NULL,"DyeingHead5OverTemperature"}, -{100,TemperatureAlarm,TEMP_SENSE_ANALOG_DRYER_TEMP1,300,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DryerOverTemperature,NULL,"DryerOverTemperature"}, -{100,TemperatureAlarm,TEMP_SENSE_ANALOG_DRYER_TEMP1,300,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DryerOverTemperature,NULL,"DryerOverTemperature"}, -{100,TemperatureAlarm,TEMP_SENSE_ANALOG_DRYER_TEMP1,300,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DryerOverTemperature,NULL,"DryerOverTemperature"}, -{100,PressureAlarm,1,7,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser1Pressure,NULL,"Dispenser1Pressure"}, -{100,PressureAlarm,2,7,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser2Pressure,NULL,"Dispenser2Pressure"}, -{100,PressureAlarm,3,7,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser3Pressure,NULL,"Dispenser3Pressure"}, -{100,PressureAlarm,4,7,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser4Pressure,NULL,"Dispenser4Pressure"}, -{100,PressureAlarm,5,7,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser5Pressure,NULL,"Dispenser5Pressure"}, -{100,PressureAlarm,6,7,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser6Pressure,NULL,"Dispenser6Pressure"}, -{100,PressureAlarm,7,7,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser7Pressure,NULL,"Dispenser7Pressure"}, -{100,PressureAlarm,8,7,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser8Pressure,NULL,"Dispenser8Pressure"}, +{eHundredMillisecond,LimitSwitchAlarm,LimitSwitchAlarmEmpty_1,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser1Empty,NULL,"Dispenser1Empty"}, +{eHundredMillisecond,LimitSwitchAlarm,LimitSwitchAlarmEmpty_2,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser2Empty,NULL,"Dispenser2Empty"}, +{eHundredMillisecond,LimitSwitchAlarm,LimitSwitchAlarmEmpty_3,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser3Empty,NULL,"Dispenser3Empty"}, +{eHundredMillisecond,LimitSwitchAlarm,LimitSwitchAlarmEmpty_4,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser4Empty,NULL,"Dispenser4Empty"}, +{eHundredMillisecond,LimitSwitchAlarm,LimitSwitchAlarmEmpty_5,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser5Empty,NULL,"Dispenser5Empty"}, +{eHundredMillisecond,LimitSwitchAlarm,LimitSwitchAlarmEmpty_6,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser6Empty,NULL,"Dispenser6Empty"}, +{eHundredMillisecond,LimitSwitchAlarm,LimitSwitchAlarmEmpty_7,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser7Empty,NULL,"Dispenser7Empty"}, +{eHundredMillisecond,LimitSwitchAlarm,LimitSwitchAlarmEmpty_8,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__Dispenser8Empty,NULL,"Dispenser8Empty"}, +/*{eHundredMillisecond,LimitSwitchAlarm,LimitSwitchAlarmLow_1,false,true,DEBUG_LOG_CATEGORY__Warning,0,0,0,false,EVENT_TYPE__Dispenser1LowLevel,NULL,"Dispenser1LowLevel"}, +{eHundredMillisecond,LimitSwitchAlarm,LimitSwitchAlarmLow_2,false,true,DEBUG_LOG_CATEGORY__Warning,1,0,0,false,EVENT_TYPE__Dispenser2LowLevel,NULL,"Dispenser2LowLevel"}, +{eHundredMillisecond,LimitSwitchAlarm,LimitSwitchAlarmLow_3,false,true,DEBUG_LOG_CATEGORY__Warning,2,0,0,false,EVENT_TYPE__Dispenser3LowLevel,NULL,"Dispenser3LowLevel"}, +{eHundredMillisecond,LimitSwitchAlarm,LimitSwitchAlarmLow_4,false,true,DEBUG_LOG_CATEGORY__Warning,3,0,0,false,EVENT_TYPE__Dispenser4LowLevel,NULL,"Dispenser4LowLevel"}, +{eHundredMillisecond,LimitSwitchAlarm,LimitSwitchAlarmLow_5,false,true,DEBUG_LOG_CATEGORY__Warning,4,0,0,false,EVENT_TYPE__Dispenser5LowLevel,NULL,"Dispenser5LowLevel"}, +{eHundredMillisecond,LimitSwitchAlarm,LimitSwitchAlarmLow_6,false,true,DEBUG_LOG_CATEGORY__Warning,5,0,0,false,EVENT_TYPE__Dispenser6LowLevel,NULL,"Dispenser6LowLevel"}, +{eHundredMillisecond,LimitSwitchAlarm,LimitSwitchAlarmLow_7,false,true,DEBUG_LOG_CATEGORY__Warning,6,0,0,false,EVENT_TYPE__Dispenser7LowLevel,NULL,"Dispenser7LowLevel"}, +{eHundredMillisecond,LimitSwitchAlarm,LimitSwitchAlarmLow_8,false,true,DEBUG_LOG_CATEGORY__Warning,7,0,0,false,EVENT_TYPE__Dispenser8LowLevel,NULL,"Dispenser8LowLevel"},*/ +{eHundredMillisecond,TemperatureAlarm,TEMP_SENSE_AN_ENCLOSURETEMP3,250,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__GeneralInternalOverTemperature,NULL,"Mixer Over Temperature"}, +//{eHundredMillisecond,TemperatureAlarm,TEMP_SENSE_AN_ENCLOSURETEMP1,250,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__GeneralInternalOverTemperature,NULL,"GeneralInternal Over Temperature"}, +//{eHundredMillisecond,TemperatureAlarm,TEMP_SENSE_AN_ENCLOSURETEMP2,80,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__GeneralInternalOverTemperature,NULL,"GeneralInternal Over Temperature"}, +{eHundredMillisecond,TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP1,250,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DyeingHead1OverTemperature,NULL,"DyeingHead1 Over Temperature"}, +{eHundredMillisecond,TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP2,250,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DyeingHead2OverTemperature,NULL,"DyeingHead2 Over Temperature"}, +{eHundredMillisecond,TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP3,250,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DyeingHead3OverTemperature,NULL,"DyeingHead3 Over Temperature"}, +{eHundredMillisecond,TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP4,250,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DyeingHead4OverTemperature,NULL,"DyeingHead4 Over Temperature"}, +{eHundredMillisecond,TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP5,250,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DyeingHead5OverTemperature,NULL,"DyeingHead5 Over Temperature"}, +{eHundredMillisecond,TemperatureAlarm,TEMP_SENSE_ANALOG_MIXCHIP_TEMP,250,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DyeingHead6OverTemperature,NULL,"DyeingHead6 Over Temperature"}, +{eHundredMillisecond,TemperatureAlarm,TEMP_SENSE_ANALOG_DRYER_TEMP1,250,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DryerOverTemperature,NULL,"Dryer Over Temperature"}, +{eHundredMillisecond,TemperatureAlarm,TEMP_SENSE_ANALOG_DRYER_TEMP1,250,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DryerOverTemperature,NULL,"Dryer Over Temperature"}, +{eHundredMillisecond,TemperatureAlarm,TEMP_SENSE_ANALOG_DRYER_TEMP1,300,true,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DryerOverTemperature,NULL,"Dryer Over Temperature"}, +{eHundredMillisecond,TemperatureAlarm,TEMP_SENSE_AN_ENCLOSURETEMP3,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__GeneralInternalOverTemperature,NULL,"Mixer PT100 Not Working"}, +//{eHundredMillisecond,TemperatureAlarm,TEMP_SENSE_AN_ENCLOSURETEMP1,250,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__GeneralInternalPT100 Not Working,NULL,"GeneralInternalPT100 Not Working"}, +//{eHundredMillisecond,TemperatureAlarm,TEMP_SENSE_AN_ENCLOSURETEMP2,80,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,0,false,EVENT_TYPE__GeneralInternalPT100 Not Working,NULL,"GeneralInternalPT100 Not Working"}, +{eOneSecond,TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP1,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DyeingHead1OverTemperature,NULL,"DyeingHead 1 PT100 Not Working"}, +{eOneSecond,TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP2,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DyeingHead2OverTemperature,NULL,"DyeingHead 2 PT100 Not Working"}, +{eOneSecond,TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP3,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DyeingHead3OverTemperature,NULL,"DyeingHead 3 PT100 Not Working"}, +{eOneSecond,TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP4,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DyeingHead4OverTemperature,NULL,"DyeingHead 4 PT100 Not Working"}, +{eOneSecond,TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP5,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DyeingHead5OverTemperature,NULL,"DyeingHead 5 PT100 Not Working"}, +{eOneSecond,TemperatureAlarm,TEMP_SENSE_ANALOG_MIXCHIP_TEMP,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DyeingHead6OverTemperature,NULL,"DyeingHead 6 PT100 Not Working"}, +{eOneSecond,TemperatureAlarm,TEMP_SENSE_ANALOG_DRYER_TEMP1,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DryerOverTemperature,NULL,"Dryer PT100 Not Working"}, +{eOneSecond,TemperatureAlarm,TEMP_SENSE_ANALOG_DRYER_TEMP1,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DryerOverTemperature,NULL,"Dryer PT100 Not Working"}, +{eHundredMillisecond,TemperatureAlarm,TEMP_SENSE_ANALOG_DRYER_TEMP1,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,10,0,false,EVENT_TYPE__DryerOverTemperature,NULL,"Dryer PT100 Not Working"}, +{eHundredMillisecond,PressureAlarm,1,6,true,DEBUG_LOG_CATEGORY__Error,0xFF,5,0,false,EVENT_TYPE__Dispenser1Pressure,NULL,"Dispenser1Pressure"}, +{eHundredMillisecond,PressureAlarm,2,6,true,DEBUG_LOG_CATEGORY__Error,0xFF,5,0,false,EVENT_TYPE__Dispenser2Pressure,NULL,"Dispenser2Pressure"}, +{eHundredMillisecond,PressureAlarm,3,6,true,DEBUG_LOG_CATEGORY__Error,0xFF,5,0,false,EVENT_TYPE__Dispenser3Pressure,NULL,"Dispenser3Pressure"}, +{eHundredMillisecond,PressureAlarm,4,6,true,DEBUG_LOG_CATEGORY__Error,0xFF,5,0,false,EVENT_TYPE__Dispenser4Pressure,NULL,"Dispenser4Pressure"}, +{eHundredMillisecond,PressureAlarm,5,6,true,DEBUG_LOG_CATEGORY__Error,0xFF,5,0,false,EVENT_TYPE__Dispenser5Pressure,NULL,"Dispenser5Pressure"}, +{eHundredMillisecond,PressureAlarm,6,6,true,DEBUG_LOG_CATEGORY__Error,0xFF,5,0,false,EVENT_TYPE__Dispenser6Pressure,NULL,"Dispenser6Pressure"}, +{eHundredMillisecond,PressureAlarm,7,6,true,DEBUG_LOG_CATEGORY__Error,0xFF,5,0,false,EVENT_TYPE__Dispenser7Pressure,NULL,"Dispenser7Pressure"}, +{eHundredMillisecond,PressureAlarm,8,6,true,DEBUG_LOG_CATEGORY__Error,0xFF,5,0,false,EVENT_TYPE__Dispenser8Pressure,NULL,"Dispenser8Pressure"}, {eOneMinute,MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DRYER_DRIVING,x_STATUS_OCD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,0,false,EVENT_TYPE__MotorDryerOverCurrent,NULL,"MotorDryerOverCurrent"}, {eOneMinute,MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_RDRIVING,x_STATUS_OCD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,0,false,EVENT_TYPE__MotorFeederOverCurrent,NULL,"MotorFeederOverCurrent"}, {eOneMinute,MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_SCREW,x_STATUS_OCD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,0,false,EVENT_TYPE__MotorScrewOverCurrent,NULL,"MotorScrewOverCurrent"}, diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index fa168067f..4ff47b56c 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -33,6 +33,7 @@ #include "drivers/Heater/TemperatureSensor.h" #include "drivers/FPGA/FPGA_SPI_Comm.h" #include "drivers/FPGA/FPGA.h" +#include #include "drivers/Valves/Valve.h" #include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" @@ -67,6 +68,21 @@ typedef struct MillisecMessage{ uint32_t tick; uint8_t messageData[20]; }MillisecMessageStruc; +typedef enum +{ + ScrewMessage, + //ScrewCalculateTemperature, +}ScrewMessages; + +typedef struct ScrewMessage{ + uint16_t messageId; + uint16_t msglen; + uint32_t tick; + // uint32_t SensorId; + // uint32_t Data; +}ScrewMessageStruc; +Task_Handle Screw_Task_Handle; +Mailbox_Handle ScrewMsgQ = NULL; //uint32_t ADC_Data[MAX_ADC_DEVICES] = {0}; //uint32_t TemperatureSensor_Data[MAX_TEMPERATURE_SENSOR_ID] = {0}; @@ -111,7 +127,9 @@ void MillisecInit(void) Error_init(&eb); - MillisecMsgQ = Mailbox_create(sizeof(MillisecMessageStruc), 2, NULL,&eb); + MillisecMsgQ = Mailbox_create(sizeof(MillisecMessageStruc), 5, NULL,&eb); + ScrewMsgQ = Mailbox_create(sizeof(ScrewMessageStruc), 5, NULL,&eb); + for (i=0;idirection == MOTOR_DIRECTION__Forward) //opening the loading system + { + if ( Motor_Id_to_LS_IdUp[MotorId] != MAX_GPI) + { + MotorMovetoLimitSwitch (MotorId,MotorsCfg[MotorId].directionthreadwize, speed, Motor_Id_to_LS_IdUp[MotorId], MotorHomingRequestCallback); + ustrncpy (HomingToken[MotorId], requestContainer->token,36); + return OK; + } + } + else // closing the system into normal work { - MotorMovetoLimitSwitch (MotorId,1-MotorsCfg[MotorId].directionthreadwize, speed, Motor_Id_to_LS_Id[MotorId], MotorHomingRequestCallback); - ustrncpy (HomingToken[MotorId], requestContainer->token,36); - return OK; + if ( Motor_Id_to_LS_IdDown[MotorId] != MAX_GPI) + { + MotorMovetoLimitSwitch (MotorId,1-MotorsCfg[MotorId].directionthreadwize, speed, Motor_Id_to_LS_IdDown[MotorId], MotorHomingRequestCallback); + ustrncpy (HomingToken[MotorId], requestContainer->token,36); + return OK; + } } } } @@ -225,20 +264,10 @@ uint32_t DispenserHomingRequestFunc(MessageContainer* requestContainer) { if ((JobIsActive() == false)&&(isMotorConfigured(MotorId) == true)) { - IDS_HomeDispenser(request->index,speed,DispenserHomingRequestCallback); - /*if ( Motor_Id_to_LS_Id[MotorId] != MAX_GPI) - { - //open dispenser valve dispenser to midtank direction - Control3WayValvesWithCallback ((Valves_t) request->index, MidTank_Dispenser, NULL); //direction: MidTank_Dispenser or Dispenser_Mixer - //Valve_Set((Valves_t) request->index, MidTank_Dispenser); - //open dry air valve in the dispenser - Valve_Set((Valves_t) (request->index+VALVE_2W_MID_AIR_8), Atm_MidTank_ON); - - MotorSetMicroStep(MotorId, 1); - - MotorMovetoLimitSwitch (MotorId,1-MotorsCfg[MotorId].directionthreadwize, speed, Motor_Id_to_LS_Id[MotorId], DispenserHomingRequestCallback); - return OK; - }*/ + if (request->direction == MOTOR_DIRECTION__Backward) //dispenser homing + IDS_HomeDispenser(request->index,speed,DispenserHomingRequestCallback); + else //empty dispenser - support TBD + IDS_EmptyDispenser(request->index,speed,DispenserHomingRequestCallback);//return ERROR; } } diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h index 06e45d1b8..2b8779207 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h @@ -41,6 +41,7 @@ uint32_t IDS_DispenserPidRequestMessage(HardwarePidControl* request); uint32_t IDS_HomeDispenser (uint32_t deviceID, uint32_t speed , callback_fptr callback); uint32_t IDS_StopHomeDispenser (uint32_t deviceID); +uint32_t IDS_EmptyDispenser (uint32_t deviceID, uint32_t speed , callback_fptr callback); uint32_t IDS_CheckDispenserLimitSwitch (LimitSwitchAlarms LS_Id); diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c index 2fbc90c69..b90ed3a1f 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c @@ -28,6 +28,16 @@ FPGA_GPI_ENUM Dispenser_Id_to_LS_Id[MAX_SYSTEM_DISPENSERS] = { GPI_LS_DISPENSER_DOWN_7, //MOTO_DISPENSER_7 = 12, GPI_LS_DISPENSER_DOWN_8, //MOTO_DISPENSER_8 = 13, }; +FPGA_GPI_ENUM Dispenser_Id_to_LS_Empty_Id[MAX_SYSTEM_DISPENSERS] = { + GPI_LS_DISPENSER_UP_1, //MOTO_DISPENSER_1 = 6, + GPI_LS_DISPENSER_UP_2, //MOTO_DISPENSER_2 = 7, + GPI_LS_DISPENSER_UP_3, //MOTO_DISPENSER_3 = 8, + GPI_LS_DISPENSER_UP_4, //MOTO_DISPENSER_4 = 9, + GPI_LS_DISPENSER_UP_5, //MOTO_DISPENSER_5 = 10, + GPI_LS_DISPENSER_UP_6, //MOTO_DISPENSER_6 = 11, + GPI_LS_DISPENSER_UP_7, //MOTO_DISPENSER_7 = 12, + GPI_LS_DISPENSER_UP_8, //MOTO_DISPENSER_8 = 13, +}; FPGA_GPI_ENUM Dispenser_Id_to_Alarm_LS_Id[MAX_SYSTEM_DISPENSERS*2] = { GPI_LS_DISPENSER_UP_1, //MOTO_DISPENSER_1 = 6, GPI_LS_DISPENSER_UP_2, //MOTO_DISPENSER_2 = 7, @@ -128,3 +138,31 @@ uint32_t IDS_CheckDispenserLimitSwitch (LimitSwitchAlarms LS_Id) else return FPGA_Read_limit_Switches(Dispenser_Id_to_Alarm_LS_Id[LS_Id]); } + +uint32_t IDS_EmptyDispenser (uint32_t deviceID, uint32_t speed , callback_fptr callback) +{ + assert(deviceID < MAX_SYSTEM_DISPENSERS); + + if (HomingActive[deviceID] == true) + return ERROR; + else + HomingActive[deviceID] = true; + + HomingRequestCallback[deviceID] = callback; + + TimerMotors_t MotorId = HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1 + deviceID; + if ( Dispenser_Id_to_LS_Empty_Id[deviceID] != MAX_GPI) + { + //open dispenser valve dispenser to midtank direction + Control3WayValvesWithCallback ((Valves_t)deviceID, MidTank_Dispenser, NULL); //direction: MidTank_Dispenser or Dispenser_Mixer + //Valve_Set((Valves_t) request->index, MidTank_Dispenser); + MotorSetMicroStep(deviceID, 1); + //open dry air valve in the dispenser + Valve_Set(IDS_Id_to_AirValve[deviceID], Atm_MidTank_ON); + + + MotorMovetoLimitSwitch (MotorId,1-MotorsCfg[MotorId].directionthreadwize, speed, Dispenser_Id_to_LS_Empty_Id[deviceID], IDS_HomeDispenserCallback); + return OK; + } + return ERROR; +} diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index acd8a8983..3a86bab44 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -151,7 +151,28 @@ void DispenserPrepareReady(void) DispenserPrepareReady(); return OK; } +bool IDS_isDispenserUsedNextSegment(void *JobDetails,int DispenserId, int SegmentId) +{ + JobTicket* JobTicket = JobDetails; + int NextSegment = SegmentId+1; + int Dispenser_i,n_dispensers; + if (JobTicket->n_segments == 0) + return false; + if (JobTicket->n_segments <= NextSegment) + return false; + if (JobTicket->segments[NextSegment]->brushstops[0]->n_dispensers) + { + n_dispensers = JobTicket->segments[NextSegment]->brushstops[0]->n_dispensers; + for (Dispenser_i = 0;Dispenser_i < n_dispensers;Dispenser_i++) + { + if (DispenserId == JobTicket->segments[NextSegment]->brushstops[0]->dispensers[Dispenser_i]->index) //dispenser is in use next segment + return true; + } + } + + return false; +} //******************************************************************************************************************** uint32_t IDS_Valve_PresegmentReady(uint32_t deviceID, uint32_t ReadValue) { @@ -209,14 +230,16 @@ uint32_t IDSPreSegmentState(void *JobDetails, int SegmentId) if (MotorsCfg[HW_Motor_Id].hardwaremotortype != DispenserIdToMotorId[DispenserId])//unconfigured dispenser continue; DispenserPreSegmentReady[DispenserId] = false; - Control3WayValvesWithCallback ((Valves_t)DispenserId, MidTank_Dispenser, IDS_Valve_PresegmentReady); //direction: MidTank_Dispenser or Dispenser_Mixer - + if (IDS_isDispenserUsedNextSegment(JobDetails,DispenserId,SegmentId) == false) + { + Control3WayValvesWithCallback ((Valves_t)DispenserId, MidTank_Dispenser, IDS_Valve_PresegmentReady); //direction: MidTank_Dispenser or Dispenser_Mixer + } MotorStop(HW_Motor_Id,Hard_Hiz); /*if (JobTicket->segments[SegmentId]->brushstops[JobBrushStopId]->dispensers[Dispenser_i]->has_dispenserstepdivision) MotorSetMicroStep(HW_Motor_Id,JobTicket->segments[SegmentId]->brushstops[JobBrushStopId]->dispensers[Dispenser_i]->dispenserstepdivision); else*/ - MotorSetMicroStep(HW_Motor_Id,MotorsCfg[HW_Motor_Id].microstep); + MotorSetMicroStep(HW_Motor_Id,MotorsCfg[HW_Motor_Id].microstep); } } diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index c7dd4f7ae..effa8b2c7 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -8,6 +8,8 @@ #include "thread.h" #include "drivers/Motors/Motor.h" +#include + #include "StateMachines/Printing/PrintingSTM.h" #include "Modules/Control/Control.h" #include "Modules/Control/MillisecTask.h" @@ -21,6 +23,8 @@ #include "drivers/FPGA/FPGA_SPI_Comm.h" #include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" + + bool Winder_ScrewHoming = false; //bool Winder_Active = false; @@ -128,7 +132,7 @@ uint32_t Winder_ScrewAtOffsetCallback(uint32_t deviceID, uint32_t BusyFlag) ScrewNumberOfSteps = 0; DirectionChangeCounter = 0; REPORT_MSG(BusyFlag, "Winder_ScrewAtOffsetCallback"); - + //Screw_Interrupt(true,ScrewFreeInterrupt); PrepareReady(Module_Winder, ModuleDone); return OK; } @@ -338,6 +342,7 @@ uint32_t Winder_End(void) RemoveControlCallback(ScrewControlId,ScrewDirectionChange); CurrentControlledSpeed[SCREW_MOTOR] = 0; pend = MillisecFlushMsgQ(HARDWARE_MOTOR_TYPE__MOTO_SCREW); + //Screw_Interrupt(false,NULL); return MotorStop (HARDWARE_MOTOR_TYPE__MOTO_SCREW,Hard_Hiz); } void Winder_ScrewHomeLimitSwitchInterrupt(void) -- cgit v1.3.1 From ddde99ac703d1e4ccfdea5030042fbf85dfcec38 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Tue, 23 Oct 2018 18:34:18 +0300 Subject: infrastructure for file system commands. rockers disabled --- .../Embedded/Common/SWUpdate/FileSystem.c | 229 +++++++++++++++++++++ .../Embedded/Common/SWUpdate/FileSystem.h | 23 +++ .../Embedded_SW/Embedded/Communication/Container.c | 25 +++ .../Communication/PMR/Common/MessageType.pb-c.c | 26 ++- .../Communication/PMR/Common/MessageType.pb-c.h | 10 +- .../PMR/Diagnostics/DigitalPin.pb-c.c | 105 ---------- .../PMR/Diagnostics/DigitalPin.pb-c.h | 74 ------- .../Communication/PMR/IO/CreateRequest.pb-c.c | 105 ++++++++++ .../Communication/PMR/IO/CreateRequest.pb-c.h | 74 +++++++ .../Communication/PMR/IO/CreateResponse.pb-c.c | 72 +++++++ .../Communication/PMR/IO/CreateResponse.pb-c.h | 70 +++++++ .../Communication/PMR/IO/DeleteRequest.pb-c.c | 92 +++++++++ .../Communication/PMR/IO/DeleteRequest.pb-c.h | 71 +++++++ .../Communication/PMR/IO/DeleteResponse.pb-c.c | 72 +++++++ .../Communication/PMR/IO/DeleteResponse.pb-c.h | 70 +++++++ .../PMR/IO/ExecuteProcessRequest.pb-c.c | 105 ++++++++++ .../PMR/IO/ExecuteProcessRequest.pb-c.h | 72 +++++++ .../PMR/IO/ExecuteProcessResponse.pb-c.c | 92 +++++++++ .../PMR/IO/ExecuteProcessResponse.pb-c.h | 71 +++++++ .../Communication/PMR/IO/FileAttribute.pb-c.c | 47 +++++ .../Communication/PMR/IO/FileAttribute.pb-c.h | 48 +++++ .../PMR/IO/FileChunkUploadRequest.pb-c.c | 119 +++++++++++ .../PMR/IO/FileChunkUploadRequest.pb-c.h | 75 +++++++ .../PMR/IO/FileChunkUploadResponse.pb-c.c | 92 +++++++++ .../PMR/IO/FileChunkUploadResponse.pb-c.h | 72 +++++++ .../Embedded/Communication/PMR/IO/FileInfo.pb-c.c | 157 ++++++++++++++ .../Embedded/Communication/PMR/IO/FileInfo.pb-c.h | 81 ++++++++ .../Communication/PMR/IO/FileUploadRequest.pb-c.c | 105 ++++++++++ .../Communication/PMR/IO/FileUploadRequest.pb-c.h | 73 +++++++ .../Communication/PMR/IO/FileUploadResponse.pb-c.c | 105 ++++++++++ .../Communication/PMR/IO/FileUploadResponse.pb-c.h | 73 +++++++ .../Communication/PMR/IO/GetFilesRequest.pb-c.c | 92 +++++++++ .../Communication/PMR/IO/GetFilesRequest.pb-c.h | 71 +++++++ .../Communication/PMR/IO/GetFilesResponse.pb-c.c | 92 +++++++++ .../Communication/PMR/IO/GetFilesResponse.pb-c.h | 73 +++++++ .../PMR/IO/GetStorageInfoRequest.pb-c.c | 105 ++++++++++ .../PMR/IO/GetStorageInfoRequest.pb-c.h | 74 +++++++ .../PMR/IO/GetStorageInfoResponse.pb-c.c | 72 +++++++ .../PMR/IO/GetStorageInfoResponse.pb-c.h | 70 +++++++ .../Communication/PMR/IO/KillProcessRequest.pb-c.c | 92 +++++++++ .../Communication/PMR/IO/KillProcessRequest.pb-c.h | 71 +++++++ .../PMR/IO/KillProcessResponse.pb-c.c | 72 +++++++ .../PMR/IO/KillProcessResponse.pb-c.h | 70 +++++++ .../Drivers/FPGA/FPGA_INTERRUPTS/FPGA_Interrupts.c | 1 + .../Modules/Diagnostics/DiagnosticsHoming.c | 8 +- .../Embedded/Modules/Thread/Thread_print.c | 8 +- 46 files changed, 3283 insertions(+), 193 deletions(-) create mode 100644 Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c create mode 100644 Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.h delete mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DigitalPin.pb-c.c delete mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DigitalPin.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/CreateRequest.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/CreateRequest.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/CreateResponse.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/CreateResponse.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/DeleteRequest.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/DeleteRequest.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/DeleteResponse.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/DeleteResponse.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/ExecuteProcessRequest.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/ExecuteProcessRequest.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/ExecuteProcessResponse.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/ExecuteProcessResponse.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/FileAttribute.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/FileAttribute.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkUploadRequest.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkUploadRequest.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkUploadResponse.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkUploadResponse.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/FileInfo.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/FileInfo.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/FileUploadRequest.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/FileUploadRequest.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/FileUploadResponse.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/FileUploadResponse.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/GetFilesRequest.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/GetFilesRequest.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/GetFilesResponse.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/GetFilesResponse.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoRequest.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoRequest.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoResponse.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoResponse.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/KillProcessRequest.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/KillProcessRequest.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/KillProcessResponse.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/IO/KillProcessResponse.pb-c.h (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c new file mode 100644 index 000000000..f9806552d --- /dev/null +++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c @@ -0,0 +1,229 @@ +/* + * FileSystem.c + * + * Created on: Oct 23, 2018 + * Author: shlomo + */ +#include "include.h" +#include "Communication/CommunicationTask.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + + +uint32_t FileUploadRequestFunc(MessageContainer* requestContainer) +{ + uint32_t status = OK; + + MessageContainer responseContainer; + + FileUploadRequest* request = file_upload_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + + FileUploadResponse response = FILE_UPLOAD_RESPONSE__INIT; + + + responseContainer = createContainer(MESSAGE_TYPE__FileUploadResponse, requestContainer->token, false, &response, &file_upload_response__pack, &file_upload_response__get_packed_size); + if (status!= OK) + { + responseContainer.error = ERROR_CODE__INVALID_PROCESS_ID; + responseContainer.errormessage = "JOb Active or incorrect parameters"; + } + responseContainer.continuous = false; + uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer)); + size_t container_size = message_container__pack(&responseContainer, container_buffer); + free(responseContainer.data.data); + SendChars(container_buffer, container_size); + + return OK; +} + +uint32_t FileChunkUploadRequestFunc(MessageContainer* requestContainer) +{ + uint32_t status = OK; + + MessageContainer responseContainer; + + FileChunkUploadRequest* request = file_chunk_upload_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + + FileChunkUploadResponse response = FILE_CHUNK_UPLOAD_RESPONSE__INIT; + + + responseContainer = createContainer(MESSAGE_TYPE__FileChunkUploadResponse, requestContainer->token, false, &response, &file_chunk_upload_response__pack, &file_chunk_upload_response__get_packed_size); + if (status!= OK) + { + responseContainer.error = ERROR_CODE__INVALID_PROCESS_ID; + responseContainer.errormessage = "JOb Active or incorrect parameters"; + } + responseContainer.continuous = false; + uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer)); + size_t container_size = message_container__pack(&responseContainer, container_buffer); + free(responseContainer.data.data); + SendChars(container_buffer, container_size); + + return OK; +} +uint32_t ExecuteProcessRequestFunc(MessageContainer* requestContainer) +{ + uint32_t status = OK; + + MessageContainer responseContainer; + + ExecuteProcessRequest* request = execute_process_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + + ExecuteProcessResponse response = EXECUTE_PROCESS_RESPONSE__INIT; + + + responseContainer = createContainer(MESSAGE_TYPE__ExecuteProcessResponse, requestContainer->token, false, &response, &execute_process_response__pack, &execute_process_response__get_packed_size); + if (status!= OK) + { + responseContainer.error = ERROR_CODE__INVALID_PROCESS_ID; + responseContainer.errormessage = "JOb Active or incorrect parameters"; + } + responseContainer.continuous = false; + uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer)); + size_t container_size = message_container__pack(&responseContainer, container_buffer); + free(responseContainer.data.data); + SendChars(container_buffer, container_size); + + return OK; +} +uint32_t KillProcessRequestFunc(MessageContainer* requestContainer) +{ + uint32_t status = OK; + + MessageContainer responseContainer; + + KillProcessRequest* request = kill_process_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + + KillProcessResponse response = KILL_PROCESS_RESPONSE__INIT; + + + responseContainer = createContainer(MESSAGE_TYPE__KillProcessResponse, requestContainer->token, false, &response, &kill_process_response__pack, &kill_process_response__get_packed_size); + if (status!= OK) + { + responseContainer.error = ERROR_CODE__INVALID_PROCESS_ID; + responseContainer.errormessage = "JOb Active or incorrect parameters"; + } + responseContainer.continuous = false; + uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer)); + size_t container_size = message_container__pack(&responseContainer, container_buffer); + free(responseContainer.data.data); + SendChars(container_buffer, container_size); + + return OK; +} +uint32_t CreateRequestFunc(MessageContainer* requestContainer) +{ + uint32_t status = OK; + + MessageContainer responseContainer; + + CreateRequest* request = create_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + + CreateResponse response = CREATE_RESPONSE__INIT; + + + responseContainer = createContainer(MESSAGE_TYPE__CreateResponse, requestContainer->token, false, &response, &create_response__pack, &create_response__get_packed_size); + if (status!= OK) + { + responseContainer.error = ERROR_CODE__INVALID_PROCESS_ID; + responseContainer.errormessage = "JOb Active or incorrect parameters"; + } + responseContainer.continuous = false; + uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer)); + size_t container_size = message_container__pack(&responseContainer, container_buffer); + free(responseContainer.data.data); + SendChars(container_buffer, container_size); + + return OK; +} +uint32_t DeleteRequestFunc(MessageContainer* requestContainer) +{ + uint32_t status = OK; + + MessageContainer responseContainer; + + DeleteRequest* request = delete_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + + DeleteResponse response = DELETE_RESPONSE__INIT; + + + responseContainer = createContainer(MESSAGE_TYPE__DeleteResponse, requestContainer->token, false, &response, &delete_response__pack, &delete_response__get_packed_size); + if (status!= OK) + { + responseContainer.error = ERROR_CODE__INVALID_PROCESS_ID; + responseContainer.errormessage = "JOb Active or incorrect parameters"; + } + responseContainer.continuous = false; + uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer)); + size_t container_size = message_container__pack(&responseContainer, container_buffer); + free(responseContainer.data.data); + SendChars(container_buffer, container_size); + + return OK; +} +uint32_t GetStorageInfoRequestFunc(MessageContainer* requestContainer) +{ + uint32_t status = OK; + + MessageContainer responseContainer; + + GetStorageInfoRequest* request = get_storage_info_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + + GetStorageInfoResponse response = GET_STORAGE_INFO_RESPONSE__INIT; + + + responseContainer = createContainer(MESSAGE_TYPE__GetStorageInfoResponse, requestContainer->token, false, &response, &get_storage_info_response__pack, &get_storage_info_response__get_packed_size); + if (status!= OK) + { + responseContainer.error = ERROR_CODE__INVALID_PROCESS_ID; + responseContainer.errormessage = "JOb Active or incorrect parameters"; + } + responseContainer.continuous = false; + uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer)); + size_t container_size = message_container__pack(&responseContainer, container_buffer); + free(responseContainer.data.data); + SendChars(container_buffer, container_size); + + return OK; +} +uint32_t GetFilesRequestFunc(MessageContainer* requestContainer) +{ + uint32_t status = OK; + + MessageContainer responseContainer; + + GetFilesRequest* request = get_files_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + + GetFilesResponse response = GET_FILES_RESPONSE__INIT; + + + responseContainer = createContainer(MESSAGE_TYPE__GetFilesResponse, requestContainer->token, false, &response, &get_files_response__pack, &get_files_response__get_packed_size); + if (status!= OK) + { + responseContainer.error = ERROR_CODE__INVALID_PROCESS_ID; + responseContainer.errormessage = "JOb Active or incorrect parameters"; + } + responseContainer.continuous = false; + uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer)); + size_t container_size = message_container__pack(&responseContainer, container_buffer); + free(responseContainer.data.data); + SendChars(container_buffer, container_size); + + return OK; +} diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.h b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.h new file mode 100644 index 000000000..4a76a0aad --- /dev/null +++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.h @@ -0,0 +1,23 @@ +/* + * FileSystem.h + * + * Created on: Oct 23, 2018 + * Author: shlomo + */ + +#ifndef COMMON_SWUPDATE_FILESYSTEM_H_ +#define COMMON_SWUPDATE_FILESYSTEM_H_ + +uint32_t FileUploadRequestFunc(MessageContainer* requestContainer); +uint32_t FileChunkUploadRequestFunc(MessageContainer* requestContainer); +uint32_t ExecuteProcessRequestFunc(MessageContainer* requestContainer); +uint32_t KillProcessRequestFunc(MessageContainer* requestContainer); +uint32_t CreateRequestFunc(MessageContainer* requestContainer); +uint32_t DeleteRequestFunc(MessageContainer* requestContainer); +uint32_t GetStorageInfoRequestFunc(MessageContainer* requestContainer); +uint32_t GetFilesRequestFunc(MessageContainer* requestContainer); + + + + +#endif /* COMMON_SWUPDATE_FILESYSTEM_H_ */ diff --git a/Software/Embedded_SW/Embedded/Communication/Container.c b/Software/Embedded_SW/Embedded/Communication/Container.c index a9bffa90d..751f7bfca 100644 --- a/Software/Embedded_SW/Embedded/Communication/Container.c +++ b/Software/Embedded_SW/Embedded/Communication/Container.c @@ -37,6 +37,7 @@ #include "Modules/General/process.h" #include "Modules/Thread/Thread_ex.h" +#include "Common/SWUpdate/FileSystem.h" #include "Communication/CommunicationTask.h" #include "StateMachines/Printing/PrintingSTM.h" @@ -310,6 +311,30 @@ void receive_callback(char* buffer, size_t length) case MESSAGE_TYPE__KeepAliveRequest: KeepAliveRequestFunc(requestContainer); break; + case MESSAGE_TYPE__FileUploadRequest: + FileUploadRequestFunc(requestContainer); + break; + case MESSAGE_TYPE__FileChunkUploadRequest: + FileChunkUploadRequestFunc(requestContainer); + break; + case MESSAGE_TYPE__ExecuteProcessRequest: + ExecuteProcessRequestFunc(requestContainer); + break; + case MESSAGE_TYPE__KillProcessRequest: + KillProcessRequestFunc(requestContainer); + break; + case MESSAGE_TYPE__CreateRequest: + CreateRequestFunc(requestContainer); + break; + case MESSAGE_TYPE__DeleteRequest: + DeleteRequestFunc(requestContainer); + break; + case MESSAGE_TYPE__GetStorageInfoRequest: + GetStorageInfoRequestFunc(requestContainer); + break; + case MESSAGE_TYPE__GetFilesRequest: + GetFilesRequestFunc(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 b708cf4cd..f172f53f5 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[175] = +static const ProtobufCEnumValue message_type__enum_values_by_number[183] = { { "None", "MESSAGE_TYPE__None", 0 }, { "ErrorResponse", "MESSAGE_TYPE__ErrorResponse", 1 }, @@ -184,11 +184,19 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[175] = { "ExecuteProcessResponse", "MESSAGE_TYPE__ExecuteProcessResponse", 7005 }, { "KillProcessRequest", "MESSAGE_TYPE__KillProcessRequest", 7006 }, { "KillProcessResponse", "MESSAGE_TYPE__KillProcessResponse", 7007 }, + { "CreateRequest", "MESSAGE_TYPE__CreateRequest", 7008 }, + { "CreateResponse", "MESSAGE_TYPE__CreateResponse", 7009 }, + { "DeleteRequest", "MESSAGE_TYPE__DeleteRequest", 7010 }, + { "DeleteResponse", "MESSAGE_TYPE__DeleteResponse", 7011 }, + { "GetStorageInfoRequest", "MESSAGE_TYPE__GetStorageInfoRequest", 7012 }, + { "GetStorageInfoResponse", "MESSAGE_TYPE__GetStorageInfoResponse", 7013 }, + { "GetFilesRequest", "MESSAGE_TYPE__GetFilesRequest", 7014 }, + { "GetFilesResponse", "MESSAGE_TYPE__GetFilesResponse", 7015 }, }; static const ProtobufCIntRange message_type__value_ranges[] = { -{0, 0},{3, 2},{1000, 98},{2000, 107},{3000, 147},{4000, 153},{5000, 157},{6000, 161},{7000, 167},{0, 175} +{0, 0},{3, 2},{1000, 98},{2000, 107},{3000, 147},{4000, 153},{5000, 157},{6000, 161},{7000, 167},{0, 183} }; -static const ProtobufCEnumValueIndex message_type__enum_values_by_name[175] = +static const ProtobufCEnumValueIndex message_type__enum_values_by_name[183] = { { "AbortJobRequest", 149 }, { "AbortJobResponse", 150 }, @@ -196,6 +204,10 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[175] = { "CalculateResponse", 3 }, { "ConnectRequest", 163 }, { "ConnectResponse", 164 }, + { "CreateRequest", 175 }, + { "CreateResponse", 176 }, + { "DeleteRequest", 177 }, + { "DeleteResponse", 178 }, { "DirectSynchronizationRequest", 103 }, { "DirectSynchronizationResponse", 104 }, { "DisconnectRequest", 165 }, @@ -220,6 +232,10 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[175] = { "FileChunkUploadResponse", 170 }, { "FileUploadRequest", 167 }, { "FileUploadResponse", 168 }, + { "GetFilesRequest", 181 }, + { "GetFilesResponse", 182 }, + { "GetStorageInfoRequest", 179 }, + { "GetStorageInfoResponse", 180 }, { "JobRequest", 147 }, { "JobResponse", 148 }, { "KeepAliveRequest", 161 }, @@ -373,9 +389,9 @@ const ProtobufCEnumDescriptor message_type__descriptor = "MessageType", "MessageType", "", - 175, + 183, message_type__enum_values_by_number, - 175, + 183, message_type__enum_values_by_name, 9, message_type__value_ranges, 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 05a859f00..a698fc09a 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 @@ -194,7 +194,15 @@ typedef enum _MessageType { MESSAGE_TYPE__ExecuteProcessRequest = 7004, MESSAGE_TYPE__ExecuteProcessResponse = 7005, MESSAGE_TYPE__KillProcessRequest = 7006, - MESSAGE_TYPE__KillProcessResponse = 7007 + MESSAGE_TYPE__KillProcessResponse = 7007, + MESSAGE_TYPE__CreateRequest = 7008, + MESSAGE_TYPE__CreateResponse = 7009, + MESSAGE_TYPE__DeleteRequest = 7010, + MESSAGE_TYPE__DeleteResponse = 7011, + MESSAGE_TYPE__GetStorageInfoRequest = 7012, + MESSAGE_TYPE__GetStorageInfoResponse = 7013, + MESSAGE_TYPE__GetFilesRequest = 7014, + MESSAGE_TYPE__GetFilesResponse = 7015 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(MESSAGE_TYPE) } MessageType; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DigitalPin.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DigitalPin.pb-c.c deleted file mode 100644 index 48e358d3d..000000000 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DigitalPin.pb-c.c +++ /dev/null @@ -1,105 +0,0 @@ -/* Generated by the protocol buffer compiler. DO NOT EDIT! */ -/* Generated from: DigitalPin.proto */ - -/* Do not generate deprecated warnings for self */ -#ifndef PROTOBUF_C__NO_DEPRECATED -#define PROTOBUF_C__NO_DEPRECATED -#endif - -#include "DigitalPin.pb-c.h" -void digital_pin__init - (DigitalPin *message) -{ - static const DigitalPin init_value = DIGITAL_PIN__INIT; - *message = init_value; -} -size_t digital_pin__get_packed_size - (const DigitalPin *message) -{ - assert(message->base.descriptor == &digital_pin__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t digital_pin__pack - (const DigitalPin *message, - uint8_t *out) -{ - assert(message->base.descriptor == &digital_pin__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t digital_pin__pack_to_buffer - (const DigitalPin *message, - ProtobufCBuffer *buffer) -{ - assert(message->base.descriptor == &digital_pin__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -DigitalPin * - digital_pin__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (DigitalPin *) - protobuf_c_message_unpack (&digital_pin__descriptor, - allocator, len, data); -} -void digital_pin__free_unpacked - (DigitalPin *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->base.descriptor == &digital_pin__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -static const ProtobufCFieldDescriptor digital_pin__field_descriptors[2] = -{ - { - "Port", - 1, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, - offsetof(DigitalPin, has_port), - offsetof(DigitalPin, port), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "Value", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(DigitalPin, has_value), - offsetof(DigitalPin, value), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned digital_pin__field_indices_by_name[] = { - 0, /* field[0] = Port */ - 1, /* field[1] = Value */ -}; -static const ProtobufCIntRange digital_pin__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 2 } -}; -const ProtobufCMessageDescriptor digital_pin__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "DigitalPin", - "DigitalPin", - "DigitalPin", - "", - sizeof(DigitalPin), - 2, - digital_pin__field_descriptors, - digital_pin__field_indices_by_name, - 1, digital_pin__number_ranges, - (ProtobufCMessageInit) digital_pin__init, - NULL,NULL,NULL /* reserved[123] */ -}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DigitalPin.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DigitalPin.pb-c.h deleted file mode 100644 index 2fd18cdff..000000000 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DigitalPin.pb-c.h +++ /dev/null @@ -1,74 +0,0 @@ -/* Generated by the protocol buffer compiler. DO NOT EDIT! */ -/* Generated from: DigitalPin.proto */ - -#ifndef PROTOBUF_C_DigitalPin_2eproto__INCLUDED -#define PROTOBUF_C_DigitalPin_2eproto__INCLUDED - -#include - -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 _DigitalPin DigitalPin; - - -/* --- enums --- */ - - -/* --- messages --- */ - -struct _DigitalPin -{ - ProtobufCMessage base; - protobuf_c_boolean has_port; - int32_t port; - protobuf_c_boolean has_value; - protobuf_c_boolean value; -}; -#define DIGITAL_PIN__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&digital_pin__descriptor) \ - , 0, 0, 0, 0 } - - -/* DigitalPin methods */ -void digital_pin__init - (DigitalPin *message); -size_t digital_pin__get_packed_size - (const DigitalPin *message); -size_t digital_pin__pack - (const DigitalPin *message, - uint8_t *out); -size_t digital_pin__pack_to_buffer - (const DigitalPin *message, - ProtobufCBuffer *buffer); -DigitalPin * - digital_pin__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void digital_pin__free_unpacked - (DigitalPin *message, - ProtobufCAllocator *allocator); -/* --- per-message closures --- */ - -typedef void (*DigitalPin_Closure) - (const DigitalPin *message, - void *closure_data); - -/* --- services --- */ - - -/* --- descriptors --- */ - -extern const ProtobufCMessageDescriptor digital_pin__descriptor; - -PROTOBUF_C__END_DECLS - - -#endif /* PROTOBUF_C_DigitalPin_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/CreateRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/CreateRequest.pb-c.c new file mode 100644 index 000000000..611e27607 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/CreateRequest.pb-c.c @@ -0,0 +1,105 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: CreateRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "CreateRequest.pb-c.h" +void create_request__init + (CreateRequest *message) +{ + static const CreateRequest init_value = CREATE_REQUEST__INIT; + *message = init_value; +} +size_t create_request__get_packed_size + (const CreateRequest *message) +{ + assert(message->base.descriptor == &create_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t create_request__pack + (const CreateRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &create_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t create_request__pack_to_buffer + (const CreateRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &create_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CreateRequest * + create_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CreateRequest *) + protobuf_c_message_unpack (&create_request__descriptor, + allocator, len, data); +} +void create_request__free_unpacked + (CreateRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &create_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor create_request__field_descriptors[2] = +{ + { + "Attribute", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(CreateRequest, has_attribute), + offsetof(CreateRequest, attribute), + &file_attribute__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "Path", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(CreateRequest, path), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned create_request__field_indices_by_name[] = { + 0, /* field[0] = Attribute */ + 1, /* field[1] = Path */ +}; +static const ProtobufCIntRange create_request__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor create_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CreateRequest", + "CreateRequest", + "CreateRequest", + "", + sizeof(CreateRequest), + 2, + create_request__field_descriptors, + create_request__field_indices_by_name, + 1, create_request__number_ranges, + (ProtobufCMessageInit) create_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/CreateRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/CreateRequest.pb-c.h new file mode 100644 index 000000000..69bfd8969 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/CreateRequest.pb-c.h @@ -0,0 +1,74 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: CreateRequest.proto */ + +#ifndef PROTOBUF_C_CreateRequest_2eproto__INCLUDED +#define PROTOBUF_C_CreateRequest_2eproto__INCLUDED + +#include + +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 "FileAttribute.pb-c.h" + +typedef struct _CreateRequest CreateRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _CreateRequest +{ + ProtobufCMessage base; + protobuf_c_boolean has_attribute; + FileAttribute attribute; + char *path; +}; +#define CREATE_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&create_request__descriptor) \ + , 0, FILE_ATTRIBUTE__Unspecified, NULL } + + +/* CreateRequest methods */ +void create_request__init + (CreateRequest *message); +size_t create_request__get_packed_size + (const CreateRequest *message); +size_t create_request__pack + (const CreateRequest *message, + uint8_t *out); +size_t create_request__pack_to_buffer + (const CreateRequest *message, + ProtobufCBuffer *buffer); +CreateRequest * + create_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void create_request__free_unpacked + (CreateRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*CreateRequest_Closure) + (const CreateRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor create_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_CreateRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/CreateResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/CreateResponse.pb-c.c new file mode 100644 index 000000000..57784eecf --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/CreateResponse.pb-c.c @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: CreateResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "CreateResponse.pb-c.h" +void create_response__init + (CreateResponse *message) +{ + static const CreateResponse init_value = CREATE_RESPONSE__INIT; + *message = init_value; +} +size_t create_response__get_packed_size + (const CreateResponse *message) +{ + assert(message->base.descriptor == &create_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t create_response__pack + (const CreateResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &create_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t create_response__pack_to_buffer + (const CreateResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &create_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CreateResponse * + create_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CreateResponse *) + protobuf_c_message_unpack (&create_response__descriptor, + allocator, len, data); +} +void create_response__free_unpacked + (CreateResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &create_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +#define create_response__field_descriptors NULL +#define create_response__field_indices_by_name NULL +#define create_response__number_ranges NULL +const ProtobufCMessageDescriptor create_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CreateResponse", + "CreateResponse", + "CreateResponse", + "", + sizeof(CreateResponse), + 0, + create_response__field_descriptors, + create_response__field_indices_by_name, + 0, create_response__number_ranges, + (ProtobufCMessageInit) create_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/CreateResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/CreateResponse.pb-c.h new file mode 100644 index 000000000..bec8189f6 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/CreateResponse.pb-c.h @@ -0,0 +1,70 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: CreateResponse.proto */ + +#ifndef PROTOBUF_C_CreateResponse_2eproto__INCLUDED +#define PROTOBUF_C_CreateResponse_2eproto__INCLUDED + +#include + +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 _CreateResponse CreateResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _CreateResponse +{ + ProtobufCMessage base; +}; +#define CREATE_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&create_response__descriptor) \ + } + + +/* CreateResponse methods */ +void create_response__init + (CreateResponse *message); +size_t create_response__get_packed_size + (const CreateResponse *message); +size_t create_response__pack + (const CreateResponse *message, + uint8_t *out); +size_t create_response__pack_to_buffer + (const CreateResponse *message, + ProtobufCBuffer *buffer); +CreateResponse * + create_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void create_response__free_unpacked + (CreateResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*CreateResponse_Closure) + (const CreateResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor create_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_CreateResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/DeleteRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/DeleteRequest.pb-c.c new file mode 100644 index 000000000..27fd07849 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/DeleteRequest.pb-c.c @@ -0,0 +1,92 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: DeleteRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "DeleteRequest.pb-c.h" +void delete_request__init + (DeleteRequest *message) +{ + static const DeleteRequest init_value = DELETE_REQUEST__INIT; + *message = init_value; +} +size_t delete_request__get_packed_size + (const DeleteRequest *message) +{ + assert(message->base.descriptor == &delete_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t delete_request__pack + (const DeleteRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &delete_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t delete_request__pack_to_buffer + (const DeleteRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &delete_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +DeleteRequest * + delete_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (DeleteRequest *) + protobuf_c_message_unpack (&delete_request__descriptor, + allocator, len, data); +} +void delete_request__free_unpacked + (DeleteRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &delete_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor delete_request__field_descriptors[1] = +{ + { + "Path", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(DeleteRequest, path), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned delete_request__field_indices_by_name[] = { + 0, /* field[0] = Path */ +}; +static const ProtobufCIntRange delete_request__number_ranges[1 + 1] = +{ + { 2, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor delete_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "DeleteRequest", + "DeleteRequest", + "DeleteRequest", + "", + sizeof(DeleteRequest), + 1, + delete_request__field_descriptors, + delete_request__field_indices_by_name, + 1, delete_request__number_ranges, + (ProtobufCMessageInit) delete_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/DeleteRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/DeleteRequest.pb-c.h new file mode 100644 index 000000000..79dabee5e --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/DeleteRequest.pb-c.h @@ -0,0 +1,71 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: DeleteRequest.proto */ + +#ifndef PROTOBUF_C_DeleteRequest_2eproto__INCLUDED +#define PROTOBUF_C_DeleteRequest_2eproto__INCLUDED + +#include + +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 _DeleteRequest DeleteRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _DeleteRequest +{ + ProtobufCMessage base; + char *path; +}; +#define DELETE_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&delete_request__descriptor) \ + , NULL } + + +/* DeleteRequest methods */ +void delete_request__init + (DeleteRequest *message); +size_t delete_request__get_packed_size + (const DeleteRequest *message); +size_t delete_request__pack + (const DeleteRequest *message, + uint8_t *out); +size_t delete_request__pack_to_buffer + (const DeleteRequest *message, + ProtobufCBuffer *buffer); +DeleteRequest * + delete_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void delete_request__free_unpacked + (DeleteRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*DeleteRequest_Closure) + (const DeleteRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor delete_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_DeleteRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/DeleteResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/DeleteResponse.pb-c.c new file mode 100644 index 000000000..7f5aac69c --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/DeleteResponse.pb-c.c @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: DeleteResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "DeleteResponse.pb-c.h" +void delete_response__init + (DeleteResponse *message) +{ + static const DeleteResponse init_value = DELETE_RESPONSE__INIT; + *message = init_value; +} +size_t delete_response__get_packed_size + (const DeleteResponse *message) +{ + assert(message->base.descriptor == &delete_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t delete_response__pack + (const DeleteResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &delete_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t delete_response__pack_to_buffer + (const DeleteResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &delete_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +DeleteResponse * + delete_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (DeleteResponse *) + protobuf_c_message_unpack (&delete_response__descriptor, + allocator, len, data); +} +void delete_response__free_unpacked + (DeleteResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &delete_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +#define delete_response__field_descriptors NULL +#define delete_response__field_indices_by_name NULL +#define delete_response__number_ranges NULL +const ProtobufCMessageDescriptor delete_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "DeleteResponse", + "DeleteResponse", + "DeleteResponse", + "", + sizeof(DeleteResponse), + 0, + delete_response__field_descriptors, + delete_response__field_indices_by_name, + 0, delete_response__number_ranges, + (ProtobufCMessageInit) delete_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/DeleteResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/DeleteResponse.pb-c.h new file mode 100644 index 000000000..3f06abbaa --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/DeleteResponse.pb-c.h @@ -0,0 +1,70 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: DeleteResponse.proto */ + +#ifndef PROTOBUF_C_DeleteResponse_2eproto__INCLUDED +#define PROTOBUF_C_DeleteResponse_2eproto__INCLUDED + +#include + +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 _DeleteResponse DeleteResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _DeleteResponse +{ + ProtobufCMessage base; +}; +#define DELETE_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&delete_response__descriptor) \ + } + + +/* DeleteResponse methods */ +void delete_response__init + (DeleteResponse *message); +size_t delete_response__get_packed_size + (const DeleteResponse *message); +size_t delete_response__pack + (const DeleteResponse *message, + uint8_t *out); +size_t delete_response__pack_to_buffer + (const DeleteResponse *message, + ProtobufCBuffer *buffer); +DeleteResponse * + delete_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void delete_response__free_unpacked + (DeleteResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*DeleteResponse_Closure) + (const DeleteResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor delete_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_DeleteResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/ExecuteProcessRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ExecuteProcessRequest.pb-c.c new file mode 100644 index 000000000..a9c8d5f1b --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ExecuteProcessRequest.pb-c.c @@ -0,0 +1,105 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: ExecuteProcessRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "ExecuteProcessRequest.pb-c.h" +void execute_process_request__init + (ExecuteProcessRequest *message) +{ + static const ExecuteProcessRequest init_value = EXECUTE_PROCESS_REQUEST__INIT; + *message = init_value; +} +size_t execute_process_request__get_packed_size + (const ExecuteProcessRequest *message) +{ + assert(message->base.descriptor == &execute_process_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t execute_process_request__pack + (const ExecuteProcessRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &execute_process_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t execute_process_request__pack_to_buffer + (const ExecuteProcessRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &execute_process_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +ExecuteProcessRequest * + execute_process_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (ExecuteProcessRequest *) + protobuf_c_message_unpack (&execute_process_request__descriptor, + allocator, len, data); +} +void execute_process_request__free_unpacked + (ExecuteProcessRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &execute_process_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor execute_process_request__field_descriptors[2] = +{ + { + "UploadID", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(ExecuteProcessRequest, uploadid), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "FileName", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(ExecuteProcessRequest, filename), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned execute_process_request__field_indices_by_name[] = { + 1, /* field[1] = FileName */ + 0, /* field[0] = UploadID */ +}; +static const ProtobufCIntRange execute_process_request__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor execute_process_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "ExecuteProcessRequest", + "ExecuteProcessRequest", + "ExecuteProcessRequest", + "", + sizeof(ExecuteProcessRequest), + 2, + execute_process_request__field_descriptors, + execute_process_request__field_indices_by_name, + 1, execute_process_request__number_ranges, + (ProtobufCMessageInit) execute_process_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/ExecuteProcessRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ExecuteProcessRequest.pb-c.h new file mode 100644 index 000000000..b8afe6331 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ExecuteProcessRequest.pb-c.h @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: ExecuteProcessRequest.proto */ + +#ifndef PROTOBUF_C_ExecuteProcessRequest_2eproto__INCLUDED +#define PROTOBUF_C_ExecuteProcessRequest_2eproto__INCLUDED + +#include + +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 _ExecuteProcessRequest ExecuteProcessRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _ExecuteProcessRequest +{ + ProtobufCMessage base; + char *uploadid; + char *filename; +}; +#define EXECUTE_PROCESS_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&execute_process_request__descriptor) \ + , NULL, NULL } + + +/* ExecuteProcessRequest methods */ +void execute_process_request__init + (ExecuteProcessRequest *message); +size_t execute_process_request__get_packed_size + (const ExecuteProcessRequest *message); +size_t execute_process_request__pack + (const ExecuteProcessRequest *message, + uint8_t *out); +size_t execute_process_request__pack_to_buffer + (const ExecuteProcessRequest *message, + ProtobufCBuffer *buffer); +ExecuteProcessRequest * + execute_process_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void execute_process_request__free_unpacked + (ExecuteProcessRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*ExecuteProcessRequest_Closure) + (const ExecuteProcessRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor execute_process_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_ExecuteProcessRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/ExecuteProcessResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ExecuteProcessResponse.pb-c.c new file mode 100644 index 000000000..95799299c --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ExecuteProcessResponse.pb-c.c @@ -0,0 +1,92 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: ExecuteProcessResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "ExecuteProcessResponse.pb-c.h" +void execute_process_response__init + (ExecuteProcessResponse *message) +{ + static const ExecuteProcessResponse init_value = EXECUTE_PROCESS_RESPONSE__INIT; + *message = init_value; +} +size_t execute_process_response__get_packed_size + (const ExecuteProcessResponse *message) +{ + assert(message->base.descriptor == &execute_process_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t execute_process_response__pack + (const ExecuteProcessResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &execute_process_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t execute_process_response__pack_to_buffer + (const ExecuteProcessResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &execute_process_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +ExecuteProcessResponse * + execute_process_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (ExecuteProcessResponse *) + protobuf_c_message_unpack (&execute_process_response__descriptor, + allocator, len, data); +} +void execute_process_response__free_unpacked + (ExecuteProcessResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &execute_process_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor execute_process_response__field_descriptors[1] = +{ + { + "ProcessID", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(ExecuteProcessResponse, processid), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned execute_process_response__field_indices_by_name[] = { + 0, /* field[0] = ProcessID */ +}; +static const ProtobufCIntRange execute_process_response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor execute_process_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "ExecuteProcessResponse", + "ExecuteProcessResponse", + "ExecuteProcessResponse", + "", + sizeof(ExecuteProcessResponse), + 1, + execute_process_response__field_descriptors, + execute_process_response__field_indices_by_name, + 1, execute_process_response__number_ranges, + (ProtobufCMessageInit) execute_process_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/ExecuteProcessResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ExecuteProcessResponse.pb-c.h new file mode 100644 index 000000000..cb3fd586b --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/ExecuteProcessResponse.pb-c.h @@ -0,0 +1,71 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: ExecuteProcessResponse.proto */ + +#ifndef PROTOBUF_C_ExecuteProcessResponse_2eproto__INCLUDED +#define PROTOBUF_C_ExecuteProcessResponse_2eproto__INCLUDED + +#include + +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 _ExecuteProcessResponse ExecuteProcessResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _ExecuteProcessResponse +{ + ProtobufCMessage base; + char *processid; +}; +#define EXECUTE_PROCESS_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&execute_process_response__descriptor) \ + , NULL } + + +/* ExecuteProcessResponse methods */ +void execute_process_response__init + (ExecuteProcessResponse *message); +size_t execute_process_response__get_packed_size + (const ExecuteProcessResponse *message); +size_t execute_process_response__pack + (const ExecuteProcessResponse *message, + uint8_t *out); +size_t execute_process_response__pack_to_buffer + (const ExecuteProcessResponse *message, + ProtobufCBuffer *buffer); +ExecuteProcessResponse * + execute_process_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void execute_process_response__free_unpacked + (ExecuteProcessResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*ExecuteProcessResponse_Closure) + (const ExecuteProcessResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor execute_process_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_ExecuteProcessResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileAttribute.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileAttribute.pb-c.c new file mode 100644 index 000000000..e1462f37e --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileAttribute.pb-c.c @@ -0,0 +1,47 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: FileAttribute.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "FileAttribute.pb-c.h" +static const ProtobufCEnumValue file_attribute__enum_values_by_number[7] = +{ + { "Unspecified", "FILE_ATTRIBUTE__Unspecified", 0 }, + { "ReadOnly", "FILE_ATTRIBUTE__ReadOnly", 1 }, + { "Hidden", "FILE_ATTRIBUTE__Hidden", 2 }, + { "System", "FILE_ATTRIBUTE__System", 4 }, + { "VolumeLabel", "FILE_ATTRIBUTE__VolumeLabel", 8 }, + { "Directory", "FILE_ATTRIBUTE__Directory", 16 }, + { "Archive", "FILE_ATTRIBUTE__Archive", 32 }, +}; +static const ProtobufCIntRange file_attribute__value_ranges[] = { +{0, 0},{4, 3},{8, 4},{16, 5},{32, 6},{0, 7} +}; +static const ProtobufCEnumValueIndex file_attribute__enum_values_by_name[7] = +{ + { "Archive", 6 }, + { "Directory", 5 }, + { "Hidden", 2 }, + { "ReadOnly", 1 }, + { "System", 3 }, + { "Unspecified", 0 }, + { "VolumeLabel", 4 }, +}; +const ProtobufCEnumDescriptor file_attribute__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "FileAttribute", + "FileAttribute", + "FileAttribute", + "", + 7, + file_attribute__enum_values_by_number, + 7, + file_attribute__enum_values_by_name, + 5, + file_attribute__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileAttribute.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileAttribute.pb-c.h new file mode 100644 index 000000000..5ba7f4f44 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileAttribute.pb-c.h @@ -0,0 +1,48 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: FileAttribute.proto */ + +#ifndef PROTOBUF_C_FileAttribute_2eproto__INCLUDED +#define PROTOBUF_C_FileAttribute_2eproto__INCLUDED + +#include + +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 _FileAttribute { + FILE_ATTRIBUTE__Unspecified = 0, + FILE_ATTRIBUTE__Archive = 32, + FILE_ATTRIBUTE__Directory = 16, + FILE_ATTRIBUTE__Hidden = 2, + FILE_ATTRIBUTE__ReadOnly = 1, + FILE_ATTRIBUTE__System = 4, + FILE_ATTRIBUTE__VolumeLabel = 8 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(FILE_ATTRIBUTE) +} FileAttribute; + +/* --- messages --- */ + +/* --- per-message closures --- */ + + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCEnumDescriptor file_attribute__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_FileAttribute_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkUploadRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkUploadRequest.pb-c.c new file mode 100644 index 000000000..a4ca27f4f --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkUploadRequest.pb-c.c @@ -0,0 +1,119 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: FileChunkUploadRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "FileChunkUploadRequest.pb-c.h" +void file_chunk_upload_request__init + (FileChunkUploadRequest *message) +{ + static const FileChunkUploadRequest init_value = FILE_CHUNK_UPLOAD_REQUEST__INIT; + *message = init_value; +} +size_t file_chunk_upload_request__get_packed_size + (const FileChunkUploadRequest *message) +{ + assert(message->base.descriptor == &file_chunk_upload_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t file_chunk_upload_request__pack + (const FileChunkUploadRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &file_chunk_upload_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t file_chunk_upload_request__pack_to_buffer + (const FileChunkUploadRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &file_chunk_upload_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +FileChunkUploadRequest * + file_chunk_upload_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (FileChunkUploadRequest *) + protobuf_c_message_unpack (&file_chunk_upload_request__descriptor, + allocator, len, data); +} +void file_chunk_upload_request__free_unpacked + (FileChunkUploadRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &file_chunk_upload_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor file_chunk_upload_request__field_descriptors[3] = +{ + { + "UploadID", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(FileChunkUploadRequest, uploadid), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "Buffer", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BYTES, + offsetof(FileChunkUploadRequest, has_buffer), + offsetof(FileChunkUploadRequest, buffer), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "IsCanceled", + 4, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(FileChunkUploadRequest, has_iscanceled), + offsetof(FileChunkUploadRequest, iscanceled), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned file_chunk_upload_request__field_indices_by_name[] = { + 1, /* field[1] = Buffer */ + 2, /* field[2] = IsCanceled */ + 0, /* field[0] = UploadID */ +}; +static const ProtobufCIntRange file_chunk_upload_request__number_ranges[2 + 1] = +{ + { 1, 0 }, + { 4, 2 }, + { 0, 3 } +}; +const ProtobufCMessageDescriptor file_chunk_upload_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "FileChunkUploadRequest", + "FileChunkUploadRequest", + "FileChunkUploadRequest", + "", + sizeof(FileChunkUploadRequest), + 3, + file_chunk_upload_request__field_descriptors, + file_chunk_upload_request__field_indices_by_name, + 2, file_chunk_upload_request__number_ranges, + (ProtobufCMessageInit) file_chunk_upload_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkUploadRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkUploadRequest.pb-c.h new file mode 100644 index 000000000..5b084a772 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkUploadRequest.pb-c.h @@ -0,0 +1,75 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: FileChunkUploadRequest.proto */ + +#ifndef PROTOBUF_C_FileChunkUploadRequest_2eproto__INCLUDED +#define PROTOBUF_C_FileChunkUploadRequest_2eproto__INCLUDED + +#include + +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 _FileChunkUploadRequest FileChunkUploadRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _FileChunkUploadRequest +{ + ProtobufCMessage base; + char *uploadid; + protobuf_c_boolean has_buffer; + ProtobufCBinaryData buffer; + protobuf_c_boolean has_iscanceled; + protobuf_c_boolean iscanceled; +}; +#define FILE_CHUNK_UPLOAD_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&file_chunk_upload_request__descriptor) \ + , NULL, 0, {0,NULL}, 0, 0 } + + +/* FileChunkUploadRequest methods */ +void file_chunk_upload_request__init + (FileChunkUploadRequest *message); +size_t file_chunk_upload_request__get_packed_size + (const FileChunkUploadRequest *message); +size_t file_chunk_upload_request__pack + (const FileChunkUploadRequest *message, + uint8_t *out); +size_t file_chunk_upload_request__pack_to_buffer + (const FileChunkUploadRequest *message, + ProtobufCBuffer *buffer); +FileChunkUploadRequest * + file_chunk_upload_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void file_chunk_upload_request__free_unpacked + (FileChunkUploadRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*FileChunkUploadRequest_Closure) + (const FileChunkUploadRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor file_chunk_upload_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_FileChunkUploadRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkUploadResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkUploadResponse.pb-c.c new file mode 100644 index 000000000..453421e03 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkUploadResponse.pb-c.c @@ -0,0 +1,92 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: FileChunkUploadResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "FileChunkUploadResponse.pb-c.h" +void file_chunk_upload_response__init + (FileChunkUploadResponse *message) +{ + static const FileChunkUploadResponse init_value = FILE_CHUNK_UPLOAD_RESPONSE__INIT; + *message = init_value; +} +size_t file_chunk_upload_response__get_packed_size + (const FileChunkUploadResponse *message) +{ + assert(message->base.descriptor == &file_chunk_upload_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t file_chunk_upload_response__pack + (const FileChunkUploadResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &file_chunk_upload_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t file_chunk_upload_response__pack_to_buffer + (const FileChunkUploadResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &file_chunk_upload_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +FileChunkUploadResponse * + file_chunk_upload_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (FileChunkUploadResponse *) + protobuf_c_message_unpack (&file_chunk_upload_response__descriptor, + allocator, len, data); +} +void file_chunk_upload_response__free_unpacked + (FileChunkUploadResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &file_chunk_upload_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor file_chunk_upload_response__field_descriptors[1] = +{ + { + "IsCanceled", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(FileChunkUploadResponse, has_iscanceled), + offsetof(FileChunkUploadResponse, iscanceled), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned file_chunk_upload_response__field_indices_by_name[] = { + 0, /* field[0] = IsCanceled */ +}; +static const ProtobufCIntRange file_chunk_upload_response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor file_chunk_upload_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "FileChunkUploadResponse", + "FileChunkUploadResponse", + "FileChunkUploadResponse", + "", + sizeof(FileChunkUploadResponse), + 1, + file_chunk_upload_response__field_descriptors, + file_chunk_upload_response__field_indices_by_name, + 1, file_chunk_upload_response__number_ranges, + (ProtobufCMessageInit) file_chunk_upload_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkUploadResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkUploadResponse.pb-c.h new file mode 100644 index 000000000..82e95302e --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileChunkUploadResponse.pb-c.h @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: FileChunkUploadResponse.proto */ + +#ifndef PROTOBUF_C_FileChunkUploadResponse_2eproto__INCLUDED +#define PROTOBUF_C_FileChunkUploadResponse_2eproto__INCLUDED + +#include + +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 _FileChunkUploadResponse FileChunkUploadResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _FileChunkUploadResponse +{ + ProtobufCMessage base; + protobuf_c_boolean has_iscanceled; + protobuf_c_boolean iscanceled; +}; +#define FILE_CHUNK_UPLOAD_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&file_chunk_upload_response__descriptor) \ + , 0, 0 } + + +/* FileChunkUploadResponse methods */ +void file_chunk_upload_response__init + (FileChunkUploadResponse *message); +size_t file_chunk_upload_response__get_packed_size + (const FileChunkUploadResponse *message); +size_t file_chunk_upload_response__pack + (const FileChunkUploadResponse *message, + uint8_t *out); +size_t file_chunk_upload_response__pack_to_buffer + (const FileChunkUploadResponse *message, + ProtobufCBuffer *buffer); +FileChunkUploadResponse * + file_chunk_upload_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void file_chunk_upload_response__free_unpacked + (FileChunkUploadResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*FileChunkUploadResponse_Closure) + (const FileChunkUploadResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor file_chunk_upload_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_FileChunkUploadResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileInfo.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileInfo.pb-c.c new file mode 100644 index 000000000..a27b5b1fc --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileInfo.pb-c.c @@ -0,0 +1,157 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: FileInfo.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "FileInfo.pb-c.h" +void file_info__init + (FileInfo *message) +{ + static const FileInfo init_value = FILE_INFO__INIT; + *message = init_value; +} +size_t file_info__get_packed_size + (const FileInfo *message) +{ + assert(message->base.descriptor == &file_info__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t file_info__pack + (const FileInfo *message, + uint8_t *out) +{ + assert(message->base.descriptor == &file_info__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t file_info__pack_to_buffer + (const FileInfo *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &file_info__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +FileInfo * + file_info__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (FileInfo *) + protobuf_c_message_unpack (&file_info__descriptor, + allocator, len, data); +} +void file_info__free_unpacked + (FileInfo *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &file_info__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor file_info__field_descriptors[6] = +{ + { + "Name", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(FileInfo, name), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "FullPath", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(FileInfo, fullpath), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "Length", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT32, + offsetof(FileInfo, has_length), + offsetof(FileInfo, length), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "LastModifiedDate", + 4, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT32, + offsetof(FileInfo, has_lastmodifieddate), + offsetof(FileInfo, lastmodifieddate), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "LastModifiedTime", + 5, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT32, + offsetof(FileInfo, has_lastmodifiedtime), + offsetof(FileInfo, lastmodifiedtime), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "Attribute", + 6, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(FileInfo, has_attribute), + offsetof(FileInfo, attribute), + &file_attribute__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned file_info__field_indices_by_name[] = { + 5, /* field[5] = Attribute */ + 1, /* field[1] = FullPath */ + 3, /* field[3] = LastModifiedDate */ + 4, /* field[4] = LastModifiedTime */ + 2, /* field[2] = Length */ + 0, /* field[0] = Name */ +}; +static const ProtobufCIntRange file_info__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 6 } +}; +const ProtobufCMessageDescriptor file_info__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "FileInfo", + "FileInfo", + "FileInfo", + "", + sizeof(FileInfo), + 6, + file_info__field_descriptors, + file_info__field_indices_by_name, + 1, file_info__number_ranges, + (ProtobufCMessageInit) file_info__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileInfo.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileInfo.pb-c.h new file mode 100644 index 000000000..5875b98a8 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileInfo.pb-c.h @@ -0,0 +1,81 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: FileInfo.proto */ + +#ifndef PROTOBUF_C_FileInfo_2eproto__INCLUDED +#define PROTOBUF_C_FileInfo_2eproto__INCLUDED + +#include + +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 "FileAttribute.pb-c.h" + +typedef struct _FileInfo FileInfo; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _FileInfo +{ + ProtobufCMessage base; + char *name; + char *fullpath; + protobuf_c_boolean has_length; + int32_t length; + protobuf_c_boolean has_lastmodifieddate; + int32_t lastmodifieddate; + protobuf_c_boolean has_lastmodifiedtime; + int32_t lastmodifiedtime; + protobuf_c_boolean has_attribute; + FileAttribute attribute; +}; +#define FILE_INFO__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&file_info__descriptor) \ + , NULL, NULL, 0, 0, 0, 0, 0, 0, 0, FILE_ATTRIBUTE__Unspecified } + + +/* FileInfo methods */ +void file_info__init + (FileInfo *message); +size_t file_info__get_packed_size + (const FileInfo *message); +size_t file_info__pack + (const FileInfo *message, + uint8_t *out); +size_t file_info__pack_to_buffer + (const FileInfo *message, + ProtobufCBuffer *buffer); +FileInfo * + file_info__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void file_info__free_unpacked + (FileInfo *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*FileInfo_Closure) + (const FileInfo *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor file_info__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_FileInfo_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileUploadRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileUploadRequest.pb-c.c new file mode 100644 index 000000000..4b17c92ed --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileUploadRequest.pb-c.c @@ -0,0 +1,105 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: FileUploadRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "FileUploadRequest.pb-c.h" +void file_upload_request__init + (FileUploadRequest *message) +{ + static const FileUploadRequest init_value = FILE_UPLOAD_REQUEST__INIT; + *message = init_value; +} +size_t file_upload_request__get_packed_size + (const FileUploadRequest *message) +{ + assert(message->base.descriptor == &file_upload_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t file_upload_request__pack + (const FileUploadRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &file_upload_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t file_upload_request__pack_to_buffer + (const FileUploadRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &file_upload_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +FileUploadRequest * + file_upload_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (FileUploadRequest *) + protobuf_c_message_unpack (&file_upload_request__descriptor, + allocator, len, data); +} +void file_upload_request__free_unpacked + (FileUploadRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &file_upload_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor file_upload_request__field_descriptors[2] = +{ + { + "FileName", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(FileUploadRequest, filename), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "Length", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT64, + offsetof(FileUploadRequest, has_length), + offsetof(FileUploadRequest, length), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned file_upload_request__field_indices_by_name[] = { + 0, /* field[0] = FileName */ + 1, /* field[1] = Length */ +}; +static const ProtobufCIntRange file_upload_request__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor file_upload_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "FileUploadRequest", + "FileUploadRequest", + "FileUploadRequest", + "", + sizeof(FileUploadRequest), + 2, + file_upload_request__field_descriptors, + file_upload_request__field_indices_by_name, + 1, file_upload_request__number_ranges, + (ProtobufCMessageInit) file_upload_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileUploadRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileUploadRequest.pb-c.h new file mode 100644 index 000000000..c4b936d12 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileUploadRequest.pb-c.h @@ -0,0 +1,73 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: FileUploadRequest.proto */ + +#ifndef PROTOBUF_C_FileUploadRequest_2eproto__INCLUDED +#define PROTOBUF_C_FileUploadRequest_2eproto__INCLUDED + +#include + +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 _FileUploadRequest FileUploadRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _FileUploadRequest +{ + ProtobufCMessage base; + char *filename; + protobuf_c_boolean has_length; + int64_t length; +}; +#define FILE_UPLOAD_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&file_upload_request__descriptor) \ + , NULL, 0, 0 } + + +/* FileUploadRequest methods */ +void file_upload_request__init + (FileUploadRequest *message); +size_t file_upload_request__get_packed_size + (const FileUploadRequest *message); +size_t file_upload_request__pack + (const FileUploadRequest *message, + uint8_t *out); +size_t file_upload_request__pack_to_buffer + (const FileUploadRequest *message, + ProtobufCBuffer *buffer); +FileUploadRequest * + file_upload_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void file_upload_request__free_unpacked + (FileUploadRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*FileUploadRequest_Closure) + (const FileUploadRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor file_upload_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_FileUploadRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileUploadResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileUploadResponse.pb-c.c new file mode 100644 index 000000000..bb7cf5cb7 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileUploadResponse.pb-c.c @@ -0,0 +1,105 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: FileUploadResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "FileUploadResponse.pb-c.h" +void file_upload_response__init + (FileUploadResponse *message) +{ + static const FileUploadResponse init_value = FILE_UPLOAD_RESPONSE__INIT; + *message = init_value; +} +size_t file_upload_response__get_packed_size + (const FileUploadResponse *message) +{ + assert(message->base.descriptor == &file_upload_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t file_upload_response__pack + (const FileUploadResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &file_upload_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t file_upload_response__pack_to_buffer + (const FileUploadResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &file_upload_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +FileUploadResponse * + file_upload_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (FileUploadResponse *) + protobuf_c_message_unpack (&file_upload_response__descriptor, + allocator, len, data); +} +void file_upload_response__free_unpacked + (FileUploadResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &file_upload_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor file_upload_response__field_descriptors[2] = +{ + { + "UploadID", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(FileUploadResponse, uploadid), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "MaxChunkLength", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT64, + offsetof(FileUploadResponse, has_maxchunklength), + offsetof(FileUploadResponse, maxchunklength), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned file_upload_response__field_indices_by_name[] = { + 1, /* field[1] = MaxChunkLength */ + 0, /* field[0] = UploadID */ +}; +static const ProtobufCIntRange file_upload_response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor file_upload_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "FileUploadResponse", + "FileUploadResponse", + "FileUploadResponse", + "", + sizeof(FileUploadResponse), + 2, + file_upload_response__field_descriptors, + file_upload_response__field_indices_by_name, + 1, file_upload_response__number_ranges, + (ProtobufCMessageInit) file_upload_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileUploadResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileUploadResponse.pb-c.h new file mode 100644 index 000000000..a26abf41f --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/FileUploadResponse.pb-c.h @@ -0,0 +1,73 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: FileUploadResponse.proto */ + +#ifndef PROTOBUF_C_FileUploadResponse_2eproto__INCLUDED +#define PROTOBUF_C_FileUploadResponse_2eproto__INCLUDED + +#include + +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 _FileUploadResponse FileUploadResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _FileUploadResponse +{ + ProtobufCMessage base; + char *uploadid; + protobuf_c_boolean has_maxchunklength; + int64_t maxchunklength; +}; +#define FILE_UPLOAD_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&file_upload_response__descriptor) \ + , NULL, 0, 0 } + + +/* FileUploadResponse methods */ +void file_upload_response__init + (FileUploadResponse *message); +size_t file_upload_response__get_packed_size + (const FileUploadResponse *message); +size_t file_upload_response__pack + (const FileUploadResponse *message, + uint8_t *out); +size_t file_upload_response__pack_to_buffer + (const FileUploadResponse *message, + ProtobufCBuffer *buffer); +FileUploadResponse * + file_upload_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void file_upload_response__free_unpacked + (FileUploadResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*FileUploadResponse_Closure) + (const FileUploadResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor file_upload_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_FileUploadResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetFilesRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetFilesRequest.pb-c.c new file mode 100644 index 000000000..1997e92dd --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetFilesRequest.pb-c.c @@ -0,0 +1,92 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: GetFilesRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "GetFilesRequest.pb-c.h" +void get_files_request__init + (GetFilesRequest *message) +{ + static const GetFilesRequest init_value = GET_FILES_REQUEST__INIT; + *message = init_value; +} +size_t get_files_request__get_packed_size + (const GetFilesRequest *message) +{ + assert(message->base.descriptor == &get_files_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t get_files_request__pack + (const GetFilesRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &get_files_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t get_files_request__pack_to_buffer + (const GetFilesRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &get_files_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +GetFilesRequest * + get_files_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (GetFilesRequest *) + protobuf_c_message_unpack (&get_files_request__descriptor, + allocator, len, data); +} +void get_files_request__free_unpacked + (GetFilesRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &get_files_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor get_files_request__field_descriptors[1] = +{ + { + "Path", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(GetFilesRequest, path), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned get_files_request__field_indices_by_name[] = { + 0, /* field[0] = Path */ +}; +static const ProtobufCIntRange get_files_request__number_ranges[1 + 1] = +{ + { 2, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor get_files_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "GetFilesRequest", + "GetFilesRequest", + "GetFilesRequest", + "", + sizeof(GetFilesRequest), + 1, + get_files_request__field_descriptors, + get_files_request__field_indices_by_name, + 1, get_files_request__number_ranges, + (ProtobufCMessageInit) get_files_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetFilesRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetFilesRequest.pb-c.h new file mode 100644 index 000000000..909885b75 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetFilesRequest.pb-c.h @@ -0,0 +1,71 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: GetFilesRequest.proto */ + +#ifndef PROTOBUF_C_GetFilesRequest_2eproto__INCLUDED +#define PROTOBUF_C_GetFilesRequest_2eproto__INCLUDED + +#include + +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 _GetFilesRequest GetFilesRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _GetFilesRequest +{ + ProtobufCMessage base; + char *path; +}; +#define GET_FILES_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&get_files_request__descriptor) \ + , NULL } + + +/* GetFilesRequest methods */ +void get_files_request__init + (GetFilesRequest *message); +size_t get_files_request__get_packed_size + (const GetFilesRequest *message); +size_t get_files_request__pack + (const GetFilesRequest *message, + uint8_t *out); +size_t get_files_request__pack_to_buffer + (const GetFilesRequest *message, + ProtobufCBuffer *buffer); +GetFilesRequest * + get_files_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void get_files_request__free_unpacked + (GetFilesRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*GetFilesRequest_Closure) + (const GetFilesRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor get_files_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_GetFilesRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetFilesResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetFilesResponse.pb-c.c new file mode 100644 index 000000000..5678697f0 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetFilesResponse.pb-c.c @@ -0,0 +1,92 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: GetFilesResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "GetFilesResponse.pb-c.h" +void get_files_response__init + (GetFilesResponse *message) +{ + static const GetFilesResponse init_value = GET_FILES_RESPONSE__INIT; + *message = init_value; +} +size_t get_files_response__get_packed_size + (const GetFilesResponse *message) +{ + assert(message->base.descriptor == &get_files_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t get_files_response__pack + (const GetFilesResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &get_files_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t get_files_response__pack_to_buffer + (const GetFilesResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &get_files_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +GetFilesResponse * + get_files_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (GetFilesResponse *) + protobuf_c_message_unpack (&get_files_response__descriptor, + allocator, len, data); +} +void get_files_response__free_unpacked + (GetFilesResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &get_files_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor get_files_response__field_descriptors[1] = +{ + { + "Items", + 1, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(GetFilesResponse, n_items), + offsetof(GetFilesResponse, items), + &file_info__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned get_files_response__field_indices_by_name[] = { + 0, /* field[0] = Items */ +}; +static const ProtobufCIntRange get_files_response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor get_files_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "GetFilesResponse", + "GetFilesResponse", + "GetFilesResponse", + "", + sizeof(GetFilesResponse), + 1, + get_files_response__field_descriptors, + get_files_response__field_indices_by_name, + 1, get_files_response__number_ranges, + (ProtobufCMessageInit) get_files_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetFilesResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetFilesResponse.pb-c.h new file mode 100644 index 000000000..c1f8ae6b9 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetFilesResponse.pb-c.h @@ -0,0 +1,73 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: GetFilesResponse.proto */ + +#ifndef PROTOBUF_C_GetFilesResponse_2eproto__INCLUDED +#define PROTOBUF_C_GetFilesResponse_2eproto__INCLUDED + +#include + +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 "FileInfo.pb-c.h" + +typedef struct _GetFilesResponse GetFilesResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _GetFilesResponse +{ + ProtobufCMessage base; + size_t n_items; + FileInfo **items; +}; +#define GET_FILES_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&get_files_response__descriptor) \ + , 0,NULL } + + +/* GetFilesResponse methods */ +void get_files_response__init + (GetFilesResponse *message); +size_t get_files_response__get_packed_size + (const GetFilesResponse *message); +size_t get_files_response__pack + (const GetFilesResponse *message, + uint8_t *out); +size_t get_files_response__pack_to_buffer + (const GetFilesResponse *message, + ProtobufCBuffer *buffer); +GetFilesResponse * + get_files_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void get_files_response__free_unpacked + (GetFilesResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*GetFilesResponse_Closure) + (const GetFilesResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor get_files_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_GetFilesResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoRequest.pb-c.c new file mode 100644 index 000000000..0757766f7 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoRequest.pb-c.c @@ -0,0 +1,105 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: GetStorageInfoRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "GetStorageInfoRequest.pb-c.h" +void get_storage_info_request__init + (GetStorageInfoRequest *message) +{ + static const GetStorageInfoRequest init_value = GET_STORAGE_INFO_REQUEST__INIT; + *message = init_value; +} +size_t get_storage_info_request__get_packed_size + (const GetStorageInfoRequest *message) +{ + assert(message->base.descriptor == &get_storage_info_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t get_storage_info_request__pack + (const GetStorageInfoRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &get_storage_info_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t get_storage_info_request__pack_to_buffer + (const GetStorageInfoRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &get_storage_info_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +GetStorageInfoRequest * + get_storage_info_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (GetStorageInfoRequest *) + protobuf_c_message_unpack (&get_storage_info_request__descriptor, + allocator, len, data); +} +void get_storage_info_request__free_unpacked + (GetStorageInfoRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &get_storage_info_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor get_storage_info_request__field_descriptors[2] = +{ + { + "Capacity", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT32, + offsetof(GetStorageInfoRequest, has_capacity), + offsetof(GetStorageInfoRequest, capacity), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "FreeSpace", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT32, + offsetof(GetStorageInfoRequest, has_freespace), + offsetof(GetStorageInfoRequest, freespace), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned get_storage_info_request__field_indices_by_name[] = { + 0, /* field[0] = Capacity */ + 1, /* field[1] = FreeSpace */ +}; +static const ProtobufCIntRange get_storage_info_request__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor get_storage_info_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "GetStorageInfoRequest", + "GetStorageInfoRequest", + "GetStorageInfoRequest", + "", + sizeof(GetStorageInfoRequest), + 2, + get_storage_info_request__field_descriptors, + get_storage_info_request__field_indices_by_name, + 1, get_storage_info_request__number_ranges, + (ProtobufCMessageInit) get_storage_info_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoRequest.pb-c.h new file mode 100644 index 000000000..6b7f7cf74 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoRequest.pb-c.h @@ -0,0 +1,74 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: GetStorageInfoRequest.proto */ + +#ifndef PROTOBUF_C_GetStorageInfoRequest_2eproto__INCLUDED +#define PROTOBUF_C_GetStorageInfoRequest_2eproto__INCLUDED + +#include + +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 _GetStorageInfoRequest GetStorageInfoRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _GetStorageInfoRequest +{ + ProtobufCMessage base; + protobuf_c_boolean has_capacity; + int32_t capacity; + protobuf_c_boolean has_freespace; + int32_t freespace; +}; +#define GET_STORAGE_INFO_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&get_storage_info_request__descriptor) \ + , 0, 0, 0, 0 } + + +/* GetStorageInfoRequest methods */ +void get_storage_info_request__init + (GetStorageInfoRequest *message); +size_t get_storage_info_request__get_packed_size + (const GetStorageInfoRequest *message); +size_t get_storage_info_request__pack + (const GetStorageInfoRequest *message, + uint8_t *out); +size_t get_storage_info_request__pack_to_buffer + (const GetStorageInfoRequest *message, + ProtobufCBuffer *buffer); +GetStorageInfoRequest * + get_storage_info_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void get_storage_info_request__free_unpacked + (GetStorageInfoRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*GetStorageInfoRequest_Closure) + (const GetStorageInfoRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor get_storage_info_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_GetStorageInfoRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoResponse.pb-c.c new file mode 100644 index 000000000..59a4a43bc --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoResponse.pb-c.c @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: GetStorageInfoResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "GetStorageInfoResponse.pb-c.h" +void get_storage_info_response__init + (GetStorageInfoResponse *message) +{ + static const GetStorageInfoResponse init_value = GET_STORAGE_INFO_RESPONSE__INIT; + *message = init_value; +} +size_t get_storage_info_response__get_packed_size + (const GetStorageInfoResponse *message) +{ + assert(message->base.descriptor == &get_storage_info_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t get_storage_info_response__pack + (const GetStorageInfoResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &get_storage_info_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t get_storage_info_response__pack_to_buffer + (const GetStorageInfoResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &get_storage_info_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +GetStorageInfoResponse * + get_storage_info_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (GetStorageInfoResponse *) + protobuf_c_message_unpack (&get_storage_info_response__descriptor, + allocator, len, data); +} +void get_storage_info_response__free_unpacked + (GetStorageInfoResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &get_storage_info_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +#define get_storage_info_response__field_descriptors NULL +#define get_storage_info_response__field_indices_by_name NULL +#define get_storage_info_response__number_ranges NULL +const ProtobufCMessageDescriptor get_storage_info_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "GetStorageInfoResponse", + "GetStorageInfoResponse", + "GetStorageInfoResponse", + "", + sizeof(GetStorageInfoResponse), + 0, + get_storage_info_response__field_descriptors, + get_storage_info_response__field_indices_by_name, + 0, get_storage_info_response__number_ranges, + (ProtobufCMessageInit) get_storage_info_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoResponse.pb-c.h new file mode 100644 index 000000000..a453fef7b --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/GetStorageInfoResponse.pb-c.h @@ -0,0 +1,70 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: GetStorageInfoResponse.proto */ + +#ifndef PROTOBUF_C_GetStorageInfoResponse_2eproto__INCLUDED +#define PROTOBUF_C_GetStorageInfoResponse_2eproto__INCLUDED + +#include + +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 _GetStorageInfoResponse GetStorageInfoResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _GetStorageInfoResponse +{ + ProtobufCMessage base; +}; +#define GET_STORAGE_INFO_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&get_storage_info_response__descriptor) \ + } + + +/* GetStorageInfoResponse methods */ +void get_storage_info_response__init + (GetStorageInfoResponse *message); +size_t get_storage_info_response__get_packed_size + (const GetStorageInfoResponse *message); +size_t get_storage_info_response__pack + (const GetStorageInfoResponse *message, + uint8_t *out); +size_t get_storage_info_response__pack_to_buffer + (const GetStorageInfoResponse *message, + ProtobufCBuffer *buffer); +GetStorageInfoResponse * + get_storage_info_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void get_storage_info_response__free_unpacked + (GetStorageInfoResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*GetStorageInfoResponse_Closure) + (const GetStorageInfoResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor get_storage_info_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_GetStorageInfoResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/KillProcessRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/KillProcessRequest.pb-c.c new file mode 100644 index 000000000..a36b94f4a --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/KillProcessRequest.pb-c.c @@ -0,0 +1,92 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: KillProcessRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "KillProcessRequest.pb-c.h" +void kill_process_request__init + (KillProcessRequest *message) +{ + static const KillProcessRequest init_value = KILL_PROCESS_REQUEST__INIT; + *message = init_value; +} +size_t kill_process_request__get_packed_size + (const KillProcessRequest *message) +{ + assert(message->base.descriptor == &kill_process_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t kill_process_request__pack + (const KillProcessRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &kill_process_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t kill_process_request__pack_to_buffer + (const KillProcessRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &kill_process_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +KillProcessRequest * + kill_process_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (KillProcessRequest *) + protobuf_c_message_unpack (&kill_process_request__descriptor, + allocator, len, data); +} +void kill_process_request__free_unpacked + (KillProcessRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &kill_process_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor kill_process_request__field_descriptors[1] = +{ + { + "ProcessID", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(KillProcessRequest, processid), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned kill_process_request__field_indices_by_name[] = { + 0, /* field[0] = ProcessID */ +}; +static const ProtobufCIntRange kill_process_request__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor kill_process_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "KillProcessRequest", + "KillProcessRequest", + "KillProcessRequest", + "", + sizeof(KillProcessRequest), + 1, + kill_process_request__field_descriptors, + kill_process_request__field_indices_by_name, + 1, kill_process_request__number_ranges, + (ProtobufCMessageInit) kill_process_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/KillProcessRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/KillProcessRequest.pb-c.h new file mode 100644 index 000000000..3782ebff3 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/KillProcessRequest.pb-c.h @@ -0,0 +1,71 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: KillProcessRequest.proto */ + +#ifndef PROTOBUF_C_KillProcessRequest_2eproto__INCLUDED +#define PROTOBUF_C_KillProcessRequest_2eproto__INCLUDED + +#include + +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 _KillProcessRequest KillProcessRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _KillProcessRequest +{ + ProtobufCMessage base; + char *processid; +}; +#define KILL_PROCESS_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&kill_process_request__descriptor) \ + , NULL } + + +/* KillProcessRequest methods */ +void kill_process_request__init + (KillProcessRequest *message); +size_t kill_process_request__get_packed_size + (const KillProcessRequest *message); +size_t kill_process_request__pack + (const KillProcessRequest *message, + uint8_t *out); +size_t kill_process_request__pack_to_buffer + (const KillProcessRequest *message, + ProtobufCBuffer *buffer); +KillProcessRequest * + kill_process_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void kill_process_request__free_unpacked + (KillProcessRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*KillProcessRequest_Closure) + (const KillProcessRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor kill_process_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_KillProcessRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/KillProcessResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/IO/KillProcessResponse.pb-c.c new file mode 100644 index 000000000..cf2f046fa --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/KillProcessResponse.pb-c.c @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: KillProcessResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "KillProcessResponse.pb-c.h" +void kill_process_response__init + (KillProcessResponse *message) +{ + static const KillProcessResponse init_value = KILL_PROCESS_RESPONSE__INIT; + *message = init_value; +} +size_t kill_process_response__get_packed_size + (const KillProcessResponse *message) +{ + assert(message->base.descriptor == &kill_process_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t kill_process_response__pack + (const KillProcessResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &kill_process_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t kill_process_response__pack_to_buffer + (const KillProcessResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &kill_process_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +KillProcessResponse * + kill_process_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (KillProcessResponse *) + protobuf_c_message_unpack (&kill_process_response__descriptor, + allocator, len, data); +} +void kill_process_response__free_unpacked + (KillProcessResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &kill_process_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +#define kill_process_response__field_descriptors NULL +#define kill_process_response__field_indices_by_name NULL +#define kill_process_response__number_ranges NULL +const ProtobufCMessageDescriptor kill_process_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "KillProcessResponse", + "KillProcessResponse", + "KillProcessResponse", + "", + sizeof(KillProcessResponse), + 0, + kill_process_response__field_descriptors, + kill_process_response__field_indices_by_name, + 0, kill_process_response__number_ranges, + (ProtobufCMessageInit) kill_process_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/IO/KillProcessResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/IO/KillProcessResponse.pb-c.h new file mode 100644 index 000000000..9fc47c640 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/IO/KillProcessResponse.pb-c.h @@ -0,0 +1,70 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: KillProcessResponse.proto */ + +#ifndef PROTOBUF_C_KillProcessResponse_2eproto__INCLUDED +#define PROTOBUF_C_KillProcessResponse_2eproto__INCLUDED + +#include + +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 _KillProcessResponse KillProcessResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _KillProcessResponse +{ + ProtobufCMessage base; +}; +#define KILL_PROCESS_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&kill_process_response__descriptor) \ + } + + +/* KillProcessResponse methods */ +void kill_process_response__init + (KillProcessResponse *message); +size_t kill_process_response__get_packed_size + (const KillProcessResponse *message); +size_t kill_process_response__pack + (const KillProcessResponse *message, + uint8_t *out); +size_t kill_process_response__pack_to_buffer + (const KillProcessResponse *message, + ProtobufCBuffer *buffer); +KillProcessResponse * + kill_process_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void kill_process_response__free_unpacked + (KillProcessResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*KillProcessResponse_Closure) + (const KillProcessResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor kill_process_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_KillProcessResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_INTERRUPTS/FPGA_Interrupts.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_INTERRUPTS/FPGA_Interrupts.c index e5c78cf79..51270621e 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_INTERRUPTS/FPGA_Interrupts.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_INTERRUPTS/FPGA_Interrupts.c @@ -17,6 +17,7 @@ #include "Drivers/Motors/Motor.h" #include "drivers/FPGA/FPGA_SPI_Comm.h" #include "drivers/FPGA/FPGA_INTERRUPTS/fpga_interrupts.h" +#include "Modules/Thread/Thread_ex.h" #define Screw_Not_Busy_Mask 0x02 diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c index 960581da7..857b90d9e 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c @@ -159,11 +159,11 @@ uint32_t MotorHomingRequestFunc(MessageContainer* requestContainer) { if ((JobIsActive() == false)&&(isMotorConfigured(MotorId) == true)) { - if (request->direction == MOTOR_DIRECTION__Forward) //opening the loading system + if (request->direction == MOTOR_DIRECTION__Backward) //opening the loading system { if ( Motor_Id_to_LS_IdUp[MotorId] != MAX_GPI) { - MotorMovetoLimitSwitch (MotorId,MotorsCfg[MotorId].directionthreadwize, speed, Motor_Id_to_LS_IdUp[MotorId], MotorHomingRequestCallback); + MotorMovetoLimitSwitch (MotorId,1-MotorsCfg[MotorId].directionthreadwize, speed, Motor_Id_to_LS_IdUp[MotorId], MotorHomingRequestCallback); ustrncpy (HomingToken[MotorId], requestContainer->token,36); return OK; } @@ -172,7 +172,7 @@ uint32_t MotorHomingRequestFunc(MessageContainer* requestContainer) { if ( Motor_Id_to_LS_IdDown[MotorId] != MAX_GPI) { - MotorMovetoLimitSwitch (MotorId,1-MotorsCfg[MotorId].directionthreadwize, speed, Motor_Id_to_LS_IdDown[MotorId], MotorHomingRequestCallback); + MotorMovetoLimitSwitch (MotorId,MotorsCfg[MotorId].directionthreadwize, speed, Motor_Id_to_LS_IdDown[MotorId], MotorHomingRequestCallback); ustrncpy (HomingToken[MotorId], requestContainer->token,36); return OK; } @@ -264,7 +264,7 @@ uint32_t DispenserHomingRequestFunc(MessageContainer* requestContainer) { if ((JobIsActive() == false)&&(isMotorConfigured(MotorId) == true)) { - if (request->direction == MOTOR_DIRECTION__Backward) //dispenser homing + if (request->direction == MOTOR_DIRECTION__Forward) //dispenser homing IDS_HomeDispenser(request->index,speed,DispenserHomingRequestCallback); else //empty dispenser - support TBD IDS_EmptyDispenser(request->index,speed,DispenserHomingRequestCallback);//return ERROR; diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 54309a187..21a4a23c1 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -666,8 +666,8 @@ uint32_t ThreadPreSegmentState(void *JobDetails) //only for testing - when control works, these motors will take their speed from the dryer //MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_RDRIVING, OriginalMotorSpd_2PPS[FEEDER_MOTOR]); -//#warning rocker disabled - if (MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RLOADING].maxfrequency > 0) +#warning rocker disabled +/* if (MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RLOADING].maxfrequency > 0) { MotorSetDirection((TimerMotors_t)HARDWARE_MOTOR_TYPE__MOTO_RLOADING,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RLOADING].directionthreadwize); MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_RLOADING, 2); @@ -676,8 +676,8 @@ uint32_t ThreadPreSegmentState(void *JobDetails) { MotorSetDirection((TimerMotors_t)HARDWARE_MOTOR_TYPE__MOTO_LLOADING,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_LLOADING].directionthreadwize); MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_LLOADING, 2); - } - //#warning rocker disabled + }*/ + #warning rocker disabled // MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_RDRIVING,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDRIVING].directionthreadwize, 0, GPI_LS_RLOADMOTOR_UP, EndState); //TODO -- cgit v1.3.1 From 28ed912cd2237978bd9f2b19ae6713c32566bb5f Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Wed, 24 Oct 2018 09:11:54 +0300 Subject: flush messages from coomTx, reduce mailbox size to 20 --- .../Embedded_SW/Embedded/Common/report/reportInit.c | 6 +++++- .../Embedded/Communication/CommunicationTask.c | 18 ++++++++++++++++-- .../Embedded/Communication/CommunicationTask.h | 3 +++ .../Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 1 + 4 files changed, 25 insertions(+), 3 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Common/report/reportInit.c b/Software/Embedded_SW/Embedded/Common/report/reportInit.c index bb44de929..5d010bc1e 100644 --- a/Software/Embedded_SW/Embedded/Common/report/reportInit.c +++ b/Software/Embedded_SW/Embedded/Common/report/reportInit.c @@ -112,7 +112,11 @@ int ReportResponseFunc(char *message, /* The formatted message if (container_buffer) { size_t container_size = message_container__pack(&responseContainer, container_buffer); - SendChars(container_buffer, container_size); + if (SendChars(container_buffer, container_size) == false) //comm tx mailbox full + { + CommunicationMailboxFlush(); + //protobufToken[0] = 0; + } } free(responseContainer.data.data); } diff --git a/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c b/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c index f2ecb16b4..b63c74fee 100644 --- a/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c +++ b/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c @@ -12,7 +12,7 @@ static void (*callback)(char* buffer, size_t length); Mailbox_Handle CommunicationRxMsgQ = NULL; Mailbox_Handle CommunicationTxMsgQ = NULL; - +#define COMMUNICATION_NUM_MSGS 20 typedef struct CommRxMessage{ //uint16_t messageId; uint16_t msgSize; @@ -184,6 +184,20 @@ bool CommunicationTaskSendMessage(char* buffer,size_t length) return retcode; } +void CommunicationMailboxFlush(void) +{ + int i; + CommTxMessageStruc Message; + for (i=0;i