Skip to content

libheartbeats/heartbeats-simple-jni

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heartbeats-Simple Java Bindings

This project provides Java bindings and thin wrappers around heartbeats-simple.

Currently, only Linux is supported.

Dependencies

The heartbeats-simple libraries and headers should be installed to the system.

The latest heartbeats-simple source can be found at https://github.com/libheartbeats/heartbeats-simple.

Building

This project uses Maven. Currently the only supported platforms are the unix family. To build and run junit tests:

mvn clean install

If heartbeats-simple is not installed to a default location, you need to set the PKG_CONFIG_PATH environment variable or export it to your environment so that pkg-config can discover the library. Unless you are skipping tests (-DskipTests=true), you must do the same for LD_LIBRARY_PATH.

PKG_CONFIG_PATH=/path/to/heartbeats-simple/install/lib/pkgconfig:$PKG_CONFIG_PATH \
  LD_LIBRARY_PATH=/path/to/heartbeats-simple/install/lib/:$LD_LIBRARY_PATH \
  mvn clean package

Usage

To integrate with the library, add it as a Maven dependency to your project's pom.xml:

    <dependency>
      <groupId>edu.uchicago.cs.heartbeats</groupId>
      <artifactId>heartbeats-simple</artifactId>
      <version>0.0.1</version>
    </dependency>

The following interface:implementation pairs are available:

  • edu.uchicago.cs.heartbeats.Heartbeat:edu.uchicago.cs.heartbeats.DefaultHeartbeat
  • edu.uchicago.cs.heartbeats.HeartbeatAccuracy:edu.uchicago.cs.heartbeats.DefaultHeartbeatAccuracy
  • edu.uchicago.cs.heartbeats.HeartbeatPower:edu.uchicago.cs.heartbeats.DefaultHeartbeatPower
  • edu.uchicago.cs.heartbeats.HeartbeatAccuracyPower:edu.uchicago.cs.heartbeats.DefaultHeartbeatAccuracyPower

When launching, you will need to set the property java.library.path to include the location of a native library created by this project: libheartbeats-simple-wrapper.

Project Source

Find this and related project sources at the libheartbeats organization on GitHub.
This project originates at: https://github.com/libheartbeats/heartbeats-simple-jni

Bug reports and pull requests for bug fixes and enhancements are welcome.