Class: ONVIF::DeviceManagementAction::SetSystemFactoryDefault

Inherits:
Action
  • Object
show all
Defined in:
lib/ruby_onvif_client/device_management/set_system_factory_default.rb

Instance Method Summary collapse

Methods inherited from Action

#attribute, #callback, #create_event_onvif_message, #create_media_onvif_message, #create_ptz_onvif_message, #initialize, #send_message, #value

Constructor Details

This class inherits a constructor from ONVIF::Action

Instance Method Details

#run(default_type, cb) ⇒ Object

default_type = ‘Hard’ // ‘Hard’, ‘Soft’ FactoryDefault



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/ruby_onvif_client/device_management/set_system_factory_default.rb', line 7

def run default_type, cb
    message = Message.new namespaces: {:'xmlns:sch' => 'http://www.onvif.org/ver10/schema'}
    message.body =  ->(xml) do
        xml.wsdl(:SetSystemFactoryDefault) do
            xml.wsdl :FactoryDefault, default_type
        end
    end
    send_message message do |success, result|
        callback cb, success, result
    end
end