== ATTEMPT FRESH START == 1 05/17/08 15:11:16 /usr/pluto/bin/Spawn_Device.sh 73 (spawning-device) [1;00m16317 Dev: 73; Already Running list: 51,52,54,70,71,53,56,55,57,58,[1;00m == FRESH START == 1 05/17/08 15:11:16 /usr/pluto/bin/Spawn_Device.sh 73 (spawning-device) [1;00mdevice: 73 ip: dcerouter cmd_line: Generic_Serial_Device[1;00m 0 05/17/08 15:11:16 73 (spawning-device) [1;00mEntering 73[1;00m ========== NEW LOG SECTION ========== 1 05/17/08 15:11:16 73 (spawning-device) [1;00mStarting... 1[1;00m 1 05/17/08 15:11:16 73 (spawning-device) [1;00mFound /usr/pluto/bin/Generic_Serial_Device[1;00m 05 05/17/08 15:11:16.455 [33;1mConnection for client socket reported NEED RELOAD IP=192.168.80.2 MAC=00:1D:92:64:06:58, device 73 last error 2[0m <0x2b43690ac6d0> 05 05/17/08 15:11:16.456 [33;1mThe router must be reloaded before this device is fully functional[0m <0x2b43690ac6d0> 05 05/17/08 15:11:16.459 [33;1mvoid ClientSocket::Disconnect() on this socket: 0x679e30 (m_Socket: 5)[0m <0x2b43690ac6d0> 05 05/17/08 15:11:16.467 [33;1mConnection for client socket reported NEED RELOAD IP=192.168.80.2 MAC=00:1D:92:64:06:58, device 73 last error 2[0m <0x2b43690ac6d0> 05 05/17/08 15:11:16.469 [33;1mRunning without DeviceData, will try to add device[0m <0x42003950> RCODE: 0:require 'Ruby_Generic_Serial_Device' 1:class Command < Ruby_Generic_Serial_Device::RubyCommandWrapper 2:end 3:class Device_73 < Ruby_Generic_Serial_Device::RubySerialIOWrapper 4:#### 313 #################################################################### 5:def cmd_313(level, cmd=nil) 6:@returnParamArray.clear 7:# Set Volume - Date: 2007-02-22 12:41:58 8: 9:wantedvol = cmd_.params_[76] #We can all thank ddamron for that var name 10:cmdSend("MVL", wantedvol.to_s(16)) 11:return @returnParamArray 12:end 13:#### 350 #################################################################### 14:def cmd_350(cmd=nil) 15:@returnParamArray.clear 16:# Written by Jason Bennett 17: 18:recvdMsg = receiveMsg() 19:chkCmd(recvdMsg) 20:return @returnParamArray 21:end 22:#### 355 #################################################################### 23:def cmd_355(cmd=nil) 24:@returnParamArray.clear 25:# Written by Jason Bennett 26:# 27:# 355 - Initialize Script 28: 29:# Constants. NOTE: YOU MAY WANT TO CHANGE SOME OF THESE 30:$MaxVolume = 0x4F # Absolute Highest Volume this driver will use 31:$StartingVolume = 0x2A # Starting Volume this device will use 32: 33:# Device wake up call 34:cmdSend("PWR", "01") 35:return @returnParamArray 36:end 37:#### PRIVATE METHODS #################################################################### 38:# Written by Jason Bennett 39:# 40:# 373 - Methods 41: 42:def cmdSend(cmd, opt) 43: conn_.Reconnect() 44: conn_.Send("!1" + cmd + opt + "\r") 45: reply = receiveMsg 46: if (reply[0] == cmd) 47: log("Command Sent: #{cmd}:#{opt} with reply: #{reply[0]}:#{reply[1]}") 48: else 49: log("Command Sent: #{cmd}:#{opt} with MALFORMED REPLY: #{reply[0]}:#{reply[1]}") 50: end 51: chkCmd(reply) 52:end 53: 54:def receiveMsg 55: buff = conn_.Recv(7, 1000) 56: log("Message Received: #{buff}") 57: trash = conn_.Recv(1, 100) 58: if (buff.length() < 7) 59: parsed1 = "ERR" 60: parsed2 = "00" 61: else 62: parsed2 = buff.match(/\d\d/) 63: parsed1 = buff[2].chr + buff[3].chr + buff[4].chr 64: return [parsed1, parsed2] 65: end 66:end 67: 68: 69:def chkCmd(msg) 70: log("***EVENT*** - #{msg[0]} : #{msg[1]}") 71: if (msg[0] == "PWR") 72: #Power state report. Sending on to dce 73: cmd = Command.new(device_.devid_, -1001, 1, 2, 48) 74: if (msg[1] == "01") 75: cmd.params_[10] = "1" #Device Turned on 76: else 77: cmd.params_[10] = "0" #Device Turned off 78: end 79: SendCommand(cmd) 80: else 81: if (msg[0] == "MVL") 82: #Volume Level Changing 83: volume = msg[1].hex 84: SetDeviceDataInDB( device_.devid_, 158, volume.to_s ) 85: cmd = Command.new(device_.devid_, -1001, 1, 2, 71) 86: cmd.params_[30] = volume.to_s 87: SendCommand(cmd) 88: else 89: # Not a recognized Command/Event 90: end 91: end 92:end 93: 94:def setVol() 95: wantedvol = cmd_.params_[76] #We can all thank ddamron for that var name 96: cmdSend("MVL", wantedvol.to_s(16)) 97:end 98: 99:def log(line) 100: $log = File.open("/var/log/pluto/" + device_.devid_.to_s + "_Generic_Serial_Device.log", "a") 101: $log.puts "(***):" + line.to_s 102: $log.close 103:end 104:#### START SETTERS #################################################################### 105:def initialize() 106:super 107:@returnParamArray=Array.new 108:end 109:#### END SETTERS #################################################################### 110:end 112:(***):Message Received: !1PWR01 (***):Command Sent: PWR:01 with reply: PWR:01 (***):***EVENT*** - PWR : 01 05 05/17/08 15:20:16.298 [33;1mGot a reload command from 0 [0m <0x42003950> 05 05/17/08 15:20:16.722 [33;1mvoid ClientSocket::Disconnect() on this socket: 0x673b60 (m_Socket: 8)[0m <0x2b43690ac6d0> Return code: 2 2 05/17/08 15:20:17 73 (spawning-device) [1;33mDevice requests restart... count=1/50 dev=73[1;00m Sat May 17 15:20:17 EDT 2008 Restart ========== NEW LOG SECTION ========== 1 05/17/08 15:20:26 73 (spawning-device) [1;00mStarting... 1[1;00m 1 05/17/08 15:20:27 73 (spawning-device) [1;00mFound /usr/pluto/bin/Generic_Serial_Device[1;00m RCODE: 0:require 'Ruby_Generic_Serial_Device' 1:class Command < Ruby_Generic_Serial_Device::RubyCommandWrapper 2:end 3:class Device_73 < Ruby_Generic_Serial_Device::RubySerialIOWrapper 4:#### 313 #################################################################### 5:def cmd_313(level, cmd=nil) 6:@returnParamArray.clear 7:# Set Volume - Date: 2007-02-22 12:41:58 8: 9:wantedvol = cmd_.params_[76] #We can all thank ddamron for that var name 10:cmdSend("MVL", wantedvol.to_s(16)) 11:return @returnParamArray 12:end 13:#### 350 #################################################################### 14:def cmd_350(cmd=nil) 15:@returnParamArray.clear 16:# Written by Jason Bennett 17: 18:recvdMsg = receiveMsg() 19:chkCmd(recvdMsg) 20:return @returnParamArray 21:end 22:#### 355 #################################################################### 23:def cmd_355(cmd=nil) 24:@returnParamArray.clear 25:# Written by Jason Bennett 26:# 27:# 355 - Initialize Script 28: 29:# Constants. NOTE: YOU MAY WANT TO CHANGE SOME OF THESE 30:$MaxVolume = 0x4F # Absolute Highest Volume this driver will use 31:$StartingVolume = 0x2A # Starting Volume this device will use 32: 33:# Device wake up call 34:cmdSend("PWR", "01") 35:return @returnParamArray 36:end 37:#### PRIVATE METHODS #################################################################### 38:# Written by Jason Bennett 39:# 40:# 373 - Methods 41: 42:def cmdSend(cmd, opt) 43: conn_.Reconnect() 44: conn_.Send("!1" + cmd + opt + "\r") 45: reply = receiveMsg 46: if (reply[0] == cmd) 47: log("Command Sent: #{cmd}:#{opt} with reply: #{reply[0]}:#{reply[1]}") 48: else 49: log("Command Sent: #{cmd}:#{opt} with MALFORMED REPLY: #{reply[0]}:#{reply[1]}") 50: end 51: chkCmd(reply) 52:end 53: 54:def receiveMsg 55: buff = conn_.Recv(7, 1000) 56: log("Message Received: #{buff}") 57: trash = conn_.Recv(1, 100) 58: if (buff.length() < 7) 59: parsed1 = "ERR" 60: parsed2 = "00" 61: else 62: parsed2 = buff.match(/\d\d/) 63: parsed1 = buff[2].chr + buff[3].chr + buff[4].chr 64: return [parsed1, parsed2] 65: end 66:end 67: 68: 69:def chkCmd(msg) 70: log("***EVENT*** - #{msg[0]} : #{msg[1]}") 71: if (msg[0] == "PWR") 72: #Power state report. Sending on to dce 73: cmd = Command.new(device_.devid_, -1001, 1, 2, 48) 74: if (msg[1] == "01") 75: cmd.params_[10] = "1" #Device Turned on 76: else 77: cmd.params_[10] = "0" #Device Turned off 78: end 79: SendCommand(cmd) 80: else 81: if (msg[0] == "MVL") 82: #Volume Level Changing 83: volume = msg[1].hex 84: SetDeviceDataInDB( device_.devid_, 158, volume.to_s ) 85: cmd = Command.new(device_.devid_, -1001, 1, 2, 71) 86: cmd.params_[30] = volume.to_s 87: SendCommand(cmd) 88: else 89: # Not a recognized Command/Event 90: end 91: end 92:end 93: 94:def setVol() 95: wantedvol = cmd_.params_[76] #We can all thank ddamron for that var name 96: cmdSend("MVL", wantedvol.to_s(16)) 97:end 98: 99:def log(line) 100: $log = File.open("/var/log/pluto/" + device_.devid_.to_s + "_Generic_Serial_Device.log", "a") 101: $log.puts "(***):" + line.to_s 102: $log.close 103:end 104:#### START SETTERS #################################################################### 105:def initialize() 106:super 107:@returnParamArray=Array.new 108:end 109:#### END SETTERS #################################################################### 110:end 112:(***):Message Received: !1PWR01 (***):Command Sent: PWR:01 with reply: PWR:01 (***):***EVENT*** - PWR : 01 05 05/17/08 15:21:21.570 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:21:21.694 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:21:21.694 [33;1m_QueueProc Pre - 193 : 0[0m <0x40800950> 05 05/17/08 15:21:21.694 [33;1mGSD-Sleep Pre 193 : 0[0m <0x40800950> 05 05/17/08 15:21:21.694 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:21:21.839 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:21:28.840 [33;1mGSD-Sleep Post 193 : 7000[0m <0x40800950> 05 05/17/08 15:21:28.840 [33;1m_QueueProc Post - 193 : 7000[0m <0x40800950> 05 05/17/08 15:22:35.140 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:22:35.141 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:22:35.196 [33;1m_QueueProc Pre - 193 : 0[0m <0x40800950> 05 05/17/08 15:22:35.196 [33;1mGSD-Sleep Pre 193 : 0[0m <0x40800950> 05 05/17/08 15:22:35.196 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:22:35.228 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:22:42.228 [33;1mGSD-Sleep Post 193 : 7000[0m <0x40800950> 05 05/17/08 15:22:42.228 [33;1m_QueueProc Post - 193 : 7000[0m <0x40800950> 05 05/17/08 15:23:56.327 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:23:56.328 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:23:56.378 [33;1m_QueueProc Pre - 193 : 0[0m <0x40800950> 05 05/17/08 15:23:56.378 [33;1mGSD-Sleep Pre 193 : 0[0m <0x40800950> 05 05/17/08 15:23:56.378 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:23:56.467 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:24:03.469 [33;1mGSD-Sleep Post 193 : 7000[0m <0x40800950> 05 05/17/08 15:24:03.469 [33;1m_QueueProc Post - 193 : 7000[0m <0x40800950> 05 05/17/08 15:25:10.400 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:25:10.400 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:25:10.415 [33;1m_QueueProc Pre - 193 : 0[0m <0x40800950> 05 05/17/08 15:25:10.415 [33;1mGSD-Sleep Pre 193 : 0[0m <0x40800950> 05 05/17/08 15:25:10.415 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:25:10.516 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:25:17.514 [33;1mGSD-Sleep Post 193 : 7000[0m <0x40800950> 05 05/17/08 15:25:17.514 [33;1m_QueueProc Post - 193 : 7000[0m <0x40800950> 05 05/17/08 15:25:22.523 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:25:22.523 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:25:22.547 [33;1m_QueueProc Pre - 193 : 0[0m <0x40800950> 05 05/17/08 15:25:22.547 [33;1mGSD-Sleep Pre 193 : 0[0m <0x40800950> 05 05/17/08 15:25:22.547 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:25:22.547 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:25:29.549 [33;1mGSD-Sleep Post 193 : 7000[0m <0x40800950> 05 05/17/08 15:25:29.549 [33;1m_QueueProc Post - 193 : 7000[0m <0x40800950> 05 05/17/08 15:26:12.729 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:26:12.729 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:26:12.766 [33;1m_QueueProc Pre - 193 : 0[0m <0x40800950> 05 05/17/08 15:26:12.766 [33;1mGSD-Sleep Pre 193 : 0[0m <0x40800950> 05 05/17/08 15:26:12.766 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:26:12.923 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:26:19.639 [33;1mGot a reload command from 0 [0m <0x42003950> 05 05/17/08 15:26:19.924 [33;1mGSD-Sleep Post 193 : 7000[0m <0x40800950> 05 05/17/08 15:26:19.924 [33;1m_QueueProc Post - 193 : 7000[0m <0x40800950> 05 05/17/08 15:26:19.925 [33;1mvoid ClientSocket::Disconnect() on this socket: 0x673b60 (m_Socket: 8)[0m <0x2b93755f96d0> Return code: 2 2 05/17/08 15:26:21 73 (spawning-device) [1;33mDevice requests restart... count=1/50 dev=73[1;00m Sat May 17 15:26:22 EDT 2008 Restart ========== NEW LOG SECTION ========== 1 05/17/08 15:26:30 73 (spawning-device) [1;00mStarting... 1[1;00m 1 05/17/08 15:26:30 73 (spawning-device) [1;00mFound /usr/pluto/bin/Generic_Serial_Device[1;00m RCODE: 0:require 'Ruby_Generic_Serial_Device' 1:class Command < Ruby_Generic_Serial_Device::RubyCommandWrapper 2:end 3:class Device_73 < Ruby_Generic_Serial_Device::RubySerialIOWrapper 4:#### 192 #################################################################### 5:def cmd_192(pk_pipe, pk_device_pipes, cmd=nil) 6:@returnParamArray.clear 7:cmdSend("PWR","01") 8:return @returnParamArray 9:end 10:#### 193 #################################################################### 11:def cmd_193(pk_pipe, cmd=nil) 12:@returnParamArray.clear 13:cmdSend("PWR","00") 14:return @returnParamArray 15:end 16:#### 313 #################################################################### 17:def cmd_313(level, cmd=nil) 18:@returnParamArray.clear 19:# Set Volume - Date: 2007-02-22 12:41:58 20: 21:wantedvol = cmd_.params_[76] #We can all thank ddamron for that var name 22:cmdSend("MVL", wantedvol.to_s(16)) 23:return @returnParamArray 24:end 25:#### 350 #################################################################### 26:def cmd_350(cmd=nil) 27:@returnParamArray.clear 28:# Written by Jason Bennett 29: 30:recvdMsg = receiveMsg() 31:chkCmd(recvdMsg) 32:return @returnParamArray 33:end 34:#### 355 #################################################################### 35:def cmd_355(cmd=nil) 36:@returnParamArray.clear 37:# Written by Jason Bennett 38:# 39:# 355 - Initialize Script 40: 41:# Constants. NOTE: YOU MAY WANT TO CHANGE SOME OF THESE 42:$MaxVolume = 0x4F # Absolute Highest Volume this driver will use 43:$StartingVolume = 0x2A # Starting Volume this device will use 44: 45:# Device wake up call 46:cmdSend("PWR", "01") 47:return @returnParamArray 48:end 49:#### PRIVATE METHODS #################################################################### 50:# Written by Jason Bennett 51:# 52:# 373 - Methods 53: 54:def cmdSend(cmd, opt) 55: conn_.Reconnect() 56: conn_.Send("!1" + cmd + opt + "\r") 57: reply = receiveMsg 58: if (reply[0] == cmd) 59: log("Command Sent: #{cmd}:#{opt} with reply: #{reply[0]}:#{reply[1]}") 60: else 61: log("Command Sent: #{cmd}:#{opt} with MALFORMED REPLY: #{reply[0]}:#{reply[1]}") 62: end 63: chkCmd(reply) 64:end 65: 66:def receiveMsg 67: buff = conn_.Recv(7, 1000) 68: log("Message Received: #{buff}") 69: trash = conn_.Recv(1, 100) 70: if (buff.length() < 7) 71: parsed1 = "ERR" 72: parsed2 = "00" 73: else 74: parsed2 = buff.match(/\d\d/) 75: parsed1 = buff[2].chr + buff[3].chr + buff[4].chr 76: return [parsed1, parsed2] 77: end 78:end 79: 80: 81:def chkCmd(msg) 82: log("***EVENT*** - #{msg[0]} : #{msg[1]}") 83: if (msg[0] == "PWR") 84: #Power state report. Sending on to dce 85: cmd = Command.new(device_.devid_, -1001, 1, 2, 48) 86: if (msg[1] == "01") 87: cmd.params_[10] = "1" #Device Turned on 88: else 89: cmd.params_[10] = "0" #Device Turned off 90: end 91: SendCommand(cmd) 92: else 93: if (msg[0] == "MVL") 94: #Volume Level Changing 95: volume = msg[1].hex 96: SetDeviceDataInDB( device_.devid_, 158, volume.to_s ) 97: cmd = Command.new(device_.devid_, -1001, 1, 2, 71) 98: cmd.params_[30] = volume.to_s 99: SendCommand(cmd) 100: else 101: # Not a recognized Command/Event 102: end 103: end 104:end 105: 106:def setVol() 107: wantedvol = cmd_.params_[76] #We can all thank ddamron for that var name 108: cmdSend("MVL", wantedvol.to_s(16)) 109:end 110: 111:def log(line) 112: $log = File.open("/var/log/pluto/" + device_.devid_.to_s + "_Generic_Serial_Device.log", "a") 113: $log.puts "(***):" + line.to_s 114: $log.close 115:end 116:#### START SETTERS #################################################################### 117:def initialize() 118:super 119:@returnParamArray=Array.new 120:end 121:#### END SETTERS #################################################################### 122:end 124:(***):Message Received: !1PWR01 (***):Command Sent: PWR:01 with reply: PWR:01 (***):***EVENT*** - PWR : 01 05 05/17/08 15:26:47.412 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:26:47.413 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:26:47.457 [33;1m_QueueProc Pre - 193 : 0[0m <0x40800950> 05 05/17/08 15:26:47.457 [33;1mGSD-Sleep Pre 193 : 0[0m <0x40800950> 05 05/17/08 15:26:47.457 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:26:47.457 [33;1mParameter: [0m <0x42804950> (***):Message Received: (***):Command Sent: PWR:00 with MALFORMED REPLY: 48:48 (***):***EVENT*** - 48 : 48 05 05/17/08 15:26:55.695 [33;1mGSD-Sleep Post 193 : 7000[0m <0x40800950> 05 05/17/08 15:26:55.695 [33;1m_QueueProc Post - 193 : 7000[0m <0x40800950> 05 05/17/08 15:27:06.360 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:27:06.360 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:27:06.361 [33;1m_QueueProc Pre - 192 : 0[0m <0x40800950> 05 05/17/08 15:27:06.361 [33;1mGSD-Sleep Pre 192 : 0[0m <0x40800950> 05 05/17/08 15:27:06.361 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:27:06.454 [33;1mParameter: [0m <0x42804950> 05 05/17/08 15:27:06.454 [33;1mParameter: [0m <0x42804950> (***):Message Received: !1PWR01 (***):Command Sent: PWR:01 with reply: PWR:01 (***):***EVENT*** - PWR : 01 05 05/17/08 15:27:13.654 [33;1mGSD-Sleep Post 192 : 7000[0m <0x40800950> 05 05/17/08 15:27:13.654 [33;1m_QueueProc Post - 192 : 7000[0m <0x40800950> 05 05/17/08 15:27:32.859 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:27:32.868 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:27:32.896 [33;1m_QueueProc Pre - 193 : 0[0m <0x40800950> 05 05/17/08 15:27:32.897 [33;1mGSD-Sleep Pre 193 : 0[0m <0x40800950> 05 05/17/08 15:27:32.897 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:27:33.075 [33;1mParameter: [0m <0x42804950> (***):Message Received: !1PWR00 (***):Command Sent: PWR:00 with reply: PWR:00 (***):***EVENT*** - PWR : 00 05 05/17/08 15:27:40.312 [33;1mGSD-Sleep Post 193 : 7000[0m <0x40800950> 05 05/17/08 15:27:40.313 [33;1m_QueueProc Post - 193 : 7000[0m <0x40800950> 05 05/17/08 15:27:40.574 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:27:40.574 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:27:40.574 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:27:40.611 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:27:40.611 [33;1m#### Pre-Process Queue = 2[0m <0x42003950> 05 05/17/08 15:27:40.611 [33;1m_QueueProc Pre - 192 : 0[0m <0x40800950> 05 05/17/08 15:27:40.611 [33;1mGSD-Sleep Pre 192 : 0[0m <0x40800950> 05 05/17/08 15:27:40.611 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:27:40.700 [33;1mParameter: [0m <0x42804950> 05 05/17/08 15:27:40.700 [33;1mParameter: [0m <0x42804950> (***):Message Received: !1PWR01 (***):Command Sent: PWR:01 with reply: PWR:01 (***):***EVENT*** - PWR : 01 05 05/17/08 15:27:48.039 [33;1mGSD-Sleep Post 192 : 7000[0m <0x40800950> 05 05/17/08 15:27:48.040 [33;1m_QueueProc Post - 192 : 7000[0m <0x40800950> 05 05/17/08 15:27:48.040 [33;1m_QueueProc Pre - 165 : 0[0m <0x40800950> 05 05/17/08 15:27:48.040 [33;1mGSD-Sleep Pre 165 : 0[0m <0x40800950> 05 05/17/08 15:27:48.040 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:27:48.040 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:27:50.044 [33;1mGSD-Sleep Post 165 : 2000[0m <0x40800950> 05 05/17/08 15:27:50.044 [33;1m_QueueProc Post - 165 : 2000[0m <0x40800950> 05 05/17/08 15:28:02.683 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:28:02.692 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:28:02.694 [33;1m_QueueProc Pre - 90 : 0[0m <0x40800950> 05 05/17/08 15:28:02.694 [33;1mGSD-Sleep Pre 90 : 0[0m <0x40800950> 05 05/17/08 15:28:02.694 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:02.694 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:02.698 [33;1mGSD-Sleep Post 90 : 0[0m <0x40800950> 05 05/17/08 15:28:02.698 [33;1m_QueueProc Post - 90 : 0[0m <0x40800950> 05 05/17/08 15:28:03.174 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:28:03.174 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:28:03.190 [33;1m_QueueProc Pre - 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.190 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.190 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:03.302 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:03.306 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.306 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.306 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:03.306 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:03.310 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.310 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.310 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:03.310 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:03.314 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.314 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.314 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:03.314 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:03.318 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.318 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.318 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:03.318 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:03.322 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.322 [33;1m_QueueProc Post - 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.676 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:28:03.676 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:28:03.701 [33;1m_QueueProc Pre - 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.701 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.701 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:03.773 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:03.777 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.778 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.778 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:03.778 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:03.781 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.782 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.782 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:03.782 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:03.786 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.786 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.786 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:03.786 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:03.790 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.790 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.790 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:03.790 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:03.794 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.794 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.794 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:03.794 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:03.798 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.798 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.798 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:03.798 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:03.802 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:03.802 [33;1m_QueueProc Post - 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.179 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:28:04.179 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:28:04.228 [33;1m_QueueProc Pre - 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.228 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.228 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:04.260 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:04.264 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.264 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.264 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:04.264 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:04.268 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.268 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.268 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:04.268 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:04.272 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.272 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.272 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:04.273 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:04.277 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.277 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.277 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:04.277 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:04.280 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.281 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.281 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:04.281 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:04.285 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.285 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.285 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:04.285 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:04.289 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.289 [33;1m_QueueProc Post - 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.683 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:28:04.683 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:28:04.716 [33;1m_QueueProc Pre - 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.716 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.716 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:04.748 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:04.748 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.748 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.748 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:04.748 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:04.752 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.752 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.752 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:04.752 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:04.756 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.756 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.756 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:04.756 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:04.760 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.760 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.760 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:04.760 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:04.764 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.764 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.764 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:04.764 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:04.768 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.768 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.768 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:04.768 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:04.772 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:04.772 [33;1m_QueueProc Post - 89 : 0[0m <0x40800950> 05 05/17/08 15:28:05.187 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:28:05.187 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:28:05.207 [33;1m_QueueProc Pre - 89 : 0[0m <0x40800950> 05 05/17/08 15:28:05.207 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:05.207 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:05.247 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:05.248 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:05.248 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:05.248 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:05.248 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:05.252 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:05.252 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:05.252 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:05.252 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:05.256 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:05.256 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:05.256 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:05.256 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:05.260 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:05.260 [33;1m_QueueProc Post - 89 : 0[0m <0x40800950> 05 05/17/08 15:28:05.696 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:28:05.696 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:28:05.702 [33;1m_QueueProc Pre - 89 : 0[0m <0x40800950> 05 05/17/08 15:28:05.702 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:05.703 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:05.747 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:05.747 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:05.747 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:05.747 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:05.747 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:05.751 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:05.751 [33;1m_QueueProc Post - 89 : 0[0m <0x40800950> 05 05/17/08 15:28:06.197 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:28:06.197 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:28:06.242 [33;1m_QueueProc Pre - 89 : 0[0m <0x40800950> 05 05/17/08 15:28:06.242 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:06.242 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:06.327 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:06.327 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:06.327 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:28:06.327 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:28:06.327 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:28:06.331 [33;1mGSD-Sleep Post 89 : 0[0m <0x40800950> 05 05/17/08 15:28:06.331 [33;1m_QueueProc Post - 89 : 0[0m <0x40800950> 05 05/17/08 15:31:13.506 [33;1mGot a reload command from 0 [0m <0x42003950> 05 05/17/08 15:31:13.848 [33;1mvoid ClientSocket::Disconnect() on this socket: 0x673b60 (m_Socket: 8)[0m <0x2ab0828d46d0> Return code: 2 2 05/17/08 15:31:14 73 (spawning-device) [1;33mDevice requests restart... count=1/50 dev=73[1;00m Sat May 17 15:31:14 EDT 2008 Restart ========== NEW LOG SECTION ========== 1 05/17/08 15:31:23 73 (spawning-device) [1;00mStarting... 1[1;00m 1 05/17/08 15:31:23 73 (spawning-device) [1;00mFound /usr/pluto/bin/Generic_Serial_Device[1;00m RCODE: 0:require 'Ruby_Generic_Serial_Device' 1:class Command < Ruby_Generic_Serial_Device::RubyCommandWrapper 2:end 3:class Device_73 < Ruby_Generic_Serial_Device::RubySerialIOWrapper 4:#### 89 #################################################################### 5:def cmd_89(repeat_command, cmd=nil) 6:@returnParamArray.clear 7:wantedvol = cmd_.params_[76] #We can all thank ddamron for that var name 8:log("Volume Pulled: #{wantedvol}") 9:return @returnParamArray 10:end 11:#### 90 #################################################################### 12:def cmd_90(repeat_command, cmd=nil) 13:@returnParamArray.clear 14:wantedvol = cmd_.params_[76] #We can all thank ddamron for that var name 15:log("Volume Pulled: #{wantedvol}") 16:return @returnParamArray 17:end 18:#### 192 #################################################################### 19:def cmd_192(pk_pipe, pk_device_pipes, cmd=nil) 20:@returnParamArray.clear 21:cmdSend("PWR","01") 22:return @returnParamArray 23:end 24:#### 193 #################################################################### 25:def cmd_193(pk_pipe, cmd=nil) 26:@returnParamArray.clear 27:cmdSend("PWR","00") 28:return @returnParamArray 29:end 30:#### 313 #################################################################### 31:def cmd_313(level, cmd=nil) 32:@returnParamArray.clear 33:# Set Volume - Date: 2007-02-22 12:41:58 34: 35:wantedvol = cmd_.params_[76] #We can all thank ddamron for that var name 36:log("Volume Pulled: #{wantedvol}") 37:cmdSend("MVL", wantedvol.to_s(16)) 38: 39:return @returnParamArray 40:end 41:#### 350 #################################################################### 42:def cmd_350(cmd=nil) 43:@returnParamArray.clear 44:# Written by Jason Bennett 45: 46:recvdMsg = receiveMsg() 47:chkCmd(recvdMsg) 48:return @returnParamArray 49:end 50:#### 355 #################################################################### 51:def cmd_355(cmd=nil) 52:@returnParamArray.clear 53:# Written by Jason Bennett 54:# 55:# 355 - Initialize Script 56: 57:# Constants. NOTE: YOU MAY WANT TO CHANGE SOME OF THESE 58:$MaxVolume = 0x4F # Absolute Highest Volume this driver will use 59:$StartingVolume = 0x2A # Starting Volume this device will use 60: 61:# Device wake up call 62:cmdSend("PWR", "01") 63:return @returnParamArray 64:end 65:#### PRIVATE METHODS #################################################################### 66:# Written by Jason Bennett 67:# 68:# 373 - Methods 69: 70:def cmdSend(cmd, opt) 71: conn_.Reconnect() 72: conn_.Send("!1" + cmd + opt + "\r") 73: reply = receiveMsg 74: if (reply[0] == cmd) 75: log("Command Sent: #{cmd}:#{opt} with reply: #{reply[0]}:#{reply[1]}") 76: else 77: log("Command Sent: #{cmd}:#{opt} with MALFORMED REPLY: #{reply[0]}:#{reply[1]}") 78: end 79: chkCmd(reply) 80:end 81: 82:def receiveMsg 83: buff = conn_.Recv(7, 1000) 84: log("Message Received: #{buff}") 85: trash = conn_.Recv(1, 100) 86: if (buff.length() < 7) 87: parsed1 = "ERR" 88: parsed2 = "00" 89: else 90: parsed2 = buff.match(/\d\d/) 91: parsed1 = buff[2].chr + buff[3].chr + buff[4].chr 92: return [parsed1, parsed2] 93: end 94:end 95: 96: 97:def chkCmd(msg) 98: log("***EVENT*** - #{msg[0]} : #{msg[1]}") 99: if (msg[0] == "PWR") 100: #Power state report. Sending on to dce 101: cmd = Command.new(device_.devid_, -1001, 1, 2, 48) 102: if (msg[1] == "01") 103: cmd.params_[10] = "1" #Device Turned on 104: else 105: cmd.params_[10] = "0" #Device Turned off 106: end 107: SendCommand(cmd) 108: else 109: if (msg[0] == "MVL") 110: #Volume Level Changing 111: volume = msg[1].hex 112: SetDeviceDataInDB( device_.devid_, 158, volume.to_s ) 113: cmd = Command.new(device_.devid_, -1001, 1, 2, 71) 114: cmd.params_[30] = volume.to_s 115: SendCommand(cmd) 116: else 117: # Not a recognized Command/Event 118: end 119: end 120:end 121: 122:def setVol() 123: wantedvol = cmd_.params_[76] #We can all thank ddamron for that var name 124: cmdSend("MVL", wantedvol.to_s(16)) 125:end 126: 127:def log(line) 128: $log = File.open("/var/log/pluto/" + device_.devid_.to_s + "_Generic_Serial_Device.log", "a") 129: $log.puts "(***):" + line.to_s 130: $log.close 131:end 132:#### START SETTERS #################################################################### 133:def initialize() 134:super 135:@returnParamArray=Array.new 136:end 137:#### END SETTERS #################################################################### 138:end 140:(***):Message Received: !1PWR01 (***):Command Sent: PWR:01 with reply: PWR:01 (***):***EVENT*** - PWR : 01 05 05/17/08 15:31:34.493 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:34.494 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:31:34.505 [33;1m_QueueProc Pre - 192 : 0[0m <0x40800950> 05 05/17/08 15:31:34.505 [33;1mGSD-Sleep Pre 192 : 0[0m <0x40800950> 05 05/17/08 15:31:34.505 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:31:34.530 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:31:34.542 [33;1mParameter: [0m <0x42804950> 05 05/17/08 15:31:34.542 [33;1mParameter: [0m <0x42804950> 05 05/17/08 15:31:34.568 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:31:34.568 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> (***):Message Received: !1PWR01 (***):Command Sent: PWR:01 with reply: PWR:01 (***):***EVENT*** - PWR : 01 05 05/17/08 15:31:36.533 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:36.533 [33;1m#### Pre-Process Queue = 2[0m <0x42003950> 05 05/17/08 15:31:37.038 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:37.038 [33;1m#### Pre-Process Queue = 3[0m <0x42003950> 05 05/17/08 15:31:37.545 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:37.545 [33;1m#### Pre-Process Queue = 4[0m <0x42003950> 05 05/17/08 15:31:38.047 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:38.047 [33;1m#### Pre-Process Queue = 5[0m <0x42003950> 05 05/17/08 15:31:38.550 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:38.550 [33;1m#### Pre-Process Queue = 6[0m <0x42003950> 05 05/17/08 15:31:39.054 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:39.054 [33;1m#### Pre-Process Queue = 7[0m <0x42003950> 05 05/17/08 15:31:39.561 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:39.561 [33;1m#### Pre-Process Queue = 8[0m <0x42003950> 05 05/17/08 15:31:40.069 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:40.069 [33;1m#### Pre-Process Queue = 9[0m <0x42003950> 05 05/17/08 15:31:40.576 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:40.576 [33;1m#### Pre-Process Queue = 10[0m <0x42003950> 05 05/17/08 15:31:41.083 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:41.083 [33;1m#### Pre-Process Queue = 11[0m <0x42003950> 05 05/17/08 15:31:41.587 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:41.587 [33;1m#### Pre-Process Queue = 12[0m <0x42003950> 05 05/17/08 15:31:41.917 [33;1mGSD-Sleep Post 192 : 7000[0m <0x40800950> 05 05/17/08 15:31:41.918 [33;1m_QueueProc Post - 192 : 7000[0m <0x40800950> 05 05/17/08 15:31:41.918 [33;1m_QueueProc Pre - 165 : 0[0m <0x40800950> 05 05/17/08 15:31:41.918 [33;1mGSD-Sleep Pre 165 : 0[0m <0x40800950> 05 05/17/08 15:31:41.918 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:31:42.058 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:31:42.090 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:42.090 [33;1m#### Pre-Process Queue = 12[0m <0x42003950> 05 05/17/08 15:31:42.597 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:42.597 [33;1m#### Pre-Process Queue = 13[0m <0x42003950> 05 05/17/08 15:31:43.104 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:43.104 [33;1m#### Pre-Process Queue = 14[0m <0x42003950> 05 05/17/08 15:31:43.611 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:43.611 [33;1m#### Pre-Process Queue = 15[0m <0x42003950> 05 05/17/08 15:31:44.059 [33;1mGSD-Sleep Post 165 : 2000[0m <0x40800950> 05 05/17/08 15:31:44.059 [33;1m_QueueProc Post - 165 : 2000[0m <0x40800950> 05 05/17/08 15:31:44.059 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950> 05 05/17/08 15:31:44.059 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950> 05 05/17/08 15:31:44.059 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950> 05 05/17/08 15:31:44.059 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950> 05 05/17/08 15:31:44.059 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950> 05 05/17/08 15:31:44.059 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950> 05 05/17/08 15:31:44.059 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950> 05 05/17/08 15:31:44.059 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950> 05 05/17/08 15:31:44.059 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950> 05 05/17/08 15:31:44.059 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950> 05 05/17/08 15:31:44.059 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950> 05 05/17/08 15:31:44.059 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950> 05 05/17/08 15:31:44.059 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950> 05 05/17/08 15:31:44.059 [33;1m_QueueProc Pre - 89 : 0[0m <0x40800950> 05 05/17/08 15:31:44.059 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:31:44.059 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:31:44.114 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:44.114 [33;1m#### Pre-Process Queue = 2[0m <0x42003950> 05 05/17/08 15:31:44.127 [33;1mParameter: 2[0m <0x42804950> 01 05/17/08 15:31:44.127 [31;1mError while calling method: Cannot call class method: cmd_89 error: undefined local variable or method `cmd_' for #, line: 7 backtrace: in: (eval): 7 from (eval):7:in `cmd_89' [0m <0x42804950> 01 05/17/08 15:31:44.127 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:31:44.381 [33;1mGSD-Sleep Post 89 : 250[0m <0x40800950> 05 05/17/08 15:31:44.381 [33;1m_QueueProc Post - 89 : 250[0m <0x40800950> 05 05/17/08 15:31:44.381 [33;1m_QueueProc Pre - 89 : 0[0m <0x40800950> 05 05/17/08 15:31:44.381 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:31:44.381 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:31:44.562 [33;1mParameter: 2[0m <0x42804950> 01 05/17/08 15:31:44.562 [31;1mError while calling method: Cannot call class method: cmd_89 error: undefined local variable or method `cmd_' for #, line: 7 backtrace: in: (eval): 7 from (eval):7:in `cmd_89' from (eval):7 [0m <0x42804950> 01 05/17/08 15:31:44.562 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:31:44.622 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:44.622 [33;1m#### Pre-Process Queue = 2[0m <0x42003950> 05 05/17/08 15:31:44.811 [33;1mGSD-Sleep Post 89 : 250[0m <0x40800950> 05 05/17/08 15:31:44.811 [33;1m_QueueProc Post - 89 : 250[0m <0x40800950> 05 05/17/08 15:31:44.811 [33;1m_QueueProc Pre - 89 : 0[0m <0x40800950> 05 05/17/08 15:31:44.811 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:31:44.812 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:31:44.848 [33;1mParameter: 2[0m <0x42804950> 01 05/17/08 15:31:44.848 [31;1mError while calling method: Cannot call class method: cmd_89 error: undefined local variable or method `cmd_' for #, line: 7 backtrace: in: (eval): 7 from (eval):7:in `cmd_89' from (eval):7 [0m <0x42804950> 01 05/17/08 15:31:44.848 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:31:45.102 [33;1mGSD-Sleep Post 89 : 250[0m <0x40800950> 05 05/17/08 15:31:45.102 [33;1m_QueueProc Post - 89 : 250[0m <0x40800950> 05 05/17/08 15:31:45.102 [33;1m_QueueProc Pre - 89 : 0[0m <0x40800950> 05 05/17/08 15:31:45.102 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:31:45.102 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:31:45.129 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:45.129 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:31:45.162 [33;1mParameter: 2[0m <0x42804950> 01 05/17/08 15:31:45.162 [31;1mError while calling method: Cannot call class method: cmd_89 error: undefined local variable or method `cmd_' for #, line: 7 backtrace: in: (eval): 7 from (eval):7:in `cmd_89' from (eval):7 [0m <0x42804950> 01 05/17/08 15:31:45.162 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:31:45.411 [33;1mGSD-Sleep Post 89 : 250[0m <0x40800950> 05 05/17/08 15:31:45.412 [33;1m_QueueProc Post - 89 : 250[0m <0x40800950> 05 05/17/08 15:31:45.412 [33;1m_QueueProc Pre - 89 : 0[0m <0x40800950> 05 05/17/08 15:31:45.412 [33;1mGSD-Sleep Pre 89 : 0[0m <0x40800950> 05 05/17/08 15:31:45.412 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:31:45.452 [33;1mParameter: 2[0m <0x42804950> 01 05/17/08 15:31:45.452 [31;1mError while calling method: Cannot call class method: cmd_89 error: undefined local variable or method `cmd_' for #, line: 7 backtrace: in: (eval): 7 from (eval):7:in `cmd_89' from (eval):7 [0m <0x42804950> 01 05/17/08 15:31:45.452 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:31:45.637 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:45.637 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:31:45.706 [33;1mGSD-Sleep Post 89 : 250[0m <0x40800950> 05 05/17/08 15:31:45.706 [33;1m_QueueProc Post - 89 : 250[0m <0x40800950> 05 05/17/08 15:31:45.706 [33;1m_QueueProc Pre - 90 : 0[0m <0x40800950> 05 05/17/08 15:31:45.706 [33;1mGSD-Sleep Pre 90 : 0[0m <0x40800950> 05 05/17/08 15:31:45.706 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:31:45.774 [33;1mParameter: 2[0m <0x42804950> 01 05/17/08 15:31:45.775 [31;1mError while calling method: Cannot call class method: cmd_90 error: undefined local variable or method `cmd_' for #, line: 14 backtrace: in: (eval): 14 from (eval):14:in `cmd_90' from (eval):7 [0m <0x42804950> 01 05/17/08 15:31:45.775 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:31:46.024 [33;1mGSD-Sleep Post 90 : 250[0m <0x40800950> 05 05/17/08 15:31:46.024 [33;1m_QueueProc Post - 90 : 250[0m <0x40800950> 05 05/17/08 15:31:46.144 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:46.144 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:31:46.193 [33;1m_QueueProc Pre - 90 : 0[0m <0x40800950> 05 05/17/08 15:31:46.193 [33;1mGSD-Sleep Pre 90 : 0[0m <0x40800950> 05 05/17/08 15:31:46.193 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:31:46.322 [33;1mParameter: 2[0m <0x42804950> 01 05/17/08 15:31:46.329 [31;1mError while calling method: Cannot call class method: cmd_90 error: undefined local variable or method `cmd_' for #, line: 14 backtrace: in: (eval): 14 from (eval):14:in `cmd_90' from (eval):14 [0m <0x42804950> 01 05/17/08 15:31:46.329 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:31:46.579 [33;1mGSD-Sleep Post 90 : 250[0m <0x40800950> 05 05/17/08 15:31:46.579 [33;1m_QueueProc Post - 90 : 250[0m <0x40800950> 05 05/17/08 15:31:46.647 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:46.647 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:31:46.692 [33;1m_QueueProc Pre - 90 : 0[0m <0x40800950> 05 05/17/08 15:31:46.692 [33;1mGSD-Sleep Pre 90 : 0[0m <0x40800950> 05 05/17/08 15:31:46.692 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:31:46.744 [33;1mParameter: 2[0m <0x42804950> 01 05/17/08 15:31:46.744 [31;1mError while calling method: Cannot call class method: cmd_90 error: undefined local variable or method `cmd_' for #, line: 14 backtrace: in: (eval): 14 from (eval):14:in `cmd_90' from (eval):14 [0m <0x42804950> 01 05/17/08 15:31:46.744 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:31:46.998 [33;1mGSD-Sleep Post 90 : 250[0m <0x40800950> 05 05/17/08 15:31:46.998 [33;1m_QueueProc Post - 90 : 250[0m <0x40800950> 05 05/17/08 15:31:47.151 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:47.151 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:31:47.163 [33;1m_QueueProc Pre - 90 : 0[0m <0x40800950> 05 05/17/08 15:31:47.163 [33;1mGSD-Sleep Pre 90 : 0[0m <0x40800950> 05 05/17/08 15:31:47.163 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:31:47.219 [33;1mParameter: 2[0m <0x42804950> 01 05/17/08 15:31:47.219 [31;1mError while calling method: Cannot call class method: cmd_90 error: undefined local variable or method `cmd_' for #, line: 14 backtrace: in: (eval): 14 from (eval):14:in `cmd_90' from (eval):14 [0m <0x42804950> 01 05/17/08 15:31:47.219 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:31:47.474 [33;1mGSD-Sleep Post 90 : 250[0m <0x40800950> 05 05/17/08 15:31:47.474 [33;1m_QueueProc Post - 90 : 250[0m <0x40800950> 05 05/17/08 15:31:47.658 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:47.658 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:31:47.698 [33;1m_QueueProc Pre - 90 : 0[0m <0x40800950> 05 05/17/08 15:31:47.698 [33;1mGSD-Sleep Pre 90 : 0[0m <0x40800950> 05 05/17/08 15:31:47.698 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:31:47.774 [33;1mParameter: 2[0m <0x42804950> 01 05/17/08 15:31:47.775 [31;1mError while calling method: Cannot call class method: cmd_90 error: undefined local variable or method `cmd_' for #, line: 14 backtrace: in: (eval): 14 from (eval):14:in `cmd_90' from (eval):14 [0m <0x42804950> 01 05/17/08 15:31:47.775 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:31:48.024 [33;1mGSD-Sleep Post 90 : 250[0m <0x40800950> 05 05/17/08 15:31:48.024 [33;1m_QueueProc Post - 90 : 250[0m <0x40800950> 05 05/17/08 15:31:48.164 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:48.164 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:31:48.193 [33;1m_QueueProc Pre - 90 : 0[0m <0x40800950> 05 05/17/08 15:31:48.193 [33;1mGSD-Sleep Pre 90 : 0[0m <0x40800950> 05 05/17/08 15:31:48.193 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:31:48.366 [33;1mParameter: 1[0m <0x42804950> 01 05/17/08 15:31:48.367 [31;1mError while calling method: Cannot call class method: cmd_90 error: undefined local variable or method `cmd_' for #, line: 14 backtrace: in: (eval): 14 from (eval):14:in `cmd_90' from (eval):14 [0m <0x42804950> 01 05/17/08 15:31:48.367 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:31:48.616 [33;1mGSD-Sleep Post 90 : 250[0m <0x40800950> 05 05/17/08 15:31:48.616 [33;1m_QueueProc Post - 90 : 250[0m <0x40800950> 05 05/17/08 15:31:48.673 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:48.673 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:31:48.673 [33;1m_QueueProc Pre - 90 : 0[0m <0x40800950> 05 05/17/08 15:31:48.673 [33;1mGSD-Sleep Pre 90 : 0[0m <0x40800950> 05 05/17/08 15:31:48.673 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:31:48.761 [33;1mParameter: 1[0m <0x42804950> 01 05/17/08 15:31:48.761 [31;1mError while calling method: Cannot call class method: cmd_90 error: undefined local variable or method `cmd_' for #, line: 14 backtrace: in: (eval): 14 from (eval):14:in `cmd_90' from (eval):14 [0m <0x42804950> 01 05/17/08 15:31:48.762 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:31:49.011 [33;1mGSD-Sleep Post 90 : 250[0m <0x40800950> 05 05/17/08 15:31:49.011 [33;1m_QueueProc Post - 90 : 250[0m <0x40800950> 05 05/17/08 15:31:49.175 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:31:49.175 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:31:49.180 [33;1m_QueueProc Pre - 90 : 0[0m <0x40800950> 05 05/17/08 15:31:49.180 [33;1mGSD-Sleep Pre 90 : 0[0m <0x40800950> 05 05/17/08 15:31:49.180 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:31:49.204 [33;1mParameter: 1[0m <0x42804950> 01 05/17/08 15:31:49.204 [31;1mError while calling method: Cannot call class method: cmd_90 error: undefined local variable or method `cmd_' for #, line: 14 backtrace: in: (eval): 14 from (eval):14:in `cmd_90' from (eval):14 [0m <0x42804950> 01 05/17/08 15:31:49.205 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:31:49.458 [33;1mGSD-Sleep Post 90 : 250[0m <0x40800950> 05 05/17/08 15:31:49.458 [33;1m_QueueProc Post - 90 : 250[0m <0x40800950> 05 05/17/08 15:37:27.898 [33;1mGot a reload command from 0 [0m <0x42003950> 05 05/17/08 15:37:28.304 [33;1mvoid ClientSocket::Disconnect() on this socket: 0x673b60 (m_Socket: 8)[0m <0x2aee1d8646d0> Return code: 2 2 05/17/08 15:37:29 73 (spawning-device) [1;33mDevice requests restart... count=1/50 dev=73[1;00m Sat May 17 15:37:29 EDT 2008 Restart ========== NEW LOG SECTION ========== 1 05/17/08 15:37:38 73 (spawning-device) [1;00mStarting... 1[1;00m 1 05/17/08 15:37:38 73 (spawning-device) [1;00mFound /usr/pluto/bin/Generic_Serial_Device[1;00m RCODE: 0:require 'Ruby_Generic_Serial_Device' 1:class Command < Ruby_Generic_Serial_Device::RubyCommandWrapper 2:end 3:class Device_73 < Ruby_Generic_Serial_Device::RubySerialIOWrapper 4:#### 192 #################################################################### 5:def cmd_192(pk_pipe, pk_device_pipes, cmd=nil) 6:@returnParamArray.clear 7:cmdSend("PWR","01") 8:return @returnParamArray 9:end 10:#### 193 #################################################################### 11:def cmd_193(pk_pipe, cmd=nil) 12:@returnParamArray.clear 13:cmdSend("PWR","00") 14:return @returnParamArray 15:end 16:#### 313 #################################################################### 17:def cmd_313(level, cmd=nil) 18:@returnParamArray.clear 19:# Set Volume - Date: 2007-02-22 12:41:58 20: 21:wantedvol = cmd.params_[76] #We can all thank ddamron for that var name 22:log("Volume Pulled: #{wantedvol}") 23:cmdSend("MVL", wantedvol.to_s(16)) 24: 25:return @returnParamArray 26:end 27:#### 350 #################################################################### 28:def cmd_350(cmd=nil) 29:@returnParamArray.clear 30:# Written by Jason Bennett 31: 32:recvdMsg = receiveMsg() 33:chkCmd(recvdMsg) 34:return @returnParamArray 35:end 36:#### 355 #################################################################### 37:def cmd_355(cmd=nil) 38:@returnParamArray.clear 39:# Written by Jason Bennett 40:# 41:# 355 - Initialize Script 42: 43:# Constants. NOTE: YOU MAY WANT TO CHANGE SOME OF THESE 44:$MaxVolume = 0x4F # Absolute Highest Volume this driver will use 45:$StartingVolume = 0x2A # Starting Volume this device will use 46: 47:# Device wake up call 48:cmdSend("PWR", "01") 49:return @returnParamArray 50:end 51:#### PRIVATE METHODS #################################################################### 52:# Written by Jason Bennett 53:# 54:# 373 - Methods 55: 56:def cmdSend(cmd, opt) 57: conn_.Reconnect() 58: conn_.Send("!1" + cmd + opt + "\r") 59: reply = receiveMsg 60: if (reply[0] == cmd) 61: log("Command Sent: #{cmd}:#{opt} with reply: #{reply[0]}:#{reply[1]}") 62: else 63: log("Command Sent: #{cmd}:#{opt} with MALFORMED REPLY: #{reply[0]}:#{reply[1]}") 64: end 65: chkCmd(reply) 66:end 67: 68:def receiveMsg 69: buff = conn_.Recv(7, 1000) 70: log("Message Received: #{buff}") 71: trash = conn_.Recv(1, 100) 72: if (buff.length() < 7) 73: parsed1 = "ERR" 74: parsed2 = "00" 75: else 76: parsed2 = buff.match(/\d\d/) 77: parsed1 = buff[2].chr + buff[3].chr + buff[4].chr 78: return [parsed1, parsed2] 79: end 80:end 81: 82: 83:def chkCmd(msg) 84: log("***EVENT*** - #{msg[0]} : #{msg[1]}") 85: if (msg[0] == "PWR") 86: #Power state report. Sending on to dce 87: cmd = Command.new(device_.devid_, -1001, 1, 2, 48) 88: if (msg[1] == "01") 89: cmd.params_[10] = "1" #Device Turned on 90: else 91: cmd.params_[10] = "0" #Device Turned off 92: end 93: SendCommand(cmd) 94: else 95: if (msg[0] == "MVL") 96: #Volume Level Changing 97: volume = msg[1].hex 98: SetDeviceDataInDB( device_.devid_, 158, volume.to_s ) 99: cmd = Command.new(device_.devid_, -1001, 1, 2, 71) 100: cmd.params_[30] = volume.to_s 101: SendCommand(cmd) 102: else 103: # Not a recognized Command/Event 104: end 105: end 106:end 107: 108:def setVol() 109: wantedvol = cmd_.params_[76] #We can all thank ddamron for that var name 110: cmdSend("MVL", wantedvol.to_s(16)) 111:end 112: 113:def log(line) 114: $log = File.open("/var/log/pluto/" + device_.devid_.to_s + "_Generic_Serial_Device.log", "a") 115: $log.puts "(***):" + line.to_s 116: $log.close 117:end 118:#### START SETTERS #################################################################### 119:def initialize() 120:super 121:@returnParamArray=Array.new 122:end 123:#### END SETTERS #################################################################### 124:end 126:(***):Message Received: !1PWR01 (***):Command Sent: PWR:01 with reply: PWR:01 (***):***EVENT*** - PWR : 01 05 05/17/08 15:37:46.930 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:37:46.931 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:37:46.963 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:37:47.004 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:37:47.004 [33;1m#### Pre-Process Queue = 2[0m <0x42003950> 05 05/17/08 15:37:47.004 [33;1m_QueueProc Pre - 192 : 0[0m <0x40800950> 05 05/17/08 15:37:47.004 [33;1mGSD-Sleep Pre 192 : 0[0m <0x40800950> 05 05/17/08 15:37:47.004 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:37:47.048 [33;1mParameter: [0m <0x42804950> 05 05/17/08 15:37:47.048 [33;1mParameter: [0m <0x42804950> (***):Message Received: !1PWR01 (***):Command Sent: PWR:01 with reply: PWR:01 (***):***EVENT*** - PWR : 01 05 05/17/08 15:37:51.300 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:37:51.301 [33;1m#### Pre-Process Queue = 2[0m <0x42003950> 05 05/17/08 15:37:51.301 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:37:51.301 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:37:51.301 [33;1m#### Pre-Process Queue = 3[0m <0x42003950> 05 05/17/08 15:37:54.635 [33;1mGSD-Sleep Post 192 : 7000[0m <0x40800950> 05 05/17/08 15:37:54.636 [33;1m_QueueProc Post - 192 : 7000[0m <0x40800950> 05 05/17/08 15:37:54.636 [33;1m_QueueProc Pre - 165 : 0[0m <0x40800950> 05 05/17/08 15:37:54.636 [33;1mGSD-Sleep Pre 165 : 0[0m <0x40800950> 05 05/17/08 15:37:54.636 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:37:54.716 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:37:56.717 [33;1mGSD-Sleep Post 165 : 2000[0m <0x40800950> 05 05/17/08 15:37:56.717 [33;1m_QueueProc Post - 165 : 2000[0m <0x40800950> 05 05/17/08 15:37:56.717 [33;1m_QueueProc Pre - 192 : 0[0m <0x40800950> 05 05/17/08 15:37:56.717 [33;1mGSD-Sleep Pre 192 : 0[0m <0x40800950> 05 05/17/08 15:37:56.717 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:37:56.850 [33;1mParameter: 1[0m <0x42804950> 05 05/17/08 15:37:56.850 [33;1mParameter: [0m <0x42804950> (***):Message Received: !1PWR01 (***):Command Sent: PWR:01 with reply: PWR:01 (***):***EVENT*** - PWR : 01 05 05/17/08 15:37:57.948 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:37:57.948 [33;1m#### Pre-Process Queue = 2[0m <0x42003950> 05 05/17/08 15:38:04.445 [33;1mGSD-Sleep Post 192 : 7000[0m <0x40800950> 05 05/17/08 15:38:04.450 [33;1m_QueueProc Post - 192 : 7000[0m <0x40800950> 05 05/17/08 15:38:04.450 [33;1m_QueueProc Pre - 165 : 0[0m <0x40800950> 05 05/17/08 15:38:04.450 [33;1mGSD-Sleep Pre 165 : 0[0m <0x40800950> 05 05/17/08 15:38:04.450 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:38:04.525 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:38:06.526 [33;1mGSD-Sleep Post 165 : 2000[0m <0x40800950> 05 05/17/08 15:38:06.526 [33;1m_QueueProc Post - 165 : 2000[0m <0x40800950> 05 05/17/08 15:38:06.526 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950> 05 05/17/08 15:39:48.264 [33;1mGot a reload command from 0 [0m <0x42003950> 05 05/17/08 15:39:48.706 [33;1mvoid ClientSocket::Disconnect() on this socket: 0x673b60 (m_Socket: 8)[0m <0x2b83a871d6d0> Return code: 2 2 05/17/08 15:39:50 73 (spawning-device) [1;33mDevice requests restart... count=1/50 dev=73[1;00m Sat May 17 15:39:50 EDT 2008 Restart ========== NEW LOG SECTION ========== 1 05/17/08 15:39:58 73 (spawning-device) [1;00mStarting... 1[1;00m 1 05/17/08 15:39:58 73 (spawning-device) [1;00mFound /usr/pluto/bin/Generic_Serial_Device[1;00m RCODE: 0:require 'Ruby_Generic_Serial_Device' 1:class Command < Ruby_Generic_Serial_Device::RubyCommandWrapper 2:end 3:class Device_73 < Ruby_Generic_Serial_Device::RubySerialIOWrapper 4:#### 192 #################################################################### 5:def cmd_192(pk_pipe, pk_device_pipes, cmd=nil) 6:@returnParamArray.clear 7:cmdSend("PWR","01") 8:return @returnParamArray 9:end 10:#### 193 #################################################################### 11:def cmd_193(pk_pipe, cmd=nil) 12:@returnParamArray.clear 13:cmdSend("PWR","00") 14:return @returnParamArray 15:end 16:#### 313 #################################################################### 17:def cmd_313(level, cmd=nil) 18:@returnParamArray.clear 19:# Set Volume - Date: 2007-02-22 12:41:58 20: 21:wantedvol = cmd.params_[76] #We can all thank ddamron for that var name 22:log("Volume Pulled: #{wantedvol}") 23:desiredvol = wantedvol.to_s(16) 24:cmdSend("MVL", desiredvol.to_s) 25: 26:return @returnParamArray 27:end 28:#### 350 #################################################################### 29:def cmd_350(cmd=nil) 30:@returnParamArray.clear 31:# Written by Jason Bennett 32: 33:recvdMsg = receiveMsg() 34:chkCmd(recvdMsg) 35:return @returnParamArray 36:end 37:#### 355 #################################################################### 38:def cmd_355(cmd=nil) 39:@returnParamArray.clear 40:# Written by Jason Bennett 41:# 42:# 355 - Initialize Script 43: 44:# Constants. NOTE: YOU MAY WANT TO CHANGE SOME OF THESE 45:$MaxVolume = 0x4F # Absolute Highest Volume this driver will use 46:$StartingVolume = 0x2A # Starting Volume this device will use 47: 48:# Device wake up call 49:cmdSend("PWR", "01") 50:return @returnParamArray 51:end 52:#### PRIVATE METHODS #################################################################### 53:# Written by Jason Bennett 54:# 55:# 373 - Methods 56: 57:def cmdSend(cmd, opt) 58: conn_.Reconnect() 59: conn_.Send("!1" + cmd + opt + "\r") 60: reply = receiveMsg 61: if (reply[0] == cmd) 62: log("Command Sent: #{cmd}:#{opt} with reply: #{reply[0]}:#{reply[1]}") 63: else 64: log("Command Sent: #{cmd}:#{opt} with MALFORMED REPLY: #{reply[0]}:#{reply[1]}") 65: end 66: chkCmd(reply) 67:end 68: 69:def receiveMsg 70: buff = conn_.Recv(7, 1000) 71: log("Message Received: #{buff}") 72: trash = conn_.Recv(1, 100) 73: if (buff.length() < 7) 74: parsed1 = "ERR" 75: parsed2 = "00" 76: else 77: parsed2 = buff.match(/\d\d/) 78: parsed1 = buff[2].chr + buff[3].chr + buff[4].chr 79: return [parsed1, parsed2] 80: end 81:end 82: 83: 84:def chkCmd(msg) 85: log("***EVENT*** - #{msg[0]} : #{msg[1]}") 86: if (msg[0] == "PWR") 87: #Power state report. Sending on to dce 88: cmd = Command.new(device_.devid_, -1001, 1, 2, 48) 89: if (msg[1] == "01") 90: cmd.params_[10] = "1" #Device Turned on 91: else 92: cmd.params_[10] = "0" #Device Turned off 93: end 94: SendCommand(cmd) 95: else 96: if (msg[0] == "MVL") 97: #Volume Level Changing 98: volume = msg[1].hex 99: SetDeviceDataInDB( device_.devid_, 158, volume.to_s ) 100: cmd = Command.new(device_.devid_, -1001, 1, 2, 71) 101: cmd.params_[30] = volume.to_s 102: SendCommand(cmd) 103: else 104: # Not a recognized Command/Event 105: end 106: end 107:end 108: 109:def setVol() 110: wantedvol = cmd_.params_[76] #We can all thank ddamron for that var name 111: cmdSend("MVL", wantedvol.to_s(16)) 112:end 113: 114:def log(line) 115: $log = File.open("/var/log/pluto/" + device_.devid_.to_s + "_Generic_Serial_Device.log", "a") 116: $log.puts "(***):" + line.to_s 117: $log.close 118:end 119:#### START SETTERS #################################################################### 120:def initialize() 121:super 122:@returnParamArray=Array.new 123:end 124:#### END SETTERS #################################################################### 125:end 127:(***):Message Received: !1PWR01 (***):Command Sent: PWR:01 with reply: PWR:01 (***):***EVENT*** - PWR : 01 05 05/17/08 15:40:04.817 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:40:04.818 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:40:04.854 [33;1m_QueueProc Pre - 192 : 0[0m <0x40800950> 05 05/17/08 15:40:04.854 [33;1mGSD-Sleep Pre 192 : 0[0m <0x40800950> 05 05/17/08 15:40:04.854 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:40:04.854 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:40:04.882 [33;1mParameter: [0m <0x42804950> 05 05/17/08 15:40:04.882 [33;1mParameter: [0m <0x42804950> 05 05/17/08 15:40:04.907 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:40:04.907 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> (***):Message Received: !1PWR01 (***):Command Sent: PWR:01 with reply: PWR:01 (***):***EVENT*** - PWR : 01 05 05/17/08 15:40:08.368 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:40:08.368 [33;1m#### Pre-Process Queue = 2[0m <0x42003950> 05 05/17/08 15:40:08.368 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:40:08.368 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:40:08.368 [33;1m#### Pre-Process Queue = 3[0m <0x42003950> 05 05/17/08 15:40:12.446 [33;1mGSD-Sleep Post 192 : 7000[0m <0x40800950> 05 05/17/08 15:40:12.447 [33;1m_QueueProc Post - 192 : 7000[0m <0x40800950> 05 05/17/08 15:40:12.447 [33;1m_QueueProc Pre - 165 : 0[0m <0x40800950> 05 05/17/08 15:40:12.447 [33;1mGSD-Sleep Pre 165 : 0[0m <0x40800950> 05 05/17/08 15:40:12.447 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:40:12.628 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:40:14.487 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:40:14.487 [33;1m#### Pre-Process Queue = 3[0m <0x42003950> 05 05/17/08 15:40:14.627 [33;1mGSD-Sleep Post 165 : 2000[0m <0x40800950> 05 05/17/08 15:40:14.627 [33;1m_QueueProc Post - 165 : 2000[0m <0x40800950> 05 05/17/08 15:40:14.627 [33;1m_QueueProc Pre - 192 : 0[0m <0x40800950> 05 05/17/08 15:40:14.627 [33;1mGSD-Sleep Pre 192 : 0[0m <0x40800950> 05 05/17/08 15:40:14.627 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:40:14.627 [33;1mParameter: 1[0m <0x42804950> 05 05/17/08 15:40:14.627 [33;1mParameter: [0m <0x42804950> (***):Message Received: !1PWR01 (***):Command Sent: PWR:01 with reply: PWR:01 05 05/17/08 15:40:14.974 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:40:14.977 [33;1m#### Pre-Process Queue = 3[0m <0x42003950> (***):***EVENT*** - PWR : 01 05 05/17/08 15:40:21.986 [33;1mGSD-Sleep Post 192 : 7000[0m <0x40800950> 05 05/17/08 15:40:21.986 [33;1m_QueueProc Post - 192 : 7000[0m <0x40800950> 05 05/17/08 15:40:21.986 [33;1m_QueueProc Pre - 165 : 0[0m <0x40800950> 05 05/17/08 15:40:21.986 [33;1mGSD-Sleep Pre 165 : 0[0m <0x40800950> 05 05/17/08 15:40:21.986 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:40:22.022 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:40:24.022 [33;1mGSD-Sleep Post 165 : 2000[0m <0x40800950> 05 05/17/08 15:40:24.022 [33;1m_QueueProc Post - 165 : 2000[0m <0x40800950> 05 05/17/08 15:40:24.022 [33;1m---- _QueueProc Ignored - 90[0m <0x40800950> 05 05/17/08 15:40:24.022 [33;1m---- _QueueProc Ignored - 90[0m <0x40800950> 05 05/17/08 15:54:59.992 [33;1mGot a reload command from 0 [0m <0x42003950> 05 05/17/08 15:55:00.335 [33;1mvoid ClientSocket::Disconnect() on this socket: 0x673b60 (m_Socket: 8)[0m <0x2b82c0e646d0> Return code: 2 2 05/17/08 15:55:01 73 (spawning-device) [1;33mDevice requests restart... count=1/50 dev=73[1;00m Sat May 17 15:55:01 EDT 2008 Restart ========== NEW LOG SECTION ========== 1 05/17/08 15:55:09 73 (spawning-device) [1;00mStarting... 1[1;00m 1 05/17/08 15:55:09 73 (spawning-device) [1;00mFound /usr/pluto/bin/Generic_Serial_Device[1;00m RCODE: 0:require 'Ruby_Generic_Serial_Device' 1:class Command < Ruby_Generic_Serial_Device::RubyCommandWrapper 2:end 3:class Device_73 < Ruby_Generic_Serial_Device::RubySerialIOWrapper 4:#### 192 #################################################################### 5:def cmd_192(pk_pipe, pk_device_pipes, cmd=nil) 6:@returnParamArray.clear 7:cmdSend("PWR","01") 8:return @returnParamArray 9:end 10:#### 193 #################################################################### 11:def cmd_193(pk_pipe, cmd=nil) 12:@returnParamArray.clear 13:cmdSend("PWR","00") 14:return @returnParamArray 15:end 16:#### 313 #################################################################### 17:def cmd_313(level, cmd=nil) 18:@returnParamArray.clear 19:# Set Volume - Date: 2007-02-22 12:41:58 20: 21:wantedvol = cmd.params_[76] #We can all thank ddamron for that var name 22:log("Volume Pulled: #{wantedvol}") 23:#desiredvol = wantedvol.to_s(16) 24:#cmdSend("MVL", desiredvol.to_s) 25: 26:return @returnParamArray 27:end 28:#### 350 #################################################################### 29:def cmd_350(cmd=nil) 30:@returnParamArray.clear 31:# Written by Jason Bennett 32: 33:recvdMsg = receiveMsg() 34:chkCmd(recvdMsg) 35:return @returnParamArray 36:end 37:#### 355 #################################################################### 38:def cmd_355(cmd=nil) 39:@returnParamArray.clear 40:# Written by Jason Bennett 41:# 42:# 355 - Initialize Script 43: 44:# Constants. NOTE: YOU MAY WANT TO CHANGE SOME OF THESE 45:$MaxVolume = 0x4F # Absolute Highest Volume this driver will use 46:$StartingVolume = 0x2A # Starting Volume this device will use 47: 48:# Device wake up call 49:cmdSend("PWR", "01") 50:return @returnParamArray 51:end 52:#### PRIVATE METHODS #################################################################### 53:# Written by Jason Bennett 54:# 55:# 373 - Methods 56: 57:def cmdSend(cmd, opt) 58: conn_.Reconnect() 59: conn_.Send("!1" + cmd + opt + "\r") 60: reply = receiveMsg 61: if (reply[0] == cmd) 62: log("Command Sent: #{cmd}:#{opt} with reply: #{reply[0]}:#{reply[1]}") 63: else 64: log("Command Sent: #{cmd}:#{opt} with MALFORMED REPLY: #{reply[0]}:#{reply[1]}") 65: end 66: chkCmd(reply) 67:end 68: 69:def receiveMsg 70: buff = conn_.Recv(7, 1000) 71: log("Message Received: #{buff}") 72: trash = conn_.Recv(1, 100) 73: if (buff.length() < 7) 74: parsed1 = "ERR" 75: parsed2 = "00" 76: else 77: parsed2 = buff.match(/\d\d/) 78: parsed1 = buff[2].chr + buff[3].chr + buff[4].chr 79: return [parsed1, parsed2] 80: end 81:end 82: 83: 84:def chkCmd(msg) 85: log("***EVENT*** - #{msg[0]} : #{msg[1]}") 86: if (msg[0] == "PWR") 87: #Power state report. Sending on to dce 88: cmd = Command.new(device_.devid_, -1001, 1, 2, 48) 89: if (msg[1] == "01") 90: cmd.params_[10] = "1" #Device Turned on 91: else 92: cmd.params_[10] = "0" #Device Turned off 93: end 94: SendCommand(cmd) 95: else 96: if (msg[0] == "MVL") 97: #Volume Level Changing 98: volume = msg[1].hex 99: SetDeviceDataInDB( device_.devid_, 158, volume.to_s ) 100: cmd = Command.new(device_.devid_, -1001, 1, 2, 71) 101: cmd.params_[30] = volume.to_s 102: SendCommand(cmd) 103: else 104: # Not a recognized Command/Event 105: end 106: end 107:end 108: 109:def setVol() 110: wantedvol = cmd_.params_[76] #We can all thank ddamron for that var name 111: cmdSend("MVL", wantedvol.to_s(16)) 112:end 113: 114:def log(line) 115: $log = File.open("/var/log/pluto/" + device_.devid_.to_s + "_Generic_Serial_Device.log", "a") 116: $log.puts "(***):" + line.to_s 117: $log.close 118:end 119:#### START SETTERS #################################################################### 120:def initialize() 121:super 122:@returnParamArray=Array.new 123:end 124:#### END SETTERS #################################################################### 125:end 127:(***):Message Received: !1PWR01 (***):Command Sent: PWR:01 with reply: PWR:01 (***):***EVENT*** - PWR : 01 05 05/17/08 15:55:17.814 [33;1mGSDMessageTranslator isCmdImplemented = true[0m <0x42003950> 05 05/17/08 15:55:17.815 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:55:17.835 [33;1m_QueueProc Pre - 192 : 0[0m <0x40800950> 05 05/17/08 15:55:17.835 [33;1mGSD-Sleep Pre 192 : 0[0m <0x40800950> 05 05/17/08 15:55:17.835 [33;1mProcess Queue = 1[0m <0x40800950> 05 05/17/08 15:55:17.845 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:55:17.880 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:55:17.880 [33;1m#### Pre-Process Queue = 1[0m <0x42003950> 05 05/17/08 15:55:17.926 [33;1mParameter: [0m <0x42804950> 05 05/17/08 15:55:17.926 [33;1mParameter: [0m <0x42804950> (***):Message Received: !1PWR01 (***):Command Sent: PWR:01 with reply: PWR:01 (***):***EVENT*** - PWR : 01 05 05/17/08 15:55:20.394 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:55:20.394 [33;1m#### Pre-Process Queue = 2[0m <0x42003950> 05 05/17/08 15:55:20.899 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:55:20.899 [33;1m#### Pre-Process Queue = 3[0m <0x42003950> 05 05/17/08 15:55:21.406 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:55:21.406 [33;1m#### Pre-Process Queue = 4[0m <0x42003950> 05 05/17/08 15:55:21.909 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:55:21.909 [33;1m#### Pre-Process Queue = 5[0m <0x42003950> 05 05/17/08 15:55:22.417 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:55:22.417 [33;1m#### Pre-Process Queue = 6[0m <0x42003950> 05 05/17/08 15:55:22.920 [33;1mGSDMessageTranslator isCmdImplemented = false[0m <0x42003950> 05 05/17/08 15:55:22.920 [33;1m#### Pre-Process Queue = 7[0m <0x42003950> 05 05/17/08 15:55:25.506 [33;1mGSD-Sleep Post 192 : 7000[0m <0x40800950> 05 05/17/08 15:55:25.506 [33;1m_QueueProc Post - 192 : 7000[0m <0x40800950> 05 05/17/08 15:55:25.506 [33;1m_QueueProc Pre - 165 : 0[0m <0x40800950> 05 05/17/08 15:55:25.506 [33;1mGSD-Sleep Pre 165 : 0[0m <0x40800950> 05 05/17/08 15:55:25.506 [33;1mProcess Queue = 1[0m <0x40800950> 01 05/17/08 15:55:25.703 [31;1mFor obscure reasons could not handle the message[0m <0x42804950> 05 05/17/08 15:55:27.703 [33;1mGSD-Sleep Post 165 : 2000[0m <0x40800950> 05 05/17/08 15:55:27.703 [33;1m_QueueProc Post - 165 : 2000[0m <0x40800950> 05 05/17/08 15:55:27.703 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950> 05 05/17/08 15:55:27.703 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950> 05 05/17/08 15:55:27.703 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950> 05 05/17/08 15:55:27.703 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950> 05 05/17/08 15:55:27.703 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950> 05 05/17/08 15:55:27.703 [33;1m---- _QueueProc Ignored - 89[0m <0x40800950>