| |
- builtins.Exception(builtins.BaseException)
-
- Net2XSException
- net2base.Net2Base(builtins.object)
-
- Net2XS
class Net2XS(net2base.Net2Base) |
|
Net2 Access class |
|
- Method resolution order:
- Net2XS
- net2base.Net2Base
- builtins.object
Methods defined here:
- __enter__(self)
- With enter handler
- __exit__(self, type, value, traceback)
- With exit handler
- __init__(self, host='localhost', port=8025)
- Class constructor
- activate_ioboard_relays(self, ioboard_id, settings)
- Control ioboard relays
Returns True on success
- add_access_level(self, access_level)
- Add new access level
Access_level is a python AccessLevel object type.
Returns True on success.
- add_acu(self, address, acu_type)
- Add new acu device
Acu_types: Classic = 1, Nano = 2, Plus = 3, EasyProxNano = 4, PaxLoc = 7, PaxLocMifare = 8
Returns True on success. (up till 4.27, there is a bug in the SDK causing a False on success)
- add_card(self, card_nr, type_id, user_id)
- Add a new card to the given user
Returns True on success.
- add_event_record(self, event_type, event_subtype=None, address=0, subaddress=0, user_id=None, card_nr=0, event_detail=None, linked_event_id=0, ioboard_id=0, input_id=0, output_id=0)
- Add an event record
Returns True on success.
- add_time_zone(self, time_zone)
- Add new time zone
Time_zone is a python TimeZone object type.
Returns True on success.
- add_user(self, access_level_id=1, department_id=0, anti_passback_ind=False, alarm_user_ind=False, first_name=None, middle_name=None, sur_name=None, telephone_no=None, telephone_extension=None, pin_code=None, activation_date=None, active=True, fax_no=None, expiry_date=None, custom_fields=None, user_picture=None)
- Add user record
DateTime fields can be either python or dotnet objects.
If activation date is None, the current date will be used.
If expiry date is None, the user entry will not expire.
Custom_fields is a string array (15) of which the first element is
ignored.
Returns True on success.
- are_doors_being_synchronised(self)
- Return if synchronization is taking place
Returns a boolean
- authenticate(self, user_id, password)
- Authenticate to Net2
- close_door(self, device_address)
- Close a door
Returns True on success
- control_door(self, device_address, relay, function, door_open_time, led_flash)
- Control a door
Relay is 0 or 1, for relay 1 or 2.
Function 0 Close, 1 Timed open, 2 Hold Open.
Door_open_time in ms.
Led_flash see Net2 API.
Returns True on success.
- deactivate_user(self, user_id)
- Deactivate user. Preferred method iso delete.
Returns True on success
- delete_access_level(self, access_level_id)
- Delete access level
Returns True on success.
- delete_acu(self, address)
- Delete acu device
Return True on success.
- delete_card(self, card_nr)
- Delete a card with the given card_nr
Returns True on success (even if card_nr did not exist).
- delete_time_zone(self, time_zone_id)
- Remove time zone with given id
Returns True on success.
- delete_user(self, user_id)
- Delete user record
Returns True on success
- dispose(self)
- Dispose Net2 client
- get_access_level_details(self, access_level_id)
- Obtain access level details
Returns a dataset.
- get_access_level_id_by_name(self, name)
- Get access level id of level with given name
Returns a string or None if the accesslevel could not be found.
- get_access_level_id_by_user(self, user_id)
- Get access level id of given user
Returns an integer or None if the user could not be found
- get_access_levels(self, prefix=None)
- Obtain access levels, optinally profiding a name prefix filter
Prefix is an optional parameter to obtain only access levels with the
given prefix.
Details need to be fetched separately.
Returns a dataset.
- get_area_ids(self, device_address)
- Get area ids of a device
Returns a tuple with area id's (in, out)
- get_cards(self, user_id=None)
- Obtain all 'cards' of the given user id
If no user_id is given, all cards are returned.
Returns a dataset.
- get_department_name(self, department_id)
- Get department name by id
Returns a string or None if department was not found
- get_departments(self)
- Get all departments (ViewDepartments)
Returns a dataset
- get_device_addr_info(self)
- Obtain all relevant device address info
Returns a dataset
- get_door_name(self, device_address)
- Obtain door name
Returns a string
- get_doors(self, device_address=-1)
- Get all doors (ViewDoors)
Device_address is an optional integer
Returns a dataset
- get_operator_level(self, user_id)
- Get operator level of the given user id
Returns an integer.
- get_py_access_levels(self, prefix=None)
- Like get_access_level, but returning a python array of AccessLevel
objects including details!
Returns an array of AccessLevel objects.
- get_py_time_zones(self, time_zone_id=-1)
- Like get_time_zones, but returns a python array of TimeZone objects
Returns an array of TimeZone objects
- get_time_slots(self, access_level_id, area_id)
- Obtain allocated timeslots
Returns a dataset
- get_time_zone_id_by_name(self, name)
- Get time zone id of time zone with given name
Returns a string or None when the timezone could not be found.
- get_time_zones(self, time_zone_id=-1)
- Obtain timezones, including slot data
Time_zone_id is optional. If not provided, all timezones are returned.
Returns a dataset
- get_user_id_by_name(self, name)
- Get user id by name
Name is a (first_name, sur_name) tuple
Returns the id or -1 if not found.
- get_user_name(self, user_id)
- Get user name
Returns a string or None when user is not found
- get_user_record(self, user_id)
- Get user record, from the ViewUserRecords call
Returns an IUserView user record or None if not found
- get_users(self, name=None)
- Get users, from the ViewUserRecords call
Name param is optional tuple (first_name, sur_name)
Returns a dataset
- get_users_ex(self, name=None)
- Get users, from the UsersEx view.
Name param is optional tuple (first_name, sur_name)
Returns a dataset
- hold_door_open(self, device_address)
- Hold a door open
Returns True on success
- modify_user(self, user_id, access_level_id=None, department_id=None, anti_passback_ind=None, alarm_user_ind=None, first_name=None, middle_name=None, sur_name=None, telephone_no=None, telephone_extension=None, pin_code=None, activation_date=None, active=None, fax_no=None, expiry_date=None, custom_fields=None, user_picture=None, delete_image=False)
- Modify user record
Fields omitted keep their original value.
Custom_fields is a string array (15) of which the first element is
ignored.
Providing None custom values in the array, leaves the original value
unchanged.
Returns True on success.
- modify_user_access_level(self, user_id, access_level_id)
- Alter user access level
Returns True on success
- modify_user_picture(self, user_id, user_picture)
- Alter user picture. If user_picture is None, remove the picture.
Returns True on success
- monitor_acu(self, address)
- Monitor events of given acu
Returns True on success
- query_db(self, query)
- Perform a db query
Returns a dataset
- stop_monitoring_acu(self, address)
- Stop monitoring events of given acu
Returns True on success
- update_access_level(self, access_level)
- Update access level
Access_level is a python AccessLevel object type.
Returns True on success.
- update_time_zone(self, time_zone)
- Update existing time zone
Time_zone is a python TimeZone object type.
Returns True on success.
Class methods defined here:
- door_status_str(status) from builtins.type
- Translate door status to human readable string
Returns a csv string with the combined status bits.
Data descriptors defined here:
- client_version
- Client version
- last_error_message
- Last error message
- no_expiration_date
- The 'special' no expiration date of Net2 (1753-01-01)
Returns dotnet DateTime object
- now_date
- The now datetime
Returns dotnet DateTime object
- on_acu_event
Class methods inherited from net2base.Net2Base:
- dataset_to_str(dataset) from builtins.type
- Convert dataset to string presentation
- safe_get_row_val(row, col) from builtins.type
- Null aware fetching of row data
Returns None if the database column is NULL
Data descriptors inherited from net2base.Net2Base:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Net2XSException(builtins.Exception) |
|
Exception class for net2 xs |
|
- Method resolution order:
- Net2XSException
- builtins.Exception
- builtins.BaseException
- builtins.object
Data descriptors defined here:
- __weakref__
- list of weak references to the object (if defined)
Methods inherited from builtins.Exception:
- __init__(self, /, *args, **kwargs)
- Initialize self. See help(type(self)) for accurate signature.
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
Methods inherited from builtins.BaseException:
- __delattr__(self, name, /)
- Implement delattr(self, name).
- __getattribute__(self, name, /)
- Return getattr(self, name).
- __reduce__(...)
- __repr__(self, /)
- Return repr(self).
- __setattr__(self, name, value, /)
- Implement setattr(self, name, value).
- __setstate__(...)
- __str__(self, /)
- Return str(self).
- with_traceback(...)
- Exception.with_traceback(tb) --
set self.__traceback__ to tb and return self.
Data descriptors inherited from builtins.BaseException:
- __cause__
- exception cause
- __context__
- exception context
- __dict__
- __suppress_context__
- __traceback__
- args
| |