class Lenel::OpenAccess

Included Modules

Defined in:

lenel/open_access.cr:4
lenel/open_access.cr:8

Class Method Summary

Instance Method Summary

Class Method Detail

def self.driver_interface : String #

Instance Method Detail

def badge_types #

Query the available badge types.

Badge types contain default configuration that is applied to any badge created under them. This includes items such as access areas, activation windows and other bulk config. These may then be override on individual badge instances.


[View source]
def check_comms #

Test service connectivity.


[View source]
def connected #

[View source]
def create_badge(type : Int32, id : Int64, personid : Int32, uselimit : Int32 | Nil = nil, activate : Time | Nil = nil, deactivate : Time | Nil = nil) #

Creates a new badge of the specied type, belonging to personid with a specific id.

Note: 'id' is the physical badge number (e.g. the ID written to an NFC chip)


[View source]
def create_badge_epoch(type : Int32, id : Int64, personid : Int32, activate_epoch : Int32, deactivate_epoch : Int32, uselimit : Int32 | Nil = nil) #

[View source]
def create_cardholder(email : String, firstname : String, lastname : String) #

Creates a new cardholder.

An error will be returned if an existing cardholder exists for the specified email address.


[View source]
def delete_badge(badgekey : Int32) : Nil #

Deletes a badge with the specified badgekey.


[View source]
def delete_badges(badgekeys : Array(Int32)) : Int32 #

[View source]
def delete_cardholder(id : Int32) : Nil #

Deletes a cardholed by their person id.


[View source]
def disconnected #

[View source]
def list_badges(personid : Int32) #

List badges belonging to a cardholder


[View source]
def list_directories #

Query the directories available for auth.


[View source]
def list_events(filter : String, page_number : Int32 | Nil = nil) #

List Logged Events


[View source]
def list_events_in_range(filter : String, from : Time | Nil = nil, til : Time | Nil = nil) #

List events that occured during a given time window. Default to past 24h.


[View source]
def lookup_badge_id(id : Int64) #

Get badge by id (instead of badgekey)


[View source]
def lookup_badge_key(badgekey : Int32) #

Get badge by badgekey (instead of id) Note: id is the number in the QR data or burnt to the swipe card. badgekey is Lenel's primary key for badges


[View source]
def lookup_cardholder(email : String) #

Lookup a cardholder by email address.


[View source]
def lookup_cardholder_id(id : Int32) #

Lookup a cardholder by ID


[View source]
def lookup_cardholders(email : String) #

[View source]
def on_load #

[View source]
def on_update #

[View source]
def search(type_name : String, filter : String | Nil = nil) #

[View source]
def search_readers(filter : String) #

List card readers matching a given filter


[View source]
def update_badge(badgekey : Int32, id : Int64 | Nil = nil, uselimit : Int32 | Nil = nil, activate : Time | Nil = nil, deactivate : Time | Nil = nil) #

[View source]
def update_badge_epoch(badgekey : Int32, activate_epoch : Int32, deactivate_epoch : Int32, id : Int64 | Nil = nil, uselimit : Int32 | Nil = nil) #

[View source]
def version #

Gets the version of the attached OnGuard system.


[View source]