> For the complete documentation index, see [llms.txt](https://sandbox-docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sandbox-docs.verifone.com/adk-5.0-programmers-guide/readme/files/dir_44d926a17fc606d3c25449ba60427c63/dir_048f823fee1bfb22502a8732b9a001aa/sdi_2src_2ped_8h.md).

# ped.h

[Macros](#define-members) | [Functions](#func-members)

This graph shows which files directly or indirectly include this file:

![](/files/83R7piET92cyleK5wgWm)

[Go to the source code of this file.](/adk-5.0-programmers-guide/sdi_2src_2ped_8h_source.md)

|         |                                                                                                               |
| ------- | ------------------------------------------------------------------------------------------------------------- |
| Macros  |                                                                                                               |
| #define | [CLA\_PED](#aa03c0db7c55eb8224cb835994abb63a8)   0x22                                                         |
|         | <p>Class for PED commands. <a href="#aa03c0db7c55eb8224cb835994abb63a8">More...</a><br></p>                   |
| #define | [INS\_PED\_ENABLE](#a9b71c79dc791154fa99efeea834f422a)   0x00                                                 |
|         | <p>Enable or Disable PED. <a href="#a9b71c79dc791154fa99efeea834f422a">More...</a><br></p>                    |
| #define | [INS\_PED\_GET\_PIN](#a1bf5012e2bf73c386f1f1d5f00785e26)   0x01                                               |
|         | <p>Request PIN from user. <a href="#a1bf5012e2bf73c386f1f1d5f00785e26">More...</a><br></p>                    |
| #define | [INS\_SET\_PIN\_TIMEOUT](#a9c621b8bdbccfbd6befc23e34ef092e6)   0x02                                           |
|         | <p>Configure timeout for PIN entry. <a href="#a9c621b8bdbccfbd6befc23e34ef092e6">More...</a><br></p>          |
| #define | [INS\_PED\_START\_PIN](#a2890ca3e6881559d9c626f6d7bb43fb0)   0x03                                             |
|         | <p>Start PIN entry (polling interface) <a href="#a2890ca3e6881559d9c626f6d7bb43fb0">More...</a><br></p>       |
| #define | [INS\_PED\_POLL\_PIN](#ad3090b4a2e335c9fc78d6830e1d1f709)   0x04                                              |
|         | <p>Poll PIN entry status (polling interface) <a href="#ad3090b4a2e335c9fc78d6830e1d1f709">More...</a><br></p> |
| #define | [INS\_PED\_STOP\_PIN](#a84be289ebb7f0e7e1b153ea9642a47c0)   0x05                                              |
|         | <p>Stop PIN entry (polling interface) <a href="#a84be289ebb7f0e7e1b153ea9642a47c0">More...</a><br></p>        |
| #define | [INS\_SET\_PIN\_INPUT\_PARAM](#aee0d4385ec8cb7c04b26fc75879146c1)   0x06                                      |
|         | <p>Configure PIN input parameter. <a href="#aee0d4385ec8cb7c04b26fc75879146c1">More...</a><br></p>            |
| #define | [INS\_PED\_DUAL\_PIN\_VALIDATE](#a1c098aa16262953756f915bcf4ece518)   0x07                                    |
|         | <p>Dual PIN Validation. <a href="#a1c098aa16262953756f915bcf4ece518">More...</a><br></p>                      |

|           |                                                                                                                                                                                                       |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Functions |                                                                                                                                                                                                       |
| bool      | [handlePedCmd](#a576b866745c7f8c53122bbb8b23bfed8) (unsigned short msgBufSize, unsigned char \*msg, unsigned short msgSize, unsigned short rspBufSize, unsigned char \*rsp, unsigned short \*rspSize) |
| bool      | [pedSetExtButton](#aa0c8c216f26262d3bb93de55d10086e4) (void)                                                                                                                                          |
| void      | [pedReset](#a2cdc4bd6bf4da35073f47249ee9357c2) (void \*handle)                                                                                                                                        |

### MacroDefinition Documentation <a href="#macro-definition-documentation" id="macro-definition-documentation"></a>

### CLA\_PED <a href="#aa03c0db7c55eb8224cb835994abb63a8" id="aa03c0db7c55eb8224cb835994abb63a8"></a>

\#define CLA\_PED   0x22

Class for PED commands.

### INS\_PED\_DUAL\_PIN\_VALIDATE <a href="#a1c098aa16262953756f915bcf4ece518" id="a1c098aa16262953756f915bcf4ece518"></a>

\#define INS\_PED\_DUAL\_PIN\_VALIDATE   0x07

Dual PIN Validation.

### INS\_PED\_ENABLE <a href="#a9b71c79dc791154fa99efeea834f422a" id="a9b71c79dc791154fa99efeea834f422a"></a>

\#define INS\_PED\_ENABLE   0x00

Enable or Disable PED.

### INS\_PED\_GET\_PIN <a href="#a1bf5012e2bf73c386f1f1d5f00785e26" id="a1bf5012e2bf73c386f1f1d5f00785e26"></a>

\#define INS\_PED\_GET\_PIN   0x01

Request PIN from user.

### INS\_PED\_POLL\_PIN <a href="#ad3090b4a2e335c9fc78d6830e1d1f709" id="ad3090b4a2e335c9fc78d6830e1d1f709"></a>

\#define INS\_PED\_POLL\_PIN   0x04

Poll PIN entry status (polling interface)

### INS\_PED\_START\_PIN <a href="#a2890ca3e6881559d9c626f6d7bb43fb0" id="a2890ca3e6881559d9c626f6d7bb43fb0"></a>

\#define INS\_PED\_START\_PIN   0x03

Start PIN entry (polling interface)

### INS\_PED\_STOP\_PIN <a href="#a84be289ebb7f0e7e1b153ea9642a47c0" id="a84be289ebb7f0e7e1b153ea9642a47c0"></a>

\#define INS\_PED\_STOP\_PIN   0x05

Stop PIN entry (polling interface)

### INS\_SET\_PIN\_INPUT\_PARAM <a href="#aee0d4385ec8cb7c04b26fc75879146c1" id="aee0d4385ec8cb7c04b26fc75879146c1"></a>

\#define INS\_SET\_PIN\_INPUT\_PARAM   0x06

Configure PIN input parameter.

### INS\_SET\_PIN\_TIMEOUT <a href="#a9c621b8bdbccfbd6befc23e34ef092e6" id="a9c621b8bdbccfbd6befc23e34ef092e6"></a>

\#define INS\_SET\_PIN\_TIMEOUT   0x02

Configure timeout for PIN entry.

### FunctionDocumentation <a href="#function-documentation" id="function-documentation"></a>

### handlePedCmd() <a href="#a576b866745c7f8c53122bbb8b23bfed8" id="a576b866745c7f8c53122bbb8b23bfed8"></a>

bool handlePedCmd

Dispatch function to handle different PED commands

**Parameters**

\[in] **msgBufSize** size of the input message buffer \[in] **msg** pointer to the input message buffer \[in] **msgSize** size of the input message \[in] **rspBufSize** maximum size of the response buffer \[in,out] **rsp** pointer to the response buffer \[in,out] **rspSize** pointer to the response message size

#### Returns

true if command was executed and rsp contains a response, false in case invocation is not allowed by a side command.

### pedReset() <a href="#a2cdc4bd6bf4da35073f47249ee9357c2" id="a2cdc4bd6bf4da35073f47249ee9357c2"></a>

void pedReset

Function invoked by a thread at connection termination to abort the PIN entry. SDI server supports multiple connections, which can use the PED interface. With activation of the PED interface with command 22-03 (Start PIN entry) on one connection, the interface is locked for other connections. If a connection terminates, which optains the PED lock, the interface would be unaccessable for other connections. Therfore, this function will abort the PIN entry and unlock the PED interface, if the connection disturbes so that it can be used by other connection again. Please note that this function works for a PIN Entry started by 22-03 (Start PIN entry). A PIN entry started with 22-01 (Get PIN) is not considered, but the PED lock is released after the user hast finished the PIN entry.

**Parameters**

\[in] **handle** handle of the terminating connection

### pedSetExtButton() <a href="#aa0c8c216f26262d3bb93de55d10086e4" id="aa0c8c216f26262d3bb93de55d10086e4"></a>

bool pedSetExtButton

Inform the VAULT about the Confirm button was pressed if PIN polling is active and Navigator Mode 2 is set

#### Returns

true if PIN polling is active and Navigator Mode 2 set, else false


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sandbox-docs.verifone.com/adk-5.0-programmers-guide/readme/files/dir_44d926a17fc606d3c25449ba60427c63/dir_048f823fee1bfb22502a8732b9a001aa/sdi_2src_2ped_8h.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
