The waveform
module provides a module that interfaces with the
nEDM Interface, using a WebSocket
server to communicate with a waveform generator and produce NMR signals
that can be sent to coil systems. The interface of the nEDM Interface is
described more here.
The waveform
module code may be viewed
here.
nedm1.waveform.plist
is included to show how one may run this as a daemon on
a Mac OS X machine. This file should be edited, ensuring that all paths and
the following variables are correct:
DB_USER_NAME # username with write access to nedm%2Fwaveform
DB_PASSWORD # password
DB_URL # url to database, should generally be 'http://raid.nedm1'
SERVER_PORT # should generally be 9100
Starting the daemon (so that it will remain running):
cp nedm1.waveform.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/nedm1.waveform.plist
Stopping the daemon:
launchctl unload ~/Library/LaunchAgents/nedm1.waveform.plist
If code is updated, then simply kill the python
process
kill `ps -ef | grep waveform_server | grep python | awk '{ print $2; }'`