运行环境:1.硬件:树莓派+rak831+rak811
2.软件:lora-gateway-bridge +loraserver+loraappserver
问题描述:
在设备成功入网之后,大概4%的数据会出现execution timeout
在lora-app-server中我的codec如下:
function Decode(fPort, bytes) {
var decoded = {};
decoded.a = bytes[0];
decoded.b= bytes[1];
decoded.c = bytes[2];
decoded.d = bytes[3];
decoded.e = bytes[4];
decoded.f= bytes[5];
decoded.g = bytes[6];
decoded.h = bytes[7];
decoded.i = bytes[8];
return decoded;
}
报错数据如下所示:
在开源lora中的相关代码为:
// CodecMaxExecTime holds the max. time the (custom) codec is allowed to
// run.
var CodecMaxExecTime = 10 * time.Millisecond
func] defer func() { <span] err = fmt.Errorf("%s", caught) <span] }()
<span] script := c.encodeScript + "\n\nEncode(fPort, obj);\n"
<span] vm := otto.New() <span] vm.SetStackDepthLimit(32) <span] vm.Set("fPort", c.fPort)
<span] go func() { <span] vm.Interrupt <- func() { <span] } <span]
<span] val, err = vm.Run(script) <span] return nil, errors.Wrap(err, "js vm error") <span] if !val.IsObject() { <span] }
<span] var out interface{} <span] if err != nil { <span] }
<span] return interfaceToByteSlice(out) } 请问大家有过类似经历吗? 具体的加q:2391188683
|