C API for BALTECH SDK

§ brp_Sec_GetCurAcMask()

brp_errcode brp_Sec_GetCurAcMask ( brp_protocol  protocol,
brp_HostSecurityAccessConditionBits AcMask 
)

This command retrieves the Access Condition Mask, which is applied by the reader in the current context (i.e. security level, protocol).

If this command is executed in security level 1-3 the actual Access Condition Mask is defined by the value which has been set for the particular security level before via Sec.SetAcMask command respectively the configuration value Device/HostSecurity/AccessConditionMask. In this case this command is identical to Sec.GetAcMask for the respective security level.

In case of security level 0 (plain access) the applied Access Condition Mask is determined by the protocol-specific Access Condition Mask ( Protocols/AccessConditionsBitsStd, Protocols/AccessConditionsBitsAlt). If this value is not available for the particular protocol the reader uses the value that has been set with Sec.SetAcMask respectively Device/HostSecurity/AccessConditionMask[0] before in combination (bitwise AND) with a hard-coded default value as fallback; in most cases this default value corresponds to all access rights - for BRP over TCP it is zero.

It is not possible to deny the retrieval of the Access Condition Mask via the "Encryption and Authorization" settings in the configuration. This means that this command will never return the ERR_ACCESS_DENIED status code.

Parameters
[in]protocolused to execute the command
[out]AcMaskCurrent Access Condition Mask. Every Feature in this list can be disabled by not setting the corresponding bit.