// var devicesStore = new Ext.data.JsonStore({ root: 'nodes', totalProperty: 'totalCount', idProperty: 'id', remoteSort: true, fields: [{ name: 'id', type: 'int' },{ name: 'name', type: 'string' },{ name: 'hardware', type: 'string' },{ name: 'caps', type: 'int' },{ name: 'ip', type: 'string' },{ name: 'mac', type: 'string' }], proxy : new Ext.data.HttpProxy({ method: 'POST', prettyUrls: false, url: '/lib/controller/listDiscoveredCameraSources.php', headers: { 'UID': 'Data['id'];?>', 'SID': '' } }) }); var LRF1D2_st_win = null; var LRF2D2_st_win = null; var LRF16D3_st_win = null; function loadFullLRF1D2Data( NodeID ){ Ext.Ajax.request({ url: '/lib/controller/getSettingsLidsr3D.php', params: { NID: NodeID, UID: 'Data['id'];?>', SID: '', }, success: function( response, opts ){ var data = Ext.decode(response.responseText); Ext.getCmp('setting_master_ip').setValue( data.ip_address ); Ext.getCmp('setting_master_port').setValue( data.port ); Ext.getCmp('setting_slave_ip').setValue( data.aux_ip_address ); Ext.getCmp('setting_slave_port').setValue( data.aux_port ); Ext.getCmp('setting_lat').setValue( data.lat ); Ext.getCmp('setting_lon').setValue( data.lon ); Ext.getCmp('setting_alt').setValue( data.alt ); Ext.getCmp('setting_roll').setValue( data.roll ); Ext.getCmp('setting_pitch').setValue( data.pitch ); Ext.getCmp('setting_yaw').setValue( data.yaw ); }, failure: function( response, opts ) { //Ext.fly('some_div').update('Fail!'); } }); }; function LRF1D2_settings(){ if( LRF1D2_st_win == null ){ LRF1D2_st_win = new Ext.Window({ title: 'Sensor Settings', modal: true, width: 800, height: 600, closeAction: 'hide', items:{ xtype: 'tabpanel', activeTab: 0, items:[{ title: 'General Settings', xtype: 'form', layout: 'table', defaults: { bodyStyle:'padding:20px' }, layoutConfig: { columns: 2 }, items:[{ html: 'Status', frame: false, border: false },{ html: '

ONLINE

', frame: false, border: false },{ html: 'Serial Number', frame: false, border: false },{ xtype: 'field', id: 'serial_num', readOnly: true, value: '1212' },{ html: 'Version ID', frame: false, border: false },{ xtype: 'field', id: 'version_id', readOnly: true, value: 'LiberManDA122' },{ html: 'Device Adress', frame: false, border: false },{ xtype: 'numberfield', id: 'device_id' },{ frame: false, border: false },{ xtype: 'button', id: 'upddiBTN', text: 'Update Device Address', handler: function(){ Ext.Msg.show({ title:'Update Device Address?', msg: 'Are you sure to do so?', buttons: Ext.Msg.YESNOCANCEL, //fn: processResult, animEl: 'upddiBTN', icon: Ext.MessageBox.QUESTION }); } },{ html: 'Device COM Speed', frame: false, border: false },{ xtype: 'combo', id: 'com_spd', editable: false, typeAhead: true, triggerAction: 'all', lazyRender:true, mode: 'local', store: new Ext.data.ArrayStore({ id: 0, fields: ['mySPD', 'displayText' ], data: [[4800,'4800'],[9600,'9600'],[14400,'14400'],[19200,'19200'],[38400, '38400'],[56000,'56000'],[57600,'57600'],[115200,'115200']] }), valueField: 'mySPD', displayField: 'displayText' },{ frame: false, border: false },{ xtype: 'button', id: 'updspBTN', text: 'Set Device Speed', handler: function(){ Ext.Msg.show({ title:'Update Device Speed?', msg: 'Are you sure to do so?', buttons: Ext.Msg.YESNOCANCEL, //fn: processResult, animEl: 'upddiBTN', icon: Ext.MessageBox.QUESTION }); } },{ html: 'Detection Maximal Range', frame: false, border: false },{ xtype: 'numberfield', id: 'max_range', readOnly: true, value: '1212' },{ html: 'Base Shift', frame: false, border: false },{ xtype: 'numberfield', id: 'base_shift', readOnly: true, value: '1212' }] },{ title: 'Mantenence', xtype: 'form', layout: 'table', defaults: { bodyStyle:'padding:20px' }, layoutConfig: { columns: 2 }, items:[{ html: 'Restart Device', frame: false, border: false },{ xtype: 'button', id: 'rstBTN', text: 'Full Reset', handler: function(){ Ext.Msg.show({ title:'Reset Device?', msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?', buttons: Ext.Msg.YESNOCANCEL, //fn: processResult, animEl: 'rstBTN', icon: Ext.MessageBox.QUESTION }); } }] },{ title: 'Detection Settings', xtype: 'form', layout: 'table', defaults: { bodyStyle:'padding:20px' }, layoutConfig: { columns: 4 }, items:[{ html: 'Master Offset', frame: false, border: false },{ xtype: 'numberfield', id: 'mlrf_offset', name: 'mlrf_offset', allowBlank: false, allowDecimals: false, maxText: 'The Range is: 0 - 60', maxValue: 60, minText: 'No Negative Values Allowed', minValue: 0, },{ html: 'Slave Offset', frame: false, border: false },{ xtype: 'numberfield', id: 'slrf_offset', name: 'slrf_offset', allowBlank: false, allowDecimals: false, maxText: 'The Range is: 0 - 60', maxValue: 60, minText: 'No Negative Values Allowed', minValue: 0, },{ html: 'Master Delta', frame: false, border: false },{ xtype: 'numberfield', id: 'mlrf_delta', name: 'mlrf_delta', allowBlank: false, allowDecimals: false, maxText: 'The Range is: 0 - 320', maxValue: 320, minText: 'No Negative Values Allowed', minValue: 0 },{ html: 'Slave Delta', frame: false, border: false },{ xtype: 'numberfield', id: 'slrf_delta', name: 'slrf_delta', allowBlank: false, allowDecimals: false, maxText: 'The Range is: 0 - 320', maxValue: 320, minText: 'No Negative Values Allowed', minValue: 0 },{ html: 'Master Width', frame: false, border: false },{ xtype: 'numberfield', id: 'mlrf_width', name: 'mlrf_width', allowBlank: false, allowDecimals: false, maxText: 'The Range is: 1800 - 16000', maxValue: 16000, minText: 'The Range is: 1800 - 16000', minValue: 1800 },{ html: 'Slave Width', frame: false, border: false },{ xtype: 'numberfield', id: 'slrf_width', name: 'slrf_width', allowBlank: false, allowDecimals: false, maxText: 'The Range is: 1800 - 16000', maxValue: 16000, minText: 'The Range is: 1800 - 16000', minValue: 1800 },{ html: 'Master Order', frame: false, border: false },{ xtype: 'numberfield', id: 'mlrf_order', name: 'mlrf_order', allowBlank: false, allowDecimals: false, maxText: 'The Range is: 0 - 10', maxValue: 10, minText: 'No Negative Values Allowed', minValue: 0 },{ html: 'Slave Order', frame: false, border: false },{ xtype: 'numberfield', id: 'slrf_order', name: 'slrf_order', allowBlank: false, allowDecimals: false, maxText: 'The Range is: 0 - 10', maxValue: 10, minText: 'No Negative Values Allowed', minValue: 0 },{ html: 'Master SST', frame: false, border: false },{ xtype: 'numberfield', id: 'mlrf_sst', name: 'mlrf_sst', allowBlank: false, allowDecimals: false, maxText: 'The Range is: 0 - 100', maxValue: 100, minText: 'No Negative Values Allowed', minValue: 0 },{ html: 'Slave SST', frame: false, border: false },{ xtype: 'numberfield', id: 'slrf_sst', name: 'slrf_sst', allowBlank: false, allowDecimals: false, maxText: 'The Range is: 0 - 100', maxValue: 100, minText: 'No Negative Values Allowed', minValue: 0 },{ html: 'Mastr Flip', frame: false, border: false },{ xtype: 'numberfield', id: 'mlrf_flip', name: 'mlrf_flip', allowBlank: false, allowDecimals: false, maxText: 'The Range is: 8 - 128', maxValue: 128, minText: 'The Range is: 8 - 128', minValue: 8 },{ html: 'Slave Flip', frame: false, border: false },{ xtype: 'numberfield', id: 'slrf_flip', name: 'slrf_flip', allowBlank: false, allowDecimals: false, maxText: 'The Range is: 8 - 128', maxValue: 128, minText: 'The Range is: 8 - 128', minValue: 8 },{ html: 'Master Sun', frame: false, border: false },{ xtype: 'numberfield', id: 'mlrf_sun', name: 'mlrf_sun', allowBlank: false, allowDecimals: false, maxText: 'The Range is: 0 - 100', maxValue: 100, minText: 'No Negative Values Allowed', minValue: 0 },{ html: 'Slave Sun', frame: false, border: false },{ xtype: 'numberfield', id: 'slrf_sun', name: 'slrf_sun', allowBlank: false, allowDecimals: false, maxText: 'The Range is: 0 - 100', maxValue: 100, minText: 'No Negative Values Allowed', minValue: 0 }] },{ title: 'Camera/DC Settings' },{ title: 'Width Table' },{ title: 'Zoom/Tilt Table' }] } }); }; LRF1D2_st_win.show(); loadFullLRF1D2Data( SelectedNodeID ); }; function LRF2D2_settings(){ }; function LRF16D3_settings(){ };