ED247 Library  VA2.3.0
Implementation of ED247-A standard
Time management

Detailed Description

Functions to set simulation time for receive timestamp

Typedefs

typedef void(* ed247_get_time_t) (ed247_timestamp_t *timestamp)
 Prototype of a function to get time.
 

Functions

LIBED247_EXPORT void ed247_get_time (ed247_timestamp_t *timestamp)
 Return the current time. More...
 
LIBED247_EXPORT void ed247_set_transport_timestamp_callback (ed247_get_time_t callback)
 Set the function to use to timestamp the transport (aka emit date) More...
 
LIBED247_EXPORT void ed247_set_receive_timestamp_callback (ed247_get_time_t callback)
 Set the function to use to timestamp the incoming streams (aka receive date) More...
 
LIBED247_EXPORT void ed247_get_transport_timestamp (ed247_timestamp_t *timestamp)
 Return the time to timestamp the transport. More...
 
LIBED247_EXPORT void ed247_get_receive_timestamp (ed247_timestamp_t *timestamp)
 Return the time to timestamp the incoming streams. More...
 

Function Documentation

LIBED247_EXPORT void ed247_get_time ( ed247_timestamp_t timestamp)

Return the current time.

This implementation use an internal and system-specific implementation.
This is the default function used to fill transport timestamp and receive timestamp.

You may want to provide your own implementation with the methods:

  • ed247_register_transport_timestamp_callback()
  • ed247_register_receive_timestamp_callback()
Parameters
[out]timestampFilled with current time
LIBED247_EXPORT void ed247_set_transport_timestamp_callback ( ed247_get_time_t  callback)

Set the function to use to timestamp the transport (aka emit date)

The default function is ed247_get_time().
The emmiter will wrote the TTS only if enabled by ECIC file.
The receiver can read the value in the field ed247_sample_details_t->transport_timestamp returned by ed247_stream_pop_sample() and ed247_stream_assistant_pop_sample() functions.

Parameters
[in]callbackFunction that will provide current time
LIBED247_EXPORT void ed247_set_receive_timestamp_callback ( ed247_get_time_t  callback)

Set the function to use to timestamp the incoming streams (aka receive date)

The default function is ed247_get_time().
The library will date incoming stream during the call of ed247_wait_frame() and ed247_wait_during() methods.
It will provide the value in the recv_timestamp field of ed247_stream_pop_sample() and ed247_stream_assistant_pop_sample() functions.

Parameters
[in]callbackFunction that will provide current time
LIBED247_EXPORT void ed247_get_transport_timestamp ( ed247_timestamp_t timestamp)

Return the time to timestamp the transport.

Call either ed247_get_time() or the function set by ed247_set_transport_timestamp_callback()

Parameters
[out]timestampFilled with the appropriate time
LIBED247_EXPORT void ed247_get_receive_timestamp ( ed247_timestamp_t timestamp)

Return the time to timestamp the incoming streams.

Call either ed247_get_time() or the function set by ed247_set_receive_timestamp_callback()

Parameters
[out]timestampFilled with the appropriate time