EEROS  0.4.1.0
API for the EEROS Real-Time Robotics Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SharedMemory.hpp
Go to the documentation of this file.
1 #ifndef ORG_EEROS_CORE_SHAREDMEMORY_HPP_
2 #define ORG_EEROS_CORE_SHAREDMEMORY_HPP_
3 
4 #include <string>
5 #include <eeros/types.hpp>
6 
7 namespace eeros {
8 
10  enum SharedMemoryError1 { kShmOk = 0, kShmError = -1};
11 
12  class SharedMemory {
13  public:
14  SharedMemory(std::string virtualPath, uint32_t size);
15  virtual ~SharedMemory();
16 
17  virtual void* getMemoryPointer() const;
18  virtual uint32_t getSize() const;
19  virtual int initialize();
20  virtual int destroy();
21 
22  private:
23  std::string virtualPath;
24  uint32_t size;
25  int fd;
26  void* memory;
27  };
28 
29 };
30 
31 #endif // ORG_EEROS_CORE_SHAREDMEMORY_HPP_
SharedMemoryError1
Definition: SharedMemory.hpp:10
virtual ~SharedMemory()
Definition: SharedMemory.cpp:20
Definition: SharedMemory.hpp:9
virtual int destroy()
Definition: SharedMemory.cpp:47
Definition: SharedMemory.hpp:9
Definition: SharedMemory.hpp:10
SharedMemoryError
Definition: SharedMemory.hpp:9
Definition: SharedMemory.hpp:12
virtual uint32_t getSize() const
Definition: SharedMemory.cpp:28
Definition: SharedMemory.hpp:9
virtual int initialize()
Definition: SharedMemory.cpp:32
SharedMemory(std::string virtualPath, uint32_t size)
Definition: SharedMemory.cpp:12
virtual void * getMemoryPointer() const
Definition: SharedMemory.cpp:24
Definition: SharedMemory.hpp:9
Definition: SharedMemory.hpp:10