Class: O3D3XX::EditProxy

Inherits:
XmlRPCBase show all
Defined in:
lib/o3d3xx/xmlrpc.rb

Overview

This class encapsulates the XML-RPC Edit-Mode access

Instance Attribute Summary

Attributes inherited from XmlRPCBase

#rpc_cl

Instance Method Summary collapse

Methods inherited from XmlRPCBase

#dump, #getConfig, #method_missing

Constructor Details

#initialize(proxy) ⇒ EditProxy

Returns a new instance of EditProxy.



83
84
85
86
87
88
89
90
# File 'lib/o3d3xx/xmlrpc.rb', line 83

def initialize(proxy)
  config = proxy.getConfig()
  path = "com.ifm.efector/session_#{proxy.getSessionID()}/edit/"
  super(:host => config[:host], :port => config[:port], :path => path)
  @proxy = proxy
  @device = O3D3xx::DeviceProxy.new(@proxy)
  @application = nil
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class XmlRPCBase

Instance Method Details

#closeApplicationObject



97
98
99
100
# File 'lib/o3d3xx/xmlrpc.rb', line 97

def closeApplication()
  self.stopEditingApplication() unless @application == nil
  @application = nil
end

#getApplicationProxy(index) ⇒ Object



92
93
94
95
# File 'lib/o3d3xx/xmlrpc.rb', line 92

def getApplicationProxy(index)
  self.editApplication(index)
  @application = O3D3xx::ApplicationProxy.new(@proxy)
end

#getDeviceProxyObject



102
103
104
# File 'lib/o3d3xx/xmlrpc.rb', line 102

def getDeviceProxy()
  @device
end