> 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/files/dir_44d926a17fc606d3c25449ba60427c63/dir_048f823fee1bfb22502a8732b9a001aa/prt_8cpp.md).

# prt.cpp

[Functions](#func-members)

`#include <stdio.h>` `#include <stdlib.h>` `#include <string.h>` `#include <map>` `#include <string>` `#include "`[\_logf.h](/s-adk-5.1-programmers-guide/__logf_8h_source.md)`"` `#include "`[sys.h](/s-adk-5.1-programmers-guide/sys_8h_source.md)`"` `#include "`[prt.h](/s-adk-5.1-programmers-guide/sdi_2src_2prt_8h_source.md)`"` `#include "`[prt\_bitmap.h](/s-adk-5.1-programmers-guide/prt__bitmap_8h_source.md)`"` `#include "`[html/scriptproc.h](/s-adk-5.1-programmers-guide/scriptproc_8h_source.md)`"` `#include "`[html/jsproc.h](/s-adk-5.1-programmers-guide/jsproc_8h_source.md)`"` `#include "`[html/prt.h](/s-adk-5.1-programmers-guide/guiprt_2src_2html_2prt_8h_source.md)`"` `#include "`[btlv\_helper.h](/s-adk-5.1-programmers-guide/btlv__helper_8h_source.md)`"` `#include "`[sdi\_tags.h](/s-adk-5.1-programmers-guide/src_2sdi__tags_8h_source.md)`"` `#include "`[pthreadutil.h](/s-adk-5.1-programmers-guide/pthreadutil_8h_source.md)`"` `#include "common/respVal.h"` `#include <netinet/in.h>`

Include dependency graph for prt.cpp:

![](/files/akd12yzGfWusfRvFCqBM)

|           |                                                                                                                                                                                                           |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Functions |                                                                                                                                                                                                           |
| void      | [PRT\_setProperty](#a904f53b3ce4a0dadc1ef14c001508ae3) (unsigned short msgBufSize, unsigned char \*msg, unsigned short msgSize, unsigned short rspBufSize, unsigned char \*rsp, unsigned short \*rspSize) |
| void      | [PRT\_getProperty](#ae7dc6e84f128c0990b7261b4576c4e7e) (unsigned short msgBufSize, unsigned char \*msg, unsigned short msgSize, unsigned short rspBufSize, unsigned char \*rsp, unsigned short \*rspSize) |
| void      | [handlePrt](#aa9066d7ba9036f5ae176ad99b7f24c49) (unsigned short msgBufSize, unsigned char \*msg, unsigned long msgSize, unsigned short rspBufSize, unsigned char \*rsp, unsigned short \*rspSize)         |

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

### handlePrt() <a href="#aa9066d7ba9036f5ae176ad99b7f24c49" id="aa9066d7ba9036f5ae176ad99b7f24c49"></a>

void handlePrt

Dispatch function to handle different printer 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

{% hint style="info" %}
[handlePrt()](/s-adk-5.1-programmers-guide/readme/files/dir_44d926a17fc606d3c25449ba60427c63/dir_048f823fee1bfb22502a8732b9a001aa/sdi_2src_2prt_8h.md#aa9066d7ba9036f5ae176ad99b7f24c49) is always executed, even if invoked by a side command. Therefore, this function has no return value, see also [process\_side\_command()](/s-adk-5.1-programmers-guide/readme/files/dir_44d926a17fc606d3c25449ba60427c63/dir_048f823fee1bfb22502a8732b9a001aa/main_8cpp.md#a4892e1b795462119ef4d6fa87c860b90).
{% endhint %}

### PRT\_getProperty() <a href="#ae7dc6e84f128c0990b7261b4576c4e7e" id="ae7dc6e84f128c0990b7261b4576c4e7e"></a>

void PRT\_getProperty

Get Printer Property

**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

### PRT\_setProperty() <a href="#a904f53b3ce4a0dadc1ef14c001508ae3" id="a904f53b3ce4a0dadc1ef14c001508ae3"></a>

void PRT\_setProperty

Set Printer Property

**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


---

# 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/files/dir_44d926a17fc606d3c25449ba60427c63/dir_048f823fee1bfb22502a8732b9a001aa/prt_8cpp.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.
