//
//  Copyright © 2003, RESON Inc. All Rights Reserved.
//
//  No part of this file may be reproduced or transmitted in any form or by
//  any means, electronic or mechanical, including photocopy, recording, or
//  information storage or retrieval system, without permission in writing
//  from RESON Inc.
//
//  Filename:   7kSonarInterface.h
//
//  Project:    6046
//
//  Author(s):  W. Arcus
//
//  Purpose:    
//
//  Notes:      
//

#if !defined(AFX_7KSONARINTERFACE_H__32306224_1F0C_4534_8FDA_83BCCD09C9D8__INCLUDED_)
#define AFX_7KSONARINTERFACE_H__32306224_1F0C_4534_8FDA_83BCCD09C9D8__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "CallbackDefs.h"

class C7kSonarInterface
{
public:

                            C7kSonarInterface               (   void );
    virtual                ~C7kSonarInterface               (   void );

    // Members that may be overridden.

    virtual bool            RegisterCallback                (   PFN_SUBSYSTEMCALLBACK       pfnCallback,
                                                                void                       *pvParam );

    virtual bool            DeregisterCallback              (   void );

    // Members that must be overridden.

    virtual bool            Connect                         (   void )                                                      = 0;

    virtual bool            Disconnect                      (   void )                                                      = 0;

    virtual bool            Write7kRecord                   (   const BYTE                 *pby7kRecord,
                                                                const unsigned long        &rulBytes )                      = 0;

    virtual bool            HandleDataFromSonar             (   BYTE                       *pby7kRecord,
                                                                unsigned long              &rulRecordBytes,
                                                                const unsigned long        &rulMaxBufferSize,
                                                                const bool                 &rbResetEvent       = false )    = 0;

    virtual                 operator HANDLE                 (   void ) const                                                = 0;

protected:

    virtual bool            Handle7kRecordFromSonar         (   const BYTE                 *pby7kRecord,
                                                                const unsigned long        &rulBytes,
                                                                const unsigned long        &rulTimeStamp );

private:

    ///////////////
    // Attributes.

    PFN_SUBSYSTEMCALLBACK   m_pfnCallback;
    void                   *m_pvParam;

    ///////////////
    // Services.

                            C7kSonarInterface               (   const C7kSonarInterface    &rRhs );                 // Not implemented thus private.
    C7kSonarInterface &     operator =                      (   const C7kSonarInterface    &rRhs );                 // Not implemented thus private.

};

#endif // !defined(AFX_7KSONARINTERFACE_H__32306224_1F0C_4534_8FDA_83BCCD09C9D8__INCLUDED_)

