Jump to content
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.


Andrew Wilson

sig_fslDeveloper.jpg

Share this post


Link to post
Share on other sites

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

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


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...