d4df4bc5b8
Fix demo tool table config Added part program message
64 lines
1.8 KiB
C#
64 lines
1.8 KiB
C#
namespace CMS_CORE_Library.Models
|
|
{
|
|
public class CmsError
|
|
{
|
|
public CMS_ERROR_CODES errorCode;
|
|
public string localizationKey;
|
|
|
|
public CmsError(CMS_ERROR_CODES errorCode, string message)
|
|
{
|
|
this.errorCode = errorCode;
|
|
this.localizationKey = message;
|
|
}
|
|
|
|
public bool IsError()
|
|
{
|
|
if (errorCode == CMS_ERROR_CODES.OK)
|
|
return false;
|
|
else
|
|
return true;
|
|
}
|
|
|
|
public static CmsError InternalError(string message)
|
|
{
|
|
return new CmsError(CMS_ERROR_CODES.INTERNAL_ERROR, message);
|
|
}
|
|
|
|
public static CmsError NcError(string message)
|
|
{
|
|
return new CmsError(CMS_ERROR_CODES.NC_PROD_ERROR, message);
|
|
}
|
|
}
|
|
|
|
public enum CMS_ERROR_CODES : uint
|
|
{
|
|
OK = 0,
|
|
NC_PROD_ERROR = 1,
|
|
NOT_CONNECTED = 2,
|
|
PROC_NOT_FOUND = 3,
|
|
FUNCTION_NOT_ALLOWED = 4,
|
|
BIT_NOT_IN_RANGE = 5,
|
|
BYTE_NOT_IN_RANGE = 6,
|
|
INTERNAL_ERROR = 7,
|
|
INCORRECT_PARAMETERS = 8,
|
|
NC_LANGUAGE_ERROR = 9,
|
|
SIEMENS_ENVIRONMENT_NOT_FOUND = 10,
|
|
SIEMENS_HMI_NOT_RUNNING = 11,
|
|
MAX_TOOL_REACHED = 12,
|
|
MAX_EDGES_PER_TOOL_REACHED = 13,
|
|
MAX_FAMILY_REACHED = 14,
|
|
MAX_MULTITOOL_REACHED = 15,
|
|
MAX_TOOLS_PER_MULTITOOL_REACHED = 16,
|
|
MAX_MULTITOOL_LOCATION_REACHED = 17,
|
|
MAG_POS_OCCUPIED = 18,
|
|
MAGAZINE_OCCUPIED = 19,
|
|
TOOL_IS_MOUNTED = 20,
|
|
TOOL_AND_POSITION_NOT_MATCHING = 21,
|
|
FILE_NOT_FOUND = 22,
|
|
PLC_NOT_RUNNING = 23,
|
|
HMI_NOT_RESPONDING = 24,
|
|
PROGRAM_IS_SELECTED = 25,
|
|
SELECTED_PROCESS = 26,
|
|
OSAI_TT_FOLDER_NOT_FOUND = 27
|
|
}
|
|
} |