short update 0x0010

hey there, just a short update from my site to keep this blog running. lately I learned much new stuff, but also struggled a bit (I asked a second, I guess more specific question on StackOverflow which was not answered after 5 minutes and wasn’t even yet – so I deleted it after a while; so I would now rate this site from superduperextracool down to very very helpful).

there are just some things that have come to my mind and I want to share with you.

first thing is, I talked about this OSEK tp function to send and receive data recently in some former entrys.

I found this good example from another user from StackOverflow:

„Take a look at the OSEK_TP CANoe demo. It shows how to transmit and receive date over ISO-TP (Transport Protocol, ISO 15765-2). See the nodeA.can file and the OSEL_TP API reference for implementation details.

Here is minimal example:

Create and configure a connection:

long handle;
handle = CanTpCreateConnection(0);    // 0 = Normal mode
CanTpSetTxIdentifier(handle, 0x700);  // Tx CAN-ID
CanTpSetRxIdentifier(handle, 0x708);  // Rx CAN-ID

Send data:

BYTE data[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
CanTpSendData(handle, data, elcount(data));

To receive data, you have to implement the following callback function:

void CanTp_ReceptionInd(long connHandle, byte data[])
{
    write("Received %d byte on connection %d: [%02x] ...",
            elcount(data), connHandle, data[0]);
}

You can also check out the „CCI_Implementation.cin“ that should hide somewhere in your CAN (Demo)folders. I think this should do it for the moment.

Another topic is, that for my latest release of simulation to colleagues I thought it was a good idea to create a changelog, to track changes in future. via Google I found this helpful (well, at least a bit funny) site:

keepachangelog .

So if you ever consider writing a changelog, this might be a good start.

Please note also, that I added a link, describing how to go with a CANAlyzer Demo-Version from Vector to test (without license or HW at least), some of the CANoe features (untested).
I hope it works.

 

 

short update 0x0010

Hinterlasse einen Kommentar