Quasienergies and Floquet states of two weakly coupled Bose-Einstein condensates under periodic driving