libHartwer - Documentation

bcs_sm.h

Go to the documentation of this file.
00001 /*
00002 * Copyright (c) 2008-2011 Marius Zwicker / Elefant Racing Bayreuth. 
00003 * All rights reserved.
00004 *
00005 * @ERB_OPEN_LICENSE_HEADER_START@
00006 *
00007 * Licensed under the Apache License, Version 2.0 (the "License");
00008 * you may not use this file except in compliance with the License.
00009 * You may obtain a copy of the License at
00010 * 
00011 *     http://www.apache.org/licenses/LICENSE-2.0
00012 * 
00013 * Unless required by applicable law or agreed to in writing, software
00014 * distributed under the License is distributed on an "AS IS" BASIS,
00015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016 * See the License for the specific language governing permissions and
00017 * limitations under the License.
00018 *
00019 *      http://www.elefantracing.de
00020 *
00021 * @ERB_OPEN_LICENSE_HEADER_END@
00022 */
00023 
00033 #ifndef FR9SHAREDMEMORY_H_
00034 #define FR9SHAREDMEMORY_H_
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 
00044 typedef enum {
00045        BCS_SM_RESERVED=10, 
00046        BCS_SM_RPM, 
00047        BCS_SM_POIL, 
00048        BCS_SM_PFUEL, 
00049        BCS_SM_SPEED, 
00050        BCS_SM_BATTU, 
00051        BCS_SM_LAMBDA, 
00052        BCS_SM_ACCX, 
00053        BCS_SM_ACCY, 
00054        BCS_SM_ACCZ, 
00055        BCS_SM_TOIL, 
00056        BCS_SM_TENGINE, 
00057        BCS_SM_TAIR, 
00058        BCS_SM_GEAR, 
00059        BCS_SM_CLUTCH, 
00060        BCS_SM_TRACTION, 
00061        BCS_SM_ANALOGUES, 
00062        BCS_SM_NETDCUEXT, 
00063        BCS_SM_STATEBYTES, 
00064        BCS_SM_ETH, 
00065        BCS_SM_LAST
00066 } BCS_SM_values;
00067 
00071 typedef struct {
00072        UInt32 rpm; 
00073        float poil; 
00074        float pfuel; 
00075        float speed; 
00076        float battu; 
00077        float lambda; 
00078        float accx; 
00079        float accy; 
00080        float accz; 
00081        Int32 toil; 
00082        Int32 tengine; 
00083        Int32 tair; 
00084        UInt32 gear; 
00085        UInt32 clutch; 
00086        UInt32 traction; 
00087        UInt16 analogues[9]; 
00088        UInt8 netdcuext[4];
00089        UInt8 statebytes[3]; 
00090        float eth; 
00091 } BCS_SM_valuestruct;
00092        
00096 typedef enum{
00097        BCS_SM_FLOAT,
00098        BCS_SM_INT32,
00099        BCS_SM_UINT32,
00100        BCS_SM_UNKNOWN
00101 } BCS_SM_datatypes;
00102 
00109 void *BCS_SM_getSharedSegment(UInt32 size, UInt32 id);
00110 
00119 void BCS_SM_releaseSharedSegment(void * sharedMemory, UInt32 size, UInt32 id);
00120 
00125 BCS_SM_datatypes BCS_SM_getSharedType(BCS_SM_values type);
00126        
00130 int BCS_SM_getSharedPos(BCS_SM_values type);
00131 
00138 BCS_SM_valuestruct * BCS_SM_getSharedAsWhole();
00139        
00146 void * BCS_SM_getShared(BCS_SM_values type);
00147 
00156 void * BCS_SM_getSharedRo(BCS_SM_values type);
00157 
00165 void BCS_SM_releaseShared(void * sharedMemory, BCS_SM_values type);
00166        
00167 #ifdef __cplusplus
00168 }
00169 #endif
00170 
00171 #endif /* FR9SHAREDMEMORY_H_ */

Generated on Fri Feb 11 2011 18:25:46 for libHartwer by Doxygen 1.7.3
Content © 2009-2011 Elefant Racing Bayreuth & MLBA (About) – Design © 2010 Emzeat. All Rights reserved.