IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5000 for trunk/psLib/test/xml


Ignore:
Timestamp:
Sep 12, 2005, 11:36:54 AM (21 years ago)
Author:
drobbin
Message:

Added xml support for psTime data

Location:
trunk/psLib/test/xml
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/xml/psTime.xml

    r4785 r5000  
    1212    <item name = "psLib.time.BOOL.value3" psType = "BOOL" value = "t" />
    1313    <item name = "psLib.time.BOOL.value4" psType = "BOOL" value = "F" />
     14    <time name = "psLib.TIME.Magazine" psType = "PS_TIME_UTC" value = "1000, 25, F" />
    1415    <vector name = "psLib.time.Vector.S32" psType = "S32" value = "-4, -2, 506"/>
    1516    <vector name = "psLib.time.Vector.F32" psType = "F32" value = "-0.4944, -0.00023, 53262.0"/>
  • trunk/psLib/test/xml/tst_psXML.c

    r4822 r5000  
    1515*  @author  Dave Robbins, MHPCC
    1616*
    17 *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
    18 *  @date  $Date: 2005-08-20 01:49:03 $
     17*  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
     18*  @date  $Date: 2005-09-12 21:36:54 $
    1919*
    2020*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    121121        printf("Key Type:  F64      Key Value: %15.3f  ", metadataItem->data.F64);
    122122        break;
    123     case PS_DATA_METADATA:
     123    case PS_META_META:
    124124        printf("Key Type:  METADATA    ");
    125125        break;
     
    138138        printf("%s", (char*)metadataItem->data.V );
    139139        printf("\n");
     140    } else if ( !strncmp(metadataItem->name, "psLib.TIME.Magazine", 256) ) {
     141        printf("Key Value:   ");
     142        printf("%ld, ", ((psTime*)(metadataItem->data.V))->sec );
     143        printf("%u, ", ((psTime*)(metadataItem->data.V))->nsec );
     144        if( ((psTime*)(metadataItem->data.V))->leapsecond )
     145            printf("TRUE  ");
     146        else
     147            printf("FALSE  ");
     148        if( ((psTime*)(metadataItem->data.V))->type == PS_TIME_UTC )
     149            printf("PS_TIME_UTC ");
     150        else if( ((psTime*)(metadataItem->data.V))->type == PS_TIME_TAI )
     151            printf("PS_TIME_TAI ");
     152        else if( ((psTime*)(metadataItem->data.V))->type == PS_TIME_UT1 )
     153            printf("PS_TIME_UT1 ");
     154        else if( ((psTime*)(metadataItem->data.V))->type == PS_TIME_TT )
     155            printf("PS_TIME_TT ");
     156        printf("\n");
    140157    } else
    141158        printf("Key Comment: %s\n", metadataItem->comment);
  • trunk/psLib/test/xml/verified/tst_psXML.stdout

    r4791 r5000  
    77 Key Name:    psLib.time.BOOL.value3  Key Type:  BOOL     Key Value:               1  Key Comment:
    88 Key Name:    psLib.time.BOOL.value4  Key Type:  BOOL     Key Value:               0  Key Comment:
     9 Key Name:       psLib.TIME.Magazine  Key type:  psPtr    Key Value:   1000, 25, FALSE  PS_TIME_UTC
    910 Key Name:     psLib.time.Vector.S32  Key type:  psPtr    Key Values:   -4  -2  506 
    1011 Key Name:     psLib.time.Vector.F32  Key type:  psPtr    Key Comment:
    1112 Key Name:     psLib.time.Vector.F64  Key type:  psPtr    Key Comment:
    12  Key Name:                      cell  Key type:  psPtr    Key Comment:
     13 Key Name:                      cell  Key Type:  METADATA    Key Comment:
    1314 Key Name:     psLib.time.tables.dir  Key type:  psPtr    Key Value:   ../../data
    1415
     
    1617 Key Name:    psLib.time.BOOL.value4  Key Type:  BOOL     Key Value:               0  Key Comment:
    1718 Key Name:      psLib.time.F32.value  Key Type:  F32      Key Value:       50324.422  Key Comment:
    18  Key Name:                      cell  Key type:  psPtr    Key Comment:
     19 Key Name:                      cell  Key Type:  METADATA    Key Comment:
    1920 Key Name:     psLib.time.Vector.F64  Key type:  psPtr    Key Comment:
     21 Key Name:       psLib.TIME.Magazine  Key type:  psPtr    Key Value:   1000, 25, FALSE  PS_TIME_UTC
    2022 Key Name:      psLib.time.F64.value  Key Type:  F64      Key Value:       80112.490  Key Comment:
    2123 Key Name:     psLib.time.Vector.S32  Key type:  psPtr    Key Values:   -4  -2  506 
Note: See TracChangeset for help on using the changeset viewer.