Files
cms_thermo_active/Step.Utils/Constants.cs
T
2018-01-12 12:43:32 +01:00

73 lines
2.5 KiB
C#

using System;
using System.IO;
using System.Reflection;
namespace Step.Utils
{
public static class Constants
{
public enum ACTIONS
{
READ,
WRITE
}
public enum ERROR_LEVEL
{
INFO = 1,
WARNING = 2,
ERROR = 3,
FATAL = 4
}
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";
}
// Token fields Keys
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";
}
// Filenames
public static readonly string BASE_PATH = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
public const string STARTUP_CONFIG_SCHEMA_PATH = "serverConfigValidator.xsd";
public const string STARTUP_CONFIG_PATH = "serverConfig.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 names
public const string MVVM_STOP_SERVER = "STOP_SERVER";
public const string MVVM_SEND_MESSAGE = "SEND_MESSAGE";
public const string MVVM_NC_STATUS = "NC_STATUS";
public const string MVVM_NC_THREADS = "THREAD_STATUS";
// MVVM Messages tasks names
public const string SEND_ALARMS = "SEND_ALARMS";
public const string SEND_GENERIC_DATA = "SEND_GENERIC_DATA";
public const string SEND_AXES = "SEND_AXES";
}
}