//=========================================================================
// Summary  :
// Filename : MMUSBL.h
// Author   : paley
// Project  :
// Revision : 1
// Created  : 2001/10/18
// Modified :
//=========================================================================
// Description :  USBL messages
//=========================================================================
#ifndef _MMUSBL_H
#define _MMUSBL_H

#include "ModemMessage.h"
#include "MMUtils.h"

#define USBLMessageTimeOut 30

//////////////////////////////////////////////
class MMUSBLFix : public MMConvertible
{

public:
	MMUSBLFix(const ModemMessage *pMM);
	MMUSBLFix(long fixNum, float rxPitch, float rxRoll, float rxHeading, float dcl,
		float dcm, float eastings, float northings, Boolean reset = False);

	virtual const char* pcRead(const char* sourceBuffer);
	virtual char* pcWrite(char* destBuffer) const;
	virtual ModemMessage::Type tGetMessageType() const
		{ return ModemMessage::tMMUSBLFix; };
	virtual int iGetDefaultTimeout() const
		{ return USBLMessageTimeOut; };

	void setFixNum(long fixNum) { m_fixNum = fixNum; };
	void setRxPitch(float rxPitch) { m_rxPitch = rxPitch; };
	void setRxRoll(float rxRoll) { m_rxRoll = rxRoll; };
	void setRxHeading(float rxHeading) { m_rxHeading = rxHeading; };
	void setDcl(float dcl) { m_dcl = dcl; };
	void setDcm(float dcm) { m_dcm = dcm; };
	void setEastings(float eastings) { m_eastings = eastings; };
	void setNorthings(float northings) { m_northings = northings; };
	void setReset(Boolean reset) { m_reset = reset; };

	long getFixNum() { return m_fixNum; };
	float getRxPitch() { return m_rxPitch; };
	float getRxRoll() { return m_rxRoll; };
	float getRxHeading() { return m_rxHeading; };
	float getDcl() { return m_dcl; };
	float getDcm() { return m_dcm; };
	float getEastings() { return m_eastings; };
	float getNorthings() { return m_northings; };
	Boolean getReset() { return m_reset; };

	void toString(char* str);
	static int size() { return 33; };

protected:
	long m_fixNum;
	float m_rxPitch;
	float m_rxRoll;
	float m_rxHeading;
	float m_dcl;
	float m_dcm;
	float m_eastings;
	float m_northings;
	Boolean m_reset;
};


#endif
