Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:configuration_api [2025/06/11 16:15]
mwkim
en:configuration_api [2025/06/13 10:43] (current)
Line 725: Line 725:
     uint8_t smartCardByteOrder;​     uint8_t smartCardByteOrder;​
     uint8_t reserved[1];​     uint8_t reserved[1];​
-BS2_MIFARE_ENCRYPTION mifareEncType;​+    ​BS2_MIFARE_ENCRYPTION mifareEncType;​
 uint8_t reserved[20];​ uint8_t reserved[20];​
 } BS2CardConfig;​ } BS2CardConfig;​
Line 1093: Line 1093:
 Input mask for the wiegand input of the master device. \\ \\ Input mask for the wiegand input of the master device. \\ \\
 **16. //​wiegandCSNIndex//​** \\ **16. //​wiegandCSNIndex//​** \\
-Index that determines in which format the device will send out a wiegand ouput after the card has been read. This field is used only for Mifare and EM devices. Please check the //​useWiegandFormat//​ field of the [[configuration api#​BS2CardConfig]] structure before configuring. \\ \\+Index that determines in which format the device will send out a wiegand ouput after the card has been read. This field is used only for Mifare and EM devices. Please check the //​useWiegandFormat//​ field of the [[configuration api#​BS2CardConfig]] structure before configuring. ​Only one index can be set to this field. 
 + \\ \\
 **17. //​useWiegandUserID//​** \\ **17. //​useWiegandUserID//​** \\
 The flag you can select whether card ID or user ID to be sent via Wiegand output. \\ The flag you can select whether card ID or user ID to be sent via Wiegand output. \\
Line 2651: Line 2652:
     uint8_t ​   numInputs;     uint8_t ​   numInputs;
     uint8_t ​   numSupervised;​     uint8_t ​   numSupervised;​
-    ​uint8_t ​   ​reserved[18];+    ​union { 
 +        uint16_t value; 
 +        struct { 
 +            uint16_t tamperAuxIndex : 4; 
 +            uint16_t acFailAuxIndex : 4; 
 +            uint16_t aux0Type : 1; 
 +            uint16_t aux1Type : 1; 
 +            uint16_t aux2Type : 1; 
 +            uint16_t reserved : 1; 
 +            uint16_t fireAuxIndex : 4; 
 +        } field; 
 +    } aux; 
 +    uint8_t ​    reserved[16];
  
     struct {     struct {
Line 2660: Line 2673:
         uint8_t ​   reserved;         uint8_t ​   reserved;
         uint8_t ​   supervisedResistor;​         uint8_t ​   supervisedResistor;​
-        ​uint8_t ​   reserved1[16];+        ​BS2SupervisedInputConfig ​ supervisedConfig;
     ​     ​
         uint8_t ​   reserved2[26];​         uint8_t ​   reserved2[26];​
Line 2672: Line 2685:
 2. //​​numSupervised//​​ \\ 2. //​​numSupervised//​​ \\
 Number of supervised input port. \\ \\ Number of supervised input port. \\ \\
-3. //​​reserved//​​ \\+3. //​tamperAuxIndex,​ acFailAuxIndex,​ fireAuxIndex//​ \\ 
 +[+2.9.9] Sets the Aux input. It is 4bit in size and CS-20, DI-24 are fixed and cannot be changed. \\ 
 +<WRAP group 50%> 
 +^Aux Name  ^Index ​ ^ 
 +|AC Fail  |0  | 
 +|TAMPER ​ |1  | 
 +|FIRE  |2  | 
 +</​WRAP>​  
 +4. //aux0Type, aux1Type, aux2Type// \\ 
 +[+2.9.9] Sets the Aux input signal type. \\ 
 +<WRAP group 50%> 
 +^Value ​ ^Description ​ ^ 
 +|0  |Normally Open  | 
 +|1  |Normally Closed ​ | 
 +</​WRAP>​ 
 +5. //​​reserved//​​ \\
 Reserved Space. \\ \\ Reserved Space. \\ \\
-4. //​​portIndex//​​ \\ +6. //​​portIndex//​​ \\ 
 Input Port Number. \\ \\ Input Port Number. \\ \\
-5. //​switchType//​ \\+7. //​switchType//​ \\
 Input Signal Type. \\  Input Signal Type. \\ 
 <WRAP group 50%> <WRAP group 50%>
Line 2683: Line 2711:
 |1  |Normally Closed ​ | |1  |Normally Closed ​ |
 </​WRAP> ​ </​WRAP> ​
-6. //​​duration//​​ \\ +8. //​​duration//​​ \\ 
 Input Signal Duration Time Measurement is milliseconds(ms). \\ \\ Input Signal Duration Time Measurement is milliseconds(ms). \\ \\
-7. //​​reserved//​​ \\+9. //​​reserved//​​ \\
 Reserved Space. \\ \\ Reserved Space. \\ \\
-8. //​​supervisedResistor//​​ \\+10. //​​supervisedResistor//​​ \\
 You can set Supervised input resistance value type or unsupervise it. \\ You can set Supervised input resistance value type or unsupervise it. \\
 <WRAP group 50%> <WRAP group 50%>
Line 2697: Line 2725:
 |254  |Unsupervised(Default) ​ | |254  |Unsupervised(Default) ​ |
 </​WRAP> ​ </​WRAP> ​
-9. //​reserved1//​ \\+11. //​reserved2//​ \\
 Reserved Space. \\ \\ Reserved Space. \\ \\
-10. //​​reserved2//​​ \\ +12. //​​reserved2//​​ \\
-Reserved Space. \\ \\ +
-11. //​​reserved2//​​ \\+
 Reserved Space. \\ \\ Reserved Space. \\ \\
     
Line 3300: Line 3326:
 ==== BS2CustomCardConfig ==== ==== BS2CustomCardConfig ====
 <code cpp> <code cpp>
 +typedef struct {
 + uint8_t primaryKey[16];​
 + uint8_t secondaryKey[16];​
 + uint16_t startBlockIndex;​
 + uint8_t dataSize;
 + uint8_t skipBytes;
 + uint8_t reserved[16];​
 +} BS2CustomMifareCardEx;​
 +
 typedef struct { typedef struct {
  BS2_CARD_DATA_TYPE dataType;  BS2_CARD_DATA_TYPE dataType;
Line 3307: Line 3342:
  BS2CustomMifareCard mifare;  BS2CustomMifareCard mifare;
  BS2CustomDesFireCard desfire;  BS2CustomDesFireCard desfire;
- uint8_t reserved2[24]+ BS2CustomMifareCardEx mifareEx; 
- uint8_t reserved3[96];+ BS2_MIFARE_ENCRYPTION mifareEncType
 + uint8_t reserved3[67]; 
  
  BS2_CARD_BYTE_ORDER smartCardByteOrder;​  BS2_CARD_BYTE_ORDER smartCardByteOrder;​
Line 3316: Line 3352:
 } BS2CustomCardConfig;​ } BS2CustomCardConfig;​
 </​code>​ </​code>​
-1. //​dataType//​ \\ +1. //​primaryKey//​ \\ 
 +The first encryption key for accessing Mifare card information. \\ \\ 
 +2. //​secondaryKey//​ \\ 
 +The second encryption key for accessing Mifare card information. \\ \\ 
 +3. //​startBlockIndex//​ \\ 
 +The start block index in Mifare data storage. \\ \\ 
 +4. //​datasize//​ \\ 
 +Indicates the size of the card data in bytes. \\ \\ 
 +5. //​skipBytes//​ \\ 
 +Indicates the position where the card data appears. \\ 
 +Indicates the starting point for reading the card data. If reading from the beginning, it is 0; if reading after the first byte, it indicates the number of bytes skipped. \\ \\ 
 +6. //​reserved//​ \\ 
 +Reserved space. \\ \\ 
 + 
 +7. //​dataType//​ \\ 
 Type of card data. \\  Type of card data. \\ 
 <WRAP group 50%> <WRAP group 50%>
Line 3325: Line 3375:
 |3  |BCD  | |3  |BCD  |
 </​WRAP>​ </​WRAP>​
-2. //​useSecondaryKey//​ \\ +8. //​useSecondaryKey//​ \\ 
 Decides whether to use the secondary encryption key. \\ \\  Decides whether to use the secondary encryption key. \\ \\ 
-3. //​reserved1//​ \\ +9. //​reserved1//​ \\ 
 Reserved space. \\ \\  Reserved space. \\ \\ 
-4. //mifare// \\ +10. //mifare// \\ 
 Set the Mifare custom card information. \\ \\  Set the Mifare custom card information. \\ \\ 
-5. //desfire// \\ +11. //desfire// \\ 
 Set the DESFire custom card information. \\ \\  Set the DESFire custom card information. \\ \\ 
-6. //reserved2// \\  +12. //mifareEx// \\ 
-Reserved space. \\ \\  +[+2.9.9] Saves the setting information used for AES128-encrypted Mifare Custom cards on the device. \\ \\ 
-7. //​reserved3//​ \\ +13. //​mifareEncType//​ \\ 
 +[+2.9.9] Specifies the encryption method for Mifare Custom cards. Mifare Classic cards support only CRYPTO1, while Mifare Plus cards support both CRYPTO1 and AES128. \\ 
 +When set to CRYPTO1, the Mifare settings of BS2CustomMifareCard are applied. When set to AES128, applied to mifareEx settings of BS2CustomMifareConfigEx. \\  
 +<WRAP group 50%> 
 +^Value ​ ^Description ​ ^ 
 +|0  |CRYPTO1 ​ | 
 +|1  |AES128 ​ | 
 +</​WRAP>​ 
 +14. //​reserved3//​ \\ 
 Reserved space. \\ \\  Reserved space. \\ \\ 
-8. //​smartCardByteOrder//​ \\+15. //​smartCardByteOrder//​ \\
 The output method can be selected from MSB or LSB. \\ The output method can be selected from MSB or LSB. \\
 <WRAP group 50%> <WRAP group 50%>
Line 3344: Line 3402:
 |1  |LSB  | |1  |LSB  |
 </​WRAP>​ </​WRAP>​
-9. //​reserved4//​ \\ +16. //​reserved4//​ \\ 
 Reserved space. \\ \\ Reserved space. \\ \\
-10. //​formatID//​ \\ +17. //​formatID//​ \\ 
 This is an identifier that can be used when the BioStar 2 application needs to manage the card configuration as a database. \\ \\  This is an identifier that can be used when the BioStar 2 application needs to manage the card configuration as a database. \\ \\ 
-11. //​reserved5//​ \\ +18. //​reserved5//​ \\ 
 Reserved space. \\ \\ Reserved space. \\ \\
  
Line 3366: Line 3424:
 </​code>​ </​code>​
 1. //​primaryKey//​ \\  1. //​primaryKey//​ \\ 
-Mifare card 정보에 접근하기 위한 첫번째 암호화 키입니다. \\+This is the first encryption key for accessing ​Mifare card information. \\
 \\ \\
 2. //​secondaryKey//​ \\ 2. //​secondaryKey//​ \\
-Mifare card 정보에 접근하기 위한 두번째 암호화 키입니다. \\+This is the second encryption key for accessing ​Mifare card information. \\
 \\ \\
 3. //​startBlockIndex//​ \\ 3. //​startBlockIndex//​ \\
-Mifare data storage에서의 ​start block index입니다. \\+This is the start block index in Mifare data storage. \\
 \\ \\
 4. //​reserved//​ \\ 4. //​reserved//​ \\
-예약된 공간입니다.+Reserved space.
  
 ==== BS2FacilityCodeConfig ==== ==== BS2FacilityCodeConfig ====
Line 3391: Line 3449:
 </​code>​ </​code>​
 1. //​numFacilityCode//​ \\ 1. //​numFacilityCode//​ \\
-설정할 ​FacilityCode의 개수를 설정합니다최대 ​16개까지 지원합니다. \\ \\+Set the number of FacilityCode ​to setUp to 16 are supported. \\ \\
 2. //​reserved0//​ \\ 2. //​reserved0//​ \\
-예약된 공간입니다. \\ \\+Reserved space. \\ \\
 3. //​BS2FacilityCode//​ \\ 3. //​BS2FacilityCode//​ \\
-Door Interface(DI-24)와 마스터 장치의 OSDP 연결이 끊어진 경우 인증코드로 사용됩니다. \\ \\ +Used as an authentication code when the OSDP connection between the Door Interface (DI-24) ​and the master device is lost. \\ \\ 
-4. //reserved0// \\ +4. //reserved1// \\ 
-예약된 공간입니다. \\ \\+Reserved space. \\ \\
  
 ==== BS2Rs485ConfigEXDynamic ==== ==== BS2Rs485ConfigEXDynamic ====
 <code cpp> <code cpp>
 typedef struct { typedef struct {
-    ​BS2_DEVICE_ID ​  deviceID; ​      ///<​  +    ​uint32_t ​       ​deviceID; ​      ///<​  
-    ​BS2_DEVICE_TYPE ​deviceType; ​    ///<​ 2 bytes +    ​uint16_t ​       ​deviceType; ​    ///<​ 2 bytes 
-    ​BS2_BOOL ​       ​enableOSDP; ​    ///<​ 1 byte +    ​uint8_t ​        enableOSDP; ​    ///<​ 1 byte 
-    ​BS2_BOOL ​       ​connected; ​     ///< 1 bytes (packing)+    ​uint8_t ​        connected; ​     ///< 1 bytes (packing)
  
     union {     union {
             uint8_t ​        ​channelInfo;​             uint8_t ​        ​channelInfo;​
-            ​BS2_DEVICE_ID ​  parentID;+            ​uint32_t ​       ​parentID;
     };     };
 } BS2Rs485SlaveDeviceEX;​ } BS2Rs485SlaveDeviceEX;​
Line 3418: Line 3476:
     uint8_t ​                ​useRegistance;​     uint8_t ​                ​useRegistance;​
     uint8_t ​                ​numOfDevices;​     uint8_t ​                ​numOfDevices;​
-    ​BS2_OSDP_CHANNEL_TYPE ​  channelType;​+    ​uint8_t ​                channelType;​
     BS2Rs485SlaveDeviceEX ​ *slaveDevices;​     BS2Rs485SlaveDeviceEX ​ *slaveDevices;​
 } BS2Rs485ChannelEXDynamic;​ } BS2Rs485ChannelEXDynamic;​
Line 3431: Line 3489:
 </​code>​ </​code>​
 <WRAP info> <WRAP info>
-baudRate을 제외한 모든 값은 읽기 전용으로 변경이 불가능합니다. \\ +All values ​​except ​baudRate ​are read-only and cannot be changed. \\ 
-''​지원 장치'':​ CoreStation 20(CS-20, CS-20P), Door Interface(DI-24)+''​Supported devices:'':​ CoreStation 20(CS-20, CS-20P), Door Interface(DI-24)
 </​WRAP>​ </​WRAP>​
 1. //​baudRate//​ \\  1. //​baudRate//​ \\ 
-RS485 통신 속도이며 설정할 수 있는 범위는 다음과 같습니다. \\+The RS-485 communication speed which can be configured as below. \\
 <WRAP group 50%> <WRAP group 50%>
-^값  ^+^Value  ^
 |9600  | |9600  |
 |19200 ​ | |19200 ​ |
Line 3445: Line 3503:
 </​WRAP>​ </​WRAP>​
 2. //​channelIndex//​ \\  2. //​channelIndex//​ \\ 
-RS485 network의 통신 채널 번호입니다. \\ \\+Communication channel index of the RS-485 ​network. \\ \\
 3. //​useRegistance//​ \\  3. //​useRegistance//​ \\ 
-종단 저항을 설정할지 결정하는 flag입니다. \\ \\+Decides whether to use a resistance. \\ \\
 4. //​numOfDevices//​ \\  4. //​numOfDevices//​ \\ 
-슬레이브 장치의 개수입니다. \\ \\ +Number of slave devices. \\ \\ 
-5. //slaveDevices// \\  +5. //channelType// \\ 
-장치에 연결된 슬레이브 장치를 나열한 포인터 ​\\+Type of slave device connected to the port. \\
 <WRAP group 50%> <WRAP group 50%>
-포트별 연결가능한 최대 장치 +^Value ​ ^Description ​ ^ 
-|Host 포트 ​ |16개  | +| |No connection ​ | 
-|0번 포트 ​ |2개  | +| |Suprema device ​ | 
-|1번 포트 ​ |2개  |+|2  |OSDP standard device ​ | 
 +| |Cannot connect anymore ​ |
 </​WRAP>​ </​WRAP>​
 6. //​slaveDevices//​ \\  6. //​slaveDevices//​ \\ 
-RS485 네트워크에서 어떤 모드로 동작할지 결정하는 flag입니다. \\+List of slave devices connected to the device. \\
 <WRAP group 50%> <WRAP group 50%>
-^값  ^설명 ​ ^+Maximum Number of Devices Connectable per Port 
 +|Host port  |16  | 
 +|Port 0  |2  | 
 +|Port 1  |2  | 
 +</​WRAP>​ 
 +7. //mode// \\  
 +This flag determines the operating mode on the RS485 network. \\ 
 +<WRAP group 50%> 
 +^Value  ^Description ​ ^
 |1  |Master ​ | |1  |Master ​ |
 |2  |Slave ​ | |2  |Slave ​ |
Line 3467: Line 3534:
 </​WRAP>​ </​WRAP>​
 <WRAP info> <WRAP info>
-CoreStation은 Master로만 사용 가능합니다다른 값은 설정할 수 없습니다.+CoreStation ​can only be used as a Master. ​Other values cannot be configured.
 </​WRAP>​ </​WRAP>​
-7. //​numOfChannels//​ \\  +8. //​numOfChannels//​ \\  
-RS485 채널의 개수입니다.\\ \\  +Number of RS485 channel. \\ \\  
-8. //​reserved//​ \\  +9. //​reserved//​ \\  
-예약된 공간입니다.\\ \\  +Reserved space. \\ \\  
-9. //​reserved1//​ \\  +10. //​reserved1//​ \\  
-예약된 공간입니다.\\ \\ +Reserved space. \\ \\ 
-10. //​channels//​ \\  +11. //​channels//​ \\  
-RS485 채널을 나열한 리스트로 최대 ​8개까지 설정할 수 있습니다.\\ \\ +List of RS-485 channels, which can be configured up to channels. \\ \\