-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtestLocalSetGraphic.rb
25 lines (24 loc) · 2.08 KB
/
testLocalSetGraphic.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
require 'ntcipAccess'
module Test
#getter = NTCIPAccess::NTCIPGraphics.new(:port => 2230, :host=>'73.207.107.105', :community => 'Public')
getter = NTCIPAccess::NTCIPGraphics.new(:port => 163)
#a1 = [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0xF9,0xEF,0x80,0x00,0x00,0x00,0x00,0x88,0x20,0x20,0x00,0x00,0x00,0x00,0x08,0x82,0x02,0x00,0x00,0x00,0x00,0x00,0x8F,0x9C,0x20,0x00,0x00,0x00,0x00,0x08,0x80,0x22,0x00,0x00,0x00,0x00,0x00,0x88,0x02,0x20,0x00,0x00,0x00,0x00,0x08,0xFB,0xC2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xE0,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xF8,0x00,0x00,0x00,0x08,0x00,0x03,0xFF,0x80,0x00,0x00,0x01,0xC0,0x00,0x3F,0xF8,0x00,0x00,0x00,0x2A,0x00,0x03,0xFF,0x80,0x00,0x00,0x04,0x90,0x00,0x3F,0xF8,0x00,0x00,0x00,0x88,0x80,0x01,0xFF,0x00,0x00,0x00,0x00,0x80,0x00,0x0F,0xE0,0x07,0xFF,0x00,0x08,0x00,0x00,0x7C,0x00,0x3F,0xE0,0x00,0x80,0x00,0x00,0x00,0x03,0xFE,0x00,0x08,0x00,0x00,0x00,0x00,0x1F,0xC0,0x00,0x80,0x00,0x00,0x00,0x01,0xFC,0x00,0x08,0x00,0x00,0x00,0x00,0x0F,0x80,0x00,0x80,0x00,0x00,0x00,0x00,0xF8,0x00,0x08,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
#getter.set_graphic(graphicIndex: 1, graphicName: "Testz", graphicWidth: 10, graphicHeight: 6,imageArray: a1)
result = getter.set_graphic(bmpFile: "./test.bmp", graphicIndex: 2, graphicName: "Test2")
puts "set result "+result.to_s
if :noError == result
result = getter.get_graphic(graphicIndex: 2)
puts "get result "+result.to_s
case result
when :noError
puts "Success"
puts "Index " + getter.graphicIndex.to_s
puts "Name " + getter.graphicName.to_s
puts "Number " + getter.graphicNumber.to_s
puts "Status " + getter.graphicStatus.to_s
puts "Bitmap " + getter.graphicBitmap.to_s
else
puts "Failure"
end
end
end