> 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/s-adk-5.1-programmers-guide/readme/modules/group__sdilowlevel.md).

# Low level message interface

[Functions](#func-members)

|           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Functions |                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| int       | [sendMessage](#ga9469453c091c21eb8ea86f57891b7308) (unsigned short cmd, unsigned short p1p2, const [bytevector](https://github.com/verifoneone/verifone-git-book-adk/tree/ADK5.1_staging/classvfisdi_1_1_s_d_i_client.md#a64b5be62be31dcda165d2c6c3c262fb5) \&data)                                                                                                                                                                                                    |
| int       | [sendMessage](#ga45c151464c9a5da87cec4f15434eac64) (unsigned short cmd, const [bytevector](https://github.com/verifoneone/verifone-git-book-adk/tree/ADK5.1_staging/classvfisdi_1_1_s_d_i_client.md#a64b5be62be31dcda165d2c6c3c262fb5) \&data)                                                                                                                                                                                                                         |
| int       | [receiveMessage](#ga6c1ca6f917bb545fa12b98bafddeb839) (unsigned short \&sw1sw2, [bytevector](https://github.com/verifoneone/verifone-git-book-adk/tree/ADK5.1_staging/classvfisdi_1_1_s_d_i_client.md#a64b5be62be31dcda165d2c6c3c262fb5) \&data)                                                                                                                                                                                                                       |
| int       | [sendReply](#gaf1a6553edbb1cf8a3923c00549aaf322) (unsigned short cmd, const [bytevector](https://github.com/verifoneone/verifone-git-book-adk/tree/ADK5.1_staging/classvfisdi_1_1_s_d_i_client.md#a64b5be62be31dcda165d2c6c3c262fb5) \&data)                                                                                                                                                                                                                           |
| int       | [sendReceiveMessage](#ga6ecd2e2678b30d7eae0dee49978116a0) (unsigned short cmd, unsigned short p1p2, const [bytevector](https://github.com/verifoneone/verifone-git-book-adk/tree/ADK5.1_staging/classvfisdi_1_1_s_d_i_client.md#a64b5be62be31dcda165d2c6c3c262fb5) \&sdata, unsigned short \&sw1sw2, [bytevector](https://github.com/verifoneone/verifone-git-book-adk/tree/ADK5.1_staging/classvfisdi_1_1_s_d_i_client.md#a64b5be62be31dcda165d2c6c3c262fb5) \&rdata) |
| int       | [sendReceiveMessage](#ga61e51cf697228a812dd47cd53e7ca3b0) (unsigned short cmd, const [bytevector](https://github.com/verifoneone/verifone-git-book-adk/tree/ADK5.1_staging/classvfisdi_1_1_s_d_i_client.md#a64b5be62be31dcda165d2c6c3c262fb5) \&sdata, unsigned short \&sw1sw2, [bytevector](https://github.com/verifoneone/verifone-git-book-adk/tree/ADK5.1_staging/classvfisdi_1_1_s_d_i_client.md#a64b5be62be31dcda165d2c6c3c262fb5) \&rdata)                      |

### DetailedDescription <a href="#detailed-description" id="detailed-description"></a>

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

### receiveMessage() <a href="#ga6c1ca6f917bb545fa12b98bafddeb839" id="ga6c1ca6f917bb545fa12b98bafddeb839"></a>

int receiveMessage

receive SDI reply with internal handling of SDI callbacks.

**Parameters**

\[out] **sw1sw2** SW1 SW2 packed into an unsigned short as returned from SDI \[out] **data** reply data

#### Returns

SDI error code ([Result](/s-adk-5.1-programmers-guide/readme/namespaces/namespacevfisdi.md#a28287671eaf7406afd604bd055ba4066))

### sendMessage()\[1/2] <a href="#ga45c151464c9a5da87cec4f15434eac64" id="ga45c151464c9a5da87cec4f15434eac64"></a>

int sendMessage

inline

send SDI command with P1P2=0x0000

**Parameters**

\[in] **cmd** class and instruction of the command to be sent \[in] **data** command data

#### Returns

SDI error code ([Result](/s-adk-5.1-programmers-guide/readme/namespaces/namespacevfisdi.md#a28287671eaf7406afd604bd055ba4066))

### sendMessage()\[2/2] <a href="#ga9469453c091c21eb8ea86f57891b7308" id="ga9469453c091c21eb8ea86f57891b7308"></a>

int sendMessage

send SDI message

**Parameters**

\[in] **cmd** class and instruction of the command to be sent \[in] **p1p2** P1 and P2 of the command to be sent \[in] **data** command data

#### Returns

SDI error code ([Result](/s-adk-5.1-programmers-guide/readme/namespaces/namespacevfisdi.md#a28287671eaf7406afd604bd055ba4066))

### sendReceiveMessage()\[1/2] <a href="#ga61e51cf697228a812dd47cd53e7ca3b0" id="ga61e51cf697228a812dd47cd53e7ca3b0"></a>

int sendReceiveMessage

inline

### sendReceiveMessage()\[2/2] <a href="#ga6ecd2e2678b30d7eae0dee49978116a0" id="ga6ecd2e2678b30d7eae0dee49978116a0"></a>

int sendReceiveMessage

send and receive SDI message

**Parameters**

\[in] **cmd** class and instruction of the command to be sent \[in] **p1p2** P1 and P2 of the command to be sent \[in] **sdata** command data \[out] **sw1sw2** SW1 SW2 packed into an unsigned short as returned from SDI \[out] **rdata** reply data

#### Returns

SDI error code ([Result](/s-adk-5.1-programmers-guide/readme/namespaces/namespacevfisdi.md#a28287671eaf7406afd604bd055ba4066))

### sendReply() <a href="#gaf1a6553edbb1cf8a3923c00549aaf322" id="gaf1a6553edbb1cf8a3923c00549aaf322"></a>

int sendReply

send SDI reply for an SDI callback message

**Parameters**

\[in] **cmd** class and instruction of the reply to be sent \[in] **data** command data

#### Returns

0 in case of success, -1 in case of failure


---

# 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/s-adk-5.1-programmers-guide/readme/modules/group__sdilowlevel.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.
