| Rev | Line |  | 
|---|
| [62] | 1 | // This file is part of the PACPUS framework distributed under the | 
|---|
|  | 2 | // CECILL-C License, Version 1.0. | 
|---|
|  | 3 | // | 
|---|
| [66] | 4 | /// @file | 
|---|
| [62] | 5 | /// @author  Firstname Surname <firstname.surname@utc.fr> | 
|---|
|  | 6 | /// @date    Month, Year | 
|---|
|  | 7 | /// @version $Id: PosixShMem.h 67 2013-01-09 18:17:44Z kurdejma $ | 
|---|
|  | 8 | /// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved. | 
|---|
|  | 9 | /// @brief Brief description. | 
|---|
|  | 10 | /// | 
|---|
|  | 11 | /// Detailed description. | 
|---|
| [3] | 12 |  | 
|---|
| [31] | 13 | #ifndef DEF_PACPUS_POSIXSHMEM_H | 
|---|
|  | 14 | #define DEF_PACPUS_POSIXSHMEM_H | 
|---|
| [3] | 15 |  | 
|---|
| [31] | 16 | #include <QSharedMemory> | 
|---|
|  | 17 | #include <QSystemSemaphore> | 
|---|
| [3] | 18 |  | 
|---|
| [31] | 19 | #include <Pacpus/PacpusTools/ShMemBase.h> | 
|---|
| [3] | 20 |  | 
|---|
| [67] | 21 | /// @todo Documentation | 
|---|
| [3] | 22 | class PosixShMem | 
|---|
|  | 23 | : public ShMemBase | 
|---|
|  | 24 | { | 
|---|
|  | 25 | public: | 
|---|
| [67] | 26 | /// @todo Documentation | 
|---|
| [3] | 27 | PosixShMem(const char * name, int size); | 
|---|
| [67] | 28 | /// @todo Documentation | 
|---|
| [3] | 29 | virtual ~PosixShMem(); | 
|---|
|  | 30 |  | 
|---|
| [67] | 31 | /// @todo Documentation | 
|---|
| [3] | 32 | virtual void *read(); | 
|---|
| [67] | 33 | /// @todo Documentation | 
|---|
| [3] | 34 | virtual void write(void *data, int size, unsigned long offset = 0); | 
|---|
| [67] | 35 | /// @todo Documentation | 
|---|
| [3] | 36 | virtual bool wait(unsigned long timeout = 0); | 
|---|
| [67] | 37 | /// @todo Documentation | 
|---|
| [3] | 38 | virtual void lockMemory(); | 
|---|
| [67] | 39 | /// @todo Documentation | 
|---|
| [3] | 40 | virtual void unlockMemory(); | 
|---|
|  | 41 |  | 
|---|
|  | 42 | private: | 
|---|
|  | 43 | QSystemSemaphore * event_; | 
|---|
|  | 44 | QSharedMemory * memory_; | 
|---|
|  | 45 | }; | 
|---|
|  | 46 |  | 
|---|
| [31] | 47 | #endif // DEF_PACPUS_POSIXSHMEM_H | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.