//=========================================================================
// Summary  :
// Filename : MMSvs.h
// Author   : jones
// Project  :
// Revision : 1
// Created  : 2002/01/04
// Modified : 2002/01/04
//=========================================================================
// Description :  Svs message
//=========================================================================

#include <stdio.h>
#include "MMSvs.h"

MMSvs::MMSvs(const ModemMessage *pMM)
{
    Assert(pMM);
    Assert(pMM->getType()==tGetMessageType());
    const char* pcEnd = pcRead(pMM->getBuffer());
    Assert(pcEnd==pMM->getBuffer()+pMM->getBufferSize());
}

MMSvs::MMSvs(long tof, float sM, long sMm)
{
    setRawTOF(tof);
    setSpeedM(sM);
    setSpeedMm(sMm);
}

const char* MMSvs::pcRead(const char* sourceBuffer)
{
    //for now just reading short of mm
    const char* pcEnd = ::pcRead(sourceBuffer, &m_speedMm);
    return pcEnd;
}

char* MMSvs::pcWrite(char* destBuffer) const
{
    //for now just writing short of mm
    char* pcEnd = ::pcWrite(destBuffer, m_speedMm);
    return pcEnd;
}
