- Timestamp:
- Oct 15, 2015, 2:40:14 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/Pacpus/PacpusTools/PosixShMem.h
r162 r350 34 34 virtual void *read(); 35 35 /// @todo Documentation 36 virtual void read(void * mem, int size); 37 /// @todo Documentation 36 38 virtual void write(void *data, int size, unsigned long offset = 0); 37 39 /// @todo Documentation -
trunk/include/Pacpus/kernel/DbiteFileTypes.h
r324 r350 82 82 , FLUENCE_ZE_REAR_WHEELSPEED 83 83 , FLUENCE_ZE_LOWSPEED 84 , ZOE_STEERINGWHEEL //begin copy from 0.1.x 85 , ZOE_KINEMATICS 86 , ZOE_GEARS 87 , ZOE_FRONT_WHEELSPEED 88 , ZOE_REAR_WHEELSPEED 89 , ZOE_VEHICLESTATE 90 , ZOE_INITION 91 , PROVEL_MABXFEEDBACK 92 , PROVEL_MABXDIAG 93 , PROVEL_MABX100MS //end copy from 0.1.x 84 94 , RADAR_TRW_AC20 = 3000 85 95 , SMS_RADAR = 4000 // by Arthur Miranda 2012-02-23 (PAMU Project) -
trunk/src/PacpusTools/CMakeLists.txt
r300 r350 36 36 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PeriodicWorker.h 37 37 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/SharedMemory.h 38 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PosixShMem.h 38 39 39 40 #${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/pacpusStruct.h … … 48 49 #src/PacpusSerialPort.cpp 49 50 src/SharedMemory.cpp 51 src/PosixShMem.cpp 50 52 ) 51 53 -
trunk/src/PacpusTools/src/PosixShMem.cpp
r312 r350 104 104 105 105 ////////////////////////////////////////////////////////////////////////// 106 /// Use this method to get thedata of the shared memory106 /// Use this method to get a pointer to data of the shared memory 107 107 void * PosixShMem::read() 108 108 { 109 return shMem_; 109 void * shMem; 110 lockMemory(); 111 shMem = shMem_; 112 unlockMemory(); 113 return shMem; 114 } 115 116 ////////////////////////////////////////////////////////////////////////// 117 /// Use this method to get a pointer to data of the shared memory 118 void PosixShMem::read(void * mem, int size) 119 { 120 lockMemory(); 121 memcpy(mem,shMem_,size); 122 unlockMemory(); 110 123 } 111 124
Note:
See TracChangeset
for help on using the changeset viewer.