diff options
author | Wolfgang Draxinger <Wolfgang.Draxinger@draxit.de> | 2011-11-02 17:37:56 +0100 |
---|---|---|
committer | Wolfgang Draxinger <Wolfgang.Draxinger@draxit.de> | 2011-11-02 17:37:56 +0100 |
commit | 40c7b3ed075246b352b98c46869d4293af309606 (patch) | |
tree | 7109b992561529593fcf862f4b12175bec0c0541 | |
parent | e5d6d9f80723394fe4ca859aeca2ae55af668e95 (diff) | |
download | PyPhytron-40c7b3ed075246b352b98c46869d4293af309606.tar.gz PyPhytron-40c7b3ed075246b352b98c46869d4293af309606.tar.bz2 |
Axis name assignment
-rw-r--r-- | Phytron.py | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -25,9 +25,10 @@ class ParameterLimitsError(exceptions.ValueError): pass class Axis: - def __init__(self, ipcomm, ID): + def __init__(self, ipcomm, ID, name = None): self.ipcomm = ipcomm self.ID = ID + self.name = name def execute(self, cmd): result = self.ipcomm.execute(self.ID, cmd) @@ -69,14 +70,14 @@ class Status: INITIATOR_P = (1<<1) RUNNING = (1<<0) def __init__(self, bitvector): - self.coldboot = not not (bitvector & (1<<7)) - self.any_error = not not (bitvector & (1<<6)) - self.rx_error = not not (bitvector & (1<<5)) - self.SFI_error = not not (bitvector & (1<<4)) - self.outputstage_error = not not (bitvector & (1<<3)) - self.initiator_m = not not (bitvector & (1<<2)) - self.initiator_p = not not (bitvector & (1<<1)) - self.running = not not (bitvector & (1<<0)) + self.coldboot = not not (bitvector & Status.COLDBOOT) + self.any_error = not not (bitvector & Status.ANY_ERROR) + self.rx_error = not not (bitvector & Status.RX_ERROR) + self.SFI_error = not not (bitvector & Status.SFI_ERROR) + self.outputstage_error = not not (bitvector & Status.OUTPUTSTAGE_ERROR) + self.initiator_m = not not (bitvector & Status.INITIATOR_M) + self.initiator_p = not not (bitvector & Status.INITIATOR_P) + self.running = not not (bitvector & Status.RUNNING) def __str__(self): status = list() |