#
#   Copyright 2008 Free Software Foundation, Inc.
#
#  This program is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# Control file for xtlhp running the SNMP protocol
#

# If any kind of error try to find which

IF SNMPVAR(gdStatusLineState.0) != 0
THEN
	IF SNMPVAR(gdStatusPaperOut.0) != 0
	THEN
		MSG 'Out of paper'
		EXIT 100
	ELIF SNMPVAR(gdStatusPaperJam.0) != 0
	THEN
		MSG 'Out of paper'
		EXIT 101
	ELIF SNMPVAR(gdStatusTonerLow.0) != 0
	THEN
		MSG 'Out of toner'
		EXIT 102

	#  Give up just give general message

	ELSE
		MSG SNMPSTR(npSysStatusMessage.0)
		EXIT 103
	FI
FI
