Пример #1
0
        private SystemCapabilities()
        {
            // don't change service capabilities in other places to maintain synchronization of
            // typed properties and XmlElement's

            //Device Management Service
            DeviceServiceCapabilities          = new DeviceServiceCapabilities();
            DeviceServiceCapabilities.Network  = new NetworkCapabilities();
            DeviceServiceCapabilities.Security = new SecurityCapabilities();
            DeviceServiceCapabilities.Security.HttpDigestSpecified = true;
            DeviceServiceCapabilities.Security.HttpDigest          = true;
            DeviceServiceCapabilities.System = new Device10.SystemCapabilities();
            DeviceServiceCapabilities.System.DiscoveryByeSpecified = true;
            DeviceServiceCapabilities.System.DiscoveryBye          = false;


            //Door Control Service
            DoorServiceCapabilities          = new ServiceDoorControl10.ServiceCapabilities();
            DoorServiceCapabilities.MaxLimit = 7;

            //Access Control Service
            AccessControlCapabilities = new ServiceAccessControl10.ServiceCapabilities();
            //AccessControlCapabilities.DisableAccessPointSpecified = true;
            //AccessControlCapabilities.DisableAccessPoint = true;
            AccessControlCapabilities.MaxLimit = 1;

            //Credential Service
            CredentialCapabilities                = new ServiceCredential10.ServiceCapabilities();
            CredentialCapabilities.MaxLimit       = 3;
            CredentialCapabilities.MaxCredentials = 10;
            CredentialCapabilities.CredentialAccessProfileValiditySupported = true;
            CredentialCapabilities.CredentialValiditySupported    = true;
            CredentialCapabilities.MaxAccessProfilesPerCredential = 5;
            CredentialCapabilities.ResetAntipassbackSupported     = true;
            CredentialCapabilities.ValiditySupportsTimeValue      = true;
            CredentialCapabilities.SupportedIdentifierType        = new string[] { "pt:Card", "pt:PIN" };

            //Supported Format Types (probably refactoring requiered to be flexible)
            List <ServiceCredential10.CredentialIdentifierFormatTypeInfo> formatTypes;

            ServiceCredential10.CredentialIdentifierFormatTypeInfo credentialIdentifierFormatTypeInfo;

            SupportedFormatTypes = new Dictionary <string, List <ServiceCredential10.CredentialIdentifierFormatTypeInfo> >();

            formatTypes = new List <ServiceCredential10.CredentialIdentifierFormatTypeInfo>();

            credentialIdentifierFormatTypeInfo             = new ServiceCredential10.CredentialIdentifierFormatTypeInfo();
            credentialIdentifierFormatTypeInfo.FormatType  = "WIEGAND26";
            credentialIdentifierFormatTypeInfo.Description = "Standard 26 bit Wiegand format as defined by SIA standard (SIA AC-01).";
            formatTypes.Add(credentialIdentifierFormatTypeInfo);
            credentialIdentifierFormatTypeInfo             = new ServiceCredential10.CredentialIdentifierFormatTypeInfo();
            credentialIdentifierFormatTypeInfo.FormatType  = "WIEGAND37";
            credentialIdentifierFormatTypeInfo.Description = "Description";
            formatTypes.Add(credentialIdentifierFormatTypeInfo);

            SupportedFormatTypes.Add("pt:Card", formatTypes);

            formatTypes = new List <ServiceCredential10.CredentialIdentifierFormatTypeInfo>();

            credentialIdentifierFormatTypeInfo             = new ServiceCredential10.CredentialIdentifierFormatTypeInfo();
            credentialIdentifierFormatTypeInfo.FormatType  = "WIEGAND37";
            credentialIdentifierFormatTypeInfo.Description = "Description";
            formatTypes.Add(credentialIdentifierFormatTypeInfo);
            credentialIdentifierFormatTypeInfo             = new ServiceCredential10.CredentialIdentifierFormatTypeInfo();
            credentialIdentifierFormatTypeInfo.FormatType  = "WIEGAND37_FACILITY";
            credentialIdentifierFormatTypeInfo.Description = "Description";
            formatTypes.Add(credentialIdentifierFormatTypeInfo);
            credentialIdentifierFormatTypeInfo             = new ServiceCredential10.CredentialIdentifierFormatTypeInfo();
            credentialIdentifierFormatTypeInfo.FormatType  = "SIMPLE_NUMBER32";
            credentialIdentifierFormatTypeInfo.Description = "Description";
            formatTypes.Add(credentialIdentifierFormatTypeInfo);

            SupportedFormatTypes.Add("pt:PIN", formatTypes);

            //Access Rules Service
            AccessRulesCapabilities          = new ServiceAccessRules10.ServiceCapabilities();
            AccessRulesCapabilities.MaxLimit = 2;
            AccessRulesCapabilities.MaxAccessPoliciesPerAccessProfile = 2;
            AccessRulesCapabilities.MaxAccessProfiles = 5;
            AccessRulesCapabilities.MultipleSchedulesPerAccessPointSupported = true;

            //Schedule Service
            ScheduleCapabilities                             = new ServiceSchedule10.ServiceCapabilities();
            ScheduleCapabilities.MaxLimit                    = 2;
            ScheduleCapabilities.MaxSchedules                = 4;
            ScheduleCapabilities.MaxSpecialDayGroups         = 6;
            ScheduleCapabilities.MaxDaysInSpecialDayGroup    = 2;
            ScheduleCapabilities.MaxSpecialDaysSchedules     = 4;
            ScheduleCapabilities.MaxTimePeriodsPerDay        = 8;
            ScheduleCapabilities.SpecialDaysSupported        = true;
            ScheduleCapabilities.StateReportingSupported     = true;
            ScheduleCapabilities.ExtendedRecurrenceSupported = true;

            //Events Service
            EventsCapabilities = new Events10.Capabilities();
            EventsCapabilities.MaxNotificationProducers      = 3;
            EventsCapabilities.MaxPullPoints                 = 3;
            EventsCapabilities.PersistentNotificationStorage = false;
            EventsCapabilities.WSPullPointSupport            = true;
            EventsCapabilities.WSSubscriptionPolicySupport   = true;
            EventsCapabilities.WSPausableSubscriptionManagerInterfaceSupport = false;

            InitializeXmlElements();
        }
Пример #2
0
        private SystemCapabilities()
        {
            // don't change service capabilities in other places to maintain synchronization of
            // typed properties and XmlElement's

            //Device Management Service
            DeviceServiceCapabilities          = new DeviceServiceCapabilities();
            DeviceServiceCapabilities.Network  = new NetworkCapabilities();
            DeviceServiceCapabilities.Security = new SecurityCapabilities();
            DeviceServiceCapabilities.System   = new Device10.SystemCapabilities();

            //Door Control Service
            DoorServiceCapabilities          = new ServiceDoorControl10.ServiceCapabilities();
            DoorServiceCapabilities.MaxLimit = 7;

            //Access Control Service
            AccessControlCapabilities = new ServiceAccessControl10.ServiceCapabilities();
            //AccessControlCapabilities.DisableAccessPointSpecified = true;
            //AccessControlCapabilities.DisableAccessPoint = true;
            AccessControlCapabilities.MaxLimit = 1;

            //Credential Service
            CredentialCapabilities                = new ServiceCredential10.ServiceCapabilities();
            CredentialCapabilities.MaxLimit       = 3;
            CredentialCapabilities.MaxCredentials = 10;
            CredentialCapabilities.CredentialAccessProfileValiditySupported = true;
            CredentialCapabilities.CredentialValiditySupported    = true;
            CredentialCapabilities.MaxAccessProfilesPerCredential = 5;
            CredentialCapabilities.ResetAntipassbackSupported     = true;
            CredentialCapabilities.SupportedIdentifierType        = new string[] { "ONVIFCard", "ONVIFPIN" };

            //Supported Format Types (probably refactoring requiered to be flexible)
            List <ServiceCredential10.CredentialIdentifierFormatTypeInfo> formatTypes;

            ServiceCredential10.CredentialIdentifierFormatTypeInfo credentialIdentifierFormatTypeInfo;

            SupportedFormatTypes = new Dictionary <string, List <ServiceCredential10.CredentialIdentifierFormatTypeInfo> >();

            formatTypes = new List <ServiceCredential10.CredentialIdentifierFormatTypeInfo>();

            credentialIdentifierFormatTypeInfo             = new ServiceCredential10.CredentialIdentifierFormatTypeInfo();
            credentialIdentifierFormatTypeInfo.FormatType  = "WIEGAND26";
            credentialIdentifierFormatTypeInfo.Description = "Standard 26 bit Wiegand format as defined by SIA standard (SIA AC-01).";
            formatTypes.Add(credentialIdentifierFormatTypeInfo);
            credentialIdentifierFormatTypeInfo             = new ServiceCredential10.CredentialIdentifierFormatTypeInfo();
            credentialIdentifierFormatTypeInfo.FormatType  = "WIEGAND37";
            credentialIdentifierFormatTypeInfo.Description = "Description";
            formatTypes.Add(credentialIdentifierFormatTypeInfo);


            SupportedFormatTypes.Add("ONVIFCard", formatTypes);

            formatTypes = new List <ServiceCredential10.CredentialIdentifierFormatTypeInfo>();

            credentialIdentifierFormatTypeInfo             = new ServiceCredential10.CredentialIdentifierFormatTypeInfo();
            credentialIdentifierFormatTypeInfo.FormatType  = "WIEGAND37";
            credentialIdentifierFormatTypeInfo.Description = "Description";
            formatTypes.Add(credentialIdentifierFormatTypeInfo);
            SupportedFormatTypes.Add("ONVIFPIN", formatTypes);

            //Access Rules Service
            AccessRulesCapabilities          = new ServiceAccessRules10.ServiceCapabilities();
            AccessRulesCapabilities.MaxLimit = 2;
            AccessRulesCapabilities.MaxAccessPoliciesPerAccessProfile = 2;
            AccessRulesCapabilities.MaxAccessProfiles = 4;
            AccessRulesCapabilities.MultipleSchedulesPerAccessPointSupported = true;

            InitializeXmlElements();
        }