|
2#
楼主 |
发表于 2016-4-13 17:07:47
|
只看该作者
自己弄出来,感谢天感谢地址:
在此记下:
#include "lrs.h"
Action()
{
lrs_create_socket("socket0","TCP","RemoteHost=XXXXXXXX:XXXX",LrsLastArg);
lr_start_transaction("消费");
lrs_send("socket0","buf0",LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_save_param_ex("socket0","received","buf1",44,2,"ebcdic","Response1");
lr_output_message ("消费Response: %s", lr_eval_string("<Response1>"));
//position=(char*)strstr(lr_eval_string("<Response1>"),lr_eval_string("0170100400"));
if(strcmp(lr_eval_string("<Response1>"),"00")==0)
{lr_end_transaction("消费", LR_PASS);}
else
{lr_end_transaction("消费", LR_FAIL);}
return 0;
}
;WSRData 2 1
send buf0 93
"\x00\x5b\x60\x04\x01\x00\x00\x61\x32\x00\x32\x15\x01\x08\x00\x00\x20\x00\x00\x00\xc0\x00\x16\x00\x14\x29\x30\x30\x30\x30\x30\x30\x30\x33\x30\x30\x30\x30\x30\x30\x30\x30\30\x30\x30\x30\x30\x33\x00\x11\x00\x00\x00\x08\x00\x30\x00\x29\x53\x65\x71\x75\x65\x6e\x63\x65\x20\x4e\x6f\x31\x36\x33\x30\x39\x34\x53\x58\x58\x2d\x32x32\x31\x31\x32\x35\x37\x00\x03\x30\x31\x20"
recv buf1 11
-1 |
|