WCProtocolClient

@interface WCProtocolClient : NSObject

A class implementing the client-side (Companion app) functionality of the DVB-CSS WallClock protocol. This client reads time values from the wall clock and uses it to initialise a WallClock protocol request message before sending the message to the WallClock server. Upon reception of the WallClock response, it creates a Candidate measurement object which is then passed on to the CandidateSink object for further processing.

The CandidateSink object reads candidate measurements, calculate the wallclock offset (between the protocol client’s wallclock and the protocol server’s wallclock) and readjusts the local wallclock with the offset. With this approach, the WallClockClient component, uses a feedback loop to submit new originate_timevalue timestamps, calculate the wallclock offset and readjust the WallClock time based on this offset.

  • wall clock server host name

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSString *hostName;

    Swift

    var hostName: String! { get set }
  • resolved host address from host name

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSData *hostAddress;

    Swift

    var hostAddress: Data! { get set }
  • Wallclock server port

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) NSUInteger port;

    Swift

    var port: UInt { get set }
  • A candidate measurement processing object

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) id<ICandidateHandler> candidateSink;

    Swift

    var candidateSink: ICandidateHandler! { get set }
  • A reference to a wallclock to use for originate_time and response_time timestamps

    Declaration

    Objective-C

    @property (readonly, atomic) int *wallclockRef;

    Swift

    var wallclockRef: UnsafeMutablePointer
  • running status of this component

    Declaration

    Objective-C

    @property (readonly, getter=isRunning, atomic) BOOL running;

    Swift

    var isRunning: Bool { get }
  • limit on messages per second this component can emit

    Declaration

    Objective-C

    @property (readonly, atomic) uint32_t ratelimit;

    Swift

    var ratelimit: UInt32 { get }
  • WC Synchronisation request wait time in milliseconds

    Declaration

    Objective-C

    @property (readonly, atomic) uint32_t requestWaitTime;

    Swift

    var requestWaitTime: UInt32 { get }
  • Undocumented

    Declaration

    Objective-C

    @interface WCProtocolClient : NSObject
  • Initialise a WallClock protocol client instance

    Declaration

    Objective-C

    - (id)initWithHost:(NSString *)hostname
                  Port:(NSUInteger)port
         CandidateSink:(id<ICandidateHandler>)can_sink
          AndWallClock:(id)clock;

    Swift

    init!(host hostname: String!, port: UInt, candidateSink can_sink: ICandidateHandler!, andWallClock clock: Any!)

    Parameters

    hostname
    • DNS-resolvable hostname of the machine running the Wall Clock server (e.g. a DVB-TV)
    port
    • port WallClock server is configured to listen to
    can_sink
    • a handler for candidate measurements. WCClient will enqueue candidate measurements
    clock
    • a clock to use for getting timestamps and calculating offsets, e.g. the local WallClock instance

    Return Value

    an WCClient instance.

  • Start WallClock sync measurement collection session. Starts the emission of WC protocol request messages.

    Declaration

    Objective-C

    - (void)start;

    Swift

    func start()
  • Stop the WallClock sync. This stops the emission of new WallClock protocol request messages

    Declaration

    Objective-C

    - (void)stop;

    Swift

    func stop()