* Refactored NC_ERRORS
+ Added client configuration api * Refactored serverconfig
This commit is contained in:
@@ -112,11 +112,11 @@ public static class ThreadsFunctions
|
||||
{
|
||||
// Try reconnection
|
||||
CmsError cmsError = ncHandler.Connect();
|
||||
if (cmsError.errorCode == SIEMENS_ENVIRONMENT_NOT_FOUND || cmsError.errorCode == SIEMENS_HMI_NOT_RUNNING)
|
||||
if (cmsError.errorCode == CMS_ERROR_CODES.SIEMENS_ENVIRONMENT_NOT_FOUND || cmsError.errorCode == CMS_ERROR_CODES.SIEMENS_HMI_NOT_RUNNING)
|
||||
{
|
||||
ManageLibraryError(cmsError);
|
||||
}
|
||||
else if ( cmsError.errorCode != OK)
|
||||
else if ( cmsError.errorCode != CMS_ERROR_CODES.OK)
|
||||
ncHandler.Dispose();
|
||||
|
||||
Thread.Sleep(1000);
|
||||
@@ -149,28 +149,28 @@ public static class ThreadsFunctions
|
||||
{
|
||||
switch (cmsError.errorCode)
|
||||
{
|
||||
case NC_PROD_ERROR:
|
||||
case CMS_ERROR_CODES.NC_PROD_ERROR:
|
||||
TryNcConnection();
|
||||
break;
|
||||
case NOT_CONNECTED:
|
||||
case CMS_ERROR_CODES.NOT_CONNECTED:
|
||||
TryNcConnection(); // If not connected try reconnection
|
||||
break;
|
||||
case PROC_NOT_FOUND:
|
||||
case CMS_ERROR_CODES.PROC_NOT_FOUND:
|
||||
break;
|
||||
case FUNCTION_NOT_ALLOWED:
|
||||
case CMS_ERROR_CODES.FUNCTION_NOT_ALLOWED:
|
||||
break;
|
||||
case BIT_NOT_IN_RANGE:
|
||||
case CMS_ERROR_CODES.BIT_NOT_IN_RANGE:
|
||||
break;
|
||||
case BYTE_NOT_IN_RANGE:
|
||||
case CMS_ERROR_CODES.BYTE_NOT_IN_RANGE:
|
||||
break;
|
||||
case INTERNAL_ERROR:
|
||||
case CMS_ERROR_CODES.INTERNAL_ERROR:
|
||||
break;
|
||||
case INCORRECT_PARAMETERS:
|
||||
case CMS_ERROR_CODES.INCORRECT_PARAMETERS:
|
||||
break;
|
||||
case NC_LANGUAGE_ERROR:
|
||||
case CMS_ERROR_CODES.NC_LANGUAGE_ERROR:
|
||||
break;
|
||||
case SIEMENS_ENVIRONMENT_NOT_FOUND:
|
||||
case SIEMENS_HMI_NOT_RUNNING:
|
||||
case CMS_ERROR_CODES.SIEMENS_ENVIRONMENT_NOT_FOUND:
|
||||
case CMS_ERROR_CODES.SIEMENS_HMI_NOT_RUNNING:
|
||||
Manage(ERROR_LEVEL.FATAL, cmsError.message);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user