No momento, esta página não está disponível em português
Point-of-sale icon

Display a screen on a large screen terminal - C

Implement the callback

Implement the callback based on the signature in the show_screen_extern.h file and pass this as a parameter of the show_screen call. For more information on how to do this, see Implement callbacks.

Code example

void show_screen_CB(show_screen_response *p, void *echo_struct){
app_context_t * POS = (app_context_t *)echo_struct;


Allocate the request structure

Use show_screen_allocate to allocate, initialize and return a show_screen_request structure. Populate the request by performing string duplication.

If you want the data for later use, retain it, or it will be released automatically.

Call the show_screen function

Call the show_screen function to display specific screens prior to the processing the tender or terminals with large screens (MX925, MX915). Use this function to display order items on a virtual receipt.


Value Description
show_tender_request Pointer to the show_screen_request struct, this struct contains all the input parameters for this call.
show_screen_CB Pointer to the callback function in the POS that will be called with the results of the show_screen call.

Code example

The declaration of the call to start a transaction is as follows:

ADYLibraryResult show_screen(show_screen_request * show_screen_request_ptr, void(*callback_function)(show_screen_response *, void *), void * echo_struct);

Handle the callback

The show_screen_CB returns the immediate response to the call and a pointer to the POS-defined echo struct.


Value Description
show_screen_response The immediate response to the show_screen call, which includes the ID and status of the screen, and the result of the call.
echo_struct Pointer to a POS defined struct. Returned in the callback. It can be used to share a POS data struct between the call to the library and the callback from the library in response to the call.