March 19, 200620 yr Commercial Member I would like to design an SDK similar to those used by Level-D 767 and the CIVA INS where access to certain variables within the project is given to developers. Specifically I would like to include library/header files and document the variables. How can the internal multi-gauge variables be exported and used externally in this way? Appreciate any help or suggestions. Andrew Wilson
March 20, 200620 yr Author Moderator Simply designate all variables you want "exposed" as "broadcast variables."*Broadcast Variable*UINT32 variable1;case PANEL_SERVICE_PRE_INSTALL:register_var_by_name(&variable1,TYPE_UINT32,"variable1");break;case PANEL_SERVICE_PRE_KILL:unregister_var_by_name("variable1");break;*Receive Variable*MODULE_VAR variable1READ1;local_variable1 = 0;void FSAPI gaugecall(PGAUGEHDR pgauge, int service_id, UINT32 extra_data){PUINT32 variable1 = (PUINT32)variable1READ1.var_ptr;switch(service_id){case PANEL_SERVICE_PRE_INITIALIZE:initialize_var_by_name(&variable1READ1,"variable1");break;case PANEL_SERVICE_PRE_DRAW://now, bullet-proof the receive variable!if (variable1) != NULL {local_variable1 = *variable2 ; } break;Now you have local_variable1 to use in the remote gauge... ;) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
March 20, 200620 yr Commercial Member Thanks for the reply Bill. Please correct me if I Andrew Wilson
March 21, 200620 yr Author Moderator FLOAT64 is a "double"...You can pass FLOAT64 if you set it up to do so...I just provided a UNIT32 example... Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment