Package SpecClient :: Module SpecMotor :: Class SpecMotorA
[hide private]
[frames] | no frames]

Class SpecMotorA

source code

SpecMotorA class

Instance Methods [hide private]
 
__init__(self, specName=None, specVersion=None, callbacks={})
Constructor
source code
 
connectToSpec(self, specName, specVersion)
Connect to a remote Spec
source code
 
__connected(self)
Private callback triggered by a 'connected' event from Spec.
source code
 
connected(self)
Callback triggered by a 'connected' event from Spec
source code
 
__disconnected(self)
Private callback triggered by a 'disconnected' event from Spec
source code
 
disconnected(self)
Callback triggered by a 'disconnected' event from Spec
source code
 
signChanged(self, sign) source code
 
motorOffsetChanged(self, offset) source code
 
_motorLimitsChanged(self) source code
 
motorLimitsChanged(self)
Callback triggered by a 'low_limit' or a 'high_limit' channel update, or when the sign or offset for motor changes
source code
 
motorMoveDone(self, channelValue)
Callback triggered when motor starts or stops moving
source code
 
__motorLimitHit(self, channelValue, channelName)
Private callback triggered by a 'low_lim_hit' or a 'high_lim_hit' channel update
source code
 
__motorPositionChanged(self, absolutePosition) source code
 
motorPositionChanged(self, absolutePosition)
Callback triggered by a position channel update
source code
 
setOffset(self, offset)
Set the motor offset value
source code
 
getOffset(self) source code
 
getSign(self) source code
 
__syncQuestion(self, channelValue)
Callback triggered by a 'sync_check' channel update
source code
 
syncQuestionAnswer(self, specSteps, controllerSteps)
Answer to the sync.
source code
 
__motorUnusable(self, unusable)
Private callback triggered by a 'unusable' channel update
source code
 
__changeMotorState(self, state)
Private method for changing the SpecMotor object's internal state
source code
 
motorStateChanged(self, state)
Callback to take into account a motor state update
source code
 
move(self, absolutePosition)
Move the motor to the required position
source code
 
moveRelative(self, relativePosition) source code
 
moveToLimit(self, limit) source code
 
stop(self)
Stop the current motor
source code
 
stopMoveToLimit(self) source code
 
getParameter(self, param) source code
 
setParameter(self, param, value) source code
 
getPosition(self)
Return the current position of the motor.
source code
 
getState(self)
Return the current motor state.
source code
 
getLimits(self)
Return a (low limit, high limit) tuple in user units.
source code
 
getDialPosition(self)
Return the motor dial position.
source code
Method Details [hide private]

__init__(self, specName=None, specVersion=None, callbacks={})
(Constructor)

source code 

Constructor

Keyword arguments: specName -- name of the motor in Spec (defaults to None) specVersion -- 'host:port' string representing a Spec server to connect to (defaults to None)

connectToSpec(self, specName, specVersion)

source code 

Connect to a remote Spec

Connect to Spec and register channels of interest for the specified motor

Arguments: specName -- name of the motor in Spec specVersion -- 'host:port' string representing a Spec server to connect to

connected(self)

source code 

Callback triggered by a 'connected' event from Spec

To be extended by derivated classes.

__disconnected(self)

source code 

Private callback triggered by a 'disconnected' event from Spec

Put the motor in NOTINITIALIZED state.

disconnected(self)

source code 

Callback triggered by a 'disconnected' event from Spec

To be extended by derivated classes.

motorLimitsChanged(self)

source code 

Callback triggered by a 'low_limit' or a 'high_limit' channel update, or when the sign or offset for motor changes

To be extended by derivated classes.

motorMoveDone(self, channelValue)

source code 

Callback triggered when motor starts or stops moving

Change the motor state accordingly.

Arguments: channelValue -- value of the channel

__motorLimitHit(self, channelValue, channelName)

source code 

Private callback triggered by a 'low_lim_hit' or a 'high_lim_hit' channel update

Update the motor state accordingly.

Arguments: channelValue -- value of the channel channelName -- name of the channel (either 'low_lim_hit' or 'high_lim_hit')

motorPositionChanged(self, absolutePosition)

source code 

Callback triggered by a position channel update

To be extended by derivated classes.

Arguments: absolutePosition -- motor absolute position

__syncQuestion(self, channelValue)

source code 

Callback triggered by a 'sync_check' channel update

Call the self.syncQuestionAnswer method and reply to the sync. question.

Arguments: channelValue -- value of the channel

syncQuestionAnswer(self, specSteps, controllerSteps)

source code 

Answer to the sync. question

Return either '1' (YES) or '0' (NO)

Arguments: specSteps -- steps measured by Spec controllerSteps -- steps indicated by the controller

__motorUnusable(self, unusable)

source code 

Private callback triggered by a 'unusable' channel update

Update the motor state accordingly

Arguments: unusable -- value of the channel

__changeMotorState(self, state)

source code 

Private method for changing the SpecMotor object's internal state

Arguments: state -- the motor state

motorStateChanged(self, state)

source code 

Callback to take into account a motor state update

To be extended by derivated classes

Arguments: state -- the motor state

move(self, absolutePosition)

source code 

Move the motor to the required position

Arguments: absolutePosition -- position to move to

stop(self)

source code 

Stop the current motor

Send an 'abort' message to the remote Spec