ifw  0.0.1-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Attributes | List of all members
deviceSimulatorBase.DeviceSimulatorBase Class Reference

Device Simulator base class. More...

Inheritance diagram for deviceSimulatorBase.DeviceSimulatorBase:
devsimShutter.DeviceSimulatorShutter

Public Member Functions

def __init__
 Constructor, initializing the internal structures. More...
 
def srv
 Return reference to Device Simulator server instance. More...
 
def log
 Return reference to logger. More...
 
def setDeviceInfo
 Set the internal (firmware) information about the simulated device. More...
 
def init_device_parameters_
 Initialize various parameters of the simulated device. More...
 
def write_node
 Write a node in the internal OPC UA namespace. More...
 
def set_last_command
 Set the value of the simulated 'last command' node. More...
 
def state_machine
 Return reference to the internal state machine (engine). More...
 
def state_reg
 Return reference to the registry with mappings between state textual and numerical repr. More...
 
def set_opcua_state
 Set the state/substate of the simulated device in the OPC UA namespace. More...
 
def cfg
 Return reference to configuration object (NameMapping object). More...
 
def get_opcua_state
 Return the OPC UA state as tuple (<numerical val>="">,<string val>="">). More...
 
def opcua_server
 Return reference to the OPC UA server. More...
 
def getnodes
 Return the OPC UA nodes as a list. More...
 
def get_node_dic
 Return dictionary containing OPC UA nodes. More...
 
def get_node
 Return object for node with given ID. More...
 
def convert_node_value
 Convert an OPC UA node object value to a primitive value. More...
 
def schedule_event
 Schedule an event. More...
 
def get_node_value
 Get value of the node with the given ID. More...
 
def implement_rpc_call_
 Issue warning to implement code for RPC call. More...
 
def device_name
 Derive device name from the OPC UA profile (XML). More...
 
def gen_node_id_
 Returns tupple (<symbolic node="" id>="">, <numeric node="" id>="">|0). More...
 
def get_node_info_
 Extract the information about the given node, and possible sub-nodes. More...
 
def set_node_permissions_
 Go throgh set of nodes and set the read/write permissions: More...
 
def install_data_ch_subscr_
 Set up data subscriptions for cfg. More...
 
def install_rpc_methods_
 Install callbacks for the defined RPC calls. More...
 
def data_change_handler
 Invoked when nodes to which there is subscribed, change value. More...
 
def get_node_prefix
 Extract the node prefix. More...
 
def gen_opcua_state_node_ids_
 
def execute
 Prepare for execution and execute the server. More...
 
def __init__
 Constructor, initializing the internal structures. More...
 
def srv
 Return reference to Device Simulator server instance. More...
 
def log
 Return reference to logger. More...
 
def setDeviceInfo
 Set the internal (firmware) information about the simulated device. More...
 
def init_device_parameters_
 Initialize various parameters of the simulated device. More...
 
def write_node
 Write a node in the internal OPC UA namespace. More...
 
def set_last_command
 Set the value of the simulated 'last command' node. More...
 
def state_machine
 Return reference to the internal state machine (engine). More...
 
def state_reg
 Return reference to the registry with mappings between state textual and numerical repr. More...
 
def set_opcua_state
 Set the state/substate of the simulated device in the OPC UA namespace. More...
 
def cfg
 Return reference to configuration object (NameMapping object). More...
 
def get_opcua_state
 Return the OPC UA state as tuple (<numerical val>="">,<string val>="">). More...
 
def opcua_server
 Return reference to the OPC UA server. More...
 
def getnodes
 Return the OPC UA nodes as a list. More...
 
def get_node_dic
 Return dictionary containing OPC UA nodes. More...
 
def get_node
 Return object for node with given ID. More...
 
def convert_node_value
 Convert an OPC UA node object value to a primitive value. More...
 
def schedule_event
 Schedule an event. More...
 
def get_node_value
 Get value of the node with the given ID. More...
 
def implement_rpc_call_
 Issue warning to implement code for RPC call. More...
 
def device_name
 Derive device name from the OPC UA profile (XML). More...
 
def gen_node_id_
 Returns tupple (<symbolic node="" id>="">, <numeric node="" id>="">|0). More...
 
def get_node_info_
 Extract the information about the given node, and possible sub-nodes. More...
 
def set_node_permissions_
 Go throgh set of nodes and set the read/write permissions: More...
 
def install_data_ch_subscr_
 Set up data subscriptions for cfg. More...
 
def install_rpc_methods_
 Install callbacks for the defined RPC calls. More...
 
def data_change_handler
 Invoked when nodes to which there is subscribed, change value. More...
 
def get_node_prefix
 Extract the node prefix. More...
 
def gen_opcua_state_node_ids_
 
def execute
 Prepare for execution and execute the server. More...
 

Static Public Attributes

string NODE_INFO_DESCRIPTION = "sDescription"
 
string NODE_INFO_NAME = "sName"
 
string NODE_INFO_PLATFORM = "sPlatform"
 
string NODE_INFO_SYNOPSIS = "sSynopsis"
 
string NODE_INFO_VERDATE = "sDate"
 
string NODE_INFO_VERSION_MAJOR = "nVersionMajor"
 
string NODE_INFO_VERSION_MINOR = "nVersionMinor"
 
int RPC_RET_OK = 0
 Common RPC return codes: More...
 
int RPC_RET_NOT_OP = -1
 
int RPC_RET_NOT_NOTOP_READY = -2
 
int RPC_RET_NOT_NOTOP_NOTREADY = -3
 

Detailed Description

Device Simulator base class.

All Device Simulators shall be derived from this.

Constructor & Destructor Documentation

def deviceSimulatorBase.DeviceSimulatorBase.__init__ (   self)

Constructor, initializing the internal structures.

def deviceSimulatorBase.DeviceSimulatorBase.__init__ (   self)

Constructor, initializing the internal structures.

Member Function Documentation

def deviceSimulatorBase.DeviceSimulatorBase.cfg (   self)

Return reference to configuration object (NameMapping object).

def deviceSimulatorBase.DeviceSimulatorBase.cfg (   self)

Return reference to configuration object (NameMapping object).

def deviceSimulatorBase.DeviceSimulatorBase.convert_node_value (   self,
  node 
)

Convert an OPC UA node object value to a primitive value.

def deviceSimulatorBase.DeviceSimulatorBase.convert_node_value (   self,
  node 
)

Convert an OPC UA node object value to a primitive value.

def deviceSimulatorBase.DeviceSimulatorBase.data_change_handler (   self,
  node,
  value,
  data 
)

Invoked when nodes to which there is subscribed, change value.

def deviceSimulatorBase.DeviceSimulatorBase.data_change_handler (   self,
  node,
  value,
  data 
)

Invoked when nodes to which there is subscribed, change value.

def deviceSimulatorBase.DeviceSimulatorBase.device_name (   self)

Derive device name from the OPC UA profile (XML).

def deviceSimulatorBase.DeviceSimulatorBase.device_name (   self)

Derive device name from the OPC UA profile (XML).

def deviceSimulatorBase.DeviceSimulatorBase.execute (   self,
  argv,
  action_mgr,
  data_object 
)

Prepare for execution and execute the server.

def deviceSimulatorBase.DeviceSimulatorBase.execute (   self,
  argv,
  action_mgr,
  data_object 
)

Prepare for execution and execute the server.

def deviceSimulatorBase.DeviceSimulatorBase.gen_node_id_ (   self,
  node 
)

Returns tupple (<symbolic node="" id>="">, <numeric node="" id>="">|0).

def deviceSimulatorBase.DeviceSimulatorBase.gen_node_id_ (   self,
  node 
)

Returns tupple (<symbolic node="" id>="">, <numeric node="" id>="">|0).

def deviceSimulatorBase.DeviceSimulatorBase.gen_opcua_state_node_ids_ (   self)
def deviceSimulatorBase.DeviceSimulatorBase.gen_opcua_state_node_ids_ (   self)
def deviceSimulatorBase.DeviceSimulatorBase.get_node (   self,
  node_id 
)

Return object for node with given ID.

def deviceSimulatorBase.DeviceSimulatorBase.get_node (   self,
  node_id 
)

Return object for node with given ID.

def deviceSimulatorBase.DeviceSimulatorBase.get_node_dic (   self)

Return dictionary containing OPC UA nodes.

def deviceSimulatorBase.DeviceSimulatorBase.get_node_dic (   self)

Return dictionary containing OPC UA nodes.

def deviceSimulatorBase.DeviceSimulatorBase.get_node_info_ (   self,
  node 
)

Extract the information about the given node, and possible sub-nodes.

def deviceSimulatorBase.DeviceSimulatorBase.get_node_info_ (   self,
  node 
)

Extract the information about the given node, and possible sub-nodes.

def deviceSimulatorBase.DeviceSimulatorBase.get_node_prefix (   self)

Extract the node prefix.

def deviceSimulatorBase.DeviceSimulatorBase.get_node_prefix (   self)

Extract the node prefix.

def deviceSimulatorBase.DeviceSimulatorBase.get_node_value (   self,
  node_id 
)

Get value of the node with the given ID.

def deviceSimulatorBase.DeviceSimulatorBase.get_node_value (   self,
  node_id 
)

Get value of the node with the given ID.

def deviceSimulatorBase.DeviceSimulatorBase.get_opcua_state (   self)

Return the OPC UA state as tuple (<numerical val>="">,<string val>="">).

def deviceSimulatorBase.DeviceSimulatorBase.get_opcua_state (   self)

Return the OPC UA state as tuple (<numerical val>="">,<string val>="">).

def deviceSimulatorBase.DeviceSimulatorBase.getnodes (   self)

Return the OPC UA nodes as a list.

def deviceSimulatorBase.DeviceSimulatorBase.getnodes (   self)

Return the OPC UA nodes as a list.

def deviceSimulatorBase.DeviceSimulatorBase.implement_rpc_call_ (   self,
  rpc_call 
)

Issue warning to implement code for RPC call.

def deviceSimulatorBase.DeviceSimulatorBase.implement_rpc_call_ (   self,
  rpc_call 
)

Issue warning to implement code for RPC call.

def deviceSimulatorBase.DeviceSimulatorBase.init_device_parameters_ (   self)

Initialize various parameters of the simulated device.

def deviceSimulatorBase.DeviceSimulatorBase.init_device_parameters_ (   self)

Initialize various parameters of the simulated device.

def deviceSimulatorBase.DeviceSimulatorBase.install_data_ch_subscr_ (   self)

Set up data subscriptions for cfg.

  • and ctrl.* nodes.
def deviceSimulatorBase.DeviceSimulatorBase.install_data_ch_subscr_ (   self)

Set up data subscriptions for cfg.

  • and ctrl.* nodes.
def deviceSimulatorBase.DeviceSimulatorBase.install_rpc_methods_ (   self)

Install callbacks for the defined RPC calls.

def deviceSimulatorBase.DeviceSimulatorBase.install_rpc_methods_ (   self)

Install callbacks for the defined RPC calls.

def deviceSimulatorBase.DeviceSimulatorBase.log (   self)

Return reference to logger.

def deviceSimulatorBase.DeviceSimulatorBase.log (   self)

Return reference to logger.

def deviceSimulatorBase.DeviceSimulatorBase.opcua_server (   self)

Return reference to the OPC UA server.

def deviceSimulatorBase.DeviceSimulatorBase.opcua_server (   self)

Return reference to the OPC UA server.

def deviceSimulatorBase.DeviceSimulatorBase.schedule_event (   self,
  event_obj,
  trigger 
)

Schedule an event.

def deviceSimulatorBase.DeviceSimulatorBase.schedule_event (   self,
  event_obj,
  trigger 
)

Schedule an event.

def deviceSimulatorBase.DeviceSimulatorBase.set_last_command (   self,
  command 
)

Set the value of the simulated 'last command' node.

def deviceSimulatorBase.DeviceSimulatorBase.set_last_command (   self,
  command 
)

Set the value of the simulated 'last command' node.

def deviceSimulatorBase.DeviceSimulatorBase.set_node_permissions_ (   self)

Go throgh set of nodes and set the read/write permissions:

Info Read-only. Cfg Read-write. Ctrl Read-write. Stat Read-only.

def deviceSimulatorBase.DeviceSimulatorBase.set_node_permissions_ (   self)

Go throgh set of nodes and set the read/write permissions:

Info Read-only. Cfg Read-write. Ctrl Read-write. Stat Read-only.

def deviceSimulatorBase.DeviceSimulatorBase.set_opcua_state (   self,
  state,
  substate 
)

Set the state/substate of the simulated device in the OPC UA namespace.

def deviceSimulatorBase.DeviceSimulatorBase.set_opcua_state (   self,
  state,
  substate 
)

Set the state/substate of the simulated device in the OPC UA namespace.

def deviceSimulatorBase.DeviceSimulatorBase.setDeviceInfo (   self,
  description,
  name,
  platform,
  synopsis,
  version_date,
  version_mejor,
  version_minor 
)

Set the internal (firmware) information about the simulated device.

def deviceSimulatorBase.DeviceSimulatorBase.setDeviceInfo (   self,
  description,
  name,
  platform,
  synopsis,
  version_date,
  version_mejor,
  version_minor 
)

Set the internal (firmware) information about the simulated device.

def deviceSimulatorBase.DeviceSimulatorBase.srv (   self)

Return reference to Device Simulator server instance.

def deviceSimulatorBase.DeviceSimulatorBase.srv (   self)

Return reference to Device Simulator server instance.

def deviceSimulatorBase.DeviceSimulatorBase.state_machine (   self)

Return reference to the internal state machine (engine).

def deviceSimulatorBase.DeviceSimulatorBase.state_machine (   self)

Return reference to the internal state machine (engine).

def deviceSimulatorBase.DeviceSimulatorBase.state_reg (   self)

Return reference to the registry with mappings between state textual and numerical repr.

def deviceSimulatorBase.DeviceSimulatorBase.state_reg (   self)

Return reference to the registry with mappings between state textual and numerical repr.

def deviceSimulatorBase.DeviceSimulatorBase.write_node (   self,
  node_id,
  value 
)

Write a node in the internal OPC UA namespace.

def deviceSimulatorBase.DeviceSimulatorBase.write_node (   self,
  node_id,
  value 
)

Write a node in the internal OPC UA namespace.

Member Data Documentation

string deviceSimulatorBase.DeviceSimulatorBase.NODE_INFO_DESCRIPTION = "sDescription"
static
string deviceSimulatorBase.DeviceSimulatorBase.NODE_INFO_NAME = "sName"
static
string deviceSimulatorBase.DeviceSimulatorBase.NODE_INFO_PLATFORM = "sPlatform"
static
string deviceSimulatorBase.DeviceSimulatorBase.NODE_INFO_SYNOPSIS = "sSynopsis"
static
string deviceSimulatorBase.DeviceSimulatorBase.NODE_INFO_VERDATE = "sDate"
static
string deviceSimulatorBase.DeviceSimulatorBase.NODE_INFO_VERSION_MAJOR = "nVersionMajor"
static
string deviceSimulatorBase.DeviceSimulatorBase.NODE_INFO_VERSION_MINOR = "nVersionMinor"
static
int deviceSimulatorBase.DeviceSimulatorBase.RPC_RET_NOT_NOTOP_NOTREADY = -3
static
int deviceSimulatorBase.DeviceSimulatorBase.RPC_RET_NOT_NOTOP_READY = -2
static
int deviceSimulatorBase.DeviceSimulatorBase.RPC_RET_NOT_OP = -1
static
int deviceSimulatorBase.DeviceSimulatorBase.RPC_RET_OK = 0
static

Common RPC return codes:


The documentation for this class was generated from the following files: