Files
DP44/DataPRO/IService/Interfaces/IClockSyncActions.cs
2026-04-17 14:55:32 -04:00

99 lines
3.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using DTS.Common;
namespace DTS.DASLib.Service.Interfaces
{
public interface IClockSyncActions
{
/// <summary>
/// Retrieve the current clock source & sync status from the DAS
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
///
void GetClockSyncStatus(ServiceCallback callback, object userData);
//- Command Parameter: uint8[4]. Default = 0.
//- Response data payload byte stream:
//Byte 0: Input Synchronization Clock Source
//---- Bit_0: PTP
//---- Bit_1: IRIG-B122
//---- Bit_2: GPS
//---- Bit_3: 1PPS
//---- Bit_7:4: RSV
//Byte 1: Output Synchronization Clock Source
//---- Bit_1:0: = 0 disable.
// 1 = PTP Master
// 2 = PTP Boundary
// 3 = Reserved
//---- Bit_2: E2E(0)/P2P(1)
//---- Bit_3: 1PPS
//---- Bit_7:4: Reserved
//Byte 2: Synchronization Status.
//---- Bit_0: PTP
//---- Bit_1: IRIG-B122
//---- Bit_2: GPS
//---- Bit_3: 1PPS
//---- Bit_7:4: RSV
// Bit set = true.Clear = false.
//Byte 3: Current Arm State.
//Byte[7:4] = 32bit for seconds when sync is locked. --
//Byte[11:8] = 32bit for nanoseconds when sync is locked. 64-bit PTP format to keep track of sync status
//Byte[15:12] = 32bit for seconds when sync is lost. --
//Byte[19:16] = 32bit for nanoseconds when sync is lost. 64-bit PTP format to keep track of sync status
//Byte[31:20] = 12 bytes reserved for future usage.
// Total data response = 32B in payload.
/// <summary>
/// Set the input and output clock configuration for the DAS
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
/// <param name="profile">Whatever you want to pass along</param>
///
void SetClockSyncConfig(ServiceCallback callback, object userData, ClockSyncProfile profile);
//SLICE6 AIR has various input clock synchronization methods such as PTP, GPS/1PPS, or IRIG.In addition, it can also be acting as PTP boundary/master on the Ethernet output.
//Currently supported inputs:
//1. 1588 PTP
//2. IRIG-B122
//3. GPS/1PPS
// Note that 1PPS can be a standalone feature in addition to GPS, IRIGB or even 1588. For Clock Synchronization commands, we are adding set/query clocksync as following:
//(Command Class of SYNC1588)
//Set Clocksync config: CMD_CLOCKSYNC_SET_CONFIG(0x0D)
// - Command Parameter: uint8[4].
//Byte 0: Input Synchronization Clock Source
//---- Bit_0: PTP
//---- Bit_1: IRIG-B122
//---- Bit_2: GPS
//---- Bit_3: 1PPS
//---- Bit_7:4: RSV
//Byte 1: Output Synchronization Clock Source
//---- Bit_1:0: = 0 disable.
// 1 = PTP Master
// 2 = PTP Boundary
// 3 = Reserved
//---- Bit_2: E2E(0)/P2P(1)
//---- Bit_3: 1PPS
//---- Bit_7:4: Reserved
//Byte 2: Reserved
// Byte 3: Reserved
//- Response with Status Code Success(0) or Error Code(non-zero)
//No payload.
void GetPTPDomainID(ServiceCallback callback, object userData);
void SetPTPDomainID(ServiceCallback callback, object userData, byte domainID);
}
}