#include <IMDSimThread.h>
Inheritance diagram for IMDSimThread:
Public Methods | |
IMDSimThread (const char *, int) | |
initialize with host and port. More... | |
virtual | ~IMDSimThread () |
virtual void | get_next_ts (float *, IMDEnergies *) |
Fetch last received coordinates and energies. Ask for both at the same time so that they at least have a chance of being in sync with each other. More... | |
virtual void | send_forces (int, int *, float *) |
These methods obtain a lock on the socket (to prevent it from being destroyed from the reader thread), check for a connection, then send their information before releasing the lock. More... | |
virtual void | pause () |
virtual void | unpause () |
virtual void | detach () |
virtual void | kill () |
virtual void | set_transrate (int) |
void * | reader (void *) |
reader method must be public to be callable from extern "C" thread proc. More... |
Definition at line 29 of file IMDSimThread.h.
|
initialize with host and port.
Definition at line 35 of file IMDSimThread.C. References imdreaderthread, IMDSim::isConnected, NULL, wkf_mutex_init, and wkf_thread_create. |
|
Definition at line 57 of file IMDSimThread.C. References IMDSim::disconnect, IMDSim::isConnected, and wkf_thread_join. |
|
Reimplemented from IMDSim. Definition at line 197 of file IMDSimThread.C. References imd_disconnect, IMDSim::IMDOFFLINE, IMDSim::isConnected, IMDSim::simstate, IMDSim::sock, wkf_mutex_lock, and wkf_mutex_unlock. |
|
Fetch last received coordinates and energies. Ask for both at the same time so that they at least have a chance of being in sync with each other.
Implements IMDSim. Definition at line 152 of file IMDSimThread.C. References IMDSim::new_coords_ready, IMDSim::numcoords, IMDSim::swap4_aligned, wkf_mutex_lock, and wkf_mutex_unlock. |
|
Reimplemented from IMDSim. Definition at line 207 of file IMDSimThread.C. References imd_kill, IMDSim::IMDOFFLINE, IMDSim::isConnected, IMDSim::simstate, IMDSim::sock, wkf_mutex_lock, and wkf_mutex_unlock. |
|
Reimplemented from IMDSim. Definition at line 179 of file IMDSimThread.C. References IMDSim::getSimState, imd_pause, IMDSim::IMDPAUSED, IMDSim::IMDRUNNING, IMDSim::isConnected, IMDSim::simstate, IMDSim::sock, wkf_mutex_lock, and wkf_mutex_unlock. |
|
reader method must be public to be callable from extern "C" thread proc.
Definition at line 71 of file IMDSimThread.C. References IMDSim::disconnect, IMD_ENERGIES, IMD_FCOORDS, IMD_IOERROR, IMD_MDCOMM, imd_recv_header, IMDType, length, NULL, IMDSim::sock, vmd_msleep, vmdsock_selread, wkf_mutex_lock, and wkf_mutex_unlock. Referenced by imdreaderthread. |
|
These methods obtain a lock on the socket (to prevent it from being destroyed from the reader thread), check for a connection, then send their information before releasing the lock.
Implements IMDSim. Definition at line 162 of file IMDSimThread.C. References imd_send_mdcomm, IMDSim::isConnected, num, IMDSim::sock, IMDSim::swap4_aligned, wkf_mutex_lock, and wkf_mutex_unlock. |
|
Reimplemented from IMDSim. Definition at line 217 of file IMDSimThread.C. References imd_trate, IMDSim::isConnected, IMDSim::sock, wkf_mutex_lock, and wkf_mutex_unlock. |
|
Reimplemented from IMDSim. Definition at line 188 of file IMDSimThread.C. References IMDSim::getSimState, imd_pause, IMDSim::IMDPAUSED, IMDSim::IMDRUNNING, IMDSim::isConnected, IMDSim::simstate, IMDSim::sock, wkf_mutex_lock, and wkf_mutex_unlock. |