Is it Possible to Use a dbc for Ethernet Configuration?
Yes it is, but a Signal Protocol dll is necessary for sending and interpreting in Trace/Data/Graphic Window the Ethernet signals that have been previously defined within a dbc.
The dll supports the interpretation of signals with fix offset and length, which are contained in an Ethernet packet corresponding to just a single frame out of the dbc. It is not possible, using a dbc as network description, to have several frames payloads contained in one Ethernet packet, or one payload split over several Ethernet packets (TCP or IP fragmentation), the signal protocol is mostly used with proprietary protocols.
However if you want to start with a dbc, you can either:
- Develop your own dll following the instruction of Online Help page called “Implementation of a Signal Protocol DLL “
- Use Vector SignalProtocol.dll delivered as project example in the Sample Configuration EthernetSystemDemo of CANoe/CANalyzer Installation up to version 10. It interprets the UDP frames that have been transmitted on Port 40001. The UDP payload has to begin with a 32 bit identifier, defined as CAN identifier in the dbc. If your proprietary protocol corresponds to this design, then the Signal Protocol can easily be adapted for your usage.
The Signal Protocol dll has to be assigned to the Eth bus (Configuration Menu -> Network Hardware).
If you use CANoe 64 bit, then you additionally need a 64 bit version of your Signal Protocol dll that has to be stored in the same directory than the 32 bit one, that you have configured above.
Both dlls shall have the same name and the 64 bit version one shall be called Name64.dll, like for instance:
The dbc shall first contain the BusType attribute set to Ethernet to be able to create signals and messages with DLC larger than 8:
Using the Signal Protocol dll, you can in CAPL directly access the signals received within an Ethernet frame like following:
In order to send these Ethernet messages, you have to create the corresponding CAPL data structures. See also the PacketDef.cin included file in the delivered Project Example. It contains this code part:
In the main program, you shall define a variable of this type:
Then you are able to use the EthInitPacket function to initialize the packet and then the EthSetToken function to set the protocol fields of this Ethernet frame (here it is a UDP frame):
// Prepare Message_1 ethernet packet
EthSetTokenInt(m1_Handle, "udp" , "source" , 40001 );
EthSetTokenInt(m1_Handle, "udp" , "destination", 40001 );
EthSetTokenInt(m1_Handle,"vc-sig","contentId",0x100); // message ID as defined in DBC
EthResizeToken(m1_Handle,"vc-sig","data",64); // length of raw message as defined in DBC
The following code sets the signals:
EthSetTokenSignalValue (m1_Handle, EngineSpeed, 1000.0 );
EthSetTokenSignalValue (m1_Handle, CoolantTemperature, 56.7 );
EthOutputPacket(m1_Handle); // sends the frame with the signals
For more information on this topic see following CANoe’s online help:
Please complete all required fields. Fields marked with * are required.