/*******************************************************************
 * Header file generated by Protoc for Embedded C.                 *
 * Version 0.2 (2012-01-31)                                        *
 *                                                                 *
 * Copyright (c) 2009-2012                                         *
 * Technische Universitaet Muenchen                                *
 * http://www4.in.tum.de/                                          *
 *                                                                 *
 * Source : device_config.proto
 * Package:
 *                                                                 *
 * Do not edit.                                                    *
 *******************************************************************/

#ifndef _device_config_H
#define _device_config_H

#ifdef __cplusplus
  extern "C" {
#endif


#define MAX_REPEATED_LEN 32
#define MAX_STRING_LEN 32
#define MAX_BYTES_LEN 32

/*******************************************************************
 * General functions
 *******************************************************************/

/*
 * returns the size of a length delimited message which also
 * contains the first bytes for the length encoding.
 */
unsigned long Message_get_delimited_size(void *_buffer, int offset);

/*
 * Tests whether a message can be completely read from the given buffer at
 * the offset. The bytes [offset..offset+length-1] are interpreted.
 *
 * Returns 1 (true) if buffer[offset..offset+length-1] contains a complete
 * message or 0 (false) otherwise.
 */
int Message_can_read_delimited_from(void *_buffer, int offset, unsigned int length);


/*******************************************************************
 * Enumeration: device_config.proto, line 1
 *******************************************************************/
enum DeviceType {
  _LEGO_NXT = 0,
  _SIMULATOR = 1
};

/*******************************************************************
 * Message: device_config.proto, line 6
 *******************************************************************/

/* Maximum size of a serialized DeviceConfigurationMessage-message, useful for buffer allocation. */
#define MAX_DeviceConfigurationMessage_SIZE 110

/* Structure that holds a deserialized DeviceConfigurationMessage-message. */
struct DeviceConfigurationMessage {
  int _id_len;
  char _id[MAX_STRING_LEN];
  enum DeviceType _type;
  int _sensors_len;
  char _sensors[MAX_BYTES_LEN];
  int _commands_len;
  char _commands[MAX_BYTES_LEN];
};
/*
 * Serialize a DeviceConfigurationMessage-message into the given buffer at offset and return
 * new offset for optional next message.
 */
int DeviceConfigurationMessage_write_delimited_to(struct DeviceConfigurationMessage *_DeviceConfigurationMessage, void *_buffer, int offset);

/*
 * Serialize a DeviceConfigurationMessage-message together with its tag into the given buffer
 * at offset and return new offset for optional next message.
 * Is useful if a DeviceConfigurationMessage-message is embedded in another message.
 */
int DeviceConfigurationMessage_write_with_tag(struct DeviceConfigurationMessage *_DeviceConfigurationMessage, void *_buffer, int offset, int tag);

/*
 * Deserialize a DeviceConfigurationMessage-message from the given buffer at offset and return
 * new offset for optional next message.
 *
 * Note: All fields in _DeviceConfigurationMessage will be reset to 0 before _buffer is interpreted.
 */
int DeviceConfigurationMessage_read_delimited_from(void *_buffer, struct DeviceConfigurationMessage *_DeviceConfigurationMessage, int offset);


#ifdef _cplusplus
  }
#endif

#endif
