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

# msr.h

[Go to the documentation of this file.](/s-adk-5.1-programmers-guide/readme/files/dir_b259c67979486db4cd1816234700c14a/dir_699851f087f6e6136e28f04fc8a16e7d/msr_8h.md)

```cpp
 1 
 8 #ifndef __MSR_LIB_INTERFACE__
 9 #define __MSR_LIB_INTERFACE__
 10 
 11 #ifdef __cplusplus
 12 extern "C" {
 13 #endif
 14 
 15 #include "msr_common.h"
 16 
 21 typedef void (* MSR_Callback) (void *data);
 22 
 34 int MSR_SetOptions(unsigned char *options, unsigned char options_len);
 35 
 48 int MSR_Activate(MSR_Callback cbf, void *cb_data);
 49 
 60 int MSR_Deactivate(void);
 61 
 71 int MSR_DataAvailable(void);
 72 
 96 int MSR_GetData(int timeout_msec, MSR_TrackData *tracks, MSR_DecodedData *data);
 97 
 118 int MSR_GetData2(int timeout_msec, MSR_TrackData2 *tracks, MSR_DecodedData *data);
 119 
 140 int MSR_GetData3(int timeout_msec, MSR_TrackData3 *tracks, MSR_DecodedData *data);
 141 
 163 int MSR_GetData4(int timeout_msec, MSR_TrackData4 *tracks, MSR_DecodedData4 *data);
 164 
 169 void MSR_AbortGetData(void);
 170 
 182 int MSR_SwitchLeds(int led1, int led2, int led3, int duration);
 183 
 184 
 185 #ifdef __cplusplus
 186 }
 187 #endif
 188 
 189 #endif // avoid double include
```


---

# 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/msr_8h_source.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.
