Access Control API
API for access control, which can manage access authority by individual, group, time schedules.
BS2_GetAccessGroup
Retrieves selected access groups.
BS2_GetAllAccessGroup
Retrieves all access groups.
BS2_SetAccessGroup
Configures an access group.
BS2_RemoveAccessGroup
Removes selected access groups.
BS2_RemoveAllAccessGroup
Removes all access groups.
BS2_GetAccessLevel
Retrieves selected access levels.
BS2_GetAllAccessLevel
Retrieves all access levels.
BS2_SetAccessLevel
Configures an access level.
BS2_RemoveAccessLevel
Removes selected access levels.
BS2_RemoveAllAccessLevel
Removes all access levels.
BS2_GetAccessSchedule
Retrieves selected time schedules.
BS2_GetAllAccessSchedule
Retrieves all time schedules.
BS2_SetAccessSchedule
Configures a time schedule.
BS2_RemoveAccessSchedule
Removes selected time schedules.
BS2_RemoveAllAccessSchedule
Removes all time schedules.
BS2_GetHolidayGroup
Retrieves selected holiday groups.
BS2_GetAllHolidayGroup
Retrieves all holiday groups.
BS2_SetHolidayGroup
Configures a holiday group.
BS2_RemoveHolidayGroup
Removes selected holiday groups.
BS2_RemoveAllHolidayGroup
Removes all holiday groups.
Structure
BS2AccessGroup
typedef struct {
uint32_t id;
char name[BS2_MAX_ACCESS_GROUP_NAME_LEN];
uint8_t numAccessLevels;
uint8_t reserved[3];
uint32_t accessLevels[BS2_MAX_ACCESS_LEVEL_PER_ACCESS_GROUP];
} BS2AccessGroup;
-
idAccess group ID.
-
nameName of the access group that will be displayed on the BioStar application.
-
numAccessLevelsNumber of access levels that belongs to an access group.
-
reservedReserved space.
-
accessLevelsList of access levels that belongs to an access group.
BS2DoorSchedule
typedef struct {
uint32_t doorID;
uint32_t scheduleID;
} BS2DoorSchedule ;
-
doorIDDoor ID.
-
scheduleIDSchedule ID.
BS2AccessLevel
typedef struct {
uint32_t id;
char name[BS2_MAX_ACCESS_GROUP_NAME_LEN];
uint8_t numDoorSchedules;
uint8_t reserved[3];
BS2DoorSchedule doorSchedules[BS2_MAX_ACCESS_LEVEL_PER_ACCESS_GROUP];
} BS2AccessLevel;
-
idAccess level ID. The ID should be a number less than 32768(0x7FFF).
This is due to a limitation where this ID needs to be shared with floor levels for lift control.
-
nameName of the access level that will be displayed on the BioStar application.
-
numDoorSchedulesNumber of schedules allocated to a door that belongs to an access level.
-
reservedReserved space.
-
doorSchedulesList of schedules allocated to a door that belongs to an access level.
BS2TimePeriod
typedef struct {
int16_t startTime;
int16_t endTime;
} BS2TimePeriod;
-
startTimeStarting time of the time period. The unit of the value is minutes.
-
endTimeEnding time of the time period. The unit of the value is minutes.
BS2DaySchedule
typedef struct {
uint8_t numPeriods;
uint8_t reserved[3];
BS2TimePeriod periods[BS2_MAX_TIME_PERIODS_PER_DAY];
} BS2DaySchedule;
-
numPeriodsNumber of time periods.
-
reservedReserved space.
-
periodsList of time periods, which can be configured up to 5 time periods.
BS2WeeklySchedule
typedef struct {
BS2DaySchedule schedule[BS2_NUM_WEEKDAYS];
} BS2WeeklySchedule;
-
scheduleWeekly schedule that has total 7 daily schedules.
BS2DailySchedule
typedef struct {
uint32_t startDate;
uint8_t numDays;
uint8_t reserved[3];
BS2DaySchedule schedule[BS2_MAX_DAYS_PER_DAILY_SCHEDULE];
} BS2DailySchedule;
-
startDateStarting date of the schedule.
-
numDaysNumber of the daily schedule.
-
reservedReserved space.
-
scheduleList of daily schedules starting from the startDate.
BS2HolidaySchedule
typedef struct {
uint32_t id;
BS2DaySchedule schedule;
} BS2HolidaySchedule;
-
startDateHoliday schedule ID.
-
scheduleHoliday daily schedule.
BS2Schedule
typedef struct
{
uint32_t id;
char name[BS2_MAX_SCHEDULE_NAME_LEN];
uint8_t isDaily;
uint8_t numHolidaySchedules;
uint8_t reserved[2];
union
{
BS2WeeklySchedule weekly;
BS2DailySchedule daily;
}schedule;
BS2HolidaySchedule holidaySchedules[BS2_MAX_HOLIDAY_GROUPS_PER_SCHEDULE];
}BS2Schedule;
-
idSchedule ID.
PrecauciónYou should avoid using 0 and 1 as the schedule ID.
Schedule ID 0 is recognized as 'Not used' and Schedule ID 1 is recognized as 'Always' for every device.
-
nameName of the schedule that will be displayed on the BioStar application.
-
isDailyDecides whether it's a daily schedule or a weekly schedule.
-
numHolidaySchedulesNumber of holiday schedules.
-
reservedReserved space.
-
weeklyWeekly schedule. This will be valid only when isDaily is set to 0.
-
dailyDaily schedule. This will be valid when isDaily has a value rather than 0.
-
holidaySchedulesList of holiday schedules.
BS2Holiday
typedef struct {
uint32_t date;
uint8_t recurrence;
} BS2Holiday;
-
dateDate of the holiday.
-
recurrenceThe value of repetition.
Value Description 0 Does not repeat 1 Repeat yearly 2 Repeat monthly 3 Repeat weekly
BS2HolidayGroup
typedef struct
{
uint32_t id;
char name[BS2_MAX_SCHEDULE_NAME_LEN];
uint8_t numHolidays;
uint8_t reserved[3];
BS2Holiday holidays[BS2_MAX_HOLIDAYS_PER_GROUP];
}BS2HolidayGroup;
-
idHoliday group ID.
-
nameName of the holiday group that will be displayed on the BioStar application.
-
numHolidaysNumber of holidays.
-
reservedReserved space.
-
holidaysList of holidays.