Simulink code generation C with Redis demo
I will have a video to walk you through the process of how to build a Simulink code generated model with calls to Redis embedded. This also includes the gotchas on the build process with CMake, make, Netbeans, etc.
CMake file basics: http://derekmolloy.ie/hello-world-introductions-to-cmake/
Netbeans C/C++ plugin install: https://netbeans.org/community/releases/72/cpp-setup-instructions.html
All code and files are available to my Quant ELITE members
Redis: Failed opening .rdb for saving: Permission denied
1. Launch or reset your IB TWS cleanly
2. Launch tor run or debug the IB RealTimeDataRedis.java in Netbeans as the default user (ie. caustic in my case). Mine is found in /home/caustic/interactivebrokers/IBJts/samples/Java/RealTimeDataRedis.java. You will need to run this.
This next step is confusing so I will use Eclipse-CDT for pure C/C++ development so it will not conflict with Netbeans as described in the next step. See the next step instead of #3 in my opinion.
3. Launch to Netbeans as a separate user as in root for the C program. Run or debug the testModel bin found under my folder of /home/caustic/Documents/MATLAB/KarenCWithRedis/testModel. You set breakpoints if needed
I found this link helpful to test a Redis connection with Hiredis for a C client using LRANGE:
4. Use Eclipse-CDT as same use for steps 1-2. sudo apt-get install eclipse eclipse-cdt g++. Note I have found Eclipse CDT full of strange bugs so I am trying current version of Code::Blocks for C/C++ development.
NOTE VIDEO segments are in order of:
How to find start entry point in Simulink code generated C source code
Switch to ert target for more c code generation options
How to set up Netbeans for C development with Simulink code generated model
Update cmakelist file for HiRedis library and h file
Working HiRedis C demo retrieving from Redis
Codeblockss demo of C with Simulink model calling Redis
Join my FREE if you want to learn how I use C/C++/Java to build automated trading systems
I now post my TRADING ALERTS
into my personal FACEBOOK ACCOUNT
. Don't worry as I don't post stupid cat videos or what I eat!