aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
Diffstat (limited to 'Software')
-rw-r--r--Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c51
-rw-r--r--Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c2
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/NFC.c11
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/logi-tag/LT_RFID.c14
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.c34
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.h28
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.c36
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.h12
-rw-r--r--Software/Embedded_SW/Embedded/Main.c19
-rw-r--r--Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c309
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c27
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c30
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c124
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/process.c34
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c22
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c21
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c18
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c17
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Cartridge.c8
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_ExtFlash.c2
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c16
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c2
-rw-r--r--Software/Embedded_SW/Embedded/tm4c129xnczad.cmd6
-rw-r--r--Software/Stubs Collection/stubs/embeddedparametersbuild_w_cleaning.cs8
-rw-r--r--Software/Visual_Studio/Advanced Installer Projects/Tango Stubs Utils.aip406
-rw-r--r--Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/ColorConverter.cpp660
-rw-r--r--Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/ColorConverter.h8
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures/ProcedureContext.cs4
-rw-r--r--Software/Visual_Studio/StubsUtils/Notifications.Wpf/Controls/Notification.cs113
-rw-r--r--Software/Visual_Studio/StubsUtils/Notifications.Wpf/Controls/NotificationArea.cs150
-rw-r--r--Software/Visual_Studio/StubsUtils/Notifications.Wpf/Controls/ReversibleStackPanel.cs50
-rw-r--r--Software/Visual_Studio/StubsUtils/Notifications.Wpf/INotificationManager.cs9
-rw-r--r--Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationContent.cs24
-rw-r--r--Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationManager.cs64
-rw-r--r--Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationTemplateSelector.cs44
-rw-r--r--Software/Visual_Studio/StubsUtils/Notifications.Wpf/Notifications.Wpf.csproj104
-rw-r--r--Software/Visual_Studio/StubsUtils/Notifications.Wpf/Notifications.Wpf.nuspec21
-rw-r--r--Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationsOverlayWindow.xaml18
-rw-r--r--Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationsOverlayWindow.xaml.cs16
-rw-r--r--Software/Visual_Studio/StubsUtils/Notifications.Wpf/Properties/AssemblyInfo.cs39
-rw-r--r--Software/Visual_Studio/StubsUtils/Notifications.Wpf/Themes/Generic.xaml156
-rw-r--r--Software/Visual_Studio/StubsUtils/Notifications.Wpf/Utils/VisualTreeHelperExtensions.cs28
-rw-r--r--Software/Visual_Studio/StubsUtils/Notifications.Wpf/pack.bat3
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Program.cs13
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Tango.StubsUtils.Client.CLI.csproj4
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/packages.config4
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Program.cs136
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Tango.StubsUtils.PerformanceTest.CLI.csproj6
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/App.config6
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/Program.cs71
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/Properties/AssemblyInfo.cs36
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/Tango.StubsUtils.ProcedureClient.CLI.csproj62
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/procedure_test.pproj1
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.config18
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.xaml1
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.xaml.cs86
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Controls/ScrollableFlowDocumentScrollViewer.cs46
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_none.icobin0 -> 105194 bytes
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_none.pngbin3171 -> 2607 bytes
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/MainWindow.xaml2
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Resources/Styles.xaml26
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/ServiceUISettings.cs7
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Tango.StubsUtils.Service.UI.csproj107
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/ViewModels/MainViewVM.cs256
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Views/MainView.xaml119
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Views/MainView.xaml.cs3
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/rename_installer.bat1
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Collections.Immutable.dllbin0 -> 244432 bytes
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Composition.AttributedModel.dllbin0 -> 24840 bytes
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Composition.Hosting.dllbin0 -> 62184 bytes
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Composition.Runtime.dllbin0 -> 29928 bytes
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Composition.TypedParts.dllbin0 -> 64760 bytes
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Reflection.Metadata.dllbin0 -> 465104 bytes
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Text.Encoding.CodePages.dllbin0 -> 766872 bytes
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.ValueTuple.dllbin0 -> 79176 bytes
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsService.cs225
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsServiceProcedureContext.cs80
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsServiceProcedureLogger.cs34
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsServiceSettings.cs5
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Tango.StubsUtils.Service.csproj34
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/app.config80
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/packages.config4
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/Program.cs7
-rw-r--r--Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/StubPackageResponseStatus.cs1
-rw-r--r--Software/Visual_Studio/Tango.ColorLib.GradientTest.CLI/Program.cs307
-rw-r--r--Software/Visual_Studio/Tango.Settings/SettingsManager.cs9
-rw-r--r--Software/Visual_Studio/Tango.sln46
87 files changed, 3560 insertions, 1051 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
index 17c1f164b..7b7d4c3c2 100644
--- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
+++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
@@ -646,11 +646,11 @@ uint32_t GetFilesRequestFunc(MessageContainer* requestContainer)
GetFilesResponse response = GET_FILES_RESPONSE__INIT;
//struct tm RTC_time;
- #define MAX_NUM_OF_FILES 20
+ #define MAX_NUM_OF_FILES 40
DIR dir;
FILINFO* fno[MAX_NUM_OF_FILES];
char FullPath[MAX_NUM_OF_FILES][60];
- int i,NumOfFiles = 0;
+ int i,NumOfFiles = 0, ListedFiles = 0;
FRESULT Fresult = FR_OK;
FileInfo **FilesInfo = (FileInfo**)my_malloc(sizeof(FileInfo *)*(MAX_NUM_OF_FILES));
FileInfo Data[MAX_NUM_OF_FILES];
@@ -699,26 +699,33 @@ uint32_t GetFilesRequestFunc(MessageContainer* requestContainer)
{
for (i = 0;i < NumOfFiles;i++)
{
- file_info__init(&Data[i]);
- FilesInfo[i] = &Data[i];
- Data[i].has_attribute = true;
- Data[i].attribute = fno[i]->fattrib;
- Data[i].name = fno[i]->fname;
- Data[i].has_length = true;
- Data[i].length = fno[i]->fsize;
- Data[i].has_lastmodifieddate = true;
- Data[i].lastmodifieddate = fno[i]->fdate;
- Data[i].has_lastmodifiedtime = true;
- Data[i].lastmodifiedtime = fno[i]->ftime;
-
- if (i==0)
- usnprintf(&FullPath[i], 50, "%s", request->path);
+ if (i==0)
+ usnprintf(&FullPath[ListedFiles], 50, "%s", request->path);
+ else
+ if (strlen(request->path)==1) //info under the root
+ usnprintf(&FullPath[ListedFiles], 50, "%s%s", request->path, fno[i]->fname);
+ else
+ usnprintf(&FullPath[ListedFiles], 50, "%s%s%s", request->path,"/", fno[i]->fname);
+ if (fno[i]->fattrib != 0xFF) //garbage
+ {
+ file_info__init(&Data[ListedFiles]);
+ FilesInfo[ListedFiles] = &Data[ListedFiles];
+ Data[ListedFiles].has_attribute = true;
+ Data[ListedFiles].attribute = fno[i]->fattrib;
+ Data[ListedFiles].name = fno[i]->fname;
+ Data[ListedFiles].has_length = true;
+ Data[ListedFiles].length = fno[i]->fsize;
+ Data[ListedFiles].has_lastmodifieddate = true;
+ Data[ListedFiles].lastmodifieddate = fno[i]->fdate;
+ Data[ListedFiles].has_lastmodifiedtime = true;
+ Data[ListedFiles].lastmodifiedtime = fno[i]->ftime;
+ Data[ListedFiles].fullpath = &FullPath[i][0];
+ ListedFiles++;
+ }
else
- if (strlen(request->path)==1) //info under the root
- usnprintf(&FullPath[i], 50, "%s%s", request->path, fno[i]->fname);
- else
- usnprintf(&FullPath[i], 50, "%s%s%s", request->path,"/", fno[i]->fname);
- Data[i].fullpath = &FullPath[i][0];
+ {
+ f_unlink(Data[ListedFiles].fullpath);
+ }
/*RTC_time.tm_year=(fno[i]->fdate>>9)+1980;//populate the time struct (FAT start==1980, RTC.year==0)
RTC_time.tm_mon=(fno[i]->fdate>>5)&0x000F;
RTC_time.tm_mday=fno[i]->fdate&0x001F;
@@ -728,7 +735,7 @@ uint32_t GetFilesRequestFunc(MessageContainer* requestContainer)
}
- response.n_items = NumOfFiles;
+ response.n_items = ListedFiles;
response.items = FilesInfo;
}
else
diff --git a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
index 5392a415e..a2a74b2e6 100644
--- a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
+++ b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
@@ -20,7 +20,7 @@ typedef struct
} TangoVersion_t;
-TangoVersion_t _gTangoVersion = {1,5,3,4};
+TangoVersion_t _gTangoVersion = {1,6,0,0};
#define BUILD_DATE __DATE__
char Dat[50] = BUILD_DATE;
diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/NFC.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/NFC.c
index 33f154492..1e989d4d1 100644
--- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/NFC.c
+++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/NFC.c
@@ -118,15 +118,14 @@ RFID_RETURN_CODE RFID_Status = 0;
uint8_t Connect_to_RFID_Reder(uint8_t readerID)//2
{
RFID_RETURN_CODE RFIDRetValue;
- bool isTagValid;
uint8_t Status = OK;
-
-
+/*
+ bool isTagValid;
uint32_t newPwd;
uint32_t newPACK;
uint32_t counter;
-
int PwdRetVal;
+*/
static uint32_t nop = 0;
RFID_StartDiscovery(readerID);
@@ -187,7 +186,7 @@ NFC_Tag NFC_Tag_U[Max_Readers];//read with updates
RFID_RETURN_CODE TagWriteData(RFID_READER_ID readerID)
{
- uint8_t index = 0;
+ //uint8_t index = 0;
uint32_t dummy = 0;
uint32_t Tuint32 = 0;
//uint16_t Tuint16 = 0;
@@ -375,7 +374,7 @@ RFID_RETURN_CODE TagWriteData(RFID_READER_ID readerID)
RFIDRetValue = WriteValue( readerID, &tagInfo, tagMemory, 31, Tuint32 );
- return SUCCESS;
+ return RFIDRetValue;
}
diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/logi-tag/LT_RFID.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/logi-tag/LT_RFID.c
index 7035d172e..6d6425172 100644
--- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/logi-tag/LT_RFID.c
+++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/logi-tag/LT_RFID.c
@@ -1209,13 +1209,13 @@ uint32_t crc_ccitt_update(unsigned char * buf, int len)
}
-void RFID_Test()
+RFID_RETURN_CODE RFID_Test()
{
uint8_t i, readerID = 1;
NxpNci_RfIntf_t tagInfo;
-uint8_t addressBlock = 0xE3; // NTAG216 - User memory blocks: 0x04-0xE1 = 222 blocks = 888 bytes
-uint8_t tagId[]= {0};
+//uint8_t addressBlock = 0xE3; // NTAG216 - User memory blocks: 0x04-0xE1 = 222 blocks = 888 bytes
+//uint8_t tagId[]= {0};
uint8_t Serial[] = {'1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G'};
uint8_t factoryID[] = { '1', '2', '3'};
uint16_t fillingSystem = 55;
@@ -1250,12 +1250,12 @@ uint8_t uid[7] = {0};
uint8_t hashValue[16] = {0};
uint8_t newPACK[] = {0x11, 0x22};
uint8_t newPwd[] = {0xFF, 0xFF, 0xFF, 0xFF};
-uint8_t startingBlock = 0x04;
+/*uint8_t startingBlock = 0x04;
uint8_t pwdAddr = 0xE5;
-uint8_t tagMemory[1024];
uint16_t succeededWriteSize = 0;
uint16_t succeededReadSize = 0;
-bool firstTime = true;
+bool firstTime = true;*/
+uint8_t tagMemory[1024];
uint32_t dummy = 0;
RFID_RETURN_CODE RFIDRetValue;
@@ -1421,6 +1421,6 @@ while(1)
}
//----------------------------------------------------------------------------
-
+ return RFIDRetValue;
}
diff --git a/Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.c b/Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.c
index 10f65db1d..c757c3a3b 100644
--- a/Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.c
+++ b/Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.c
@@ -132,18 +132,16 @@ uint32_t ReadAppAndProgram(uint32_t ui32FlashStart,uint32_t ui32FileSize,void* b
return(1);
}
int base_flashErased = false;
-uint32_t EraseFlashSection(uint32_t ui32FlashStart)
+uint32_t EraseFlashSection(void)
{
- volatile uint32_t ui32Idx = ui32FlashStart;
+ volatile uint32_t ui32Idx = FLASH_RAM_BASE;
uint32_t status;
- if (ui32FlashStart<GENHWCFG_SECTION_FLASH)
- {
- if (base_flashErased == true)
- return ERROR;
- else
- base_flashErased = true; //once in a run
- }
+ if (base_flashErased == true)
+ return WARNING;
+ else
+ base_flashErased = true; //once in a run
+
#ifdef FLASH_DEBUG
Address[RxIndex] = ui32FlashStart;
Size[RxIndex] = ui32FileSize;
@@ -152,9 +150,27 @@ uint32_t EraseFlashSection(uint32_t ui32FlashStart)
RxIndex = 0;
#endif
status = FlashErase(ui32Idx);
+ //FlashErase returns 0 or -1
return status;
}
+/*void FlashTest(void)
+{
+ int i;
+ uint32_t stack[0x200];
+ uint32_t offset = 0;
+
+ for (i = 0; i < 0x200; i++)
+ stack[i] = i;
+
+ while (offset < FLASH_SIZE)
+ {
+ ReadAppAndProgram(FLASH_RAM_BASE+offset,0x200,stack);
+ offset+=0x200;
+ }
+ EraseFlashSection();
+
+}*/
//Each word may not be subject to more than a specific number of programming cycles before an
//erase cycle is required. In other words, for any given word, FlashProgram can only be called
//twice before FlashErase is called.
diff --git a/Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.h b/Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.h
index 7da9f92a7..ab2c87acc 100644
--- a/Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.h
+++ b/Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.h
@@ -8,23 +8,23 @@
#ifndef DRIVERS_FLASH_RAM_FLASHPROGRAM_H_
#define DRIVERS_FLASH_RAM_FLASHPROGRAM_H_
-#define FLASH_RAM_BASE 0x000F8000
+#define FLASH_RAM_BASE 0x000FC000
-#define EMBEDDED_PARAMETERS_SECTION_FLASH (FLASH_RAM_BASE + 0X0000 ) //512
-#define PROCESS_PARAMETERS_SECTION_FLASH (FLASH_RAM_BASE + 0X0000 )//512
-#define DANCERS_SECTION_FLASH (FLASH_RAM_BASE + 0X0000)
-#define DISPENSERS_SECTION_FLASH (FLASH_RAM_BASE + 0X0000)
-#define GENHWCFG_SECTION_FLASH (FLASH_RAM_BASE + 0X2000)
-#define ALARM_SECTION_FLASH (FLASH_RAM_BASE + 0X4000 )
+//#define EMBEDDED_PARAMETERS_SECTION_FLASH (FLASH_RAM_BASE + 0X0000 ) //512
+//#define PROCESS_PARAMETERS_SECTION_FLASH (FLASH_RAM_BASE + 0X0000 )//512
+//#define DANCERS_SECTION_FLASH (FLASH_RAM_BASE + 0X0000)
+//#define DISPENSERS_SECTION_FLASH (FLASH_RAM_BASE + 0X0000)
+//#define GENHWCFG_SECTION_FLASH (FLASH_RAM_BASE + 0X0000)
+//#define ALARM_SECTION_FLASH (FLASH_RAM_BASE + 0X0000 )
+//#define PROCESS_PARAMETERS_MAP_IN_FLASH (FLASH_RAM_BASE + 0X0200 )
+//#define DANCERS_MAP_IN_FLASH (FLASH_RAM_BASE + 0X0400)
+//#define DISPENSERS_MAP_IN_FLASH (FLASH_RAM_BASE + 0X500)
+//#define GENHWCFG_MAP_IN_FLASH (FLASH_RAM_BASE + 0x0300)
#define EMBEDDED_PARAMETERS_MAP_IN_FLASH (FLASH_RAM_BASE + 0X0000 )
-#define PROCESS_PARAMETERS_MAP_IN_FLASH (FLASH_RAM_BASE + 0X0200 )
-#define DANCERS_MAP_IN_FLASH (FLASH_RAM_BASE + 0X0400)
-#define DISPENSERS_MAP_IN_FLASH (FLASH_RAM_BASE + 0X500)
-#define GENHWCFG_MAP_IN_FLASH (FLASH_RAM_BASE + 0X2000)
-#define ALARM_MAP_IN_FLASH (FLASH_RAM_BASE + 0X4000 )
+#define ALARM_MAP_IN_FLASH (FLASH_RAM_BASE + 0X0300)
-#define FLASH_SIZE 0X8000
+#define FLASH_SIZE 0X4000
extern int base_flashErased;
@@ -38,7 +38,7 @@ extern int base_flashErased;
//*****************************************************************************
uint32_t ReadAppAndProgram(uint32_t ui32FlashStart,uint32_t ui32FileSize,void* buffer);
void FlashInit(void);
-uint32_t EraseFlashSection(uint32_t ui32FlashStart);
+uint32_t EraseFlashSection(void);
diff --git a/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.c b/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.c
index e9d5cfc07..71d26888d 100644
--- a/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.c
+++ b/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.c
@@ -60,6 +60,42 @@ uint32_t MCU_E2PromRead(int Address,uint32_t *Data)
return OK;
}
+/**************************************************/
+uint32_t MCU_E2PromProgramChunk(int Address,uint16_t Length,uint32_t Data)
+{
+ uint32_t Buffer = Data;
+#ifdef EVALUATION_BOARD
+ return 0;
+#else
+ Report("MCU_E2PromProgramChunk",__FILE__,Length,Address,RpWarning,Data,0);
+ return (EEPROMProgram((uint32_t *)Buffer, Address, Length));
+#endif
+}
+uint32_t MCU_E2PromReadChunk(int Address,uint16_t Length,uint32_t *Data)
+{
+#ifndef EVALUATION_BOARD
+ EEPROMRead((uint32_t *)Data,Address, Length);
+#endif
+ Report("MCU_E2PromReadChunk",__FILE__,Length,Address,RpWarning,*Data,0);
+
+ return OK;
+
+}
+void MCU_E2PromUpdateResetReason(int i)
+{
+ uint32_t Head;
+ uint32_t RESC = SysCtlResetCauseGet();
+
+ EEPROMRead(&Head,EEPROM_RESET_REASON_HEAD_ADDRESS, 4);
+ if (Head>=EEPROM_RESET_REASON_MAX_DATA) Head=0;
+ Head++;
+ RESC+=(i*0x1000);
+ EEPROMProgram(&Head, EEPROM_RESET_REASON_HEAD_ADDRESS, 4);
+ EEPROMProgram(&RESC, (EEPROM_RESET_REASON_HEAD_ADDRESS+(Head*4)), 4);
+
+}
+
+/*************************************************/
void MCU_E2PromProgramMidTank(int midtankId,float a,float b)
{
float A,B;
diff --git a/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.h b/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.h
index 12598ed07..2102d1716 100644
--- a/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.h
+++ b/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.h
@@ -61,6 +61,18 @@ typedef enum {
ORIFICE3_ZERO_VALUE_ADDR,
}EEPROM_ADDRESSES;*/
+#define EEPROM_RESET_REASON_HEAD_ADDRESS 160
+#define EEPROM_RESET_REASON_MAX_DATA 80
+
+#define DISPENSERS_MAP_IN_EEPROM 0x200
+#define PROCESS_PARAMATERS_IN_EEPROM 0x400
+
+uint32_t MCU_E2PromProgramChunk(int Address,uint16_t Length,uint32_t Data);
+uint32_t MCU_E2PromReadChunk(int Address,uint16_t Length,uint32_t *Data);
+
+void MCU_E2PromUpdateResetReason(int i);
+
+
uint32_t MCU_E2PromProgram(int Address,uint32_t Data);
uint32_t MCU_E2PromRead(int Address,uint32_t *Data);
void MCU_E2PromProgramMidTank(int midtankId,float a,float b);
diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c
index 933f4b72c..b42fca6e9 100644
--- a/Software/Embedded_SW/Embedded/Main.c
+++ b/Software/Embedded_SW/Embedded/Main.c
@@ -137,21 +137,6 @@ Void MyswitchFxn(Task_Handle prev, Task_Handle next)
PrevTask = prev;
NextTask = next;
}
-void updateresetreasonineeprom(int i)
-{
-#define Head_Address 40
-#define Max_Address 100
- uint32_t Head;
- uint32_t RESC = SysCtlResetCauseGet();
-
- EEPROMRead(&Head,Head_Address*4, 4);
- if (Head>=Max_Address) Head=0;
- Head++;
- RESC+=(i*0x1000);
- EEPROMProgram(&Head, Head_Address*4, 4);
- EEPROMProgram(&RESC, (Head_Address+Head)*4, 4);
-
-}
/* ======== errHook ======== */
Void errHook(Error_Block *eb)
{
@@ -161,7 +146,7 @@ Void errHook(Error_Block *eb)
//char File[50] = "";*/
char message[300];
int len;
- updateresetreasonineeprom(InitFailures);
+ MCU_E2PromUpdateResetReason(InitFailures);
//STATUS_GREEN_LED_OFF;
ACTIVITY_GREEN_LED_OFF;
@@ -270,7 +255,7 @@ int main(void)
uint32_t Data,i;
MCU_E2PromInit();
- updateresetreasonineeprom(0);
+ MCU_E2PromUpdateResetReason(0);
#endif
#ifdef EVALUATION_BOARD
diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c
index 07ebfa747..6a952a3cd 100644
--- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c
+++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c
@@ -154,17 +154,15 @@ typedef enum
typedef struct
{
- //uint16_t Frequency; //1/10/100/1000
- AlarmSourceType AlarmSource;
- uint16_t DeviceId;
- uint8_t ModuleDeviceId;
+ uint16_t EventType;
uint16_t AlarmValue;
- bool AlarmDirection;
- DebugLogCategory Severity;
- //uint16_t Predecessor;
+ uint8_t AlarmSource;
+ uint8_t DeviceId;
+ uint8_t ModuleDeviceId;
+ uint8_t Severity;
uint8_t DebounceValue;
- EventType EventType;
bool isPersistent;
+ bool AlarmDirection;
}AlarmHandlingItemStruc;
typedef struct
{
@@ -184,268 +182,6 @@ uint32_t * pAlarmItemSize = (uint32_t *)(ALARM_MAP_IN_FLASH);
uint32_t AlarmItemSize ;
AlarmHandlingItemStruc *AlarmItem = NULL;//(AlarmHandlingItemStruc *)(ALARM_MAP_IN_FLASH+4);
AlarmHandlingItemStruc *HardCodedAlarmItem=NULL;
-//AlarmHandlingItemStruc HardCodedAlarmItem[MAX_SYSTEM_ALARMS]={
-//* 7016 */ {eHundredMillisecond,ALARM_SOURCE_TYPE__LimitSwitchAlarm,LimitSwitchAlarmEmpty_1,0,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DISPENSER_1_EMPTY},
-//* 7017 */ {eHundredMillisecond,ALARM_SOURCE_TYPE__LimitSwitchAlarm,LimitSwitchAlarmEmpty_2,1,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DISPENSER_2_EMPTY},
-//* 7018 */ {eHundredMillisecond,ALARM_SOURCE_TYPE__LimitSwitchAlarm,LimitSwitchAlarmEmpty_3,2,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DISPENSER_3_EMPTY},
-//* 7019 */ {eHundredMillisecond,ALARM_SOURCE_TYPE__LimitSwitchAlarm,LimitSwitchAlarmEmpty_4,3,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DISPENSER_4_EMPTY},
-//* 7020 */ {eHundredMillisecond,ALARM_SOURCE_TYPE__LimitSwitchAlarm,LimitSwitchAlarmEmpty_5,4,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DISPENSER_5_EMPTY},
-//* 7021 */ {eHundredMillisecond,ALARM_SOURCE_TYPE__LimitSwitchAlarm,LimitSwitchAlarmEmpty_6,5,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DISPENSER_6_EMPTY},
-//* 7022 */ {eHundredMillisecond,ALARM_SOURCE_TYPE__LimitSwitchAlarm,LimitSwitchAlarmEmpty_7,6,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DISPENSER_7_EMPTY},
-//* 7023 */ {eHundredMillisecond,ALARM_SOURCE_TYPE__LimitSwitchAlarm,LimitSwitchAlarmEmpty_8,7,false,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DISPENSER_8_EMPTY},
-
-//* 7064 */ {eOneSecond,ALARM_SOURCE_TYPE__HardLimitAlarm,0,0,true,true,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_1_UPPER_HARD_LIMIT},
-//* 7065 */ {eOneSecond,ALARM_SOURCE_TYPE__HardLimitAlarm,1,1,true,true,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_2_UPPER_HARD_LIMIT},
-//* 7066 */ {eOneSecond,ALARM_SOURCE_TYPE__HardLimitAlarm,2,2,true,true,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_3_UPPER_HARD_LIMIT},
-//* 7067 */ {eOneSecond,ALARM_SOURCE_TYPE__HardLimitAlarm,3,3,true,true,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_4_UPPER_HARD_LIMIT},
-//* 7068 */ {eOneSecond,ALARM_SOURCE_TYPE__HardLimitAlarm,4,4,true,true,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_5_UPPER_HARD_LIMIT},
-//* 7069 */ {eOneSecond,ALARM_SOURCE_TYPE__HardLimitAlarm,5,5,true,true,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_6_UPPER_HARD_LIMIT},
-//* 7070 */ {eOneSecond,ALARM_SOURCE_TYPE__HardLimitAlarm,6,6,true,true,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_7_UPPER_HARD_LIMIT},
-//* 7071 */ {eOneSecond,ALARM_SOURCE_TYPE__HardLimitAlarm,7,7,true,true,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_8_UPPER_HARD_LIMIT},
-//* 7072 */ {eOneSecond,ALARM_SOURCE_TYPE__HardLimitAlarm,0,0,true,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_1_LOWER_HARD_LIMIT},
-//* 7073 */ {eOneSecond,ALARM_SOURCE_TYPE__HardLimitAlarm,1,1,true,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_2_LOWER_HARD_LIMIT},
-//* 7074 */ {eOneSecond,ALARM_SOURCE_TYPE__HardLimitAlarm,2,2,true,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_3_LOWER_HARD_LIMIT},
-//* 7075 */ {eOneSecond,ALARM_SOURCE_TYPE__HardLimitAlarm,3,3,true,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_4_LOWER_HARD_LIMIT},
-//* 7076 */ {eOneSecond,ALARM_SOURCE_TYPE__HardLimitAlarm,4,4,true,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_5_LOWER_HARD_LIMIT},
-//* 7077 */ {eOneSecond,ALARM_SOURCE_TYPE__HardLimitAlarm,5,5,true,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_6_LOWER_HARD_LIMIT},
-//* 7078 */ {eOneSecond,ALARM_SOURCE_TYPE__HardLimitAlarm,6,6,true,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_7_LOWER_HARD_LIMIT},
-//* 7079 */ {eOneSecond,ALARM_SOURCE_TYPE__HardLimitAlarm,7,7,true,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_8_LOWER_HARD_LIMIT},
-
-//* 7080 */ {eOneSecond,ALARM_SOURCE_TYPE__PressureAlarm,0,0,5,true,DEBUG_LOG_CATEGORY__Error,0xFF,5,EVENT_TYPE__DISPENSER_1_HIGH_PRESSURE},
-//* 7081 */ {eOneSecond,ALARM_SOURCE_TYPE__PressureAlarm,1,1,5,true,DEBUG_LOG_CATEGORY__Error,0xFF,5,EVENT_TYPE__DISPENSER_2_HIGH_PRESSURE},
-//* 7082 */ {eOneSecond,ALARM_SOURCE_TYPE__PressureAlarm,2,2,5,true,DEBUG_LOG_CATEGORY__Error,0xFF,5,EVENT_TYPE__DISPENSER_3_HIGH_PRESSURE},
-//* 7083 */ {eOneSecond,ALARM_SOURCE_TYPE__PressureAlarm,3,3,5,true,DEBUG_LOG_CATEGORY__Error,0xFF,5,EVENT_TYPE__DISPENSER_4_HIGH_PRESSURE},
-//* 7084 */ {eOneSecond,ALARM_SOURCE_TYPE__PressureAlarm,4,4,5,true,DEBUG_LOG_CATEGORY__Error,0xFF,5,EVENT_TYPE__DISPENSER_5_HIGH_PRESSURE},
-//* 7085 */ {eOneSecond,ALARM_SOURCE_TYPE__PressureAlarm,5,5,5,true,DEBUG_LOG_CATEGORY__Error,0xFF,5,EVENT_TYPE__DISPENSER_6_HIGH_PRESSURE},
-//* 7086 */ {eOneSecond,ALARM_SOURCE_TYPE__PressureAlarm,6,6,5,true,DEBUG_LOG_CATEGORY__Error,0xFF,5,EVENT_TYPE__DISPENSER_7_HIGH_PRESSURE},
-//* 7087 */ {eOneSecond,ALARM_SOURCE_TYPE__PressureAlarm,7,7,5,true,DEBUG_LOG_CATEGORY__Error,0xFF,5,EVENT_TYPE__DISPENSER_8_HIGH_PRESSURE},
-
-//* 7000 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DISPENSER_1_OVERPRESSURE},
-//* 7001 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DISPENSER_2_OVERPRESSURE},
-//* 7002 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DISPENSER_3_OVERPRESSURE},
-//* 7003 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DISPENSER_4_OVERPRESSURE},
-//* 7004 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DISPENSER_5_OVERPRESSURE},
-//* 7005 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DISPENSER_6_OVERPRESSURE},
-//* 7006 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DISPENSER_7_OVERPRESSURE},
-//* 7007 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DISPENSER_8_OVERPRESSURE},
-
-//* 8000 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,0,0,300//*300cc*/,false,DEBUG_LOG_CATEGORY__Warning, 0xFF,2,EVENT_TYPE__MID_TANK_1_LOW_LEVEL},
-//* 8001 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,1,1,300//*300cc*/,false,DEBUG_LOG_CATEGORY__Warning, 0xFF,2,EVENT_TYPE__MID_TANK_2_LOW_LEVEL},
-//* 8002 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,2,2,300//*300cc*/,false,DEBUG_LOG_CATEGORY__Warning, 0xFF,2,EVENT_TYPE__MID_TANK_3_LOW_LEVEL},
-//* 8003 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,3,3,300//*300cc*/,false,DEBUG_LOG_CATEGORY__Warning, 0xFF,2,EVENT_TYPE__MID_TANK_4_LOW_LEVEL},
-//* 8004 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,4,4,300//*300cc*/,false,DEBUG_LOG_CATEGORY__Warning, 0xFF,2,EVENT_TYPE__MID_TANK_5_LOW_LEVEL},
-//* 8005 */ //{eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,5,5,300//*300cc*/,false,DEBUG_LOG_CATEGORY__Warning, 0xFF,2,EVENT_TYPE__MID_TANK_6_LOW_LEVEL},
-//* 8006 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,6,6,300//*300cc*/,false,DEBUG_LOG_CATEGORY__Warning, 0xFF,2,EVENT_TYPE__MID_TANK_7_LOW_LEVEL},
-//* 8007 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,7,7,300//*300cc*/,false,DEBUG_LOG_CATEGORY__Warning, 0xFF,2,EVENT_TYPE__MID_TANK_8_LOW_LEVEL},
-//* 8008 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,0,0,200//*200cc*/,false,DEBUG_LOG_CATEGORY__Error, 0xFF,2,EVENT_TYPE__MID_TANK_1_EMPTY},
-//* 8009 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,1,1,200//*200cc*/,false,DEBUG_LOG_CATEGORY__Error, 0xFF,2,EVENT_TYPE__MID_TANK_2_EMPTY},
-//* 8010 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,2,2,200//*200cc*/,false,DEBUG_LOG_CATEGORY__Error, 0xFF,2,EVENT_TYPE__MID_TANK_3_EMPTY},
-//* 8011 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,3,3,200//*200cc*/,false,DEBUG_LOG_CATEGORY__Error, 0xFF,2,EVENT_TYPE__MID_TANK_4_EMPTY},
-//* 8012 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,4,4,200//*200cc*/,false,DEBUG_LOG_CATEGORY__Error, 0xFF,2,EVENT_TYPE__MID_TANK_5_EMPTY},
-//* 8013 */ //{eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,5,5,200//*200cc*/,false,DEBUG_LOG_CATEGORY__Error, 0xFF,2,EVENT_TYPE__MID_TANK_6_EMPTY},
-//* 8014 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,6,6,200//*200cc*/,false,DEBUG_LOG_CATEGORY__Error, 0xFF,2,EVENT_TYPE__MID_TANK_7_EMPTY},
-//* 8015 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,7,7,200//*200cc*/,false,DEBUG_LOG_CATEGORY__Error, 0xFF,2,EVENT_TYPE__MID_TANK_8_EMPTY},
-
-//* 8016 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,0,0,1800//*1800cc*/,true,DEBUG_LOG_CATEGORY__Error, 0xFF,2,EVENT_TYPE__MID_TANK_1_OVERFLOW},
-//* 8017 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,1,1,1800//*1800cc*/,true,DEBUG_LOG_CATEGORY__Error, 0xFF,2,EVENT_TYPE__MID_TANK_2_OVERFLOW},
-//* 8018 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,2,2,1800//*1800cc*/,true,DEBUG_LOG_CATEGORY__Error, 0xFF,2,EVENT_TYPE__MID_TANK_3_OVERFLOW},
-//* 8019 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,3,3,1800//*1800cc*/,true,DEBUG_LOG_CATEGORY__Error, 0xFF,2,EVENT_TYPE__MID_TANK_4_OVERFLOW},
-//* 8020 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,4,4,1800//*1800cc*/,true,DEBUG_LOG_CATEGORY__Error, 0xFF,2,EVENT_TYPE__MID_TANK_5_OVERFLOW},
-//* 8021 */ //{eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,5,5,1800//*1800cc*/,true,DEBUG_LOG_CATEGORY__Error, 0xFF,2,EVENT_TYPE__MID_TANK_6_OVERFLOW},
-//* 8022 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,6,6,1800//*1800cc*/,true,DEBUG_LOG_CATEGORY__Error, 0xFF,2,EVENT_TYPE__MID_TANK_7_OVERFLOW},
-//* 8023 */ {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,7,7,1800//*1800cc*/,true,DEBUG_LOG_CATEGORY__Error, 0xFF,2,EVENT_TYPE__MID_TANK_8_OVERFLOW},
-
-
-//* 4000 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DRYER_DRIVING,HARDWARE_MOTOR_TYPE__MOTO_DRYER_DRIVING,x_STATUS_OCD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DRYER_MOTOR_OVERCURRENT },
-//* 3003 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_RDRIVING, HARDWARE_MOTOR_TYPE__MOTO_RDRIVING, x_STATUS_OCD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__FEEDER_MOTOR_OVERCURRENT },
-//* 3008 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_SCREW, HARDWARE_MOTOR_TYPE__MOTO_SCREW, x_STATUS_OCD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__SCREW_MOTOR_OVERCURRENT },
-//* 3007 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_WINDER, HARDWARE_MOTOR_TYPE__MOTO_WINDER, x_STATUS_OCD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__WINDER_MOTOR_OVERCURRENT },
-//* 3005 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_LDRIVING, HARDWARE_MOTOR_TYPE__MOTO_LDRIVING, x_STATUS_OCD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__PULLER_MOTOR_OVERCURRENT },
-//* 7032 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1, x_STATUS_OCD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_1_MOTOR_OVERCURRENT},
-//* 7033 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_2, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_2, x_STATUS_OCD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_2_MOTOR_OVERCURRENT},
-//* 7034 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_3, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_3, x_STATUS_OCD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_3_MOTOR_OVERCURRENT},
-//* 7035 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_4, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_4, x_STATUS_OCD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_4_MOTOR_OVERCURRENT},
-//* 7036 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_5, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_5, x_STATUS_OCD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_5_MOTOR_OVERCURRENT},
-//* 7037 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_6, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_6, x_STATUS_OCD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_6_MOTOR_OVERCURRENT},
-//* 7038 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_7, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_7, x_STATUS_OCD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_7_MOTOR_OVERCURRENT},
-//* 7039 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_8, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_8, x_STATUS_OCD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_8_MOTOR_OVERCURRENT},
-//* 4001 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DRYER_DRIVING,HARDWARE_MOTOR_TYPE__MOTO_DRYER_DRIVING,x_STATUS_TH_SD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DRYER_MOTOR_OVERTEMPERATURE},
-//* 3010 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_RDRIVING, HARDWARE_MOTOR_TYPE__MOTO_RDRIVING, x_STATUS_TH_SD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__FEEDER_MOTOR_OVERTEMPERATURE},
-//* 3015 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_SCREW, HARDWARE_MOTOR_TYPE__MOTO_SCREW, x_STATUS_TH_SD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__SCREW_MOTOR_OVERTEMPERATURE },
-//* 3014 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_WINDER, HARDWARE_MOTOR_TYPE__MOTO_WINDER, x_STATUS_TH_SD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__WINDER_MOTOR_OVERTEMPERATURE},
-//* 3012 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_LDRIVING, HARDWARE_MOTOR_TYPE__MOTO_LDRIVING, x_STATUS_TH_SD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__PULLER_MOTOR_OVERTEMPERATURE},
-//* 7040 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1, x_STATUS_TH_SD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_1_MOTOR_OVERTEMPERATURE},
-//* 7041 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_2, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_2, x_STATUS_TH_SD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_2_MOTOR_OVERTEMPERATURE},
-//* 7042 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_3, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_3, x_STATUS_TH_SD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_3_MOTOR_OVERTEMPERATURE},
-//* 7043 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_4, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_4, x_STATUS_TH_SD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_4_MOTOR_OVERTEMPERATURE},
-//* 7044 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_5, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_5, x_STATUS_TH_SD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_5_MOTOR_OVERTEMPERATURE},
-//* 7045 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_6, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_6, x_STATUS_TH_SD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_6_MOTOR_OVERTEMPERATURE},
-//* 7046 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_7, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_7, x_STATUS_TH_SD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_7_MOTOR_OVERTEMPERATURE},
-//* 7047 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_8, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_8, x_STATUS_TH_SD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_8_MOTOR_OVERTEMPERATURE},
-//* 4003 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DRYER_DRIVING,HARDWARE_MOTOR_TYPE__MOTO_DRYER_DRIVING,x_STATUS_UVLO,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DRYER_MOTOR_UNDERVOLTAGE },
-//* 3024 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_RDRIVING, HARDWARE_MOTOR_TYPE__MOTO_RDRIVING, x_STATUS_UVLO,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__FEEDER_MOTOR_UNDERVOLTAGE},
-//* 3029 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_SCREW, HARDWARE_MOTOR_TYPE__MOTO_SCREW, x_STATUS_UVLO,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__SCREW_MOTOR_UNDERVOLTAGE },
-//* 3028 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_WINDER, HARDWARE_MOTOR_TYPE__MOTO_WINDER, x_STATUS_UVLO,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__WINDER_MOTOR_UNDERVOLTAGE},
-//* 3026 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_LDRIVING, HARDWARE_MOTOR_TYPE__MOTO_LDRIVING, x_STATUS_UVLO,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__PULLER_MOTOR_UNDERVOLTAGE},
-//* 7056 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1, x_STATUS_UVLO,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_1_MOTOR_UNDERVOLTAGE},
-//* 7057 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_2, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_2, x_STATUS_UVLO,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_2_MOTOR_UNDERVOLTAGE},
-//* 7058 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_3, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_3, x_STATUS_UVLO,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_3_MOTOR_UNDERVOLTAGE},
-//* 7059 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_4, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_4, x_STATUS_UVLO,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_4_MOTOR_UNDERVOLTAGE},
-//* 7060 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_5, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_5, x_STATUS_UVLO,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_5_MOTOR_UNDERVOLTAGE},
-//* 7061 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_6, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_6, x_STATUS_UVLO,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_6_MOTOR_UNDERVOLTAGE},
-//* 7062 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_7, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_7, x_STATUS_UVLO,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_7_MOTOR_UNDERVOLTAGE},
-//* 7063 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_8, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_8, x_STATUS_UVLO,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_8_MOTOR_UNDERVOLTAGE},
-//* 4002 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DRYER_DRIVING,HARDWARE_MOTOR_TYPE__MOTO_DRYER_DRIVING,x_STATUS_STEP_LOSS_A,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DRYER_MOTOR_STALL },
-//* 3017 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_RDRIVING, HARDWARE_MOTOR_TYPE__MOTO_RDRIVING, x_STATUS_STEP_LOSS_A,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__FEEDER_MOTOR_STALL },
-//* 3022 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_SCREW, HARDWARE_MOTOR_TYPE__MOTO_SCREW, x_STATUS_STEP_LOSS_A,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__SCREW_MOTOR_STALL },
-//* 3021 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_WINDER, HARDWARE_MOTOR_TYPE__MOTO_WINDER, x_STATUS_STEP_LOSS_A,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__WINDER_MOTOR_STALL },
-//* 3019 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_LDRIVING, HARDWARE_MOTOR_TYPE__MOTO_LDRIVING, x_STATUS_STEP_LOSS_A,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__PULLER_MOTOR_STALL },
-//* 7048 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1, x_STATUS_STEP_LOSS_A,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_1_MOTOR_STALL},
-//* 7049 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_2, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_2, x_STATUS_STEP_LOSS_A,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_2_MOTOR_STALL},
-//* 7050 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_3, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_3, x_STATUS_STEP_LOSS_A,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_3_MOTOR_STALL},
-//* 7051 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_4, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_4, x_STATUS_STEP_LOSS_A,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_4_MOTOR_STALL},
-//* 7052 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_5, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_5, x_STATUS_STEP_LOSS_A,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_5_MOTOR_STALL},
-//* 7053 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_6, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_6, x_STATUS_STEP_LOSS_A,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_6_MOTOR_STALL},
-//* 7054 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_7, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_7, x_STATUS_STEP_LOSS_A,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_7_MOTOR_STALL},
-//* 7055 */ {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_8, HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_8, x_STATUS_STEP_LOSS_A,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DISPENSER_8_MOTOR_STALL},
-
-//* 6000 */ {eHundredMillisecond,ALARM_SOURCE_TYPE__TemperatureAlarm,MIXER_PT100, HARDWARE_PID_CONTROL_TYPE__MixerHeater ,270,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__MIXER_OVERTEMPERATURE},
-//* 5000 */ {eHundredMillisecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP1,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ1 ,270,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_1_OVERTEMPERATURE},
-//* 5001 */ {eHundredMillisecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP2,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ2 ,270,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_2_OVERTEMPERATURE},
-//* 5002 */ {eHundredMillisecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP3,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ3 ,270,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_3_OVERTEMPERATURE},
-//* 5003 */ {eHundredMillisecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP4,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ4 ,270,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_4_OVERTEMPERATURE},
-//* 5004 */ {eHundredMillisecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP5,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ5 ,270,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_5_OVERTEMPERATURE},
-//* 5005 */ {eHundredMillisecond,ALARM_SOURCE_TYPE__TemperatureAlarm,HEAD6_PT100, HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ6 ,270,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_6_OVERTEMPERATURE },
-//* 4005 */ {eHundredMillisecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DRYER_TEMP1, HARDWARE_PID_CONTROL_TYPE__DryerAirTemperature,270,true,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DRYER_ZONE_1_OVERTEMPERATURE },
-
-//* 2008 */ {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_AN_ENCLOSURETEMP1, 0,40,true,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__MACHINE_INTERNAL_OVERTEMPERATURE },
-//* 2017 */ {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_AN_ENCLOSURETEMP2, 1,40,true,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__MACHINE_INTERNAL_OVERTEMPERATURE },
-
-//* 2002 */ // {eHundredMillisecond,ALARM_SOURCE_TYPE__CoversAlarm,FrontDoor1_EC ,1,true,true,DEBUG_LOG_CATEGORY__Error, 0xFF,5,EVENT_TYPE__FRONT_COVER_1_OPEN},
-//* 2003 */ // {eHundredMillisecond,ALARM_SOURCE_TYPE__CoversAlarm,FrontDoor2_PPC ,1,true,true,DEBUG_LOG_CATEGORY__Error, 0xFF,5,EVENT_TYPE__FRONT_COVER_2_OPEN},
-//* 2004 */ // {eHundredMillisecond,ALARM_SOURCE_TYPE__CoversAlarm,FrontDoor3_DH_DRYER,1,true,true,DEBUG_LOG_CATEGORY__Error, 0xFF,5,EVENT_TYPE__FRONT_COVER_3_OPEN},
-//* 2005 */ // {eHundredMillisecond,ALARM_SOURCE_TYPE__CoversAlarm,FrontDoor4_MIDTANKS,1,true,true,DEBUG_LOG_CATEGORY__Error, 0xFF,5,EVENT_TYPE__FRONT_COVER_4_OPEN},
-//* 2007 */ // {eHundredMillisecond,ALARM_SOURCE_TYPE__CoversAlarm,RearDoor ,1,true,true,DEBUG_LOG_CATEGORY__Error, 0xFF,5,EVENT_TYPE__REAR_COVER_OPEN },
-
-//* 2006 */ {eHundredMillisecond,ALARM_SOURCE_TYPE__CoversAlarm,CartridgesDoor ,1,true,true,DEBUG_LOG_CATEGORY__Warning,0xFF,5,EVENT_TYPE__CARTRIDGES_COVER_OPEN},
-
-//* 6001 */ {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,MIXER_PT100, HARDWARE_PID_CONTROL_TYPE__MixerHeater ,9,false,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__MIXER_UNDERTEMPERATURE_A},
-//* 5006 */ {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP1,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ1 ,9,false,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_1_UNDERTEMPERATURE_A},
-//* 5007 */ {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP2,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ2 ,9,false,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_2_UNDERTEMPERATURE_A},
-//* 5008 */ {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP3,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ3 ,9,false,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_3_UNDERTEMPERATURE_A},
-//* 5009 */ {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP4,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ4 ,9,false,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_4_UNDERTEMPERATURE_A},
-//* 5010 */ {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP5,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ5 ,9,false,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_5_UNDERTEMPERATURE_A},
-//* 5011 */ {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,HEAD6_PT100, HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ6 ,9,false,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_6_UNDERTEMPERATURE_A},
-
-//* 4007 */ {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DRYER_TEMP1, HARDWARE_PID_CONTROL_TYPE__DryerAirTemperature,9,false,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__DRYER_ZONE_1_UNDERTEMPERATURE_A},
-//* 6002 */ {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,MIXER_PT100, HARDWARE_PID_CONTROL_TYPE__MixerHeater ,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__MIXER_UNDERTEMPERATURE_B},
-//* 5012 */ {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP1,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ1 ,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_1_UNDERTEMPERATURE_B},
-//* 5013 */ {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP2,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ2 ,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_2_UNDERTEMPERATURE_B},
-//* 5014 */ {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP3,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ3 ,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_3_UNDERTEMPERATURE_B},
-//* 5015 */ {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP4,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ4 ,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_4_UNDERTEMPERATURE_B},
-//* 5016 */ {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP5,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ5 ,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_5_UNDERTEMPERATURE_B},
-//* 5017 */ {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,HEAD6_PT100, HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ6 ,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_6_UNDERTEMPERATURE_B },
-//* 4008 */ {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DRYER_TEMP1, HARDWARE_PID_CONTROL_TYPE__DryerAirTemperature,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DRYER_ZONE_1_UNDERTEMPERATURE_B },
-
-//* 3004 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_RLOADING , HARDWARE_MOTOR_TYPE__MOTO_RLOADING , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__RIGHT_LOADER_MOTOR_OVERCURRENT }, //* 3004 */
-//* 3006 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_LLOADING , HARDWARE_MOTOR_TYPE__MOTO_LLOADING , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__LEFT_LOADER_MOTOR_OVERCURRENT }, //* 3006 */
-//* 3009 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM , HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__LOADING_ARM_MOTOR_OVERCURRENT }, //* 3009 */
-//* 3036 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_LDANCER2 , HARDWARE_MOTOR_TYPE__MOTO_LDANCER2 , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__WINDER_MOTOR_OVERCURRENT //*EVENT_TYPE__WINDER_DANCER_MOTOR_OVERCURRENT*/ }, //* 3036 */
-//* 3037 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_LDANCER1 , HARDWARE_MOTOR_TYPE__MOTO_LDANCER1 , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__PULLER_MOTOR_OVERCURRENT //*EVENT_TYPE__PULLER_DANCER_MOTOR_OVERCURRENT*/ }, //* 3037 */
-//* 3038 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_RDANCER , HARDWARE_MOTOR_TYPE__MOTO_RDANCER , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__FEEDER_MOTOR_OVERCURRENT //*EVENT_TYPE__FEEDER_DANCER_MOTOR_OVERCURRENT*/ }, //* 3038 */
-//* 4017 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID , HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DRYER_MOTOR_OVERCURRENT //*EVENT_TYPE__DRYER_LID_MOTOR_OVERCURRENT*/ }, //* 4017 */
-//* 5031 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DH_LID , HARDWARE_MOTOR_TYPE__MOTO_DH_LID , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_COVER_MOTOR_OVERCURRENT }, //* 5031 */
-//* 5035 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH , HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_CLEANING_MECHANISM_MOTOR_OVERCURRENT }, //* 5035 */
-//* 5039 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD , HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_CLEANING_HEAD_MOTOR_OVERCURRENT }, //* 5039 */
-
-//* 3011 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_RLOADING , HARDWARE_MOTOR_TYPE__MOTO_RLOADING , x_STATUS_TH_SD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__RIGHT_LOADER_MOTOR_OVERTEMPERATURE }, //* 3011 */
-//* 3013 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_LLOADING , HARDWARE_MOTOR_TYPE__MOTO_LLOADING , x_STATUS_TH_SD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__LEFT_LOADER_MOTOR_OVERTEMPERATURE }, //* 3013 */
-//* 3016 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM , HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM , x_STATUS_TH_SD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__LOADING_ARM_MOTOR_OVERTEMPERATURE }, //* 3016 */
-//* 3039 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_LDANCER2 , HARDWARE_MOTOR_TYPE__MOTO_LDANCER2 , x_STATUS_TH_SD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__WINDER_DANCER_MOTOR_OVERTEMPERATURE }, //* 3039 */
-//* 3040 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_LDANCER1 , HARDWARE_MOTOR_TYPE__MOTO_LDANCER1 , x_STATUS_TH_SD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__PULLER_DANCER_MOTOR_OVERTEMPERATURE }, //* 3040 */
-//* 3041 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_RDANCER , HARDWARE_MOTOR_TYPE__MOTO_RDANCER , x_STATUS_TH_SD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__FEEDER_DANCER_MOTOR_OVERTEMPERATURE }, //* 3041 */
-//* 4018 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID , HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID , x_STATUS_TH_SD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DRYER_LID_MOTOR_OVERTEMPERATURE }, //* 4018 */
-//* 5032 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DH_LID , HARDWARE_MOTOR_TYPE__MOTO_DH_LID , x_STATUS_TH_SD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_COVER_MOTOR_OVERTEMPERATURE }, //* 5032 */
-//* 5036 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH , HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH , x_STATUS_TH_SD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_CLEANING_MECHANISM_MOTOR_OVERTEMPERATURE }, //* 5036 */
-//* 5040 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD , HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD , x_STATUS_TH_SD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_CLEANING_HEAD_MOTOR_OVERTEMPERATURE }, //* 5040 */
-
-//* 3018 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_RLOADING , HARDWARE_MOTOR_TYPE__MOTO_RLOADING ,x_STATUS_STEP_LOSS_A , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__LOADING_ARM_MOTOR_STALL }, //* 3018 */
-//* 3020 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_LLOADING , HARDWARE_MOTOR_TYPE__MOTO_LLOADING ,x_STATUS_STEP_LOSS_A , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__WINDER_DANCER_MOTOR_STALL }, //* 3020 */
-//* 3023 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM , HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM ,x_STATUS_STEP_LOSS_A , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__LOADING_ARM_MOTOR_STALL }, //* 3023 */
-//* 3042 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_LDANCER2 , HARDWARE_MOTOR_TYPE__MOTO_LDANCER2 ,x_STATUS_STEP_LOSS_A , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__WINDER_DANCER_MOTOR_STALL }, //* 3042 */
-//* 3043 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_LDANCER1 , HARDWARE_MOTOR_TYPE__MOTO_LDANCER1 ,x_STATUS_STEP_LOSS_A , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__PULLER_DANCER_MOTOR_STALL }, //* 3043 */
-//* 3044 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_RDANCER , HARDWARE_MOTOR_TYPE__MOTO_RDANCER ,x_STATUS_STEP_LOSS_A , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__FEEDER_DANCER_MOTOR_STALL }, //* 3044 */
-//* 4019 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID , HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID ,x_STATUS_STEP_LOSS_A , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DRYER_LID_MOTOR_STALL }, //* 4019 */
-//* 5033 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DH_LID , HARDWARE_MOTOR_TYPE__MOTO_DH_LID ,x_STATUS_STEP_LOSS_A , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_COVER_MOTOR_STALL }, //* 5033 */
-//* 5037 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH , HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH ,x_STATUS_STEP_LOSS_A , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_CLEANING_MECHANISM_MOTOR_STALL }, //* 5037 */
-//* 5041 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD , HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD ,x_STATUS_STEP_LOSS_A , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_CLEANING_HEAD_MOTOR_STALL }, //* 5041 */
-
-//* 3025 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_RLOADING , HARDWARE_MOTOR_TYPE__MOTO_RLOADING , x_STATUS_UVLO , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__RIGHT_LOADER_MOTOR_UNDERVOLTAGE }, //* 3025 */
-//* 3027 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_LLOADING , HARDWARE_MOTOR_TYPE__MOTO_LLOADING , x_STATUS_UVLO , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__LEFT_LOADER_MOTOR_UNDERVOLTAGE }, //* 3027 */
-//* 3030 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM , HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM , x_STATUS_UVLO , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__LOADING_ARM_MOTOR_UNDERVOLTAGE }, //* 3030 */
-//* 3045 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_LDANCER2 , HARDWARE_MOTOR_TYPE__MOTO_LDANCER2 , x_STATUS_UVLO , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__WINDER_DANCER_MOTOR_UNDERVOLTAGE }, //* 3045 */
-//* 3046 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_LDANCER1 , HARDWARE_MOTOR_TYPE__MOTO_LDANCER1 , x_STATUS_UVLO , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__PULLER_DANCER_MOTOR_UNDERVOLTAGE }, //* 3046 */
-//* 3047 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_RDANCER , HARDWARE_MOTOR_TYPE__MOTO_RDANCER , x_STATUS_UVLO , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__FEEDER_DANCER_MOTOR_UNDERVOLTAGE }, //* 3047 */
-//* 4020 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID , HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID , x_STATUS_UVLO , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DRYER_LID_MOTOR_UNDERVOLTAGE }, //* 4020 */
-//* 5034 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DH_LID , HARDWARE_MOTOR_TYPE__MOTO_DH_LID , x_STATUS_UVLO , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_COVER_MOTOR_UNDERVOLTAGE }, //* 5034 */
-//* 5038 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH , HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH , x_STATUS_UVLO , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_CLEANING_MECHANISM_MOTOR_UNDERVOLTAGE }, //* 5038 */
-//* 5042 */ {eOneSecond, ALARM_SOURCE_TYPE__MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD , HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD , x_STATUS_UVLO , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_CLEANING_HEAD_MOTOR_UNDERVOLTAGE }, //* 5042 */
-
-//* 5018 */ {eOneSecond, ALARM_SOURCE_TYPE__CurrentAlarm, HEATER_HEAD_CURRENT_ZONE_1 , HEATER_HEAD_CURRENT_ZONE_1 , 125 , TRUE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 5, EVENT_TYPE__DYEING_HEAD_ZONE_1_CURRENT_OUT_OF_RANGE }, //* 5018 */
-//* 5019 */ {eOneSecond, ALARM_SOURCE_TYPE__CurrentAlarm, HEATER_HEAD_CURRENT_ZONE_2 , HEATER_HEAD_CURRENT_ZONE_2 , 187 , TRUE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 5, EVENT_TYPE__DYEING_HEAD_ZONE_2_CURRENT_OUT_OF_RANGE }, //* 5019 */
-//* 5020 */ {eOneSecond, ALARM_SOURCE_TYPE__CurrentAlarm, HEATER_HEAD_CURRENT_ZONE_3 , HEATER_HEAD_CURRENT_ZONE_3 , 187 , TRUE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 5, EVENT_TYPE__DYEING_HEAD_ZONE_3_CURRENT_OUT_OF_RANGE }, //* 5020 */
-//* 5021 */ {eOneSecond, ALARM_SOURCE_TYPE__CurrentAlarm, HEATER_HEAD_CURRENT_ZONE_4 , HEATER_HEAD_CURRENT_ZONE_4 , 312 , TRUE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 5, EVENT_TYPE__DYEING_HEAD_ZONE_4_CURRENT_OUT_OF_RANGE }, //* 5021 */
-//* 5022 */ {eOneSecond, ALARM_SOURCE_TYPE__CurrentAlarm, HEATER_HEAD_CURRENT_ZONE_5_6 , HEATER_HEAD_CURRENT_ZONE_5_6 , 500 , TRUE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 5, EVENT_TYPE__DYEING_HEAD_ZONE_5_6_CURRENT_OUT_OF_RANGE }, //* 5022 */
-//* 6004 */ {eOneSecond, ALARM_SOURCE_TYPE__CurrentAlarm, HEATER_MIXCHIP_CURRENT , HEATER_MIXCHIP_CURRENT , 187 , TRUE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 5, EVENT_TYPE__MIXER_CURRENT_OUT_OF_RANGE }, //* 6004 */
-//* 4011 */ {eOneSecond, ALARM_SOURCE_TYPE__CurrentAlarm, HEATER_DRYER_CURRENT_1, HEATER_DRYER_CURRENT_1, CURRENT4AMP , TRUE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 5, EVENT_TYPE__DRYER_HEATERS_ZONE_1_CURRENT_OUT_OF_RANGE }, //* 6004 */
-//* 4012 */ {eOneSecond, ALARM_SOURCE_TYPE__CurrentAlarm, HEATER_DRYER_CURRENT_2, HEATER_DRYER_CURRENT_2, CURRENT2AMP , TRUE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 5, EVENT_TYPE__DRYER_HEATERS_ZONE_2_CURRENT_OUT_OF_RANGE }, //* 6004 */
-
-//* 5023 */ {eOneSecond, ALARM_SOURCE_TYPE__CurrentAlarm, HEATER_HEAD_CURRENT_ZONE_1 , HEATER_HEAD_CURRENT_ZONE_1 , 0 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 5, EVENT_TYPE__DYEING_HEAD_ZONE_1_CURRENT_LOOP_BREAK }, //* 5018 */
-//* 5024 */ {eOneSecond, ALARM_SOURCE_TYPE__CurrentAlarm, HEATER_HEAD_CURRENT_ZONE_2 , HEATER_HEAD_CURRENT_ZONE_2 , 0 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 5, EVENT_TYPE__DYEING_HEAD_ZONE_2_CURRENT_LOOP_BREAK }, //* 5019 */
-//* 5025 */ {eOneSecond, ALARM_SOURCE_TYPE__CurrentAlarm, HEATER_HEAD_CURRENT_ZONE_3 , HEATER_HEAD_CURRENT_ZONE_3 , 0 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 5, EVENT_TYPE__DYEING_HEAD_ZONE_3_CURRENT_LOOP_BREAK }, //* 5020 */
-//* 5026 */ {eOneSecond, ALARM_SOURCE_TYPE__CurrentAlarm, HEATER_HEAD_CURRENT_ZONE_4 , HEATER_HEAD_CURRENT_ZONE_4 , 0 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 5, EVENT_TYPE__DYEING_HEAD_ZONE_4_CURRENT_LOOP_BREAK }, //* 5021 */
-//* 5027 */ {eOneSecond, ALARM_SOURCE_TYPE__CurrentAlarm, HEATER_HEAD_CURRENT_ZONE_5_6 , HEATER_HEAD_CURRENT_ZONE_5_6 , 0 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 5, EVENT_TYPE__DYEING_HEAD_ZONE_5_6_CURRENT_LOOP_BREAK }, //* 5022 */
-//* 6005 */ {eOneSecond, ALARM_SOURCE_TYPE__CurrentAlarm, HEATER_MIXCHIP_CURRENT , HEATER_MIXCHIP_CURRENT , 0 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 5, EVENT_TYPE__MIXER_CURRENT_LOOP_BREAK }, //* 6004 */
-//* 4013 */ {eOneSecond, ALARM_SOURCE_TYPE__CurrentAlarm, HEATER_DRYER_CURRENT_1, HEATER_DRYER_CURRENT_1, 0 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 5, EVENT_TYPE__DRYER_HEATERS_ZONE_1_CURRENT_LOOP_BREAK }, //* 6004 */
-//* 4014 */ {eOneSecond, ALARM_SOURCE_TYPE__CurrentAlarm, HEATER_DRYER_CURRENT_2, HEATER_DRYER_CURRENT_2, 0 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 5, EVENT_TYPE__DRYER_HEATERS_ZONE_2_CURRENT_LOOP_BREAK }, //* 6004 */
-//* 5028 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DYEING_HEAD_THERMAL_CUTOFF},
-
-//* 9005 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__VOC_SENSOR_ALARM_TIME},
-//* 9008 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__VOC_SENSOR_ALARM_SLOPE},
-
-//* 3000 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__THREAD_BREAK},
-//* 3001 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__THREAD_TENSION_CONTROL_FAILURE_FEEDER_DANCER},
-//* 3048 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__THREAD_TENSION_CONTROL_FAILURE_PULLER_DANCER},
-//* 3049 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__THREAD_TENSION_CONTROL_FAILURE_WINDER_DANCER},
-//* 3002 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__WINDER_CONE_DOES_NOT_EXIST},
-
-//* 4004 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DRYER_DOOR_OPEN},
-//* 9003 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__NO_AIR_PRESSURE},
-//* 9000 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__AIR_FILTER_NOT_INSTALLED},
-//* 9002 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__WASTE_CONTAINER_EMPTYING_TIMEOUT},
-
-//* 2014 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__MACHINE_STATE_HW_CONFIG_FAILED},
-
-//* 2009 */ {eOneSecond, ALARM_SOURCE_TYPE__TachoAlarm, MACHINE_FANS , MACHINE_FANS , MACHINE_FANS_MIN_RPM , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF, 5, EVENT_TYPE__MACHINE_FANS_RPM_TOO_LOW }, //*2009*/
-//* 2010 */ {eOneSecond, ALARM_SOURCE_TYPE__TachoAlarm, MACHINE_FANS , MACHINE_FANS , MACHINE_FANS_STOP , FALSE , DEBUG_LOG_CATEGORY__Critical, 0xFF, 5, EVENT_TYPE__MACHINE_FANS_STOPPED }, //*2010*/
-//* 2011 */ {eOneSecond, ALARM_SOURCE_TYPE__TachoAlarm, ELECTRICAL_CABINET_FANS, ELECTRICAL_CABINET_FANS, ELECTRICAL_CABINET_FANS_MIN_RPM, FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF, 5, EVENT_TYPE__ELECTRICAL_CABINET_FANS_RPM_TOO_LOW }, //*2011*/
-//* 2012 */ {eOneSecond, ALARM_SOURCE_TYPE__TachoAlarm, ELECTRICAL_CABINET_FANS, ELECTRICAL_CABINET_FANS, ELECTRICAL_CABINET_FANS_STOP , FALSE , DEBUG_LOG_CATEGORY__Critical, 0xFF, 5, EVENT_TYPE__ELECTRICAL_CABINET_FANS_STOPPED }, //*2012*/
-//* 4015 */ {eOneSecond, ALARM_SOURCE_TYPE__TachoAlarm, DRYER_FAN , DRYER_FAN , DRYER_FAN_MIN_RPM , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF, 5, EVENT_TYPE__DRYER_FAN_RPM_TOO_LOW }, //*4015*/
-//* 4016 */ {eOneSecond, ALARM_SOURCE_TYPE__TachoAlarm, DRYER_FAN , DRYER_FAN , DRYER_FAN_STOP , FALSE , DEBUG_LOG_CATEGORY__Critical, 0xFF, 5, EVENT_TYPE__DRYER_FAN_STOPPED }, //*4016*/
-
-//* 8024 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__MID_TANK_1_FILL_TIMEOUT},
-//* 8025 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__MID_TANK_2_FILL_TIMEOUT},
-//* 8026 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__MID_TANK_3_FILL_TIMEOUT},
-//* 8027 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__MID_TANK_4_FILL_TIMEOUT},
-//* 8028 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__MID_TANK_5_FILL_TIMEOUT},
-//* 8029 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__MID_TANK_6_FILL_TIMEOUT},
-//* 8030 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__MID_TANK_7_FILL_TIMEOUT},
-//* 8031 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__MID_TANK_8_FILL_TIMEOUT},
-
-//* 10002 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__NO_WASTE_CARTRIDGE_AVAILABLE},
-//* 10003 */ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__ALL_WASTE_CARTRIDGES_FULL}
-
-//};
char AlarmStorePath[30] ="0://SysInfo//Alarm.cfg";
uint16_t FluidLevelWarning = 20,FluidLevelError = 50;
@@ -453,17 +189,9 @@ int NumOfSystemAlarms = MAX_SYSTEM_ALARMS;
//bool DispenserInUse[MAX_SYSTEM_DISPENSERS] = {false,false,false,false,false,false,false,false};
bool EventsNotificationRequestAccepted = false;
char AlarmReasonStr[100];
-//read dispensers limit switches. 25 - send warning. up - stop job and send alarm
-//Cone missing
-//Dyeing head over temperature
-//mixer over temperature
-//dryer over temperature
-//heaters failure
-//dispenser pressure
-//valve OCD
-//Motor Status
-//machine cover open
+
AlarmParameters * AlarmParametersTable = NULL;
+
uint32_t AlarmHandlingLoadFile(void)
{
FRESULT Fresult = FR_OK;
@@ -483,7 +211,7 @@ uint32_t AlarmHandlingLoadFile(void)
maxAlarms = AlarmParametersTable->n_alarmitem;
p_size = AlarmParametersTable->n_alarmitem*sizeof(AlarmHandlingItemStruc);
ReportWithPackageFilter(AlarmFilter,"Writing alarm size", __FILE__,pAlarmItemSize,AlarmParametersTable->n_alarmitem, RpMessage, p_size, 0);
- EraseFlashSection(ALARM_SECTION_FLASH);
+ EraseFlashSection();
ReadAppAndProgram(pAlarmItemSize, 4,&p_size);
AlarmPtr = (int)pAlarmItemSize+4;
p_size = 0;
@@ -863,25 +591,6 @@ JobEndReasonEnum AlarmHandlingPrepareJob(void *CurrentJob)
return JOB_NO_ALARM_FILE;
}
- /*for (Segment_i=0;Segment_i<JobTicket->n_segments;Segment_i++)
- {
- for (Brush_i=0;Brush_i<JobTicket->segments[Segment_i]->n_brushstops;Brush_i++)
- {
- if (JobTicket->segments[Segment_i]->brushstops[Brush_i]->n_dispensers)
- {
- for (Dispenser_i = 0;Dispenser_i < JobTicket->segments[Segment_i]->brushstops[Brush_i]->n_dispensers;Dispenser_i++)
- {
- //prepare the SW structures
- DispenserId = JobTicket->segments[Segment_i]->brushstops[Brush_i]->dispensers[Dispenser_i]->index;
- if (JobTicket->segments[Segment_i]->brushstops[Brush_i]->dispensers[Dispenser_i]->nanolitterpersecond>0.0)
- {
- DispenserInUse[DispenserId] = true;
- }
- }//for dispenser
- }//if dispensers
- }//for brush
- }//for segments
- */
if (Configured[Module_IDS])
{
for (Dispenser_i=0;Dispenser_i<MAX_SYSTEM_DISPENSERS;Dispenser_i++)
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
index b85bb9824..9d784112e 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
@@ -611,18 +611,22 @@ void setRapidPressureRead(bool value)
}
uint16_t PumpCounter = 0;
uint16_t realtimetest[101];
+uint16_t dbgflag[50];
+uint32_t dbttime[50];
+bool Ten_msTick, Fifty_msTick, Hundred_msTick , m20msecTick,m90msecTick, Onesecond_Tick,Tensecond_Tick,OneMinute_Tick,TenMinutes_Tick,OneHourTick,Gradient_Tick;
+bool O700Millisecond_Tick,O200Millisecond_Tick,O400Millisecond_Tick,O500Millisecond_Tick,O600Millisecond_Tick,O800Millisecond_Tick;
+
uint32_t MillisecLowLoop(uint32_t tick)
{
uint8_t Motor_i,Disp_i,temp;
TEMPERATURE_SENSOR_ID_ENUM Sensor_i;
+#ifdef USE_RFID_LOGIC
RFID_READER_ID readerID;
-
+#endif
//static int temp=0;
//call all modules Millisec functions
//test dancers and speed encoders
//check all callback units (state machine waiting for completion of a change)
- bool Ten_msTick, Fifty_msTick, Hundred_msTick , m20msecTick,m90msecTick, Onesecond_Tick,Tensecond_Tick,OneMinute_Tick,TenMinutes_Tick,OneHourTick,Gradient_Tick;
- bool O700Millisecond_Tick,O200Millisecond_Tick,O400Millisecond_Tick,O500Millisecond_Tick,O600Millisecond_Tick,O800Millisecond_Tick;
//bool O100Millisecond_Tick,O200Millisecond_Tick,O400Millisecond_Tick,O500Millisecond_Tick,O600Millisecond_Tick,O800Millisecond_Tick,O900Millisecond_Tick;
Ten_msTick = (tick%eTenMillisecond == 0) ?true:false;
Fifty_msTick = (tick%eHundredMillisecond == 40) ?true:false; //eFiftyMillisecond
@@ -644,6 +648,7 @@ uint32_t MillisecLowLoop(uint32_t tick)
TenMinutes_Tick = (tick%eTenMinutes == 0) ?true:false;
OneHourTick = (tick%eOneHour == 0) ?true:false;
realtimetest[(tick%1000)/10]++;
+ dbttime[0] = msec_millisecondCounter;
//gather Motor data from FPGA
//ROM_IntMasterDisable();
int StartPT100 = 0;
@@ -657,7 +662,11 @@ uint32_t MillisecLowLoop(uint32_t tick)
//if (Sensor_Read++ >= MAX_MAIN_CARD_TEMPERATURE_SENSOR_ID) Sensor_Read = 0;
if(Machine_Idle_Mode == true)
Machine_Idle_Breathing_Led();
+ dbgflag[1]++;
+ dbttime[1] = msec_millisecondCounter;
Trigger_HeaterWriting();
+ dbgflag[2]++;
+ dbttime[2] = msec_millisecondCounter;
Read_Dryer_ENC_Position();
}
if (m20msecTick)
@@ -670,10 +679,6 @@ uint32_t MillisecLowLoop(uint32_t tick)
Trigger_PT100_Read();//call every 50mSec (minimum delay 30mSec)
//Set_HeadCard_PT100();//call every 50mSec (minimum delay 30mSec)
}
- /*if(m70msecTick)
- {
- AlarmHandling_ControlTrigger(0,0);
- }*/
if (m90msecTick)
{
for (Sensor_i = StartPT100;Sensor_i < MAX_HEAD_CARD_TEMP_SENS_ID;Sensor_i++)
@@ -702,6 +707,8 @@ uint32_t MillisecLowLoop(uint32_t tick)
//LOG_ERROR (1111, "Control_WD");
}
}
+ dbgflag[3]++;
+ dbttime[3] = msec_millisecondCounter;
if (RapidPressureRead == true)
{
for (Disp_i = 0;Disp_i < MAX_SYSTEM_DISPENSERS;Disp_i++)
@@ -783,6 +790,8 @@ uint32_t MillisecLowLoop(uint32_t tick)
KeepAliveOneSecondCall();
//TemperatureListString(Lenstr);
//ReportWithPackageFilter(ThreadFilter,Lenstr,__FILE__,__LINE__,(int)Counter++,RpWarning,(int) msec_millisecondCounter,0);
+ dbgflag[4]++;
+ dbttime[4] = msec_millisecondCounter;
for (Sensor_i = StartPT100;Sensor_i < MAX_HEAD_CARD_TEMP_SENS_ID;Sensor_i++)
{
TemperatureCalc[Sensor_i] = MillisecCalculateTemperatures ( Sensor_i);
@@ -840,8 +849,8 @@ uint32_t MillisecLowLoop(uint32_t tick)
//call IFS state machine
midTankStateMachine();
-
-
+ dbgflag[5]++;
+ dbttime[5] = msec_millisecondCounter;
}
if (Tensecond_Tick)
{
diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c
index 12842177c..b9f2a8a9e 100644
--- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c
+++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c
@@ -38,7 +38,7 @@
#include "StateMachines/Printing/PrintingSTM.h"
-char HomingToken[NUM_OF_MOTORS][36+1]={0};
+char *HomingToken[NUM_OF_MOTORS]={0};
int HomingCounter[NUM_OF_MOTORS];
uint32_t HomingControlId[NUM_OF_MOTORS];
@@ -51,7 +51,7 @@ void HomingStopReporting(void)
int i;
for (i = 0; i< NUM_OF_MOTORS;i++)
{
- HomingToken[i][0] = 0;
+ HomingToken[i] = NULL;
}
LOG_ERROR(0,"HomingStopReporting");
}
@@ -62,7 +62,7 @@ void HomingStopReporting(void)
int32_t keepkvalright,keepkvalleft;
uint32_t MotorHomingProgressReport(uint32_t deviceID, uint32_t ReadValue)
{
- if (HomingToken[deviceID][0] == 0)
+ if (HomingToken[deviceID] == NULL)
return OK;
MessageContainer responseContainer;
@@ -126,7 +126,7 @@ uint32_t MotorHomingRequestCallback(uint32_t deviceID, uint32_t ReadValue)
{
MCU_E2PromProgram(EEPROM_STORAGE_DRYER_CYCLES,NumberOfCycles);//it takes two cycles to identify a stop of the arm
}*/
- if (HomingToken[deviceID][0] == 0)
+ if (HomingToken[deviceID] == NULL)
return OK;
responseContainer = createContainer(MESSAGE_TYPE__MotorHomingResponse, HomingToken[deviceID], true, &response, &motor_homing_response__pack, &motor_homing_response__get_packed_size);
responseContainer.has_continuous = true;
@@ -135,7 +135,9 @@ uint32_t MotorHomingRequestCallback(uint32_t deviceID, uint32_t ReadValue)
size_t container_size = message_container__pack(&responseContainer, container_buffer);
my_free(responseContainer.data.data);
SendChars(container_buffer, container_size);
- HomingToken[deviceID][0] = 0;
+ if (HomingToken[deviceID])
+ my_free(HomingToken[deviceID]);
+ HomingToken[deviceID] = NULL;
return OK;
@@ -175,6 +177,7 @@ uint32_t MotorHomingRequestFunc(MessageContainer* requestContainer)
{
if ((JobIsActive() == false)&&(isMotorConfigured(MotorId) == true))
{
+ HomingToken[MotorId] = my_malloc(36);
ustrncpy (HomingToken[MotorId], requestContainer->token,36);
if (request->direction == MOTOR_DIRECTION__Backward) //opening the loading system
{
@@ -339,7 +342,7 @@ uint32_t DispenserHomingProgressReport(uint32_t deviceID, uint32_t ReadValue)
DispenserHomingResponse response = DISPENSER_HOMING_RESPONSE__INIT;
uint8_t MotorId = deviceID+HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1;
- if (HomingToken[MotorId][0] == 0)
+ if (HomingToken[deviceID] == NULL)
return OK;
bool last = false;
@@ -377,7 +380,7 @@ uint32_t DispenserHomingRequestCallback(uint32_t deviceID, uint32_t ReadValue)
//Valve_Set((Valves_t) (DispenserId+VALVE_2W_MID_AIR_8), Atm_MidTank_OFF);
//MotorSetMicroStep(deviceID, MotorsCfg[deviceID].microstep);
- if (HomingToken[MotorId][0] == 0)
+ if (HomingToken[deviceID] == NULL)
return OK;
responseContainer = createContainer(MESSAGE_TYPE__DispenserHomingResponse, HomingToken[MotorId], true, &response, &dispenser_homing_response__pack, &dispenser_homing_response__get_packed_size);
responseContainer.has_continuous = true;
@@ -386,7 +389,9 @@ uint32_t DispenserHomingRequestCallback(uint32_t deviceID, uint32_t ReadValue)
size_t container_size = message_container__pack(&responseContainer, container_buffer);
my_free(responseContainer.data.data);
SendChars(container_buffer, container_size);
- HomingToken[MotorId][0] = 0;
+ if (HomingToken[deviceID])
+ my_free(HomingToken[deviceID]);
+ HomingToken[deviceID] = NULL;
return OK;
@@ -404,6 +409,7 @@ uint32_t DispenserHomingRequestFunc(MessageContainer* requestContainer)
TimerMotors_t MotorId = (request->index)+HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1;
+ HomingToken[MotorId] = my_malloc(36);
ustrncpy (HomingToken[MotorId], requestContainer->token,36);
int speed = request->speed;
if (speed == 0) speed = 500;
@@ -514,7 +520,9 @@ uint32_t Diagnostics_Set_Load_Arm_To_Stopper_Callback(uint32_t deviceID, uint32_
size_t container_size = message_container__pack(&responseContainer, container_buffer);
my_free(responseContainer.data.data);
SendChars(container_buffer, container_size);
- HomingToken[deviceID][0] = 0;
+ if (HomingToken[deviceID])
+ my_free(HomingToken[deviceID]);
+ HomingToken[deviceID] = NULL;
return OK;
}
@@ -611,7 +619,9 @@ uint32_t Diagnostics_Dryer_MovetoEncoderPosition_Callback(uint32_t MotorId, uint
size_t container_size = message_container__pack(&responseContainer, container_buffer);
my_free(responseContainer.data.data);
SendChars(container_buffer, container_size);
- HomingToken[MotorId][0] = 0;
+ if (HomingToken[MotorId])
+ my_free(HomingToken[MotorId]);
+ HomingToken[MotorId] = NULL;
return OK;
}
diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
index 010fc9607..4c727d377 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
+++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
@@ -105,33 +105,19 @@ uint32_t HWConfigurationInit(void)
GeneralHwReady = false;
//Control_WD(ENABLE,250);
- memcpy(&Bytes,(void *)GENHWCFG_MAP_IN_FLASH,sizeof(Bytes));
-
- if ((Bytes)&&(Bytes < 5000))
+ buffer = HWConfigurationLoadFromFile(&Bytes); //load hardware config
+ if (buffer)
{
- buffer = my_malloc (Bytes);
- if (buffer)
- {
- memcpy(buffer, (void *)(GENHWCFG_MAP_IN_FLASH+4),Bytes);
- UploadRequest = upload_hardware_configuration_request__unpack(NULL, Bytes, buffer);
- Report("HWConfigurationInit from flash", __FILE__,__LINE__,Bytes, RpMessage, UploadRequest->hardwareconfiguration->n_dancers, 0);
- }
+ //EraseFlashSection(GENHWCFG_SECTION_FLASH);
+ //ReadAppAndProgram(GENHWCFG_MAP_IN_FLASH, 4,&Bytes);
+ //ReadAppAndProgram(GENHWCFG_MAP_IN_FLASH+4, Bytes, buffer);
+ UploadRequest = upload_hardware_configuration_request__unpack(NULL, Bytes, buffer);
+ Report("HWConfigurationInit from file", __FILE__,__LINE__,Bytes, RpMessage, UploadRequest->hardwareconfiguration->n_dancers, 0);
+ //AlarmHandlingLoadFile();
}
- if (UploadRequest == NULL)
- {
- buffer = HWConfigurationLoadFromFile(&Bytes); //load hardware config
- if (buffer)
- {
- EraseFlashSection(GENHWCFG_SECTION_FLASH);
- ReadAppAndProgram(GENHWCFG_MAP_IN_FLASH, 4,&Bytes);
- ReadAppAndProgram(GENHWCFG_MAP_IN_FLASH+4, Bytes, buffer);
- UploadRequest = upload_hardware_configuration_request__unpack(NULL, Bytes, buffer);
- Report("HWConfigurationInit from file", __FILE__,__LINE__,Bytes, RpMessage, UploadRequest->hardwareconfiguration->n_dancers, 0);
- }
- else
- Report("HWConfigurationInit Not available", __FILE__,__LINE__,Bytes, RpMessage, 0, 0);
+ else
+ Report("HWConfigurationInit Not available", __FILE__,__LINE__,Bytes, RpMessage, 0, 0);
- }
//buffer = HWConfigurationLoadFromFile(&Bytes);
//status= memcmp(buffer,buffer1,Bytes);
@@ -323,9 +309,10 @@ uint32_t EmbeddedParametersInit(void)
FRESULT Fresult = FR_OK;
uint32_t Bytes = 0;
uint8_t* buffer = NULL;
-
+ bool success=false;
ConfigurationParameters *Params;
+ // try loading from flash
memcpy(&Bytes,(void *)EMBEDDED_PARAMETERS_MAP_IN_FLASH,sizeof(Bytes));
if ((Bytes)&&(Bytes < 1000))
@@ -339,26 +326,23 @@ uint32_t EmbeddedParametersInit(void)
LoadConfigurationParameters(Params);
Report("LoadConfigurationParameters from flash", __FILE__,__LINE__,Bytes, RpMessage, Fresult, 0);
free(buffer);
- }
- else
- {
- LoadConfigurationParameters(0);
- Report("LoadConfigurationParameters default", __FILE__,__LINE__,0, RpMessage, Fresult, 0);
+ success = true;
}
}
- else
+ if (success == false)
{
- if (LoadConfigurationParamsFromFile(false)!=OK)
- {
- LoadConfigurationParameters(0);
- Report("LoadConfigurationParameters default", __FILE__,__LINE__,0, RpMessage, Fresult, 0);
- }
- else
+ if (LoadConfigurationParamsFromFile(false)==OK)
{
+ success = true;
Report("LoadConfigurationParameters from file", __FILE__,__LINE__,EmbeddedParameters->closevalvetimeout, RpMessage, Fresult, 0);
}
}
-
+ if (success == false)
+ {
+ LoadConfigurationParameters(0);
+ Report("LoadConfigurationParameters default. flash and file error!!!", __FILE__,__LINE__,0, RpMessage, Fresult, 0);
+ AlarmHandlingSetAlarm (EVENT_TYPE__POWER_UP_BIT_FAILURE,ON);
+ }
if (EmbeddedParameters->n_generalparameters >= 6)
{
IDS_Dispenser_SetBackLashValues(EmbeddedParameters->initialdispenserpressure, EmbeddedParameters->initialdispensertimeout, EmbeddedParameters->initialdispensertimelag,EmbeddedParameters->generalparameters[5]);
@@ -734,9 +718,6 @@ uint32_t MidTankDataSetupFunc(MessageContainer* requestContainer)
uint32_t HWConfigurationFunc(MessageContainer* requestContainer)
{
uint32_t status = 0;
- uint32_t DataLen = 0;
- uint32_t ExistingDataLen = 0;
- int compare = 0;
MessageContainer responseContainer;
UploadHardwareConfigurationResponse response = UPLOAD_HARDWARE_CONFIGURATION_RESPONSE__INIT;
UploadHardwareConfigurationRequest* UploadRequest = NULL;
@@ -750,7 +731,7 @@ uint32_t HWConfigurationFunc(MessageContainer* requestContainer)
GeneralHwReady = false;
Control_WD(ENABLE,250);
//compare existing data to new data. update if different
- memcpy(&ExistingDataLen,(void *)GENHWCFG_MAP_IN_FLASH,sizeof(ExistingDataLen));
+ /*memcpy(&ExistingDataLen,(void *)GENHWCFG_MAP_IN_FLASH,sizeof(ExistingDataLen));
if (ExistingDataLen == requestContainer->data.len)
{
compare = memcmp (requestContainer->data.data,((void *)(GENHWCFG_MAP_IN_FLASH+4)),requestContainer->data.len);
@@ -766,15 +747,17 @@ uint32_t HWConfigurationFunc(MessageContainer* requestContainer)
ReadAppAndProgram(GENHWCFG_MAP_IN_FLASH, 4,&DataLen);
ReadAppAndProgram(GENHWCFG_MAP_IN_FLASH+4, DataLen, requestContainer->data.data);
Report("store hw configuration", __FILE__,compare,requestContainer->data.len,RpMessage,ExistingDataLen,0);
-
+ AlarmHandlingLoadFile();
FileWrite(requestContainer->data.data, requestContainer->data.len,HwConfigPath,BIOS_WAIT_FOREVER);
- }
+ }*/
UploadRequest = upload_hardware_configuration_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);
-
-
- status = HWConfiguration(UploadRequest);
-
- GeneralHwReady = true;
+ if (UploadRequest)
+ {
+ FileWrite(requestContainer->data.data, requestContainer->data.len,HwConfigPath,BIOS_WAIT_FOREVER);
+ Report("store hw configuration", __FILE__,__LINE__,requestContainer->data.len,RpMessage,UploadRequest->hardwareconfiguration->n_motors,0);
+ status = HWConfiguration(UploadRequest);
+ GeneralHwReady = true;
+ }
}
@@ -833,7 +816,7 @@ void HWSystemResetRequest(MessageContainer* requestContainer)
HWREG(NVIC_APINT) = NVIC_APINT_VECTKEY | NVIC_APINT_SYSRESETREQ;
}
-uint32_t FlashInitResults[5] = {0,0,0,0,0};
+//uint32_t FlashInitResults[5] = {0,0,0,0,0};
uint32_t LoadConfigurationParamsFromFile(bool Initialize)
{
FRESULT Fresult = FR_OK;
@@ -849,9 +832,9 @@ uint32_t LoadConfigurationParamsFromFile(bool Initialize)
LoadConfigurationParameters(Params);
free (buffer);
//configuration_parameters__free_unpacked(Params,NULL);
- FlashInitResults[1] = true;
+ //FlashInitResults[1] = true;
Report("Parameters Initialized from file", __FILE__,__LINE__,Bytes, RpMessage, EMBEDDED_PARAMETERS_MAP_IN_FLASH, 0);
- EraseFlashSection(EMBEDDED_PARAMETERS_SECTION_FLASH);
+ EraseFlashSection();
ReadAppAndProgram(EMBEDDED_PARAMETERS_MAP_IN_FLASH, 4,&Bytes);
ReadAppAndProgram(EMBEDDED_PARAMETERS_MAP_IN_FLASH+4, Bytes, buffer);
if (Initialize)
@@ -863,16 +846,16 @@ void HWConfigurationLoadFile(void)
{
uint8_t* buffer = NULL;
uint32_t Bytes = 0;
+ UploadHardwareConfigurationRequest* UploadRequest = NULL;
+
buffer = HWConfigurationLoadFromFile(&Bytes); //load hardware config
if (buffer)
{
- EraseFlashSection(GENHWCFG_SECTION_FLASH);
- ReadAppAndProgram(GENHWCFG_MAP_IN_FLASH, 4,&Bytes);
- ReadAppAndProgram(GENHWCFG_MAP_IN_FLASH+4, Bytes, buffer);
- free (buffer);
- FlashInitResults[0] = true;
+ UploadRequest = upload_hardware_configuration_request__unpack(NULL, Bytes, buffer);
+ Report("HWConfigurationInit from file", __FILE__,__LINE__,Bytes, RpMessage, UploadRequest->hardwareconfiguration->n_dancers, 0);
}
- Report("Hardware Initialized", __FILE__,__LINE__,Bytes, RpMessage, GENHWCFG_MAP_IN_FLASH, 0);
+ else
+ Report("HWConfigurationInit Not available", __FILE__,__LINE__,Bytes, RpMessage, 0, 0);
}
void FlashInitAndLoad(void)
{
@@ -895,7 +878,7 @@ void FlashInitAndLoad(void)
FlashInit(); //initialize flash
Report("Flash Initialized", __FILE__,__LINE__,FLASH_SIZE, RpMessage, FLASH_RAM_BASE, 0);
- buffer = HWConfigurationLoadFromFile(&Bytes); //load hardware config
+ /*buffer = HWConfigurationLoadFromFile(&Bytes); //load hardware config
if (buffer)
{
EraseFlashSection(GENHWCFG_SECTION_FLASH);
@@ -904,7 +887,7 @@ void FlashInitAndLoad(void)
free (buffer);
FlashInitResults[0] = true;
}
- Report("Hardware Initialized", __FILE__,__LINE__,Bytes, RpMessage, GENHWCFG_MAP_IN_FLASH, 0);
+ Report("Hardware Initialized", __FILE__,__LINE__,Bytes, RpMessage, GENHWCFG_MAP_IN_FLASH, 0);*/
StoreDancerConfigMessage(0);
StoreDancerConfigMessage(1);
@@ -915,7 +898,7 @@ void FlashInitAndLoad(void)
{
Report("Alarm Initialized from file", __FILE__,__LINE__,Bytes, RpMessage, ALARM_MAP_IN_FLASH, 0);
}*/
- EraseFlashSection(EMBEDDED_PARAMETERS_SECTION_FLASH);
+ EraseFlashSection();
Fresult = FileRead(EmbeddedParametersPath, &Bytes, &buffer);
if (Fresult == FR_OK)
@@ -927,33 +910,14 @@ void FlashInitAndLoad(void)
ReadAppAndProgram(EMBEDDED_PARAMETERS_MAP_IN_FLASH+4, Bytes, buffer);
free (buffer);
//configuration_parameters__free_unpacked(Params,NULL);
- FlashInitResults[1] = true;
Report("Parameters Initialized from file", __FILE__,__LINE__,sizeof(EmbeddedParameters), RpMessage, EMBEDDED_PARAMETERS_MAP_IN_FLASH, 0);
}
else
{
LoadConfigurationParameters(0);
- FlashInitResults[1] = 2;
Report("Parameters Initialized from default", __FILE__,__LINE__,sizeof(EmbeddedParameters), RpMessage, EMBEDDED_PARAMETERS_MAP_IN_FLASH, 0);
}
- /*Fresult = FileRead(ProcessParamsPath, &Bytes, &buffer);
- if (Fresult == FR_OK)
- {
- request = upload_process_parameters_request__unpack(NULL, Bytes, buffer);
- if (request)
- {
- ProcessParams = request->processparameters;
- Bytes = sizeof(ProcessParams);
- ReadAppAndProgram(PROCESS_PARAMETERS_MAP_IN_FLASH, 4,&Bytes);
- ReadAppAndProgram(PROCESS_PARAMETERS_MAP_IN_FLASH+4, Bytes, &ProcessParams);
- upload_process_parameters_request__free_unpacked(request,NULL);
- FlashInitResults[2] = true;
- Report("Process Initialized", __FILE__,__LINE__,Bytes, RpMessage, (int)ProcessParams->dryerzone1temp, 0);
- }
- }
- else
- Report("Process not Initialized", __FILE__,__LINE__,0, RpMessage, 0, 0);*/
#ifdef WATCHDOG
ROM_WatchdogResetEnable(WATCHDOG0_BASE);
timeout = 120000000*3;
diff --git a/Software/Embedded_SW/Embedded/Modules/General/process.c b/Software/Embedded_SW/Embedded/Modules/General/process.c
index 807e9f8e9..137b5a19f 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/process.c
+++ b/Software/Embedded_SW/Embedded/Modules/General/process.c
@@ -124,9 +124,11 @@ uint32_t HandleProcessParameters(ProcessParameters* ProcessParams,bool saveData)
{
Bytes = sizeof(ProcessParameters);
FileWrite(ProcessParams,Bytes,ProcessParamsConfigPath,BIOS_WAIT_FOREVER);
- EraseFlashSection(PROCESS_PARAMETERS_MAP_IN_FLASH);
+ MCU_E2PromProgramChunk(PROCESS_PARAMATERS_IN_EEPROM,4,&Bytes);
+ MCU_E2PromProgramChunk(PROCESS_PARAMATERS_IN_EEPROM+4, Bytes, ProcessParams);
+ /*EraseFlashSection(PROCESS_PARAMETERS_MAP_IN_FLASH);
ReadAppAndProgram(PROCESS_PARAMETERS_MAP_IN_FLASH, 4,&Bytes);
- ReadAppAndProgram(PROCESS_PARAMETERS_MAP_IN_FLASH+4, Bytes, ProcessParams);
+ ReadAppAndProgram(PROCESS_PARAMETERS_MAP_IN_FLASH+4, Bytes, ProcessParams);*/
REPORT_MSG(Bytes,"Bytes write to flash");
}
else
@@ -386,9 +388,11 @@ uint32_t LoadProcessParamsFromFile(void)
if ((ProcessParams->dryerzone1temp > 0.1)||(ProcessParams->headzone2temp > 0.1)||(ProcessParams->headzone3temp > 0.1)||(ProcessParams->headzone4temp > 0.1))//NOT turning off heaters
{
Bytes = sizeof(ProcessParameters);
- EraseFlashSection(PROCESS_PARAMETERS_MAP_IN_FLASH);
+ MCU_E2PromProgramChunk(PROCESS_PARAMATERS_IN_EEPROM,4,&Bytes);
+ MCU_E2PromProgramChunk(PROCESS_PARAMATERS_IN_EEPROM+4, Bytes, ProcessParams);
+ /*EraseFlashSection(PROCESS_PARAMETERS_MAP_IN_FLASH);
ReadAppAndProgram(PROCESS_PARAMETERS_MAP_IN_FLASH, 4,&Bytes);
- ReadAppAndProgram(PROCESS_PARAMETERS_MAP_IN_FLASH+4, Bytes, ProcessParams);
+ ReadAppAndProgram(PROCESS_PARAMETERS_MAP_IN_FLASH+4, Bytes, ProcessParams);*/
REPORT_MSG(Bytes,"ProcessParameters Bytes write to flash");
free (buffer);
}
@@ -406,26 +410,32 @@ uint32_t ProcessParamsInit(void)
{
FRESULT Fresult = FR_NOT_READY;
uint32_t Bytes;
+ ProcessParameters ProcessParams;
- memcpy(&Bytes,(void *)PROCESS_PARAMETERS_MAP_IN_FLASH,sizeof(Bytes));
- REPORT_MSG(Bytes,"Bytes read from flash");
+ //memcpy(&Bytes,(void *)PROCESS_PARAMETERS_MAP_IN_FLASH,sizeof(Bytes));
+ MCU_E2PromReadChunk(PROCESS_PARAMATERS_IN_EEPROM,4,&Bytes);
+
+ REPORT_MSG(Bytes,"Bytes read from EEPROM");
if ((Bytes)&&(Bytes < 1000))
{
- ProcessParameters* ProcessParams = (ProcessParameters *)(PROCESS_PARAMETERS_MAP_IN_FLASH+4);
- Fresult = HandleProcessParameters(ProcessParams,false);
+ //ProcessParameters* ProcessParams = (ProcessParameters *)(PROCESS_PARAMETERS_MAP_IN_FLASH+4);
+ MCU_E2PromReadChunk(PROCESS_PARAMATERS_IN_EEPROM+4,Bytes,&ProcessParams);
+ Fresult = HandleProcessParameters(&ProcessParams,false);
}
else
{
if (LoadProcessParamsFromFile()==OK)
{
- memcpy(&Bytes,(void *)PROCESS_PARAMETERS_MAP_IN_FLASH,sizeof(Bytes));
- REPORT_MSG(Bytes,"ProcessParams Bytes read from flash");
+ MCU_E2PromReadChunk(PROCESS_PARAMATERS_IN_EEPROM,4,&Bytes);
+ //memcpy(&Bytes,(void *)PROCESS_PARAMETERS_MAP_IN_FLASH,sizeof(Bytes));
+ REPORT_MSG(Bytes,"ProcessParams Bytes read from EEPROM");
if ((Bytes)&&(Bytes < 1000))
{
- ProcessParameters* ProcessParams = (ProcessParameters *)(PROCESS_PARAMETERS_MAP_IN_FLASH+4);
- Fresult = HandleProcessParameters(ProcessParams,false);
+ MCU_E2PromReadChunk(PROCESS_PARAMATERS_IN_EEPROM+4,Bytes,&ProcessParams);
+ //ProcessParameters* ProcessParams = (ProcessParameters *)(PROCESS_PARAMETERS_MAP_IN_FLASH+4);
+ Fresult = HandleProcessParameters(&ProcessParams,false);
}
}
}
diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c
index 76c679d80..ed3ae9bab 100644
--- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c
+++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c
@@ -228,16 +228,7 @@ void setArcHeadAlarms(uint32_t AlarmId, bool value)
{
switch(AlarmId)
{
- case EVENT_TYPE__DYEING_HEAD_COVER_IS_OPEN:
- ReportWithPackageFilter(HeatersFilter,"FlatHeadAlarms on",__FILE__,AlarmId,count9,RpError, 0,0);
- break;
- /*case EVENT_TYPE__DYEING_HEAD_ARC_LID_IS_OPEN:
- ReportWithPackageFilter(HeatersFilter,"ArcHeadAlarms on",__FILE__,AlarmId,count9,RpError, 0,0);
- break;
- case EVENT_TYPE__DYEING_HEAD_TUNNEL_LID_IS_OPEN:
- ReportWithPackageFilter(HeatersFilter,"ArcHeadAlarms on",__FILE__,AlarmId,count9,RpError, 0,0);
- break;
- case EVENT_TYPE__DYEING_HEAD_BLOWER_1_FAN_STOPPED:
+ /*case EVENT_TYPE__DYEING_HEAD_BLOWER_1_FAN_STOPPED:
ReportWithPackageFilter(HeatersFilter,"ArcHeadAlarms on",__FILE__,AlarmId,count9,RpError, 0,0);
break;
case EVENT_TYPE__DYEING_HEAD_BLOWER_2_FAN_STOPPED:
@@ -261,6 +252,17 @@ void setArcHeadAlarms(uint32_t AlarmId, bool value)
case EVENT_TYPE__DYEING_HEAD_BLOWER_2_FLOW_TOO_LOW:
ReportWithPackageFilter(HeatersFilter,"ArcHeadAlarms on",__FILE__,AlarmId,count8,RpError, PressureSensorGetPressure(HEAD_FAN_LEFT),0);
break;
+ /*case EVENT_TYPE__DYEING_HEAD_ARC_LID_IS_OPEN:
+ ReportWithPackageFilter(HeatersFilter,"ArcHeadAlarms on",__FILE__,AlarmId,count9,RpError, 0,0);
+ break;
+ case EVENT_TYPE__DYEING_HEAD_TUNNEL_LID_IS_OPEN:
+ ReportWithPackageFilter(HeatersFilter,"ArcHeadAlarms on",__FILE__,AlarmId,count9,RpError, 0,0);
+ break;*/
+ case EVENT_TYPE__DYEING_HEAD_COVER_IS_OPEN:
+ ReportWithPackageFilter(HeatersFilter,"FlatHeadAlarms on",__FILE__,AlarmId,count9,RpError, 0,0);
+ break;
+ default:
+ break;
}
}
}
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c
index c8f435cb9..4ee94dae4 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c
@@ -17,7 +17,8 @@
#include "Common/SWUpdate/FileSystem.h"
#include "drivers/Flash_Memory/fatfs/ff.h"
-#include "drivers/Flash_ram/FlashProgram.h"
+//#include "drivers/Flash_ram/FlashProgram.h"
+#include "drivers/Flash_ram/MCU_E2Prom.h"
#include "StateMachines/Printing/PrintingSTM.h"
@@ -249,7 +250,10 @@ void IDS_Dispenser_Content_Init (void)
}
//==================================
- memcpy(&Bytes,(void *)DISPENSERS_MAP_IN_FLASH,sizeof(Bytes));
+ //MCU_E2PromProgramChunk(DISPENSERS_MAP_IN_EEPROM,4,&Bytes);
+
+ MCU_E2PromReadChunk(DISPENSERS_MAP_IN_EEPROM,4,&Bytes);
+ //memcpy(&Bytes,(void *)DISPENSERS_MAP_IN_FLASH,sizeof(Bytes));
bool havedata = false;
DispenserData* StoredDispenserData;
if ((Bytes)&&(Bytes < 500))
@@ -257,9 +261,11 @@ void IDS_Dispenser_Content_Init (void)
buffer = my_malloc (Bytes);
if (buffer)
{
- memcpy(buffer, (void *)(DISPENSERS_MAP_IN_FLASH+4),Bytes);
+ MCU_E2PromReadChunk(DISPENSERS_MAP_IN_EEPROM+4,Bytes,buffer);
+ //memcpy(buffer, (void *)(DISPENSERS_MAP_IN_FLASH+4),Bytes);
StoredDispenserData = dispenser_data__unpack(NULL,Bytes,buffer);
- havedata = true;
+ if (StoredDispenserData)
+ havedata = true;
free(buffer);
}
}
@@ -323,11 +329,14 @@ uint32_t IDS_Dispenser_Store_Data (void)
if (JobIsActive()==false)
{
response_size = dispenser_data__pack(&StoreDispenserData, dispensers_container_buffer);
- EraseFlashSection(DISPENSERS_SECTION_FLASH);
+
+ MCU_E2PromProgramChunk(DISPENSERS_MAP_IN_EEPROM,4,&response_size);
+ MCU_E2PromProgramChunk(DISPENSERS_MAP_IN_EEPROM+4, response_size, dispensers_container_buffer);
+ /*EraseFlashSection(DISPENSERS_SECTION_FLASH);
ReadAppAndProgram(DISPENSERS_MAP_IN_FLASH, 4,&response_size);
ReadAppAndProgram(DISPENSERS_MAP_IN_FLASH+4, response_size, dispensers_container_buffer);
//ReportWithPackageFilter(IDSFilter,"IDS_Dispenser_Store ",__FILE__,__LINE__,(int)response_size,RpWarning,(int)StoreDispenserData.dispenserinfo[4]->nanolitterperpulse *100,0);
-
+ */
/*Status = FileWrite(IDS_Dispenser_Data,response_size,DispenserStorePath,BIOS_NO_WAIT);
if (Status == FR_OK)
{
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c
index a1aa37c07..1528a9a3b 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c
@@ -83,6 +83,7 @@ uint32_t InitialDispenserTimeout = INITIAL_DISPENSER_TIMEOUT_LIMIT;
uint32_t InitialDispenserTimeLag = INITIAL_DISPENSER_TIMEOUT;
uint32_t InitialDispenserSpeed = INITIAL_DISPENSER_SPEED;
+uint32_t DispenserHomingTimeoutControlId [MAX_SYSTEM_DISPENSERS] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
uint32_t ControlIdtoInactiveDispenserId [MAX_SYSTEM_DISPENSERS] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
//uint32_t IDS_StopHomeDispenserBuildPressure (uint32_t deviceID);
@@ -189,6 +190,13 @@ uint32_t IDS_HomeDispenserWaitForHomingEnd(uint32_t DispenserId, uint32_t timeo
}
return OK;
}*/
+uint32_t IDS_Honing_Timeout_Callback(uint32_t DispenserId, uint32_t ReadValue)
+{
+ ReportWithPackageFilter(IDSFilter,"IDS_Honing_Timeout_Callback",__FILE__,DispenserId,(int)(GetDispenserPressure(DispenserId)*100),RpWarning,2000,0);
+ SafeRemoveControlCallback(DispenserHomingTimeoutControlId[DispenserId], IDS_Honing_Timeout_Callback );
+ AlarmHandlingSetAlarm (DispenserId+EVENT_TYPE__DISPENSER_1_REFILL_FAILURE,true);
+}
+
uint32_t IDS_HomeDispenserCallback(uint32_t motorId, uint32_t ReadValue)
{
uint8_t DispenserId = motorId-HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1;
@@ -203,7 +211,8 @@ uint32_t IDS_HomeDispenserCallback(uint32_t motorId, uint32_t ReadValue)
HomingRequestCallback[DispenserId](DispenserId,0);
HomingRequestCallback[DispenserId] = NULL;
}
-// HomingActive[DispenserId]= false;
+ RemoveControlCallback(DispenserHomingTimeoutControlId[DispenserId], IDS_Honing_Timeout_Callback );
+ // HomingActive[DispenserId]= false;
IDS_Dispenser_RefillEnded ( DispenserId, MotorsCfg[motorId].microstep);
ReportWithPackageFilter(IDSFilter,"Homing ended",__FILE__,millisecondCounter,(int)DispenserId,RpWarning,(int)DispenserHomingTime[DispenserId],0);
// DispenserHomingControlId[DispenserId] = AddControlCallback( IDS_HomeDispenserBackMoveCallback, InitialDispenserTimeLag, GetDispenserPressure,motorId, motorId, 0 );
@@ -295,17 +304,23 @@ uint32_t IDS_HomeDispenser (uint32_t DispenserId, uint32_t speed , callback_fptr
Enable_MidTank_Pressure_Reading(DispenserId);
IDS_Dispenser_RefillStarted(DispenserId,1);
+ AlarmHandlingSetAlarm (DispenserId+EVENT_TYPE__DISPENSER_1_REFILL_FAILURE,false);
if (DispenserId== LUBRICANT_DISPENSER)
{
MotorMovetoLimitSwitch (MotorId,1-MotorsCfg[MotorId].directionthreadwize, speed/4, Dispenser_Id_to_LS_Id[DispenserId], IDS_HomeDispenserCallback,0);
CurrentDispenserSpeed[DispenserId] = speed/4;
ReportWithPackageFilter(IDSFilter,"IDS_HomeDispenser ",__FILE__,(int)(midTankContent*1000),(int)DispenserId,RpWarning,speed/4,0);
+ if (DispenserHomingTimeoutControlId[DispenserId] == 0xFF)
+ DispenserHomingTimeoutControlId[DispenserId] = AddControlCallback("IDS Homing Timeout", IDS_Honing_Timeout_Callback, eOneHour*4,TemplateDataReadCBFunction ,DispenserId, 0, 0 );
+
}
else
{
MotorMovetoLimitSwitch (MotorId,1-MotorsCfg[MotorId].directionthreadwize, speed, Dispenser_Id_to_LS_Id[DispenserId], IDS_HomeDispenserCallback,0);
CurrentDispenserSpeed[DispenserId] = speed;
ReportWithPackageFilter(IDSFilter,"IDS_HomeDispenser ",__FILE__,(int)(midTankContent*1000),(int)DispenserId,RpWarning,speed,0);
+ if (DispenserHomingTimeoutControlId[DispenserId] == 0xFF)
+ DispenserHomingTimeoutControlId[DispenserId] = AddControlCallback("IDS Homing Timeout", IDS_Honing_Timeout_Callback, eOneHour,TemplateDataReadCBFunction ,DispenserId, 0, 0 );
}
CurrentDispenserSpeed[DispenserId] = (-1*CurrentDispenserSpeed[DispenserId]);
DispenserLastMovementDown[DispenserId] = true;
@@ -327,6 +342,7 @@ uint32_t IDS_StopHomeDispenser (uint32_t DispenserId)
TimerMotors_t MotorId = (DispenserId)+HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1;
MotorAbortMovetoLimitSwitch(MotorId);
+ RemoveControlCallback(DispenserHomingTimeoutControlId[DispenserId], IDS_Honing_Timeout_Callback );
//close dry air valve in the dispenser
Disable_MidTank_Pressure_Reading(DispenserId);
Valve_Set(IDS_Id_to_AirValve[DispenserId], Atm_MidTank_OFF);
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
index 559ffdecc..2d371595c 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
@@ -134,7 +134,7 @@ void IDS_Dispenser_SetPreSegmentWFCFValues(double dispenserpresegmentwfcf, doubl
/*uint32_t IDS_DispenserControlInit()
{
- DispensersControl = (void *)(DISPENSERS_MAP_IN_FLASH);
+ DispensersControl = (void *)(?/);
DispensersControl = DispensersCtrl;
//EraseFlashSection(DispensersControl,sizeof(HardwarePidControl)*MAX_SYSTEM_DISPENSERS);
@@ -1523,7 +1523,7 @@ uint32_t IDSPreSegmentState(void *SegmentDetails, int SegmentId)
//********************************************************************************************************************
uint32_t SegmentNumOfBrushStops = 0;
-double BrushStopTime = 0;
+double BrushStopTime = 0,BrushStopOffset = 0,PrevBrushStopOffset = 0;
uint32_t BrushStopCounter = 0;
uint32_t BrushStopStartTime = 0,BrushStopLength = 0;
@@ -1532,7 +1532,16 @@ void IDS_StartBrushStop(int n_dispensers, JobDispenser** Dispensers)
int Dispenser_i,DispenserId;
TimerMotors_t HW_Motor_Id;
double segmentfirst_speed;
+ double tempBrushStopTime = 0;
//ReportWithPackageFilter(IDSFilter,"IDS_StartBrushStop",__FILE__,__LINE__,(int)JobBrushStopId,RpWarning,(int)0,0);
+ PrevBrushStopOffset = BrushStopOffset;
+ BrushStopOffset = FileBrushStop->offsetmeters;
+ tempBrushStopTime = (BrushStopOffset-PrevBrushStopOffset); //length in meters
+ tempBrushStopTime = ((tempBrushStopTime*100)/dyeingspeed);//brushstop in seconds (length in cetimeters/ centimeters per second)
+ tempBrushStopTime *= 1000; // milliseconds
+ if (tempBrushStopTime > 100)
+ BrushStopTime = tempBrushStopTime;
+ ReportWithPackageFilter(IDSFilter,"IDS_StartBrushStop offset", __FILE__, tempBrushStopTime,(int)(BrushStopOffset*100), RpWarning,(int)(PrevBrushStopOffset*100), 0);
if (n_dispensers)
{
@@ -1611,7 +1620,7 @@ void IDS_StartBrushStop(int n_dispensers, JobDispenser** Dispensers)
//usnprintf(IdMessage, 80,"IDS_StartBrushStop %d/%d K %d,C %d,M %d,Y %d,TI %d",FileBrushStop->index,SegmentNumOfBrushStops,CurrentDispenserSpeed[0],
// CurrentDispenserSpeed[1],CurrentDispenserSpeed[2],CurrentDispenserSpeed[3],CurrentDispenserSpeed[4]);
if (BuildIdsJobPrintString(IdMessage,"IDS_StartBrushStop ",FileBrushStop->index))
- ReportWithPackageFilter(IDSFilter,IdMessage, __FILE__, SegmentNumOfBrushStops, FileBrushStop->index, RpWarning,(int)FileBrushStop->offsetmeters, 0);
+ ReportWithPackageFilter(IDSFilter,IdMessage, __FILE__, SegmentNumOfBrushStops, FileBrushStop->index, RpWarning,(int)(FileBrushStop->offsetmeters*100), 0);
}
uint32_t IDSBrushStopRestartCallback(uint32_t IfIndex, uint32_t readValue)
@@ -1714,6 +1723,8 @@ uint32_t IDSSegmentState(void *SegmentDetails, int SegmentId)
if (CurrentDispenserSpeed[CLEANER_DISPENSER]>0)
IDS_Cleaning_Stop_Cleaning_Solution(NULL);
#endif
+ BrushStopOffset = 0;
+ PrevBrushStopOffset = 0;
SegmentNumOfBrushStops = Segment->n_brushstops;
BrushStopTime = Segment->length*1000/(double)SegmentNumOfBrushStops; //brushstop in meters //brushstop in millisecond
BrushStopTime = ((BrushStopTime*100)/dyeingspeed);//brushstop in seconds
diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Cartridge.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Cartridge.c
index f4b1f7463..7161da796 100644
--- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Cartridge.c
+++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Cartridge.c
@@ -25,16 +25,16 @@
void Stub_CartridgeReadRequest(MessageContainer* requestContainer)
{
- uint32_t status = PASSED;
+ //uint32_t status = PASSED;
MessageContainer responseContainer;
- static bool first_time = true;
+ //static bool first_time = true;
StubCartridgeReadRequest* request = stub_cartridge_read_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);
Cartridge CartridgeRead = CARTRIDGE__INIT;
CartridgeTagContent TagRead = CARTRIDGE_TAG_CONTENT__INIT;
- NFC_Tag NFC_TagRead;
+ //NFC_Tag NFC_TagRead;
StubCartridgeReadResponse response = STUB_CARTRIDGE_READ_RESPONSE__INIT;
@@ -127,7 +127,7 @@ void Stub_CartridgeReadRequest(MessageContainer* requestContainer)
void Stub_CartridgeWriteRequest(MessageContainer* requestContainer)
{
- uint32_t status = NOT_SUPPORTED;
+ //uint32_t status = NOT_SUPPORTED;
MessageContainer responseContainer;
StubCartridgeWriteRequest* request = stub_cartridge_write_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);
diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_ExtFlash.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_ExtFlash.c
index 3d1809b37..feabbeb58 100644
--- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_ExtFlash.c
+++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_ExtFlash.c
@@ -322,7 +322,7 @@ void Stub_ExtFlashWriteWordsRequest(MessageContainer* requestContainer)
void Stub_ExtFlashReadWordsRequest(MessageContainer* requestContainer)
{
- uint32_t status = PASSED;
+ //uint32_t status = PASSED;
/*MessageContainer responseContainer;
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
index 869485b71..588b1b391 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
@@ -218,22 +218,6 @@ uint32_t StoreDancerConfigMessage(int DancerId)
status |= MCU_E2PromProgram(DancerAddress[Dancer_i],DancersCfg[Dancer_i].zeropoint);
Report("~~~~~~Store eeprom dancer",__FILE__,__LINE__,Dancer_i,RpWarning,(int)DancersCfg[Dancer_i].zeropoint,0);
- /*
- response_buffer = my_malloc(hardware_configuration__get_packed_size(&DancerConfig));
- if (response_buffer)
- {
- response_size = hardware_configuration__pack(&DancerConfig, response_buffer);
- }
- Fresult = FileWrite(response_buffer,response_size,DancerConfigPath,BIOS_WAIT_FOREVER);
- EraseFlashSection(DANCERS_MAP_IN_FLASH,1024);
- for (Dancer_i = 0; Dancer_i < MAX_SYSTEM_DANCERS; Dancer_i++)
- {
- ReadAppAndProgram(DANCERS_MAP_IN_FLASH, sizeof(Dancers), Dancers);
- }
-
-
- my_free(response_buffer);
-*/
return status;
}
uint32_t LoadDancerConfigMessage()
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
index 8b72c1a30..87ad612ba 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
@@ -581,7 +581,7 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue)
}
index = IfIndex&0xFF;
- if (index == POOLER_MOTOR) //move break sensor handling up to ensure handling even if tiing control is > 1 msec
+ if (index == WINDER_MOTOR) //move break sensor handling up to ensure handling even if tiing control is > 1 msec
{
if (checkBreakSensor(index) == ERROR)
return OK;
diff --git a/Software/Embedded_SW/Embedded/tm4c129xnczad.cmd b/Software/Embedded_SW/Embedded/tm4c129xnczad.cmd
index be42101c4..b3e3ca9f0 100644
--- a/Software/Embedded_SW/Embedded/tm4c129xnczad.cmd
+++ b/Software/Embedded_SW/Embedded/tm4c129xnczad.cmd
@@ -34,7 +34,7 @@
/* The starting address of the application. Normally the interrupt vectors */
/* must be located at the beginning of the application. */
#define APP_BASE 0x00000000
-#define FLASH_RAM_BASE 0x000F8000
+#define FLASH_RAM_BASE 0x000FC000
#define RAM_BASE 0x20000000
/* System memory map */
@@ -42,9 +42,9 @@
MEMORY
{
/* Application stored in and executes from internal flash */
- FLASH (RX) : origin = APP_BASE, length = 0x000F8000
+ FLASH (RX) : origin = APP_BASE, length = 0x000FC000
/* Application stored in and executes from internal flash */
- FLASH_RAM (RWX) : origin = FLASH_RAM_BASE, length = 0x00008000
+ FLASH_RAM (RWX) : origin = FLASH_RAM_BASE, length = 0x00004000
/* Application uses internal RAM for data */
SRAM (RWX) : origin = 0x20000000, length = 0x00040000
}
diff --git a/Software/Stubs Collection/stubs/embeddedparametersbuild_w_cleaning.cs b/Software/Stubs Collection/stubs/embeddedparametersbuild_w_cleaning.cs
index 57501cc0f..49ef0ebc7 100644
--- a/Software/Stubs Collection/stubs/embeddedparametersbuild_w_cleaning.cs
+++ b/Software/Stubs Collection/stubs/embeddedparametersbuild_w_cleaning.cs
@@ -17,11 +17,11 @@ using Tango.PMR.IO;
public void OnExecute(StubManager stubManager)
{
-// parameters version for TESTING 1.5.3.3
+// parameters version for TESTING 1.5.3.5
string description = "";
ConfigurationParameters configurationParameters = new ConfigurationParameters();
-description += "Version 1.5.3.4";
+description += "Version 1.5.3.5";
configurationParameters.BreakSensorLimit = 10;
//how many samples to collect in diagnostics before sending
@@ -50,11 +50,11 @@ description = description+" T "+configurationParameters.DispenserBuildPressureTi
//temperature band 1000 = 100% - thresholds for job start around target temprature - AC
configurationParameters.ACHeatersLowerOperationLimit = 995;
-configurationParameters.ACHeatersUpperOperationLimit = 1005;
+configurationParameters.ACHeatersUpperOperationLimit = 1010;
//temperature band 1000 = 100% - thresholds for job start around target temprature - DC
configurationParameters.DCHeatersLowerOperationLimit = 978;
-configurationParameters.DCHeatersUpperOperationLimit = 1005;
+configurationParameters.DCHeatersUpperOperationLimit = 1020;
// mid tank reading offset to add to the readout (OBSOLETE!)
configurationParameters.MidTankPressureCorrection = 0.0;
diff --git a/Software/Visual_Studio/Advanced Installer Projects/Tango Stubs Utils.aip b/Software/Visual_Studio/Advanced Installer Projects/Tango Stubs Utils.aip
new file mode 100644
index 000000000..8b93b6905
--- /dev/null
+++ b/Software/Visual_Studio/Advanced Installer Projects/Tango Stubs Utils.aip
@@ -0,0 +1,406 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<DOCUMENT Type="Advanced Installer" CreateVersion="16.2" version="16.2" Modules="professional" RootPath="." Language="en" Id="{CC36B754-B404-49A9-B4F8-7C9D905FC1AD}">
+ <COMPONENT cid="caphyon.advinst.msicomp.ProjectOptionsComponent">
+ <ROW Name="HiddenItems" Value="AppXProductDetailsComponent;AppXDependenciesComponent;AppXAppDetailsComponent;AppXVisualAssetsComponent;AppXCapabilitiesComponent;AppXAppDeclarationsComponent;AppXUriRulesComponent;MsiJavaComponent;MsiDriverPackagesComponent;UserAccountsComponent;ScheduledTasksComponent;SqlConnectionComponent;AutorunComponent;FirewallExceptionComponent;GameUxComponent;MsiDirectEditorComponent;SharePointSlnComponent;SilverlightSlnComponent;MultipleInstancesComponent;SccmComponent;ActSyncAppComponent;FixupComponent"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
+ <ROW Property="AI_BITMAP_DISPLAY_MODE" Value="0"/>
+ <ROW Property="AI_FINDEXE_TITLE" Value="Select the installation package for [|ProductName]" ValueLocId="AI.Property.FindExeTitle"/>
+ <ROW Property="AI_PREDEF_LCONDS_PROPS" Value="AI_DETECTED_DOTNET_VERSION"/>
+ <ROW Property="AI_REQUIRED_DOTNET_DISPLAY" MultiBuildValue="DefaultBuild:4.6.1" ValueLocId="-"/>
+ <ROW Property="AI_REQUIRED_DOTNET_VERSION" MultiBuildValue="DefaultBuild:4.6.1" ValueLocId="-"/>
+ <ROW Property="AI_RUN_AS_ADMIN" Value="0"/>
+ <ROW Property="AI_ThemeStyle" Value="aero" MultiBuildValue="DefaultBuild:style4" MsiKey="AI_ThemeStyle"/>
+ <ROW Property="ALLUSERS" Value="1"/>
+ <ROW Property="ARPCOMMENTS" Value="This installer database contains the logic and data required to install [|ProductName]." ValueLocId="*"/>
+ <ROW Property="ARPNOREPAIR" MultiBuildValue="DefaultBuild:1"/>
+ <ROW Property="Manufacturer" Value="Twine Solutions LTD"/>
+ <ROW Property="ProductCode" Value="1033:{F239C90D-257A-4138-91E7-EE1F6852B07B} " Type="16"/>
+ <ROW Property="ProductLanguage" Value="1033"/>
+ <ROW Property="ProductName" Value="Tango Stubs Utils"/>
+ <ROW Property="ProductVersion" Value="1.0.0.0" Type="32" TargetFile="Tango.StubsUtils.Service.UI.exe"/>
+ <ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/>
+ <ROW Property="UpgradeCode" Value="{9FCB85B4-216D-49D3-A14D-6299A06D37B6}"/>
+ <ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
+ <ROW Property="WindowsType9XDisplay" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
+ <ROW Property="WindowsTypeNT40" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
+ <ROW Property="WindowsTypeNT40Display" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
+ <ROW Property="WindowsTypeNT50" MultiBuildValue="DefaultBuild:Windows 2000" ValueLocId="-"/>
+ <ROW Property="WindowsTypeNT50Display" MultiBuildValue="DefaultBuild:Windows 2000" ValueLocId="-"/>
+ <ROW Property="WindowsTypeNT5X" MultiBuildValue="DefaultBuild:Windows XP/2003 RTM, Windows XP/2003 SP1, Windows XP SP2 x86" ValueLocId="-"/>
+ <ROW Property="WindowsTypeNT5XDisplay" MultiBuildValue="DefaultBuild:Windows XP/2003 RTM, Windows XP/2003 SP1, Windows XP SP2 x86" ValueLocId="-"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiDirsComponent">
+ <ROW Directory="APPDIR" Directory_Parent="TARGETDIR" DefaultDir="APPDIR:." IsPseudoRoot="1"/>
+ <ROW Directory="DesktopFolder" Directory_Parent="TARGETDIR" DefaultDir="DESKTO~1|DesktopFolder" IsPseudoRoot="1"/>
+ <ROW Directory="SHORTCUTDIR" Directory_Parent="TARGETDIR" DefaultDir="SHORTC~1|SHORTCUTDIR" IsPseudoRoot="1"/>
+ <ROW Directory="TARGETDIR" DefaultDir="SourceDir"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
+ <ROW Component="AI_ExePath" ComponentId="{296D857D-0912-4F1A-BA36-FAD2D756A6EC}" Directory_="APPDIR" Attributes="4" KeyPath="AI_ExePath"/>
+ <ROW Component="APPDIR" ComponentId="{E899ABF2-1005-4D10-AD59-87A9A4BFE2F3}" Directory_="APPDIR" Attributes="0"/>
+ <ROW Component="ColorMine.dll" ComponentId="{D02EB0F9-424D-45BA-922B-D7A36647D861}" Directory_="APPDIR" Attributes="0" KeyPath="ColorMine.dll"/>
+ <ROW Component="ControlzEx.dll" ComponentId="{4AB5D9E3-4AEC-4D72-9488-678CB0C783CB}" Directory_="APPDIR" Attributes="0" KeyPath="ControlzEx.dll"/>
+ <ROW Component="DocumentFormat.OpenXml.dll" ComponentId="{0E99EF21-409D-42B4-8F85-1018F0374D49}" Directory_="APPDIR" Attributes="0" KeyPath="DocumentFormat.OpenXml.dll"/>
+ <ROW Component="EFCache.dll" ComponentId="{37B48B80-69E7-4668-87CD-3C810CF69FB3}" Directory_="APPDIR" Attributes="0" KeyPath="EFCache.dll"/>
+ <ROW Component="EntityFramework.dll" ComponentId="{34730750-0757-429D-B232-BA96606AA042}" Directory_="APPDIR" Attributes="0" KeyPath="EntityFramework.dll"/>
+ <ROW Component="FastMember.dll" ComponentId="{E8E405F4-13D4-4BC6-823E-1A911EAED14E}" Directory_="APPDIR" Attributes="0" KeyPath="FastMember.dll"/>
+ <ROW Component="Google.Protobuf.dll" ComponentId="{6F9908A7-10F2-4D2C-84D6-1D2971642EA5}" Directory_="APPDIR" Attributes="0" KeyPath="Google.Protobuf.dll"/>
+ <ROW Component="Hardcodet.Wpf.TaskbarNotification.dll" ComponentId="{0A4D862A-A070-44CC-81EA-9C640FB2DB71}" Directory_="APPDIR" Attributes="0" KeyPath="Hardcodet.Wpf.TaskbarNotification.dll"/>
+ <ROW Component="LiteDB.dll" ComponentId="{9C0BB2B7-3E61-4655-998C-94775D0278B4}" Directory_="APPDIR" Attributes="0" KeyPath="LiteDB.dll"/>
+ <ROW Component="MahApps.Metro.dll" ComponentId="{826E5C95-0EBE-453B-A2EA-87A799C421FE}" Directory_="APPDIR" Attributes="0" KeyPath="MahApps.Metro.dll"/>
+ <ROW Component="MaterialDesignColors.dll" ComponentId="{E593640E-4E4A-4B0F-BE34-97BABBC3137B}" Directory_="APPDIR" Attributes="0" KeyPath="MaterialDesignColors.dll"/>
+ <ROW Component="MaterialDesignThemes.Wpf.dll" ComponentId="{578AF607-5C97-4C3D-A95C-5CD7146D17F2}" Directory_="APPDIR" Attributes="0" KeyPath="MaterialDesignThemes.Wpf.dll"/>
+ <ROW Component="Microsoft.AspNet.SignalR.Client.dll" ComponentId="{EEE816B4-18DD-485E-9135-553FCC67916E}" Directory_="APPDIR" Attributes="0" KeyPath="Microsoft.AspNet.SignalR.Client.dll"/>
+ <ROW Component="Microsoft.Data.Edm.dll" ComponentId="{5E38D5CA-5BB8-4E04-9D8D-B35DA3D92A25}" Directory_="APPDIR" Attributes="0" KeyPath="Microsoft.Data.Edm.dll"/>
+ <ROW Component="Microsoft.Data.OData.dll" ComponentId="{1C1D050E-E5F6-4A9E-8577-BAA0EA6F1F07}" Directory_="APPDIR" Attributes="0" KeyPath="Microsoft.Data.OData.dll"/>
+ <ROW Component="Microsoft.Data.Services.Client.dll" ComponentId="{C5EE90D8-CD95-41D2-BCC1-410639194E3A}" Directory_="APPDIR" Attributes="0" KeyPath="Microsoft.Data.Services.Client.dll"/>
+ <ROW Component="Microsoft.WindowsAzure.Storage.dll" ComponentId="{9EB91F1F-4B03-4B14-B218-B278FCE4542F}" Directory_="APPDIR" Attributes="0" KeyPath="Microsoft.WindowsAzure.Storage.dll"/>
+ <ROW Component="Newtonsoft.Json.dll" ComponentId="{52039EEC-E07A-4FFE-9724-3AF30D8BE997}" Directory_="APPDIR" Attributes="0" KeyPath="Newtonsoft.Json.dll"/>
+ <ROW Component="Notifications.Wpf.dll" ComponentId="{EDAA57B7-1418-4216-8F7C-FDFC0C0CFA1E}" Directory_="APPDIR" Attributes="0" KeyPath="Notifications.Wpf.dll"/>
+ <ROW Component="ProductInformation" ComponentId="{92AE34CD-2C58-4586-A5DE-F5C5256392EE}" Directory_="APPDIR" Attributes="4" KeyPath="Version"/>
+ <ROW Component="SHORTCUTDIR" ComponentId="{F3ECBC89-EDE0-4DCD-A552-37AF1DE96903}" Directory_="SHORTCUTDIR" Attributes="0"/>
+ <ROW Component="SimpleValidator.dll" ComponentId="{34308CB5-6DFC-465F-952C-5DF3EE226103}" Directory_="APPDIR" Attributes="0" KeyPath="SimpleValidator.dll"/>
+ <ROW Component="System.Data.SQLite.dll" ComponentId="{A846CE6E-726D-42F5-B891-E8E064A0A384}" Directory_="APPDIR" Attributes="0" KeyPath="System.Data.SQLite.dll"/>
+ <ROW Component="System.Data.SQLite.dll.config" ComponentId="{E9FA59C6-F685-4284-B28C-D86A5070ED9F}" Directory_="APPDIR" Attributes="0" KeyPath="System.Data.SQLite.dll.config" Type="0"/>
+ <ROW Component="System.Reactive.Core.dll" ComponentId="{6E86AC42-62E0-460B-B548-3C6229F96FAA}" Directory_="APPDIR" Attributes="0" KeyPath="System.Reactive.Core.dll"/>
+ <ROW Component="System.Reactive.Interfaces.dll" ComponentId="{0C370DE2-AF09-4552-BC29-EFD21622CDF8}" Directory_="APPDIR" Attributes="0" KeyPath="System.Reactive.Interfaces.dll"/>
+ <ROW Component="System.Reactive.Linq.dll" ComponentId="{9BFF7B68-7087-4541-9E78-6DF57F6A8015}" Directory_="APPDIR" Attributes="0" KeyPath="System.Reactive.Linq.dll"/>
+ <ROW Component="System.Windows.Interactivity.dll" ComponentId="{E149ED85-7D71-48BE-8FCD-0B64D3A3A064}" Directory_="APPDIR" Attributes="0" KeyPath="System.Windows.Interactivity.dll"/>
+ <ROW Component="Tango.BL.dll" ComponentId="{9E353048-7FFF-49F6-A613-153335029DC4}" Directory_="APPDIR" Attributes="0" KeyPath="Tango.BL.dll"/>
+ <ROW Component="Tango.Core.dll" ComponentId="{18D42A3F-E7EC-479F-965E-78F084B54274}" Directory_="APPDIR" Attributes="0" KeyPath="Tango.Core.dll"/>
+ <ROW Component="Tango.DataStore.dll" ComponentId="{3C6B7391-DB66-42FE-BE21-4FCBCDD91FF8}" Directory_="APPDIR" Attributes="0" KeyPath="Tango.DataStore.dll"/>
+ <ROW Component="Tango.Documents.dll" ComponentId="{A877E34D-5D7D-42E1-B9D2-3936640259E5}" Directory_="APPDIR" Attributes="0" KeyPath="Tango.Documents.dll"/>
+ <ROW Component="Tango.DragAndDrop.dll" ComponentId="{5C7B1F6A-D7D1-4D69-A1F6-DD9963242323}" Directory_="APPDIR" Attributes="0" KeyPath="Tango.DragAndDrop.dll"/>
+ <ROW Component="Tango.Logging.dll" ComponentId="{646CEA55-D316-4E39-A425-D15007DC20BE}" Directory_="APPDIR" Attributes="0" KeyPath="Tango.Logging.dll"/>
+ <ROW Component="Tango.PMR.dll" ComponentId="{BFBB40D2-C076-4427-AE58-AF74D508DC89}" Directory_="APPDIR" Attributes="0" KeyPath="Tango.PMR.dll"/>
+ <ROW Component="Tango.Settings.dll" ComponentId="{225955DF-2A73-405D-8E83-7D9B40DAC765}" Directory_="APPDIR" Attributes="0" KeyPath="Tango.Settings.dll"/>
+ <ROW Component="Tango.SharedUI.dll" ComponentId="{AC4E813F-496E-49B2-A6A4-03457022166C}" Directory_="APPDIR" Attributes="0" KeyPath="Tango.SharedUI.dll"/>
+ <ROW Component="Tango.StubsUtils.Service.UI.exe" ComponentId="{5A92E54F-33CA-4780-9126-C85BA2A6F697}" Directory_="APPDIR" Attributes="0" KeyPath="Tango.StubsUtils.Service.UI.exe"/>
+ <ROW Component="Tango.StubsUtils.Service.dll" ComponentId="{09BC742A-17BF-4AAC-A5D8-5777953BC7B7}" Directory_="APPDIR" Attributes="0" KeyPath="Tango.StubsUtils.Service.dll"/>
+ <ROW Component="Tango.StubsUtils.Shared.dll" ComponentId="{E41EF362-75AD-4BC0-BBED-08EB6AE9935B}" Directory_="APPDIR" Attributes="0" KeyPath="Tango.StubsUtils.Shared.dll"/>
+ <ROW Component="Tango.Transport.dll" ComponentId="{B42C2241-42B4-4A62-97D2-5F69E11B5809}" Directory_="APPDIR" Attributes="0" KeyPath="Tango.Transport.dll"/>
+ <ROW Component="fastJSON.dll" ComponentId="{FAAF78BC-3F62-4EA1-B97B-F9A45237A593}" Directory_="APPDIR" Attributes="0" KeyPath="fastJSON.dll"/>
+ <ROW Component="protobufnet.dll" ComponentId="{6A62F3FA-4F5D-4E49-967B-EE11C046F645}" Directory_="APPDIR" Attributes="0" KeyPath="protobufnet.dll"/>
+ <ROW Component="tangostub.exe" ComponentId="{075801C1-7962-4D70-A01A-1AB9607ADA57}" Directory_="APPDIR" Attributes="0" KeyPath="tangostub.exe"/>
+ <ROW Component="tangostub_perf.exe" ComponentId="{3B0E37D3-1907-4041-9133-99E6FE0CEB84}" Directory_="APPDIR" Attributes="0" KeyPath="tangostub_perf.exe"/>
+ <ROW Component="tangostub_s.exe" ComponentId="{119FBC10-585A-4261-AEFC-6AB36176B338}" Directory_="APPDIR" Attributes="0" KeyPath="tangostub_s.exe"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
+ <ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0"/>
+ <ATTRIBUTE name="CurrentFeature" value="MainFeature"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
+ <ROW File="ColorMine.dll" Component_="ColorMine.dll" FileName="COLORM~1.DLL|ColorMine.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\ColorMine.dll" SelfReg="false"/>
+ <ROW File="ColorMine.pdb" Component_="ColorMine.dll" FileName="COLORM~1.PDB|ColorMine.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\ColorMine.pdb" SelfReg="false"/>
+ <ROW File="ControlzEx.dll" Component_="ControlzEx.dll" FileName="CONTRO~1.DLL|ControlzEx.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\ControlzEx.dll" SelfReg="false"/>
+ <ROW File="ControlzEx.pdb" Component_="ControlzEx.dll" FileName="CONTRO~1.PDB|ControlzEx.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\ControlzEx.pdb" SelfReg="false"/>
+ <ROW File="DocumentFormat.OpenXml.dll" Component_="DocumentFormat.OpenXml.dll" FileName="DOCUME~1.DLL|DocumentFormat.OpenXml.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\DocumentFormat.OpenXml.dll" SelfReg="false"/>
+ <ROW File="EFCache.dll" Component_="EFCache.dll" FileName="EFCache.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\EFCache.dll" SelfReg="false"/>
+ <ROW File="EntityFramework.dll" Component_="EntityFramework.dll" FileName="ENTITY~1.DLL|EntityFramework.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\EntityFramework.dll" SelfReg="false"/>
+ <ROW File="fastJSON.dll" Component_="fastJSON.dll" FileName="fastJSON.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\fastJSON.dll" SelfReg="false"/>
+ <ROW File="FastMember.dll" Component_="FastMember.dll" FileName="FASTME~1.DLL|FastMember.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\FastMember.dll" SelfReg="false"/>
+ <ROW File="Google.Protobuf.dll" Component_="Google.Protobuf.dll" FileName="GOOGLE~1.DLL|Google.Protobuf.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Google.Protobuf.dll" SelfReg="false"/>
+ <ROW File="Hardcodet.Wpf.TaskbarNotification.dll" Component_="Hardcodet.Wpf.TaskbarNotification.dll" FileName="HARDCO~1.DLL|Hardcodet.Wpf.TaskbarNotification.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Hardcodet.Wpf.TaskbarNotification.dll" SelfReg="false"/>
+ <ROW File="Hardcodet.Wpf.TaskbarNotification.pdb" Component_="Hardcodet.Wpf.TaskbarNotification.dll" FileName="HARDCO~1.PDB|Hardcodet.Wpf.TaskbarNotification.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Hardcodet.Wpf.TaskbarNotification.pdb" SelfReg="false"/>
+ <ROW File="LiteDB.dll" Component_="LiteDB.dll" FileName="LiteDB.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\LiteDB.dll" SelfReg="false"/>
+ <ROW File="MahApps.Metro.dll" Component_="MahApps.Metro.dll" FileName="MAHAPP~1.DLL|MahApps.Metro.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\MahApps.Metro.dll" SelfReg="false"/>
+ <ROW File="MahApps.Metro.pdb" Component_="MahApps.Metro.dll" FileName="MAHAPP~1.PDB|MahApps.Metro.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\MahApps.Metro.pdb" SelfReg="false"/>
+ <ROW File="MaterialDesignColors.dll" Component_="MaterialDesignColors.dll" FileName="MATERI~1.DLL|MaterialDesignColors.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\MaterialDesignColors.dll" SelfReg="false"/>
+ <ROW File="MaterialDesignColors.pdb" Component_="MaterialDesignColors.dll" FileName="MATERI~1.PDB|MaterialDesignColors.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\MaterialDesignColors.pdb" SelfReg="false"/>
+ <ROW File="MaterialDesignThemes.Wpf.dll" Component_="MaterialDesignThemes.Wpf.dll" FileName="MATERI~2.DLL|MaterialDesignThemes.Wpf.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\MaterialDesignThemes.Wpf.dll" SelfReg="false"/>
+ <ROW File="MaterialDesignThemes.Wpf.pdb" Component_="MaterialDesignThemes.Wpf.dll" FileName="MATERI~2.PDB|MaterialDesignThemes.Wpf.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\MaterialDesignThemes.Wpf.pdb" SelfReg="false"/>
+ <ROW File="Microsoft.AspNet.SignalR.Client.dll" Component_="Microsoft.AspNet.SignalR.Client.dll" FileName="MICROS~1.DLL|Microsoft.AspNet.SignalR.Client.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Microsoft.AspNet.SignalR.Client.dll" SelfReg="false"/>
+ <ROW File="Microsoft.AspNet.SignalR.Client.pdb" Component_="Microsoft.AspNet.SignalR.Client.dll" FileName="MICROS~1.PDB|Microsoft.AspNet.SignalR.Client.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Microsoft.AspNet.SignalR.Client.pdb" SelfReg="false"/>
+ <ROW File="Microsoft.Data.Edm.dll" Component_="Microsoft.Data.Edm.dll" FileName="MICROS~2.DLL|Microsoft.Data.Edm.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Microsoft.Data.Edm.dll" SelfReg="false"/>
+ <ROW File="Microsoft.Data.OData.dll" Component_="Microsoft.Data.OData.dll" FileName="MICROS~3.DLL|Microsoft.Data.OData.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Microsoft.Data.OData.dll" SelfReg="false"/>
+ <ROW File="Microsoft.Data.Services.Client.dll" Component_="Microsoft.Data.Services.Client.dll" FileName="MICROS~4.DLL|Microsoft.Data.Services.Client.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Microsoft.Data.Services.Client.dll" SelfReg="false"/>
+ <ROW File="Microsoft.WindowsAzure.Storage.dll" Component_="Microsoft.WindowsAzure.Storage.dll" FileName="MICROS~5.DLL|Microsoft.WindowsAzure.Storage.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Microsoft.WindowsAzure.Storage.dll" SelfReg="false"/>
+ <ROW File="Newtonsoft.Json.dll" Component_="Newtonsoft.Json.dll" FileName="NEWTON~1.DLL|Newtonsoft.Json.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Newtonsoft.Json.dll" SelfReg="false"/>
+ <ROW File="Notifications.Wpf.dll" Component_="Notifications.Wpf.dll" FileName="NOTIFI~1.DLL|Notifications.Wpf.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Notifications.Wpf.dll" SelfReg="false"/>
+ <ROW File="Notifications.Wpf.pdb" Component_="Notifications.Wpf.dll" FileName="NOTIFI~1.PDB|Notifications.Wpf.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Notifications.Wpf.pdb" SelfReg="false"/>
+ <ROW File="protobufnet.dll" Component_="protobufnet.dll" FileName="PROTOB~1.DLL|protobuf-net.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\protobuf-net.dll" SelfReg="false"/>
+ <ROW File="SimpleValidator.dll" Component_="SimpleValidator.dll" FileName="SIMPLE~1.DLL|SimpleValidator.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\SimpleValidator.dll" SelfReg="false"/>
+ <ROW File="System.Data.SQLite.dll" Component_="System.Data.SQLite.dll" FileName="SYSTEM~1.DLL|System.Data.SQLite.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\System.Data.SQLite.dll" SelfReg="false"/>
+ <ROW File="System.Data.SQLite.dll.config" Component_="System.Data.SQLite.dll.config" FileName="SYSTEM~1.CON|System.Data.SQLite.dll.config" Attributes="0" SourcePath="..\Build\StubsUtils\Release\System.Data.SQLite.dll.config" SelfReg="false"/>
+ <ROW File="System.Reactive.Core.dll" Component_="System.Reactive.Core.dll" FileName="SYSTEM~2.DLL|System.Reactive.Core.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\System.Reactive.Core.dll" SelfReg="false"/>
+ <ROW File="System.Reactive.Interfaces.dll" Component_="System.Reactive.Interfaces.dll" FileName="SYSTEM~3.DLL|System.Reactive.Interfaces.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\System.Reactive.Interfaces.dll" SelfReg="false"/>
+ <ROW File="System.Reactive.Linq.dll" Component_="System.Reactive.Linq.dll" FileName="SYSTEM~4.DLL|System.Reactive.Linq.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\System.Reactive.Linq.dll" SelfReg="false"/>
+ <ROW File="System.Windows.Interactivity.dll" Component_="System.Windows.Interactivity.dll" FileName="SYSTEM~5.DLL|System.Windows.Interactivity.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\System.Windows.Interactivity.dll" SelfReg="false"/>
+ <ROW File="Tango.BL.dll" Component_="Tango.BL.dll" FileName="TANGOB~1.DLL|Tango.BL.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.BL.dll" SelfReg="false"/>
+ <ROW File="Tango.BL.dll.config" Component_="System.Data.SQLite.dll.config" FileName="TANGOB~1.CON|Tango.BL.dll.config" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.BL.dll.config" SelfReg="false"/>
+ <ROW File="Tango.BL.pdb" Component_="Tango.BL.dll" FileName="TANGOB~1.PDB|Tango.BL.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.BL.pdb" SelfReg="false"/>
+ <ROW File="Tango.Core.dll" Component_="Tango.Core.dll" FileName="TANGOC~1.DLL|Tango.Core.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.Core.dll" SelfReg="false"/>
+ <ROW File="Tango.Core.dll.config" Component_="System.Data.SQLite.dll.config" FileName="TANGOC~1.CON|Tango.Core.dll.config" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.Core.dll.config" SelfReg="false"/>
+ <ROW File="Tango.Core.pdb" Component_="Tango.Core.dll" FileName="TANGOC~1.PDB|Tango.Core.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.Core.pdb" SelfReg="false"/>
+ <ROW File="Tango.DataStore.dll" Component_="Tango.DataStore.dll" FileName="TANGOD~1.DLL|Tango.DataStore.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.DataStore.dll" SelfReg="false"/>
+ <ROW File="Tango.DataStore.pdb" Component_="Tango.DataStore.dll" FileName="TANGOD~1.PDB|Tango.DataStore.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.DataStore.pdb" SelfReg="false"/>
+ <ROW File="Tango.DataStore.xml" Component_="System.Data.SQLite.dll.config" FileName="TANGOD~1.XML|Tango.DataStore.xml" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.DataStore.xml" SelfReg="false"/>
+ <ROW File="Tango.Documents.dll" Component_="Tango.Documents.dll" FileName="TANGOD~2.DLL|Tango.Documents.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.Documents.dll" SelfReg="false"/>
+ <ROW File="Tango.Documents.pdb" Component_="Tango.Documents.dll" FileName="TANGOD~2.PDB|Tango.Documents.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.Documents.pdb" SelfReg="false"/>
+ <ROW File="Tango.DragAndDrop.dll" Component_="Tango.DragAndDrop.dll" FileName="TANGOD~3.DLL|Tango.DragAndDrop.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.DragAndDrop.dll" SelfReg="false"/>
+ <ROW File="Tango.DragAndDrop.dll.config" Component_="System.Data.SQLite.dll.config" FileName="TANGOD~1.CON|Tango.DragAndDrop.dll.config" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.DragAndDrop.dll.config" SelfReg="false"/>
+ <ROW File="Tango.DragAndDrop.pdb" Component_="Tango.DragAndDrop.dll" FileName="TANGOD~3.PDB|Tango.DragAndDrop.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.DragAndDrop.pdb" SelfReg="false"/>
+ <ROW File="Tango.Logging.dll" Component_="Tango.Logging.dll" FileName="TANGOL~1.DLL|Tango.Logging.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.Logging.dll" SelfReg="false"/>
+ <ROW File="Tango.Logging.pdb" Component_="Tango.Logging.dll" FileName="TANGOL~1.PDB|Tango.Logging.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.Logging.pdb" SelfReg="false"/>
+ <ROW File="Tango.PMR.dll" Component_="Tango.PMR.dll" FileName="TANGOP~1.DLL|Tango.PMR.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.PMR.dll" SelfReg="false"/>
+ <ROW File="Tango.PMR.pdb" Component_="Tango.PMR.dll" FileName="TANGOP~1.PDB|Tango.PMR.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.PMR.pdb" SelfReg="false"/>
+ <ROW File="Tango.Settings.dll" Component_="Tango.Settings.dll" FileName="TANGOS~1.DLL|Tango.Settings.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.Settings.dll" SelfReg="false"/>
+ <ROW File="Tango.Settings.pdb" Component_="Tango.Settings.dll" FileName="TANGOS~1.PDB|Tango.Settings.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.Settings.pdb" SelfReg="false"/>
+ <ROW File="Tango.SharedUI.dll" Component_="Tango.SharedUI.dll" FileName="TANGOS~2.DLL|Tango.SharedUI.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.SharedUI.dll" SelfReg="false"/>
+ <ROW File="Tango.SharedUI.dll.config" Component_="System.Data.SQLite.dll.config" FileName="TANGOS~1.CON|Tango.SharedUI.dll.config" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.SharedUI.dll.config" SelfReg="false"/>
+ <ROW File="Tango.SharedUI.pdb" Component_="Tango.SharedUI.dll" FileName="TANGOS~2.PDB|Tango.SharedUI.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.SharedUI.pdb" SelfReg="false"/>
+ <ROW File="Tango.StubsUtils.Service.dll" Component_="Tango.StubsUtils.Service.dll" FileName="TANGOS~3.DLL|Tango.StubsUtils.Service.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.StubsUtils.Service.dll" SelfReg="false"/>
+ <ROW File="Tango.StubsUtils.Service.dll.config" Component_="System.Data.SQLite.dll.config" FileName="TANGOS~2.CON|Tango.StubsUtils.Service.dll.config" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.StubsUtils.Service.dll.config" SelfReg="false"/>
+ <ROW File="Tango.StubsUtils.Service.pdb" Component_="Tango.StubsUtils.Service.dll" FileName="TANGOS~3.PDB|Tango.StubsUtils.Service.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.StubsUtils.Service.pdb" SelfReg="false"/>
+ <ROW File="Tango.StubsUtils.Service.UI.exe" Component_="Tango.StubsUtils.Service.UI.exe" FileName="TANGOS~1.EXE|Tango.StubsUtils.Service.UI.exe" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.StubsUtils.Service.UI.exe" SelfReg="false" DigSign="true"/>
+ <ROW File="Tango.StubsUtils.Service.UI.exe.config" Component_="System.Data.SQLite.dll.config" FileName="TANGOS~3.CON|Tango.StubsUtils.Service.UI.exe.config" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.StubsUtils.Service.UI.exe.config" SelfReg="false"/>
+ <ROW File="Tango.StubsUtils.Service.UI.pdb" Component_="Tango.StubsUtils.Service.UI.exe" FileName="TANGOS~4.PDB|Tango.StubsUtils.Service.UI.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.StubsUtils.Service.UI.pdb" SelfReg="false"/>
+ <ROW File="Tango.StubsUtils.Shared.dll" Component_="Tango.StubsUtils.Shared.dll" FileName="TANGOS~4.DLL|Tango.StubsUtils.Shared.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.StubsUtils.Shared.dll" SelfReg="false"/>
+ <ROW File="Tango.StubsUtils.Shared.pdb" Component_="Tango.StubsUtils.Shared.dll" FileName="TANGOS~5.PDB|Tango.StubsUtils.Shared.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.StubsUtils.Shared.pdb" SelfReg="false"/>
+ <ROW File="Tango.Transport.dll" Component_="Tango.Transport.dll" FileName="TANGOT~1.DLL|Tango.Transport.dll" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.Transport.dll" SelfReg="false"/>
+ <ROW File="Tango.Transport.dll.config" Component_="System.Data.SQLite.dll.config" FileName="TANGOT~1.CON|Tango.Transport.dll.config" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.Transport.dll.config" SelfReg="false"/>
+ <ROW File="Tango.Transport.pdb" Component_="Tango.Transport.dll" FileName="TANGOT~1.PDB|Tango.Transport.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\Tango.Transport.pdb" SelfReg="false"/>
+ <ROW File="tangostub.exe" Component_="tangostub.exe" FileName="TANGOS~2.EXE|tangostub.exe" Attributes="0" SourcePath="..\Build\StubsUtils\Release\tangostub.exe" SelfReg="false" DigSign="true"/>
+ <ROW File="tangostub.exe.config" Component_="System.Data.SQLite.dll.config" FileName="TANGOS~4.CON|tangostub.exe.config" Attributes="0" SourcePath="..\Build\StubsUtils\Release\tangostub.exe.config" SelfReg="false"/>
+ <ROW File="tangostub.pdb" Component_="tangostub.exe" FileName="TANGOS~6.PDB|tangostub.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\tangostub.pdb" SelfReg="false"/>
+ <ROW File="tangostub_perf.exe" Component_="tangostub_perf.exe" FileName="TANGOS~3.EXE|tangostub_perf.exe" Attributes="0" SourcePath="..\Build\StubsUtils\Release\tangostub_perf.exe" SelfReg="false" DigSign="true"/>
+ <ROW File="tangostub_perf.exe.config" Component_="System.Data.SQLite.dll.config" FileName="TANGOS~5.CON|tangostub_perf.exe.config" Attributes="0" SourcePath="..\Build\StubsUtils\Release\tangostub_perf.exe.config" SelfReg="false"/>
+ <ROW File="tangostub_perf.pdb" Component_="tangostub_perf.exe" FileName="TANGOS~7.PDB|tangostub_perf.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\tangostub_perf.pdb" SelfReg="false"/>
+ <ROW File="tangostub_s.exe" Component_="tangostub_s.exe" FileName="TANGOS~4.EXE|tangostub_s.exe" Attributes="0" SourcePath="..\Build\StubsUtils\Release\tangostub_s.exe" SelfReg="false" DigSign="true"/>
+ <ROW File="tangostub_s.exe.config" Component_="System.Data.SQLite.dll.config" FileName="TANGOS~6.CON|tangostub_s.exe.config" Attributes="0" SourcePath="..\Build\StubsUtils\Release\tangostub_s.exe.config" SelfReg="false"/>
+ <ROW File="tangostub_s.pdb" Component_="tangostub_s.exe" FileName="TANGOS~8.PDB|tangostub_s.pdb" Attributes="0" SourcePath="..\Build\StubsUtils\Release\tangostub_s.pdb" SelfReg="false"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.BootstrOptComponent">
+ <ROW BootstrOptKey="GlobalOptions" DownloadFolder="[AppDataFolder][|Manufacturer]\[|ProductName]\prerequisites" Options="2"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.BootstrapperUISequenceComponent">
+ <ROW Action="AI_DetectSoftware" Sequence="101"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.BuildComponent">
+ <ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="0" PackageFolder="..\Build\Installers\Stubs Utils" Languages="en" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" ExtUI="true" UseLargeSchema="true" ExeName="Tango Stubs Utils v[|ProductVersion]"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.BuildEventsComponent">
+ <ROW EventId="0" EventRun="C:\DATA\Development\Tango\Software\Visual_Studio\StubsUtils\Tango.StubsUtils.Service.UI\rename_installer.bat" EventWkDir="C:\DATA\Development\Tango\Software\Visual_Studio\Build\Installers\Stubs Utils" EventOrder="1" EventType="2" EventInterupt="false" EventEnabled="true" EventPrecompression="false" EventBuild="DefaultBuild"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent">
+ <ROW Path="&lt;AI_DICTS&gt;ui.ail"/>
+ <ROW Path="&lt;AI_DICTS&gt;ui_en.ail"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.FragmentComponent">
+ <ROW Fragment="CommonUI.aip" Path="&lt;AI_FRAGS&gt;CommonUI.aip"/>
+ <ROW Fragment="FolderDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\FolderDlg.aip"/>
+ <ROW Fragment="MaintenanceTypeDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\MaintenanceTypeDlg.aip"/>
+ <ROW Fragment="MaintenanceWelcomeDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\MaintenanceWelcomeDlg.aip"/>
+ <ROW Fragment="PreparePrereqDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\PreparePrereqDlg.aip"/>
+ <ROW Fragment="PrerequisitesDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\PrerequisitesDlg.aip"/>
+ <ROW Fragment="ProgressPrereqDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\ProgressPrereqDlg.aip"/>
+ <ROW Fragment="SequenceDialogs.aip" Path="&lt;AI_THEMES&gt;classic\fragments\SequenceDialogs.aip"/>
+ <ROW Fragment="Sequences.aip" Path="&lt;AI_FRAGS&gt;Sequences.aip"/>
+ <ROW Fragment="StaticUIStrings.aip" Path="&lt;AI_FRAGS&gt;StaticUIStrings.aip"/>
+ <ROW Fragment="UI.aip" Path="&lt;AI_THEMES&gt;classic\fragments\UI.aip"/>
+ <ROW Fragment="Validation.aip" Path="&lt;AI_FRAGS&gt;Validation.aip"/>
+ <ROW Fragment="VerifyRemoveDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\VerifyRemoveDlg.aip"/>
+ <ROW Fragment="VerifyRepairDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\VerifyRepairDlg.aip"/>
+ <ROW Fragment="WelcomeDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\WelcomeDlg.aip"/>
+ <ROW Fragment="WelcomePrereqDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\WelcomePrereqDlg.aip"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiActionTextComponent">
+ <ROW Action="AI_DeleteLzma" Description="Deleting files extracted from archive" DescriptionLocId="ActionText.Description.AI_DeleteLzma" TemplateLocId="-"/>
+ <ROW Action="AI_DeleteRLzma" Description="Deleting files extracted from archive" DescriptionLocId="ActionText.Description.AI_DeleteLzma" TemplateLocId="-"/>
+ <ROW Action="AI_ExtractFiles" Description="Extracting files from archive" DescriptionLocId="ActionText.Description.AI_ExtractLzma" TemplateLocId="-"/>
+ <ROW Action="AI_ExtractLzma" Description="Extracting files from archive" DescriptionLocId="ActionText.Description.AI_ExtractLzma" TemplateLocId="-"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiAppSearchComponent">
+ <ROW Property="AI_SETUPEXEPATH" Signature_="AI_EXE_PATH_LM" Builds="DefaultBuild"/>
+ <ROW Property="AI_SETUPEXEPATH" Signature_="AI_EXE_PATH_CU" Builds="DefaultBuild"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiBinaryComponent">
+ <ROW Name="Prereq.dll" SourcePath="&lt;AI_CUSTACTS&gt;Prereq.dll"/>
+ <ROW Name="SoftwareDetector.dll" SourcePath="&lt;AI_CUSTACTS&gt;SoftwareDetector.dll"/>
+ <ROW Name="aicustact.dll" SourcePath="&lt;AI_CUSTACTS&gt;aicustact.dll"/>
+ <ROW Name="lzmaextractor.dll" SourcePath="&lt;AI_CUSTACTS&gt;lzmaextractor.dll"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiControlEventComponent">
+ <ROW Dialog_="WelcomeDlg" Control_="Next" Event="NewDialog" Argument="FolderDlg" Condition="AI_INSTALL" Ordering="1"/>
+ <ROW Dialog_="FolderDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_INSTALL" Ordering="201"/>
+ <ROW Dialog_="FolderDlg" Control_="Back" Event="NewDialog" Argument="WelcomeDlg" Condition="AI_INSTALL" Ordering="1"/>
+ <ROW Dialog_="MaintenanceWelcomeDlg" Control_="Next" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT" Ordering="99"/>
+ <ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_MAINT" Ordering="198"/>
+ <ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="CustomizeDlg" Condition="AI_MAINT" Ordering="202"/>
+ <ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_INSTALL" Ordering="197"/>
+ <ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="FolderDlg" Condition="AI_INSTALL" Ordering="201"/>
+ <ROW Dialog_="CustomizeDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_MAINT" Ordering="101"/>
+ <ROW Dialog_="CustomizeDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT" Ordering="1"/>
+ <ROW Dialog_="MaintenanceTypeDlg" Control_="ChangeButton" Event="NewDialog" Argument="CustomizeDlg" Condition="AI_MAINT" Ordering="501"/>
+ <ROW Dialog_="MaintenanceTypeDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceWelcomeDlg" Condition="AI_MAINT" Ordering="1"/>
+ <ROW Dialog_="MaintenanceTypeDlg" Control_="RemoveButton" Event="NewDialog" Argument="VerifyRemoveDlg" Condition="AI_MAINT AND InstallMode=&quot;Remove&quot;" Ordering="601"/>
+ <ROW Dialog_="VerifyRemoveDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT AND InstallMode=&quot;Remove&quot;" Ordering="1"/>
+ <ROW Dialog_="MaintenanceTypeDlg" Control_="RepairButton" Event="NewDialog" Argument="VerifyRepairDlg" Condition="AI_MAINT AND InstallMode=&quot;Repair&quot;" Ordering="601"/>
+ <ROW Dialog_="VerifyRepairDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT AND InstallMode=&quot;Repair&quot;" Ordering="1"/>
+ <ROW Dialog_="VerifyRepairDlg" Control_="Repair" Event="EndDialog" Argument="Return" Condition="AI_MAINT AND InstallMode=&quot;Repair&quot;" Ordering="399" Options="1"/>
+ <ROW Dialog_="VerifyRemoveDlg" Control_="Remove" Event="EndDialog" Argument="Return" Condition="AI_MAINT AND InstallMode=&quot;Remove&quot;" Ordering="299" Options="1"/>
+ <ROW Dialog_="PatchWelcomeDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_PATCH" Ordering="201"/>
+ <ROW Dialog_="ResumeDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_RESUME" Ordering="299"/>
+ <ROW Dialog_="WelcomePrereqDlg" Control_="Next" Event="NewDialog" Argument="PrerequisitesDlg" Condition="AI_BOOTSTRAPPER" Ordering="1"/>
+ <ROW Dialog_="PrerequisitesDlg" Control_="Next" Event="EndDialog" Argument="Return" Condition="AI_BOOTSTRAPPER" Ordering="1"/>
+ <ROW Dialog_="PrerequisitesDlg" Control_="Back" Event="NewDialog" Argument="WelcomePrereqDlg" Condition="AI_BOOTSTRAPPER" Ordering="1"/>
+ <ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_PATCH" Ordering="199"/>
+ <ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="PatchWelcomeDlg" Condition="AI_PATCH" Ordering="203"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiCreateFolderComponent">
+ <ROW Directory_="APPDIR" Component_="APPDIR" ManualDelete="true"/>
+ <ROW Directory_="SHORTCUTDIR" Component_="SHORTCUTDIR" ManualDelete="false"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiCustActComponent">
+ <ROW Action="AI_AppSearchEx" Type="1" Source="Prereq.dll" Target="DoAppSearchEx"/>
+ <ROW Action="AI_BACKUP_AI_SETUPEXEPATH" Type="51" Source="AI_SETUPEXEPATH_ORIGINAL" Target="[AI_SETUPEXEPATH]"/>
+ <ROW Action="AI_DATA_SETTER" Type="51" Source="AI_ExtractFiles" Target="[AI_SETUPEXEPATH]"/>
+ <ROW Action="AI_DOWNGRADE" Type="19" Target="4010"/>
+ <ROW Action="AI_DeleteCadLzma" Type="51" Source="AI_DeleteLzma" Target="[AI_SETUPEXEPATH]"/>
+ <ROW Action="AI_DeleteLzma" Type="1025" Source="lzmaextractor.dll" Target="DeleteLZMAFiles"/>
+ <ROW Action="AI_DeleteRCadLzma" Type="51" Source="AI_DeleteRLzma" Target="[AI_SETUPEXEPATH]"/>
+ <ROW Action="AI_DeleteRLzma" Type="1281" Source="lzmaextractor.dll" Target="DeleteLZMAFiles"/>
+ <ROW Action="AI_DetectSoftware" Type="257" Source="SoftwareDetector.dll" Target="OnDetectSoftware"/>
+ <ROW Action="AI_DpiContentScale" Type="1" Source="aicustact.dll" Target="DpiContentScale"/>
+ <ROW Action="AI_EnableDebugLog" Type="321" Source="aicustact.dll" Target="EnableDebugLog"/>
+ <ROW Action="AI_EstimateExtractFiles" Type="1" Source="Prereq.dll" Target="EstimateExtractFiles"/>
+ <ROW Action="AI_ExtractCadLzma" Type="51" Source="AI_ExtractLzma" Target="[AI_SETUPEXEPATH]"/>
+ <ROW Action="AI_ExtractFiles" Type="1025" Source="Prereq.dll" Target="ExtractSourceFiles" AdditionalSeq="AI_DATA_SETTER"/>
+ <ROW Action="AI_ExtractLzma" Type="1025" Source="lzmaextractor.dll" Target="ExtractLZMAFiles"/>
+ <ROW Action="AI_FindExeLzma" Type="1" Source="lzmaextractor.dll" Target="FindEXE"/>
+ <ROW Action="AI_InstallModeCheck" Type="1" Source="aicustact.dll" Target="UpdateInstallMode" WithoutSeq="true"/>
+ <ROW Action="AI_PREPARE_UPGRADE" Type="65" Source="aicustact.dll" Target="PrepareUpgrade"/>
+ <ROW Action="AI_RESTORE_AI_SETUPEXEPATH" Type="51" Source="AI_SETUPEXEPATH" Target="[AI_SETUPEXEPATH_ORIGINAL]"/>
+ <ROW Action="AI_RESTORE_LOCATION" Type="65" Source="aicustact.dll" Target="RestoreLocation"/>
+ <ROW Action="AI_ResolveKnownFolders" Type="1" Source="aicustact.dll" Target="AI_ResolveKnownFolders"/>
+ <ROW Action="AI_SHOW_LOG" Type="65" Source="aicustact.dll" Target="LaunchLogFile" WithoutSeq="true"/>
+ <ROW Action="AI_STORE_LOCATION" Type="51" Source="ARPINSTALLLOCATION" Target="[APPDIR]"/>
+ <ROW Action="SET_APPDIR" Type="307" Source="APPDIR" Target="[ProgramFilesFolder][Manufacturer]\[ProductName]"/>
+ <ROW Action="SET_SHORTCUTDIR" Type="307" Source="SHORTCUTDIR" Target="[ProgramMenuFolder][ProductName]"/>
+ <ROW Action="SET_TARGETDIR_TO_APPDIR" Type="51" Source="TARGETDIR" Target="[APPDIR]"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiEnvComponent">
+ <ROW Environment="Path" Name="=-*Path" Value="[~];[APPDIR]" Component_="ProductInformation"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiFeatCompsComponent">
+ <ROW Feature_="MainFeature" Component_="APPDIR"/>
+ <ROW Feature_="MainFeature" Component_="ProductInformation"/>
+ <ROW Feature_="MainFeature" Component_="AI_ExePath"/>
+ <ROW Feature_="MainFeature" Component_="ColorMine.dll"/>
+ <ROW Feature_="MainFeature" Component_="ControlzEx.dll"/>
+ <ROW Feature_="MainFeature" Component_="DocumentFormat.OpenXml.dll"/>
+ <ROW Feature_="MainFeature" Component_="EFCache.dll"/>
+ <ROW Feature_="MainFeature" Component_="EntityFramework.dll"/>
+ <ROW Feature_="MainFeature" Component_="fastJSON.dll"/>
+ <ROW Feature_="MainFeature" Component_="FastMember.dll"/>
+ <ROW Feature_="MainFeature" Component_="Google.Protobuf.dll"/>
+ <ROW Feature_="MainFeature" Component_="Hardcodet.Wpf.TaskbarNotification.dll"/>
+ <ROW Feature_="MainFeature" Component_="LiteDB.dll"/>
+ <ROW Feature_="MainFeature" Component_="MahApps.Metro.dll"/>
+ <ROW Feature_="MainFeature" Component_="MaterialDesignColors.dll"/>
+ <ROW Feature_="MainFeature" Component_="MaterialDesignThemes.Wpf.dll"/>
+ <ROW Feature_="MainFeature" Component_="Microsoft.AspNet.SignalR.Client.dll"/>
+ <ROW Feature_="MainFeature" Component_="Microsoft.Data.Edm.dll"/>
+ <ROW Feature_="MainFeature" Component_="Microsoft.Data.OData.dll"/>
+ <ROW Feature_="MainFeature" Component_="Microsoft.Data.Services.Client.dll"/>
+ <ROW Feature_="MainFeature" Component_="Microsoft.WindowsAzure.Storage.dll"/>
+ <ROW Feature_="MainFeature" Component_="Newtonsoft.Json.dll"/>
+ <ROW Feature_="MainFeature" Component_="Notifications.Wpf.dll"/>
+ <ROW Feature_="MainFeature" Component_="protobufnet.dll"/>
+ <ROW Feature_="MainFeature" Component_="SimpleValidator.dll"/>
+ <ROW Feature_="MainFeature" Component_="System.Data.SQLite.dll"/>
+ <ROW Feature_="MainFeature" Component_="System.Data.SQLite.dll.config"/>
+ <ROW Feature_="MainFeature" Component_="System.Reactive.Core.dll"/>
+ <ROW Feature_="MainFeature" Component_="System.Reactive.Interfaces.dll"/>
+ <ROW Feature_="MainFeature" Component_="System.Reactive.Linq.dll"/>
+ <ROW Feature_="MainFeature" Component_="System.Windows.Interactivity.dll"/>
+ <ROW Feature_="MainFeature" Component_="Tango.BL.dll"/>
+ <ROW Feature_="MainFeature" Component_="Tango.Core.dll"/>
+ <ROW Feature_="MainFeature" Component_="Tango.DataStore.dll"/>
+ <ROW Feature_="MainFeature" Component_="Tango.Documents.dll"/>
+ <ROW Feature_="MainFeature" Component_="Tango.DragAndDrop.dll"/>
+ <ROW Feature_="MainFeature" Component_="Tango.Logging.dll"/>
+ <ROW Feature_="MainFeature" Component_="Tango.PMR.dll"/>
+ <ROW Feature_="MainFeature" Component_="Tango.Settings.dll"/>
+ <ROW Feature_="MainFeature" Component_="Tango.SharedUI.dll"/>
+ <ROW Feature_="MainFeature" Component_="Tango.StubsUtils.Service.dll"/>
+ <ROW Feature_="MainFeature" Component_="Tango.StubsUtils.Service.UI.exe"/>
+ <ROW Feature_="MainFeature" Component_="Tango.StubsUtils.Shared.dll"/>
+ <ROW Feature_="MainFeature" Component_="Tango.Transport.dll"/>
+ <ROW Feature_="MainFeature" Component_="tangostub.exe"/>
+ <ROW Feature_="MainFeature" Component_="tangostub_perf.exe"/>
+ <ROW Feature_="MainFeature" Component_="tangostub_s.exe"/>
+ <ROW Feature_="MainFeature" Component_="SHORTCUTDIR"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiInstExSeqComponent">
+ <ROW Action="AI_DOWNGRADE" Condition="AI_NEWERPRODUCTFOUND AND (UILevel &lt;&gt; 5)" Sequence="210"/>
+ <ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=&quot;&quot;" Sequence="749"/>
+ <ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1501"/>
+ <ROW Action="AI_PREPARE_UPGRADE" Condition="AI_UPGRADE=&quot;No&quot; AND (Not Installed)" Sequence="1399"/>
+ <ROW Action="AI_ResolveKnownFolders" Sequence="52"/>
+ <ROW Action="AI_EnableDebugLog" Sequence="51"/>
+ <ROW Action="AI_BACKUP_AI_SETUPEXEPATH" Sequence="99" Builds="DefaultBuild"/>
+ <ROW Action="AI_RESTORE_AI_SETUPEXEPATH" Condition="AI_SETUPEXEPATH_ORIGINAL" Sequence="103" Builds="DefaultBuild"/>
+ <ROW Action="AI_DeleteCadLzma" Condition="SETUPEXEDIR=&quot;&quot; AND Installed AND (REMOVE&lt;&gt;&quot;ALL&quot;) AND (AI_INSTALL_MODE&lt;&gt;&quot;Remove&quot;) AND (NOT PATCH)" Sequence="199" Builds="DefaultBuild"/>
+ <ROW Action="AI_DeleteRCadLzma" Condition="SETUPEXEDIR=&quot;&quot; AND Installed AND (REMOVE&lt;&gt;&quot;ALL&quot;) AND (AI_INSTALL_MODE&lt;&gt;&quot;Remove&quot;) AND (NOT PATCH)" Sequence="198" Builds="DefaultBuild"/>
+ <ROW Action="AI_ExtractCadLzma" Condition="SETUPEXEDIR=&quot;&quot; AND Installed AND (REMOVE&lt;&gt;&quot;ALL&quot;) AND (AI_INSTALL_MODE&lt;&gt;&quot;Remove&quot;) AND (NOT PATCH)" Sequence="197" Builds="DefaultBuild"/>
+ <ROW Action="AI_FindExeLzma" Condition="SETUPEXEDIR=&quot;&quot; AND Installed AND (REMOVE&lt;&gt;&quot;ALL&quot;) AND (AI_INSTALL_MODE&lt;&gt;&quot;Remove&quot;) AND (NOT PATCH)" Sequence="196" Builds="DefaultBuild"/>
+ <ROW Action="AI_ExtractLzma" Condition="SETUPEXEDIR=&quot;&quot; AND Installed AND (REMOVE&lt;&gt;&quot;ALL&quot;) AND (AI_INSTALL_MODE&lt;&gt;&quot;Remove&quot;) AND (NOT PATCH)" Sequence="1549" Builds="DefaultBuild"/>
+ <ROW Action="AI_DeleteRLzma" Condition="SETUPEXEDIR=&quot;&quot; AND Installed AND (REMOVE&lt;&gt;&quot;ALL&quot;) AND (AI_INSTALL_MODE&lt;&gt;&quot;Remove&quot;) AND (NOT PATCH)" Sequence="1548" Builds="DefaultBuild"/>
+ <ROW Action="AI_DeleteLzma" Condition="SETUPEXEDIR=&quot;&quot; AND Installed AND (REMOVE&lt;&gt;&quot;ALL&quot;) AND (AI_INSTALL_MODE&lt;&gt;&quot;Remove&quot;) AND (NOT PATCH)" Sequence="6599" Builds="DefaultBuild"/>
+ <ROW Action="AI_ExtractFiles" Sequence="3998" Builds="DefaultBuild"/>
+ <ROW Action="AI_DATA_SETTER" Sequence="3997"/>
+ <ROW Action="AI_EstimateExtractFiles" Sequence="3999" Builds="DefaultBuild"/>
+ <ROW Action="AI_DetectSoftware" Sequence="102"/>
+ <ROW Action="AI_AppSearchEx" Sequence="101"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiInstallUISequenceComponent">
+ <ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=&quot;&quot;" Sequence="749"/>
+ <ROW Action="AI_ResolveKnownFolders" Sequence="53"/>
+ <ROW Action="AI_DpiContentScale" Sequence="52"/>
+ <ROW Action="AI_EnableDebugLog" Sequence="51"/>
+ <ROW Action="AI_BACKUP_AI_SETUPEXEPATH" Sequence="99"/>
+ <ROW Action="AI_RESTORE_AI_SETUPEXEPATH" Condition="AI_SETUPEXEPATH_ORIGINAL" Sequence="103"/>
+ <ROW Action="AI_DetectSoftware" Sequence="102"/>
+ <ROW Action="AI_AppSearchEx" Sequence="101"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiLaunchConditionsComponent">
+ <ROW Condition="(VersionNT &lt;&gt; 400)" Description="[ProductName] cannot be installed on [WindowsTypeNT40Display]." DescriptionLocId="AI.LaunchCondition.NoNT40" IsPredefined="true" Builds="DefaultBuild"/>
+ <ROW Condition="(VersionNT &lt;&gt; 500)" Description="[ProductName] cannot be installed on [WindowsTypeNT50Display]." DescriptionLocId="AI.LaunchCondition.NoNT50" IsPredefined="true" Builds="DefaultBuild"/>
+ <ROW Condition="(VersionNT64 OR ((VersionNT &lt;&gt; 501) OR (ServicePackLevel = 3))) AND ((VersionNT &lt;&gt; 502) OR (ServicePackLevel = 2))" Description="[ProductName] cannot be installed on [WindowsTypeNT5XDisplay]." DescriptionLocId="AI.LaunchCondition.NoNT5X" IsPredefined="true" Builds="DefaultBuild"/>
+ <ROW Condition="AI_DETECTED_DOTNET_VERSION &gt;= AI_REQUIRED_DOTNET_VERSION" Description="[ProductName] cannot be installed on systems with .NET Framework version lower than [AI_REQUIRED_DOTNET_DISPLAY]." DescriptionLocId="AI.LaunchCondition.DotNET" IsPredefined="true" Builds="DefaultBuild"/>
+ <ROW Condition="SETUPEXEDIR OR (REMOVE=&quot;ALL&quot;)" Description="This package can only be run from a bootstrapper." DescriptionLocId="AI.LaunchCondition.RequireBootstrapper" IsPredefined="true" Builds="DefaultBuild"/>
+ <ROW Condition="VersionNT" Description="[ProductName] cannot be installed on [WindowsType9XDisplay]." DescriptionLocId="AI.LaunchCondition.No9X" IsPredefined="true" Builds="DefaultBuild"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiRegLocatorComponent">
+ <ROW Signature_="AI_EXE_PATH_CU" Root="1" Key="Software\Caphyon\Advanced Installer\LZMA\[ProductCode]\[ProductVersion]" Name="AI_ExePath" Type="2"/>
+ <ROW Signature_="AI_EXE_PATH_LM" Root="2" Key="Software\Caphyon\Advanced Installer\LZMA\[ProductCode]\[ProductVersion]" Name="AI_ExePath" Type="2"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiRegsComponent">
+ <ROW Registry="AI_ExePath" Root="-1" Key="Software\Caphyon\Advanced Installer\LZMA\[ProductCode]\[ProductVersion]" Name="AI_ExePath" Value="[AI_SETUPEXEPATH]" Component_="AI_ExePath"/>
+ <ROW Registry="Path" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Path" Value="[APPDIR]" Component_="ProductInformation"/>
+ <ROW Registry="Version" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Version" Value="[ProductVersion]" Component_="ProductInformation"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiShortsComponent">
+ <ROW Shortcut="Tango.StubsUtils.Service.UI.exe" Directory_="SHORTCUTDIR" Name="TANGOS~1|Tango Stubs Service" Component_="Tango.StubsUtils.Service.UI.exe" Target="[#Tango.StubsUtils.Service.UI.exe]" Description="Tango.StubsUtils.Service.UI.exe" Hotkey="0" IconIndex="0" ShowCmd="1" WkDir="APPDIR"/>
+ <ROW Shortcut="Tango.StubsUtils.Service.UI.exe_1" Directory_="DesktopFolder" Name="TANGOS~1|Tango Stubs Service" Component_="Tango.StubsUtils.Service.UI.exe" Target="[#Tango.StubsUtils.Service.UI.exe]" Description="Tango.StubsUtils.Service.UI.exe" Hotkey="0" IconIndex="0" ShowCmd="1" WkDir="APPDIR"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiThemeComponent">
+ <ATTRIBUTE name="UsedTheme" value="classic"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.MsiUpgradeComponent">
+ <ROW UpgradeCode="[|UpgradeCode]" VersionMin="0.0.1" VersionMax="[|ProductVersion]" Attributes="257" ActionProperty="OLDPRODUCTS"/>
+ <ROW UpgradeCode="[|UpgradeCode]" VersionMin="[|ProductVersion]" Attributes="2" ActionProperty="AI_NEWERPRODUCTFOUND"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.PreReqComponent">
+ <ROW PrereqKey="FDE9FBF14C64382AEFB5867591829B2" DisplayName=".NET Framework 4.6.1" SetupFileUrl="http://download.microsoft.com/download/E/4/1/E4173890-A24A-4936-9FC9-AF930FE3FA40/NDP461-KB3102436-x86-x64-AllOS-ENU.exe" Location="1" ExactSize="67681000" WinNTVersions="Windows XP SP3 x86, Windows Server 2003 SP2 x86, Windows Vista x86, Windows Server 2008 x86, Windows 7 RTM x86, Windows 10 version 1511 x86, Windows 10 version 1607 x86, Windows 10 version 1703 x86, Windows 10 version 1709 x86, Windows 10 version 1803 x86, Windows 10 version 1809 x86, Windows 10 version 1903 x86" WinNT64Versions="Windows XP SP2 x64, Windows Server 2003 SP2 x64, Windows Vista x64, Windows Server 2008 x64, Windows 7 RTM x64, Windows Server 2008 R2 RTM x64, Windows 10 version 1511 x64, Windows 10 version 1607 x64, Windows 10 version 1703 x64, Windows 10 version 1709 x64, Windows 10 version 1803 x64, Windows 10 version 1809 x64, Windows 10 version 1903 x64, Windows Server x64" Operator="1" NoUiComLine="/q /norestart" Options="xy" MD5="864056903748706e251fec9f5d887ef9" TargetName=".NET Framework 4.6.1"/>
+ <ATTRIBUTE name="PrereqsOrder" value="FDE9FBF14C64382AEFB5867591829B2"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.PreReqSearchComponent">
+ <ROW SearchKey="FDE9FBF14C64382AEFB5867591829B2Release" Prereq="FDE9FBF14C64382AEFB5867591829B2" SearchType="9" SearchString="HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\Release" RefContent="G394270" Order="1" Property="PreReqSearch_FDE9FBF14C64382AEFB586"/>
+ </COMPONENT>
+ <COMPONENT cid="caphyon.advinst.msicomp.SynchronizedFolderComponent">
+ <ROW Directory_="APPDIR" SourcePath="..\Build\StubsUtils\Release" ExcludePattern="*~|#*#|%*%|._|CVS|.cvsignore|SCCS|vssver.scc|mssccprj.scc|vssver2.scc|.svn|.DS_Store" ExcludeFlags="6"/>
+ </COMPONENT>
+</DOCUMENT>
diff --git a/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/ColorConverter.cpp b/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/ColorConverter.cpp
index 96d5108f2..a4f45ae19 100644
--- a/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/ColorConverter.cpp
+++ b/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/ColorConverter.cpp
@@ -58,6 +58,8 @@
#define LowVolumeThreshold 0.5
#define LowVolHalf LowVolumeThreshold/2
#define GradientEndThr 0.95
+#define DilutionFactor 10
+#define LightInksThr 5
Tango::ColorLib::ColorConverter::ColorConverter() :
@@ -65,8 +67,8 @@ Tango::ColorLib::ColorConverter::ColorConverter() :
m_maxNlPerCM(NULL),
m_nInks(0), m_nVolumes(0),
m_GradStops(NULL), m_nGradStops(0), m_colortable(NULL), m_ProcessRangesMaxP(NULL),
- m_nProcessRanges(0), m_NormGamutRegionMaxLim(NULL), m_LowVolThr_nlcm(NULL),
- m_LowVolThrHalf_nlcm(NULL)
+ m_ProcessRangesMinP(NULL), m_nProcessRanges(0), m_NormGamutRegionMaxLim(NULL),
+ m_LowVolThr_nlcm(NULL), m_LowVolThrHalf_nlcm(NULL), m_hasLightInks(false), m_InkNames(NULL)
{
m_whitepointLab.Set(-1, -1, -1);
m_whitepointXYZ_Strip.Set(-1, -1, -1);
@@ -105,6 +107,11 @@ Tango::ColorLib::ColorConverter::~ColorConverter()
delete[] m_ProcessRangesMaxP;
m_ProcessRangesMaxP = NULL;
}
+ if (m_ProcessRangesMinP != NULL)
+ {
+ delete[] m_ProcessRangesMinP;
+ m_ProcessRangesMaxP = NULL;
+ }
if (m_LowVolThr_nlcm != NULL)
{
delete[]m_LowVolThr_nlcm;
@@ -116,6 +123,11 @@ Tango::ColorLib::ColorConverter::~ColorConverter()
delete[]m_LowVolThrHalf_nlcm;
m_LowVolThrHalf_nlcm = NULL;
}
+ if (m_InkNames != NULL)
+ {
+ delete[] m_InkNames;
+ m_InkNames = NULL;
+ }
/* if (m_ProcessRangesMinP != NULL)
{
delete[] m_ProcessRangesMinP;
@@ -203,7 +215,7 @@ void Tango::ColorLib::ColorConverter::ProcessHiveNeighbors(ConversionInput *conv
}
MatrixXd RGBTmpVec(nHive + 1, 3);
- MatrixXd VolumeHive(nHive + 1, m_nVolumes);
+ MatrixXd VolumeHive(nHive + 1, m_TotalNumberofInks);
MatrixXd LabHive(nHive + 1, 3);
VectorXd xyz(3);
C_RGB_XYZ_Lab xyzVal, LabVal;
@@ -215,7 +227,7 @@ void Tango::ColorLib::ColorConverter::ProcessHiveNeighbors(ConversionInput *conv
//int *GamutRegion = DBG_NEW int[nHive + 1];
double *Lab1P = new double[3];
//double *Lab1P = DBG_NEW double[3];
- VectorXd Vol(m_nVolumes);
+ VectorXd Vol(m_nInks);
int j = 0;
double * LabInFinal1 = new double[3];
//double * LabInFinal1 = DBG_NEW double[3];
@@ -223,11 +235,11 @@ void Tango::ColorLib::ColorConverter::ProcessHiveNeighbors(ConversionInput *conv
double * LabOnGamut = new double[3];
double *InkOutP = new double[m_nInks];
bool InGamut = true;
- for (int i = 0; i < nHive; ++i)
+ for (int iHive = 0; iHive < nHive; ++iHive)
{
//Get Lab's inGamut
for (j = 0; j < 3; ++j)
- Lab1P[j] = Lab1(i, j);
+ Lab1P[j] = Lab1(iHive, j);
//Check if whitepoints match
/* if (m_AdaptWP)
{
@@ -238,23 +250,32 @@ void Tango::ColorLib::ColorConverter::ProcessHiveNeighbors(ConversionInput *conv
*/
// ColConv.ChangeWP(Lab1P, Lab1P, m_WP, m_whitepointXYZ_CT); //to Relative
ColConv.ChangeWP(Lab1P, Lab1P, m_WP, m_whitepointXYZ_Strip); //to Relative
- m_colortable->m_B2ATransform->evalLab2InkP(Lab1P, InkOut, GamutRegion[i]); //InkOut is in units of 16 bits
- for (int i = 0; i <m_nInks; ++i)
+ m_colortable->m_B2ATransform->evalLab2InkP(Lab1P, InkOut, GamutRegion[iHive]); //InkOut is in units of 16 bits
+ for (int iInk = 0; iInk <m_nInks; ++iInk)
{
- InkOut[i] *= m_colortable->GetNormFactor();
- if (InkOut[i] <= m_NormGamutRegionMaxLim[0])
+ InkOut[iInk] *= m_colortable->GetNormFactor();
+ if (InkOut[iInk] <= m_NormGamutRegionMaxLim[0])
{
- m_colortable->m_LinCurves->m_InterpCurves[i].Eval(InkOut[i] * 655.35, InkOut[i]);
- InkOut[i] /= 655.35;
+ m_colortable->m_LinCurves->m_InterpCurves[iInk].Eval(InkOut[iInk] * 655.35, InkOut[iInk]);
+ InkOut[iInk] /= 655.35;
}
}
InGamut = IsInGamut(Lab1P, sur, CS, LabOnGamut);
LimitLab(LabOnGamut);
VectorXd NLInkOut(m_nInks);
ConvertToNLInks(DoubleToVector(InkOut, m_nInks), NLInkOut);
-
- LimitNLInks2Volume(NLInkOut, GamutRegion[i], Vol);
-
+ LimitNLInks2Volume(NLInkOut, GamutRegion[iHive], Vol);
+ /////////////////////////////////////
+ VectorXd VolumeLI(m_TotalNumberofInks);
+ if (m_hasLightInks)
+ {
+ SplitVolume(Vol, VolumeLI, GamutRegion[iHive]);
+ }
+ else
+ {
+ for (int iVol = 0; iVol < m_TotalNumberofInks; ++iVol)
+ VolumeLI(iVol) = Vol(iVol);
+ }
//m_A2BTransform->evalInkP2Lab(InkOut, Lab1P, GamutRegion[i]);
//Convert to CT WP
@@ -271,29 +292,36 @@ void Tango::ColorLib::ColorConverter::ProcessHiveNeighbors(ConversionInput *conv
}*/
m_Conv02->SetReferenceWhite(D65);
for (int j = 0; j < 3; ++j)
- LabHive(i, j) = LabInFinal1[j];
+ LabHive(iHive, j) = LabInFinal1[j];
//Convert to RGB, relative col is converted
m_Conv02->LabtoRGB(LabOnGamut, tmpRGB);
//m_Conv02->LabtoRGB(Lab1P, tmpRGB);
for (int j = 0; j < 3; ++j)
- RGBTmpVec(i, j) = std::min(std::max(tmpRGB[j], 0.0), 255.0);
+ RGBTmpVec(iHive, j) = std::min(std::max(tmpRGB[j], 0.0), 255.0);
- //make sure the rounded sum does not exceed the limit in the gamut region
- for (int j = 0; j < m_nInks; ++j)
- VolumeHive(i, j) = Vol(j);
+ for (int j = 0; j < m_TotalNumberofInks; ++j)
+ VolumeHive(iHive, j) = VolumeLI(j);
}
- for (int i = 0; i < 1; ++i)
+
+ VectorXd VolumeLI_s(m_TotalNumberofInks);
+ if (m_hasLightInks)
{
- for (j = 0; j < m_nInks; ++j)
- VolumeHive(nHive + i, j) = Volume(j);
- for (j = 0; j < 3; ++j)
- {
- RGBTmpVec(nHive + i, j) = RGB(j);
- LabHive(nHive + i, j) = Lab(j);
- }
- GamutRegion[nHive + i] = InGamutRegion;
+ SplitVolume(Volume, VolumeLI_s, InGamutRegion);
+ }
+ else
+ {
+ for (int iVol = 0; iVol < m_TotalNumberofInks; ++iVol)
+ VolumeLI_s(iVol) = Volume(iVol);
+ }
+ for (j = 0; j < m_TotalNumberofInks; ++j)
+ VolumeHive(nHive , j) = VolumeLI_s(j);
+ for (j = 0; j < 3; ++j)
+ {
+ RGBTmpVec(nHive , j) = RGB(j);
+ LabHive(nHive , j) = Lab(j);
}
+ GamutRegion[nHive ] = InGamutRegion;
//Organize hive into 5x5 matrix
//Hive Vector follows the ordering 0-(0,0) 1-(0,1) 2-(0,2),....,
@@ -437,7 +465,7 @@ void Tango::ColorLib::ColorConverter::ArrangeHiveData(MatrixXd LabHive, MatrixX
for (j = 0; j < 3; ++j)
RGBHive(index, j) = RGBTmpVec(i, j);
- for (j = 0; j < m_nVolumes; ++j)
+ for (j = 0; j < m_TotalNumberofInks; ++j)
OVolumeHive(index, j) = VolumeHive(i, j);
OGamutRegion[index] = GamutRegion[i];
@@ -448,22 +476,25 @@ void Tango::ColorLib::ColorConverter::ArrangeHiveData(MatrixXd LabHive, MatrixX
void Tango::ColorLib::ColorConverter::fillVolume(OutputCoordinates *&outputCoords, VectorXd Volume)
{
int i = 0;
- OutputLiquid** outputLiquids = (OutputLiquid**)malloc(sizeof(OutputLiquid*) * m_nVolumes);
- for (i = 0; i < m_nVolumes; ++i)
+ OutputLiquid** outputLiquids = (OutputLiquid**)malloc(sizeof(OutputLiquid*) * m_TotalNumberofInks);
+ for (i = 0; i < m_TotalNumberofInks; ++i)
{
// *outputLiquids[0] = OUTPUT_LIQUID__INIT;
outputLiquids[i] = (OutputLiquid*)malloc(sizeof(OutputLiquid));
output_liquid__init(outputLiquids[i]);
- switch (m_CalibCurves[i].getInkName())
+ switch (m_InkNames[i])
{
case LIQUID_TYPE__Cyan:
case LIQUID_TYPE__Magenta:
case LIQUID_TYPE__Yellow:
case LIQUID_TYPE__Black:
+ case LIQUID_TYPE__LightCyan:
+ case LIQUID_TYPE__LightMagenta:
+ case LIQUID_TYPE__LightYellow:
{
outputLiquids[i]->has_volume = true;
outputLiquids[i]->has_liquidtype = true;
- outputLiquids[i]->liquidtype = (LiquidType)(m_CalibCurves[i].getInkName());
+ outputLiquids[i]->liquidtype = (LiquidType)(m_InkNames[i]);
outputLiquids[i]->volume = Volume(i);
break;
}
@@ -472,7 +503,7 @@ void Tango::ColorLib::ColorConverter::fillVolume(OutputCoordinates *&outputCoor
}
}
outputCoords->outputliquids = outputLiquids;
- outputCoords->n_outputliquids = m_nVolumes;
+ outputCoords->n_outputliquids = m_TotalNumberofInks;
return;
}
@@ -1053,7 +1084,7 @@ void Tango::ColorLib::ColorConverter::ConvertColorToLinearInks(InputCoordinates*
void Tango::ColorLib::ColorConverter::ConvertToNLInks(VectorXd InkIn, VectorXd &InkOut)
{
- for (int i = 0; i < m_nVolumes; ++i)
+ for (int i = 0; i < m_nInks; ++i)
{
if (InkIn(i) <= m_NormGamutRegionMaxLim[0])
m_CalibCurves[i].m_InvLinearInterp->Eval(InkIn(i), InkOut(i));
@@ -1065,7 +1096,7 @@ void Tango::ColorLib::ColorConverter::ConvertToNLInks(VectorXd InkIn, VectorXd
void Tango::ColorLib::ColorConverter::ConvertToLinearInks(VectorXd InkIn, VectorXd &InkOut)
{
- for (int i = 0; i < m_nVolumes; ++i)
+ for (int i = 0; i < m_nInks; ++i)
{
m_CalibCurves[i].m_LinearInterp->Eval(InkIn(i), InkOut(i));
}
@@ -1076,13 +1107,34 @@ void Tango::ColorLib::ColorConverter::ConvertToLinearInks(VectorXd InkIn, Vecto
void Tango::ColorLib::ColorConverter::VolumeToNLInkP(VectorXd Volume, VectorXd &NLInkP)
{
//Volume is in %. In order to be compatible with NL to volume it has to be tranlated to nl/cm
- VectorXd InkP(m_nVolumes);
+ VectorXd InkP(m_TotalNumberofInks);
int MaxInd = -1;
double InkMax = -1.;
double InkSum = 0.;
- for (int i = 0; i < m_nVolumes; ++i)
+ //Convert volume to Volume without Light Inks
+ VectorXd VolumeNoLI((int)(m_nInks));
+ if (m_hasLightInks)
{
- InkP(i) = Volume(i)* m_maxNlPerCM(i)/100; //Volume is in %, InkP is in [nl/cm]
+ //Convert Light Ink Volumes to Ink Volumes
+ for (int i = 0; i < m_nInks; ++i)
+ VolumeNoLI(i) = Volume(i);
+
+ for (int i = 4; i < m_nVolumes; ++i)
+ {
+ if ((Volume(i) > 0) & (Volume(i - 4) == 0))
+ {
+ VolumeNoLI(i - 4) = Volume(i) / DilutionFactor;
+ }
+ }
+ }
+ else
+ {
+ for (int i = 0; i < m_nInks; ++i)
+ VolumeNoLI(i) = Volume(i);
+ }
+ for (int i = 0; i < m_nInks; ++i)
+ {
+ InkP(i) = VolumeNoLI(i)* m_maxNlPerCM(i)/100; //Volume is in %, InkP is in [nl/cm]
if (InkMax < InkP(i))
{
InkMax = InkP(i);
@@ -1208,19 +1260,19 @@ void Tango::ColorLib::ColorConverter::SetMaxNLperCM(double maxNlPerCM, int i)
m_maxNlPerCM(i) = maxNlPerCM;
}
-void Tango::ColorLib::ColorConverter::ConvertVolumeToRGBDisplay(InputCoordinates *inputcoordinates, int n_processRanges,
- int colorspace, VectorXd &Volume, VectorXd &RGBOut, VectorXd &LabOut, int &GamutRegion)
+void Tango::ColorLib::ColorConverter::ConvertVolumeToRGBDisplay(InputCoordinates *inputcoordinates, int n_processRanges,
+ int colorspace, VectorXd &VolumeNoLI, VectorXd &RGBOut, VectorXd &LabOut, int &GamutRegion)
{
- SetNumberOfVolumes((int)(inputcoordinates->n_inputliquids));
+ //SetNumberOfVolumes((int)(inputcoordinates->n_inputliquids));
// Set Calibration Data
LiquidType LQ;
if (m_CalibCurves == NULL)
{
m_CalibCurves = new CalibData[m_nInks];
//m_CalibCurves = DBG_NEW CalibData[m_nInks];
- for (int i = 0; i < m_nVolumes; ++i)
+ for (int i = 0; i < m_nInks; ++i)
{
- LQ =inputcoordinates->inputliquids[i]->calibrationdata->liquidtype;
+ LQ = inputcoordinates->inputliquids[i]->calibrationdata->liquidtype;
if (LQ == LIQUID_TYPE__Cyan || LQ == LIQUID_TYPE__Magenta || LQ == LIQUID_TYPE__Yellow || LQ == LIQUID_TYPE__Black)
{
//Get calibration data.
@@ -1237,16 +1289,37 @@ void Tango::ColorLib::ColorConverter::ConvertVolumeToRGBDisplay(InputCoordinates
//July 29 2020
//Limit inks based on m_maxNlpercm
//Inks are limited in their nonlinear form
- VectorXd NLInkP((int)(m_nVolumes));
- VectorXd InkOut((int)(m_nVolumes));
+ VectorXd NLInkP((int)(m_nInks));
+ VectorXd InkOut((int)(m_nInks));
+ VectorXd Volume((int)(m_TotalNumberofInks));
+
//Convert to Nonlinear Inks
double SumVol_Ink = 0.0;
//Get Gamut Region
- for (int i = 0; i < m_nVolumes; ++i)
- Volume(i) = inputcoordinates->inputliquids[i]->volume; //volume is given in %
+ for (int i = 0; i < m_TotalNumberofInks; ++i)
+ Volume(i) = inputcoordinates->inputliquids[i]->volume;
- GamutRegion = GetGamutRegion(Volume, m_NormGamutRegionMaxLim);
- VolumeToNLInkP(Volume, NLInkP);
+ if (m_hasLightInks)
+ {
+ //Convert Light Ink Volumes to Ink Volumes
+ for (int i = 0; i < m_nInks; ++i)
+ VolumeNoLI(i) = Volume(i);
+
+ for (int i = 4; i < m_TotalNumberofInks; ++i)
+ {
+ if ((Volume(i) > 0) & (Volume(i - 4) == 0))
+ {
+ VolumeNoLI(i - 4) = inputcoordinates->inputliquids[i]->volume / DilutionFactor;
+ }
+ }
+ }
+ else
+ {
+ for (int i = 0; i < m_nInks; ++i)
+ VolumeNoLI(i) = Volume(i);
+ }
+ GamutRegion = GetGamutRegion(VolumeNoLI, m_NormGamutRegionMaxLim);
+ VolumeToNLInkP(VolumeNoLI, NLInkP);
//Limit Inks
double *InkOutP = new double[m_nInks];
VectorToDouble(NLInkP, InkOutP);
@@ -1266,7 +1339,7 @@ void Tango::ColorLib::ColorConverter::ConvertVolumeToRGBDisplay(InputCoordinates
}
}
- for (int i = 0; i < (int)(m_nVolumes); ++i)
+ for (int i = 0; i < (int)(m_nInks); ++i)
{
if (NLInkP(i) <= m_NormGamutRegionMaxLim[0])
{
@@ -1282,12 +1355,12 @@ void Tango::ColorLib::ColorConverter::ConvertVolumeToRGBDisplay(InputCoordinates
//Inks are limited in their nonlinear form
//Output Volume is in %
LimitInks(NLInkP, InkOutP);
- NLInkPToVolume(DoubleToVector(InkOutP, m_nInks), Volume);
- GamutRegion = GetGamutRegion(Volume, m_ProcessRangesMaxP);
+ NLInkPToVolume(DoubleToVector(InkOutP, m_nInks), VolumeNoLI);
+ GamutRegion = GetGamutRegion(VolumeNoLI, m_ProcessRangesMaxP);
// LimitLowVolume(Volume, GamutRegion, Volume);
- NLcmtoPercentage(Volume, Volume);
+ NLcmtoPercentage(VolumeNoLI, VolumeNoLI);
// LimitNLInks2Volume(NLInkP, GamutRegion, Volume);
- VolumeToNLInkP(Volume, NLInkP);
+ VolumeToNLInkP(VolumeNoLI, NLInkP);
VectorToDouble(NLInkP, InkOutP);
//Convert to RGB
//GamutRegion = 0;
@@ -1312,12 +1385,6 @@ void Tango::ColorLib::ColorConverter::ConvertVolumeToRGBDisplay(InputCoordinates
for (int i = 0; i < 3; ++i)
LabOutFinal[i] = LabOutFinal1[i];
-/*
- if (m_AdaptWP)
- {
- CConvertD65.ChangeWP(LabOutFinal, LabOutFinal, m_whitepointXYZ_Strip, m_whitepointXYZ_CT);
- }
- */
LabOut = DoubleToVector(LabOutFinal, 3);
CConvertD65.SetReferenceWhite(D65);
@@ -1370,13 +1437,6 @@ void Tango::ColorLib::ColorConverter::VectorToDouble(VectorXd VecIn, double * do
doubOut[i] = VecIn(i);
}
-/*void Tango::ColorLib::ColorConverter::VectorToDouble(VectorXd VecIn, std::vector<double> &doubOut)
-{
- int nSize = VecIn.size();
- for (int i = 0; i < nSize && i < doubOut.size(); ++i)
- doubOut.push_back(VecIn(i));
-}*/
-
VectorXd Tango::ColorLib::ColorConverter::DoubleToVector(double *doub, int nSize)
{
@@ -1407,15 +1467,19 @@ size_t Tango::ColorLib::ColorConverter::Convert(uint8_t * input_buffer, size_t i
conversionInput = conversion_input__unpack(NULL, input_buffer_size, input_buffer);
//Filter and arrange colors (Should change from 3 to 4 if black ink is included)
-
- int numofInks = CountNumberofInks(conversionInput);
+ int numofInks = 0;
+ int numLightInks = 0;
+ CountNumberofInks(conversionInput, numofInks, numLightInks);
if (numofInks < 0)
throw std::exception("Duplicate inks");
+ if (numLightInks > 0)
+ m_hasLightInks = true;
int expected_liquids = numofInks;
+ m_TotalNumberofInks = numofInks;
original_input_liquids_count = conversionInput->inputcoordinates->n_inputliquids;
original_input_liquids = conversionInput->inputcoordinates->inputliquids;
-
- InputLiquid** filteredInputLiquids = (InputLiquid**)malloc(sizeof(InputLiquid*) * expected_liquids);
+ m_InkNames = new LiquidType[m_TotalNumberofInks];
+ InputLiquid** filteredInputLiquids = (InputLiquid**)malloc(sizeof(InputLiquid*) * m_TotalNumberofInks);
for (size_t i = 0; i < conversionInput->inputcoordinates->n_inputliquids; i++)
{
@@ -1425,15 +1489,31 @@ size_t Tango::ColorLib::ColorConverter::Convert(uint8_t * input_buffer, size_t i
{
case LIQUID_TYPE__Cyan:
filteredInputLiquids[0] = liquid;
+ m_InkNames[0] = liquid->liquidtype;
break;
case LIQUID_TYPE__Magenta:
filteredInputLiquids[1] = liquid;
+ m_InkNames[1] = liquid->liquidtype;
break;
case LIQUID_TYPE__Yellow:
filteredInputLiquids[2] = liquid;
+ m_InkNames[2] = liquid->liquidtype;
break;
case LIQUID_TYPE__Black:
filteredInputLiquids[3] = liquid;
+ m_InkNames[3] = liquid->liquidtype;
+ break;
+ case LIQUID_TYPE__LightCyan:
+ filteredInputLiquids[4] = liquid;
+ m_InkNames[4] = liquid->liquidtype;
+ break;
+ case LIQUID_TYPE__LightMagenta:
+ filteredInputLiquids[5] = liquid;
+ m_InkNames[5] = liquid->liquidtype;
+ break;
+ case LIQUID_TYPE__LightYellow:
+ filteredInputLiquids[6] = liquid;
+ m_InkNames[6] = liquid->liquidtype;
break;
}
}
@@ -1455,8 +1535,8 @@ size_t Tango::ColorLib::ColorConverter::Convert(uint8_t * input_buffer, size_t i
size_t n_elements = 0;
bool InGamut = false;
m_WP.Set(0.9505, 1.00, 1.0888); //D65
- //count number if inks
- // int numofInks = CountNumberofInks(conversionInput);
+
+
if(m_colortable ==NULL)
m_colortable = new ColorTable();
readColorTransformations(conversionInput);
@@ -1471,7 +1551,8 @@ size_t Tango::ColorLib::ColorConverter::Convert(uint8_t * input_buffer, size_t i
m_NormGamutRegionMaxLim[i] = tmpVal[i];
//read calibration tables and store them in m_CalibCurves
InputLiquid **inputliquids = conversionInput->inputcoordinates->inputliquids;
- int n_inputliquids = conversionInput->inputcoordinates->n_inputliquids;
+ // int n_inputliquids = conversionInput->inputcoordinates->n_inputliquids;
+ int n_inputliquids = numofInks - numLightInks;
readCalibrationTables(inputliquids, n_inputliquids);
//Initialize CIECAM02 transformation
@@ -1485,7 +1566,7 @@ size_t Tango::ColorLib::ColorConverter::Convert(uint8_t * input_buffer, size_t i
// Compare Strip White point to Color Table White Point
//CompareWhitePoints();
- if (numofInks != m_nInks)
+ if (n_inputliquids != m_nInks)
throw std::exception("Number of available inks does not match ink tables\0");
//Tables have been filled
@@ -1499,8 +1580,8 @@ size_t Tango::ColorLib::ColorConverter::Convert(uint8_t * input_buffer, size_t i
for (int i = 1; i < m_nProcessRanges; ++i)
{
diff = conversionInput->processranges[i]->maxinkuptake - conversionInput->processranges[i - 1]->maxinkuptake;
- if(diff<=0)
- throw std::exception("Process Rangesare not monotonic\0");
+ if(diff<0)
+ throw std::exception("Process Ranges are not monotonic\0");
}
if(m_ProcessRangesMaxP == NULL)
m_ProcessRangesMaxP = new double[m_nProcessRanges];
@@ -1508,6 +1589,12 @@ size_t Tango::ColorLib::ColorConverter::Convert(uint8_t * input_buffer, size_t i
{
m_ProcessRangesMaxP[i] = conversionInput->processranges[i]->maxinkuptake;
}
+ if (m_ProcessRangesMinP == NULL)
+ m_ProcessRangesMinP = new double[m_nProcessRanges];
+ for (int i = 0; i < m_nProcessRanges; ++i)
+ {
+ m_ProcessRangesMinP[i] = conversionInput->processranges[i]->mininkuptake;
+ }
SetLowVolThr_nlcm();
VectorXd InkOut(m_nInks);
@@ -1540,14 +1627,18 @@ size_t Tango::ColorLib::ColorConverter::Convert(uint8_t * input_buffer, size_t i
// Right now calibration is in the [0-100] range, values exceeding [0-100] are not transformed
ConvertToNLInks(InkOut, NLInkOut);
- LimitNLInks2Volume(NLInkOut, GamutRegion, Volume);
- //OutputCoordinates outputCoords = OUTPUT_COORDINATES__INIT;
- /* if (InkOutP != NULL)
- {
- delete[] InkOutP;
- InkOutP = NULL;
- }*/
-
+ LimitNLInks2Volume(NLInkOut, GamutRegion, Volume);
+ }
+ //Split Volume into inks and Light Inks
+ VectorXd VolumeLI(m_TotalNumberofInks);
+ if (m_hasLightInks)
+ {
+ SplitVolume(Volume, VolumeLI, GamutRegion);
+ }
+ else
+ {
+ for (int i = 0; i < m_TotalNumberofInks; ++i)
+ VolumeLI(i) = Volume(i);
}
OutputCoordinates *outputCoords = (OutputCoordinates*)malloc(sizeof(OutputCoordinates));
output_coordinates__init(outputCoords);
@@ -1555,7 +1646,7 @@ size_t Tango::ColorLib::ColorConverter::Convert(uint8_t * input_buffer, size_t i
fillLab(outputCoords, LabOut);
outputCoords->has_processparameterstableindex = true;
outputCoords->processparameterstableindex = GamutRegion;
- fillVolume(outputCoords, Volume);
+ fillVolume(outputCoords, VolumeLI);
conversionOutput->has_outofgamut = true;
conversionOutput->outofgamut = !(InGamut);
conversionOutput->singlecoordinates = outputCoords;
@@ -1574,8 +1665,8 @@ size_t Tango::ColorLib::ColorConverter::Convert(uint8_t * input_buffer, size_t i
MatrixXd RGBHive(MatHive, 3);
VectorXd RGBHive1(3);
VectorXd LabHive1(3);
- VectorXd VolumeHive1(m_nVolumes);
- MatrixXd VolumeHive(MatHive, m_nVolumes);
+ VectorXd VolumeHive1(m_TotalNumberofInks);
+ MatrixXd VolumeHive(MatHive, m_TotalNumberofInks);
MatrixXd LabHive(MatHive, 3);
int *GamutRegionV = new int[MatHive];
@@ -1603,7 +1694,7 @@ size_t Tango::ColorLib::ColorConverter::Convert(uint8_t * input_buffer, size_t i
for (j = 0; j < 3; ++j)
RGBHive1(j) = RGBHive(i, j);
fillRGB(hiveData[i], RGBHive1);
- for (j = 0; j < m_nVolumes; ++j)
+ for (j = 0; j < m_TotalNumberofInks; ++j)
VolumeHive1(j) = VolumeHive(i, j);
fillVolume(hiveData[i], VolumeHive1);
for (j = 0; j < 3; ++j)
@@ -1611,7 +1702,7 @@ size_t Tango::ColorLib::ColorConverter::Convert(uint8_t * input_buffer, size_t i
fillLab(hiveData[i], LabHive1);
hiveData[i]->has_processparameterstableindex = true;
hiveData[i]->processparameterstableindex = GamutRegionV[i];
- hiveData[i]->n_outputliquids = m_nInks;
+ hiveData[i]->n_outputliquids = m_TotalNumberofInks;
}
conversionOutput->hivecoordinates[i] = hiveData[i];
}
@@ -1637,7 +1728,7 @@ size_t Tango::ColorLib::ColorConverter::Convert(uint8_t * input_buffer, size_t i
fillLab(TripletData[i], LabHive1);
TripletData[i]->has_processparameterstableindex = true;
TripletData[i]->processparameterstableindex = GamutRegionV[tripletIndex[i]];
- TripletData[i]->n_outputliquids = m_nInks;
+ TripletData[i]->n_outputliquids = m_TotalNumberofInks;
conversionOutput->triplecoordinates[i] = TripletData[i];
}
@@ -1721,13 +1812,106 @@ size_t Tango::ColorLib::ColorConverter::Convert(uint8_t * input_buffer, size_t i
InvLinearInterp[i].SetNPoints(npts);
}
}*/
+void Tango::ColorLib::ColorConverter::CountNumberofInks(GradientConversionInput* conversionInput, int &numInks, int &numLightInks)
+{
+ int nLiquids = conversionInput->n_inputliquids;
+ // int numberofInks = 0;
+ //Cyan
+ int nCyan = 0;
+ for (int i = 0; i < nLiquids; ++i)
+ {
+ if (conversionInput->inputliquids[i]->liquidtype == LIQUID_TYPE__Cyan)
+ nCyan++;
+ }
+ if (nCyan > 1)
+ {
+ numInks = -1;
+ numLightInks = -1;
+ return;
+ }
+ int nMagenta = 0;
+ for (int i = 0; i < nLiquids; ++i)
+ {
+ if (conversionInput->inputliquids[i]->liquidtype == LIQUID_TYPE__Magenta)
+ nMagenta++;
+ }
+ if (nMagenta > 1)
+ {
+ numInks = -1;
+ numLightInks = -1;
+ return;
+ }
+ int nYellow = 0;
+ for (int i = 0; i < nLiquids; ++i)
+ {
+ if (conversionInput->inputliquids[i]->liquidtype == LIQUID_TYPE__Yellow)
+ nYellow++;
+ }
+ if (nYellow > 1)
+ {
+ numInks = -1;
+ numLightInks = -1;
+ return;
+ }
+ int nBlack = 0;
+ for (int i = 0; i < nLiquids; ++i)
+ {
+ if (conversionInput->inputliquids[i]->liquidtype == LIQUID_TYPE__Black)
+ nBlack++;
+ }
+ if (nBlack > 1)
+ {
+ numInks = -1;
+ numLightInks = -1;
+ return;
+ }
+ int nLightCyan = 0;
+ for (int i = 0; i < nLiquids; ++i)
+ {
+ if (conversionInput->inputliquids[i]->liquidtype == LIQUID_TYPE__LightCyan)
+ nLightCyan++;
+ }
+ if (nLightCyan > 1)
+ {
+ numInks = -1;
+ numLightInks = -1;
+ return;
+ }
+ int nLightMagenta = 0;
+ for (int i = 0; i < nLiquids; ++i)
+ {
+ if (conversionInput->inputliquids[i]->liquidtype == LIQUID_TYPE__LightMagenta)
+ nLightMagenta++;
+ }
+ if (nLightMagenta > 1)
+ {
+ numInks = -1;
+ numLightInks = -1;
+ return;
+ }
+ int nLightYellow = 0;
+ for (int i = 0; i < nLiquids; ++i)
+ {
+ if (conversionInput->inputliquids[i]->liquidtype == LIQUID_TYPE__LightYellow)
+ nLightYellow++;
+ }
+ if (nLightYellow > 1)
+ {
+ numInks = -1;
+ numLightInks = -1;
+ return;
+ }
+ numInks = nCyan + nMagenta + nYellow + nBlack + nLightCyan + nLightMagenta + nLightYellow;
+ numLightInks = nLightCyan + nLightMagenta + nLightYellow;;
+ return;
+}
-int Tango::ColorLib::ColorConverter::CountNumberofInks(ConversionInput* conversionInput)
+void Tango::ColorLib::ColorConverter::CountNumberofInks(ConversionInput* conversionInput, int &numInks, int &numLightInks)
{
int nLiquids = conversionInput->inputcoordinates->n_inputliquids;
- int numberofInks = 0;
+// int numberofInks = 0;
//Cyan
- int nCyan = 0;;
+ int nCyan = 0;
for (int i = 0; i < nLiquids; ++i)
{
if (conversionInput->inputcoordinates->inputliquids[i]->liquidtype == LIQUID_TYPE__Cyan)
@@ -1735,8 +1919,9 @@ int Tango::ColorLib::ColorConverter::CountNumberofInks(ConversionInput* conversi
}
if (nCyan > 1)
{
- numberofInks = -1;
- return(numberofInks);
+ numInks = -1;
+ numLightInks = -1;
+ return;
}
int nMagenta = 0;
for (int i = 0; i < nLiquids; ++i)
@@ -1746,8 +1931,9 @@ int Tango::ColorLib::ColorConverter::CountNumberofInks(ConversionInput* conversi
}
if (nMagenta > 1)
{
- numberofInks = -1;
- return(numberofInks);
+ numInks = -1;
+ numLightInks = -1;
+ return;
}
int nYellow = 0;
for (int i = 0; i < nLiquids; ++i)
@@ -1757,8 +1943,9 @@ int Tango::ColorLib::ColorConverter::CountNumberofInks(ConversionInput* conversi
}
if (nYellow > 1)
{
- numberofInks = -1;
- return(numberofInks);
+ numInks = -1;
+ numLightInks = -1;
+ return;
}
int nBlack = 0;
for (int i = 0; i < nLiquids; ++i)
@@ -1768,11 +1955,49 @@ int Tango::ColorLib::ColorConverter::CountNumberofInks(ConversionInput* conversi
}
if (nBlack > 1)
{
- numberofInks = -1;
- return(numberofInks);
+ numInks = -1;
+ numLightInks = -1;
+ return;
+ }
+ int nLightCyan = 0;
+ for (int i = 0; i < nLiquids; ++i)
+ {
+ if (conversionInput->inputcoordinates->inputliquids[i]->liquidtype == LIQUID_TYPE__LightCyan)
+ nLightCyan++;
+ }
+ if (nLightCyan > 1)
+ {
+ numInks = -1;
+ numLightInks = -1;
+ return;
}
- numberofInks = nCyan + nMagenta + nYellow + nBlack;
- return(numberofInks);
+ int nLightMagenta = 0;
+ for (int i = 0; i < nLiquids; ++i)
+ {
+ if (conversionInput->inputcoordinates->inputliquids[i]->liquidtype == LIQUID_TYPE__LightMagenta)
+ nLightMagenta++;
+ }
+ if (nLightMagenta > 1)
+ {
+ numInks = -1;
+ numLightInks = -1;
+ return;
+ }
+ int nLightYellow = 0;
+ for (int i = 0; i < nLiquids; ++i)
+ {
+ if (conversionInput->inputcoordinates->inputliquids[i]->liquidtype == LIQUID_TYPE__LightYellow)
+ nLightYellow++;
+ }
+ if (nLightYellow > 1)
+ {
+ numInks = -1;
+ numLightInks = -1;
+ return;
+ }
+ numInks = nCyan + nMagenta + nYellow + nBlack + nLightCyan + nLightMagenta + nLightYellow;
+ numLightInks = nLightCyan + nLightMagenta + nLightYellow;;
+ return;
}
bool Tango::ColorLib::ColorConverter::IsInGamut(double *InLab, SURROUND sur, CAM02CS CS, double *LabCoord)
@@ -2099,12 +2324,16 @@ size_t Tango::ColorLib::ColorConverter::P_IsInGamut(uint8_t * input_buffer, size
bool InGamut = false;
m_WP.Set(0.9505, 1.00, 1.0888); //D65
//count number if inks
- int numofInks = CountNumberofInks(conversionInput);
+ int numofInks = 0;
+ int numLightInks = 0;
+ CountNumberofInks(conversionInput, numofInks, numLightInks);
readColorTransformations(conversionInput);
//read calibration tables and store them in m_CalibCurves
- int n_inputliquids = conversionInput->inputcoordinates->n_inputliquids;
+ int n_inputliquids = numofInks - numLightInks;
InputLiquid **inputliquid = conversionInput->inputcoordinates->inputliquids;
+ //Read CMYK Calibration Tables only. Light Inks have no calibration tables
+
readCalibrationTables(inputliquid, n_inputliquids);
//Initialize CIECAM02 transformation
@@ -2118,7 +2347,7 @@ size_t Tango::ColorLib::ColorConverter::P_IsInGamut(uint8_t * input_buffer, size
// Compare Strip White point to Color Table White Point
//CompareWhitePoints();
- if (numofInks != m_nInks)
+ if ((numofInks - numLightInks) != m_nInks)
throw std::exception("Number of available inks does not match ink tables");
VectorXd InkOut(m_nInks);
@@ -2295,31 +2524,7 @@ size_t Tango::ColorLib::ColorConverter::GenerateGradient(uint8_t * input_buffer,
if (m_colortable == NULL)
m_colortable = new ColorTable();
PrepareGradient(conversionInput, conversionOutput);
- //Get liquid types info...
- /* InputLiquid* cyan = NULL;
- InputLiquid* magenta = NULL;
- InputLiquid* yellow = NULL;
- InputLiquid* black = NULL;
-
- for (size_t i = 0; i < conversionInput->n_inputliquids; i++)
- {
- switch (conversionInput->inputliquids[i]->liquidtype)
- {
- case LIQUID_TYPE__Cyan:
- cyan = conversionInput->inputliquids[i];
- break;
- case LIQUID_TYPE__Magenta:
- magenta = conversionInput->inputliquids[i];
- break;
- case LIQUID_TYPE__Yellow:
- yellow = conversionInput->inputliquids[i];
- break;
- case LIQUID_TYPE__Black:
- black = conversionInput->inputliquids[i];
- break;
- }
- }*/
-
+
//Pack output...
output_buffer = (uint8_t*)malloc(gradient_conversion_output__get_packed_size(conversionOutput));
int size = gradient_conversion_output__pack(conversionOutput, output_buffer);
@@ -2388,10 +2593,10 @@ void Tango::ColorLib::ColorConverter::fillGradientStops(GradientConversionInput
m_GradStops[i].Set_ColorSpace(COLOR_SPACE__LAB);
m_GradStops[i].Set_Offset(conversionInput->stops[i]->offset);
break;
- case COLOR_SPACE__Volume: //Case Volume
+ case COLOR_SPACE__Volume: //Case Volume // No Light Inks implementation for Volume
m_GradStops[i].Set_ColorSpace(COLOR_SPACE__Volume);
m_GradStops[i].Set_Offset(conversionInput->stops[i]->offset);
- for (int j = 0; j < (int)conversionInput->stops[i]->n_liquidvolumes; j++)
+ for (int j = 0; j < m_TotalNumberofInks; j++)
{
LiquidVolume* liquidVolume = conversionInput->stops[i]->liquidvolumes[j];
@@ -2776,12 +2981,18 @@ void Tango::ColorLib::ColorConverter::PrepareGradient(GradientConversionInput* c
//fill input stops...
//All calculations are done in Relative Colorimetric Color Space
m_nGradStops = conversionInput->n_stops;
- int nInks = conversionInput->n_inputliquids;
- m_nVolumes = nInks;
+ int numofInks = 0;
+ int numLightInks = 0;
+ CountNumberofInks(conversionInput, numofInks, numLightInks);
+ if (numofInks < 0)
+ throw std::exception("Duplicate inks");
+ m_hasLightInks = false; //Gradients do not use light inks
+ m_TotalNumberofInks = numofInks - numLightInks;
+ m_nVolumes = m_TotalNumberofInks;
if(m_GradStops == NULL)
m_GradStops = new Gradient[m_nGradStops];
for (int i = 0; i < m_nGradStops; ++i)
- m_GradStops[i].SetVolumeSize(nInks);
+ m_GradStops[i].SetVolumeSize(m_TotalNumberofInks);
InputCoordinates **inputcoordinates = (InputCoordinates**)malloc(sizeof(InputCoordinates*)*m_nGradStops);
for (int i = 0; i < m_nGradStops; ++i)
@@ -2805,9 +3016,9 @@ void Tango::ColorLib::ColorConverter::PrepareGradient(GradientConversionInput* c
double *tmpVal = m_colortable->GetNormGamutRegionMaxLim();
for (int i = 0; i < m_nProcessRanges; ++i)
m_NormGamutRegionMaxLim[i] = tmpVal[i];
- int n_inputliquids = conversionInput->n_inputliquids;
+ //int n_inputliquids = conversionInput->n_inputliquids;
InputLiquid **inputliquid = conversionInput->inputliquids;
- readCalibrationTables(inputliquid, n_inputliquids);
+ readCalibrationTables(inputliquid, m_TotalNumberofInks);
if (m_colortable->GetTableVersion() <= 1)
{
throw std::exception("Color Table Version does not support gradients\0");
@@ -2836,7 +3047,7 @@ void Tango::ColorLib::ColorConverter::PrepareGradient(GradientConversionInput* c
// Compare Strip White point to Color Table White Point
//CompareWhitePoints();
ColorConvert CConvertD65(D65, D65); //Destination, source
- if (n_inputliquids != m_nInks)
+ if (m_TotalNumberofInks != m_nInks)
throw std::exception("Number of available inks does not match ink tables\0");
if (m_ProcessRangesMaxP == NULL)
@@ -2845,6 +3056,12 @@ void Tango::ColorLib::ColorConverter::PrepareGradient(GradientConversionInput* c
{
m_ProcessRangesMaxP[i] = conversionInput->processranges[i]->maxinkuptake;
}
+ if (m_ProcessRangesMinP == NULL)
+ m_ProcessRangesMinP = new double[m_nProcessRanges];
+ for (int i = 0; i < m_nProcessRanges; ++i)
+ {
+ m_ProcessRangesMinP[i] = conversionInput->processranges[i]->mininkuptake;
+ }
SetLowVolThr_nlcm();
VectorXd InkOut(m_nInks);
VectorXd RGBOut(3);
@@ -3150,14 +3367,14 @@ void Tango::ColorLib::ColorConverter::GradInput2InputCoords(GradientConversionI
inputcoordinates[i]->has_b = true;
break;
case COLOR_SPACE__Volume: //Case Volume
- int size= (int)conversionInput->stops[i]->n_liquidvolumes;
- InputLiquid** InputLiquidsIC = (InputLiquid**)malloc(sizeof(InputLiquid*) *size);
- for (int j = 0; j < size; j++)
+ //int size= (int)conversionInput->stops[i]->n_liquidvolumes;
+ InputLiquid** InputLiquidsIC = (InputLiquid**)malloc(sizeof(InputLiquid*) *m_TotalNumberofInks);
+ for (int j = 0; j < m_TotalNumberofInks; j++)
{
InputLiquidsIC[j] = (InputLiquid*)malloc(sizeof(InputLiquid));
input_liquid__init(InputLiquidsIC[j]);
}
- for (size_t j= 0; j< (int)conversionInput->stops[i]->n_liquidvolumes; j++)
+ for (size_t j= 0; j< (size_t)m_TotalNumberofInks; j++)
{
LiquidVolume* liquidVolume = conversionInput->stops[i]->liquidvolumes[j];
switch (liquidVolume->liquidtype)
@@ -3183,7 +3400,7 @@ void Tango::ColorLib::ColorConverter::GradInput2InputCoords(GradientConversionI
}
inputcoordinates[i]->inputliquids = InputLiquidsIC;
- inputcoordinates[i]->n_inputliquids = size;
+ inputcoordinates[i]->n_inputliquids = m_TotalNumberofInks;
}
}
}
@@ -3205,27 +3422,53 @@ void Tango::ColorLib::ColorConverter::NLcmtoPercentage(VectorXd InVolume, Vector
void Tango::ColorLib::ColorConverter::LimitLowVolume(VectorXd InVolume, int &GamutRegion, VectorXd &OutVolume)
{
int indGR = 0;
- //Find Gamut Region
for (int i = 1; i < m_nProcessRanges; ++i)
{
if (GamutRegion == i)
indGR = i;
}
- //Limit Volume based on Gamut Region
+ //InVolume is in [nl/cm]
+ double TotalVolume = 0.0;
+ for (int i = 0; i < m_nInks; ++i)
+ TotalVolume += InVolume(i);
+
+ double low = 0.0;
+ double high = 0.0;
+
+ if (TotalVolume <= m_ProcessRangesMinP[0])
+ {
+ //Calculate minVolumeThreshold based on m_ProcessRangesMinP[0]
+ high = LowVolumeThreshold * m_ProcessRangesMinP[0]/100.0;
+ }
+ else if (TotalVolume <= m_ProcessRangesMaxP[0])
+ {
+ //Calculate minVolumeThreshold based on Total Volume
+ high = LowVolumeThreshold * TotalVolume/100.0;
+ }
+ else if (TotalVolume <= m_ProcessRangesMinP[1])
+ {
+ //Calculate minVolumeThreshold based on m_ProcessRangesMinP[1]
+ high = LightInksThr * m_ProcessRangesMinP[1]/100.0;
+ }
+ else
+ {
+ high = LightInksThr * TotalVolume/100.0;
+ }
+ //Limit Volume based on Total Ink Volume
double sumVol = 0;
for (int i = 0; i < m_nInks; ++i)
{
- if (InVolume(i) >= m_LowVolThr_nlcm[indGR])
+ if (InVolume(i) >= high)
OutVolume(i) = InVolume(i);
- else if (InVolume(i) < m_LowVolThrHalf_nlcm[indGR])
+ else if (InVolume(i) <(high/2.0))
OutVolume(i) = 0.0;
else
- OutVolume(i) = m_LowVolThr_nlcm[indGR];
+ OutVolume(i) =high;
sumVol += OutVolume(i);
}
//recalculate GamutRegion
- if (indGR == 0)
- return;
+ if (sumVol <= m_ProcessRangesMaxP[0])
+ GamutRegion = 0;
else
{
for (int i = 1; i < indGR+1; ++i)
@@ -3238,6 +3481,7 @@ void Tango::ColorLib::ColorConverter::LimitLowVolume(VectorXd InVolume, int &Gam
void Tango::ColorLib::ColorConverter::LimitLowVolumeP(VectorXd InVolume, int &GamutRegion, VectorXd &OutVolume)
{
+ //InVolume is in %
int indGR = 0;
//Find Gamut Region
for (int i = 1; i < m_nProcessRanges; ++i)
@@ -3483,10 +3727,10 @@ void Tango::ColorLib::ColorConverter::LimitNLInks2VolumeThr(VectorXd NLInks, int
double *InkOutL = new double[m_nInks];
// ConvertToNLInks(NLInks, NLInkOut);
LimitInks(NLInks, InkOutL); // InkOutL in [nl/cm]
- NLInkPToVolume(DoubleToVector(InkOutL, m_nInks), Volume);
+ NLInkPToVolume(DoubleToVector(InkOutL, m_nInks), Volume); // [nl/cm]
GamutRegion = GetGamutRegion(Volume, m_ProcessRangesMaxP);
- LimitLowVolume(Volume, GamutRegion, Volume);
- NLcmtoPercentage(Volume, Volume);
+ LimitLowVolume(Volume, GamutRegion, Volume); // [nl/cm]
+ NLcmtoPercentage(Volume, Volume); // output volume in %
if (InkOutL != NULL)
{
@@ -3665,4 +3909,104 @@ void Tango::ColorLib::ColorConverter::ConvertVolumeToLabRel(VectorXd &Volume, V
}
return;
-} \ No newline at end of file
+}
+
+void Tango::ColorLib::ColorConverter::SplitVolume(VectorXd Volume, VectorXd &VolumeLI, int &GamutRegion)
+{
+//mark split candidates
+ int ind = 0;
+ int *LISplitInd = new int[m_nInks - 1];
+ VectorXd Vol_nlcm(m_nInks);
+ double TotalVolume = 0;
+ double low = 0;
+ double high = 0;
+ for (int i = 0; i < m_nInks ; ++i)
+ {
+ Vol_nlcm(i) = Volume(i)*m_maxNlPerCM(i)/100;
+ VolumeLI(i) = Vol_nlcm(i);
+ TotalVolume += Vol_nlcm(i);
+ }
+ int indGR = 0;
+ //Find Gamut Region
+ for (int i = 1; i < m_nProcessRanges; ++i)
+ {
+ if (GamutRegion == i)
+ indGR = i;
+ }
+ double lim1 = 0;
+ double lim2 = m_ProcessRangesMinP[0];
+ double lim3 = m_ProcessRangesMaxP[0];
+ for (int iReg = 0; iReg<m_nProcessRanges-1; ++iReg)
+ {
+ if ((TotalVolume >= lim1) & (TotalVolume <= lim2))
+ {
+ //Calculate Ink Split Based on m_ProcessRangesMinP[iReg]
+ low = LowVolumeThreshold * m_ProcessRangesMinP[iReg] / 100.0;
+ high = LightInksThr * m_ProcessRangesMinP[iReg] / 100.0;
+ }
+ else if ((TotalVolume <= lim3) & (TotalVolume > lim2))
+ {
+ //Calculate Ink Split Based on Total Volume
+ low = LowVolumeThreshold * TotalVolume / 100.0;
+ high = LightInksThr * TotalVolume / 100.0;
+ }
+ lim1 = m_ProcessRangesMaxP[iReg];
+ lim2 = m_ProcessRangesMinP[iReg+1];
+ lim3 = m_ProcessRangesMaxP[iReg+1];
+ }
+ if ((TotalVolume >= lim1) & (TotalVolume <= lim2))
+ {
+ //Calculate Ink Split Based on m_ProcessRangesMinP[iReg]
+ low = LowVolumeThreshold * m_ProcessRangesMinP[m_nProcessRanges-1] / 100.0;
+ high = LightInksThr * m_ProcessRangesMinP[m_nProcessRanges-1] / 100.0;
+ }
+ else if ((TotalVolume <= lim3) & (TotalVolume > lim2))
+ {
+ //Calculate Ink Split Based on Total Volume
+ low = LowVolumeThreshold * TotalVolume / 100.0;
+ high = LightInksThr * TotalVolume / 100.0;
+ }
+
+ for (int i = 0; i < m_nInks - 1; ++i)
+ {
+ if ((Vol_nlcm(i) >= low) & (Vol_nlcm(i) <= high))
+ {
+ VolumeLI(i + m_nInks) = DilutionFactor * Vol_nlcm(i);
+ VolumeLI(i) = 0.0;
+ }
+ else
+ {
+ VolumeLI(i) = Vol_nlcm(i);
+ VolumeLI(i + m_nInks) = 0;
+ }
+ }
+ //Check if Split Volume exceeds MaxInkUptake[1]
+ double UpperLimit = m_ProcessRangesMaxP[m_nProcessRanges - 1];
+ TotalVolume = 0.0;
+ for (int i = 0; i < m_TotalNumberofInks; ++i)
+ TotalVolume += VolumeLI(i);
+ if (TotalVolume > UpperLimit)
+ {
+ //go back to CMYK inks
+ for (int iBack = 0; iBack < m_nInks - 1; ++iBack)
+ {
+ if ((VolumeLI(iBack) == 0) & (VolumeLI(iBack + m_nInks) > 0))
+ {
+ VolumeLI(iBack) = VolumeLI(iBack + m_nInks)/DilutionFactor;
+ TotalVolume += (VolumeLI(iBack) - VolumeLI(iBack + m_nInks));
+ VolumeLI(iBack + m_nInks) = 0.0;
+ }
+ }
+ }
+ NLcmtoPercentage(VolumeLI, VolumeLI);
+ if (TotalVolume <= m_ProcessRangesMaxP[0])
+ GamutRegion = 0;
+ else
+ {
+ for (int i = 1; i < indGR + 1; ++i)
+ {
+ if ((TotalVolume > m_ProcessRangesMaxP[i - 1]) & (TotalVolume <= m_ProcessRangesMaxP[i]))
+ GamutRegion = i;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/ColorConverter.h b/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/ColorConverter.h
index 3c75124e5..3f84b9304 100644
--- a/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/ColorConverter.h
+++ b/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/ColorConverter.h
@@ -79,6 +79,7 @@ namespace Tango
VectorXd &InkOut, VectorXd &RGBOut,
VectorXd &LabOut, int &GamutRegion);
void ConvertVolumeToLabRel(VectorXd &Volume, VectorXd &LabOut, int GamutRegion);
+ void SplitVolume(VectorXd Volume, VectorXd &VolumeLI, int &GamutRegion);
size_t Tango::ColorLib::ColorConverter::Convert(uint8_t * input_buffer, size_t input_buffer_size, uint8_t *& output_buffer);
size_t Tango::ColorLib::ColorConverter::GenerateGradient(uint8_t * input_buffer, size_t input_buffer_size, uint8_t *& output_buffer);
void ConvertToNLInks(VectorXd InkIn, VectorXd &InkOut);
@@ -91,13 +92,17 @@ namespace Tango
private:
ColorTable *m_colortable;
ColorConvert *m_Conv02;
+ LiquidType *m_InkNames;
// Interp *m_LinInterp;
// Interp *m_InvLinInterp;
C_RGB_XYZ_Lab m_whitepointLab;
C_RGB_XYZ_Lab m_whitepointXYZ_Strip;
double *m_NormGamutRegionMaxLim;
double *m_ProcessRangesMaxP;
+ double *m_ProcessRangesMinP;
int m_nProcessRanges;
+ bool m_hasLightInks;
+ int m_TotalNumberofInks;
void LimitLab(double* LabIn);
int m_nGradStops;
Gradient *m_GradStops;
@@ -131,7 +136,8 @@ namespace Tango
VectorXd xpos, VectorXd ypos, int nHive, MatrixXd &OLabHive,
MatrixXd &ORGBHive, MatrixXd &OVolumeHive, int *&OGamutRegion);
void FindTriplet(VectorXd Lab, MatrixXd Lab1, int nHive, int*indDataMax);
- int CountNumberofInks(ConversionInput* conversionInput);
+ void CountNumberofInks(ConversionInput* conversionInput, int &numInks, int &numLightInks);
+ void CountNumberofInks(GradientConversionInput* conversionInput, int &numInks, int &numLightInks);
void SetStripWhitepoint(double threadl, double threada, double threadb);
void VectorToDouble(VectorXd Vec, double *doub);
// void VectorToDouble(VectorXd VecIn, std::vector<double> &doubOut);
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures/ProcedureContext.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures/ProcedureContext.cs
index f47f1174e..594698c4c 100644
--- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures/ProcedureContext.cs
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures/ProcedureContext.cs
@@ -152,7 +152,7 @@ namespace Tango.FSE.Procedures
return Send<T>(messageName, null, args);
}
- public IMessage Send(IMessage message, int? timeout = null)
+ public virtual IMessage Send(IMessage message, int? timeout = null)
{
TimeSpan? timespan = null;
@@ -172,7 +172,7 @@ namespace Tango.FSE.Procedures
return Send(messageName, timeout) as T;
}
- public void SendContinuous<T>(IMessage message, Action<T> callback, int? timeout = null) where T : class, IMessage
+ public virtual void SendContinuous<T>(IMessage message, Action<T> callback, int? timeout = null) where T : class, IMessage
{
TaskCompletionSource<object> completion = new TaskCompletionSource<object>();
diff --git a/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Controls/Notification.cs b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Controls/Notification.cs
new file mode 100644
index 000000000..58ab8aaa1
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Controls/Notification.cs
@@ -0,0 +1,113 @@
+using System;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using Notifications.Wpf.Utils;
+
+namespace Notifications.Wpf.Controls
+{
+ [TemplatePart(Name = "PART_CloseButton", Type = typeof(Button))]
+ public class Notification : ContentControl
+ {
+ private TimeSpan _closingAnimationTime = TimeSpan.Zero;
+
+ public bool IsClosing { get; set; }
+
+ public static readonly RoutedEvent NotificationCloseInvokedEvent = EventManager.RegisterRoutedEvent(
+ "NotificationCloseInvoked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(Notification));
+
+ public static readonly RoutedEvent NotificationClosedEvent = EventManager.RegisterRoutedEvent(
+ "NotificationClosed", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(Notification));
+
+ static Notification()
+ {
+ DefaultStyleKeyProperty.OverrideMetadata(typeof(Notification),
+ new FrameworkPropertyMetadata(typeof(Notification)));
+ }
+
+ public event RoutedEventHandler NotificationCloseInvoked
+ {
+ add { AddHandler(NotificationCloseInvokedEvent, value); }
+ remove { RemoveHandler(NotificationCloseInvokedEvent, value); }
+ }
+
+ public event RoutedEventHandler NotificationClosed
+ {
+ add { AddHandler(NotificationClosedEvent, value); }
+ remove { RemoveHandler(NotificationClosedEvent, value); }
+ }
+
+ public static bool GetCloseOnClick(DependencyObject obj)
+ {
+ return (bool)obj.GetValue(CloseOnClickProperty);
+ }
+
+ public static void SetCloseOnClick(DependencyObject obj, bool value)
+ {
+ obj.SetValue(CloseOnClickProperty, value);
+ }
+
+ public static readonly DependencyProperty CloseOnClickProperty =
+ DependencyProperty.RegisterAttached("CloseOnClick", typeof(bool), typeof(Notification), new FrameworkPropertyMetadata(false,CloseOnClickChanged));
+
+ private static void CloseOnClickChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
+ {
+ var button = dependencyObject as Button;
+ if (button == null)
+ {
+ return;
+ }
+
+ var value = (bool)dependencyPropertyChangedEventArgs.NewValue;
+
+ if (value)
+ {
+ button.Click += (sender, args) =>
+ {
+ var notification = VisualTreeHelperExtensions.GetParent<Notification>(button);
+ notification?.Close();
+ };
+ }
+ }
+
+ public override void OnApplyTemplate()
+ {
+ base.OnApplyTemplate();
+ var closeButton = GetTemplateChild("PART_CloseButton") as Button;
+ if (closeButton != null)
+ closeButton.Click += OnCloseButtonOnClick;
+
+ var storyboards = Template.Triggers.OfType<EventTrigger>().FirstOrDefault(t => t.RoutedEvent == NotificationCloseInvokedEvent)?.Actions.OfType<BeginStoryboard>().Select(a => a.Storyboard);
+ _closingAnimationTime = new TimeSpan(storyboards?.Max(s => Math.Min((s.Duration.HasTimeSpan ? s.Duration.TimeSpan + (s.BeginTime ?? TimeSpan.Zero) : TimeSpan.MaxValue).Ticks, s.Children.Select(ch => ch.Duration.TimeSpan + (s.BeginTime ?? TimeSpan.Zero)).Max().Ticks)) ?? 0);
+
+ }
+
+ private void OnCloseButtonOnClick(object sender, RoutedEventArgs args)
+ {
+ var button = sender as Button;
+ if (button == null) return;
+
+ button.Click -= OnCloseButtonOnClick;
+ Close();
+ }
+
+ //TODO: .NET40
+ public async void Close()
+ {
+ if (IsClosing)
+ {
+ return;
+ }
+
+ IsClosing = true;
+
+ RaiseEvent(new RoutedEventArgs(NotificationCloseInvokedEvent));
+ await Task.Delay(_closingAnimationTime);
+ RaiseEvent(new RoutedEventArgs(NotificationClosedEvent));
+ }
+ }
+}
diff --git a/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Controls/NotificationArea.cs b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Controls/NotificationArea.cs
new file mode 100644
index 000000000..7163e46f4
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Controls/NotificationArea.cs
@@ -0,0 +1,150 @@
+using System;
+using System.Collections;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Media;
+using System.Windows.Threading;
+
+namespace Notifications.Wpf.Controls
+{
+ public class NotificationArea : Control
+ {
+
+
+
+ public NotificationPosition Position
+ {
+ get { return (NotificationPosition)GetValue(PositionProperty); }
+ set { SetValue(PositionProperty, value); }
+ }
+
+ // Using a DependencyProperty as the backing store for Position. This enables animation, styling, binding, etc...
+ public static readonly DependencyProperty PositionProperty =
+ DependencyProperty.Register("Position", typeof(NotificationPosition), typeof(NotificationArea), new PropertyMetadata(NotificationPosition.BottomRight));
+
+
+ public int MaxItems
+ {
+ get { return (int)GetValue(MaxItemsProperty); }
+ set { SetValue(MaxItemsProperty, value); }
+ }
+
+ public static readonly DependencyProperty MaxItemsProperty =
+ DependencyProperty.Register("MaxItems", typeof(int), typeof(NotificationArea), new PropertyMetadata(int.MaxValue));
+
+ private IList _items;
+
+ public NotificationArea()
+ {
+ NotificationManager.AddArea(this);
+ }
+
+ static NotificationArea()
+ {
+ DefaultStyleKeyProperty.OverrideMetadata(typeof(NotificationArea),
+ new FrameworkPropertyMetadata(typeof(NotificationArea)));
+ }
+
+ public override void OnApplyTemplate()
+ {
+ base.OnApplyTemplate();
+ var itemsControl = GetTemplateChild("PART_Items") as Panel;
+ _items = itemsControl?.Children;
+ }
+
+#if NET40
+ public void Show(object content, TimeSpan expirationTime, Action onClick, Action onClose)
+#else
+ public async void Show(object content, TimeSpan expirationTime, Action onClick, Action onClose)
+#endif
+ {
+ var notification = new Notification
+ {
+ Content = content
+ };
+
+ notification.MouseLeftButtonDown += (sender, args) =>
+ {
+ if (onClick != null)
+ {
+ onClick.Invoke();
+ (sender as Notification)?.Close();
+ }
+ };
+ notification.NotificationClosed += (sender, args) => onClose?.Invoke();
+ notification.NotificationClosed += OnNotificationClosed;
+
+ if (!IsLoaded)
+ {
+ return;
+ }
+
+ var w = Window.GetWindow(this);
+ var x = PresentationSource.FromVisual(w);
+ if (x == null)
+ {
+ return;
+ }
+
+ lock (_items)
+ {
+ _items.Add(notification);
+
+ if (_items.OfType<Notification>().Count(i => !i.IsClosing) > MaxItems)
+ {
+ _items.OfType<Notification>().First(i => !i.IsClosing).Close();
+ }
+ }
+
+#if NET40
+ DelayExecute(expirationTime, () =>
+ {
+#else
+ if (expirationTime == TimeSpan.MaxValue)
+ {
+ return;
+ }
+ await Task.Delay(expirationTime);
+#endif
+ notification.Close();
+#if NET40
+ });
+#endif
+ }
+
+ private void OnNotificationClosed(object sender, RoutedEventArgs routedEventArgs)
+ {
+ var notification = sender as Notification;
+ _items.Remove(notification);
+ }
+
+#if NET40
+ private static void DelayExecute(TimeSpan delay, Action actionToExecute)
+ {
+ if (actionToExecute != null)
+ {
+ var timer = new DispatcherTimer
+ {
+ Interval = delay
+ };
+ timer.Tick += (sender, args) =>
+ {
+ timer.Stop();
+ actionToExecute();
+ };
+ timer.Start();
+ }
+ }
+#endif
+ }
+
+ public enum NotificationPosition
+ {
+ TopLeft,
+ TopRight,
+ BottomLeft,
+ BottomRight
+ }
+} \ No newline at end of file
diff --git a/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Controls/ReversibleStackPanel.cs b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Controls/ReversibleStackPanel.cs
new file mode 100644
index 000000000..f13126a29
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Controls/ReversibleStackPanel.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Notifications.Wpf.Controls
+{
+ public class ReversibleStackPanel : StackPanel
+ {
+
+
+ public bool ReverseOrder
+ {
+ get { return (bool)GetValue(ReverseOrderProperty); }
+ set { SetValue(ReverseOrderProperty, value); }
+ }
+
+ public static readonly DependencyProperty ReverseOrderProperty =
+ DependencyProperty.Register("ReverseOrder", typeof(bool), typeof(ReversibleStackPanel), new PropertyMetadata(false));
+
+
+ protected override Size ArrangeOverride(Size arrangeSize)
+ {
+ double x = 0;
+ double y = 0;
+
+ IEnumerable<UIElement> children = ReverseOrder ? InternalChildren.Cast<UIElement>().Reverse() : InternalChildren.Cast<UIElement>();
+ foreach (UIElement child in children)
+ {
+ Size size;
+
+ if (Orientation == Orientation.Horizontal)
+ {
+ size = new Size(child.DesiredSize.Width, Math.Max(arrangeSize.Height, child.DesiredSize.Height));
+ child.Arrange(new Rect(new Point(x, y), size));
+ x += size.Width;
+ }
+ else
+ {
+ size = new Size(Math.Max(arrangeSize.Width, child.DesiredSize.Width), child.DesiredSize.Height);
+ child.Arrange(new Rect(new Point(x, y), size));
+ y += size.Height;
+ }
+ }
+
+ return Orientation == Orientation.Horizontal ? new Size(x, arrangeSize.Height) : new Size(arrangeSize.Width, y);
+ }
+ }
+}
diff --git a/Software/Visual_Studio/StubsUtils/Notifications.Wpf/INotificationManager.cs b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/INotificationManager.cs
new file mode 100644
index 000000000..736a46e2b
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/INotificationManager.cs
@@ -0,0 +1,9 @@
+using System;
+
+namespace Notifications.Wpf
+{
+ public interface INotificationManager
+ {
+ void Show(object content, string areaName = "", TimeSpan? expirationTime = null, Action onClick = null, Action onClose = null);
+ }
+} \ No newline at end of file
diff --git a/Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationContent.cs b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationContent.cs
new file mode 100644
index 000000000..3b942374b
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationContent.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Notifications.Wpf
+{
+ public class NotificationContent
+ {
+ public string Title { get; set; }
+ public string Message { get; set; }
+
+ public NotificationType Type { get; set; }
+ }
+
+ public enum NotificationType
+ {
+ Information,
+ Success,
+ Warning,
+ Error
+ }
+}
diff --git a/Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationManager.cs b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationManager.cs
new file mode 100644
index 000000000..0e8091e8a
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationManager.cs
@@ -0,0 +1,64 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows;
+using System.Windows.Threading;
+using Notifications.Wpf.Controls;
+
+namespace Notifications.Wpf
+{
+ public class NotificationManager : INotificationManager
+ {
+ private readonly Dispatcher _dispatcher;
+ private static readonly List<NotificationArea> Areas = new List<NotificationArea>();
+ private static NotificationsOverlayWindow _window;
+
+ public NotificationManager(Dispatcher dispatcher = null)
+ {
+ if (dispatcher == null)
+ {
+ dispatcher = Application.Current?.Dispatcher ?? Dispatcher.CurrentDispatcher;
+ }
+
+ _dispatcher = dispatcher;
+ }
+
+ public void Show(object content, string areaName = "", TimeSpan? expirationTime = null, Action onClick = null,
+ Action onClose = null)
+ {
+ if (!_dispatcher.CheckAccess())
+ {
+ _dispatcher.BeginInvoke(
+ new Action(() => Show(content, areaName, expirationTime, onClick, onClose)));
+ return;
+ }
+
+ if (expirationTime == null) expirationTime = TimeSpan.FromSeconds(5);
+
+ if (areaName == string.Empty && _window == null)
+ {
+ var workArea = SystemParameters.WorkArea;
+
+ _window = new NotificationsOverlayWindow
+ {
+ Left = workArea.Left,
+ Top = workArea.Top,
+ Width = workArea.Width,
+ Height = workArea.Height
+ };
+
+ _window.Show();
+ }
+
+ foreach (var area in Areas.Where(a => a.Name == areaName))
+ {
+ area.Show(content, (TimeSpan) expirationTime, onClick, onClose);
+ }
+ }
+
+ internal static void AddArea(NotificationArea area)
+ {
+ Areas.Add(area);
+ }
+ }
+} \ No newline at end of file
diff --git a/Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationTemplateSelector.cs b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationTemplateSelector.cs
new file mode 100644
index 000000000..aab11a7fa
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationTemplateSelector.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Notifications.Wpf
+{
+ public class NotificationTemplateSelector : DataTemplateSelector
+ {
+ private DataTemplate _defaultStringTemplate;
+ private DataTemplate _defaultNotificationTemplate;
+
+ private void GetTemplatesFromResources(FrameworkElement container)
+ {
+ _defaultStringTemplate =
+ container?.FindResource("DefaultStringTemplate") as DataTemplate;
+ _defaultNotificationTemplate =
+ container?.FindResource("DefaultNotificationTemplate") as DataTemplate;
+ }
+
+ public override DataTemplate SelectTemplate(object item, DependencyObject container)
+ {
+ if (_defaultStringTemplate == null && _defaultNotificationTemplate == null)
+ {
+ GetTemplatesFromResources((FrameworkElement)container);
+ }
+
+ if (item is string)
+ {
+ return _defaultStringTemplate;
+ }
+ if (item is NotificationContent)
+ {
+ return _defaultNotificationTemplate;
+ }
+
+ return base.SelectTemplate(item, container);
+
+ }
+ }
+} \ No newline at end of file
diff --git a/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Notifications.Wpf.csproj b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Notifications.Wpf.csproj
new file mode 100644
index 000000000..0e5db5694
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Notifications.Wpf.csproj
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{5C9A4F46-263D-4C23-B361-F09E14BB109E}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Notifications.Wpf</RootNamespace>
+ <AssemblyName>Notifications.Wpf</AssemblyName>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release 4.0|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <DefineConstants>TRACE;NET40</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <OutputPath>bin\Release\net40\</OutputPath>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release 4.5|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <DefineConstants>TRACE;NET45</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <OutputPath>bin\Release\net45\</OutputPath>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release 4.6.1|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <DefineConstants>TRACE;NET461</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <OutputPath>bin\Release\net461\</OutputPath>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xaml" />
+ <Reference Include="System.Xml" />
+ <Reference Include="WindowsBase" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Controls\Notification.cs" />
+ <Compile Include="Controls\NotificationArea.cs" />
+ <Compile Include="Controls\ReversibleStackPanel.cs" />
+ <Compile Include="INotificationManager.cs" />
+ <Compile Include="NotificationContent.cs" />
+ <Compile Include="NotificationManager.cs" />
+ <Compile Include="NotificationTemplateSelector.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="NotificationsOverlayWindow.xaml.cs">
+ <DependentUpon>NotificationsOverlayWindow.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Utils\VisualTreeHelperExtensions.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Page Include="Themes\Generic.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="NotificationsOverlayWindow.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Notifications.Wpf.nuspec" />
+ <None Include="pack.bat" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>-->
+ <Target Name="AfterBuild">
+ <GetAssemblyIdentity AssemblyFiles="$(OutputPath)$(AssemblyName).dll">
+ <Output TaskParameter="Assemblies" ItemName="OutputAssemblyInfo" />
+ </GetAssemblyIdentity>
+ <Message Text="Info: %(OutputAssemblyInfo.Version)" />
+ </Target>
+ <Target Name="Package">
+ <!-- Ensure the Package directory exists for this project -->
+ <RemoveDir Directories="NuGet" />
+ <MakeDir Directories="NuGet" />
+ <!-- Package the project -->
+ <Exec WorkingDirectory="$(BuildDir)" Command="NuGet.exe pack -OutputDir &quot;NuGet&quot; -Properties &quot;Configuration=$(Configuration)&quot;" />
+ </Target>
+</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Notifications.Wpf.nuspec b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Notifications.Wpf.nuspec
new file mode 100644
index 000000000..c4f36a497
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Notifications.Wpf.nuspec
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<package >
+ <metadata>
+ <id>$id$</id>
+ <version>$version$</version>
+ <title>$title$</title>
+ <authors>$author$</authors>
+ <owners>$author$</owners>
+ <projectUrl>https://github.com/Federerer/Notifications.Wpf</projectUrl>
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
+ <description>$description$</description>
+ <releaseNotes>First release.</releaseNotes>
+ <copyright>Copyright 2017</copyright>
+ <tags>Toast Notifications WPF</tags>
+ </metadata>
+ <files>
+ <file src="bin\Release\net40\$id$.dll" target="lib\net40\" />
+ <file src="bin\Release\net45\$id$.dll" target="lib\net45\" />
+ <file src="bin\Release\net461\$id$.dll" target="lib\net461\" />
+ </files>
+</package> \ No newline at end of file
diff --git a/Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationsOverlayWindow.xaml b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationsOverlayWindow.xaml
new file mode 100644
index 000000000..1c80f11ec
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationsOverlayWindow.xaml
@@ -0,0 +1,18 @@
+<Window x:Class="Notifications.Wpf.NotificationsOverlayWindow"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:controls1="clr-namespace:Notifications.Wpf.Controls"
+ mc:Ignorable="d"
+ Title="ToastWindow"
+ Background="Transparent"
+ ShowInTaskbar="False"
+ WindowStyle="None"
+ AllowsTransparency="True"
+ Topmost="True"
+ ShowActivated="False"
+ d:DesignWidth="900"
+ d:DesignHeight="600">
+ <controls1:NotificationArea Position="BottomRight" Margin="8"/>
+</Window>
diff --git a/Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationsOverlayWindow.xaml.cs b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationsOverlayWindow.xaml.cs
new file mode 100644
index 000000000..ecb595694
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/NotificationsOverlayWindow.xaml.cs
@@ -0,0 +1,16 @@
+using System.Windows;
+
+namespace Notifications.Wpf
+{
+ /// <summary>
+ /// Interaction logic for ToastWindow.xaml
+ /// </summary>
+ public partial class NotificationsOverlayWindow : Window
+ {
+ public NotificationsOverlayWindow()
+ {
+ InitializeComponent();
+ }
+
+ }
+}
diff --git a/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Properties/AssemblyInfo.cs b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..d0022abe6
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Properties/AssemblyInfo.cs
@@ -0,0 +1,39 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Notifications.Wpf")]
+[assembly: AssemblyDescription("Toast notifications for WPF")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Adrian Gaś")]
+[assembly: AssemblyProduct("Notifications.Wpf")]
+[assembly: AssemblyCopyright("Copyright © 2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("5c9a4f46-263d-4c23-b361-f09e14bb109e")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyInformationalVersion("0.1.0")]
+[assembly: AssemblyVersion("0.1.0")]
+[assembly: AssemblyFileVersion("0.1.0")] \ No newline at end of file
diff --git a/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Themes/Generic.xaml b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Themes/Generic.xaml
new file mode 100644
index 000000000..76de0e6d7
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Themes/Generic.xaml
@@ -0,0 +1,156 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:controls="clr-namespace:Notifications.Wpf.Controls"
+ xmlns:system="clr-namespace:System;assembly=mscorlib"
+ xmlns:wpf="clr-namespace:Notifications.Wpf">
+
+ <Path x:Key="ErrorIcon" Data="M 2.6874995 2.8246546e-7 -4.7683716e-7 2.6855503 5.3007795 7.9863303 -4.7683716e-7 13.28516 2.6874995 15.97266 l 5.29883 -5.30079 5.3007805 5.30079 2.68554 -2.6875 -5.29882 -5.2988297 5.29882 -5.30078 L 13.28711 2.8246546e-7 7.9863295 5.2988303 2.6874995 2.8246546e-7 Z" Fill="White" x:Shared="False"/>
+ <Path x:Key="SuccessIcon" Data="M 15.56055 5.9323048e-7 7.53125 10.197261 2.73242 5.2304706 0 7.8710906 7.82422 15.968751 18.54492 2.3515606 15.56055 5.9323048e-7 Z" Fill="White" x:Shared="False"/>
+ <Path x:Key="InfoIcon" Data="M 10.968748 8.9809305e-8 C 4.9320181 8.9809305e-8 -1.9073487e-6 4.9320201 -1.9073487e-6 10.96875 c 0 6.03672 4.9322600073487 10.9668 10.9687499073487 10.9668 6.03648 0 10.96875 -4.93008 10.96875 -10.9668 C 21.937498 4.9320201 17.005458 8.9809305e-8 10.968748 8.9809305e-8 Z m 0 2.000000010190695 c 4.95043 0 8.96875 4.0183 8.96875 8.9687499 0 4.95044 -4.01809 8.9668 -8.96875 8.9668 -4.9506899 0 -8.9687499 -4.01636 -8.9687499 -8.9668 0 -4.9504499 4.0183 -8.9687499 8.9687499 -8.9687499 z m -1.4999999 2.49805 0 3 2.9999999 0 0 -3 -2.9999999 0 z m 0 4.4707 0 8.9101599 2.9999999 0 0 -8.9101599 -2.9999999 0 z" Fill="White" x:Shared="False"/>
+ <Path x:Key="WarningIcon" Data="M 12.414089 4.6396565e-7 C 12.128679 -9.5360343e-6 11.832699 0.06810046 11.574249 0.19726046 c -0.29252 0.14627 -0.55012 0.39584 -0.70899 0.67383 l -0.002 0.002 L 0.22067905 19.77348 l -0.0117 0.0234 C 0.08326905 20.04831 -9.5367432e-7 20.33976 -9.5367432e-7 20.64844 c 0 0.30629 0.0851000036743 0.62597 0.23633000367432 0.89063 0.13469 0.2357 0.31957 0.44504 0.5332 0.60937 l 0.0137 0.0117 0.0156 0.01 C 1.076789 22.36867 1.440719 22.48654 1.785149 22.48654 l 21.28516 0 c 0.3398 0 0.70907 -0.12364 0.98828 -0.33398 0.2208 -0.16158 0.42089 -0.3689 0.56055 -0.61328 0.15122 -0.26466 0.23633 -0.58434 0.23633 -0.89063 0 -0.30868 -0.0852 -0.60013 -0.21094 -0.85156 l -0.01 -0.0234 -10.66992 -18.90038954 -0.002 -0.002 c -0.15887 -0.27808 -0.41633 -0.52756 -0.70899 -0.67383 -0.25845 -0.12918 -0.55443 -0.19726999603 -0.83984 -0.19725999603 z m 0 2.19531003603435 10.32617 18.2910095 -20.625 0 10.29883 -18.2910095 z m -1.48633 3.84765 0 8.9121095 3 0 0 -8.9121095 -3 0 z m 0 10.3808595 0 3 3 0 0 -3 -3 0 z" Fill="White" x:Shared="False"/>
+
+ <Style TargetType="Button" x:Key="CloseButtonStyle">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="Button">
+ <TextBlock Text="&#9932;" FontSize="12" />
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ <Setter Property="HorizontalAlignment" Value="Right"/>
+ <Setter Property="VerticalAlignment" Value="Top"/>
+ </Style>
+
+ <wpf:NotificationTemplateSelector x:Key="NotificationTemplateSelector"/>
+
+ <ControlTemplate x:Key="NotificationTemplate" TargetType="{x:Type controls:Notification}">
+ <ControlTemplate.Resources>
+ <DataTemplate DataType="{x:Type system:String}" x:Key="DefaultStringTemplate">
+ <Border Background="{Binding RelativeSource={RelativeSource AncestorType=controls:Notification}, Path=Background}" MinHeight="80">
+ <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding}"/>
+ </Border>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type wpf:NotificationContent}" x:Key="DefaultNotificationTemplate">
+ <Border x:Name="Border" Padding="12" MinHeight="80">
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <ContentControl Margin="0,0,12,0" Width="25" Height="25" VerticalAlignment="Top">
+ <ContentControl x:Name="Icon" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </ContentControl>
+ <DockPanel Grid.Column="1">
+ <TextBlock DockPanel.Dock="Top" Text="{Binding Title}" FontWeight="Medium" TextTrimming="CharacterEllipsis" />
+ <TextBlock Text="{Binding Message}" TextWrapping="Wrap" Opacity=".8" Margin="0,0,12,0"/>
+ </DockPanel>
+ </Grid>
+ </Border>
+ <DataTemplate.Triggers>
+ <DataTrigger Binding="{Binding Type}" Value="Information">
+ <Setter TargetName="Icon" Property="Content" Value="{StaticResource InfoIcon}"/>
+ <Setter TargetName="Border" Property="Background" Value="CornflowerBlue"/>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Type}" Value="Success">
+ <Setter TargetName="Icon" Property="Content" Value="{StaticResource SuccessIcon}"/>
+ <Setter TargetName="Border" Property="Background" Value="#353535"/>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Type}" Value="Warning">
+ <Setter TargetName="Icon" Property="Content" Value="{StaticResource WarningIcon}"/>
+ <Setter TargetName="Border" Property="Background" Value="Orange"/>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Type}" Value="Error">
+ <Setter TargetName="Icon" Property="Content" Value="{StaticResource ErrorIcon}"/>
+ <Setter TargetName="Border" Property="Background" Value="OrangeRed"/>
+ </DataTrigger>
+ </DataTemplate.Triggers>
+ </DataTemplate>
+ </ControlTemplate.Resources>
+ <Border Background="{TemplateBinding Background}"
+ BorderBrush="{TemplateBinding BorderBrush}"
+ BorderThickness="{TemplateBinding BorderThickness}"
+ Margin="8,8,0,0">
+ <Grid>
+ <ContentPresenter/>
+ <Button x:Name="PART_CloseButton" Style="{StaticResource CloseButtonStyle}" Margin="12" Foreground="{TemplateBinding Foreground}" Opacity=".8"/>
+ </Grid>
+ </Border>
+ <ControlTemplate.Triggers>
+ <EventTrigger RoutedEvent="Loaded">
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.5" />
+ <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleX" From="0" To="1" Duration="0:0:.2"/>
+ <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleY" From="0" To="1" Duration="0:0:.2"/>
+ </Storyboard>
+ </BeginStoryboard>
+ </EventTrigger>
+ <EventTrigger RoutedEvent="controls:Notification.NotificationCloseInvoked" >
+ <BeginStoryboard>
+ <Storyboard Duration="0:0:.1">
+ <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleX" From="1" To="0.1" Duration="0:0:.2"/>
+ </Storyboard>
+ </BeginStoryboard>
+ <BeginStoryboard>
+ <Storyboard BeginTime="0:0:.2">
+ <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleY" From="1" To="0" Duration="0:0:.2"/>
+ </Storyboard>
+ </BeginStoryboard>
+ </EventTrigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+
+ <Style TargetType="{x:Type controls:Notification}">
+ <!--<Setter Property="Height" Value="100"/>-->
+ <Setter Property="UseLayoutRounding" Value="True"/>
+ <Setter Property="SnapsToDevicePixels" Value="True"/>
+ <Setter Property="Width" Value="350"/>
+ <Setter Property="FontSize" Value="14"></Setter>
+ <Setter Property="Background" Value="#444444"/>
+ <Setter Property="Foreground" Value="White"/>
+ <Setter Property="Template" Value="{StaticResource NotificationTemplate}"/>
+ <Setter Property="ContentTemplateSelector" Value="{StaticResource NotificationTemplateSelector}"/>
+ <Setter Property="LayoutTransform">
+ <Setter.Value>
+ <ScaleTransform />
+ </Setter.Value>
+ </Setter>
+ <Setter Property="Effect">
+ <Setter.Value>
+ <DropShadowEffect BlurRadius="5" Direction="0" ShadowDepth="0" Opacity=".25"/>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <Style TargetType="{x:Type controls:NotificationArea}">
+ <Setter Property="Margin" Value="0,0,8,8"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type controls:NotificationArea}">
+ <controls:ReversibleStackPanel x:Name="PART_Items"/>
+ <ControlTemplate.Triggers>
+ <Trigger Property="Position" Value="TopLeft">
+ <Setter TargetName="PART_Items" Property="VerticalAlignment" Value="Top"/>
+ <Setter TargetName="PART_Items" Property="HorizontalAlignment" Value="Left"/>
+ </Trigger>
+ <Trigger Property="Position" Value="TopRight">
+ <Setter TargetName="PART_Items" Property="VerticalAlignment" Value="Top"/>
+ <Setter TargetName="PART_Items" Property="HorizontalAlignment" Value="Right"/>
+ </Trigger>
+ <Trigger Property="Position" Value="BottomLeft">
+ <Setter TargetName="PART_Items" Property="ReverseOrder" Value="True"/>
+ <Setter TargetName="PART_Items" Property="VerticalAlignment" Value="Bottom"/>
+ <Setter TargetName="PART_Items" Property="HorizontalAlignment" Value="Left"/>
+ </Trigger>
+ <Trigger Property="Position" Value="BottomRight">
+ <Setter TargetName="PART_Items" Property="ReverseOrder" Value="True"/>
+ <Setter TargetName="PART_Items" Property="VerticalAlignment" Value="Bottom"/>
+ <Setter TargetName="PART_Items" Property="HorizontalAlignment" Value="Right"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+</ResourceDictionary> \ No newline at end of file
diff --git a/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Utils/VisualTreeHelperExtensions.cs b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Utils/VisualTreeHelperExtensions.cs
new file mode 100644
index 000000000..e930e92da
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/Utils/VisualTreeHelperExtensions.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Media;
+
+namespace Notifications.Wpf.Utils
+{
+ internal class VisualTreeHelperExtensions
+ {
+ public static T GetParent<T>(DependencyObject child) where T : DependencyObject
+ {
+ var parent = VisualTreeHelper.GetParent(child);
+
+ if (parent == null) return null;
+
+ var tParent = parent as T;
+ if (tParent != null)
+ {
+ return tParent;
+ }
+
+ return GetParent<T>(parent);
+ }
+ }
+}
diff --git a/Software/Visual_Studio/StubsUtils/Notifications.Wpf/pack.bat b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/pack.bat
new file mode 100644
index 000000000..59c6be7d2
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Notifications.Wpf/pack.bat
@@ -0,0 +1,3 @@
+msbuild /p:Configuration="Release 4.0"
+msbuild /p:Configuration="Release 4.5"
+msbuild /t:Build;Package /p:Configuration="Release 4.6.1" \ No newline at end of file
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Program.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Program.cs
index 9fd588906..f59f97de3 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Program.cs
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Program.cs
@@ -1,5 +1,4 @@
-using Newtonsoft.Json;
-using System;
+using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
@@ -23,13 +22,13 @@ namespace Tango.StubsUtils.Client.CLI
try
{
var _client = new NamedPipeClientStream(PIPE_NAME);
- _client.Connect(5000);
+ _client.Connect(1000);
var writer = new StreamWriter(_client);
- var jsonRequest = String.Join(" ", args);
+ var request = String.Join("^", args);
- writer.WriteLine(jsonRequest);
+ writer.WriteLine(request);
writer.Flush();
var reader = new StreamReader(_client);
@@ -40,7 +39,7 @@ namespace Tango.StubsUtils.Client.CLI
}
catch (Exception ex)
{
- ExitError($"Error communicating with the stubs service. {ex.Message}");
+ ExitError($"Status: Error\nError: Error communicating with the stubs service. {ex.Message}");
}
if (response.Status == StubPackageResponseStatus.OK)
@@ -58,7 +57,7 @@ namespace Tango.StubsUtils.Client.CLI
private static void ExitError(String error)
{
Console.ForegroundColor = ConsoleColor.Red;
- Console.Error.WriteLine($"{error}");
+ Console.WriteLine($"{error}");
Console.ForegroundColor = ConsoleColor.Gray;
Environment.Exit(-1);
}
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Tango.StubsUtils.Client.CLI.csproj b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Tango.StubsUtils.Client.CLI.csproj
index 7bbf4b387..8de8ccb89 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Tango.StubsUtils.Client.CLI.csproj
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/Tango.StubsUtils.Client.CLI.csproj
@@ -33,9 +33,6 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
@@ -51,7 +48,6 @@
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
- <None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Tango.StubsUtils.Shared\Tango.StubsUtils.Shared.csproj">
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/packages.config b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/packages.config
deleted file mode 100644
index 7ee8c1052..000000000
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Client.CLI/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net461" />
-</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Program.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Program.cs
index 3083037f8..b6fde8383 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Program.cs
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Program.cs
@@ -10,10 +10,66 @@ namespace Tango.StubsUtils.PerformanceTest.CLI
{
class Program
{
- private const int ROUNDS = 10000;
+ private const int ROUNDS_SMALL = 100;
+ private const int ROUNDS_BIG = 1000;
+ private const int DELAY = 0;
static void Main(string[] args)
{
+ PerformanceTestStandard();
+ Console.WriteLine();
+ PerformanceTestSession();
+ Console.WriteLine();
+ PerformanceTestProcedure();
+
+ Console.WriteLine();
+ Console.WriteLine();
+ Console.WriteLine("Completed.");
+ Console.ReadLine();
+ }
+
+ private static void PerformanceTestStandard()
+ {
+ List<double> durations = new List<double>();
+
+ Stopwatch watch = new Stopwatch();
+
+ for (int i = 0; i < ROUNDS_SMALL; i++)
+ {
+ watch.Restart();
+
+ Process process = new Process();
+ process.StartInfo.FileName = "tangostub.exe";
+ process.StartInfo.CreateNoWindow = true;
+ process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
+ process.StartInfo.Arguments = "calculate 10 15";
+ process.StartInfo.RedirectStandardOutput = true;
+ process.StartInfo.UseShellExecute = false;
+ process.Start();
+ process.WaitForExit();
+
+ String response = process.StandardOutput.ReadToEnd();
+
+ if (!response.StartsWith("Status: OK"))
+ {
+ OnError(response);
+ return;
+ }
+
+ if (DELAY > 0)
+ {
+ Thread.Sleep(DELAY);
+ }
+
+ durations.Add(watch.ElapsedMilliseconds);
+
+ Console.SetCursorPosition(0, 0);
+ Console.Write($"Performance Test (Standard): {i + 1}/{ROUNDS_SMALL}, Avg: {Math.Round(durations.Average(), 2)} ms ");
+ }
+ }
+
+ private static void PerformanceTestSession()
+ {
List<double> durations = new List<double>();
Process process = new Process();
@@ -21,7 +77,6 @@ namespace Tango.StubsUtils.PerformanceTest.CLI
process.StartInfo.CreateNoWindow = true;
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process.StartInfo.RedirectStandardOutput = true;
- process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardInput = true;
process.StartInfo.UseShellExecute = false;
process.Start();
@@ -31,7 +86,7 @@ namespace Tango.StubsUtils.PerformanceTest.CLI
Stopwatch watch = new Stopwatch();
- for (int i = 0; i < ROUNDS; i++)
+ for (int i = 0; i < ROUNDS_BIG; i++)
{
watch.Restart();
@@ -61,22 +116,83 @@ namespace Tango.StubsUtils.PerformanceTest.CLI
String response = builder.ToString();
- if (response.StartsWith("Status: Error"))
+ if (!response.StartsWith("Status: OK"))
{
OnError(response);
return;
}
+ if (DELAY > 0)
+ {
+ Thread.Sleep(DELAY);
+ }
+
durations.Add(watch.ElapsedMilliseconds);
- Console.SetCursorPosition(0, 0);
- Console.Write($"Performance Test: {i + 1}/{ROUNDS}, Avg: {Math.Round(durations.Average(), 2)} ms ");
+ Console.SetCursorPosition(0, 1);
+ Console.Write($"Performance Test (Session) : {i + 1}/{ROUNDS_BIG}, Avg: {Math.Round(durations.Average(), 2)} ms ");
}
+ }
- Console.WriteLine();
- Console.WriteLine();
- Console.WriteLine("Completed.");
- Console.ReadLine();
+ private static void PerformanceTestProcedure()
+ {
+ List<double> durations = new List<double>();
+
+ Process process = new Process();
+ process.StartInfo.FileName = "tangostub_p.exe";
+ process.StartInfo.Arguments = $"procedure_test.pproj {ROUNDS_BIG} 10 15";
+ process.StartInfo.CreateNoWindow = true;
+ process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
+ process.StartInfo.RedirectStandardOutput = true;
+ process.StartInfo.RedirectStandardInput = true;
+ process.StartInfo.UseShellExecute = false;
+ process.Start();
+ process.PriorityClass = ProcessPriorityClass.RealTime;
+
+ Stopwatch watch = new Stopwatch();
+ Stopwatch realWatch = new Stopwatch();
+ realWatch.Stop();
+
+ int count = 0;
+
+ do
+ {
+ watch.Restart();
+
+ String line = process.StandardOutput.ReadLine();
+
+ if (count == 0)
+ {
+ realWatch.Start();
+ }
+
+ if (line == null)
+ {
+ break;
+ }
+
+ if (line.StartsWith("Status: Error"))
+ {
+ OnError(process.StandardOutput.ReadToEnd());
+ return;
+ }
+ else if (line.StartsWith("Status: Completed"))
+ {
+ break;
+ }
+
+ if (count > 0)
+ {
+ durations.Add(watch.ElapsedMilliseconds);
+ Console.SetCursorPosition(0, 2);
+ Console.Write($"Performance Test (Procedure) : {count + 1}/{ROUNDS_BIG}, Avg: {Math.Round(durations.Average(), 2)} ms ");
+ }
+
+ count++;
+ } while (!process.HasExited);
+
+ Console.SetCursorPosition(0, 2);
+ Console.Write($"Performance Test (Procedure) : {ROUNDS_BIG}/{ROUNDS_BIG}, Avg: {Math.Round(realWatch.ElapsedMilliseconds / (double)ROUNDS_BIG, 2)} ms ");
}
private static void OnError(String error)
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Tango.StubsUtils.PerformanceTest.CLI.csproj b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Tango.StubsUtils.PerformanceTest.CLI.csproj
index f4575043f..3020836d2 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Tango.StubsUtils.PerformanceTest.CLI.csproj
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.PerformanceTest.CLI/Tango.StubsUtils.PerformanceTest.CLI.csproj
@@ -7,7 +7,7 @@
<ProjectGuid>{F423324C-7D0A-4512-BEBA-DF3A931A09F6}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Tango.StubsUtils.PerformanceTest.CLI</RootNamespace>
- <AssemblyName>Tango.StubsUtils.PerformanceTest.CLI</AssemblyName>
+ <AssemblyName>tangostub_perf</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
@@ -18,7 +18,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
+ <OutputPath>..\..\Build\StubsUtils\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -27,7 +27,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
+ <OutputPath>..\..\Build\StubsUtils\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/App.config b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/App.config
new file mode 100644
index 000000000..731f6de6c
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/App.config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <startup>
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
+ </startup>
+</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/Program.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/Program.cs
new file mode 100644
index 000000000..c5b7a030e
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/Program.cs
@@ -0,0 +1,71 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.IO.Pipes;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.StubsUtils.Shared;
+
+namespace Tango.StubsUtils.ProcedureClient.CLI
+{
+ class Program
+ {
+ private const string PIPE_NAME = "Tango_Stubs_Server";
+
+ static void Main(string[] args)
+ {
+ try
+ {
+ Console.ForegroundColor = ConsoleColor.Gray;
+
+ var _client = new NamedPipeClientStream(PIPE_NAME);
+ _client.Connect(1000);
+
+ var writer = new StreamWriter(_client);
+
+ String s = Environment.CommandLine;
+
+ List<String> arguments = args.ToList();
+ arguments.Insert(0, "procedure");
+ var request = String.Join("^", arguments);
+
+ writer.WriteLine(request);
+ writer.Flush();
+
+ var reader = new StreamReader(_client);
+
+ while (true)
+ {
+ String responseString = reader.ReadLine();
+ Console.WriteLine(responseString);
+
+ if (responseString.StartsWith("Status: OK"))
+ {
+ responseString = reader.ReadToEnd();
+ Console.WriteLine(responseString);
+ Environment.Exit(0);
+ }
+ else if (responseString.StartsWith("Status: Error"))
+ {
+ responseString = reader.ReadToEnd();
+ Console.WriteLine(responseString);
+ ExitError(responseString);
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ ExitError($"Status: Error\nError: Error communicating with the stubs service. {ex.Message}");
+ }
+ }
+
+ private static void ExitError(String error)
+ {
+ Console.ForegroundColor = ConsoleColor.Red;
+ Console.WriteLine($"{error}");
+ Console.ForegroundColor = ConsoleColor.Gray;
+ Environment.Exit(-1);
+ }
+ }
+}
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..82bf9f837
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Tango.StubsUtils.ProcedureClient.CLI")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Tango.StubsUtils.ProcedureClient.CLI")]
+[assembly: AssemblyCopyright("Copyright © 2020")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("8f0bcfc8-af0f-40d3-882a-902cd221a6de")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/Tango.StubsUtils.ProcedureClient.CLI.csproj b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/Tango.StubsUtils.ProcedureClient.CLI.csproj
new file mode 100644
index 000000000..606fcfcfe
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/Tango.StubsUtils.ProcedureClient.CLI.csproj
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>Tango.StubsUtils.ProcedureClient.CLI</RootNamespace>
+ <AssemblyName>tangostub_p</AssemblyName>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+ <Deterministic>true</Deterministic>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\Build\StubsUtils\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\Build\StubsUtils\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="App.config" />
+ <None Include="procedure_test.pproj">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Tango.StubsUtils.Shared\Tango.StubsUtils.Shared.csproj">
+ <Project>{dae96f06-72cd-411d-90a3-9456ae79f699}</Project>
+ <Name>Tango.StubsUtils.Shared</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/procedure_test.pproj b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/procedure_test.pproj
new file mode 100644
index 000000000..2ed7a56d3
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.ProcedureClient.CLI/procedure_test.pproj
@@ -0,0 +1 @@
+{"$id":"1","Name":"procedure_test","Visibility":"Public","Description":null,"Scripts":{"$id":"2","$values":[{"$id":"3","Code":"using System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing System.Drawing;\r\nusing Google.Protobuf;\r\nusing Tango.BL.Entities;\r\nusing Tango.BL.Enumerations;\r\nusing Tango.PMR.Stubs;\r\nusing Tango.PMR.Diagnostics;\r\nusing Tango.FSE.Common.Connection;\r\nusing Tango.FSE.Common.Diagnostics;\r\nusing Tango.FSE.Procedures;\r\n\r\npublic class Program\r\n{\r\n public const String Iterations = \"1\";\r\n public const String Num1 = \"1\";\r\n public const String Num2 = \"2\";\r\n\r\n public void OnExecute(IProcedureContext context)\r\n {\r\n int rounds = int.Parse(Iterations);\r\n\r\n for (int i = 0; i < rounds; i++)\r\n {\r\n CalculateRequest request = new CalculateRequest();\r\n request.A = double.Parse(Num1);\r\n request.B = double.Parse(Num2);\r\n CalculateResponse response = context.Send<CalculateResponse>(request);\r\n context.WriteLine(\"Sum: \" + response.Sum);\r\n }\r\n }\r\n}","Name":"Program.csx","IsEntryPoint":true},{"$id":"4","Code":"using System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing System.Drawing;\r\nusing Google.Protobuf;\r\nusing Tango.BL.Entities;\r\nusing Tango.BL.Enumerations;\r\nusing Tango.PMR.Stubs;\r\nusing Tango.PMR.Diagnostics;\r\nusing Tango.FSE.Common.Connection;\r\nusing Tango.FSE.Common.Diagnostics;\r\nusing Tango.FSE.Procedures;\r\n\r\npublic class Service\r\n{\r\n public double Calc(double a, double b)\r\n {\r\n return a + b;\r\n }\r\n}","Name":"Service.csx","IsEntryPoint":false}]},"Inputs":{"$id":"5","$values":[]},"Variables":{"$id":"6","$values":[]},"ReferenceAssemblies":{"$id":"7","$values":[{"$id":"8","File":"C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\mscorlib.dll","HintType":"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"},{"$id":"9","File":"C:\\WINDOWS\\Microsoft.Net\\assembly\\GAC_MSIL\\System.Core\\v4.0_4.0.0.0__b77a5c561934e089\\System.Core.dll","HintType":"System.Linq.Enumerable, System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"},{"$id":"10","File":"C:\\WINDOWS\\Microsoft.Net\\assembly\\GAC_MSIL\\System.Windows.Forms\\v4.0_4.0.0.0__b77a5c561934e089\\System.Windows.Forms.dll","HintType":"System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"},{"$id":"11","File":"C:\\DATA\\Development\\Tango\\Software\\Visual_Studio\\Build\\FSE\\Debug\\Tango.FSE.Procedures.dll","HintType":"Tango.FSE.Procedures.ProcedureProject, Tango.FSE.Procedures, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"},{"$id":"12","File":"C:\\DATA\\Development\\Tango\\Software\\Visual_Studio\\Build\\FSE\\Debug\\Tango.FSE.Common.dll","HintType":"Tango.FSE.Common.Diagnostics.IDiagnosticsProvider, Tango.FSE.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"},{"$id":"13","File":"C:\\DATA\\Development\\Tango\\Software\\Visual_Studio\\Build\\FSE\\Debug\\Tango.BL.dll","HintType":"Tango.BL.Enumerations.TechMonitors, Tango.BL, Version=2.0.36.1608, Culture=neutral, PublicKeyToken=null"},{"$id":"14","File":"C:\\DATA\\Development\\Tango\\Software\\Visual_Studio\\Build\\FSE\\Debug\\Tango.PMR.dll","HintType":"Tango.PMR.Common.MessageType, Tango.PMR, Version=2.0.40.1608, Culture=neutral, PublicKeyToken=null"},{"$id":"15","File":"C:\\DATA\\Development\\Tango\\Software\\Visual_Studio\\Build\\FSE\\Debug\\Tango.Transport.dll","HintType":"Tango.Transport.ITransporter, Tango.Transport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"},{"$id":"16","File":"C:\\DATA\\Development\\Tango\\Software\\Visual_Studio\\Build\\FSE\\Debug\\Tango.Integration.dll","HintType":"Tango.Integration.Operation.IMachineOperator, Tango.Integration, Version=2.0.31.1608, Culture=neutral, PublicKeyToken=null"},{"$id":"17","File":"C:\\DATA\\Development\\Tango\\Software\\Visual_Studio\\Build\\FSE\\Debug\\Google.Protobuf.dll","HintType":"Google.Protobuf.IMessage, Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604"},{"$id":"18","File":"C:\\WINDOWS\\Microsoft.Net\\assembly\\GAC_MSIL\\System.Drawing\\v4.0_4.0.0.0__b03f5f7f11d50a3a\\System.Drawing.dll","HintType":"System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"},{"$id":"19","File":"C:\\DATA\\Development\\Tango\\Software\\Visual_Studio\\Build\\FSE\\Debug\\Tango.DataStore.dll","HintType":"Tango.DataStore.IDataStoreItem, Tango.DataStore, Version=2.0.4.1608, Culture=neutral, PublicKeyToken=null"}]},"Resources":{"$id":"20","$values":[]},"Dialogs":{"$id":"21","$values":[]},"ID":"44a4b6b3-647d-4ffd-9144-b44f871bffe2","ApartmentState":"STA"} \ No newline at end of file
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.config b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.config
index 6544d52a6..e49ea898a 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.config
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.config
@@ -4,19 +4,9 @@
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<runtime>
- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-5.0.5.0" newVersion="5.0.5.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
- </dependentAssembly>
- </assemblyBinding>
+ <legacyCorruptedStateExceptionsPolicy enabled="true" />
+ <legacyUnhandledExceptionPolicy enabled="1" />
+
+
</runtime>
</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.xaml b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.xaml
index 4db18888a..4b1b7cc93 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.xaml
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.xaml
@@ -62,6 +62,7 @@
<ResourceDictionary Source="/Resources/Converters.xaml" />
<ResourceDictionary Source="/Resources/Colors.xaml" />
<ResourceDictionary Source="/Resources/Fonts.xaml" />
+ <ResourceDictionary Source="/Resources/Styles.xaml" />
<ResourceDictionary>
<!--OVERRIDE MAHAPPS-->
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.xaml.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.xaml.cs
index c6f57aad6..d223c6067 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.xaml.cs
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/App.xaml.cs
@@ -1,10 +1,15 @@
-using System;
+using Notifications.Wpf;
+using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
+using System.Globalization;
using System.Linq;
+using System.Threading;
using System.Threading.Tasks;
using System.Windows;
+using System.Windows.Markup;
+using Tango.Logging;
using Tango.Settings;
namespace Tango.StubsUtils.Service.UI
@@ -14,12 +19,91 @@ namespace Tango.StubsUtils.Service.UI
/// </summary>
public partial class App : Application
{
+ private static Mutex mutex = new Mutex(true, "{8F6F0AC4-B9A1-45fd-A8CF-72F0STUBSUTI}");
+
+ private WpfGlobalExceptionTrapper exceptionTrapper;
+ private LogManager LogManager = LogManager.Default;
+ private HashSet<String> _ignoredGlobalExceptions;
+
+ public App() : base()
+ {
+ _ignoredGlobalExceptions = new HashSet<string>();
+ }
+
protected override void OnStartup(StartupEventArgs e)
{
+ if (mutex.WaitOne(TimeSpan.Zero, true))
+ {
+ //This is the first instance. Do nothing...
+ mutex.ReleaseMutex();
+ }
+ else
+ {
+ MessageBox.Show("Tango Stubs Service is already running.");
+ Environment.Exit(0);
+ }
+
+ //Set culture info.
+ var enUSCulture = new CultureInfo("en-US");
+
+ Thread.CurrentThread.CurrentCulture = enUSCulture;
+ Thread.CurrentThread.CurrentUICulture = enUSCulture;
+ CultureInfo.DefaultThreadCurrentCulture = enUSCulture;
+ CultureInfo.DefaultThreadCurrentUICulture = enUSCulture;
+
+ FrameworkElement.LanguageProperty.OverrideMetadata(
+ typeof(FrameworkElement),
+ new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));
+
base.OnStartup(e);
+ exceptionTrapper = new WpfGlobalExceptionTrapper();
+ exceptionTrapper.Initialize(this);
+ exceptionTrapper.ApplicationCrashed += ExceptionTrapper_ApplicationCrashed;
+
ServiceUISettings settings = SettingsManager.Default.GetOrCreate<ServiceUISettings>();
settings.Save();
}
+
+ private void ExceptionTrapper_ApplicationCrashed(object sender, ApplicationCrashedEventArgs e)
+ {
+ e.TryRecover = true;
+
+ List<String> ignoredExceptions = new List<string>()
+ {
+ "FocusVisualStyle",
+ "ThreadAbortException",
+ "A Task's exception(s) were not observed",
+ "The calling thread must be STA, because many UI components require this."
+ };
+
+ String exceptionString = e.Exception.ToStringSafe();
+
+ if (ignoredExceptions.Exists(x => exceptionString.Contains(x)))
+ {
+ return;
+ }
+
+ LogManager.Log(e.Exception, LogCategory.Critical, "Unexpected Application Error.");
+
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ try
+ {
+ LogManager.Log("Trying to notify the user about the crash...");
+ NotificationManager notification = new NotificationManager();
+ notification.Show(new NotificationContent()
+ {
+ Title = "Tango Stubs Service",
+ Message = $"Unexpected Application Error",
+ Type = NotificationType.Error
+ });
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error using the notification provider for notifying about application crash.");
+ }
+ });
+ }
}
}
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Controls/ScrollableFlowDocumentScrollViewer.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Controls/ScrollableFlowDocumentScrollViewer.cs
new file mode 100644
index 000000000..5fa00a4ac
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Controls/ScrollableFlowDocumentScrollViewer.cs
@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Media;
+
+namespace Tango.StubsUtils.Service.UI.Controls
+{
+ public class ScrollableFlowDocumentScrollViewer : FlowDocumentScrollViewer
+ {
+ /// <summary>
+ /// Backing store for the <see cref="ScrollViewer"/> property.
+ /// </summary>
+ private ScrollViewer scrollViewer;
+
+ /// <summary>
+ /// Gets the scroll viewer contained within the FlowDocumentScrollViewer control
+ /// </summary>
+ public ScrollViewer ScrollViewer
+ {
+ get
+ {
+ if (this.scrollViewer == null)
+ {
+ DependencyObject obj = this;
+
+ do
+ {
+ if (VisualTreeHelper.GetChildrenCount(obj) > 0)
+ obj = VisualTreeHelper.GetChild(obj as Visual, 0);
+ else
+ return null;
+ }
+ while (!(obj is ScrollViewer));
+
+ this.scrollViewer = obj as ScrollViewer;
+ }
+
+ return this.scrollViewer;
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_none.ico b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_none.ico
new file mode 100644
index 000000000..20d7bea5e
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_none.ico
Binary files differ
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_none.png b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_none.png
index 95cf615c5..c2ee1e072 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_none.png
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Images/machine_icon_none.png
Binary files differ
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/MainWindow.xaml b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/MainWindow.xaml
index f7113076c..4fab80302 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/MainWindow.xaml
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/MainWindow.xaml
@@ -8,7 +8,7 @@
xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:views="clr-namespace:Tango.StubsUtils.Service.UI.Views"
mc:Ignorable="d"
- Title="Tango - Stubs Service" Height="400" Width="700" EnableDWMDropShadow="True" WindowTitleBrush="{StaticResource FSE_PrimaryBackgroundLightBrush}" BorderBrush="{StaticResource FSE_PrimaryBackgroundLightBrush}" OverrideDefaultWindowCommandsBrush="{StaticResource FSE_PrimaryForegroundBrush}" TitleForeground="{StaticResource FSE_PrimaryForegroundBrush}" TitleCaps="False" BorderThickness="1" WindowStartupLocation="CenterScreen" Background="{StaticResource FSE_PrimaryBackgroundBrush}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}" DataContext="{Binding RelativeSource={RelativeSource Self}}" Visibility="Hidden">
+ Title="Tango Stubs Service" Height="400" Width="700" EnableDWMDropShadow="True" WindowTitleBrush="{StaticResource FSE_PrimaryBackgroundLightBrush}" BorderBrush="{StaticResource FSE_PrimaryBackgroundLightBrush}" OverrideDefaultWindowCommandsBrush="{StaticResource FSE_PrimaryForegroundBrush}" TitleForeground="{StaticResource FSE_PrimaryForegroundBrush}" TitleCaps="False" BorderThickness="1" WindowStartupLocation="CenterScreen" Background="{StaticResource FSE_PrimaryBackgroundBrush}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}" DataContext="{Binding RelativeSource={RelativeSource Self}}" Visibility="Hidden">
<Grid>
<views:MainView x:Name="MainView" />
</Grid>
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Resources/Styles.xaml b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Resources/Styles.xaml
new file mode 100644
index 000000000..2698c7bc7
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Resources/Styles.xaml
@@ -0,0 +1,26 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:local="clr-namespace:Tango.StubsUtils.Service.UI.Resources">
+
+ <Style x:Key="FSE_RaisedButton_Dark_Hover" TargetType="Button" BasedOn="{StaticResource MaterialDesignRaisedLightButton}">
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
+ <Setter Property="Height" Value="Auto"></Setter>
+ <Style.Triggers>
+ <Trigger Property="IsMouseOver" Value="True">
+ <Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundLighterBrush}"></Setter>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+
+ <Style x:Key="FSE_FlatButton_OpacityHover" TargetType="Button" BasedOn="{StaticResource MaterialDesignToolForegroundButton}">
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource FSE_PrimaryAccentBrush}"></Setter>
+ <Style.Triggers>
+ <Trigger Property="IsMouseOver" Value="True">
+ <Setter Property="Opacity" Value="0.6"></Setter>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+
+</ResourceDictionary> \ No newline at end of file
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/ServiceUISettings.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/ServiceUISettings.cs
index 92f7157ca..5e4d8209d 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/ServiceUISettings.cs
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/ServiceUISettings.cs
@@ -9,5 +9,12 @@ namespace Tango.StubsUtils.Service.UI
{
public class ServiceUISettings : SettingsBase
{
+ public String USBPort { get; set; }
+ public bool AutoConnect { get; set; }
+
+ public ServiceUISettings()
+ {
+ USBPort = "COM1";
+ }
}
}
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Tango.StubsUtils.Service.UI.csproj b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Tango.StubsUtils.Service.UI.csproj
index c4cdbab42..abf378e14 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Tango.StubsUtils.Service.UI.csproj
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Tango.StubsUtils.Service.UI.csproj
@@ -36,6 +36,9 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+ <PropertyGroup>
+ <ApplicationIcon>Images\machine_icon_none.ico</ApplicationIcon>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="ControlzEx, Version=3.0.2.4, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll</HintPath>
@@ -56,7 +59,40 @@
<HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
+ <Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\Tango.StubsUtils.Service\Reference Assemblies\System.Collections.Immutable.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Composition.AttributedModel, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\Tango.StubsUtils.Service\Reference Assemblies\System.Composition.AttributedModel.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Composition.Hosting, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\Tango.StubsUtils.Service\Reference Assemblies\System.Composition.Hosting.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Composition.Runtime, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\Tango.StubsUtils.Service\Reference Assemblies\System.Composition.Runtime.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Composition.TypedParts, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\Tango.StubsUtils.Service\Reference Assemblies\System.Composition.TypedParts.dll</HintPath>
+ </Reference>
<Reference Include="System.Data" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Reflection.Metadata, Version=1.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\Tango.StubsUtils.Service\Reference Assemblies\System.Reflection.Metadata.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Text.Encoding.CodePages, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\Tango.StubsUtils.Service\Reference Assemblies\System.Text.Encoding.CodePages.dll</HintPath>
+ </Reference>
+ <Reference Include="System.ValueTuple, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\Tango.StubsUtils.Service\Reference Assemblies\System.ValueTuple.dll</HintPath>
+ </Reference>
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\ControlzEx.3.0.2.4\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
@@ -78,6 +114,7 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
+ <Compile Include="Controls\ScrollableFlowDocumentScrollViewer.cs" />
<Compile Include="ServiceUISettings.cs" />
<Compile Include="ViewModels\MainViewVM.cs" />
<Compile Include="Views\MainView.xaml.cs">
@@ -107,6 +144,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
+ <Page Include="Resources\Styles.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Views\MainView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -135,6 +176,7 @@
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
+ <None Include="rename_installer.bat" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
@@ -156,6 +198,10 @@
<Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project>
<Name>Tango.SharedUI</Name>
</ProjectReference>
+ <ProjectReference Include="..\Notifications.Wpf\Notifications.Wpf.csproj">
+ <Project>{5c9a4f46-263d-4c23-b361-f09e14bb109e}</Project>
+ <Name>Notifications.Wpf</Name>
+ </ProjectReference>
<ProjectReference Include="..\Tango.StubsUtils.Service\Tango.StubsUtils.Service.csproj">
<Project>{452df7f4-bfbf-45b1-9a27-d6b1888ac10b}</Project>
<Name>Tango.StubsUtils.Service</Name>
@@ -165,13 +211,16 @@
<Resource Include="Images\machine_icon_connected.ico" />
</ItemGroup>
<ItemGroup>
- <Resource Include="Images\machine_icon_none.png" />
- </ItemGroup>
- <ItemGroup>
<Resource Include="Images\machine_icon_connected.png" />
<Resource Include="Images\machine_icon_disconnected.ico" />
<Resource Include="Images\machine_icon_disconnected.png" />
</ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\machine_icon_none.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\machine_icon_none.png" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets" Condition="Exists('..\..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
@@ -180,4 +229,56 @@
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets'))" />
</Target>
+ <PropertyGroup>
+ <PostBuildEvent>RD /S /Q "$(TargetDir)cs\"
+RD /S /Q "$(TargetDir)da\"
+RD /S /Q "$(TargetDir)de\"
+RD /S /Q "$(TargetDir)es\"
+RD /S /Q "$(TargetDir)fa\"
+RD /S /Q "$(TargetDir)fi\"
+RD /S /Q "$(TargetDir)fr\"
+RD /S /Q "$(TargetDir)it\"
+RD /S /Q "$(TargetDir)ko\"
+RD /S /Q "$(TargetDir)mk\"
+RD /S /Q "$(TargetDir)nl\"
+RD /S /Q "$(TargetDir)pl\"
+RD /S /Q "$(TargetDir)pt\"
+RD /S /Q "$(TargetDir)ru\"
+RD /S /Q "$(TargetDir)sv\"
+RD /S /Q "$(TargetDir)tr\"
+RD /S /Q "$(TargetDir)zh-CN\"
+RD /S /Q "$(TargetDir)af\"
+RD /S /Q "$(TargetDir)ar\"
+RD /S /Q "$(TargetDir)dn-BD\"
+RD /S /Q "$(TargetDir)el\"
+RD /S /Q "$(TargetDir)fi-FI\"
+RD /S /Q "$(TargetDir)fr-BE\"
+RD /S /Q "$(TargetDir)he\"
+RD /S /Q "$(TargetDir)hr\"
+RD /S /Q "$(TargetDir)hu\"
+RD /S /Q "$(TargetDir)id\"
+RD /S /Q "$(TargetDir)ja\"
+RD /S /Q "$(TargetDir)lv\"
+RD /S /Q "$(TargetDir)nb\"
+RD /S /Q "$(TargetDir)ro\"
+RD /S /Q "$(TargetDir)sk\"
+RD /S /Q "$(TargetDir)sl\"
+RD /S /Q "$(TargetDir)sr\"
+RD /S /Q "$(TargetDir)sr-Latn\"
+RD /S /Q "$(TargetDir)uk\"
+RD /S /Q "$(TargetDir)uz-Cyrl-UZ\"
+RD /S /Q "$(TargetDir)uz-Latn-UZ\"
+RD /S /Q "$(TargetDir)vi\"
+RD /S /Q "$(TargetDir)zh-Hans\"
+RD /S /Q "$(TargetDir)zh-Hant\"
+RD /S /Q "$(TargetDir)bg\"
+RD /S /Q "$(TargetDir)bn-BD\"
+RD /S /Q "$(TargetDir)nb-NO\"
+RD /S /Q "$(TargetDir)pt-BR\"
+RD /S /Q "$(TargetDir)ProtoCompilers\"
+
+if $(ConfigurationName) == Release attrib +r Tango*
+if $(ConfigurationName) == Release del *.xml
+if $(ConfigurationName) == Release attrib -r Tango*</PostBuildEvent>
+ </PropertyGroup>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/ViewModels/MainViewVM.cs
index 4e8b144e5..091bb6bf3 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/ViewModels/MainViewVM.cs
@@ -1,17 +1,39 @@
-using System;
+using Notifications.Wpf;
+using System;
using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO.Ports;
using System.Linq;
using System.Text;
+using System.Threading;
using System.Threading.Tasks;
using System.Windows;
+using System.Windows.Documents;
+using System.Windows.Input;
+using Tango.Core;
using Tango.Core.Commands;
+using Tango.Logging;
+using Tango.Settings;
using Tango.SharedUI;
+using Tango.SharedUI.Components;
using Tango.SharedUI.Helpers;
+using Tango.StubsUtils.Service.UI.Views;
namespace Tango.StubsUtils.Service.UI.ViewModels
{
public class MainViewVM : ViewModel
{
+ private ProducerConsumerQueue<String> _logsQueue;
+ private Thread _logsThread;
+ private NotificationManager _notification;
+
+ private ServiceUISettings _settings;
+ public ServiceUISettings Settings
+ {
+ get { return _settings; }
+ set { _settings = value; RaisePropertyChangedAuto(); }
+ }
+
private StubsService _service;
public StubsService Service
{
@@ -26,25 +48,166 @@ namespace Tango.StubsUtils.Service.UI.ViewModels
set { _isTrayIconVisible = value; RaisePropertyChangedAuto(); }
}
+ private List<String> _availablePorts;
+ public List<String> AvailablePorts
+ {
+ get { return _availablePorts; }
+ set { _availablePorts = value; RaisePropertyChangedAuto(); }
+ }
+
+ private String _selectedPort;
+ public String SelectedPort
+ {
+ get { return _selectedPort; }
+ set { _selectedPort = value; RaisePropertyChangedAuto(); }
+ }
+
+ private SimpleStringLogger _logger;
+ public SimpleStringLogger Logger
+ {
+ get { return _logger; }
+ set { _logger = value; RaisePropertyChangedAuto(); }
+ }
public RelayCommand ExitCommand { get; set; }
public RelayCommand OpenCommand { get; set; }
+ public RelayCommand RefreshPortsCommand { get; set; }
+ public RelayCommand ToggleConnectionCommand { get; set; }
+ public RelayCommand ClearLogCommand { get; set; }
+ public RelayCommand StartPerformanceTesterCommand { get; set; }
public MainViewVM()
{
- Init();
ExitCommand = new RelayCommand(ExitApplication);
OpenCommand = new RelayCommand(OpenMainWindow);
IsTrayIconVisible = true;
+ AvailablePorts = new List<string>();
+ RefreshPortsCommand = new RelayCommand(RefreshPorts);
+ ToggleConnectionCommand = new RelayCommand(ToggleConnection);
+ StartPerformanceTesterCommand = new RelayCommand(StartPerformanceTester);
+ ClearLogCommand = new RelayCommand(ClearLog);
+ _logsQueue = new ProducerConsumerQueue<string>();
+
+ _logsThread = new Thread(LogsThreadMethod);
+ _logsThread.IsBackground = true;
+ _logsThread.Start();
+
+ _notification = new NotificationManager();
+
+ Init();
}
public async void Init()
{
- Service = new StubsService();
- await Service.Start();
+ try
+ {
+ Logger = new SimpleStringLogger() { Enabled = true };
+ Logger.LogReceived += Logger_LogReceived;
+
+ LogManager.RegisterLogger(Logger);
+
+ LogManager.Log("Initializing...");
+ Settings = SettingsManager.Default.GetOrCreate<ServiceUISettings>();
+ SelectedPort = Settings.USBPort;
+
+ RefreshPorts();
+
+ Service = new StubsService();
+ Service.CommunicationFailed += Service_CommunicationFailed;
+ await Service.Start();
+
+ _notification.Show(new NotificationContent()
+ {
+ Title = "Tango Stubs Service",
+ Message = $"Service Started",
+ Type = NotificationType.Success
+ });
+
+ if (Settings.AutoConnect)
+ {
+ await Task.Delay(2000);
+ ToggleConnection();
+ }
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error initializing service.");
- await Task.Delay(10000);
- await Service.Connect();
+ _notification.Show(new NotificationContent()
+ {
+ Title = "Tango Stubs Service",
+ Message = $"Initialization Error",
+ Type = NotificationType.Error
+ });
+ }
+ }
+
+ private void Service_CommunicationFailed(object sender, EventArgs e)
+ {
+ if (IsTrayIconVisible)
+ {
+ InvokeUI(() =>
+ {
+ _notification.Show(new NotificationContent()
+ {
+ Title = "Tango Stubs Service",
+ Message = $"Communication Error",
+ Type = NotificationType.Error
+ });
+ });
+ }
+ }
+
+ private void Logger_LogReceived(object sender, LogItemBase e)
+ {
+ String message = e.TimeStamp.ToString("HH:mm:ss.ff") + ": " + e.Message;
+ _logsQueue.BlockEnqueue(message);
+ }
+
+ private void LogsThreadMethod()
+ {
+ while (true)
+ {
+ List<String> logs = new List<string>();
+
+ logs.Add(_logsQueue.BlockDequeue());
+
+ while (_logsQueue.Count > 0)
+ {
+ logs.Add(_logsQueue.BlockDequeue());
+ }
+
+ InvokeUINow(() =>
+ {
+ List<Inline> inlines = new List<Inline>();
+
+ foreach (var log in logs)
+ {
+ inlines.Add(new Run(log));
+ inlines.Add(new LineBreak());
+ }
+
+ MainView.Instance.paragraphLog.Inlines.AddRange(inlines);
+
+ if (Mouse.LeftButton != MouseButtonState.Pressed)
+ {
+ MainView.Instance.scrollViewerLogs.ScrollViewer?.ScrollToEnd();
+ }
+ });
+
+ Thread.Sleep(200);
+ }
+ }
+
+ private void ClearLog()
+ {
+ InvokeUI(() =>
+ {
+ IsFree = false;
+ UIHelper.DoEvents();
+ MainView.Instance.paragraphLog.Inlines.Clear();
+ IsFree = true;
+ });
}
private async void OpenMainWindow()
@@ -59,10 +222,91 @@ namespace Tango.StubsUtils.Service.UI.ViewModels
public async void ExitApplication()
{
+ IsFree = false;
+ SaveSettings();
IsTrayIconVisible = false;
UIHelper.DoEvents();
await Task.Delay(1000);
Environment.Exit(0);
}
+
+ private void RefreshPorts()
+ {
+ AvailablePorts = SerialPort.GetPortNames().ToList();
+
+ if (SelectedPort == null)
+ {
+ SelectedPort = AvailablePorts.FirstOrDefault();
+ }
+
+ InvalidateRelayCommands();
+ }
+
+ private async void ToggleConnection()
+ {
+ try
+ {
+ IsFree = false;
+
+ if (!Service.IsConnected)
+ {
+ try
+ {
+ await Service.Connect(SelectedPort);
+ SaveSettings();
+
+ if (IsTrayIconVisible)
+ {
+ _notification.Show(new NotificationContent()
+ {
+ Title = "Tango Stubs Service",
+ Message = $"Connected ({SelectedPort})",
+ Type = NotificationType.Success
+ });
+ }
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error connecting to the specified serial port.");
+
+ if (IsTrayIconVisible)
+ {
+ _notification.Show(new NotificationContent()
+ {
+ Title = "Tango Stubs Service",
+ Message = $"Connection Error ({SelectedPort})",
+ Type = NotificationType.Error
+ });
+ }
+ }
+ }
+ else
+ {
+ try
+ {
+ await Service.Disconnect();
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error disconnecting from the specified serial port.");
+ }
+ }
+ }
+ finally
+ {
+ IsFree = true;
+ }
+ }
+
+ private void SaveSettings()
+ {
+ Settings.USBPort = SelectedPort;
+ Settings.Save();
+ }
+
+ private void StartPerformanceTester()
+ {
+ Process.Start("tangostub_perf.exe");
+ }
}
}
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Views/MainView.xaml b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Views/MainView.xaml
index eb2c24e44..5c2d119cc 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Views/MainView.xaml
@@ -5,10 +5,11 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:controls="clr-namespace:Tango.StubsUtils.Service.UI.Controls"
xmlns:local="clr-namespace:Tango.StubsUtils.Service.UI.Views"
xmlns:vm="clr-namespace:Tango.StubsUtils.Service.UI.ViewModels"
mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800" Background="{StaticResource FSE_PrimaryBackgroundBrush}" d:DataContext="{d:DesignInstance Type=vm:MainViewVM,IsDesignTimeCreatable=False}">
+ d:DesignHeight="400" d:DesignWidth="700" Background="{StaticResource FSE_PrimaryBackgroundBrush}" d:DataContext="{d:DesignInstance Type=vm:MainViewVM,IsDesignTimeCreatable=False}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}">
<UserControl.Resources>
<RadialGradientBrush x:Key="FSE_LED_GrayBrush">
@@ -25,11 +26,125 @@
</RadialGradientBrush>
</UserControl.Resources>
- <Grid>
+ <Grid IsEnabled="{Binding IsFree}" Background="Transparent">
+ <Grid.Style>
+ <Style TargetType="Grid">
+ <Setter Property="Cursor" Value="Arrow"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsFree}" Value="False">
+ <Setter Property="Cursor" Value="Wait"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Grid.Style>
+
+ <Grid Margin="10">
+ <DockPanel>
+ <DockPanel DockPanel.Dock="Top">
+ <Image VerticalAlignment="Top" Source="/Images/machine_icon_none.png" Stretch="None" />
+
+ <StackPanel Margin="10 0 0 0" VerticalAlignment="Top">
+ <TextBlock FontSize="{StaticResource FSE_LargeFontSize}">Tango Stubs Service</TextBlock>
+ <DockPanel Margin="0 5 0 0">
+ <Ellipse Width="12" Height="12" Stroke="#353535">
+ <Ellipse.Style>
+ <Style TargetType="Ellipse">
+ <Setter Property="Fill" Value="{StaticResource FSE_LED_RedBrush}"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Service.IsConnected}" Value="True">
+ <Setter Property="Fill" Value="{StaticResource FSE_LED_GreenBrush}"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Ellipse.Style>
+ </Ellipse>
+ <TextBlock Margin="5 0 0 0" FontWeight="SemiBold">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="Text" Value="Disconnected"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource FSE_RedBrush}"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Service.IsConnected}" Value="True">
+ <Setter Property="Text" Value="Connected"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource FSE_GreenBrush}"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ </TextBlock>
+ </DockPanel>
+ </StackPanel>
+ </DockPanel>
+
+ <Grid Margin="0 20 0 0">
+ <DockPanel>
+
+ <Grid DockPanel.Dock="Top">
+ <Border Padding="0 20">
+ <DockPanel>
+ <Button Command="{Binding ToggleConnectionCommand}" Width="150" DockPanel.Dock="Right" Padding="8">
+ <Button.Style>
+ <Style TargetType="Button" BasedOn="{StaticResource FSE_RaisedButton_Dark_Hover}">
+ <Setter Property="Content" Value="CONNECT"/>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Service.IsConnected}" Value="True">
+ <Setter Property="Content" Value="DISCONNECT"/>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Button.Style>
+ </Button>
+ <ComboBox DockPanel.Dock="Left" Margin="0 0 20 0" ItemsSource="{Binding AvailablePorts}" SelectedItem="{Binding SelectedPort}" IsEnabled="{Binding Service.IsConnected,Converter={StaticResource BooleanInverseConverter}}" Text="{Binding SelectedPort}"></ComboBox>
+ </DockPanel>
+ </Border>
+ </Grid>
+
+ <StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom" Margin="2 5 0 0">
+ <CheckBox IsChecked="{Binding Service.EnableLogs}">
+ <TextBlock Margin="0 -3 0 0">
+ Enable Communication Logs
+ </TextBlock>
+ </CheckBox>
+
+ <CheckBox Margin="10 0 0 0" IsChecked="{Binding Settings.AutoConnect}">
+ <TextBlock Margin="0 -3 0 0">
+ Auto Connect on Startup
+ </TextBlock>
+ </CheckBox>
+
+ <Button Margin="20 -1 0 0" IsEnabled="{Binding Service.IsConnected}" Command="{Binding StartPerformanceTesterCommand}" Height="Auto" Style="{StaticResource FSE_FlatButton_OpacityHover}" FontSize="{StaticResource FSE_SmallFontSize}">Start Performance Tester</Button>
+ </StackPanel>
+
+ <DockPanel Margin="0 10 0 0" >
+ <Border DockPanel.Dock="Top" Padding="4" Background="{StaticResource FSE_PrimaryBackgroundLightBrush}" CornerRadius="5 5 0 0">
+ <DockPanel>
+ <Button Style="{StaticResource FSE_RaisedButton_Dark_Hover}" DockPanel.Dock="Right" Command="{Binding ClearLogCommand}" ToolTip="Clear log" Padding="1">
+ <material:PackIcon Kind="BinEmpty" />
+ </Button>
+ <TextBlock FontWeight="SemiBold" VerticalAlignment="Center">LOG</TextBlock>
+ </DockPanel>
+ </Border>
+ <Border Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}" CornerRadius="0 0 5 5" BorderThickness="1" BorderBrush="{StaticResource FSE_PrimaryBackgroundLightBrush}" Padding="3">
+ <!--<TextBox x:Name="txtLogs" Foreground="{StaticResource FSE_GrayBrush}" Style="{x:Null}" BorderThickness="0" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" AcceptsReturn="True" IsReadOnly="True" Background="Transparent" FontSize="{StaticResource FSE_SmallFontSize}" Padding="5" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"></TextBox>-->
+ <controls:ScrollableFlowDocumentScrollViewer x:Name="scrollViewerLogs" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Padding="5">
+ <FlowDocument x:Name="documentLogs" FontFamily="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=FontFamily}" FontSize="{StaticResource FSE_SmallFontSize}" Foreground="{StaticResource FSE_GrayBrush}" PagePadding="0">
+ <Paragraph x:Name="paragraphLog">
+
+ </Paragraph>
+ </FlowDocument>
+ </controls:ScrollableFlowDocumentScrollViewer>
+ </Border>
+ </DockPanel>
+ </DockPanel>
+ </Grid>
+ </DockPanel>
+ </Grid>
+
<tb:TaskbarIcon x:Name="taskIcon" x:FieldModifier="public"
Visibility="{Binding IsTrayIconVisible,Converter={StaticResource BooleanToVisibilityConverter}}"
ToolTipText="Tango Stubs Service"
MenuActivation="RightClick"
+ DoubleClickCommand="{Binding OpenCommand}"
PopupActivation="DoubleClick">
<tb:TaskbarIcon.Style>
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Views/MainView.xaml.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Views/MainView.xaml.cs
index 1c51be6d4..a0dab9f79 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Views/MainView.xaml.cs
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/Views/MainView.xaml.cs
@@ -21,10 +21,13 @@ namespace Tango.StubsUtils.Service.UI.Views
/// </summary>
public partial class MainView : UserControl
{
+ public static MainView Instance { get; set; }
+
public MainView()
{
InitializeComponent();
DataContext = new MainViewVM();
+ Instance = this;
}
}
}
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/rename_installer.bat b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/rename_installer.bat
new file mode 100644
index 000000000..6488f9cf8
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service.UI/rename_installer.bat
@@ -0,0 +1 @@
+ren *.0.0.exe ????????????????????.?.exe \ No newline at end of file
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Collections.Immutable.dll b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Collections.Immutable.dll
new file mode 100644
index 000000000..ce6fc0e8d
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Collections.Immutable.dll
Binary files differ
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Composition.AttributedModel.dll b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Composition.AttributedModel.dll
new file mode 100644
index 000000000..4acc216e1
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Composition.AttributedModel.dll
Binary files differ
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Composition.Hosting.dll b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Composition.Hosting.dll
new file mode 100644
index 000000000..a446fe6e0
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Composition.Hosting.dll
Binary files differ
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Composition.Runtime.dll b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Composition.Runtime.dll
new file mode 100644
index 000000000..a05bfe9c8
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Composition.Runtime.dll
Binary files differ
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Composition.TypedParts.dll b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Composition.TypedParts.dll
new file mode 100644
index 000000000..cfae95d0c
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Composition.TypedParts.dll
Binary files differ
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Reflection.Metadata.dll b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Reflection.Metadata.dll
new file mode 100644
index 000000000..ee68731c0
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Reflection.Metadata.dll
Binary files differ
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Text.Encoding.CodePages.dll b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Text.Encoding.CodePages.dll
new file mode 100644
index 000000000..0f2f44744
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.Text.Encoding.CodePages.dll
Binary files differ
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.ValueTuple.dll b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.ValueTuple.dll
new file mode 100644
index 000000000..502f8cd47
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Reference Assemblies/System.ValueTuple.dll
Binary files differ
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsService.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsService.cs
index 05b2d518c..f1b6f9d9c 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsService.cs
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsService.cs
@@ -9,10 +9,13 @@ using System.Linq;
using System.Reflection;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
+using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using Tango.Core;
+using Tango.Core.DI;
using Tango.Core.ExtensionMethods;
+using Tango.FSE.Procedures;
using Tango.Logging;
using Tango.PMR;
using Tango.PMR.Common;
@@ -26,17 +29,23 @@ namespace Tango.StubsUtils.Service
{
public class StubsService : ExtendedObject
{
+ private static int transporterCount = 1;
private const string PIPE_NAME = "Tango_Stubs_Server";
private NamedPipeServerStream _server;
private StreamReader _reader;
private StreamWriter _writer;
private BinaryFormatter _formatter;
- private StubsServiceSettings _settings;
private bool _initialized;
private List<Type> _stubsTypes;
private Dictionary<String, StubReflection> _stubsLookup;
private Thread _communicationThread;
+ #region Events
+
+ public event EventHandler CommunicationFailed;
+
+ #endregion
+
#region Properties
private ITransporter _transporter;
@@ -73,8 +82,7 @@ namespace Tango.StubsUtils.Service
public StubsService()
{
- _settings = SettingsManager.Default.GetOrCreate<StubsServiceSettings>();
- _settings.Save();
+
}
#endregion
@@ -141,14 +149,17 @@ namespace Tango.StubsUtils.Service
#region Connect/Disconnect
- public async Task Connect()
+ public async Task Connect(String comPort)
{
if (!IsStarted) throw new InvalidOperationException("Cannot connect the transporter before the service has started.");
if (!IsConnected)
{
- Transporter = new BasicTransporter(new UsbTransportAdapter(_settings.USBPort));
+ Transporter = new BasicTransporter(new UsbTransportAdapter(comPort));
+ Transporter.FailsWithAdapter = true;
+ Transporter.ComponentName = $"Transporter {transporterCount++}";
Transporter.UseKeepAlive = false;
+ Transporter.StateChanged += Transporter_StateChanged;
await Transporter.Connect();
IsConnected = true;
}
@@ -159,6 +170,16 @@ namespace Tango.StubsUtils.Service
if (IsConnected)
{
await Transporter.Disconnect();
+ IsConnected = false;
+ }
+ }
+
+ private void Transporter_StateChanged(object sender, TransportComponentState state)
+ {
+ if (state == TransportComponentState.Failed)
+ {
+ IsConnected = false;
+ CommunicationFailed?.Invoke(this, new EventArgs());
}
}
@@ -178,32 +199,52 @@ namespace Tango.StubsUtils.Service
if (EnableLogs) LogManager.Log($"Stub package received: '{request}'...");
var package = new StubPackageRequestDTO();
- package.Arguments = request.Split(' ');
+ package.Arguments = request.Split('^');
- if (EnableLogs) LogManager.Log($"Stub package constructed: '{package.ToJsonString()}'...");
+ if (package.Arguments.Length == 0)
+ {
+ throw new InvalidOperationException("Zero arguments provided.");
+ }
- var response = ProcessStubPackage(package);
+ if (package.Arguments[0] == "procedure")
+ {
+ ProcessProcedureProject(package);
- if (EnableLogs) LogManager.Log($"Stub package response: '{response.ToJsonString()}'...");
+ try
+ {
+ var response = new StubPackageResponseDTO()
+ {
+ Status = StubPackageResponseStatus.OK,
+ Message = $"Completed."
+ };
- _writer.Write(response.ToString());
- _writer.Flush();
+ _writer.WriteLine(response.ToString());
+ _writer.Flush();
+ }
+ catch { }
+ }
+ else
+ {
+ var response = ProcessStubPackage(package);
+
+ _writer.Write(response.ToString());
+ _writer.Flush();
+ }
}
catch (Exception ex)
{
- if (EnableLogs) LogManager.Log(ex, "Error processing stub package.");
+ LogManager.Log(ex, "Error processing stub package.");
try
{
var response = new StubPackageResponseDTO()
{
Status = StubPackageResponseStatus.Error,
- Message = $"Error processing stub package\n{ex.FlattenMessage()}"
+ Message = $"Error: {ex.GetFirstIfAggregate().Message}"
};
_writer.WriteLine(response.ToString());
_writer.Flush();
- _server.Disconnect();
}
catch { }
}
@@ -216,6 +257,45 @@ namespace Tango.StubsUtils.Service
#endregion
+ #region Process Procedure
+
+ public void ProcessProcedureProject(StubPackageRequestDTO package)
+ {
+ List<String> arguments = package.Arguments.Skip(1).ToList();
+ String projectPath = arguments[0];
+ arguments = arguments.Skip(1).ToList();
+ String json = File.ReadAllText(projectPath);
+ ProcedureProject project = ProcedureProject.FromJson(json);
+ var mainScript = project.Scripts.FirstOrDefault(x => x.IsEntryPoint);
+
+ int index = 0;
+
+ foreach (var match in Regex.Matches(mainScript.Code, "public const [S|s]tring.+;").OfType<Match>())
+ {
+ if (index < arguments.Count)
+ {
+ String defLine = match.Value;
+ String replace = Regex.Replace(defLine, "(?<=\").*(?=\")", arguments[index]);
+ mainScript.Code = mainScript.Code.Replace(defLine, replace);
+ index++;
+ }
+ }
+
+ TangoIOC.Default.ThrowOnRequestedTypeNotFound = false;
+
+ StubsServiceProcedureContext context = new StubsServiceProcedureContext(project, Transporter, new StubsServiceProcedureLogger((message) =>
+ {
+ _writer.WriteLine(message);
+ }));
+
+ var session = project.Run(context).Result;
+ var obj = session.WaitForCompletion().Result;
+
+ return;
+ }
+
+ #endregion
+
#region Process Package
private StubPackageResponseDTO ProcessStubPackage(StubPackageRequestDTO package)
@@ -224,92 +304,81 @@ namespace Tango.StubsUtils.Service
if (Transporter == null || Transporter.State != TransportComponentState.Connected)
{
- response.Status = StubPackageResponseStatus.NoConnection;
- response.Message = "Machine is disconnected.";
- return response;
+ throw new InvalidOperationException("Machine is disconnected");
}
- try
- {
- if (EnableLogs) LogManager.Log("Processing package...");
+ if (EnableLogs) LogManager.Log("Processing package...");
- String stubName = package.Arguments[0];
- List<String> arguments = package.Arguments.Skip(1).ToList();
+ String stubName = package.Arguments[0];
+ List<String> arguments = package.Arguments.Skip(1).ToList();
- StubReflection stubReflection = GetStubReflection(stubName);
+ StubReflection stubReflection = GetStubReflection(stubName);
- MessageContainer requestContainer = new MessageContainer();
- requestContainer.Token = Guid.NewGuid().ToString();
- requestContainer.Type = stubReflection.MessageType;
+ MessageContainer requestContainer = new MessageContainer();
+ requestContainer.Token = Guid.NewGuid().ToString();
+ requestContainer.Type = stubReflection.MessageType;
- IMessage request = Activator.CreateInstance(stubReflection.Type) as IMessage;
+ IMessage request = Activator.CreateInstance(stubReflection.Type) as IMessage;
- for (int i = 0; i < arguments.Count; i++)
- {
- String argument = arguments[i];
+ for (int i = 0; i < arguments.Count; i++)
+ {
+ String argument = arguments[i];
- if (i >= stubReflection.Properties.Count)
- {
- throw new ArgumentOutOfRangeException($"Argument '{argument}' index is out of range for stub '{stubReflection.Type.Name}'.");
- }
+ if (i >= stubReflection.Properties.Count)
+ {
+ throw new ArgumentException($"Argument '{argument}' index is out of range for stub '{stubReflection.Type.Name}'.");
+ }
- PropertyInfo prop = stubReflection.Properties[i];
+ PropertyInfo prop = stubReflection.Properties[i];
- if (prop.PropertyType == typeof(UInt32))
- {
- prop.SetValue(request, UInt32.Parse(argument));
- }
- else if (prop.PropertyType == typeof(bool))
- {
- prop.SetValue(request, bool.Parse(argument));
- }
- else if (typeof(IList).IsAssignableFrom(prop.PropertyType))
- {
- IList arr = prop.GetValue(request) as IList;
- foreach (var item in argument.Split(','))
- {
- object converted = Convert.ChangeType(item, prop.PropertyType.GetGenericArguments()[0]);
- arr.Add(converted);
- }
- }
- else
+ if (prop.PropertyType == typeof(UInt32))
+ {
+ prop.SetValue(request, UInt32.Parse(argument));
+ }
+ else if (prop.PropertyType == typeof(bool))
+ {
+ prop.SetValue(request, bool.Parse(argument));
+ }
+ else if (typeof(IList).IsAssignableFrom(prop.PropertyType))
+ {
+ IList arr = prop.GetValue(request) as IList;
+ foreach (var item in argument.Split(','))
{
- object converted = Convert.ChangeType(argument, prop.PropertyType);
- prop.SetValue(request, converted);
+ object converted = Convert.ChangeType(item, prop.PropertyType.GetGenericArguments()[0]);
+ arr.Add(converted);
}
}
+ else
+ {
+ object converted = Convert.ChangeType(argument, prop.PropertyType);
+ prop.SetValue(request, converted);
+ }
+ }
- if (EnableLogs) LogManager.Log($"Request stub constructed:\n{request.ToJsonString()}");
-
- requestContainer.Data = request.ToByteString();
- var responseContainer = Transporter.SendRequest(requestContainer, new TransportRequestConfig() { ThreadingMode = TransportThreadingMode.ThreadPool }).Result;
+ if (EnableLogs) LogManager.Log($"Request stub constructed:\n{request.ToJsonString()}");
- var stubResponseReflection = GetStubReflection(responseContainer.Type.ToOriginalName());
- IMessage stubResponse = stubResponseReflection.Parser.ParseFrom(responseContainer.Data);
+ requestContainer.Data = request.ToByteString();
+ var responseContainer = Transporter.SendRequest(requestContainer, new TransportRequestConfig() { ThreadingMode = TransportThreadingMode.ThreadPool }).Result;
- String responseMessage = String.Empty;
+ var stubResponseReflection = GetStubReflection(responseContainer.Type.ToOriginalName());
+ IMessage stubResponse = stubResponseReflection.Parser.ParseFrom(responseContainer.Data);
- foreach (var prop in stubResponseReflection.Properties)
- {
- responseMessage += $"{prop.Name}: {prop.GetValue(stubResponse).ToStringSafe()}\n";
- }
-
- if (EnableLogs)
- {
- String responseJson = stubResponse.ToJsonString();
- LogManager.Log($"Response:\n{stubResponse}");
- }
+ String responseMessage = String.Empty;
- response.Status = StubPackageResponseStatus.OK;
- response.Message = responseMessage;
+ foreach (var prop in stubResponseReflection.Properties)
+ {
+ responseMessage += $"{prop.Name}: {prop.GetValue(stubResponse).ToStringSafe()}\n";
}
- catch (Exception ex)
+
+ if (EnableLogs)
{
- LogManager.Log(ex, "Error processing stub package.");
- response.Status = StubPackageResponseStatus.Error;
- response.Message = ex.FlattenMessage();
+ String responseJson = stubResponse.ToJsonString();
+ LogManager.Log($"Stub package response:\n{responseJson}");
}
+ response.Status = StubPackageResponseStatus.OK;
+ response.Message = responseMessage;
+
return response;
}
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsServiceProcedureContext.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsServiceProcedureContext.cs
new file mode 100644
index 000000000..02eba672e
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsServiceProcedureContext.cs
@@ -0,0 +1,80 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Reactive.Concurrency;
+using System.Reactive.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using Google.Protobuf;
+using Tango.Core;
+using Tango.Core.ExtensionMethods;
+using Tango.FSE.Procedures;
+using Tango.PMR;
+using Tango.Transport;
+
+namespace Tango.StubsUtils.Service
+{
+ public class StubsServiceProcedureContext : ProcedureContext
+ {
+ private ITransporter _transporter;
+
+ public StubsServiceProcedureContext(ProcedureProject project, ITransporter transporter, IProcedureLogger logger) : base(project, logger)
+ {
+ _transporter = transporter;
+ }
+
+ public override IMessage Send(IMessage message, int? timeout = null)
+ {
+ TimeSpan? timespan = null;
+
+ if (timeout != null)
+ {
+ timespan = TimeSpan.FromMilliseconds(timeout.Value);
+ }
+
+ return _transporter.SendRequest(message, new TransportRequestConfig()
+ {
+ Timeout = timespan,
+ }).Result;
+ }
+
+ public override void SendContinuous<T>(IMessage message, Action<T> callback, int? timeout = null)
+ {
+ TaskCompletionSource<object> completion = new TaskCompletionSource<object>();
+
+ TimeSpan? timespan = null;
+
+ if (timeout != null)
+ {
+ timespan = TimeSpan.FromMilliseconds(timeout.Value);
+ }
+
+ _transporter.SendContinuousRequest(message, new TransportContinuousRequestConfig()
+ {
+ Timeout = timespan,
+ ContinuousTimeout = timespan
+ }).ObserveOn(new NewThreadScheduler()).Subscribe((msg) =>
+ {
+ try
+ {
+ callback?.Invoke(msg as T);
+ }
+ catch { }
+ }, (ex) =>
+ {
+ completion.SetException(ex);
+ }, () =>
+ {
+ completion.SetResult(true);
+ });
+
+ completion.Task.GetAwaiter().GetResult();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsServiceProcedureLogger.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsServiceProcedureLogger.cs
new file mode 100644
index 000000000..7b3f34a04
--- /dev/null
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsServiceProcedureLogger.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.FSE.Procedures;
+
+namespace Tango.StubsUtils.Service
+{
+ public class StubsServiceProcedureLogger : IProcedureLogger
+ {
+ private Action<String> _writeLineCallback;
+
+ public StubsServiceProcedureLogger(Action<String> writeLineCallback)
+ {
+ _writeLineCallback = writeLineCallback;
+ }
+
+ public void WriteLine(string text)
+ {
+ _writeLineCallback(text);
+ }
+
+ public void Write(string text)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void Clear()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsServiceSettings.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsServiceSettings.cs
index 8741065cf..e71fd2138 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsServiceSettings.cs
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/StubsServiceSettings.cs
@@ -9,11 +9,6 @@ namespace Tango.StubsUtils.Service
{
public class StubsServiceSettings : SettingsBase
{
- public String USBPort { get; set; }
- public StubsServiceSettings()
- {
- USBPort = "COM1";
- }
}
}
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Tango.StubsUtils.Service.csproj b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Tango.StubsUtils.Service.csproj
index 40ec9d29f..035fa39e0 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Tango.StubsUtils.Service.csproj
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/Tango.StubsUtils.Service.csproj
@@ -42,6 +42,22 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
+ <Reference Include="System.Reactive.Core, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\System.Reactive.Core.3.1.1\lib\net46\System.Reactive.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Reactive.Interfaces, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\System.Reactive.Interfaces.3.1.1\lib\net45\System.Reactive.Interfaces.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Reactive.Linq, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\System.Reactive.Linq.3.1.1\lib\net46\System.Reactive.Linq.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Reactive.PlatformServices, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\System.Reactive.PlatformServices.3.1.1\lib\net46\System.Reactive.PlatformServices.dll</HintPath>
+ </Reference>
+ <Reference Include="System.ValueTuple, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>Reference Assemblies\System.ValueTuple.dll</HintPath>
+ </Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
@@ -53,9 +69,27 @@
<Compile Include="StubReflection.cs" />
<Compile Include="StubsService.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="StubsServiceProcedureContext.cs" />
+ <Compile Include="StubsServiceProcedureLogger.cs" />
<Compile Include="StubsServiceSettings.cs" />
</ItemGroup>
<ItemGroup>
+ <ProjectReference Include="..\..\FSE\Modules\Tango.FSE.Procedures\Tango.FSE.Procedures.csproj">
+ <Project>{1754f846-4763-4000-807f-c7bfaa145db2}</Project>
+ <Name>Tango.FSE.Procedures</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Scripting\Tango.Scripting.Basic\Tango.Scripting.Basic.csproj">
+ <Project>{2b29a699-1d65-463a-8250-a2ce81d019c9}</Project>
+ <Name>Tango.Scripting.Basic</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Scripting\Tango.Scripting.Core\Tango.Scripting.Core.csproj">
+ <Project>{5812e1c6-abaa-4066-94ac-971c27b4f46a}</Project>
+ <Name>Tango.Scripting.Core</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Scripting\Tango.Scripting.Editors\Tango.Scripting.Editors.csproj">
+ <Project>{da62fa39-668b-47a6-b0f2-d2c1daf777b0}</Project>
+ <Name>Tango.Scripting.Editors</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\Tango.Core\Tango.Core.csproj">
<Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
<Name>Tango.Core</Name>
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/app.config b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/app.config
index f63670818..c3e34655f 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/app.config
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/app.config
@@ -14,6 +14,86 @@
<assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.1.0" newVersion="1.2.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Threading.Thread" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="SharpDX.Mathematics" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="SharpDX.Direct3D11" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="SharpDX.DXGI" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="SharpDX" publicKeyToken="b4dcf0f35e5521f1" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory.Platform" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-3.19.8.16603" newVersion="3.19.8.16603" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/packages.config b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/packages.config
index 52834fea3..41d99b940 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/packages.config
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Service/packages.config
@@ -3,4 +3,8 @@
<package id="FastMember" version="1.5.0" targetFramework="net461" />
<package id="Google.Protobuf" version="3.4.1" targetFramework="net461" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net461" />
+ <package id="System.Reactive.Core" version="3.1.1" targetFramework="net461" />
+ <package id="System.Reactive.Interfaces" version="3.1.1" targetFramework="net461" />
+ <package id="System.Reactive.Linq" version="3.1.1" targetFramework="net461" />
+ <package id="System.Reactive.PlatformServices" version="3.1.1" targetFramework="net461" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/Program.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/Program.cs
index b72e15236..60f4c3def 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/Program.cs
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.SessionClient.CLI/Program.cs
@@ -37,11 +37,11 @@ namespace Tango.StubsUtils.SessionClient.CLI
try
{
var _client = new NamedPipeClientStream(PIPE_NAME);
- _client.Connect(5000);
+ _client.Connect(1000);
var writer = new StreamWriter(_client);
- var jsonRequest = String.Join(" ", args);
+ var jsonRequest = String.Join("^", args);
writer.WriteLine(jsonRequest);
writer.Flush();
@@ -54,7 +54,8 @@ namespace Tango.StubsUtils.SessionClient.CLI
}
catch (Exception ex)
{
- OnError($"Error communicating with the stubs service. {ex.Message}");
+ OnError($"Status: Error\nError: Error communicating with the stubs service. {ex.Message}");
+ continue;
}
if (response.Status == StubPackageResponseStatus.OK)
diff --git a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/StubPackageResponseStatus.cs b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/StubPackageResponseStatus.cs
index 4edd47d6c..6577e629d 100644
--- a/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/StubPackageResponseStatus.cs
+++ b/Software/Visual_Studio/StubsUtils/Tango.StubsUtils.Shared/StubPackageResponseStatus.cs
@@ -11,6 +11,5 @@ namespace Tango.StubsUtils.Shared
{
OK,
Error,
- NoConnection
}
}
diff --git a/Software/Visual_Studio/Tango.ColorLib.GradientTest.CLI/Program.cs b/Software/Visual_Studio/Tango.ColorLib.GradientTest.CLI/Program.cs
index 82049fa37..2a8077669 100644
--- a/Software/Visual_Studio/Tango.ColorLib.GradientTest.CLI/Program.cs
+++ b/Software/Visual_Studio/Tango.ColorLib.GradientTest.CLI/Program.cs
@@ -18,9 +18,9 @@ namespace Tango.ColorLib.GradientTest.CLI
GradientGenerator generator = new GradientGenerator();
//RGB, Gamut Region 0, In Gamut
//TEST1
- // TestRGBGamutRegion0(generator);
- // Console.WriteLine("Press enter to nextTestLABGamutRegion0 test...");
- // Console.ReadLine();
+ TestRGBGamutRegion0(generator);
+ Console.WriteLine("Press enter to nextTestLABGamutRegion0 test...");
+ Console.ReadLine();
// Lab, Gamut Region 0, In Gamut
//TEST2
TestLABGamutRegion0(generator);
@@ -28,32 +28,32 @@ namespace Tango.ColorLib.GradientTest.CLI
Console.ReadLine();
//Volume, Gamut Region 0, In Gamut
//TEST3
- // TestVolumeGamutRegion0(generator);
- // Console.WriteLine("Press enter to next TestVolumeGamutRegion1 test...");
- // Console.ReadLine();
+ TestVolumeGamutRegion0(generator);
+ Console.WriteLine("Press enter to next TestVolumeGamutRegion1 test...");
+ Console.ReadLine();
//Volume, Gamut Region 1, In Gamut
//TEST4
- // TestVolumeGamutRegion1(generator);
- // Console.WriteLine("Press enter to next TestRGBMixedGamut test...");
- // Console.ReadLine();
+ TestVolumeGamutRegion1(generator);
+ Console.WriteLine("Press enter to next TestRGBMixedGamut test...");
+ Console.ReadLine();
//RGB, Mixed Gamut Regions, In Gamut
//TEST5
- // TestRGBMixedGamut(generator);
- // Console.WriteLine("Press enter to next TestLABOutOfGamut test...");
- // Console.ReadLine();
+ TestRGBMixedGamut(generator);
+ Console.WriteLine("Press enter to next TestLABOutOfGamut test...");
+ Console.ReadLine();
//LAB, Gamut Region 0, Out of Gamut
//TEST6
- // TestLABOutOfGamut(generator);
-// Console.WriteLine("Press enter to next TestLABMixedGamut test...");
-// Console.ReadLine();
+ TestLABOutOfGamut(generator);
+ Console.WriteLine("Press enter to next TestLABMixedGamut test...");
+ Console.ReadLine();
//7. Lab, Mixed Gamut Regions, In Gamut
//TEST7
- // TestLABMixedGamut(generator);
- // Console.WriteLine("Press enter to next TestMixedEnvironment test...");
- // Console.ReadLine();
+ TestLABMixedGamut(generator);
+ Console.WriteLine("Press enter to next TestMixedEnvironment test...");
+ Console.ReadLine();
//8. Mixed Environment
//TEST8
@@ -114,184 +114,111 @@ namespace Tango.ColorLib.GradientTest.CLI
//Segment length
input.SegmentLength = 1000;*/
}
- {
- /*
- input.Stops.Add(new GradientInputStop()
- {
- ColorSpace = ColorSpace.Rgb,
- Offset = 0,
- Red = 93,
- Green = 123,
- Blue = 95,
- });
- //Lab Stop 2
- input.Stops.Add(new GradientInputStop()
- {
- ColorSpace = ColorSpace.Lab,
- Offset = 0.6,
- L = 50,
- A = -10,
- B = -10,
- });
- //Volume Stop 3
- GradientInputStop c = new GradientInputStop()
- {
- ColorSpace = ColorSpace.Volume,
- Offset = 1,
- };
- c.LiquidVolumes.Add(new LiquidVolume()
- {
- LiquidType = LiquidType.Cyan,
- Volume = 50
- });
- c.LiquidVolumes.Add(new LiquidVolume()
- {
- LiquidType = LiquidType.Magenta,
- Volume = 0
- });
- c.LiquidVolumes.Add(new LiquidVolume()
- {
- LiquidType = LiquidType.Yellow,
- Volume = 50
- });
- c.LiquidVolumes.Add(new LiquidVolume()
- {
- LiquidType = LiquidType.Black,
- Volume = 0
- });
- input.Stops.Add(c);
+ {
+ /*
+ input.Stops.Add(new GradientInputStop()
+ {
+ ColorSpace = ColorSpace.Rgb,
+ Offset = 0,
+ Red = 93,
+ Green = 123,
+ Blue = 95,
+ });
+ //Lab Stop 2
+ input.Stops.Add(new GradientInputStop()
+ {
+ ColorSpace = ColorSpace.Lab,
+ Offset = 0.6,
+ L = 50,
+ A = -10,
+ B = -10,
+ });
+ //Volume Stop 3
+ GradientInputStop c = new GradientInputStop()
+ {
+ ColorSpace = ColorSpace.Volume,
+ Offset = 1,
+ };
+ c.LiquidVolumes.Add(new LiquidVolume()
+ {
+ LiquidType = LiquidType.Cyan,
+ Volume = 50
+ });
+ c.LiquidVolumes.Add(new LiquidVolume()
+ {
+ LiquidType = LiquidType.Magenta,
+ Volume = 0
+ });
+ c.LiquidVolumes.Add(new LiquidVolume()
+ {
+ LiquidType = LiquidType.Yellow,
+ Volume = 50
+ });
+ c.LiquidVolumes.Add(new LiquidVolume()
+ {
+ LiquidType = LiquidType.Black,
+ Volume = 0
+ });
+ input.Stops.Add(c);
- Console.WriteLine($"Testing input:\n{input.ToJsonString(nameof(input.ForwardData),nameof(CalibrationData))}");
+ Console.WriteLine($"Testing input:\n{input.ToJsonString(nameof(input.ForwardData),nameof(CalibrationData))}");
- Console.WriteLine();
+ Console.WriteLine();
- Console.WriteLine("Processing...");
+ Console.WriteLine("Processing...");
- Stopwatch watch = new Stopwatch();
- watch.Start();
+ Stopwatch watch = new Stopwatch();
+ watch.Start();
- GradientConversionOutput output = generator.GenerateGradient(input);
+ GradientConversionOutput output = generator.GenerateGradient(input);
- watch.Stop();
- Console.WriteLine($"Processing completed after: {watch.Elapsed.Milliseconds.ToString("00000.00")} mseconds.");
+ watch.Stop();
+ Console.WriteLine($"Processing completed after: {watch.Elapsed.Milliseconds.ToString("00000.00")} mseconds.");
- //watch.Elapsed.TotalSeconds.ToString("0.0")}
+ //watch.Elapsed.TotalSeconds.ToString("0.0")}
- Console.WriteLine();
- Console.WriteLine($"Result:\n{output.ToJsonString()}");
- Console.WriteLine();*/
+ Console.WriteLine();
+ Console.WriteLine($"Result:\n{output.ToJsonString()}");
+ Console.WriteLine();*/
}
Console.WriteLine("Press return to exit...");
Console.ReadLine();
}
- public static CalibrationData CreateCalibrationData(PMR.ColorLab.LiquidType liquidType, CalibrationData tmpData, int nsize)
- {
- CalibrationData data = new CalibrationData();
- data.LiquidType = liquidType;
-
- for (int i = 0; i < nsize; i++)
- {
- data.CalibrationPoints.Add(new CalibrationPoint()
- {
- X = tmpData.CalibrationPoints[i].X,
- Y = tmpData.CalibrationPoints[i].Y,
- });
- }
-
- return data;
- }
-
static GradientConversionInput CreateBaseGradientConversionInput()
{
GradientConversionInput input = new GradientConversionInput();
-
- //CCT
- input.ForwardData = ByteString.CopyFrom(File.ReadAllBytes(@"Sylko_HV_IL400Bl95R_1.cct")); //TODO: Load CCT file from local drive.
- CalibrationData tmpCyanData = new CalibrationData();
- tmpCyanData.LiquidType = LiquidType.Cyan;
- double [] XValC = {0, 1, 2, 3, 7, 19, 47, 76, 86, 100 };
- double[] YValC = {0 ,6.9665 ,13.1381, 18.1474, 30.80, 50.7896, 73.1757, 89.37837, 94.20457, 100 };
- int nsizeC = XValC.Length;
-
- for (int i = 0; i < nsizeC; i++)
- {
- tmpCyanData.CalibrationPoints.Add(new CalibrationPoint()
- {
- X = XValC[i],
- Y = YValC[i],
- });
- }
- CalibrationData tmpMagentaData = new CalibrationData();
- tmpMagentaData.LiquidType = LiquidType.Magenta;
- double[] XValM = { 0, 1, 2, 4, 7, 10, 31, 63, 80, 100 };
- double[] YValM = { 0, 11.6638, 21.7132, 34.7811, 45.3282, 53.6154, 74.9858, 90.2901,94.5245,100};
- int nsizeM = XValM.Length;
-
- for (int i = 0; i < nsizeM; i++)
- {
- tmpMagentaData.CalibrationPoints.Add(new CalibrationPoint()
- {
- X = XValM[i],
- Y = YValM[i],
- });
- }
- CalibrationData tmpYellowData = new CalibrationData();
- tmpYellowData.LiquidType = LiquidType.Yellow;
- double[] XValY = {0, 1, 2, 4, 7, 11, 23, 39, 67, 100 };
- double[] YValY = { 0, 9.8895, 18.4570, 29.6694, 37.7121, 45.4408, 63.6478, 75.8076, 93.9226, 100 };
- int nsizeY = XValY.Length;
-
- for (int i = 0; i < nsizeY; i++)
- {
- tmpYellowData.CalibrationPoints.Add(new CalibrationPoint()
- {
- X = XValY[i],
- Y = YValY[i],
- });
- }
- CalibrationData tmpBlackData = new CalibrationData();
- tmpBlackData.LiquidType = LiquidType.Yellow;
- double[] XValK = { 0, 1, 2,4,7,10,20,30,50,75,80,85,100 };
- double[] YValK = { 0, 10.4656,19.5667, 31.6627, 40.6020, 46.9257, 63.1965, 70.9355, 83.4647, 94.4979, 95.7233, 96.3631,100 };
- int nsizeK = XValY.Length;
+ //CCT
+ input.ForwardData = ByteString.CopyFrom(File.ReadAllBytes(@"Sylko_HV_IL350R.cct")); //TODO: Load CCT file from local drive.
- for (int i = 0; i < nsizeK; i++)
- {
- tmpBlackData.CalibrationPoints.Add(new CalibrationPoint()
- {
- X = XValK[i],
- Y = YValK[i],
- });
- }
//RML Liquid Factors
input.InputLiquids.Add(new InputLiquid()
{
LiquidType = LiquidType.Cyan,
- CalibrationData = CreateCalibrationData(LiquidType.Cyan, tmpCyanData, nsizeC),
+ CalibrationData = BL.Entities.Cat.CreateDemoCalibrationData(LiquidType.Cyan),
MaxNanoliterPerCentimeter = 200,
});
input.InputLiquids.Add(new InputLiquid()
{
LiquidType = LiquidType.Magenta,
- CalibrationData = CreateCalibrationData(LiquidType.Magenta, tmpMagentaData, nsizeM),
+ CalibrationData = BL.Entities.Cat.CreateDemoCalibrationData(LiquidType.Magenta),
MaxNanoliterPerCentimeter = 200,
});
input.InputLiquids.Add(new InputLiquid()
{
LiquidType = LiquidType.Yellow,
- CalibrationData = CreateCalibrationData(LiquidType.Yellow, tmpYellowData, nsizeY),
+ CalibrationData = BL.Entities.Cat.CreateDemoCalibrationData(LiquidType.Yellow),
MaxNanoliterPerCentimeter = 200,
});
input.InputLiquids.Add(new InputLiquid()
{
LiquidType = LiquidType.Black,
- CalibrationData = CreateCalibrationData(LiquidType.Black, tmpBlackData, nsizeK),
+ CalibrationData = BL.Entities.Cat.CreateDemoCalibrationData(LiquidType.Black),
MaxNanoliterPerCentimeter = 200,
});
@@ -374,65 +301,25 @@ namespace Tango.ColorLib.GradientTest.CLI
{
ColorSpace = ColorSpace.Lab,
Offset = 0.0,
- L = 52,
- A =-40,
- B = -48,
- });
- input.Stops.Add(new GradientInputStop()
- {
- ColorSpace = ColorSpace.Lab,
- Offset = 0.15,
- L = 44,
- A = 2.88,
- B = -38.36,
- });
- input.Stops.Add(new GradientInputStop()
- {
- ColorSpace = ColorSpace.Lab,
- Offset = 0.30,
- L = 47.21,
- A = 63.70,
- B = 2.57,
+ L = 44.75,
+ A = 15.14,
+ B = -32.5,
});
input.Stops.Add(new GradientInputStop()
{
ColorSpace = ColorSpace.Lab,
- Offset = 0.45,
- L = 51.92,
- A = 54.73,
- B = 35.87,
- });
- input.Stops.Add(new GradientInputStop()
- {
- ColorSpace = ColorSpace.Lab,
- Offset = 0.60,
- L = 56.34,
- A = 50.22,
- B = 49.18,
- });
- input.Stops.Add(new GradientInputStop()
- {
- ColorSpace = ColorSpace.Lab,
- Offset = 0.75,
- L =82,
- A =-0.52,
- B = 85,
- });
- input.Stops.Add(new GradientInputStop()
- {
- ColorSpace = ColorSpace.Lab,
- Offset = 0.90,
- L = 51,
- A =-32,
- B =18,
+ Offset = 0.5,
+ L = 39.70,
+ A = 25.0,
+ B = -4.8,
});
input.Stops.Add(new GradientInputStop()
{
ColorSpace = ColorSpace.Lab,
Offset = 1,
- L = 52,
- A = -40,
- B = -48,
+ L = 53,
+ A = -15.0,
+ B = -35,
});
Console.WriteLine($"TestLABGamutRegion0 input:\n{input.ToJsonString(nameof(input.ForwardData), nameof(CalibrationData))}");
@@ -456,7 +343,7 @@ namespace Tango.ColorLib.GradientTest.CLI
static void TestVolumeGamutRegion0(GradientGenerator generator)
{
GradientConversionInput input = CreateBaseGradientConversionInput();
-
+
GradientInputStop gradientInputStop1 = new GradientInputStop()
{
ColorSpace = ColorSpace.Volume,
@@ -483,7 +370,7 @@ namespace Tango.ColorLib.GradientTest.CLI
Volume = 0
});
input.Stops.Add(gradientInputStop1);
-
+
GradientInputStop gradientInputStop2 = new GradientInputStop()
{
ColorSpace = ColorSpace.Volume,
@@ -559,7 +446,7 @@ namespace Tango.ColorLib.GradientTest.CLI
static void TestVolumeGamutRegion1(GradientGenerator generator)
{
GradientConversionInput input = CreateBaseGradientConversionInput();
-
+
GradientInputStop gradientInputStop1 = new GradientInputStop()
{
ColorSpace = ColorSpace.Volume,
@@ -815,7 +702,7 @@ namespace Tango.ColorLib.GradientTest.CLI
Green = 123,
Blue = 95,
});
-
+
input.Stops.Add(new GradientInputStop()
{
ColorSpace = ColorSpace.Lab,
@@ -824,7 +711,7 @@ namespace Tango.ColorLib.GradientTest.CLI
A = -10,
B = -10,
});
-
+
GradientInputStop gradientInputStop1 = new GradientInputStop()
{
ColorSpace = ColorSpace.Volume,
diff --git a/Software/Visual_Studio/Tango.Settings/SettingsManager.cs b/Software/Visual_Studio/Tango.Settings/SettingsManager.cs
index 350bdf790..3a30ffbbb 100644
--- a/Software/Visual_Studio/Tango.Settings/SettingsManager.cs
+++ b/Software/Visual_Studio/Tango.Settings/SettingsManager.cs
@@ -17,6 +17,8 @@ namespace Tango.Settings
{
#region Singleton
+ private static object _syncLock = new object();
+
private static SettingsManager _default;
/// <summary>
/// Gets the default settings manager instance.
@@ -25,9 +27,12 @@ namespace Tango.Settings
{
get
{
- if (_default == null)
+ lock (_syncLock)
{
- _default = new SettingsManager();
+ if (_default == null)
+ {
+ _default = new SettingsManager();
+ }
}
return _default;
diff --git a/Software/Visual_Studio/Tango.sln b/Software/Visual_Studio/Tango.sln
index 96e3aa775..5ace654c3 100644
--- a/Software/Visual_Studio/Tango.sln
+++ b/Software/Visual_Studio/Tango.sln
@@ -455,6 +455,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.StubsUtils.Performanc
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.StubsUtils.SessionClient.CLI", "StubsUtils\Tango.StubsUtils.SessionClient.CLI\Tango.StubsUtils.SessionClient.CLI.csproj", "{F1B727F5-ADF5-4A81-A740-7E64E48B29D4}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Notifications.Wpf", "StubsUtils\Notifications.Wpf\Notifications.Wpf.csproj", "{5C9A4F46-263D-4C23-B361-F09E14BB109E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.StubsUtils.ProcedureClient.CLI", "StubsUtils\Tango.StubsUtils.ProcedureClient.CLI\Tango.StubsUtils.ProcedureClient.CLI.csproj", "{8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -4310,6 +4314,46 @@ Global
{F1B727F5-ADF5-4A81-A740-7E64E48B29D4}.Release|x64.Build.0 = Release|Any CPU
{F1B727F5-ADF5-4A81-A740-7E64E48B29D4}.Release|x86.ActiveCfg = Release|Any CPU
{F1B727F5-ADF5-4A81-A740-7E64E48B29D4}.Release|x86.Build.0 = Release|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Debug|ARM.Build.0 = Debug|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Debug|x64.Build.0 = Debug|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Debug|x86.Build.0 = Debug|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Release|Any CPU.ActiveCfg = Release 4.6.1|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Release|Any CPU.Build.0 = Release 4.6.1|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Release|ARM.ActiveCfg = Release 4.6.1|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Release|ARM.Build.0 = Release 4.6.1|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Release|ARM64.ActiveCfg = Release 4.6.1|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Release|ARM64.Build.0 = Release 4.6.1|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Release|x64.ActiveCfg = Release 4.6.1|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Release|x64.Build.0 = Release 4.6.1|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Release|x86.ActiveCfg = Release 4.6.1|Any CPU
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E}.Release|x86.Build.0 = Release 4.6.1|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Debug|ARM.Build.0 = Debug|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Debug|x64.Build.0 = Debug|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Debug|x86.Build.0 = Debug|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Release|ARM.ActiveCfg = Release|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Release|ARM.Build.0 = Release|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Release|ARM64.Build.0 = Release|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Release|x64.ActiveCfg = Release|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Release|x64.Build.0 = Release|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Release|x86.ActiveCfg = Release|Any CPU
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -4469,6 +4513,8 @@ Global
{DAE96F06-72CD-411D-90A3-9456AE79F699} = {4A8BD6EC-41CF-46A9-B2CD-9D0DF6465963}
{F423324C-7D0A-4512-BEBA-DF3A931A09F6} = {4A8BD6EC-41CF-46A9-B2CD-9D0DF6465963}
{F1B727F5-ADF5-4A81-A740-7E64E48B29D4} = {4A8BD6EC-41CF-46A9-B2CD-9D0DF6465963}
+ {5C9A4F46-263D-4C23-B361-F09E14BB109E} = {4A8BD6EC-41CF-46A9-B2CD-9D0DF6465963}
+ {8F0BCFC8-AF0F-40D3-882A-902CD221A6DE} = {4A8BD6EC-41CF-46A9-B2CD-9D0DF6465963}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7986F7F4-A86A-4994-B1B6-0988D7F057B6}