Class: O3D3XX::SessionProxy

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

Overview

This class encapsulates the XML-RPC session 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) ⇒ SessionProxy

Returns a new instance of SessionProxy.



117
118
119
120
121
122
123
# File 'lib/o3d3xx/xmlrpc.rb', line 117

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

Dynamic Method Handling

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

Instance Method Details

#closeEditObject



132
133
134
135
# File 'lib/o3d3xx/xmlrpc.rb', line 132

def closeEdit()
  self.setOperatingMode(O3D3xx::Session::OperationMode[:RUN]) unless @edit == nil
  @edit = nil
end

#getEditObjectProxyObject



125
126
127
128
129
130
131
# File 'lib/o3d3xx/xmlrpc.rb', line 125

def getEditObjectProxy()
  if nil == @edit
    self.setOperatingMode(O3D3xx::Session::OperationMode[:EDIT])
    @edit = O3D3xx::EditProxy.new(@proxy)
  end
  @edit
end