element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
NexGen Flight Simuator NexGen: Radio SubSystem: RSS_IOP Part 1
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: phoenixcomm
  • Date Created: 7 Mar 2014 3:02 AM Date Created
  • Views 277 views
  • Likes 0 likes
  • Comments 1 comment
  • nexgen
  • c
  • hardware
  • flight_simulation
  • programming
  • software_design
  • sof
  • diy_cockpit
  • software
  • linux
Related
Recommended

NexGen: Radio SubSystem: RSS_IOP Part 1

phoenixcomm
phoenixcomm
7 Mar 2014

Ok, So here we are again. The RSS has raised it's head one last time.. This time we will slay it.. So onward and upward.  image


First I have talked about this part of the puzzle more than a few times.. Well spurned on by my CDU_IOP, I thought that since the CDU_IOP was designed with modularity in mind I rewrote my RSS_IOP to take advantages of things that I have learnt along the way.

 

CODE SEGMENTS: First we have to talk about the model or the structure of the radios.

 

rss.hadd a few radiosOur main.c

struct rss_s {

    char * device_info;

    char * device_model;

    char * device_serial;

    int power_48v;

    int power_400hz;

    int panel_lamps;

    void * radio_info;

    int sub_devices;

    int panel_lamp;

    struct device_s {

        int fd[ FD_pair ];

        int frequency[ tuned ];

        int dial_lamp;

}sub_device[];

}

struct radio_G3713 {

  int sw_VHF_NAV;

  int sw_VOR_TEST;

  int sw_DME_TEST;

  int sw_DME_STBY;

  int sw_UP;

  int sw_DOWN;

  int vhf_dial_lamp;

  int nav_dial_lamp;

}

 

struct radio_G3490 {

  int sw_com1_test;

  int sw_com2_test;

  int sw_nav1_test;

  int sw_nav2_test;

  int sw_comm_sel;

  int led_nav1;

  int led_nav2;

  int dial_lamp_com1;

  int dial_lamp_com2A;

  int dial_lamp_com2B;

  int dial_lamp_nav1;

  int dial_lamp_nav2;

};

int main(int argc, char *argv[]){

 

    max_fd = 0;

    int ecode;

 

    static struct radio_G3713 G_3713;

    static struct radio_G3490 G_3490;

 

    static struct rss_s radios[] = {

      { "COM/NAV #1", "G-3717", "81",  0, 0, 0, & G_3713,  2, },

      { "5in1", "G-3490", "31",  0, 0, 0, & G_3490,  4, },

    };

 

 

    int i, j;

  // loop over the installed Radios and sub radios

    for( i = 0; i < DIM( radios ); i++ ){ // RADIOS

      for ( j = 0; j < radios[i].sub_devices; j++  ) { // SUB DEVICES

          if( init( radios[i].sub_device[j] ) == ERROR ){

            perror( "Initialization failed");

            return( ERROR );

      }}}

 

    do{

  // test for power errors

  /*if (( p400 = power_buss_400hz()) || ( p48 = power__buss_48v() != OFF )) {

    if( !p400 ){

    error_msg() }

  } */

 

  // iop retruns with error TBD!!

  }  while( ecode != ERROR );

}

 

You will notice that in rss_s structure is an array, and each array member is a radio, and each radio can have 'sub devices' that is one or more tuner(s). Lastly in the rss.h there is a pointer to radio_info but its a void type (this is a place holder only and we will have to cast it to one of the radios in column two).

image

Gables G-3713

Fig 1.

Well as you can see in Fig 1. and they looking at struct radio_G3713, you will notice a one to one instance between a switch and its description in the code segments. For instance if you look a Fig 1. and see the 'DME TEST' push button, in the lower right, and you see in the code above 'int sw_DME_TEST;' This is the same for every switch on the radio. The frequency dial is handled by ARINC-410 code which is a 2 out of 5 negative going code.







  image  Keep tuned in more to come

  ~ Cris

 

 

 

3/30/2114 Major changes to the rss data structures.

  1. removed this from rss.s: and added it to all of the  radio_ xxxxxx structure(s).
    struct device_s
            int fd[ FD_pair ];
            int frequency[ tuned ]
          int dial_lamp;}sub_device[];
  2. In main.c the second for loop has been eliminated.
    for ( j = 0; j < radios[i].sub_devices; j++  ) { // SUB DEVICES
  3. This also changes the next line of code from:
    if( init( radios[i].sub_device[j] ) == ERROR ){
    to:
    if( rss_init( radios[i] ) == ERROR ){
  • Sign in to reply
  • DAB
    DAB over 11 years ago

    You bring back memories of my work on Integrated Avionics.

    I was amazed at how many communication devices could be run off the same antennae and processed using computer code.

    Since my knowledge base is over twenty years old, there should be some very interesting new software to make your comm software even better.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube