MCPcopy Create free account
hub / github.com/collin80/SavvyCAN / newISOMessage

Method newISOMessage

scriptcontainer.cpp:331–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329}
330
331void ISOTPScriptHelper::newISOMessage(ISOTP_MESSAGE msg)
332{
333 qDebug() << "isotpScriptHelper got a ISOTP message";
334 if (!gotFrameFunction.isCallable()) return; //nothing to do if we can't even call the function
335 //qDebug() << "Got frame in script interface";
336
337 QJSValueList args;
338 args << msg.bus << msg.ID << msg.len;
339 QJSValue dataBytes = scriptEngine->newArray(static_cast<uint>(msg.len));
340
341 for (int j = 0; j < msg.len; j++) dataBytes.setProperty(static_cast<quint32>(j), QJSValue(msg.data[j]));
342 args.append(dataBytes);
343 gotFrameFunction.call(args);
344}
345
346
347

Callers

nothing calls this directly

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected