cnet v3.1.4

home
FAQ

cmdline options
topology files
attributes

datatypes
data structures
core API
support API

download/install

cnet's Application Programming Interface

NAME
CNET_set_LED - set, or turn off, one of the node's status LEDs

SYNOPSIS
#include <cnet.h>

int CNET_set_LED(int led, CnetColour colour);

DESCRIPTION
When running under the GUI, each open node's window has a number of LEDs that may be set to provide a quick indication of the node's running state.

Each LED may be set to one of the provided colours, specified as a value of the CnetColour enumerated type, or to the special value CNET_LED_OFF.

RETURN VALUE
The value 0 is returned on success. On failure, the value -1 is returned, and the global variable cnet_errno is set to one of the following values to describe the error:

ER_BADARG
Either the value of led is less than zero or greater than or equal to the number of LEDs (CNET_NLEDS), or the value of colour is NULL.

cnet was written and is maintained by Chris McDonald (chris@csse.uwa.edu.au).

cnet development has been supported by an ACM-SIGCSE Special Project Grant, and an Australian Apple University Consortium Scholarship.