interface xdc.runtime.ITimestampProvider |
|
|
|
Timestamp provider interface
This interface is implemented by platform-specific modules that
"provide" underlying timestamp services for the
xdc.runtime.Timestamp module.
[
more ... ]
interface ITimestampProvider { ...
module-wide config parameters
module-wide functions
}
DETAILS
This interface is implemented by platform-specific modules that
"provide" underlying timestamp services for the
xdc.runtime.Timestamp module.
Only the
xdc.runtime.Timestamp module and the
xdc.runtime.ITimestampClient interface should be directly
referenced by platform-independent applications.
This interface is part of a design pattern that includes the
ITimestampClient interface and the Timestamp module. This pattern
allows client code to:
- use the platform-independent interfaces provided by either
ITimestampClient and Timestamp and remain 100% portable
- optionally leverage platform-specific capabilities
of any module that implements ITimestampProvider and still always
have access to the platform-independent methods specified by
ITimestampClient (because ITimestampProvider inherits from
ITimestampClient)
This pattern is in contrast to other "provider" interfaces that exist only
to specify the methods necessary to enable "higher-level" modules; client
code *never* accesses these provider interfaces directly, clients always
only use the higher-level modules.
metaonly config ITimestampProvider.common$ // module-wide |
|
Common module configuration parameters
DETAILS
All modules have this configuration parameter. Its name
contains the '$' character to ensure it does not conflict with
configuration parameters declared by the module. This allows
new configuration parameters to be added in the future without
any chance of breaking existing modules.
ITimestampProvider.get32( ) // module-wide |
|
Return a 32-bit timestamp
RETURNS
Returns a 32-bit timestamp value.
Use
getFreq to convert this value into units of real time.
SEE
ITimestampProvider.get64( ) // module-wide |
|
Return a 64-bit timestamp
ARGUMENTS
result
pointer to 64-bit result
This parameter is a pointer to a structure representing a 64-bit
wide timestamp value where the current timestamp is written.
If the underlying hardware does not support 64-bit resolution, the
hi field of
result is always set to 0; see
xdc.runtime.Types.Timestamp64. So, it is possible for
the
lo field to wrap around without any change to the
hi field.
Use
getFreq to convert this value into units of real
time.
SEE
ITimestampProvider.getFreq( ) // module-wide |
|
Get the timestamp timer's frequency (in Hz)
ARGUMENTS
freq
pointer to a 64-bit result
This parameter is a pointer to a structure representing a 64-bit
wide frequency value where the timer's frequency (in Hz)
is written; see
xdc.runtime.Types.FreqHz.
This function provides a way of converting timestamp
values into units of real time.
SEE
generated on Wed, 06 Jan 2010 18:40:41 GMT