EasyManuals Logo

Sun Microsystems Netra T2000 User Manual

Sun Microsystems Netra T2000
122 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #111 background imageLoading...
Page #111 background image
95
APPENDIX
B
Alarm Relay Output Application
Programming Interface
This appendix provides an example program that illustrates how to get or set the
status of the alarms. The application can use the LOMIOCALSTATE ioctl function
to obtain the status of each alarm and the LOMIOCALCTL ioctl function to set the
alarms individually. For more details on the alarm indicators, see “Alarm Status
Indicators” on page 41.
CODE EXAMPLE B-1 Example Program to get and set Status of the Alarms
#include <sys/types.h>
#include <string.h>
#include <stdlib.h>
#include <sys/unistd.h>
#include <fcntl.h>
#include "lom_io.h"
#define ALARM_INVALID -1
#define LOM_DEVICE "/dev/lom"
static void usage();
static void get_alarm(const char *alarm);
static int set_alarm(const char *alarm, const char *alarmval);
static int parse_alarm(const char *alarm);
static int lom_ioctl(int ioc, char *buf);
static char *get_alarmval(int state);
static void get_alarmvals();
main(int argc, char *argv[])
{
if (argc < 3) {
usage();
if (argc == 1)

Table of Contents

Other manuals for Sun Microsystems Netra T2000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Sun Microsystems Netra T2000 and is the answer not in the manual?

Sun Microsystems Netra T2000 Specifications

General IconGeneral
BrandSun Microsystems
ModelNetra T2000
CategoryServer
LanguageEnglish

Related product manuals