Last change
on this file since 105 was 89, checked in by morasjul, 12 years ago |
PACPUS 2.0 Beta deployed in new branch
Major changes:
-Add communication interface between components
-Add examples for communications interface (TestComponents)
-Move to Qt5 support
|
-
Property svn:executable
set to
*
|
File size:
1.6 KB
|
Line | |
---|
1 | // %pacpus:license{
|
---|
2 | // This file is part of the PACPUS framework distributed under the
|
---|
3 | // CECILL-C License, Version 1.0.
|
---|
4 | // %pacpus:license}
|
---|
5 | /// @file
|
---|
6 | /// @author Gerald Dherbomez <firstname.surname@utc.fr>
|
---|
7 | /// @date January, 2007
|
---|
8 | /// @version $Id: Win32ShMem.h 76 2013-01-10 17:05:10Z kurdejma $
|
---|
9 | /// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
|
---|
10 | /// @brief Shared memory implementation for Windows.
|
---|
11 | ///
|
---|
12 | /// Shared memory implementation for Windows.
|
---|
13 | /// @todo Derive from a common base class. Same for @link PosixShMem @endlink.
|
---|
14 |
|
---|
15 | #ifndef DEF_PACPUS_WIN32SHMEM_H
|
---|
16 | #define DEF_PACPUS_WIN32SHMEM_H
|
---|
17 |
|
---|
18 | #include <Pacpus/PacpusTools/ShMemBase.h>
|
---|
19 |
|
---|
20 | /// Windows handle (opaque pointer) type definition
|
---|
21 | ///
|
---|
22 | /// Forward declaration of typedefs is impossible.
|
---|
23 | typedef void * HANDLE;
|
---|
24 |
|
---|
25 | /// Shared memory object for Windows.
|
---|
26 | class Win32ShMem
|
---|
27 | : public ShMemBase
|
---|
28 | {
|
---|
29 | public:
|
---|
30 | /// Ctor
|
---|
31 | Win32ShMem(const char * name, int size);
|
---|
32 | /// Dtor
|
---|
33 | ~Win32ShMem();
|
---|
34 |
|
---|
35 | /// @todo Documentation
|
---|
36 | virtual bool wait(unsigned long timeout = 0);
|
---|
37 | /// @todo Documentation
|
---|
38 | virtual void * read();
|
---|
39 | /// @todo Documentation
|
---|
40 | virtual void read(void * mem, int size);
|
---|
41 | /// @todo Documentation
|
---|
42 | virtual void write(void * data, int size, unsigned long offset = 0);
|
---|
43 | /// @todo Documentation
|
---|
44 | virtual void lockMemory();
|
---|
45 | /// @todo Documentation
|
---|
46 | virtual void unlockMemory();
|
---|
47 | /// @todo Documentation
|
---|
48 | virtual void * getEventIdentifier();
|
---|
49 |
|
---|
50 | protected:
|
---|
51 |
|
---|
52 | private:
|
---|
53 | HANDLE semaphore_;
|
---|
54 | HANDLE shMemHandle_;
|
---|
55 | HANDLE event_;
|
---|
56 | };
|
---|
57 |
|
---|
58 | #endif // DEF_PACPUS_WIN32SHMEM_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.