Sign in to follow this  
n4gix

Setting up an SDK...

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

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... ;)

Share this post


Link to post
Share on other sites

FLOAT64 is a "double"...You can pass FLOAT64 if you set it up to do so...I just provided a UNIT32 example...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this