• Sends a CAN message

    Parameters

    Returns Promise<number>

    • Returns a promise that resolves to sent timestamp
    // Send a standard CAN message with 8 bytes of data
    const canMsg: CanMessage = {
    id: 0x111, // CAN ID in hex
    data: Buffer.from([0,1,2,3,4,5,6,7]), // 8 bytes of data
    dir: 'OUT', // Output direction
    msgType: {
    idType: CAN_ID_TYPE.STANDARD, // Standard CAN frame
    remote: false, // Not a remote frame
    brs: false, // No bit rate switching
    canfd: false // Not a CAN FD frame
    }
    }
    const timestamp = await output(canMsg) // Send and get timestamp
  • Sends a LIN message

    Parameters

    • msg: LinMsg

      The LIN message to be sent

    Returns Promise<number>

    • Returns a promise that resolves to sent timestamp