Example #1
0
        public ISecurityAccessAlgorithm GetSecurityAccessAlgorithm()
        {
            DcmCanConfig config = propertyGrid.SelectedObject as DcmCanConfig;

            return(SecurityAccessAlgorithManager.Instance().
                   GetSecurityAccessAlgorithm(config.SecurityAccessType));
        }
Example #2
0
        public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
        {
            var names =
                SecurityAccessAlgorithManager.Instance().GetSecurityAccessAlgorithNames();
            List <string> ret = new List <string>();

            foreach (var name in names)
            {
                ret.Add(name);
            }
            return(new StandardValuesCollection(ret.ToArray()));
        }
Example #3
0
 public static SecurityAccessAlgorithManager Instance()
 {
     if (instance == null)
     {
         lock (syncRoot)
         {
             if (instance == null)
             {
                 instance = new SecurityAccessAlgorithManager();
             }
         }
     }
     return(instance);
 }
Example #4
0
        public DcmCanConfig()
        {
            CanPhysicalRequestId = 0x766;
            CanFunctionRequestId = 0x7DF;
            CanResponseId        = 0x706;

            CanTickEnabled   = false;
            CanTickPeriod    = 3;
            SuppressResponse = true;

            foreach (var name in SecurityAccessAlgorithManager.Instance()
                     .GetSecurityAccessAlgorithNames())
            {
                SecurityAccessType = name;
                break;
            }
        }