# Messages/infoMessage.h File Reference

Public methods for infoMessage.c. More...

`#include "header.h"`

## Data Structures
struct | infoMessage
## Defines
#define | MAX_PARAMETERS_IN_INFO_MESSAGE 17
#define | INFO_MESSAGE_CLUSTER 0x0007
#define | INFO_MESSAGE_VERSION 0x02
#define | INFO_MESSAGE_FLAGS_NONE 0x00
#define | DEVICETYPE_SMITH_ELECTRONCS_ROUTER_DEMO 0x01
#define | DEVICESUBTYPE_SMITH_ELECTRONCS_ROUTER_DEMO 0x01
#define | CAUSE_SCHEDULED 0x01
#define | CAUSE_MOTION 0x02
#define | CAUSE_STARTUP 0x03
## Functions
void | printInfoMessage (struct infoMessage *im)
void | serializeInfoMessage (struct infoMessage *im, unsigned char *destinationPtr)
struct infoMessage | deserializeInfoMessage (unsigned char *source)
unsigned int | getSizeOfInfoMessage (struct infoMessage *im)

## Detailed Description

Public methods for infoMessage.c.

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.

## Define Documentation

#define MAX_PARAMETERS_IN_INFO_MESSAGE 17

INFO MESSAGE FROM: Device TO: Server RESPONSE: none

Contains device information, like manufacturer, model, etc.

## Function Documentation

struct infoMessage deserializeInfoMessage | ( | unsigned char * | source | ) | `[read]`

Creates an infoMessage from the stream of bytes starting at source

Parameters:

  | source | the beginning of the serialized Info Message

Returns:
  an infoMessage from the parsed data

Todo:

  Check that numParameters < MAX_PARAMETERS_IN_INFO_MESSAGE

  Point source to length field, and verify if length field == (sourcePtr - source)?

unsigned int getSizeOfInfoMessage | ( | struct infoMessage * | im | ) |

Returns:
  the size of the Info Message, including all KVPs

void printInfoMessage | ( | struct infoMessage * | im | ) |

Display the contents of the infoMessage to console

Parameters:

  | im | the Info Message to display

void serializeInfoMessage | ( | struct infoMessage * | im,
|  | unsigned char * | destinationPtr |
| ) |  |  |

Outputs the info message as a stream of bytes to memory pointed to by destinationPtr Number of bytes streamed is equal to getSizeOfInfoMessage()

Parameters:

  | im | the infoMessage to serialize
  | destination | points to a region of memory at least getSizeOfInfoMessage() bytes in size

All Data Structures Files Functions Variables Defines