-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathModernPrinter.rb
50 lines (44 loc) · 1.67 KB
/
ModernPrinter.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright (C) 2014 Wesleyan University
#
# This file is part of cmdr-devices.
#
# cmdr-devices 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.
#
# cmdr-devices 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 cmdr-devices. If not, see <http://www.gnu.org/licenses/>.
#---
#{
# "name": "ModernPrinter",
# "depends_on": "N/A",
# "description": "Provides the basis for monitoring all modern printers on campus",
# "author": "Tyler Harden",
# "email": "tharden@wesleyan.edu",
# "type": "Printer"
#}
#---
class ModernPrinter < Computer
config do
ip_addres :type => string
end
#current information
state_var :is_reachable, :type => :string, :editable =>false
state_var :black_toner_level, :type => :intiger, :editable => false
state_var :cyan_toner_level, :type => :intiger, :editable => false
state_var :magenta_toner_level, :type => :intiger, :ediable => false
state_var :yellow_toner_level, :type => :intiger, :editable => false
state_var :is_out_of_paper, :type => :boolean, :editable => false
#other
state_var :model, :type => :string, :editable => false
state_var :serial_number, :type => :string, :editable => false
def initiaize(options)
super(options)
end
end