ADTF
Loading...
Searching...
No Matches
reference_clock_intf.h
Go to the documentation of this file.
1
7#pragma once
8
10#include <adtfbase/chrono.h>
13
16#define CID_ADTF_REFERENCE_CLOCK "reference_clock.service.adtf.cid"
17
18namespace adtf
19{
20namespace services
21{
22namespace ant
23{
24
34{
35 protected:
37 ~IReferenceClock() = default;
38 public:
39
44 ADTF_IID(IReferenceClock, "reference_clock.ant.streaming.adtf.iid");
45
46 public:
47
52 static const int ADTF_MAX_CLOCK_NAME_LENGTH = 256;
53
54 public:
55
68
83 {
85 tHandle hObject;
89 tTimeStamp nOldTime;
91 tTimeStamp nNewTime;
92 };
93
99 class IClock: public ucom::IObject
100 {
101 public:
106 ADTF_IID(IClock, "clock.reference_clock.ant.streaming.adtf.iid");
107
108 public:
112 virtual tResult GetName(adtf::base::ant::IString&& strName) const = 0;
113
119 virtual tTimeStamp GetTime() const = 0;
120 };
121
126 {
127 public:
134 };
135
140 {
141 public:
146 ADTF_IID(ISync2RefChannel, "sync2ref_channel.reference_clock.ant.streaming.adtf.iid");
147
148 public:
174 virtual tTimeStamp Sync2RefTime(tTimeStamp tmInputTime) = 0;
199 virtual tTimeStamp Sync2RefTime(tTimeStamp tmRefStreamTime, tTimeStamp tmInputTime) = 0;
200 };
201
206 {
207 public:
212 ADTF_IID(ISync2RefChannelFactory, "sync2ref_channel_factory.reference_clock.ant.streaming.adtf.iid");
213
214 public:
215 virtual tResult GetName(adtf::base::ant::IString&& strName) const = 0;
216 virtual tResult GetSync2RefChannel(adtf::ucom::ant::iobject_ptr<ISync2RefChannel>& pSync2RefChannel, const char* strName = nullptr) = 0;
217 };
218
223 {
224 public:
231 };
232
233
234 public:
242 virtual tTimeStamp GetTime() const = 0;
243
251 virtual tTimeStamp GetStreamTime() const = 0;
252
261
269
276 virtual tResult GetClocks(IClockListCallback& oCallback) const = 0;
277
285 virtual tResult GetClock(const char* strName, adtf::ucom::ant::iobject_ptr<IClock>& pClock) const = 0;
286
298 virtual tResult SetMainClock(const char* strName) = 0;
299
304 virtual tResult GetMainClock(adtf::base::ant::IString&& strName) const = 0;
305
313 virtual tResult SetStreamClock(const char* strName) = 0;
314
319 virtual tResult GetStreamClock(adtf::base::ant::IString&& strName) const = 0;
320
327
334
341
350 ADTF3_DEPRECATED("Use adtf::services::vision::GetSync2RefChannel(adtf::ucom::ant::iobject_ptr<adtf::services::vision::IReferenceClock::ISync2RefChannel>& pSync2RefChannel, const char* strName = nullptr, const char* strMethod = nullptr) instead.")
351 virtual tResult GetSync2RefChannel(adtf::ucom::ant::iobject_ptr<ISync2RefChannel>& pSync2RefChannel,
352 const char* strName = nullptr, const char* strMethod = nullptr) const = 0;
353};
354
355} //namespace ant
356
357namespace flash
358{
359
364{
365 protected:
367 ~IReferenceClock() = default;
368
369 public:
370
375 ADTF_IID(IReferenceClock, "reference_clock.flash.streaming.adtf.iid");
376
377 public:
398
403 {
404 public:
409 ADTF_IID(IClock, "clock.reference_clock.flash.streaming.adtf.iid");
410
411 public:
417 };
418
423 {
424 public:
429 ADTF_IID(ISync2RefChannel, "sync2ref_channel.reference_clock.flash.streaming.adtf.iid");
430
431 public:
433 virtual base::flash::tNanoSeconds Sync2RefTime(base::flash::tNanoSeconds tmInputTime) = 0;
434 virtual base::flash::tNanoSeconds Sync2RefTime(base::flash::tNanoSeconds tmRefStreamTime, base::flash::tNanoSeconds tmInputTime) = 0;
435 };
436
437 public:
438 virtual base::flash::tNanoSeconds GetTimeNs() const = 0;
439 virtual base::flash::tNanoSeconds GetStreamTimeNs() const = 0;
440
442
451 ADTF3_DEPRECATED("Use adtf::services::vision::GetSync2RefChannel(adtf::ucom::ant::iobject_ptr<adtf::services::vision::IReferenceClock::ISync2RefChannel>& pSync2RefChannel, const char* strName = nullptr, const char* strMethod = nullptr) instead.")
452 virtual tResult GetSync2RefChannel(adtf::ucom::ant::iobject_ptr<ISync2RefChannel>& pSync2RefChannel,
453 const char* strName = nullptr, const char* strMethod = nullptr) const = 0;
454};
455
456} // namespace flash
457
458namespace giant
459{
460
465{
466 protected:
468 ~IReferenceClock() = default;
469
470 public:
471
476 ADTF_IID(IReferenceClock, "reference_clock.giant.streaming.adtf.iid");
477
478 public:
479
484 {
485 public:
490 ADTF_IID(ISync2RefChannel, "sync2ref_channel.reference_clock.giant.streaming.adtf.iid");
491
495 virtual void SyncReset() = 0;
496 };
497
498 public:
501
510 ADTF3_DEPRECATED("Use adtf::services::vision::GetSync2RefChannel(adtf::ucom::ant::iobject_ptr<adtf::services::vision::IReferenceClock::ISync2RefChannel>& pSync2RefChannel, const char* strName = nullptr, const char* strMethod = nullptr) instead.")
511 virtual tResult GetSync2RefChannel(adtf::ucom::ant::iobject_ptr<ISync2RefChannel>& pSync2RefChannel,
512 const char* strName = nullptr, const char* strMethod = nullptr) const = 0;
513};
514
515} // namespace giant
516
517namespace osborn
518{
519
524{
525 protected:
527 ~IReferenceClock() = default;
528
529 public:
530
535 ADTF_IID(IReferenceClock, "reference_clock.osborn.streaming.adtf.iid");
536
541 {
542 public:
543 ADTF_IID(ISystemClock, "system_clock.reference_clock.osborn.streaming.adtf.iid");
544
548 virtual bool IsSystemClock() const = 0;
549 };
550
557 virtual tResult ConvertStreamTime(adtf::base::flash::tNanoSeconds tmStreamTime, adtf::base::ant::IString&& strStringRepresentation) const = 0;
558
565 virtual tResult ConvertStreamTime(const char* strStringRepresentation, adtf::base::flash::tNanoSeconds& tmStreamTime) const = 0;
566
573 virtual tResult ConvertTimeOffset(adtf::base::flash::tNanoSeconds tmOffset, adtf::base::ant::IString&& strStringRepresentation) const = 0;
574
581 virtual tResult ConvertTimeOffset(const char* strStringRepresentation, adtf::base::flash::tNanoSeconds& tmOffset) const = 0;
582
583
587
600 ADTF3_DEPRECATED("Use adtf::services::vision::GetSync2RefChannel(bool bSystemClockTimestamps, adtf::ucom::ant::iobject_ptr<adtf::services::vision::IReferenceClock::ISync2RefChannel>& pSync2RefChannel, const char* strName) instead.")
601 virtual tResult GetSync2RefChannel(bool bSystemClockTimestamps,
602 adtf::ucom::ant::iobject_ptr<giant::IReferenceClock::ISync2RefChannel>& pSync2RefChannel,
603 const char* strName = nullptr) const = 0;
604};
605
606}// namespace osborn
607
608namespace penguin
609{
610
615{
616 protected:
618 ~IReferenceClock() = default;
619
620 public:
621
626 ADTF_IID(IReferenceClock, "reference_clock.penguin.streaming.adtf.iid");
627
628 public:
629
635 {
636 public:
643 virtual tResult WaitUntilBegin() const = 0;
644
648 enum class tTimePointId: uint8_t
649 {
650 Begin = 0,
651 End = 1
652 };
653
658
663 virtual base::flash::tNanoSeconds GetTimePoint(tTimePointId eTimePointId) const = 0;
664
669 virtual bool IsBroken(tTimePointId eTimePointId) const = 0;
670 };
671
677 {
678 public:
679 ADTF_IID(ITimeGuard, "time_guard.reference_clock.penguin.streaming.adtf.iid");
680
692
696 virtual void Cancel() = 0;
697 };
698
699
704 {
705 public:
706 ADTF_IID(IGuardableClock, "guardable_clock.reference_clock.penguin.streaming.adtf.iid");
707
708 public:
715 virtual tResult GetTimeGuard(const char* strName, ucom::ant::iobject_ptr<ITimeGuard>& pGuard) = 0;
716 };
717
722 virtual tResult GetTimeGuard(const char* strName, ucom::ant::iobject_ptr<ITimeGuard>& pGuard) = 0;
723};
724
725}// namespace penguin
726
727namespace riddler
728{
733{
734protected:
736 ~IReferenceClock() = default;
737
738public:
743 ADTF_IID(IReferenceClock, "reference_clock.riddler.streaming.adtf.iid");
744
748 enum class tTimeBase : uint8_t
749 {
753 };
754
759
770 ADTF3_DEPRECATED("Use adtf::services::vision::GetSync2RefChannel(tTimeBase eTimeBase, adtf::ucom::ant::iobject_ptr<adtf::services::vision::IReferenceClock::ISync2RefChannel>& pSync2RefChannel, const char* strName) instead.")
772 adtf::ucom::ant::iobject_ptr<IReferenceClock::ISync2RefChannel>& pSync2RefChannel,
773 const char* strName = nullptr) const = 0;
774};
775
776} // namespace riddler
777
778namespace vision
779{
780
782{
783protected:
785 ~IReferenceClock() = default;
786
787public:
792 ADTF_IID(IReferenceClock, "reference_clock.vision.streaming.adtf.iid");
793
799
801 {
802 public:
803 ADTF_IID(ISync2RefChannel, "sync2ref_channel.reference_clock.vision.streaming.adtf.iid");
804
805 virtual base::flash::tNanoSeconds Sync2ExternalTime(base::flash::tNanoSeconds tmInputTime) = 0;
806 };
807
816 const char* strName = nullptr,
817 const char* strMethod = nullptr) const = 0;
818
831 virtual tResult GetSync2RefChannel(bool bSystemClockTimestamps,
833 const char* strName = nullptr) const = 0;
834
847 const char* strName = nullptr) const = 0;
848};
849
850} // namespace vision
851
853namespace detail
854{
855
856class ISimulationClock: public adtf::ucom::ant::IObject
857{
858 public:
859 ADTF_IID(ISimulationClock, "simulation_clock.detail.streaming.adtf.iid");
860
861 virtual tResult SetClockSpeed(double fSpeed) = 0;
862 virtual tResult Reset(adtf::base::flash::tNanoSeconds tmTime, bool bSystemClock) = 0;
863 virtual tResult Run() = 0;
864 virtual tResult Pause() = 0;
865 virtual bool IsRunning() const = 0;
866 virtual double GetClockSpeed() const = 0;
867};
868
869} // namespace detail
870
872
874using vision::IReferenceClock;
875
876} // namespace services
877
878} // namespace adtf
#define ADTF3_DEPRECATED(_depr_message_)
Definition adtf_base_deprecated.h:27
#define ADTF_IID(_interface, _striid)
Definition adtf_iid.h:19
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
Definition string_intf.h:29
Definition reference_clock_intf.h:801
virtual tResult HandleClock(const ucom::ant::iobject_ptr< IClock > &pClock)=0
Definition reference_clock_intf.h:100
virtual tResult GetName(adtf::base::ant::IString &&strName) const =0
virtual tTimeStamp GetTime() const =0
ADTF_IID(IClock, "clock.reference_clock.ant.streaming.adtf.iid")
ADTF_IID(ISync2RefChannelFactory, "sync2ref_channel_factory.reference_clock.ant.streaming.adtf.iid")
Definition reference_clock_intf.h:140
virtual tTimeStamp Sync2RefTime(tTimeStamp tmRefStreamTime, tTimeStamp tmInputTime)=0
ADTF_IID(ISync2RefChannel, "sync2ref_channel.reference_clock.ant.streaming.adtf.iid")
virtual tTimeStamp Sync2RefTime(tTimeStamp tmInputTime)=0
virtual tResult HandleSync2RefFactory(ISync2RefChannelFactory &oFactory)=0
The IReferenceClock interface provides the reference time source for the filter graph.
Definition reference_clock_intf.h:34
virtual tResult RegisterClock(const adtf::ucom::ant::iobject_ptr< IClock > &pClock)=0
virtual tResult GetClock(const char *strName, adtf::ucom::ant::iobject_ptr< IClock > &pClock) const =0
virtual tResult ListSync2RefMethods(ISync2RefListCallback &oCallback)=0
virtual tResult SetMainClock(const char *strName)=0
ADTF_IID(IReferenceClock, "reference_clock.ant.streaming.adtf.iid")
virtual tResult GetClocks(IClockListCallback &oCallback) const =0
virtual tResult GetMainClock(adtf::base::ant::IString &&strName) const =0
virtual tResult UnregisterSync2RefFactory(const adtf::ucom::ant::iobject_ptr< ISync2RefChannelFactory > &oSync2RefFactory)=0
virtual tTimeStamp GetTime() const =0
virtual tResult GetStreamClock(adtf::base::ant::IString &&strName) const =0
virtual tResult GetSync2RefChannel(adtf::ucom::ant::iobject_ptr< ISync2RefChannel > &pSync2RefChannel, const char *strName=nullptr, const char *strMethod=nullptr) const =0
virtual tResult SetStreamClock(const char *strName)=0
static const int ADTF_MAX_CLOCK_NAME_LENGTH
Definition reference_clock_intf.h:52
~IReferenceClock()=default
not destructable
virtual tTimeStamp GetStreamTime() const =0
tReferenceClockEventId
Definition reference_clock_intf.h:60
@ EVENT_TimeResetBegin
Event describes the Time reset before setting a new time.
Definition reference_clock_intf.h:62
@ EVENT_TimeUpdate
Event describes that the time has been updated, only emitted by non-continuous clocks.
Definition reference_clock_intf.h:66
@ EVENT_TimeResetEnd
Event describes the Time reset after a new time was set.
Definition reference_clock_intf.h:64
virtual tResult RegisterSync2RefFactory(const adtf::ucom::ant::iobject_ptr< ISync2RefChannelFactory > &oSync2RefFactory)=0
virtual tResult UnregisterClock(const adtf::ucom::ant::iobject_ptr< IClock > &pClock)=0
Definition reference_clock_intf.h:403
virtual base::flash::tNanoSeconds GetTimeNs() const =0
ADTF_IID(IClock, "clock.reference_clock.flash.streaming.adtf.iid")
ADTF_IID(ISync2RefChannel, "sync2ref_channel.reference_clock.flash.streaming.adtf.iid")
The IReferenceClock interface provides the reference time source for the filter graph.
Definition reference_clock_intf.h:364
virtual tResult GetSync2RefChannel(adtf::ucom::ant::iobject_ptr< ISync2RefChannel > &pSync2RefChannel, const char *strName=nullptr, const char *strMethod=nullptr) const =0
ADTF_IID(IReferenceClock, "reference_clock.flash.streaming.adtf.iid")
~IReferenceClock()=default
not destructable
ADTF_IID(ISync2RefChannel, "sync2ref_channel.reference_clock.giant.streaming.adtf.iid")
The IReferenceClock interface provides the reference time source for the filter graph.
Definition reference_clock_intf.h:465
~IReferenceClock()=default
not destructable
ADTF_IID(IReferenceClock, "reference_clock.giant.streaming.adtf.iid")
virtual tResult GetSync2RefChannel(adtf::ucom::ant::iobject_ptr< ISync2RefChannel > &pSync2RefChannel, const char *strName=nullptr, const char *strMethod=nullptr) const =0
Definition reference_clock_intf.h:541
The IReferenceClock interface provides the reference time source for the filter graph.
Definition reference_clock_intf.h:524
virtual tResult ConvertTimeOffset(adtf::base::flash::tNanoSeconds tmOffset, adtf::base::ant::IString &&strStringRepresentation) const =0
virtual tResult ConvertStreamTime(adtf::base::flash::tNanoSeconds tmStreamTime, adtf::base::ant::IString &&strStringRepresentation) const =0
virtual tResult ConvertStreamTime(const char *strStringRepresentation, adtf::base::flash::tNanoSeconds &tmStreamTime) const =0
virtual tResult GetSync2RefChannel(bool bSystemClockTimestamps, adtf::ucom::ant::iobject_ptr< giant::IReferenceClock::ISync2RefChannel > &pSync2RefChannel, const char *strName=nullptr) const =0
virtual tResult ConvertTimeOffset(const char *strStringRepresentation, adtf::base::flash::tNanoSeconds &tmOffset) const =0
ADTF_IID(IReferenceClock, "reference_clock.osborn.streaming.adtf.iid")
~IReferenceClock()=default
not destructable
virtual tResult GetTimeGuard(const char *strName, ucom::ant::iobject_ptr< ITimeGuard > &pGuard)=0
Definition reference_clock_intf.h:635
virtual bool IsBroken(tTimePointId eTimePointId) const =0
virtual base::flash::tNanoSeconds GetTimePoint(tTimePointId eTimePointId) const =0
static constexpr base::flash::tNanoSeconds NoTimePoint
Definition reference_clock_intf.h:657
tTimePointId
The two time points of a barrier.
Definition reference_clock_intf.h:649
@ Begin
The begin time point.
Definition reference_clock_intf.h:650
@ End
The end time point.
Definition reference_clock_intf.h:651
Definition reference_clock_intf.h:677
virtual tResult CreateBarrier(base::flash::tNanoSeconds tmBegin, base::flash::tNanoSeconds tmEnd, ucom::ant::iobject_ptr< ITimeBarrier > &pBarrier)=0
The IReferenceClock interface provides the reference time source for the filter graph.
Definition reference_clock_intf.h:615
virtual tResult GetTimeGuard(const char *strName, ucom::ant::iobject_ptr< ITimeGuard > &pGuard)=0
ADTF_IID(IReferenceClock, "reference_clock.penguin.streaming.adtf.iid")
~IReferenceClock()=default
not destructable
The IReferenceClock interface provides the reference time source for the filter graph.
Definition reference_clock_intf.h:733
tTimeBase
The time bases of a timestamp.
Definition reference_clock_intf.h:749
@ UNSPECIFIED
no timebase specified
Definition reference_clock_intf.h:750
@ POSIX_TAI
Posix TAI timebase.
Definition reference_clock_intf.h:752
@ POSIX_UTC
Posix UTC timebase.
Definition reference_clock_intf.h:751
ADTF_IID(IReferenceClock, "reference_clock.riddler.streaming.adtf.iid")
~IReferenceClock()=default
not destructable
virtual tResult GetSync2RefChannel(tTimeBase eTimeBase, adtf::ucom::ant::iobject_ptr< IReferenceClock::ISync2RefChannel > &pSync2RefChannel, const char *strName=nullptr) const =0
Definition reference_clock_intf.h:782
virtual tResult GetSync2RefChannel(tTimeBase eTimeBase, adtf::ucom::ant::iobject_ptr< IReferenceClock::ISync2RefChannel > &pSync2RefChannel, const char *strName=nullptr) const =0
virtual tResult GetSync2RefChannel(adtf::ucom::ant::iobject_ptr< ISync2RefChannel > &pSync2RefChannel, const char *strName=nullptr, const char *strMethod=nullptr) const =0
~IReferenceClock()=default
not destructable
ADTF_IID(IReferenceClock, "reference_clock.vision.streaming.adtf.iid")
virtual tResult GetSync2RefChannel(bool bSystemClockTimestamps, adtf::ucom::ant::iobject_ptr< IReferenceClock::ISync2RefChannel > &pSync2RefChannel, const char *strName=nullptr) const =0
Definition object_intf.h:33
Base object pointer to realize binary compatible reference counting in interface methods.
Definition object_ptr_intf.h:112
Namespace for all service interfaces provided since v3.0.
Definition rpc_object_server_registry_intf.h:82
Namespace for all service interfaces provided since v3.5.
Definition signal_listening_intf.h:112
Namespace for all service interfaces provided since v3.6.
Definition reference_clock_intf.h:459
Namespace for all service interfaces provided since v3.14.
Definition reference_clock_intf.h:518
Namespace for all service interfaces provided since v3.15.
Definition reference_clock_intf.h:609
Namespace for all service interfaces provided since v3.17.
Definition reference_clock_intf.h:728
Namespace for all service interfaces provided since v3.21.
Definition macroresolver_intf.h:222
Namespace for the ADTF uCOM SDK.
Definition adtf_system.h:324
ant::IObject IObject
Alias always bringing the latest version of ant::IObject into scope.
Definition object_intf.h:109
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14
A timestamp with nanosecond precision.
Definition chrono.h:23
int nEventId
EventId shown in IReferenceClock::tReferenceClockEventId.
Definition reference_clock_intf.h:87
tTimeStamp nOldTime
The old time before set new time.
Definition reference_clock_intf.h:89
tTimeStamp nNewTime
The new time set.
Definition reference_clock_intf.h:91
tHandle hObject
sender of the event
Definition reference_clock_intf.h:85
adtf::base::flash::tNanoSeconds nNewTimeNs
The new time set.
Definition reference_clock_intf.h:396
adtf::base::flash::tNanoSeconds nOldTimeNs
The old time before set new time.
Definition reference_clock_intf.h:394