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.
 
 
 
 
 

235 lines
6.7 KiB

#ifndef __LG__PERSIST__DEVICE__H__INCLUDED__
#define __LG__PERSIST__DEVICE__H__INCLUDED__
#pragma once
#include "LgPersist.h"
#include "LgPersistPin.h"
class LGLIBPERSISTENT_API CLgPersistDevice :
public CLgPersist
{
public:
BOOL IsConnectable( CLgPersistDevice *pDevice );
BOOL Connect( CLgPersistDevice *pDevice );
public:
virtual E_LG_PERSIST_CLASS GetClass() { return LG_PERSIST_CLASS_DEVICE; }
public:
virtual BOOL ShowPropertyDlg( HWND hWnd ) { return FALSE; }
};
////////////////////////////////////////////////////////////////////////////////////////
class LGLIBPERSISTENT_API CLgPersistDeviceUnknown : public CLgPersistDevice
{
public:
virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_UNKNOWN; }
};
////////////////////////////////////////////////////////////////////////////////////////
class LGLIBPERSISTENT_API CLgPersistDeviceCamera : public CLgPersistDevice
{
public:
CLgPersistDeviceCamera()
{
ObjectToChildLinkP::Link( new CLgPersistPinVideoOutput );
ObjectToChildLinkP::Link( new CLgPersistPinLogicalCameraSensor );
}
public:
virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_CAMERA; }
};
////////////////////////////////////////////////////////////////////////////////////////
class LGLIBPERSISTENT_API CLgPersistDeviceCapture : public CLgPersistDevice
{
public:
CLgPersistDeviceCapture()
{
ObjectToChildLinkP::Link( new CLgPersistPinVideoInput );
}
public:
virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_CAPTURE; }
};
////////////////////////////////////////////////////////////////////////////////////////
class LGLIBPERSISTENT_API CLgPersistDeviceSensor : public CLgPersistDevice
{
public:
CLgPersistDeviceSensor()
{
ObjectToChildLinkP::Link( new CLgPersistPinLogicalSensorCamera );
}
};
////////////////////////////////////////////////////////////////////////////////////////
class LGLIBPERSISTENT_API CLgPersistDeviceLGS : public CLgPersistDeviceSensor
{
public:
CLgPersistDeviceLGS()
{
ObjectToChildLinkP::Link( new CLgPersistPinSocket );
ObjectToChildLinkP::Link( new CLgPersistPinLGSCamera );
}
public:
virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_LGS; }
};
////////////////////////////////////////////////////////////////////////////////////////
class LGLIBPERSISTENT_API CLgPersistDeviceRelay : public CLgPersistDevice
{
public:
CLgPersistDeviceRelay()
{
ObjectToChildLinkP::Link( new CLgPersistPinLogicalRelayOutput );
}
public:
virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_RELAY; }
};
class LGLIBPERSISTENT_API CLgPersistDeviceOutput : public CLgPersistDevice
{
public:
CLgPersistDeviceOutput()
{
ObjectToChildLinkP::Link( new CLgPersistPinLogicalOutputRelay );
}
public:
virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_OUTPUT; }
};
////////////////////////////////////////////////////////////////////////////////////////
class LGLIBPERSISTENT_API CLgPersistDeviceDC : public CLgPersistDevice
{
public:
CLgPersistDeviceDC()
{
ObjectToChildLinkP::Link( new CLgPersistPinLogicalDCInput );
}
public:
virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_DC; }
};
class LGLIBPERSISTENT_API CLgPersistDeviceInput : public CLgPersistDeviceSensor
{
public:
CLgPersistDeviceInput()
{
ObjectToChildLinkP::Link( new CLgPersistPinLogicalInputDC );
}
public:
virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_INPUT; }
};
////////////////////////////////////////////////////////////////////////////////////////
class LGLIBPERSISTENT_API CLgPersistDeviceRS232 : public CLgPersistDevice
{
public:
CLgPersistDeviceRS232()
{
ObjectToChildLinkP::Link( new CLgPersistDeviceDC );
ObjectToChildLinkP::Link( new CLgPersistDeviceDC );
ObjectToChildLinkP::Link( new CLgPersistDeviceDC );
ObjectToChildLinkP::Link( new CLgPersistDeviceDC );
ObjectToChildLinkP::Link( new CLgPersistDeviceRelay );
ObjectToChildLinkP::Link( new CLgPersistDeviceRelay );
}
public:
virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_RS232; }
};
////////////////////////////////////////////////////////////////////////////////////////
class LGLIBPERSISTENT_API CLgPersistDeviceSocket : public CLgPersistDevice
{
public:
CLgPersistDeviceSocket()
{
ObjectToChildLinkP::Link( new CLgPersistPinSocket );
}
public:
virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_SOCKET; }
};
////////////////////////////////////////////////////////////////////////////////////////
class LGLIBPERSISTENT_API CLgPersistDeviceSocketRS232 : public CLgPersistDeviceSocket
{
};
////////////////////////////////////////////////////////////////////////////////////////
class LGLIBPERSISTENT_API CLgPersistDeviceCameraPTZ : public CLgPersistDeviceCamera
{
};
////////////////////////////////////////////////////////////////////////////////////////
class LGLIBPERSISTENT_API CLgPersistDeviceCameraPTZ_RS232 : public CLgPersistDeviceCameraPTZ
{
public:
CLgPersistDeviceCameraPTZ_RS232()
{
ObjectToChildLinkP::Link( new CLgPersistPinSocket );
}
};
class LGLIBPERSISTENT_API CLgPersistDeviceCameraPTZ_RS232_Migvan : public CLgPersistDeviceCameraPTZ_RS232
{
};
class LGLIBPERSISTENT_API CLgPersistDeviceCameraPTZ_RS232_Mic1300 : public CLgPersistDeviceCameraPTZ_RS232
{
};
class LGLIBPERSISTENT_API CLgPersistDeviceCameraPTZ_RS232_Philips : public CLgPersistDeviceCameraPTZ_RS232
{
};
class LGLIBPERSISTENT_API CLgPersistDeviceCameraPTZ_RS232_JVC : public CLgPersistDeviceCameraPTZ_RS232
{
};
class LGLIBPERSISTENT_API CLgPersistDeviceCameraPTZ_RS232_Vicon : public CLgPersistDeviceCameraPTZ_RS232
{
};
////////////////////////////////////////////////////////////////////////////////////////
class LGLIBPERSISTENT_API CLgPersistDeviceCameraPTZ_LGS : public CLgPersistDeviceCameraPTZ
{
public:
CLgPersistDeviceCameraPTZ_LGS()
{
ObjectToChildLinkP::Link( new CLgPersistPinCameraLGS );
}
public:
virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_CAMERA_LGS; }
};
////////////////////////////////////////////////////////////////////////////////////////
class LGLIBPERSISTENT_API CLgPersistManager : public CLgPersistDevice
{
public:
virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_MANAGER; }
public:
virtual BOOL Serialize( CLgPersistArchive& ar );
private:
typedef struct LINK_DESCRIPTOR
{
DWORD dwID_1;
DWORD dwID_2;
}LINK_DESCRIPTOR;
BOOL StoreLink( CLgPersistDevice *pDevice, CLgPersistArchive& ar );
CLgPersistPin *FindPin( CLgPersistDevice *pDevice, DWORD dwID );
};
#endif