STFishFinder API

The STFishFinder API is a platform-independent Application Programming Interface that will enable a custom app to communicate with the FE2 Black Box Fish Finder, allowing the app to provide all of the functionality of a full-featured color fish finder to the user.

“Getter” functions to read current settings and parameters, and retrieve data for display to the user.

Selection of units for depth, speed, and temperature.

Callback-based notifications of events such as:

the receipt of new data from the black box

an automatic change to a setting

a change in depth alarm state

a detected fish

a message ready to be transmitted from the API to the black box

Object-oriented C++ design.

Data Provided by the API

Data available to the app via the STFishFinder API includes:

Depth of the water

Speed of the vessel (from paddlewheel sensor)

Water temperature

Battery voltage

Sonar image data

Detected fish data

Depth alarm alerts

Settings

Using the STFishFinder API, an application will be able to have full control over all of the settings of a connected FE2 fish finder. Range, gain, frequency selection, auto modes, fish ID, depth alarms, fish alarms, and calibration settings are among the features that may be accessed and changed by the app using easy-to-use getter and setter functions.

Simpler applications can set the range and gain of the black box to Auto, reducing or eliminating the need for the user to be involved in changing settings.

API Core

The core of the STFishFinder API is a modular, object-oriented, platform-agnostic library written in C++11. To provide universal compatibility with diverse platforms, all public interfaces of the STFishFinder API core use simple types, C-style pointer references, and types defined within the STFishFinder core. C++ exceptions thrown within the API are caught within the API, then translated and returned as error codes.

API Wrapper

Platform independence is achieved by decoupling the platform-specific requirements of the API from the STFishFinder core, in the form of a wrapper layer.

The wrapper layer:

is written in a predominant language of the given platform,

hides the STFishFinder API behind a thin layer that translates its native C++-based interface into one that employs types and conventions appropriate to the given platform, and

provides connective functionality to required system libraries provided in the given platform.

Wrapper layers are being planned for iOS, Android, Windows, and Linux, although conceivably a wrapper may be written for any platform having the following capabilities. The platform must be able to:

build the STFishFinder API as a library using C++11-compliant build tools, and link that library to a wrapper layer and application program

provide a hardware driver for the communication link to the black box fish finder. The FE2 fish finder provides two separate kinds of communication links, wireless and wired:

(Wireless) TCP/IP over 802.11b/g (Wi-Fi). The hardware driver should be able to turn the Wi-Fi radio on, and open a TCP socket and a UDP socket to the FE2.

(Wired) UART-based serial port (such as RS-232 or RS-485). The hardware driver must open a COM: port at 115200 baud, 8N1.

(for simulator and playback functions) provide a system timer that can call an API function at an approximately 10 Hz rate

Documentation

The STFishFinder API is being thoroughly documented using Doxygen. The process of generating the documentation is still underway, but you can view it in its preliminary form.