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

Method sendISOTP

scriptcontainer.cpp:304–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302}
303
304void ISOTPScriptHelper::sendISOTP(QJSValue bus, QJSValue id, QJSValue length, QJSValue data)
305{
306 ISOTP_MESSAGE msg;
307 msg.extended = false;
308 msg.ID = id.toInt();
309 msg.len = length.toUInt();
310
311 if (!data.isArray()) qDebug() << "data isn't an array";
312
313 for (int i = 0; i < msg.len; i++)
314 {
315 msg.data[i] = static_cast<uint8_t>(data.property(i).toInt());
316 }
317
318 msg.bus = bus.toInt();
319
320 if (msg.ID > 0x7FF) msg.extended = true;
321
322 qDebug() << "sending isotp message from script";
323 handler->sendISOTPFrame(msg.bus, msg.ID, msg.data);
324}
325
326void ISOTPScriptHelper::setRxCallback(QJSValue cb)
327{

Callers

nothing calls this directly

Calls 1

sendISOTPFrameMethod · 0.80

Tested by

no test coverage detected