Information
We are currently investigating an issue with the editor of some pages. Please save your work and avoid to create new pages until this banner is gone.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
from Acspy.Clients.SimpleClient import PySimpleClient client = PySimpleClient() compName = 'CLOCKTEST' compInfo = cclient.availableComponents(compName) if len(compInfo) != 1: print("Problem with the component: there should be one definition.") compInfo = compInfo[0] if not compInfo.reference is None: print("Problem with the component: it is already active.") if len(compInfo.clients) > 0: print("Problem with the component: someone already has a reference to it.") clock = client.getComponent(compName) compInfo = cclient.availableComponents(compName)[0] if compInfo.reference is None: print("Problem with the component: it should have been activated.") if len(compInfo.clients) != 1: print("Problem with the component: it has not been activated or more than one component/client have a reference to it.") client.releaseComponent(clock.name) compInfo = cclient.availableComponents(compName)[0] if not compInfo.reference is None: print("Problem with the component: it should have been deactivated.") if len(compInfo.clients) > 0: print("Problem with the component: someone still has a reference to it.") |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
from Acspy.Clients.SimpleClient import PySimpleClient client = PySimpleClient() compName = 'CLOCKTEST' compInfo = cclient.availableComponents(compName) if len(compInfo) != 1: print("Problem with the component: there should be one definition.") compInfo = compInfo[0] if not compInfo.reference is None: print("Problem with the component: it is already active.") if len(compInfo.clients) > 0: print("Problem with the component: someone already has a reference to it.") clock = client.getDefaultComponent('IDL:alma/acstime/Clock:1.0') compInfo = cclient.availableComponents(compName)[0] if compInfo.reference is None: print("Problem with the component: it should have been activated.") if len(compInfo.clients) != 1: print("Problem with the component: it has not been activated or more than one component/client have a reference to it.") client.releaseComponent(clock.name) compInfo = cclient.availableComponents(compName)[0] if not compInfo.reference is None: print("Problem with the component: it should have been deactivated.") if len(compInfo.clients) > 0: print("Problem with the component: someone still has a reference to it.") |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
from Acspy.Clients.SimpleClient import PySimpleClient client = PySimpleClient() compName = 'CLOCKTEST' compInfo = cclient.availableComponents(compName) if len(compInfo) != 1: print("Problem with the component: there should be one definition.") compInfo = compInfo[0] if not compInfo.reference is None: print("Problem with the component: it is already active.") if len(compInfo.clients) > 0: print("Problem with the component: someone already has a reference to it.") tmp = client.getComponent(compName) compInfo = cclient.availableComponents(compName)[0] if compInfo.reference is None: print("Problem with the component: it should have been activated.") if len(compInfo.clients) != 1: print("Problem with the component: it has not been activated or more than one component/client have a reference to it.") clock = client.getComponentNonSticky(compName) compInfo = cclient.availableComponents(compName)[0] if len(compInfo.clients) != 1: print("Problem with the component: it has not been activated or more than one component/client have a reference to it.") client.releaseComponent(tmp.name) compInfo = cclient.availableComponents(compName)[0] if not compInfo.reference is None: print("Problem with the component: it should have been deactivated.") if len(compInfo.clients) > 0: print("Problem with the component: someone still has a reference to it.") |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
from Acspy.Clients.SimpleClient import PySimpleClient client = PySimpleClient() compName = 'CLOCKTEST' compType = 'IDL:alma/acstime/Clock:1.0' container = bilboContainer compInfo = cclient.availableComponents(compName) if len(compInfo) != 0: print("Problem with the component: there shouldn't be any definition.") clock = client.getDynamicComponent(compName, '*', compType, container) compInfo = cclient.availableComponents(compName) if len(compInfo) != 1: print("Problem with the component: there should be one definition.") compInfo = compInfo[0] if compInfo.reference is None: print("Problem with the component: it should have been activated.") if len(compInfo.clients) != 1: print("Problem with the component: it has not been activated or more than one component/client have a reference to it.") client.releaseComponent(clock.name) compInfo = cclient.availableComponents(compName)[0] if not compInfo.reference is None: print("Problem with the component: it should have been deactivated.") if len(compInfo.clients) > 0: print("Problem with the component: someone still has a reference to it.") |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
from Acspy.Clients.SimpleClient import PySimpleClient client = PySimpleClient() compName = 'CLOCKTEST' compInfo = cclient.availableComponents(compname) if len(compInfo) != 1: print("Problem with the component: there should be one definition.") compInfo = compInfo[0] if compInfo.reference is None: print("Problem with the component: It should be already active.") if len(compInfo.clients) != 1: print("Problem with the component: There should be only one reference to it.") if compInfo.clients[0] != 83886080: print("Problem with the component: The manager should have a reference to it.") clock = client.getComponent(compName) compInfo = cclient.availableComponents(compName)[0] if len(compInfo.clients) != 2: print("Problem with the component: There should be 2 references; 1 from manager and the other from our client.") client.releaseComponent(clock.name) compInfo = c.availableComponents(compName)[0] if compInfo.reference is None: print("Problem with the component: It shouldn't be deactivated.") if len(compInfo.clients) != 1: print("Problem with the component: Only the Manager should have a reference to it.") |
...