From ba856319859022468b5c6f2deb39354372f31d5b Mon Sep 17 00:00:00 2001 From: balaji velmurugan Date: Mon, 1 Jun 2026 17:17:37 +0530 Subject: [PATCH 1/2] RDKEMW-16053: Adding header required for L1/L2 test Signed-off-by: balaji velmurugan --- Tests/mocks/systimerifc/itimermsg.h | 60 +++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Tests/mocks/systimerifc/itimermsg.h diff --git a/Tests/mocks/systimerifc/itimermsg.h b/Tests/mocks/systimerifc/itimermsg.h new file mode 100644 index 0000000..2596da2 --- /dev/null +++ b/Tests/mocks/systimerifc/itimermsg.h @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Comcast Cable Communications Management, LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef _ITIMERMSG_H_ +#define _ITIMERMSG_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#define IARM_BUS_SYSTIME_MGR_NAME "SystemTimeMgr" +#define TIMER_STATUS_MSG "TIMER_STATUS" +#define POWER_CHANGE_MSG "POWER_CHANGE" +#define cTIMER_STATUS_MESSAGE_LENGTH 80 + +const int cTIMER_STATUS_UPDATE = 0; + +typedef struct { + int event; + int quality; + char timerSrc[cTIMER_STATUS_MESSAGE_LENGTH]; + char currentTime[cTIMER_STATUS_MESSAGE_LENGTH]; + char message[cTIMER_STATUS_MESSAGE_LENGTH]; +}TimerMsg; + +typedef enum { + ePUBLISH_TIME_INITIAL =0, + ePUBLISH_NTP_FAIL, + ePUBLISH_NTP_SUCCESS, + ePUBLISH_DTT_SUCCESS, + ePUBLISH_SECURE_TIME_SUCCESS, + ePUBLISH_DEEP_SLEEP_ON, +}publishEvent; + +typedef enum { + eTIMEQUALILTY_POOR =0, + eTIMEQUALILTY_GOOD, + eTIMEQUALILTY_SECURE, + eTIMEQUALILTY_UNKNOWN, +} qualityOfTime; + +#ifdef __cplusplus +} +#endif +#endif// _TIMERMSGIFC_H_ From 1d8b88186b482fce73b38114585d997aa17a8d8e Mon Sep 17 00:00:00 2001 From: balav08 <54432605+balav08@users.noreply.github.com> Date: Mon, 1 Jun 2026 21:12:04 +0530 Subject: [PATCH 2/2] Update itimermsg.h --- Tests/mocks/systimerifc/itimermsg.h | 58 +++++++++++------------------ 1 file changed, 22 insertions(+), 36 deletions(-) diff --git a/Tests/mocks/systimerifc/itimermsg.h b/Tests/mocks/systimerifc/itimermsg.h index 2596da2..32f0e23 100644 --- a/Tests/mocks/systimerifc/itimermsg.h +++ b/Tests/mocks/systimerifc/itimermsg.h @@ -16,45 +16,31 @@ * SPDX-License-Identifier: Apache-2.0 */ -#ifndef _ITIMERMSG_H_ -#define _ITIMERMSG_H_ +/* + * Stub header for systimerifc/itimermsg.h + * Required when ENABLE_SYSTIMEMGR_SUPPORT is defined in test builds + * where the real systimemgr package is not installed. + */ +#pragma once -#ifdef __cplusplus -extern "C" { +#ifndef IARM_BUS_SYSTIME_MGR_NAME +#define IARM_BUS_SYSTIME_MGR_NAME "SYSTEMTIME" #endif -#define IARM_BUS_SYSTIME_MGR_NAME "SystemTimeMgr" -#define TIMER_STATUS_MSG "TIMER_STATUS" -#define POWER_CHANGE_MSG "POWER_CHANGE" -#define cTIMER_STATUS_MESSAGE_LENGTH 80 - -const int cTIMER_STATUS_UPDATE = 0; - -typedef struct { - int event; - int quality; - char timerSrc[cTIMER_STATUS_MESSAGE_LENGTH]; - char currentTime[cTIMER_STATUS_MESSAGE_LENGTH]; - char message[cTIMER_STATUS_MESSAGE_LENGTH]; -}TimerMsg; - -typedef enum { - ePUBLISH_TIME_INITIAL =0, - ePUBLISH_NTP_FAIL, - ePUBLISH_NTP_SUCCESS, - ePUBLISH_DTT_SUCCESS, - ePUBLISH_SECURE_TIME_SUCCESS, - ePUBLISH_DEEP_SLEEP_ON, -}publishEvent; +#ifndef TIMER_STATUS_MSG +#define TIMER_STATUS_MSG "TimerStatus" +#endif -typedef enum { - eTIMEQUALILTY_POOR =0, - eTIMEQUALILTY_GOOD, - eTIMEQUALILTY_SECURE, - eTIMEQUALILTY_UNKNOWN, -} qualityOfTime; +#ifndef cTIMER_STATUS_UPDATE +#define cTIMER_STATUS_UPDATE 0 +#endif -#ifdef __cplusplus -} +#ifndef cTIMER_STATUS_MESSAGE_LENGTH +#define cTIMER_STATUS_MESSAGE_LENGTH 256 #endif -#endif// _TIMERMSGIFC_H_ + +typedef struct { + char message[cTIMER_STATUS_MESSAGE_LENGTH]; + char timerSrc[cTIMER_STATUS_MESSAGE_LENGTH]; + char currentTime[cTIMER_STATUS_MESSAGE_LENGTH]; +} TimerMsg;