//  Copyright (c) 2001, Reson, Inc. All Rights Reserved.
//
//  Filename:   ChannelSequencer.h
//
//  Project:    6046
//
//  Author(s):  W. Arcus
//
//  Purpose:    
//
//  Notes:      
//

#if !defined(AFX_CHANNELSEQUENCER_H__E3ED4796_0DBA_41A3_80D1_B8F76175A0E5__INCLUDED_)
#define AFX_CHANNELSEQUENCER_H__E3ED4796_0DBA_41A3_80D1_B8F76175A0E5__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "..\..\..\Utils\NetUtils\BufferedData.h"

class CChannelSequencer : public CBufferedData<CHANNELITEM> 
{
public:

                        CChannelSequencer           ( void );
    virtual            ~CChannelSequencer           ( void );

    bool                RemovePingChannels          (   const unsigned long     &rulPingNumber );

    bool                GetAccumulatedPingChannels  (   const unsigned long     &rulPingNumber,
                                                        unsigned long           &rulTimestamp,
                                                        CDynamicBuffer<BYTE>   *&rpPort,
                                                        CDynamicBuffer<BYTE>   *&rpStbd );

    bool                IsPingComplete              (   const unsigned long     &rulPingNumber ) const;

private:

                        CChannelSequencer           (   const CChannelSequencer &rRhs );        // Not implemented.
    CChannelSequencer & operator =                  (   const CChannelSequencer &rRhs );        // Not implemented.

    bool                IndexFromPingNumber         (   const unsigned long &rulPingNumber,
                                                        int                 &riPortChannelIndex,
                                                        int                 &riStbdChannelIndex ) const;
};

#endif // !defined(AFX_CHANNELSEQUENCER_H__E3ED4796_0DBA_41A3_80D1_B8F76175A0E5__INCLUDED_)
