Skip to content

Commit b4beafc

Browse files
committed
Use gptp_shm_machine instead of stub
1 parent f83c967 commit b4beafc

4 files changed

Lines changed: 11 additions & 5 deletions

File tree

score/TimeDaemon/code/application/svt/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ load("@score_baselibs//score/language/safecpp:toolchain_features.bzl", "COMPILER
4242
"svt_handler",
4343
False,
4444
[
45-
"//score/TimeDaemon/code/ptp_machine:stub_ptp_machine",
45+
"//score/TimeDaemon/code/ptp_machine:shm_ptp_machine",
4646
],
4747
),
4848
(

score/TimeDaemon/code/application/svt/svt_handler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "score/TimeDaemon/code/ipc/svt/publisher/factory.h"
1717
#include "score/TimeDaemon/code/msg_broker/subscription.h"
1818
#include "score/TimeDaemon/code/msg_broker/topic.h"
19-
#include "score/TimeDaemon/code/ptp_machine/stub/factory.h"
19+
#include "score/TimeDaemon/code/ptp_machine/shm/factory.h"
2020
#include "score/TimeDaemon/code/verification_machine/svt/factory.h"
2121
#include "score/concurrency/interruptible_wait.h"
2222
#include "score/mw/log/logging.h"
@@ -39,7 +39,7 @@ SvtHandler::SvtHandler() noexcept
3939
handler_status_{TimebaseHandler::Status::kIdle}
4040
{
4141
msg_broker_ = std::make_shared<MessageBroker<PtpTimeInfo>>();
42-
gptp_machine_ = CreateGPTPStubMachine("ptp_worker");
42+
gptp_machine_ = CreateGPTPShmMachine("ptp_worker");
4343
verification_machine_ = CreateSvtVerificationMachine("time_verification_worker");
4444
ipc_publisher_ = CreateSvtPublisher("svt_ipc_publisher");
4545
ctrl_flow_divider_ = CreatePtpControlFlowDivider("ptp_control_flow_divider", std::chrono::milliseconds{250});

score/TimeDaemon/code/application/svt/svt_handler.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "score/TimeDaemon/code/control_flow_divider/ptp/ptp_control_flow_divider.h"
1919
#include "score/TimeDaemon/code/ipc/svt/publisher/svt_publisher.h"
2020
#include "score/TimeDaemon/code/msg_broker/msg_broker.h"
21-
#include "score/TimeDaemon/code/ptp_machine/stub/gptp_stub_machine.h"
21+
#include "score/TimeDaemon/code/ptp_machine/shm/gptp_shm_machine.h"
2222
#include "score/TimeDaemon/code/verification_machine/svt/svt_verification_machine.h"
2323

2424
#include <memory>
@@ -72,7 +72,7 @@ class SvtHandler : public TimebaseHandler
7272
private:
7373
std::unique_ptr<JobRunner> job_runner_; ///< Manages periodic jobs and tasks
7474
std::shared_ptr<MessageBroker<PtpTimeInfo>> msg_broker_; ///< Handles message communication
75-
std::shared_ptr<GPTPStubMachine> gptp_machine_; ///< Manages GPTP synchronization
75+
std::shared_ptr<GPTPShmMachine> gptp_machine_; ///< Manages GPTP synchronization
7676
std::shared_ptr<SvtVerificationMachine> verification_machine_; ///< Handles SVT verification
7777
std::shared_ptr<SvtPublisher> ipc_publisher_; ///< Publishes SVT data via IPC
7878
std::shared_ptr<PtpControlFlowDivider> ctrl_flow_divider_; ///< Divides PTP control flow

score/TimeDaemon/code/ptp_machine/BUILD

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ alias(
1919
visibility = ["//score/TimeDaemon:__subpackages__"],
2020
)
2121

22+
alias(
23+
name = "shm_ptp_machine",
24+
actual = "//score/TimeDaemon/code/ptp_machine/shm:gptp_shm_machine",
25+
visibility = ["//score/TimeDaemon:__subpackages__"],
26+
)
27+
2228
cc_unit_test_suites_for_host_and_qnx(
2329
name = "unit_test_suite",
2430
test_suites_from_sub_packages = [

0 commit comments

Comments
 (0)