Apama  10.15.1.2
AP_TimestampSet.h File Reference

Hires Timestamps. More...

#include <AP_Platform.h>
#include <IAF_Platform.h>
#include <sys/timeb.h>
#include <string.h>

Go to the source code of this file.

Classes

struct  AP_TimestampSet_Functions
 AP_TimestampSet_Functions. More...
 
struct  AP_TimestampSet
 AP_TimestampSet. More...
 

Macros

#define AP_TIMESTAMP_DOWNSTREAM_IAF_TRANSPORT_ENTRY   1000
 Optionally implemented by a transport, represents the time a message from the external system is received by the transport. More...
 
#define AP_TIMESTAMP_DOWNSTREAM_IAF_TRANSPORT_EXIT   1249
 Optionally implemented by a transport, represents the time a message leaves the transport. More...
 
#define AP_TIMESTAMP_DOWNSTREAM_IAF_DECODER_ENTRY   1250
 Optionally implemented by a codec, represents the time a message from the transport enters the codec. More...
 
#define AP_TIMESTAMP_DOWNSTREAM_IAF_DECODER_EXIT   1499
 Optionally implemented by a codec, represents the time a normalised event leaves the codec (for the semantic mapper). More...
 
#define AP_TIMESTAMP_DOWNSTREAM_IAF_MAPPER_ENTRY   1500
 Represents the time a normalised event enters the semantic mapper before being sent to the Correlator. More...
 
#define AP_TIMESTAMP_DOWNSTREAM_IAF_MAPPER_EXIT   1749
 Represents the time a normalised event leaves the semantic mapper before being sent to the Correlator. More...
 
#define AP_TIMESTAMP_DOWNSTREAM_IAF_APAMA_ENTRY   1750
 Not currently implemented, do not use. More...
 
#define AP_TIMESTAMP_DOWNSTREAM_IAF_APAMA_EXIT   1999
 Not currently implemented, do not use. More...
 
#define AP_TIMESTAMP_UPSTREAM_IAF_APAMA_ENTRY   19000
 Not currently implemented, do not use. More...
 
#define AP_TIMESTAMP_UPSTREAM_IAF_APAMA_EXIT   19249
 Not currently implemented, do not use. More...
 
#define AP_TIMESTAMP_UPSTREAM_IAF_MAPPER_ENTRY   19250
 Represents the time an Apama event from the Correlator enters the semantic mapper. More...
 
#define AP_TIMESTAMP_UPSTREAM_IAF_MAPPER_EXIT   19499
 Represents the time an Apama event from the Correlator leaves the semantic mapper. More...
 
#define AP_TIMESTAMP_UPSTREAM_IAF_ENCODER_ENTRY   19500
 Optionally implemented by a codec, represents the time a normalised event from the semantic mapper enters the codec. More...
 
#define AP_TIMESTAMP_UPSTREAM_IAF_ENCODER_EXIT   19749
 Optionally implemented by a codec, represents the time a normalised event leaves the codec. More...
 
#define AP_TIMESTAMP_UPSTREAM_IAF_TRANSPORT_ENTRY   19750
 Optionally implemented by a transport, represents the time a message from the codec enters the transport. More...
 
#define AP_TIMESTAMP_UPSTREAM_IAF_TRANSPORT_EXIT   19999
 Optionally implemented by a transport, represents the time a message leaves the transport and is to sent to the external system. More...
 

Typedefs

typedef AP_uint64 AP_TimestampSetIndex
 Field keys are integer indices. More...
 
typedef double AP_TimestampSetTime
 Field values are double-precision floating point numbers. More...
 

Functions

AP_COMMON_API AP_TimestampSetAP_TimestampSet_ctor ()
 AP_TimestampSet_ctor. More...
 
AP_COMMON_API AP_TimestampSetAP_TimestampSet_copy (AP_TimestampSet *old)
 AP_TimestampSet_copy. More...
 
AP_COMMON_API void AP_TimestampSet_dtor (AP_TimestampSet *timestamp)
 AP_TimestampSet_dtor. More...
 
AP_COMMON_API AP_TimestampSetTime AP_TimestampSet_getRelativeTime ()
 AP_TimestampSet_getRelativeTime. More...
 

Detailed Description

Hires Timestamps.

Macro Definition Documentation

◆ AP_TIMESTAMP_DOWNSTREAM_IAF_APAMA_ENTRY

#define AP_TIMESTAMP_DOWNSTREAM_IAF_APAMA_ENTRY   1750

Not currently implemented, do not use.

◆ AP_TIMESTAMP_DOWNSTREAM_IAF_APAMA_EXIT

#define AP_TIMESTAMP_DOWNSTREAM_IAF_APAMA_EXIT   1999

Not currently implemented, do not use.

◆ AP_TIMESTAMP_DOWNSTREAM_IAF_DECODER_ENTRY

#define AP_TIMESTAMP_DOWNSTREAM_IAF_DECODER_ENTRY   1250

Optionally implemented by a codec, represents the time a message from the transport enters the codec.

◆ AP_TIMESTAMP_DOWNSTREAM_IAF_DECODER_EXIT

#define AP_TIMESTAMP_DOWNSTREAM_IAF_DECODER_EXIT   1499

Optionally implemented by a codec, represents the time a normalised event leaves the codec (for the semantic mapper).

◆ AP_TIMESTAMP_DOWNSTREAM_IAF_MAPPER_ENTRY

#define AP_TIMESTAMP_DOWNSTREAM_IAF_MAPPER_ENTRY   1500

Represents the time a normalised event enters the semantic mapper before being sent to the Correlator.

◆ AP_TIMESTAMP_DOWNSTREAM_IAF_MAPPER_EXIT

#define AP_TIMESTAMP_DOWNSTREAM_IAF_MAPPER_EXIT   1749

Represents the time a normalised event leaves the semantic mapper before being sent to the Correlator.

◆ AP_TIMESTAMP_DOWNSTREAM_IAF_TRANSPORT_ENTRY

#define AP_TIMESTAMP_DOWNSTREAM_IAF_TRANSPORT_ENTRY   1000

Optionally implemented by a transport, represents the time a message from the external system is received by the transport.

◆ AP_TIMESTAMP_DOWNSTREAM_IAF_TRANSPORT_EXIT

#define AP_TIMESTAMP_DOWNSTREAM_IAF_TRANSPORT_EXIT   1249

Optionally implemented by a transport, represents the time a message leaves the transport.

◆ AP_TIMESTAMP_UPSTREAM_IAF_APAMA_ENTRY

#define AP_TIMESTAMP_UPSTREAM_IAF_APAMA_ENTRY   19000

Not currently implemented, do not use.

◆ AP_TIMESTAMP_UPSTREAM_IAF_APAMA_EXIT

#define AP_TIMESTAMP_UPSTREAM_IAF_APAMA_EXIT   19249

Not currently implemented, do not use.

◆ AP_TIMESTAMP_UPSTREAM_IAF_ENCODER_ENTRY

#define AP_TIMESTAMP_UPSTREAM_IAF_ENCODER_ENTRY   19500

Optionally implemented by a codec, represents the time a normalised event from the semantic mapper enters the codec.

◆ AP_TIMESTAMP_UPSTREAM_IAF_ENCODER_EXIT

#define AP_TIMESTAMP_UPSTREAM_IAF_ENCODER_EXIT   19749

Optionally implemented by a codec, represents the time a normalised event leaves the codec.

◆ AP_TIMESTAMP_UPSTREAM_IAF_MAPPER_ENTRY

#define AP_TIMESTAMP_UPSTREAM_IAF_MAPPER_ENTRY   19250

Represents the time an Apama event from the Correlator enters the semantic mapper.

◆ AP_TIMESTAMP_UPSTREAM_IAF_MAPPER_EXIT

#define AP_TIMESTAMP_UPSTREAM_IAF_MAPPER_EXIT   19499

Represents the time an Apama event from the Correlator leaves the semantic mapper.

◆ AP_TIMESTAMP_UPSTREAM_IAF_TRANSPORT_ENTRY

#define AP_TIMESTAMP_UPSTREAM_IAF_TRANSPORT_ENTRY   19750

Optionally implemented by a transport, represents the time a message from the codec enters the transport.

◆ AP_TIMESTAMP_UPSTREAM_IAF_TRANSPORT_EXIT

#define AP_TIMESTAMP_UPSTREAM_IAF_TRANSPORT_EXIT   19999

Optionally implemented by a transport, represents the time a message leaves the transport and is to sent to the external system.

Typedef Documentation

◆ AP_TimestampSetIndex

typedef AP_uint64 AP_TimestampSetIndex

Field keys are integer indices.

These are referred to by symbolic constants, defined above.

◆ AP_TimestampSetTime

typedef double AP_TimestampSetTime

Field values are double-precision floating point numbers.

These measure time in seconds.

Function Documentation

◆ AP_TimestampSet_copy()

AP_COMMON_API AP_TimestampSet* AP_TimestampSet_copy ( AP_TimestampSet old)

AP_TimestampSet_copy.

Creates a deep copy of an existing timestamp instance.

Parameters
oldThe existing timestamp to be copied.
Returns
Pointer to a new timestamp instance whose contents are an exact copy of old, or NULL if the new instance could not be created for some reason.

◆ AP_TimestampSet_ctor()

AP_COMMON_API AP_TimestampSet* AP_TimestampSet_ctor ( )

AP_TimestampSet_ctor.

Constructs a new timestamp instance.

Returns
Pointer to a new timestamp instance, or NULL if the new instance could not be created for some reason.

◆ AP_TimestampSet_dtor()

AP_COMMON_API void AP_TimestampSet_dtor ( AP_TimestampSet timestamp)

AP_TimestampSet_dtor.

Destroys a timestamp object. This function should be called as soon as the timestamp is no longer required, to free any resources it occupies.

Parameters
timestampThe timestamp to be destroyed.

◆ AP_TimestampSet_getRelativeTime()

AP_COMMON_API AP_TimestampSetTime AP_TimestampSet_getRelativeTime ( )

AP_TimestampSet_getRelativeTime.

Get a current high-resolution timestamp in a format suitable for passing to other AP_TimestampSet functions. The timestamp value represents the number of seconds that have passed since some (unspecified) epoch time. Timestamps return by this function have no necessary relationship to wall clock time and should only be used to compare against other "relative" timestamps from the same machine.

Returns
Current high-resolution relative timestamp