hlcc 2.0.0-beta2+pre1
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
taurusdartboard.TaurusDartBoard Class Reference

DartBoard implementation that uses Taurus to get the Target and Current positions to from two different models, each one of them an array of two doubles radians. More...

Inheritance diagram for taurusdartboard.TaurusDartBoard:

Public Member Functions

def __init__ (self, parent=None, *args, **kwargs)
 Initializer for TaurusDartBoard.
 
bool isReadOnly (self)
 Overrides TaurusBaseComponent.isReadOnly.
 
def handleEvent (self, Attribute evt_src, TaurusEventType evt_type, evt_val)
 Overrides TaurusBaseComponent.handleEvent.
 
def setTargetModel (self, new_model)
 Setter for target_model property.
 

Protected Attributes

 _target_model
 
 _target_attribute
 

Detailed Description

DartBoard implementation that uses Taurus to get the Target and Current positions to from two different models, each one of them an array of two doubles radians.

model -> Current position target_model -> Target Position

Constructor & Destructor Documentation

◆ __init__()

def taurusdartboard.TaurusDartBoard.__init__ (   self,
  parent = None,
args,
**  kwargs 
)

Initializer for TaurusDartBoard.

Member Function Documentation

◆ handleEvent()

def taurusdartboard.TaurusDartBoard.handleEvent (   self,
Attribute  evt_src,
TaurusEventType  evt_type,
  evt_val 
)

Overrides TaurusBaseComponent.handleEvent.

Since we have now two models, each one generates a subscription to its own Attribute. Every time a new event is generated by the Attribute, this method is called.

Normally, only one evt_src (the Attribute name) would call this method, but since we have two Attributes (one for model, another for target_model) we have to distinguish between evt_src to update the adequete properties in the widget.

Let's remember that the QeDartBoard widget has for properties of interest:

- targetAlt
- targetAz
- currentAlt
- currentAz

So when the evt_src == target_model, then we update

- targetAlt
- targetAz

and when evt_src == model, then we update

- currentAlt
- currentAz
Parameters
[in]evt_srcName of the Attribute that generates the event
[in]evt_typeType of Event according to taurus.core.taurusbasetypes.TaurusEventType
[in]evt_valValue of the event

◆ isReadOnly()

bool taurusdartboard.TaurusDartBoard.isReadOnly (   self)

Overrides TaurusBaseComponent.isReadOnly.

Indicates that the widget is a read only widget.

◆ setTargetModel()

def taurusdartboard.TaurusDartBoard.setTargetModel (   self,
  new_model 
)

Setter for target_model property.

This should point to a Taurus Model that is an array of two double radians.

Sets the model used to get the values for the Target Altitude and Azimuth properties on the QeDartBoard.

It also creates the Attribute for that model.

Parameters
[in]new_modelString that contains a URI for the Taurus Model.

Member Data Documentation

◆ _target_attribute

taurusdartboard.TaurusDartBoard._target_attribute
protected

◆ _target_model

taurusdartboard.TaurusDartBoard._target_model
protected

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