> 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/modules/group__sdisetup.md).

# SDI client setup

[Functions](#func-members)

|                                     |                                                                                                                                                                                                                                                                                                                                                                                                        |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Functions                           |                                                                                                                                                                                                                                                                                                                                                                                                        |
|                                     | [SDIClient](#ga55fe10473f030082d296a204e2cbf0ec) ()                                                                                                                                                                                                                                                                                                                                                    |
| virtual                             | [\~SDIClient](#ga5f736363bff55bdf1e71c8a0fcfc6fae) ()                                                                                                                                                                                                                                                                                                                                                  |
| void                                | [setProtocol](#gab5e31e9de33ab7fcc6694fed46316476) ([ProtocolType](https://github.com/verifoneone/verifone-git-book-adk/tree/ADK5.0_staging/classvfisdi_1_1_s_d_i_client.md#a2b99fb4e4914a533566284f2ed3b0186) proto)                                                                                                                                                                                  |
| void                                | [setTrace](#gafa075c0e3920b23acdb73134144fa09a) (void \*data, void(\*trace\_cb)(void \*data, const char \*format,...))                                                                                                                                                                                                                                                                                 |
| template\<typename R , typename T > |                                                                                                                                                                                                                                                                                                                                                                                                        |
| void                                | [setTrace](#ga3b744ccb84fd14d5cc03de91164474df) (T \*data, R(\*trace)(T \*data, const char \*format,...))                                                                                                                                                                                                                                                                                              |
| int                                 | [connect](#gaadabac17c905f50d1379d3ba5fbdd0e6) (const char \*host, unsigned short port=12000)                                                                                                                                                                                                                                                                                                          |
| int                                 | [connect](#ga08726c29f247dc150549abdcd3067090) ([vfiipc::IPC](https://github.com/verifoneone/verifone-git-book-adk/tree/ADK5.0_staging/classvfiipc_1_1_i_p_c.md) \*link)                                                                                                                                                                                                                               |
| bool                                | [connected](#gaa0fd96bc25e3d509fb54028c2e4b91f6) () const                                                                                                                                                                                                                                                                                                                                              |
| void                                | [close](#ga5ae591df94fc66ccb85cbb6565368bca) ()                                                                                                                                                                                                                                                                                                                                                        |
| void                                | [setLogCallbacks](#gaeefef07c14e42d4a2912f25e0c8c3839) (void \*data, [LogCallback](https://github.com/verifoneone/verifone-git-book-adk/tree/ADK5.0_staging/classvfisdi_1_1_s_d_i_client.md#a1662fee6a6241f5c824ea55bdc1bac92) error, [LogCallback](https://github.com/verifoneone/verifone-git-book-adk/tree/ADK5.0_staging/classvfisdi_1_1_s_d_i_client.md#a1662fee6a6241f5c824ea55bdc1bac92) debug) |

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

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

### close() <a href="#ga5ae591df94fc66ccb85cbb6565368bca" id="ga5ae591df94fc66ccb85cbb6565368bca"></a>

void close

close connection to SDI server

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

int connect

connect to SDI server

**Parameters**

\[in] **host** host name or path name of unix domain socket \[in] **port** TCP port number, ignored in case of unix domain socket

#### Returns

OK in case of success, ERR\_NOT\_CONNECTED in case of failure

### connect()\[2/2] <a href="#ga08726c29f247dc150549abdcd3067090" id="ga08726c29f247dc150549abdcd3067090"></a>

int connect

set up connection to SDI server

**Parameters**

\[in] **link** already connected IPC object

#### Returns

OK in case of success, ERR\_NOT\_CONNECTED in case of failure (e.g. link==0)

{% hint style="info" %}
If successful, ownership is transferred to [SDIClient](https://github.com/verifoneone/verifone-git-book-adk/tree/ADK5.0_staging/classvfisdi_1_1_s_d_i_client.md). The Object will be deleted when invoking [close()](#ga5ae591df94fc66ccb85cbb6565368bca);
{% endhint %}

### connected() <a href="#gaa0fd96bc25e3d509fb54028c2e4b91f6" id="gaa0fd96bc25e3d509fb54028c2e4b91f6"></a>

bool connected

check whether a connection to SDI server exists

#### Returns

true if a connection exists, false if not.

### SDIClient() <a href="#ga55fe10473f030082d296a204e2cbf0ec" id="ga55fe10473f030082d296a204e2cbf0ec"></a>

[SDIClient](https://github.com/verifoneone/verifone-git-book-adk/tree/ADK5.0_staging/classvfisdi_1_1_s_d_i_client.md)

constructor

### setLogCallbacks() <a href="#gaeefef07c14e42d4a2912f25e0c8c3839" id="gaeefef07c14e42d4a2912f25e0c8c3839"></a>

void setLogCallbacks

set logging callbacks

**Parameters**

\[in] **data** data pointer passed to the log callbacks \[in] **error** error logging callback \[in] **debug** debug logging callback

### setProtocol() <a href="#gab5e31e9de33ab7fcc6694fed46316476" id="gab5e31e9de33ab7fcc6694fed46316476"></a>

void setProtocol

set protocol type

**Parameters**

\[in] **proto** protocol type

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

void setTrace

inline

set trace callback function. The trace callback traces sent and received bytes and can be used for logging

**Parameters**

\[in] **data** data pointer to be passed to the trace callback \[in] **trace** trace callback function, use NULL to reset the callback

{% hint style="info" %}
The interface can be used for tracing with fprintf like this: setTrace(stderr,fprintf)
{% endhint %}

### setTrace()\[2/2] <a href="#gafa075c0e3920b23acdb73134144fa09a" id="gafa075c0e3920b23acdb73134144fa09a"></a>

void setTrace

### \~SDIClient() <a href="#ga5f736363bff55bdf1e71c8a0fcfc6fae" id="ga5f736363bff55bdf1e71c8a0fcfc6fae"></a>

virtual \\\~[SDIClient](https://github.com/verifoneone/verifone-git-book-adk/tree/ADK5.0_staging/classvfisdi_1_1_s_d_i_client.md)

virtual

destructor


---

# 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/modules/group__sdisetup.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.
