A3200 运动控制系统的全局静态Global类

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
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值