What is MPMnet?
MPMnet - which means multi-port memory net - presents an Ethernet interface
to the CESR MPM system . Usually MPM is supported only on VMS-based CESR
control nodes which have a VAX to MPM interface and hence access to the MPM
hardware. To allow for transparent access on nodes which do not have an
interface to MPM, an Ethernet-based protocol has been developed, which packs
the MPM subroutine or function call and the corresponding data into a wrapper
function and sends it over the Ethernet connection to a node with a MPM
interface running a MPMnet server. This server receives the MPMnet call, maps
it to the local MPM subroutine or function and submits it with the
accompanying data. Any kind of return data is send back to the MPMnet client
as well as a return code representing the success of the local MPM call.
 Achitecture and performance of the new CESR control system,
C.R. Strohman and S. B. Peck, IEEE 1989
Usage of MPMnet
19-May-2006 (Greg Soltis)
To use MPMnet you need:
- A server running on the control system
- Include Mnet_client_c.h in your project
- To link your project against the appropriate build of the MPMnet library
- To run a server, copy MPMnet_MPMEQ.olb and server.obj from [.cvssrc.lib] to your working area. Use vlgl to build server.obj and link it with MPMnet_MPMEQ.olb. This will give you a server executable. The executable takes as arguments the ip address you will be connecting from and an optional port request. The server will inform you of the port that it is listening on when it starts up. If you requested a specific port, the server will give it to you as long as it is available.
- Check out a copy of the MPMnet area from the cvs repository. In the MPMnet/include directory, there is a file called Mnet_client_c.h which contains the definitions of all the functions you will need to use the client. Make sure this file is included in your project.
- After checking out the MPMnet area, in the MPMnet directory, run gmake. This will compile the library, and place it up one directory in a new directory called lib. Link against the file libMPMnet.a, found in that directory.
- Once you have included Mnet_client_c.h in your project, you need to establish a connection with the server. This step has two parts. First, call Mnet_setServerPort(server, port) to tell the client where to look for the server. Then, call Mnet_Initialize(). This will actually make the connection and return MPM_SUCCESS upon success. If it fails, it will return MPM_FAILURE, and you can call Mnet_getErrorCode() to get a code corresponding to several errors, listed in the include file.
- You are now set up to make MPM calls to the control system. The include file contains a list of functions that have been completed. These functions can be called as if you were on the control system, with the small change that you have to add a _c after the name of the call, e.g. vxgetn becomes vxgetn_c.
- When your program is finished, you must disconnect from the server. You have two options to do this. You can either close your connection, but leave the server running for future use (use Mnet_closeConnection), or you can shut down the server in addition to closing your connection (use Mnet_closeServer).
Notes on rebuilding the server:
Use gmake –f Makefile_MPMEQ.vms in the MPMnet directory of the latest port of the repository to the Control System. This will rebuild the server objects mentioned above.