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:
Code Block |
---|
> getTemplateForDirectory MODROOT_WS sim_comp
> cd sim_comp/test
> mkdir -p CDB/MACI/Components
> mkdir -p CDB/MACI/Managers/Manager |
Put the IDL file:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
#ifndef _MOUNT_EXAMPLE_IDL_
#define _MOUNT_EXAMPLE_IDL_
#include <acscomponent.idl>
#pragma prefix "alma"
module ACS_COURSE
{
interface MountExample : ACS::ACSComponent {
void objfix (in double az, in double elev);
};
};
#endif |
Configure the Manager in the CDB:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<Manager xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0" xmlns="urn:schemas-cosylab-com:Manager:1.0" xmlns:log="urn:schemas-cosylab-com:LoggingConfig:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Timeout="50.0" ContainerPingInterval="20.0">
<Startup> </Startup>
<ServiceComponents>
<cdb:e string="Log"/>
<cdb:e string="LogFactory"/>
<cdb:e string="NotifyEventChannelFactory"/>
<cdb:e string="InterfaceRepository"/>
<cdb:e string="CDB"/>
<cdb:e string="ACSLogSvc"/>
</ServiceComponents>
<LoggingConfig>
<log:e Name="jacorb@Manager" minLogLevel="5" minLogLevelLocal="5"/>
</LoggingConfig>
</Manager> |
Configure the Component in the CDB:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<Components xmlns="urn:schemas-cosylab-com:Components:1.0" xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0" xmlns:baci="urn:schemas-cosylab-com:BACI:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<e Name="MOUNT" Code="Acssim.Servants.Simulator"
Type="IDL:alma/ACS_COURSE/MountExample:1.0"
Container="pyContainer"
ImplLang="py"/>
</Components> |