fork download
  1. #include <inttypes.h>
  2. #include <iostream>
  3.  
  4. int main(void) {
  5. // your code goes here
  6. uint64_t notificationFrameNumber;
  7. uint16_t satellite_id = 611;
  8. uint32_t superframe =0;
  9. uint16_t sfn_sf =0;
  10. uint16_t sfn = 0;
  11. uint16_t sf =0;
  12. //for(int i=0;i<9999;i++)
  13. //{
  14. /*
  15. sf++;
  16. if (sf > 9)
  17. {
  18. sf=0;
  19. sfn++;
  20. if (sfn>1023)
  21. {
  22. superframe++;
  23. sfn=0;
  24. }
  25. }
  26. sfn_sf=(sfn*10)+sf;
  27.  
  28. */
  29.  
  30. notificationFrameNumber = ((uint64_t)satellite_id << 32 );
  31. //| ((uint64_t)superframe << 32 ) | (uint64_t) sfn_sf ;
  32. std::cout<<"KeyFrameNumber :" << notificationFrameNumber<< std::endl ;
  33.  
  34. //}
  35.  
  36. return 0;
  37. }
  38.  
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
KeyFrameNumber :2624225017856