ifw-fcf  5.0.0-pre2
Public Member Functions | Public Attributes | List of all members
Device.Device Class Reference

Test library for testing devices business logic. More...

Inheritance diagram for Device.Device:
Actuator.Actuator Lamp.Lamp Motor.Motor Piezo.Piezo Shutter.Shutter Timer.Timer Adc.Adc Drot.Drot

Public Member Functions

def __init__ (self, server, ns, name, program="MAIN")
 server OPC UA Server url, e.g. More...
 
def debug (self, msg)
 
def call_rpc_async (self, rpc, *args)
 Function used to connect, execute RPC call and then disconnect. More...
 
def call_rpc (self, rpc, *args)
 
def ctrl_reset (self)
 
def ctrl_reset (self)
 
def ctrl_init (self)
 
def ctrl_init (self)
 
def ctrl_enable (self)
 
def ctrl_disable (self)
 
def ctrl_stop (self)
 

Public Attributes

 server
 

Detailed Description

Test library for testing devices business logic.

Constructor & Destructor Documentation

◆ __init__()

def Device.Device.__init__ (   self,
  server,
  ns,
  name,
  program = "MAIN" 
)

server OPC UA Server url, e.g.

'opc.tcp://134.171.12.217:4840' ns OPC UA Name Space of the device, for Beckhoff it is currently 4 name Device Name, e.g. 'Lamp1' Example of Node Id: ns=4;s=Objects.PLC1.MAIN.Lamp1

Reimplemented in Timer.Timer, Motor.Motor, Drot.Drot, and Adc.Adc.

Member Function Documentation

◆ call_rpc()

def Device.Device.call_rpc (   self,
  rpc,
args 
)

◆ call_rpc_async()

def Device.Device.call_rpc_async (   self,
  rpc,
args 
)

Function used to connect, execute RPC call and then disconnect.

It takes a variable number of parameters. For example,

  • Lamp RPC_On need intensity as additional parameter.
  • Motor Move needs position and velocity, etc

◆ ctrl_disable()

def Device.Device.ctrl_disable (   self)

Reimplemented in Timer.Timer.

◆ ctrl_enable()

def Device.Device.ctrl_enable (   self)

Reimplemented in Timer.Timer.

◆ ctrl_init() [1/2]

def Device.Device.ctrl_init (   self)

Reimplemented in Timer.Timer.

◆ ctrl_init() [2/2]

def Device.Device.ctrl_init (   self)

Reimplemented in Timer.Timer.

◆ ctrl_reset() [1/2]

def Device.Device.ctrl_reset (   self)

Reimplemented in Timer.Timer.

◆ ctrl_reset() [2/2]

def Device.Device.ctrl_reset (   self)

Reimplemented in Timer.Timer.

◆ ctrl_stop()

def Device.Device.ctrl_stop (   self)

Reimplemented in Timer.Timer.

◆ debug()

def Device.Device.debug (   self,
  msg 
)

Member Data Documentation

◆ server

Device.Device.server

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