NJB_Ping(3)

NJB_Ping3

Ping an open njb device

Usage

#include <libnjb.h>

extern int njb_error

njbid_t *NJB_Ping (njb_t *njb)

Library

libnjb

Overview

The NJB_ping function will ping the NJB device, requesting an njbid_t which returns a structure of this layout:

typedef struct {
unsigned char id[16];
u_int8_t fwMajor;
u_int8_t fwMinor;
u_int8_t fwRel;
char productName[33];
u_int8_t power; } njbid_t;

When a njbid_t has been obtained using NJB_Ping() it must be freed using free().

id

A string representing the Jukebox unique ID. This may be used for filenames storing device-specific file caches and similar things associated with a unique device.

fwMajor

8-bit integer representing the major revision of the firmware.

fwMinor

8-bit integer representing the minor revision of the firmware.

fwRel

8-bit integer representing the release revision of the firmware. This parameter is only supplied with newer jukeboxes and is 0 for old jukeboxes.

productName

A string giving the unique product name given this product, such as "Nomad Jukebox ZEN" and similar strings.

power

An integer indicating if the device is currently connected to a power outlet. This is primarily used for checking that the power is connected before flashing a firmware upgrade.

Releases

Unchanged in 2 releases since Debian 3.1 (Sarge).

  1. 3.1–4.0

From libnjb1-doc 1.1-2 in Debian 4.0 (Etch). Parsed by carta from the page's man source.