//========================================================================
// Summary  : Reson 6046 Utils
// Filename : Reson6046Utils.h
// Author   : Reed Christenson reed@bluefinrobotics.com
// Project  : Reson 6046 Driver
// Revision : 0.0
// Created  : 2002.04.16
// Modified : 2002.04.16
//=========================================================================
// Description : Reson 6046 Utils
//=========================================================================
// Utilities that are not desired in the AUV framework code.

#ifndef _RESON6046UTILS_H
#define _RESON6046UTILS_H

#include "Syslog.h"

class Reson6046Utils
{
 public:
    // WARNING!!!  This overflows around 16,843,009 unsigned chars of value 0xFF.
    static unsigned int checksum8ADD(const unsigned char *buffer, 
				     unsigned int iBufferLength,
				     bool debug = false);
};

// Moves value to next bigger modulus of base.
void modup(unsigned int *value, const unsigned int base);
unsigned int modup(const unsigned int value, const unsigned int base);

#endif
