diff options
Diffstat (limited to 'modules/CIAO/ciao/ComponentServer/CIAO_ServerResources.idl')
-rw-r--r-- | modules/CIAO/ciao/ComponentServer/CIAO_ServerResources.idl | 269 |
1 files changed, 269 insertions, 0 deletions
diff --git a/modules/CIAO/ciao/ComponentServer/CIAO_ServerResources.idl b/modules/CIAO/ciao/ComponentServer/CIAO_ServerResources.idl new file mode 100644 index 00000000000..751569143c0 --- /dev/null +++ b/modules/CIAO/ciao/ComponentServer/CIAO_ServerResources.idl @@ -0,0 +1,269 @@ +// $Id$ + +/** + * @file CIAO_ServerResources.idl + * + * @brief A collection of IDL data types for + * + * @author Nanbor Wang + */ + +#if !defined (CIAO_SERVERRESOURCES_IDL) +#define CIAO_SERVERRESOURCES_IDL + +#include <orb.idl> + +module CIAO +{ + module Deployment + { + /** + * @brief A single command line argument corresponds to a string as + * in the case of "argv". + */ + typedef string CommandlineArg; + /** + * @brief A list of command line arguments which a + * NodeApplicationManager will use to start up the NodeApplication + * this list is associated to. The command line arguments will be + * appended to the command line in order. + */ + typedef sequence<CommandlineArg> CommandlineArgs; + + /** + * @brief A string containing the filename of the svc.conf file the + * NodeApplication uses. The current approach of specifying + * svc.conf filename directly some harder problems such as + * distribution of svc.conf files and the relative/absolute path to + * the svc.conf file (the ServerResrouces xml document will have to + * assume the svc.conf file will be available at specific location.) + */ + typedef string SvcconfURI; + + /** + * @brief enumeration of ORB Resource Types (ORT) supported in RT + * extension. + */ + enum ORBResourceType + { + ORT_THREADPOOL, + ORT_THREADPOOLWITHLANES, + ORT_CONNECTIONBANDS + }; + + typedef short Priority; + + /** + * @brief Define a threadpool resource that an ORB must provide + */ + struct ORS_Threadpool + { + string Id; + unsigned long stacksize; + unsigned long static_threads; + unsigned long dynamic_threads; + Priority default_priority; + boolean allow_request_buffering; + unsigned long max_buffered_requests; + unsigned long max_request_buffer_size; + }; + + typedef sequence<ORS_Threadpool> ORS_ThreadpoolSeq; + + /** + * @brief Defines the configuration of a threadpool lane. We need + * to redefine it here to avoid dependency to RTCORBA library. + */ + struct ORS_ThreadpoolLane + { + Priority lane_priority; + unsigned long static_threads; + unsigned long dynamic_threads; + }; + + /** + * @brief Defines a set of threadpool lanes. We need + * to redefine it here to avoid dependency to RTCORBA library. + */ + typedef sequence<ORS_ThreadpoolLane> ORS_ThreadpoolLanes; + + /** + * @brief Defines a Threadpool with Lanes resource that an ORB + * must provide. + */ + struct ORS_ThreadpoolWithLanes + { + string Id; + unsigned long stacksize; + ORS_ThreadpoolLanes threadpool_lanes; + boolean allow_borrowing; + boolean allow_request_buffering; + unsigned long max_buffered_requests; + unsigned long max_request_buffer_size; + }; + + typedef sequence<ORS_ThreadpoolWithLanes> ORS_ThreadpoolWithLanesSeq; + + /** + * @brief Define a priority band for BandedConnection policies. + */ + struct ORS_PriorityBand + { + Priority low; + Priority high; + }; + /** + * @brief Define a list of priority bands for BandedConnection + * policies. + */ + typedef sequence<ORS_PriorityBand> ORS_PriorityBands; + + /** + * @brief Define the information needed to create a + * BandedConnection policy. This info can be referred to via its + * name (Id). + */ + struct ORS_ConnectionBands + { + string Id; + ORS_PriorityBands bands; + }; + + typedef sequence<ORS_ConnectionBands> ORS_ConnectionBandsSeq; + + /** + * @brief Collection of resources managed by the NodeApplication + * ORB. + */ + struct ORBResource + { + ORS_ThreadpoolSeq threadpool_list; + + ORS_ThreadpoolWithLanesSeq threadpool_with_lanes_list; + + ORS_ConnectionBandsSeq connection_bands_list; + }; + + typedef sequence<ORBResource, 1> ORBResources; + + // ================================================================= + + /** + * @brief PolicyType supported by DAnCE extension. Again, we are + * redefining these value to avoid dependencies to various ORB + * modules such as RTCORBA and DiffServ policy libraries. + * @JW This is a bad thing to redefine. Maybe we have to make a seperate + * IDL lib for these libraries, but redefinition is really a bad thing + */ + const CORBA::PolicyType PRIORITY_MODEL_POLICY_TYPE = 40; + const CORBA::PolicyType THREADPOOL_POLICY_TYPE = 41; + const CORBA::PolicyType PRIORITY_BANDED_CONNECTION_POLICY_TYPE = 45; + const CORBA::PolicyType CLIENT_NETWORK_PRIORITY_TYPE = 86; + const CORBA::PolicyType NETWORK_PRIORITY_TYPE = 87; + + enum PriorityModel + { + CLIENT_PROPAGATED, + SERVER_DECLARED + }; + + enum NWPriorityModel + { + CLIENT_PROPAGATED_NWPRIORITY, + SERVER_DECLARED_NWPRIORITY + }; + + /** + * @brief Defines data required for creating a PriorityModel Policy + */ + struct PriorityModelPolicyDef + { + PriorityModel priority_model; + Priority server_priority; + }; + + /** + * @brief Defines data required for creating a server side DiffServ policy + */ + struct NWPriorityModelPolicyDef + { + NWPriorityModel nw_priority_model; + long request_dscp; + long reply_dscp; + }; + + /** + * @brief Defines data required for creating a client side DiffServ policy + */ + struct CNWPriorityModelPolicyDef + { + long request_dscp; + long reply_dscp; + }; + + /** + * @brief Define data required for creating a Threadpool policy + */ + struct ThreadpoolPolicyDef + { + /// Threadpool name defined in ORBResource + string Id; + }; + + /** + * @brief Define data required for creating a PriorityBandedConnection + * policy + */ + struct PriorityBandedConnectionPolicyDef + { + /// PriorityBands name defined in ORBResource + string Id; + }; + + union PolicyDef switch (CORBA::PolicyType) + { + case PRIORITY_MODEL_POLICY_TYPE: PriorityModelPolicyDef PriorityModelDef; + case THREADPOOL_POLICY_TYPE: ThreadpoolPolicyDef ThreadpoolDef; + case PRIORITY_BANDED_CONNECTION_POLICY_TYPE: PriorityBandedConnectionPolicyDef PriorityBandedConnectionDef; + case CLIENT_NETWORK_PRIORITY_TYPE: CNWPriorityModelPolicyDef CNWPriorityModelDef; + case NETWORK_PRIORITY_TYPE: NWPriorityModelPolicyDef NWPriorityModelDef; + }; + + /** + * @brief Define a set of policy definitions. + */ + typedef sequence<PolicyDef> PolicyDefs; + + /** + * @brief A policy set is named. + */ + struct PolicySet + { + /// Name of this policy set + string Id; + PolicyDefs policies; + }; + + /** + * @brief A list of all policy sets. + */ + typedef sequence<PolicySet> PolicySets; + + struct ORBConfigs + { + ORBResources orb_resources; + PolicySets policy_set; + }; + + struct ServerResource + { + string Id; + + CommandlineArgs args; + SvcconfURI svcconf; + ORBConfigs orb_config; + }; + }; +}; + +#endif /* CIAO_SERVERRESOURCES_IDL */ |