Go to Post Every game design should be a means to an end. - Mark McLeod [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-02-2017, 10:57
mreynolds's Avatar
mreynolds mreynolds is offline
Team Captain | Head of Controls
AKA: Matthew Reynolds
FRC #4946 (The Alpha Dogs)
Team Role: Programmer
 
Join Date: Sep 2015
Rookie Year: 2014
Location: Ontario, Canada
Posts: 12
mreynolds is an unknown quantity at this point
ZeroMQ for Java RoboRIO

Has anyone had success using ZeroMQ on the roborio when programming in Java? I'm struggling to even build the java bindings of ZMQ, could anyone point me in the right direction?
Reply With Quote
  #2   Spotlight this post!  
Unread 09-02-2017, 19:30
tcorrigan5 tcorrigan5 is offline
Registered User
FRC #5878
 
Join Date: Feb 2017
Location: Mackinac Island, MI
Posts: 2
tcorrigan5 is an unknown quantity at this point
Re: ZeroMQ for Java RoboRIO

Here's something that may help:

ZeroMQ Installation

Java on Ubuntu 16.04:

JNI version:
- sudo apt_get install libzmq5 libzmq-java
- create Java project (see below for where to get example code)
- configure the Java Build Path: navigate to
/Project/properties/Java Build Path
- navigate to JRE System Library/Native Library Location
- click on Edit
- browse to /usr/lib/x86_84-linux-gnu/jni and select
(the library file that is needed is libzmq.so)
- go back and click Add External Jar
- browse to /usr/share/java
- select jzmq.Jar

pure Java version (that presumably can be copied to and run on the RoboRio)
- sudo apt_get install libjeromq-java
- create Java Project
- configure the Java Build Path
- click on Add External Jar
- browse to /usr/share/Java
- select jeromq.jar

C++ on Ubuntu 16.04:

- check to see if already installed: apt search libzmq5. if not, install it:
sudo apt-get install libzmq5
- download zmq.hpp from https://github.com/zeromq/cppzmq and copy to /usr/include
- create C++ project (see below for where to get example code)
- create corresponding cmake file CMakeLists.txt:
cmake_minimum_required (VERSION 2.8)
project(zmqserver)
add_executable(zmqserver zmqserver.cpp)
target_link_libraries(zmqserver zmq)

(the link library is actually named libzmq.so and resides in /usr/local/lib, but
cmake understands the abbreviated reference 'zmq')

Python on Ubuntu 16.04:

- sudo apt-get install libzmq5
- sudo apt-get install python-zmq
- create Python program

Where to get examples
- http://zguide.zeromq.org/page:all.
- Scroll down until you find the 'Ask and Ye Shall Receive' section. Choose the
language you want to see the examples in and go.

Some useful Linux commands:
- apt search libzmq : find all packages involving 'libzmq' available via apt-get
- sudo find / -name libzmq.so : find the directories that contain libzmq.so
- sudo find / -name jzmq.jar
- sudo find / -name jeromq.jar
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:57.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi