⚡ ⚡ In progress:
Publisher/Subscriber and PUSH/PULL pattern for C and Matlab using ZeroMQ. **All the credit for original package of ZeroMQ matlab binding goes to https://github.com/fagg/matlab-zmq
This repositroy is implementation publisher/subsciber and PUSH/PULL pattern for C and Matlab.
Tested on Windows 10 with VC2015 & Matlab 2016a with ZMQ 4.0.x. Also tested on Ubuntu 16.04 LTS & Matlab 2015a linux with Cmake.
On Windows:
Make sure latest version of ZeroMQ install on your system. For ZeroMQ installation, see https://zeromq.org/download/ for instructions.
On Debian and Ubuntu:
if you intall by sudo apt-get install libzmq3-dev
, CMake should be configure according. Recommend way is to build from source. https://github.com/zeromq/libzmq.
./configure
make
sudo make install
sudo ldconfig
Make sure you have ZMQ 4.0.x installed. Change settings in config_win.m
& config_unix.m
to point to your installation. Ensure you have mex configured. On Matlab it can be easily set by mex -setup C
.
Then Run make.m
.
Make sure that the lib directory is on your MATLAB path.
To run, first clone the repository.
git clone
https://github.com/Marslanali/cpp_matlab_zmq.git
On Windows:
Open with Visual studio and run Publisher.cpp
and on matlab run Subscriber.m
.
On Ubuntu:
cd cpp_matlab_zmq-master
mkdir build
cd build
cmake ..
make
On Windows:
Make sure you environment variable is set for path of libsodium.dll
on your VC++ and Matlab path where you are currently running example codes.
Other dependencies can be check by dependency walker, see http://www.dependencywalker.com/