NAME
NJB_Ping - ping an open NJB device
LIBRARY
libnjb
SYNOPSIS
#include <libnjb.h>
extern int njb_error
njbid_t *NJB_Ping (njb_t *njb)
DESCRIPTION
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.