internal static class Global
{
internal static readonly IDictionary<Drive, ComponentType> CoreDriveIdMappings;
public const int MaxAxes = 32;
public const int DefaultImmediateCommandsTask = 0;
public const int DefaultTaskStopTimeout = 10000;
public const string ProgramExtension = ".pgm";
public const string ProductName = "A3200";
public const string AxisNameParameter = "AxisName";
public const string AxisNameRegex = "^([XYZUABCDVWxyzuabcdvw]|([A-Za-z_]{2}[A-Za-z_0-9]*))$";
public static readonly int StringVariableLength;
public const int MaxCollectionRateKHz = 8;
public const string ImmediateCommandsReturnVariableName = "$return";
public static readonly int MaxUserTasks;
internal const string EnumFlagsValueToSkip = "None";
public const TaskId UnknownTask = (TaskId)(-1);
public const string ParamsNs = "http://www.aerotech.com/xsd/Controller/Parameters/2009/";
public const string UpgradableParamsNs = "http://www.aerotech.com/xsd/StandAlone/Parameters/2006/";
public const string SoftwareRegistryKey = "SOFTWARE\\Aerotech\\A3200";
public const string CommunicationServiceRegistryKey = "SOFTWARE\\Aerotech\\A3200\\CommService";
private static BaseParameters defaultParameters;
private static readonly object defaultParametersLock;
private static string helpFilePath;
public static IFileParameterCreator DefaultFileParametersCreator => FileParameterCreatorFactory.Create(new StringReader(InfoResources.parameters));
public static BaseParameters DefaultParameters
{
get
{
if (defaultParameters == null)
{
lock (defaultParametersLock)
{
if (defaultParameters == null)
{
defaultParameters = new BaseParameters(-1, DefaultFileParametersCreator, AxisParameterCategory.Creator, TaskParameterCategory.Creator);
}
}
}
return new BaseParameters((int)defaultParameters.Axes.Mask, new LocalParameterCreator(defaultParameters), AxisParameterCategory.Creator, TaskParameterCategory.Creator);
}
}
internal static string HelpFilePath
{
get
{
if (helpFilePath == null)
{
helpFilePath = "mk:@MSITStore:" + Path.Combine(SoftwareEnvironment.InstallDirFailSafe, string.Format("Help\\{0}.chm", "A3200")) + "::/";
}
return helpFilePath;
}
}
static Global()
{
StringVariableLength = 188;
MaxUserTasks = Enum.GetValues(typeof(TaskId)).Length;
defaultParametersLock = new object();
helpFilePath = null;
CoreDriveIdMa
A3200 运动控制系统的全局静态Global类
最新推荐文章于 2025-12-11 17:55:33 发布

最低0.47元/天 解锁文章
752

被折叠的 条评论
为什么被折叠?



