// Summary  : Reson 6046 Output
// Filename : Reson6046Output.cc
// Author   : Reed Christenson reed@bluefinrobotics.com
// Project  : Reson 6046 Driver
// Revision : 0.0
// Created  : 2002.03.21
// Modified : 2002.03.21
//=========================================================================
// Description : Reson 6046 Output
//=========================================================================

#include "Reson6046Output.h"

/// Output constructor.
Reson6046Output::Reson6046Output(Boolean serverSide,
				 Access access,
				 Boolean init)
    : DriverOutput(Reson6046OutputName,
		   serverSide,
		   sizeof( Data ),
		   access,
		   init)
{
    dwrite(5)("Entering output constructor...");
    data_skel = &data;
    write();
    dwrite(5)("Leaving output constructor...");
}

/// Output destructor.
Reson6046Output::~Reson6046Output()
{
    dwrite(5)("Entering output destructor...");
    dwrite(5)("Leaving output destructor.");
}

/// Clear shared memory.
void Reson6046Output::clear(void)
{
    dwrite(5)("Entering clear shared memory...");

    data.deviceReady = False;
    data.errorCountLimit = 10;
    data.errorCount = 0;
    data.initErrorCountLimit = 10;
    data.initErrorCount = 0;
    data.status = DeviceIF::Offline;
    data.debug = 0;
    //    debug = 0;
    
    dwrite(5)("Leaving clear shared memory.");
}

// void Reson6046Output::read()
// {
//   DriverOutput::read((void *)&data);
// }

// void Reson6046Output::write()
// {
//   DriverOutput::write((void *)&data);
// }
