//
//  Copyright © 2004, 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:   RESON7kGeneric.h
//
//  Project:    6046
//
//  Author(s):  W. Arcus
//
//  Purpose:    
//
//  Notes:      
//

#if !defined(AFX_RESON7KGENERIC_H__DF081A2A_6E24_4AA8_8406_4D382CD02DF0__INCLUDED_)
#define AFX_RESON7KGENERIC_H__DF081A2A_6E24_4AA8_8406_4D382CD02DF0__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
    #error include 'stdafx.h' before including this file for PCH
#endif

#include "Resource.h"
#include "SensorInterface.h"

#include "..\..\..\Utils\NetUtils\SensorList.h"                             // Linked list of sensor objects.
#include "Subsystem.h"

/////////////////////////////////////////////////////////////////////////////
// CRESON7kGenericApp class defintion.

class CRESON7kGenericApp : public CWinApp, public CSensorInterface
{
public:

                                            CRESON7kGenericApp      (   void );
    virtual                                ~CRESON7kGenericApp      (   void );

    static CRESON7kGenericApp *             This                    (   void );

    CSensorList<CSubsystem>   &             SensorList              (   void )  const;

    CString                                 Address                 (   void )  const;
    unsigned long                           Port                    (   void )  const;

    // Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CRESON7kGenericApp)
    public:
    virtual BOOL InitInstance();
    virtual int ExitInstance();
    //}}AFX_VIRTUAL

    //{{AFX_MSG(CRESON7kGenericApp)
        // NOTE - the ClassWizard will add and remove member functions here.
        //    DO NOT EDIT what you see in these blocks of generated code !
    //}}AFX_MSG
    DECLARE_MESSAGE_MAP()

private:

    ///////////////
    // Attributes.

    mutable CSensorList<CSubsystem>         m_SensorList;

    CString                                 m_Address;
    unsigned long                           m_ulPort;

    ///////////////
    // Services.

    void                                    SettingsFromRegistry    (   void );

};

#define GetApp_m()                          CRESON7kGenericApp::This()

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_RESON7KGENERIC_H__DF081A2A_6E24_4AA8_8406_4D382CD02DF0__INCLUDED_)
