External Library Command (XLIB)


Defines

#define XLIBnibbles(src)   (5+3+3)
 Return the number of nibbles in an XLIB.

Functions

bool isXLIB (SatAddr src)
 is the object at src an XLIB?
bool XLIBdecode (SatAddr src, int *lib, int *cmd)
 extract an XLIB's library and command numbers.
SatAddr XLIBencode (int lib, int cmd, SatAddr dst)
 Encode an XLIB object with the given library and command numbers.
SatAddr makeXLIB ()
 Create an empty XLIB in tempOb. Contents are undefined.

Detailed Description

An XLIB specifies a command in a library. It contains a 3 nibble library number and a 3 nibble command number.

Define Documentation

#define XLIBnibbles ( src   )     (5+3+3)

Return the number of nibbles in an XLIB.

Parameters:
src Saturn address of an XLIB. This parameter is unused but is included for consistency with the other XYZnibbles() functions.
Returns:
Always returns 11


Function Documentation

bool isXLIB ( SatAddr  src  ) 

is the object at src an XLIB?

Parameters:
src Saturn address of an object
Returns:
true if the object at src is an XLIB

bool XLIBdecode ( SatAddr  src,
int *  lib,
int *  cmd 
)

extract an XLIB's library and command numbers.

Parameters:
src Saturn address of an XLIB
lib if non-null, the library number will be stored here.
cmd if non-null, the command number will be stored here.
Returns:
true on success, false if src doesn't point to an XLIB

SatAddr XLIBencode ( int  lib,
int  cmd,
SatAddr  dst 
)

Encode an XLIB object with the given library and command numbers.

Parameters:
lib The library number. Must be between 0 and 0xfff
cmd The command number. Must be between 0 and 0xfff
dst The Saturn address where the XLIB should be stored, or zero to create a new XLIB
Returns:
the Saturn address of the XLIB, or zero if lib or cmd are out of range, or if a new XLIB cannot be allocated.


Generated on Sat Apr 3 16:38:31 2010 for HPObjects by  doxygen 1.5.0