Вывод буфера на экран

Обсуждаем инструментарий, технологии, прочие рабочие моменты.
0nscr33n
Новичок
Сообщения: 8
Зарегистрирован: 04 апр 2014, 20:43

Вывод буфера на экран

Непрочитанное сообщение 0nscr33n »

Привет всем)

Есть такой трабл - нужно вывести содержание буферов (скажем буферы С,В, буфер суммы) в несколько полей на экране, то есть каждый буфер в свое поле.

Есть у кого-нибудь такой опыт или идеи?
cirik
Новичок
Сообщения: 44
Зарегистрирован: 23 ноя 2010, 22:29
Благодарил (а): 3 раза
Поблагодарили: 7 раз

Re: Вывод буфера на экран

Непрочитанное сообщение cirik »

Если говорить про DDC, то я реализовал показ того что ввёл клиент на экран для подтверждения вот так:
Вначале при помощи Buffer Copy State (’@G ’) копировал из буфера С (или В) в буфер 78 (Customer Name on Track 1) то что ввёл клиент.
Далее при помощи Screen Control Characters HT (causes the customer’s name, encoded on track 1 of the customer’s card, to be shown on the customer display, starting at the current customer display cursor position) выводил на экран то что ввел клиент, в описание экрана вставлял этот ТЭГ, и указывал в какой позиции скрина отобразить его значение.

Но в таком варианте можно на одном экране можно отобразить содержание только одного буфера.

Есть ещё вариант:
ESC V (Shows on the consumer display the contents of a buffer within the constraints of a format template. The buffer is specified by the 3 bytes following the ESC V, the first byte specifies the buffer (A through Z), the second and third specify the Format Template number.) Вот подробнео описание:
The ESC V control sequence displays the contents of a buffer within the constraints of a format template. The format of the control sequence is as follows:
ESC V a tt
or
ESC V aaa tt
The valid values for a, the buffer name, are A through Z. The valid values for aaa, the buffer name, are 256 through 355.
The single character name designates one of 27 memory buffers that are reserved for storage of specific data. These buffers contain such information as the
transaction amount entered, the consumer's name, and other terminal and transaction related data.
The valid values for tt, the format template number, are 01 through 11. This number designates one of 11 available default format templates. The templates
specify how to display the contents of a buffer so that it appears on the screen properly as a transaction amount, phone number, plain text, plain numbers,
and so on.

Я думаю что ESC V для ваших задач наиболее подходящий.
0nscr33n
Новичок
Сообщения: 8
Зарегистрирован: 04 апр 2014, 20:43

Re: Вывод буфера на экран

Непрочитанное сообщение 0nscr33n »

поправка: это требуется сделать под NDC...
Закрыто