无法理解RFID桌面阅读器的SDK文档
我正在使用一个完全未标记的RFID设备,并且SDK单独发送,没有制造和模型,也没有在线SDK。
我试图将设备功率设置为最大化并获得读者的力量。
根据文档:
设置电源的代码:
public String SetPower(AsyncSocketState state, byte readpower, byte writepower) {
byte type = 0;
byte[] msgbody = new byte[]{0, readpower, writepower};
byte[] command = this.cmd.PackSelector(msgbody, type);
return !this.Send(state, command) ? "-4" : "0";
}
获得电源:
public String GetPower(AsyncSocketState state) {
Respond.Power = "";
byte type = 12;
byte[] msgbody = new byte[0];
byte[] command = this.cmd.PackSelector(msgbody, type);
return !this.Send(state, command) ? "-4" : "0";
}
这是来自文档:
4.3.6获取读者电源
public string GetPower(AsynSocketState state);
Parameters:
state: Communication handle.
* return value:
Success returns "0", failure returns "-4"
Value:
Loop:Open loop/closed loop "0" open loop "1" closed loop result[3]
readpower:Reader read power, return value "5~30" result[4]
writepower:Write power of reader, return value "5~30" result[5]
设置功率非常直截了当,并且根据文档的最大幂为30我设置的,我得到的0是回报,这是成功的回报。
获取电源的代码也仅返回一个字符串,还返回0,但是根据文档,在标记为结果的某个地方有更多值[3]结果[4]等。
这些“结果”值是什么意思是我如何获得这些值
I am working with a RFID device which is completely unmarked and the sdk was sent seperately with no make and model and no sdk online.
I am trying to set the device power to max and get the power of the reader.
According to the docs :
The code for setting power :
public String SetPower(AsyncSocketState state, byte readpower, byte writepower) {
byte type = 0;
byte[] msgbody = new byte[]{0, readpower, writepower};
byte[] command = this.cmd.PackSelector(msgbody, type);
return !this.Send(state, command) ? "-4" : "0";
}
For getting power:
public String GetPower(AsyncSocketState state) {
Respond.Power = "";
byte type = 12;
byte[] msgbody = new byte[0];
byte[] command = this.cmd.PackSelector(msgbody, type);
return !this.Send(state, command) ? "-4" : "0";
}
this is from the documentation:
4.3.6 Get reader power
public string GetPower(AsynSocketState state);
Parameters:
state: Communication handle.
* return value:
Success returns "0", failure returns "-4"
Value:
Loop:Open loop/closed loop "0" open loop "1" closed loop result[3]
readpower:Reader read power, return value "5~30" result[4]
writepower:Write power of reader, return value "5~30" result[5]
setting the power is quite straight forward and the max power according to the docs is 30 which I set and I get 0 in return which is returned on success.
The code to get power is also returning only a string and is also returning 0 but according to the docs there are more values in somewhere labeled as result[3] result[4] and so on.
What do these 'result' values mean how do I get those values
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论