npm package: @mqn/capacitor-plugin-decard
Description: Capacitor的Android平台德卡设备插件
Author: MQN
Latest version: 0.0.1

# @mqn/capacitor-plugin-decard

Capacitor的Android平台德卡设备插件

## Install

```bash
npm install @mqn/capacitor-plugin-decard
npx cap sync
```

## API

<docgen-index>

* [`dcOpen(...)`](#dcopen)
* [`dcExit()`](#dcexit)
* [`readIdCard(...)`](#readidcard)
* [`readSocialSecurityCard(...)`](#readsocialsecuritycard)
* [`readQRCode(...)`](#readqrcode)
* [`loopReadIdCard(...)`](#loopreadidcard)
* [`stopLoopReadIdCard()`](#stoploopreadidcard)
* [`loopReadSocialSecurityCard(...)`](#loopreadsocialsecuritycard)
* [`stopLoopReadSocialSecurityCard()`](#stoploopreadsocialsecuritycard)
* [`loopReadQRCode(...)`](#loopreadqrcode)
* [`stopLoopReadQRCode()`](#stoploopreadqrcode)
* [Interfaces](#interfaces)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### dcOpen(...)

```typescript
dcOpen(OpenOptions: OpenOptionsType) => any
```

| Param             | Type                                                        |
| ----------------- | ----------------------------------------------------------- |
| **`OpenOptions`** | <code><a href="#openoptionstype">OpenOptionsType</a></code> |

**Returns:** <code>any</code>

--------------------


### dcExit()

```typescript
dcExit() => any
```

**Returns:** <code>any</code>

--------------------


### readIdCard(...)

```typescript
readIdCard(ReadIdCardOptions: ReadIdCardOptionsType) => any
```

| Param                   | Type                                                                    |
| ----------------------- | ----------------------------------------------------------------------- |
| **`ReadIdCardOptions`** | <code><a href="#readidcardoptionstype">ReadIdCardOptionsType</a></code> |

**Returns:** <code>any</code>

--------------------


### readSocialSecurityCard(...)

```typescript
readSocialSecurityCard(ReadSocialSecurityCardOptions: ReadSocialSecurityCardOptionsType) => any
```

| Param                               | Type                                                                                            |
| ----------------------------------- | ----------------------------------------------------------------------------------------------- |
| **`ReadSocialSecurityCardOptions`** | <code><a href="#readsocialsecuritycardoptionstype">ReadSocialSecurityCardOptionsType</a></code> |

**Returns:** <code>any</code>

--------------------


### readQRCode(...)

```typescript
readQRCode(ReadQRCodeOptions: ReadQRCodeOptionsType) => any
```

| Param                   | Type                                                                    |
| ----------------------- | ----------------------------------------------------------------------- |
| **`ReadQRCodeOptions`** | <code><a href="#readqrcodeoptionstype">ReadQRCodeOptionsType</a></code> |

**Returns:** <code>any</code>

--------------------


### loopReadIdCard(...)

```typescript
loopReadIdCard(LoopReadIdCardOptions: LoopReadIdCardOptionsType, loopCallBack: LoopReadIdCardLoopCallBackType) => any
```

| Param                       | Type                                                                            |
| --------------------------- | ------------------------------------------------------------------------------- |
| **`LoopReadIdCardOptions`** | <code><a href="#loopreadidcardoptionstype">LoopReadIdCardOptionsType</a></code> |
| **`loopCallBack`**          | <code>(Data: IDCard) =&gt; void</code>                                          |

**Returns:** <code>any</code>

--------------------


### stopLoopReadIdCard()

```typescript
stopLoopReadIdCard() => void
```

--------------------


### loopReadSocialSecurityCard(...)

```typescript
loopReadSocialSecurityCard(LoopReadSocialSecurityCardOptions: LoopReadSocialSecurityCardOptionsType, loopCallBack: LoopReadSocialSecurityCardCallBackType) => any
```

| Param                                   | Type                                                                                                    |
| --------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| **`LoopReadSocialSecurityCardOptions`** | <code><a href="#loopreadsocialsecuritycardoptionstype">LoopReadSocialSecurityCardOptionsType</a></code> |
| **`loopCallBack`**                      | <code>(Data: SSCard) =&gt; void</code>                                                                  |

**Returns:** <code>any</code>

--------------------


### stopLoopReadSocialSecurityCard()

```typescript
stopLoopReadSocialSecurityCard() => void
```

--------------------


### loopReadQRCode(...)

```typescript
loopReadQRCode(LoopReadQRCodeOptions: LoopReadQRCodeOptionsType, loopCallBack: LoopReadQRCodeCallBackType) => any
```

| Param                       | Type                                                                            |
| --------------------------- | ------------------------------------------------------------------------------- |
| **`LoopReadQRCodeOptions`** | <code><a href="#loopreadqrcodeoptionstype">LoopReadQRCodeOptionsType</a></code> |
| **`loopCallBack`**          | <code>(Data: QRCode) =&gt; void</code>                                          |

**Returns:** <code>any</code>

--------------------


### stopLoopReadQRCode()

```typescript
stopLoopReadQRCode() => void
```

--------------------


### Interfaces


#### OpenOptionsType

打开设备选项

| Prop           | Type                                                    | Description              |
| -------------- | ------------------------------------------------------- | ------------------------ |
| **`Type`**     | <code>"LUSB" \| "AUSB" \| "COM" \| "BT" \| "BLE"</code> | 期望的端口类型                  |
| **`Param`**    | <code>string</code>                                     | `Type`为`COM`时此参数为串口路径，必填 |
| **`BaudRate`** | <code>number</code>                                     | `Type`为`COM`时此参数为波特率，必填  |


#### ReadIdCardOptionsType

读取身份证选项

| Prop       | Type                     | Description |
| ---------- | ------------------------ | ----------- |
| **`Type`** | <code>1 \| 2 \| 3</code> | 类型          |


#### ReadSocialSecurityCardOptionsType

读取社保卡选项

| Prop           | Type                          | Description |
| -------------- | ----------------------------- | ----------- |
| **`CardType`** | <code>1 \| 2 \| 3 \| 4</code> | 卡片类型        |


#### ReadQRCodeOptionsType

读取二维码选项

| Prop          | Type                | Description |
| ------------- | ------------------- | ----------- |
| **`Timeout`** | <code>number</code> | 超时时间，单位毫秒   |


#### LoopReadIdCardOptionsType

循环读取身份证选项


#### LoopReadSocialSecurityCardOptionsType

循环读取社保卡选项


#### LoopReadQRCodeOptionsType

循环读取二维码选项

</docgen-api>