Additional complexity comes from the F-35's Stores Management System (SMS). In addition to the basic accounting tasks of keeping track of what kinds of weapons are loaded, and on which stations, the SMS keeps track of how much the stores at each station weigh and provides that information to the flight control system (FLCS). FLCS can then compensate for the weight distribution of the stores. The gun must integrate with the SMS.
http://www.dtic.mil/ndia/2010armament/TuesdayLandmarkADougHa... for some more information.