Files
cms_thermo_active/Step.Utils/Constants.cs
T
Lucio Maranta 99c2e8dc01 Config reorganization
General refactor
2018-02-09 14:59:24 +01:00

86 lines
3.2 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";
}
// 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";
}
// Filenames
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 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";
// 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";
}
}