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.
The CDB Simulated Components are a quick way to make a component available for development and testing. They could be used to prototype basic functionality and to mock-up components in order to prepare module tests which need to interact with other components.
Create a module for the tests that are going to be performed:
Put the IDL file:
Configure the Manager in the CDB:
Configure the Component in the CDB:
Prepare the Makefile:
Add the following to IDL entry:
Generate code stubs and skeletons:
The simulation code needs to be put in the CDB:
A simple client could be prepared:
Start ACS:
On a different console start pyContainer:
Execute objexp or the client in a third console:
The expected behavior is that no error is shown in "Console 3" and "Console 2 shold have the following output:
2020-07-25T23:27:14.390 INFO [acsStartContainer] Running the container with these arguments: 'ACSStartContainerPy pyContainer -ORBendPoint giop:tcp:127.0.1.1:4000 -m corbaloc::127.0.1.1:3000/Manager' ContainerStatusMsg: Startup begins 2020-07-25T23:27:14.997 AlarmSystemInterfaceFactory init - Using ACS alarm system ContainerStatusMsg: ORB initialization begins ContainerStatusMsg: ORB initialization ends ContainerStatusMsg: Manager access initialization begins ContainerStatusMsg: Manager access initialization ends ContainerStatusMsg: Automatic component loading begins 2020-07-25T23:27:15.042 pyContainer taggedmessage - Info message from the manager: Startup statistics: 0 components queued to be activated. 2020-07-25T23:27:15.114 pyContainer taggedmessage - Info message from the manager: Startup statistics: 0 of 0 components activated. ContainerStatusMsg: Automatic component loading ends ContainerStatusMsg: Ready 2020-07-25T23:27:15.180 pyContainer getCDBInfo - No container information found in the CDB 2020-07-25T23:27:15.284 pyContainer __init__ - Container pyContainer waiting for requests 2020-07-25T23:27:15.289 pyContainer __init__ - Container pyContainer used libraries from /home/almamgr/mod/src/../lib/python/site-packages/:/alma/ACS-2020AUG/ACSSW/lib/python/site-packages: ContainerStatusMsg: Startup ends 2020-07-25T23:27:18.076 pyContainer activate_component_async - Starting async activation of MOUNT(type IDL:alma/workshop/MountExample:1.0) 2020-07-25T23:27:18.080 pyContainer run - Activating MOUNT (type IDL:alma/workshop/MountExample:1.0) 2020-07-25T23:27:18.083 pyContainer aboutToActivate - The container is asking the clearance to activate MOUNT 2020-07-25T23:27:18.084 pyContainer _aboutToProcess - The container is not dealing with MOUNT: the operation can go ahead 2020-07-25T23:27:18.111 pyContainer aboutToActivate - The container has been cleared to activate MOUNT 2020-07-25T23:27:18.658 loggingts -- Successfully loaded component code. [ logName=LOG_CompAct_Loading_OK TimeMillis=538 CompName=MOUNT ] 2020-07-25T23:27:18.974 loggingts -- Successfully instantiated component. [ logName=LOG_CompAct_Instance_OK TimeMillis=306 CompName=MOUNT ] 2020-07-25T23:27:19.487 Servants.Representations.Dynamic.Dynamic'>(MOUNT) __initialize - Simulated lifecyle method 2020-07-25T23:27:19.488 Servants.Executor _execute - initialize return value looks like:None of type:<class 'NoneType'> 2020-07-25T23:27:19.489 EventDispatcher (MOUNT) setupEventDispatching - Setting up event dispatching. 2020-07-25T23:27:19.494 EventDispatcher (MOUNT) setupEventDispatching - No CDB entry found. Bailing. 2020-07-25T23:27:19.691 loggingts -- Successfully activated component with Corba. [ logName=LOG_CompAct_Corba_OK TimeMillis=0 CompName=MOUNT ] 2020-07-25T23:27:19.692 loggingts -- Successfully initialized component. [ logName=LOG_CompAct_Init_OK TimeMillis=0 CompName=MOUNT ] 2020-07-25T23:27:19.696 pyContainer activate_component - Activated component: MOUNT 2020-07-25T23:27:19.766 pyContainer activate_component - Component 'MOUNT' has KeepAliveTime '0'. 2020-07-25T23:27:19.771 pyContainer activated - The container terminated the activation of MOUNT: awakening waiting threads 2020-07-25T23:27:19.775 pyContainer _processTerminated - The container terminated dealing with MOUNT 2020-07-25T23:27:19.778 pyContainer run - Calling maci::CBComponentInfo::done with descOut.id_tag = 1 for 'MOUNT' 2020-07-25T23:27:19.889 pyContainer run - Call to maci::CBComponentInfo::done with descOut.id_tag = 1 for 'MOUNT' completed 2020-07-25T23:27:19.922 Servants.Representations.Dynamic.Dynamic'>(MOUNT) __handleNormalMethod - Method:objfix 2020-07-25T23:27:19.930 Servants.Representations.Dynamic.Dynamic'>(MOUNT) getMethod - retVal looks like:objfix {'Value': [None], 'Timeout': 0.2} 2020-07-25T23:27:20.132 Servants.Executor _executeList - Failed to evaluate the 'None' statement! 2020-07-25T23:27:20.132 Servants.Executor _execute - objfix return value looks like:None of type:<class 'NoneType'> 2020-07-25T23:27:20.189 pyContainer aboutToDeactivate - The container is asking the clearance to deactivate MOUNT 2020-07-25T23:27:20.203 pyContainer _aboutToProcess - The container is not dealing with MOUNT: the operation can go ahead 2020-07-25T23:27:20.204 pyContainer aboutToDeactivate - The container has been cleared to activate MOUNT 2020-07-25T23:27:20.204 pyContainer deactivate_component - Deactivating component: MOUNT 2020-07-25T23:27:20.205 Servants.Representations.Dynamic.Dynamic'>(MOUNT) __cleanUp - Simulated lifecyle method 2020-07-25T23:27:20.206 Servants.Executor _execute - cleanUp return value looks like:None of type:<class 'NoneType'> 2020-07-25T23:27:20.208 pyContainer deactivated - The container terminated the deactivation of MOUNT: awakening waiting threads 2020-07-25T23:27:20.211 pyContainer _processTerminated - The container terminated dealing with MOUNT