CCT Version 3.0.0.0 2024-04-23 00:00:00 Time flies when you're having fun! File out: ..\..\..\OutputFiles\CCTOut_N_TESTBINARYCBFANDRIFFLIST.txt ======= TestBinaryCbfAndRiffLIST() ======= /////////////////////////////////////////////////////////////////////// TestBinaryCbfAndRiffLIST() - Create several CCbf timestamps and display their contents. - Append each as CBF binary image to a CRiff_Ccbf list file. - Read and parse the resulting file to reconstitute the CCbfs. - Convert each CCbf to CCcf character format, display. and parse the CCcf string to reconstruct the CCbfs and compare using TestOneValueAndParse() which may display any round-trip errors. /////////////////////////////////////////////////////////////////////// CCctCRiff_Ccbf file output path - F:\Dev\XTC\GH\CCT\OutputFiles\CCctCRiff_Ccbf_List.rff -------------- Interval -------------- P1I00:01:40n000001234X // UTC1970 0000086500.000001234 Day 1 P1I00:01:40n000001234X // (UTC) Coordinated Universal Time P1I00:01:40n000001234X // UTC1970 0000086500.000001234 Day 1 CCbf contents: CBFTime_st:: m_eRateEnumeration CLOCK_9 m_bLocalDateExt FALSE m_b24HourPeriodExt TRUE m_bCounterSign positive m_eCounterSize COUNTERSIZE_48 m_ulCounterLow32 1215753426 CBFCounterHigh16_st:: m_unCounterHigh16 23 CBFTime_st Counter 100000001234 CBF24HourPeriod_st:: m_unDayDuration 1 CBF Total size 14 bytes 112 bits Assemble binary CBF image from CCbf data 07 06 -d2 -ec 76 48 01 00 17 00 01 00 00 00 size 14 Append CBF binary to Riff LIST -------------- America/New_York -------------- Set CCT date and time Test One Value and Parse Ccf string D2024-03-10T01:59:59m000U-05Zamerica/new_yorkAestV2021aL27S00t01a02cMuX // UTC1970 1710054026.000 Day 19792 D2024-03-10T01:59:59m000U-05Zamerica/new_yorkAestV2021aL27S00t01a02cMuX // (UTC-05:00) Eastern Time (US & Canada) D2024-03-10T01:59:59m000U-05Zamerica/new_yorkAestV2021aL27S00t01a02cMuX // UTC1970 1710054026.000 Day 19792 CCbf contents: CBFTime_st:: m_eRateEnumeration CLOCK_3 m_bLocalDateExt TRUE m_b24HourPeriodExt FALSE m_bCounterSign positive m_eCounterSize COUNTERSIZE_35 m_ulCounterLow32 7199000 CBFTime_st Counter 7199000 CBFLocalDate_st:: m_l1970DayNumber 19792 m_nLeapsecs 27 m_TZDTimeZoneID_st.m_unZoneIdx idx[255] America/New_York m_TZDTimeZoneID_st.m_unTzDataReleaseYear 49 m_TZDTimeZoneID_st.m_unTzDataReleaseLetter 0 m_TZDTimeZoneID_st.m_bCBFLocationExt FALSE m_TZDTimeZoneID_st.m_bCBFAbbrExt TRUE m_TZDTimeZoneID_st.m_bCBFAbbrChangeExt FALSE m_lUTCOffset -18000 m_eTODMode TOD_LEAPSECOND_UTC_UTC m_eDstMode DSTCOUNTMODE_CONVENTIONAL m_bIsLeapSecondDay FALSE m_bIsLeapSecond FALSE m_bIsLeapSecondNegative FALSE m_bUtcShiftExt FALSE m_bDstBiasExt TRUE m_bDstTransDayExt TRUE CBFAbbr:: est CBFDstBias_st:: m_eDSTBias 0 CBFDstTransDay_st:: m_ulDSTTransTime 7200 m_lDSTBiasChange 3600 CBF Total size 29 bytes 232 bits Assemble binary CBF image from CCbf data 04 01 18 -d9 6d 00 00 00 50 4d 00 00 -80 0d 00 -ff 00 31 10 -b0 -b9 -d5 00 00 00 00 20 1c 10 0e 00 -e5 -f3 74 size 34 Append CBF binary to Riff LIST -------------- Add one second -------------- Test One Value and Parse Ccf string D2024-03-10T03:00:00m000U-04Zamerica/new_yorkAedtV2021aL27S01t01a02cMuX // UTC1970 1710054027.000 Day 19792 D2024-03-10T03:00:00m000U-04Zamerica/new_yorkAedtV2021aL27S01t01a02cMuX // (UTC-05:00) Eastern Time (US & Canada) D2024-03-10T03:00:00m000U-04Zamerica/new_yorkAedtV2021aL27S01t01a02cMuX // UTC1970 1710054027.000 Day 19792 CCbf contents: CBFTime_st:: m_eRateEnumeration CLOCK_3 m_bLocalDateExt TRUE m_b24HourPeriodExt FALSE m_bCounterSign positive m_eCounterSize COUNTERSIZE_35 m_ulCounterLow32 10800000 CBFTime_st Counter 10800000 CBFLocalDate_st:: m_l1970DayNumber 19792 m_nLeapsecs 27 m_TZDTimeZoneID_st.m_unZoneIdx idx[255] America/New_York m_TZDTimeZoneID_st.m_unTzDataReleaseYear 49 m_TZDTimeZoneID_st.m_unTzDataReleaseLetter 0 m_TZDTimeZoneID_st.m_bCBFLocationExt FALSE m_TZDTimeZoneID_st.m_bCBFAbbrExt TRUE m_TZDTimeZoneID_st.m_bCBFAbbrChangeExt FALSE m_lUTCOffset -18000 m_eTODMode TOD_LEAPSECOND_UTC_UTC m_eDstMode DSTCOUNTMODE_CONVENTIONAL m_bIsLeapSecondDay FALSE m_bIsLeapSecond FALSE m_bIsLeapSecondNegative FALSE m_bUtcShiftExt FALSE m_bDstBiasExt TRUE m_bDstTransDayExt TRUE CBFAbbr:: edt CBFDstBias_st:: m_eDSTBias 3600 CBFDstTransDay_st:: m_ulDSTTransTime 7200 m_lDSTBiasChange 3600 CBF Total size 29 bytes 232 bits Assemble binary CBF image from CCbf data 04 01 -80 -cb -a4 00 00 00 50 4d 00 00 -80 0d 00 -ff 00 31 10 -b0 -b9 -d5 00 00 10 0e 20 1c 10 0e 00 -e5 -e4 74 size 34 Append CBF binary to Riff LIST -------------- Europe/Moscow -------------- Set CCT date and time Test One Value and Parse Ccf string D2014-10-26T01:59:59m000U+03w01+02Zeurope/moscowAmskV2021aL25MuX // UTC1970 1414278024.000 Day 16369 D2014-10-26T01:59:59m000U+03w01+02Zeurope/moscowAmskV2021aL25MuX // (UTC+03:00) Moscow, St. Petersburg D2014-10-26T01:59:59m000U+03w01+02Zeurope/moscowAmskV2021aL25MuX // UTC1970 1414278024.000 Day 16369 CCbf contents: CBFTime_st:: m_eRateEnumeration CLOCK_3 m_bLocalDateExt TRUE m_b24HourPeriodExt FALSE m_bCounterSign positive m_eCounterSize COUNTERSIZE_35 m_ulCounterLow32 7199000 CBFTime_st Counter 7199000 CBFLocalDate_st:: m_l1970DayNumber 16369 m_nLeapsecs 25 m_TZDTimeZoneID_st.m_unZoneIdx idx[211] Europe/Moscow m_TZDTimeZoneID_st.m_unTzDataReleaseYear 49 m_TZDTimeZoneID_st.m_unTzDataReleaseLetter 0 m_TZDTimeZoneID_st.m_bCBFLocationExt FALSE m_TZDTimeZoneID_st.m_bCBFAbbrExt TRUE m_TZDTimeZoneID_st.m_bCBFAbbrChangeExt FALSE m_lUTCOffset 10800 m_eTODMode TOD_LEAPSECOND_UTC_UTC m_eDstMode DSTCOUNTMODE_NOTAPPLICABLE m_bIsLeapSecondDay FALSE m_bIsLeapSecond FALSE m_bIsLeapSecondNegative FALSE m_bUtcShiftExt TRUE m_bDstBiasExt FALSE m_bDstTransDayExt FALSE CBFUtcShift_st:: m_lUtcShiftTime 7200 m_lUtcShift -3600 m_eUtcShiftDay UTCSHIFTDAY_WEST CBFAbbr:: msk CBF Total size 32 bytes 256 bits Assemble binary CBF image from CCbf data 04 01 18 -d9 6d 00 00 00 -f1 3f 00 00 -80 0c 00 -d3 00 31 10 30 2a 04 01 00 20 1c -f0 -f1 0d -ed -f3 6b size 32 Append CBF binary to Riff LIST -------------- Add one second -------------- Test One Value and Parse Ccf string D2014-10-26T02:00:00m000U+03w01+02Zeurope/moscowAmskV2021aL25MuX // UTC1970 1414278025.000 Day 16369 D2014-10-26T02:00:00m000U+03w01+02Zeurope/moscowAmskV2021aL25MuX // (UTC+03:00) Moscow, St. Petersburg D2014-10-26T02:00:00m000U+03w01+02Zeurope/moscowAmskV2021aL25MuX // UTC1970 1414278025.000 Day 16369 CCbf contents: CBFTime_st:: m_eRateEnumeration CLOCK_3 m_bLocalDateExt TRUE m_b24HourPeriodExt FALSE m_bCounterSign positive m_eCounterSize COUNTERSIZE_35 m_ulCounterLow32 7200000 CBFTime_st Counter 7200000 CBFLocalDate_st:: m_l1970DayNumber 16369 m_nLeapsecs 25 m_TZDTimeZoneID_st.m_unZoneIdx idx[211] Europe/Moscow m_TZDTimeZoneID_st.m_unTzDataReleaseYear 49 m_TZDTimeZoneID_st.m_unTzDataReleaseLetter 0 m_TZDTimeZoneID_st.m_bCBFLocationExt FALSE m_TZDTimeZoneID_st.m_bCBFAbbrExt TRUE m_TZDTimeZoneID_st.m_bCBFAbbrChangeExt FALSE m_lUTCOffset 10800 m_eTODMode TOD_LEAPSECOND_UTC_UTC m_eDstMode DSTCOUNTMODE_NOTAPPLICABLE m_bIsLeapSecondDay FALSE m_bIsLeapSecond FALSE m_bIsLeapSecondNegative FALSE m_bUtcShiftExt TRUE m_bDstBiasExt FALSE m_bDstTransDayExt FALSE CBFUtcShift_st:: m_lUtcShiftTime 7200 m_lUtcShift -3600 m_eUtcShiftDay UTCSHIFTDAY_WEST CBFAbbr:: msk CBF Total size 32 bytes 256 bits Assemble binary CBF image from CCbf data 04 01 00 -dd 6d 00 00 00 -f1 3f 00 00 -80 0c 00 -d3 00 31 10 30 2a 04 01 00 20 1c -f0 -f1 0d -ed -f3 6b size 32 Append CBF binary to Riff LIST =================== Read CRiff_Ccbf ======================= New CRiff_Ccbf to read and parse CRiff_Ccbf file New CCct to receive CRiff_Ccbf data Read each of the CBF items, parse to CCbf, construct CCcf, test round-trip. Recovered CBF binary image: 07 06 -d2 -ec 76 48 01 00 17 00 01 00 00 00 size 14 Populate CCbf from CBF binary image: P1I00:01:40n000001234X // UTC1970 0000086500.000001234 Day 1 P1I00:01:40n000001234X // (UTC+11:00) Solomon Is., New Caledonia P1I00:01:40n000001234X // UTC1970 0000086500.000001234 Day 1 Recovered CBF binary image: 04 01 18 -d9 6d 00 00 00 50 4d 00 00 -80 0d 00 -ff 00 31 10 -b0 -b9 -d5 00 00 00 00 20 1c 10 0e 00 -e5 -f3 74 size 34 Populate CCbf from CBF binary image: D2024-03-10T01:59:59m000U-05Zamerica/new_yorkAestV2021aL27S00t01a02cMuX // UTC1970 1710054026.000 Day 19792 D2024-03-10T01:59:59m000U-05Zamerica/new_yorkAestV2021aL27S00t01a02cMuX // (UTC+11:00) Solomon Is., New Caledonia D2024-03-10T01:59:59m000U-05Zamerica/new_yorkAestV2021aL27S00t01a02cMuX // UTC1970 1710054026.000 Day 19792 Recovered CBF binary image: 04 01 -80 -cb -a4 00 00 00 50 4d 00 00 -80 0d 00 -ff 00 31 10 -b0 -b9 -d5 00 00 10 0e 20 1c 10 0e 00 -e5 -e4 74 size 34 Populate CCbf from CBF binary image: D2024-03-10T03:00:00m000U-04Zamerica/new_yorkAedtV2021aL27S01t01a02cMuX // UTC1970 1710054027.000 Day 19792 D2024-03-10T03:00:00m000U-04Zamerica/new_yorkAedtV2021aL27S01t01a02cMuX // (UTC+11:00) Solomon Is., New Caledonia D2024-03-10T03:00:00m000U-04Zamerica/new_yorkAedtV2021aL27S01t01a02cMuX // UTC1970 1710054027.000 Day 19792 Recovered CBF binary image: 04 01 18 -d9 6d 00 00 00 -f1 3f 00 00 -80 0c 00 -d3 00 31 10 30 2a 04 01 00 20 1c -f0 -f1 0d -ed -f3 6b size 32 Populate CCbf from CBF binary image: D2014-10-26T01:59:59m000U+03w01+02Zeurope/moscowAmskV2021aL25MuX // UTC1970 1414278024.000 Day 16369 D2014-10-26T01:59:59m000U+03w01+02Zeurope/moscowAmskV2021aL25MuX // (UTC+11:00) Solomon Is., New Caledonia D2014-10-26T01:59:59m000U+03w01+02Zeurope/moscowAmskV2021aL25MuX // UTC1970 1414278024.000 Day 16369 Recovered CBF binary image: 04 01 00 -dd 6d 00 00 00 -f1 3f 00 00 -80 0c 00 -d3 00 31 10 30 2a 04 01 00 20 1c -f0 -f1 0d -ed -f3 6b size 32 Populate CCbf from CBF binary image: D2014-10-26T02:00:00m000U+03w01+02Zeurope/moscowAmskV2021aL25MuX // UTC1970 1414278025.000 Day 16369 D2014-10-26T02:00:00m000U+03w01+02Zeurope/moscowAmskV2021aL25MuX // (UTC+11:00) Solomon Is., New Caledonia D2014-10-26T02:00:00m000U+03w01+02Zeurope/moscowAmskV2021aL25MuX // UTC1970 1414278025.000 Day 16369 Your time is up.