d8848e45f0
Added IsActive, IsSelected fields to heads model
156 lines
6.3 KiB
C#
156 lines
6.3 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.Reflection;
|
|
|
|
namespace Step.Model
|
|
{
|
|
public static class Constants
|
|
{
|
|
public enum ACTIONS
|
|
{
|
|
READ,
|
|
WRITE
|
|
}
|
|
|
|
public enum ERROR_LEVEL
|
|
{
|
|
INFO = 1,
|
|
WARNING = 2,
|
|
ERROR = 3,
|
|
FATAL = 4
|
|
}
|
|
|
|
public enum SOFTKEY_TYPE
|
|
{
|
|
TOGGLE = 0,
|
|
PROCEDURE = 1,
|
|
GROUP = 2
|
|
}
|
|
|
|
public enum HEAD_TYPE
|
|
{
|
|
SPINDLE = 0,
|
|
WJ = 1,
|
|
AWJ = 2,
|
|
LASER = 3
|
|
}
|
|
|
|
public static class NC_VENDOR
|
|
{
|
|
public const string DEMO = "DEMO";
|
|
public const string FANUC = "FANUC";
|
|
public const string SIEMENS = "SIEMENS";
|
|
public const string OSAI = "OSAI";
|
|
}
|
|
// Database config
|
|
public const string DATABASE_USER = "root";
|
|
public const string DATABASE_PWD = "root";
|
|
public const string DATABASE_NAME = "step";
|
|
|
|
// Registry key
|
|
public const string REGISTER_MACHINE_ID_KEY_NAME = "MachineUniqueId";
|
|
|
|
// Token fields Keys
|
|
public const string MACHINE_ID_KEY = "machineId";
|
|
public const string ROLE_LEVEL_KEY = "roleLevel";
|
|
public const string USERNAME_KEY = "username";
|
|
public const string USER_ID_KEY = "id";
|
|
|
|
// Names in the xml file
|
|
public const string SERVER_CONFIG_KEY = "serverConfig";
|
|
public const string NC_CONFIG_KEY = "ncConfig";
|
|
public const string AREAS_CONFIG_KEY = "areasConfig";
|
|
|
|
// Step Areas
|
|
public class AREAS
|
|
{
|
|
public const string PRODUCTION_KEY = "production";
|
|
public const string TOOLING_KEY = "tooling";
|
|
public const string REPORT_KEY = "report";
|
|
public const string ALARMS_KEY = "alarms";
|
|
public const string MAINTENANCE_KEY = "maintenance";
|
|
public const string UTILITIES_KEY = "utilities";
|
|
public const string SCADA_KEY = "scada";
|
|
public const string GENERAL_KEY = "general";
|
|
public const string UNDER_HOOD = "underHood";
|
|
}
|
|
|
|
// Filenames
|
|
|
|
// Config File Names
|
|
public static readonly string BASE_PATH = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
|
public const string CONFIG_DIRECTORY = "Config\\";
|
|
public const string SERVER_CONFIG_SCHEMA_PATH = CONFIG_DIRECTORY + "serverConfigValidator.xsd";
|
|
public const string SERVER_CONFIG_PATH = CONFIG_DIRECTORY + "serverConfig.xml";
|
|
|
|
public const string AREAS_CONFIG_SCHEMA_PATH = CONFIG_DIRECTORY + "areasConfigValidator.xsd";
|
|
public const string AREAS_CONFIG_PATH = CONFIG_DIRECTORY + "areasConfig.xml";
|
|
|
|
public const string MAINTENANCES_CONFIG_SCHEMA_PATH = CONFIG_DIRECTORY + "maintenancesConfigValidator.xsd";
|
|
public const string MAINTENANCES_CONFIG_PATH = CONFIG_DIRECTORY + "maintenancesConfig.xml";
|
|
|
|
public const string USER_SOFTKEYS_CONFIG_SCHEMA_PATH = CONFIG_DIRECTORY + "userSoftKeyConfigValidator.xsd";
|
|
public const string USER_SOFTKEYS_CONFIG_PATH = CONFIG_DIRECTORY + "userSoftKeyConfig.xml";
|
|
|
|
public const string ALARMS_CONFIG_SCHEMA_PATH = CONFIG_DIRECTORY + "alarmsConfigValidator.xsd";
|
|
public const string ALARMS_CONFIG_PATH = CONFIG_DIRECTORY + "alarmsConfig.xml";
|
|
|
|
public const string HEADS_CONFIG_SCHEMA_PATH = CONFIG_DIRECTORY + "headsConfigValidator.xsd";
|
|
public const string HEADS_CONFIG_PATH = CONFIG_DIRECTORY + "headsConfig.xml";
|
|
|
|
public const string NC_SOFTKEYS_CONFIG_SCHEMA_PATH = CONFIG_DIRECTORY + "ncSoftKeyConfigValidator.xsd";
|
|
public const string NC_SOFTKEYS_CONFIG_PATH = CONFIG_DIRECTORY + "ncSoftKeyConfig.xml";
|
|
|
|
public static string WEBSITE_DIRECTORY = Path.Combine(BASE_PATH, "..", "wwwroot");
|
|
public static string LANGUAGE_PACK_DIRECTORY = BASE_PATH + "\\languages\\";
|
|
public static string LANGUAGE_SCHEMA_PATH = BASE_PATH + "\\LanguageValidator.xsd";
|
|
|
|
// MVVM Messages to server UI
|
|
public const string SEND_STOP_SERVER = "STOP_SERVER";
|
|
public const string SEND_MESSAGE = "SEND_MESSAGE";
|
|
public const string SEND_NC_STATUS = "NC_STATUS";
|
|
public const string SEND_THREADS_STATUS = "THREAD_STATUS";
|
|
public const string SHOW_MSG_UI = "SHOW_MSG_UI";
|
|
|
|
// MVVM Messages to signalR tasks
|
|
public const string SEND_ALARMS = "SEND_ALARMS";
|
|
public const string SEND_POWER_ON_DATA = "SEND_POWER_ON_DATA";
|
|
public const string SEND_GENERIC_DATA = "SEND_GENERIC_DATA";
|
|
public const string SEND_AXES = "SEND_AXES";
|
|
public const string SEND_PROCESSES_DATA = "SEND_PROCESSES_STATUS";
|
|
public const string SEND_FUNCTIONALITY_DATA = "SEND_FUNCTION_DATA";
|
|
public const string SEND_EXPIRED_MAINTENANCES_DATA = "SEND_EXPIRED_MAINTENANCES_DATA";
|
|
public const string SEND_USER_SOFTKEYS_DATA = "SEND_USER_SOFTKEYS_DATA";
|
|
public const string SEND_NC_SOFTKEYS_DATA = "SEND_NC_SOFTKEYS_DATA";
|
|
public const string SEND_HEADS_DATA = "SEND_HEADS_DATA";
|
|
public const string SEND_AXIS_NAMES_DATA = "SEND_AXIS_NAMES_DATA";
|
|
|
|
public const string BROADCAST_DATA = "BROADCAST_DATA";
|
|
|
|
// ID prefix
|
|
public const string MAINTENANCE_PREFIX_ID = "maint_";
|
|
public const string SOFTKEY_PREFIX_ID = "softkey_";
|
|
public const string ALARM_PREFIX = "alarm_";
|
|
|
|
// Maintenances types
|
|
public const string MAINT_MACHINE_INTERVAL_TYPE = "machine_interval";
|
|
public const string MAINT_TIME_INTERVAL_TYPE = "time_interval";
|
|
public const string MAINT_EXPIRATION_DATE_TYPE = "exp_date";
|
|
|
|
|
|
public static class FUNCTIONALITY_NAMES
|
|
{
|
|
public const string GENERAL = "general";
|
|
public const string USER_FUNCTIONS = "userFunctions";
|
|
public const string NC_DATA = "ncData";
|
|
public const string ALARM_CMD = "alarmCmd";
|
|
public const string STARTUP_ICONS = "startupIcons";
|
|
public const string PROCESS_CMD = "processCmd";
|
|
public const string NC_SOFTKEY = "ncSoftkeys";
|
|
public const string USER_SOFTKEY = "userSoftkeys";
|
|
public const string HEADS_CMD = "headsCmd";
|
|
public const string AXES_CMD = "axesCmd";
|
|
}
|
|
}
|
|
}
|