Main Page | Class List | File List | Class Members | File Members | Related Pages

include/otto/packet.h File Reference

Network packet formats. More...

Go to the source code of this file.

Classes

struct  otto_funcadr_sec_adr
 Functional data format 2 and 3, secondary address. More...

struct  otto_funcadr_ext_adr
 Functional data format 3, extended address. More...

union  otto_funcadr_data
 Functional addressing message data. More...

union  otto_phyadr_data
 Physical addressed message data. More...

union  otto_packet
 OBD2 Packet format. More...


Defines

#define OTTO_PACKET_LENGTH_MAX   12
 Maximum packet length.


Functions

int otto_crc_calc (union otto_packet *pkt)
 Calculate CRC for a packet.

int otto_crc_valid (union otto_packet *pkt)
 Validate CRC for a packet.

int otto_findpacket (union otto_packet *pkt, int *start, int *len)
 Find a valid packet within a packet buffer.


Detailed Description

Network packet formats.

Including data from ??? (list specs)


Define Documentation

#define OTTO_PACKET_LENGTH_MAX   12
 

Maximum packet length.


Function Documentation

int otto_crc_calc union otto_packet pkt  ) 
 

Calculate CRC for a packet.

Returns:
Calculated checksum
Parameters:
pkt  Packet to compute CRC for

int otto_crc_valid union otto_packet pkt  ) 
 

Validate CRC for a packet.

Returns:
One if CRC is valid, zero if invalid, negative on error
Parameters:
pkt  Packet to validate CRC

int otto_findpacket union otto_packet pkt,
int *  start,
int *  len
 

Find a valid packet within a packet buffer.

Todo:
rework without so many memcpys
Parameters:
pkt  Partial packet buffer to search
start  [out] Start of first packet found
len  [out] Length of first packet found


Generated on Thu Jul 8 19:26:06 2004 for OpenOtto by doxygen 1.3.7