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.

65 lines
2.3 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 08/10/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: LgRemoteClientTcpIpBoardReceiver.cpp
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Source file of LgRemoteClientTcpIpBoardReceiver.cpp
  13. //----------------------------------------------------------------------------
  14. #include "stdafx.h"
  15. #include "..\Version.h"
  16. #include "LgRemoteClientTcpIpBoardReceiver.h"
  17. CLgRemoteClientTcpIpBoardReceiver::CLgRemoteClientTcpIpBoardReceiver()
  18. {
  19. LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CLgRemoteClientTcpIpBoardReceiver::CLgRemoteClientTcpIpBoardReceiver" );
  20. }
  21. CLgRemoteClientTcpIpBoardReceiver::~CLgRemoteClientTcpIpBoardReceiver()
  22. {
  23. Destroy();
  24. LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CLgRemoteClientTcpIpBoardReceiver::~CLgRemoteClientTcpIpBoardReceiver" );
  25. }
  26. BOOL CLgRemoteClientTcpIpBoardReceiver::Create( LPCTSTR lpszHostAddress, UINT nHostPort )
  27. {
  28. return CLgRemoteClientTcpIp::Create( lpszHostAddress, nHostPort, LG_REMOTE_E_SESSION_TYPE_BOARD_RECEIVER, LG_REMOTE_E_CONNECT_TYPE_MASTER );
  29. }
  30. void CLgRemoteClientTcpIpBoardReceiver::Destroy()
  31. {
  32. // unlink board receiver interface
  33. CLgRemoteInterfaceBR::Unlink();
  34. // destroy remote socket
  35. CLgRemoteClientTcpIp::Destroy();
  36. }
  37. void CLgRemoteClientTcpIpBoardReceiver::OnPacketBoardReceiver( PLG_TCP_PACKET_BOARD_RECEIVER pReceivePacket )
  38. {
  39. switch( pReceivePacket->bSubType )
  40. {
  41. case LG_TCP_PACKET_BOARD_RECEIVER::BOARD_RECEIVER_TYPE_PROPERTIES:
  42. DoRemoteBRGetChannelProperties();
  43. break;
  44. case LG_TCP_PACKET_BOARD_RECEIVER::BOARD_RECEIVER_TYPE_CONNECT:
  45. DoRemoteBRChannelConnect( pReceivePacket->nConnectChannel );
  46. break;
  47. }
  48. }
  49. BOOL CLgRemoteClientTcpIpBoardReceiver::OnRemoteBRChannelConnect( INT nChannel, BOOL bResult )
  50. {
  51. return SendBoardReceiverConnect( GetConnectionID(), nChannel, bResult );
  52. }
  53. BOOL CLgRemoteClientTcpIpBoardReceiver::OnRemoteBRGetChannelProperties( INT nChannelCount, LG_TCP_PACKET_BOARD_RECEIVER::PCHANNEL_PROPERTIES pProperties )
  54. {
  55. return SendBoardReceiverProperties( GetConnectionID(), nChannelCount, pProperties );
  56. }