MX Foundation 4
|
Functions | |
uint32 | mxfSystemTimeBaseGet (HMXF_SERVER server, uint64 *timebase) |
uint32 | mxfSystemTimeBaseSet (HMXF_SERVER server, uint64 timebase) |
uint32 | mxfSleep (uint64 delay) |
uint64 | mxfPerfCounterGet (void) |
uint64 | mxfPerfCounterComputeUsec (uint64 time1, uint64 time2) |
uint32 | mxfDeviceIrigbStatusGet (HMXF_DEVICE device, uint64 *status) |
uint32 | mxfDeviceIrigbTimerGet (HMXF_DEVICE device, MXF_TIMER_IRIGB *timer) |
uint32 | mxfDeviceIrigbBcdCompose (uint64 years, uint64 days, uint64 hours, uint64 minutes, uint64 seconds, uint64 *bcd) |
uint32 | mxfDeviceIrigbBcdDecompose (uint64 bcd, uint64 *years, uint64 *days, uint64 *hours, uint64 *minutes, uint64 *seconds) |
uint32 | mxfDeviceIrigbBcdToBinary (uint64 bcd, uint64 *seconds) |
uint32 | mxfDeviceIrigbAsyncEventInit (HMXF_DEVICE device, void *context, MXF_ASYNCEVENT_IRIGB_HANDLER callback) |
uint32 | mxfDeviceIrigbAsyncEventTerminate (HMXF_DEVICE device) |
uint32 | mxfDeviceTimerGet (HMXF_DEVICE device, uint64 *timer) |
uint32 mxfSystemTimeBaseGet | ( | HMXF_SERVER | server, |
uint64 * | timebase | ||
) |
Returns the current timebase for the application. The timebase lets the user choose the time resolution (µs or ns) and time tag format (device, computer or IRIG-B) of various functions.
[in] | server | server handle | |||||||||||||||||||||
[out] | timebase | timebase returned
|
uint32 mxfSystemTimeBaseSet | ( | HMXF_SERVER | server, |
uint64 | timebase | ||
) |
Sets the timebase used by the application. The timebase lets the user choose the time resolution (µs or ns) and time tag format (device, computer or IRIG-B) of various functions. The default timebase is MXF_TIMEBASE_DEVICE_NSEC.
The timebase setting is per server for remote application and per process for local application. Changes made by this function are global to all channels in this server or process.
Automatic embedded non-volatile storage recording uses the time base of the last call to mxfSystemTimeBaseSet().
With MX-Embedded, the timebase setting is ignored. The time tag received or to be used with transmission is of type MXF_TIMEBASE_DEVICE_NSEC.
[in] | server | server handle | |||||||||||||||||||||
[in] | timebase | timebase values are defined below;
|
uint32 mxfSleep | ( | uint64 | delay | ) |
Suspends the execution of the current thread until the time-out interval elapses.
[in] | delay | value in milliseconds (maximum is 65535 ms). |
uint64 mxfPerfCounterGet | ( | void | ) |
Gets the current value of the counter, which is a high resolution time stamp that can be used for time-interval measurements.
uint64 mxfPerfCounterComputeUsec | ( | uint64 | time1, |
uint64 | time2 | ||
) |
Computes the time difference, in microseconds, between two counters.
[in] | time1 | first counter |
[in] | time2 | last counter |
uint32 mxfDeviceIrigbStatusGet | ( | HMXF_DEVICE | device, |
uint64 * | status | ||
) |
Returns the device IRIG-B signal status.
[in] | device | device handle | ||||||||||||
[out] | status | IRIG-B signal status state.
|
uint32 mxfDeviceIrigbTimerGet | ( | HMXF_DEVICE | device, |
MXF_TIMER_IRIGB * | timer | ||
) |
Reads the device IRIG-B time and the device RTC time associated with the IRIG-B time.
[in] | device | device handle |
[out] | timer | pointer to a IRIG-B MXF_TIMER_IRIGB structure. |
uint32 mxfDeviceIrigbBcdCompose | ( | uint64 | years, |
uint64 | days, | ||
uint64 | hours, | ||
uint64 | minutes, | ||
uint64 | seconds, | ||
uint64 * | bcd | ||
) |
Builds a 40-bit IRIG-B time value from time components.
[in] | years | years |
[in] | days | days |
[in] | hours | hours |
[in] | minutes | minutes |
[in] | seconds | seconds |
[out] | bcd | 40-bit IRIG-B value |
uint32 mxfDeviceIrigbBcdDecompose | ( | uint64 | bcd, |
uint64 * | years, | ||
uint64 * | days, | ||
uint64 * | hours, | ||
uint64 * | minutes, | ||
uint64 * | seconds | ||
) |
Extracts the components of a 40-bit IRIG-B time.
[in] | bcd | 40-bit IRIG-B value |
[out] | years | years |
[out] | days | days |
[out] | hours | hours |
[out] | minutes | minutes |
[out] | seconds | seconds |
uint32 mxfDeviceIrigbBcdToBinary | ( | uint64 | bcd, |
uint64 * | seconds | ||
) |
Converts IRIG-B BCD time to binary time.
[in] | bcd | BCD time value. If the BCD time includes years, the years part will be ignored. |
[out] | seconds | value converted in seconds |
uint32 mxfDeviceIrigbAsyncEventInit | ( | HMXF_DEVICE | device, |
void * | context, | ||
MXF_ASYNCEVENT_IRIGB_HANDLER | callback | ||
) |
Sets an async event handler for an IRIG-B event. When the IRIG-B event will happened, the callback will be called once and will be called again only when the IRIG-B event will happen again.
The possible IRIG-B events are:
IRIG-B event | Description |
---|---|
MXF_ASYNCEVENT_IRIGB_EVENT_LOCKED | IRIG-B: signal locked detection |
MXF_ASYNCEVENT_IRIGB_EVENT_UNLOCKED | IRIG-B: signal unlocked detection |
MXF_ASYNCEVENT_IRIGB_EVENT_LEAP_SECOND_INS | Positive leap second detection (23:59:60) |
MXF_ASYNCEVENT_IRIGB_EVENT_LEAP_SECOND_DEL | Negative leap second detection (no 23:59:59) |
[in] | device | device handle |
[in] | context | handler callback context |
[in] | callback | IRIG-B event callback handler |
The callback handler function is defined as follow:
[in] device: device handle [in] timeTag: IRIG-B event timetag [in] status: IRIG-B event [in] context: context pointer
uint32 mxfDeviceIrigbAsyncEventTerminate | ( | HMXF_DEVICE | device | ) |
Clears the async event handler for an IRIB-B event.
[in] | device | device handle |
uint32 mxfDeviceTimerGet | ( | HMXF_DEVICE | device, |
uint64 * | timer | ||
) |
Reads the device RTC timer.
[in] | device | device handle |
[out] | timer | device timer based on the timebase |