How to create virtual machine for testing secgem ?

Hi all,

I am trying to create a virtual equipment. It is used to simulate between host-equipment conversation over the secs/gem protocol. I know the basic thing is that connect under TCP/IP protocol. In C# , I can create a connection between the host and the client via Socket/TCPListener. But further, I want to create a virtual equipment. When the host sends an S1F13 request, the virtual equipment will response with S1F14. Assuming the communication dictionary
built-in before. For example, if host send S1F13, equipment will reply S1F14, if host send S1F17, equipment will reply S1F18, so on..

The problem now is that I need to create a virtual equipment and establish connection between the host and the virtual equipment via secs/gem , enable/disable secs/gem, open/close the connection between host-virtual equipment, send command from host and get response from virtual equipment.

If you have any idea, please feel free let me know.