# Messages/header.c File Reference

Common message header. More...

`#include "header.h"`
`#include "../../Common/printf.h"`

## Functions
void | printHeader (struct header *h)
void | serializeHeader (struct header *h, unsigned char *destination)
unsigned int | getSizeOfHeader (struct header *h)
struct header | deserializeHeader (unsigned char *source)

## Detailed Description

Common message header.

This is a message header that has the basics:

- MAC Address
- Protocol Version
- Flags
- Sequence Number

Of course you will probably want to change this header format for your own use.

Rev
  598

Author
  dsmith

Date
  2010-06-14 16:08:43 -0700 (Mon, 14 Jun 2010)

YOU ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.

## Function Documentation

unsigned int getSizeOfHeader | ( | struct header * | h | ) |

Gets the size of the header.

Returns:
  the size of the header, in bytes

void printHeader | ( | struct header * | h | ) |

uncomment to display more information

void serializeHeader | ( | struct header * | h,
|  | unsigned char * | destination |
| ) |  |  |

Serializes the Header into memory starting at destination. Number of bytes streamed is equal to getSizeOfHeader()

Parameters:

  | h | the header to serialize
  | destination | points to a region of memory at least getSizeOfHeader() bytes in size

All Data Structures Files Functions Variables Defines