Repository navigation
platform sdk door templates
In Security Center, a door template contains reusable door configuration that you apply to one or more doors. Build a template once and apply it to every door that should share the same configuration.
A DoorTemplate (in Genetec.Sdk.Entities.AccessPoints.DoorTemplates) bundles four independent categories. Each category is enabled by a feature toggle on the template:
| Toggle | Category covered |
|---|---|
IsDoorPropertiesEnabled |
Door behavior: timings, lock behavior, held-open and forced-open behavior. |
IsHardwareMappingEnabled |
Physical inputs and outputs mapped to the door's logical access points. |
IsHardwareSettingsEnabled |
Card-and-pin reader settings per door side. |
IsAccessRulesEnabled |
Per-side access rule assignments. |
Set the toggle for each category you want the template to manage. Mutating any property or descriptor in a category whose toggle is false raises SdkException with SdkError.InvalidOperation.
Create the template through the engine and set the toggles for the categories you intend to configure:
DoorTemplate template = (DoorTemplate)engine.CreateEntity(
"Standard perimeter door",
EntityType.DoorTemplate);
template.IsDoorPropertiesEnabled = true;
template.IsHardwareMappingEnabled = true;
template.IsHardwareSettingsEnabled = true;
template.IsAccessRulesEnabled = true;Configure only the categories whose toggle you set to true. The next sections describe how to populate each category.
When IsDoorPropertiesEnabled = true, the template carries the door-behavior properties:
- Grant and entry timings, in seconds:
NormalGrantTime,ExtendedGrantTime,NormalEntryTime,ExtendedEntryTime. For example, setNormalGrantTimeto5for five seconds. - Relock and held-open:
DoorRelockOnClose,DoorRelockDelay,DoorHeldBehaviorpaired withDoorHeldOpenDelay, andMaskDoorOpenTooLongWhenUnlockedBySchedule. - Forced-open:
DoorForcedBehavior. - Schedule-driven masking:
MaskAccessWhenUnlockedBySchedule. - Request-to-exit:
GrantOnRex,RexHoldoffWhileOpened,RexHoldOffAfterGrantDelay,RexHoldOffAfterClosedDelay. - Visitor escort enforcement:
EnforceVisitorEscortRulesAlphaSide,EnforceVisitorEscortRulesBetaSide. - Anti-passback timing:
MaximumDelayBetweenSwipes.
DoorHeldBehavior and DoorForcedBehavior are enums that select buzzer-suppression options. Setting any of these properties when IsDoorPropertiesEnabled is false raises SdkException with SdkError.InvalidOperation.
When IsHardwareMappingEnabled = true, the template maps physical inputs and outputs on a unit's interface module to the door's logical access points. Each mapping is an AccessPointSelectorDescriptor:
var entryReader = new AccessPointSelectorDescriptor(
AccessPointType.CardReader,
AccessPointSide.Alpha,
"reader-1");
var sensor = new AccessPointSelectorDescriptor(
AccessPointType.DoorSensor,
AccessPointSide.Alpha,
"input-1");
template.UpdateAccessPointSelectors(
new List<AccessPointSelectorDescriptor>
{
entryReader,
sensor,
});Read the current list with template.GetCurrentAccessPointSelectors(). The Get method returns a fresh list; mutating that list does not push changes back. Build a new list and pass it to UpdateAccessPointSelectors.
AccessPointType identifies the role of the physical device (CardReader, Rex, DoorSensor, DoorLock, Buzzer, EntrySensor, LockSensor, plus floor-control and intrusion variants). AccessPointSide selects which side of the door the device serves (Alpha, Omega, In, Out, plus extended values for direction-aware and intrusion sides). DeviceId is the identifier of the physical device on the interface module.
Set template.InterfaceModuleDeviceDefinition to the GUID of the interface module device definition the template targets. The setter requires IsHardwareMappingEnabled = true.
When IsHardwareSettingsEnabled = true, the template carries per-side card-and-pin reader configuration. Each entry is a CardAndPinSettingsDescriptor:
var alphaSide = new CardAndPinSettingsDescriptor(
cardAndPinCoverage: scheduleGuid,
cardAndPinTimeout: 15000,
readerMode: ReaderMode.CardAndPin,
side: AccessPointSide.Alpha);
template.UpdateCardAndPinSettings(
new List<CardAndPinSettingsDescriptor>
{
alphaSide,
});Read the current settings with template.GetCurrentCardAndPinSettings().
-
CardAndPinCoverageisGuid?and points to aScheduleentity that scopes when the card-and-pin mode is active. -
CardAndPinTimeoutisint?, in milliseconds, and bounds how long the reader waits after the card before timing out. For example,15000is 15 seconds. -
ReaderModeselects how the reader authenticates:None,CardOrPin,CardAndPin, orAssuranceProfile. -
Sidechooses which side of the door the entry applies to.
When IsAccessRulesEnabled = true, the template carries per-side access rule assignments. Each entry is an AccessRuleDescriptor:
var alphaRule = new AccessRuleDescriptor(
AccessPointSide.Alpha,
accessRuleGuid);
template.UpdateAccessRuleDescriptors(
new List<AccessRuleDescriptor>
{
alphaRule,
});Read the current list with template.GetCurrentAccessRuleDescriptors(). The AccessRule GUID points to an AccessRule entity in the system.
Apply projects the configured template onto a target door, using a specific access control unit and interface module:
template.Apply(doorGuid, unitGuid, interfaceGuid);The four-argument overload accepts a createMissingConnections flag. When true, the call can create missing connections defined by the template.
Before either overload applies the template, matching existing connections on the target door are removed. For example, if the target door already has buzzer connections and the template defines a buzzer connection, the door's existing buzzer connections are removed before the template settings are applied.
template.Apply(
doorGuid,
unitGuid,
interfaceGuid,
createMissingConnections: true);All three GUIDs must be non-empty. Passing Guid.Empty for any of them raises ArgumentException.
To list the doors the template has been applied to, call template.GetAppliedDoors().
- About access control: The access control hub.
- About doors, areas, elevators, and access points: The location entities and their per-access-point wiring.
- About access rules and schedules: The policy that grants access at specific access points and door sides.
- Overview
- Connecting to Security Center
- SDK certificates
- Referencing SDK assemblies
- ASP.NET hosting
- SDK compatibility
- Migrating to modern .NET
- Entities
- Entity cache
- Entity loading, cache, and query options
- Detecting entity changes
- Entity change event reference
- Transactions
- Security Center events
- Actions
- Security Desk
- Custom events
- Event-to-actions
- Managing macros
- ReportManager
- ReportManager query reference
- Access control raw events
- DownloadAllRelatedData and StrictResults
- Privileges
- Partitions
- Entity write restrictions
- About custom fields
- About video
- About cameras
- Enrolling a video unit
- Ingesting third-party video
- Archiver and auxiliary archiver roles
- Archive transfer
- About access control
- About cardholders and credentials
- About doors, areas, elevators, and access points
- About access rules and schedules
- About access control units and interface modules
- Enrolling an access control unit
- Door templates
- Visitors
- Mobile credentials
- About threat levels
- About alarms
- About incidents
- Maps
- Logging
- Overview
- Localization
- Certificates
- Lifecycle
- Threading
- State management
- Configuration
- Restricted configuration
- Events
- Queries
- Request manager
- Database
- Entity ownership
- Engine extensions
- Entity mappings
- Server management
- Custom privileges
- Custom entity types
- Resolving non-SDK assemblies
- Deploying plugins
- Modern .NET support
- Overview
- Localization
- Certificates
- Creating modules
- Tasks
- Pages
- Components
- Tile extensions
- Services
- Contextual actions
- Custom actions
- Options extensions
- Configuration pages
- Monitors
- Shared components
- Commands
- Extending events
- Map extensions
- Timeline providers
- Image extractors
- Credential encoders
- Credential readers
- Cardholder fields extractors
- Badge printers
- Content builders
- Dashboard widgets
- Incidents
- Logon providers
- Pinnable content builders
- Custom report pages
- Overview
- Getting started
- Media file formats
- MediaPlayer
- VideoSourceFilter
- MediaExporter
- MediaFile
- G64 converters
- FileCryptingManager
- PlaybackSequenceQuerier
- PlaybackStreamReader
- OverlayFactory
- PtzCoordinatesManager
- AudioTransmitter
- AudioRecorder
- AnalogMonitorController
- Camera blocking
- Overview
- Getting started
- Referencing entities
- Entity operations
- About access control in the Web SDK
- About video in the Web SDK
- Users and user groups
- Partitions
- Custom fields
- Custom card formats
- Actions
- Events and alarms
- Incidents
- Reports
- Tasks
- Macros
- Custom entity types
- System endpoints
- Performance guide
- Reference
- Endpoints
- Constants
- Enumerations
- Under the hood
- Troubleshooting