Utilities for creating and acessing shared memory segments. More...
Go to the source code of this file.
Data Structures | |
| struct | BCS_SM_valuestruct |
| Provides easy access to the shared memory values if all values are needed. More... | |
Enumerations | |
| enum | BCS_SM_datatypes |
Used when querying the type of a memory segment. | |
| enum | BCS_SM_values { BCS_SM_RESERVED = 10, BCS_SM_RPM, BCS_SM_POIL, BCS_SM_PFUEL, BCS_SM_SPEED, BCS_SM_BATTU, BCS_SM_LAMBDA, BCS_SM_ACCX, BCS_SM_ACCY, BCS_SM_ACCZ, BCS_SM_TOIL, BCS_SM_TENGINE, BCS_SM_TAIR, BCS_SM_GEAR, BCS_SM_CLUTCH, BCS_SM_TRACTION, BCS_SM_ANALOGUES, BCS_SM_NETDCUEXT, BCS_SM_STATEBYTES, BCS_SM_ETH } |
This enum is used to get access to the appropriate shared memory segment. More... | |
Functions | |
| void * | BCS_SM_getShared (BCS_SM_values type) |
| Use this method to connect to a shared memory segment. | |
| BCS_SM_valuestruct * | BCS_SM_getSharedAsWhole () |
| Returns the whole memory segment containing als BCS_SM values. | |
| int | BCS_SM_getSharedPos (BCS_SM_values type) |
| Returns the relative position of the memory segment defined by type. | |
| void * | BCS_SM_getSharedRo (BCS_SM_values type) |
| SPECIAL COMMAND: GET READ-ONLY ACCESS. | |
| void * | BCS_SM_getSharedSegment (UInt32 size, UInt32 id) |
| Use this method to get access to a shared memory segment of a given size. | |
| BCS_SM_datatypes | BCS_SM_getSharedType (BCS_SM_values type) |
| Returns the data type of a shared memory segment. | |
| void | BCS_SM_releaseShared (void *sharedMemory, BCS_SM_values type) |
| Detaches a given pointer from a shared memory segment. | |
| void | BCS_SM_releaseSharedSegment (void *sharedMemory, UInt32 size, UInt32 id) |
| Use this method to release access to a shared memory segment you requested before. | |
| enum BCS_SM_values |
To understand the abreviations, look into MS3 Doku.
| void* BCS_SM_getShared | ( | BCS_SM_values | type | ) |
If it doesn't exist yet, it will be created. See the BCS_SM_values enum docu for the returned memory type.
| type | use this to choose the memory segment via the FR9SM_values enum |
| BCS_SM_valuestruct* BCS_SM_getSharedAsWhole | ( | ) |
By using BCS_SM_getSharedPos and BCS_SM_getSharedType you can access the individual values or of course by using the normal struct access methods
| void * BCS_SM_getSharedRo | ( | BCS_SM_values | type | ) |
Use this method to connect to a shared memory segment. If it doesn't exist yet, it will be created. See the BCS_SM_values enum docu for the returned memory type.
| type | use this to choose the memory segment via the FR9SM_values enum |
| size | requested size as needed (in byte) |
| id | unique identifier - ATTENTION: make sure your requested id is bigger than the last BCS_SM_values entry! |
| BCS_SM_datatypes BCS_SM_getSharedType | ( | BCS_SM_values | type | ) |
This can be used to determine the size or correct calculation function for a segment
| void BCS_SM_releaseShared | ( | void * | sharedMemory, |
| BCS_SM_values | type | ||
| ) |
If all pointer to a segment are detached, it will be removed.
| sharedMemory | pointer to a shared memory segment |
| type | same type that was used when calling BCS_SM_getShared() |
In case nobody else wants access, the segment will be deleted.
| sharedMemory | pointer returned when calling getSharedSegment(..) |
| size | same size as requested before |
| id | the same unique identifier as used before - ATTENTION: again make sure your requested id is bigger than the last BCS_SM_values entry! |