| /////////////////////////////////////////////////////////////////////////////// |
| // // |
| // Copyright (c) 2000-2019 Ericsson Telecom AB // |
| // // |
| // All rights reserved. This program and the accompanying materials // |
| // are made available under the terms of the Eclipse Public License v2.0 // |
| // which accompanies this distribution, and is available at // |
| // https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html // |
| /////////////////////////////////////////////////////////////////////////////// |
| |
| /////////////////////////////////////////////////////////// |
| // Module: EPTF_CLL_PoolMgmt_Definitions |
| // |
| // Purpose: |
| // This module provides types for various pool variables. |
| // |
| // Module Parameters: |
| // (none) |
| // |
| // Module depends on: |
| // - |
| // Current Owner: |
| // Gabor Ziegler (egbozie) |
| // |
| // Last Review Date: |
| // 2007-06-20 |
| // |
| // Detailed Comments: |
| // This module contains types for pool variables. |
| // This file should be included into the module, where the |
| // base type of the pool is known and the pool is to be created. |
| // |
| /////////////////////////////////////////////////////////// |
| |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_POOLTYPE |
| // |
| // Purpose: |
| // The user defined TTCN-3 type that the generic pool vector is built from. |
| // This type is not part of the EPTF PoolMgmt, but should be defined by |
| // the user of EPTF_PoolMgmt. |
| // |
| // Elements: |
| // User defined. |
| // |
| // Detailed Comments: |
| // To create a pool from any user defined type <EPTF_POOLTYPE> the |
| // following TTCN-3 code should be inserted into one of the the user modules: |
| // |
| // #define EPTF_POOLTYPE <EPTF_POOLTYPE> |
| // |
| // //instantiate the code |
| // |
| // #include "EPTF_CLL_PoolMgmt_Functions.ttcnin" |
| // |
| // //undef the pool type to avoid error in case of multiple careless "#include"-s |
| // |
| // #undef EPTF_POOLTYPE |
| // |
| // |
| /////////////////////////////////////////////////////////// |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_POOLTYPE##Pool |
| // |
| // Purpose: |
| // This datastructure is the base data type for the pool management database |
| // |
| // Elements: |
| // - order - <EPTF_FreeBusyQueue> - contains the ordering of events in the |
| // busy chain. |
| // |
| // - userData- <EPTF_POOLTYPE##List> - contains the data to be pooled. |
| // |
| // Detailed Comments: |
| // Encloses two corresponding <EPTF_FreeBusyQueue> and <EPTF_POOLTYPE##List>. |
| // The pool of data is used together with a <EPTF_FreeBusyQueue>, which defines |
| // the list of data efficiently. |
| // |
| /////////////////////////////////////////////////////////// |
| #define EPTF_EVENTPOOL_TYPE_(TYPEARG) type record TYPEARG##Pool {EPTF_FreeBusyQueue order, TYPEARG##List userData} |
| #define EPTF_EVENTPOOL_TYPE(TYPEARG) EPTF_EVENTPOOL_TYPE_(TYPEARG) |
| EPTF_EVENTPOOL_TYPE(EPTF_POOLTYPE) |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_POOLTYPE##List |
| // |
| // Purpose: |
| // Provides generic pool vector. |
| // |
| // Elements: |
| // *record of* <EPTF_POOLTYPE> |
| // |
| // Detailed Comments: |
| /////////////////////////////////////////////////////////// |
| #define EPTF_EVENTPOOLITEM_TYPE_(TYPEARG) type record of TYPEARG TYPEARG##List; |
| #define EPTF_EVENTPOOLITEM_TYPE(TYPEARG) EPTF_EVENTPOOLITEM_TYPE_(TYPEARG) |
| EPTF_EVENTPOOLITEM_TYPE(EPTF_POOLTYPE) |
| |
| /////////////////////////////////////////////////////////// |
| // Constant: c_EPTF_empty##EPTF_POOLTYPE##List |
| // |
| // Purpose: |
| // Empty event vector to init pool. |
| // |
| // Type: |
| // <EPTF_POOLTYPE##List> |
| // |
| // Detailed Comments: |
| /////////////////////////////////////////////////////////// |
| #define C_EMPTYEVENTVECTOR_(TYPEARG) const TYPEARG##List c_EPTF_empty##TYPEARG##List := {}; |
| #define C_EMPTYEVENTVECTOR(TYPEARG) C_EMPTYEVENTVECTOR_(TYPEARG) |
| C_EMPTYEVENTVECTOR(EPTF_POOLTYPE) |