00001 /*************************************************************************** 00002 LOW_IPCKeyGenerator.h - description 00003 ------------------- 00004 begin : Tue Jul 30 2002 00005 copyright : (C) 2002 by Harald Roelle, Helmut Reiser 00006 email : roelle@informatik.uni-muenchen.de, reiser@informatik.uni-muenchen.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef LOW_IPCKEYGENERATOR_H 00019 #define LOW_IPCKEYGENERATOR_H 00020 00021 00022 #include "LOW_portSerialFactory.h" 00023 #include "LOW_semaphoreSetFactory.h" 00024 #include "LOW_sharedMemSegmentFactory.h" 00025 #include "LOW_IPCKeyGeneratorFactory.h" 00026 #include "LOW_deviceID.h" 00027 00028 00029 00030 /** Abstract base class for IPC key generators. 00031 Each instance represents one IPC key generator. 00032 00033 Specific platforms dereive their implementation classes from this class. 00034 00035 The instances are created by LOW_IPCKeyGeneratorFactory, following the factory 00036 design pattern. 00037 00038 <B>Note:</B> There is no prescribed constructor. 00039 00040 @see LOW_IPCKeyGeneratorFactory 00041 00042 @author Harald Roelle, Helmut Reiser 00043 */ 00044 class LOW_IPCKeyGenerator { 00045 00046 //======================================================================================= 00047 public: 00048 00049 //===================================================================================== 00050 // 00051 // methods 00052 // 00053 00054 /** Get new semaphore set unique identifier from serial port identifier. 00055 @param Reference to serial port identifier. 00056 @return New semaphore set unique identifier. 00057 */ 00058 virtual LOW_semaphoreSetFactory::semSetIPCKey_t getSemSetKey( const LOW_portSerialFactory::portSpecifier_t &inSerPortSpec) = 0; 00059 00060 /** Get new semaphore set unique identifier from device ID. 00061 @param Reference to device ID. 00062 @return New semaphore set unique identifier. 00063 */ 00064 virtual LOW_semaphoreSetFactory::semSetIPCKey_t getSemSetKey( const LOW_deviceID &inDevID) = 0; 00065 00066 /** Get new shared memory unique identifier from serial port identifier. 00067 @param Reference to serial port identifier. 00068 @return New shared memory unique identifier. 00069 */ 00070 virtual LOW_sharedMemSegmentFactory::sharedMemSegmentIPCKey_t getSharedMemKey( const LOW_portSerialFactory::portSpecifier_t &inSerPortSpec) = 0; 00071 00072 }; 00073 00074 #endif