1    /* 
     2     *  Copyright (c) 2008 Texas Instruments. All rights reserved. 
     3     *  This program and the accompanying materials are made available under the 
     4     *  terms of the Eclipse Public License v1.0 and Eclipse Distribution License
     5     *  v. 1.0 which accompanies this distribution. The Eclipse Public License is
     6     *  available at http://www.eclipse.org/legal/epl-v10.html and the Eclipse
     7     *  Distribution License is available at 
     8     *  http://www.eclipse.org/org/documents/edl-v10.php.
     9     *
    10     *  Contributors:
    11     *      Texas Instruments - initial implementation
    12     * */
    13    /*
    14     *  ======== ITimestampClient.xdc ========
    15     */
    16    package xdc.runtime;
    17    
    18    /*!
    19     *  ======== ITimestampClient ========
    20     *  Timestamp Client Interface
    21     *
    22     *  This interface defines the methods used by client applications to
    23     *  get timestamp values.  It is implemented by the 
    24     *  `{@link xdc.runtime.Timestamp Timestamp}` module.
    25     */
    26    interface ITimestampClient {
    27    
    28        /*!
    29         *  ======== get32 ========
    30         *  Return a 32-bit timestamp
    31         *
    32         *  @a(returns)
    33         *  Returns a 32-bit timestamp value.  
    34         *  Use `{@link #getFreq}` to convert this value into units of real time.
    35         *
    36         *  @see #get64
    37         */
    38        Bits32 get32();
    39    
    40        /*!
    41         *  ======== get64 ========
    42         *  Return a 64-bit timestamp
    43         *
    44         *  @param(result)  pointer to 64-bit result
    45         *
    46         *      This parameter is a pointer to a structure representing a 64-bit
    47         *      wide timestamp value where the current timestamp is written.
    48         *
    49         *      If the underlying hardware does not support 64-bit resolution, the
    50         *      `hi` field of `result` is always set to 0; see
    51         *      `{@link xdc.runtime.Types#Timestamp64}`.  So, it is possible for 
    52         *      the `lo` field to wrap around without any change to the `hi` field.
    53         *      Use `{@link #getFreq}` to convert this value into units of real 
    54         *      time.
    55         *
    56         *  @see #get32
    57         */
    58        Void get64(Types.Timestamp64 *result);
    59        
    60        /*!
    61         *  ======== getFreq ========
    62         *  Get the timestamp timer's frequency (in Hz)
    63         *
    64         *  @param(freq)  pointer to a 64-bit result
    65         *
    66         *      This parameter is a pointer to a structure representing a 64-bit
    67         *      wide frequency value where the timer's frequency (in Hz)
    68         *      is written; see `{@link xdc.runtime.Types#FreqHz}`.
    69         *      This function provides a way of converting timestamp 
    70         *      values into units of real time.
    71         *
    72         *  @see #get32
    73         *  @see #get64
    74         */
    75        Void getFreq(Types.FreqHz *freq);
    76    }
    77    /*
    78     *  @(#) xdc.runtime; 2, 1, 0,371; 2-10-2012 10:18:54; /db/ztree/library/trees/xdc/xdc-y21x/src/packages/
    79     */
    80