1

我尝试创建一些代码来在delphi中实现zvt-protocol。为了连接到终端,我使用 ether TIDTCPClient 或 turbopack 的 comport-component。两者都可以连接到 ingenico 终端 IPP480。它显示文本行“a32de”2 秒。我不知道为什么!

我可以发送 zvt-documentation 中描述的几个命令行,但终端没有显示或执行任何操作。

procedure TForm1.Button1Click(Sender: TObject);
var
  lSBefehl : String;
begin
  lSBefehl := '';

  IdTCPClient1.Host := eip.IPAddress; // IP des EC-Cash-Gerätes
  IdTCPClient1.Port := eport.IntValue;


  if not IdTCPClient1.Connected then begin
      IdTCPClient1.Connect; //that is working!
  end;
  if not IdTCPClient1.Connected then begin
      ShowMessage('not connected!');
  end;

  lSBefehl := Chr(6)+Chr(0)+Chr(6)+Chr(209)+Chr(255); //Nothing!

  IdTCPClient1.SendCmd(lSBefehl);
end;

是否有用于 zvt 字节序列的测试工具?或者您知道正确的字节序列顺序的解决方案吗?

最好的问候克里斯蒂安

4

3 回答 3

1

您可以尝试使用 idTcpClient.IOHandler.WriteDirect 或 idTcpClient.IOHandler.Write 程序。

procedure TForm1.Button1Click(Sender: TObject); var wBuf : TIdBytes; begin ... SetLength(wBuf, 5); wBuf[1] := $06; wBuf[2] := $00; wBuf[3] := $06; wBuf[4] := $D1; wBuf[5] := $FF; ... if (IdTCPClient.Connected) then begin try idTcpClient.IOHandler.WriteDirect(wBuf); except on e: exception do begin showmessage('Error :'+ e.message) end; end; end; ... end;

于 2017-08-03T17:15:35.950 回答
0

ZVT 官方文档有一组跟踪文件,其中包含发送到终端的字节和从终端接收的字节。我发现这些在开发我们自己的 ZVT 实现时很有帮助。

于 2017-11-24T07:14:38.287 回答
0

答案可能为时已晚,但我们也面临同样的问题,即该地区的例子并不多ZVT。同时,我们在 GitHub 上发布了一个测试软件,可以测试最重要的功能。单元测试中也有一些字节序列的例子。你可以在这里找到我们的项目https://github.com/Portalum/Portalum.Zvt

于 2021-11-19T19:15:24.640 回答