Old fashion design for PC-104
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright � 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 08/10/2003
// PROJECT:
// SUBSYSTEM:
// FILE: SocketVM.h
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Header file of SocketVM.h
//----------------------------------------------------------------------------
// SocketVM.h: interface for the CSocketVM class.
//
//////////////////////////////////////////////////////////////////////
#ifndef __SOCKET__VM__H__INCLUDED__
#define __SOCKET__VM__H__INCLUDED__
#if _MSC_VER > 1000
#pragma once
#endif
#include "SocketRS232.h"
#include "DeviceVMs.h"
class CSocketVM : public CSocketRS232 {public: CSocketVM(); virtual ~CSocketVM();
public: void CommandLoopStart(); void CommandLoopStop();
public: BOOL Create( CSensorArray* pSensorArray, LPCTSTR pPort ); BOOL DeviceAttach(CDeviceVMs *pDevice); BOOL DeviceDetach(CDeviceVMs *pDevice);
protected: friend class CDeviceVMs; void Resume() { CSocketRS232::Start(); }
private: enum{ MAX_DEVICE = 127 }; CDeviceVMs *m_ppDevice[MAX_DEVICE]; int m_nDeviceCount; int m_nDeviceCurrent;
private: enum{ MSG_LENGTH = 12 }; BYTE m_pBuffer[ MSG_LENGTH ];
private: DWORD m_pTime[MAX_DEVICE];
private: virtual int OnCommand(); virtual void OnBeforeWrite( LPBYTE pBuffer, DWORD& nCount ); virtual int OnAfterWrite(); virtual void OnBeforeRead( DWORD& nCount, DWORD& dwTime ); virtual int OnAfterRead( LPBYTE pBuffer, DWORD nCount ); virtual int OnPause( DWORD &dwTime );
private: BOOL m_bRunning;};
#endif
|