issue #10 #11 Rename hcap to hal.

This commit is contained in:
paul kim
2024-06-27 10:06:21 +09:00
parent 98e8db71fe
commit f2e0890c3d
5 changed files with 72 additions and 78 deletions

View File

@@ -132,7 +132,7 @@ function __fxn_Set_DebugOpt(_enable, _out_option, _init) {
HotelTV.dbginfo['en'] = _enable;
HotelTV.dbginfo['output'] = _out_option;
HotelTV.hcap.Init();
HotelTV.hal.Init();
/** Develop Mode definitions */
console.log("OPT" + navigator.appVersion);
@@ -144,7 +144,7 @@ function __fxn_Set_DebugOpt(_enable, _out_option, _init) {
/** Set HCAP Debug Options */
if (HotelTV.dbginfo['emulator'] == false) {
//Enable/Disable browser debug mode
HotelTV.hcap.SetBrowserDebug(HotelTV.dbginfo['hcap_ipc'], HotelTV.dbginfo['webdebugger']);
HotelTV.hal.SetBrowserDebug(HotelTV.dbginfo['hcap_ipc'], HotelTV.dbginfo['webdebugger']);
}
} else if (navigator.appVersion.includes("Tizen") == true) {
HotelTV.dbginfo['emulator'] = false;
@@ -204,7 +204,7 @@ HotelTV.Init = async function() {
console.log("Start Initialization:: ");
//STEP#01::> Shutdown Channel
HotelTV.hcap.ChannelShutDown();
HotelTV.hal.ChannelShutDown();
//SETP#02::> Set Debug Options
__fxn_Set_DebugOpt(false, 'osd', false);
@@ -213,8 +213,8 @@ HotelTV.Init = async function() {
//STEP#03::> Get Device Info
HotelTV.ui_utils.SetBusy(true);
try {
await HotelTV.hcap.GetDevInfo();
//await HotelTV.hcap.ShowDevInfo();
await HotelTV.hal.GetDevInfo();
//await HotelTV.hal.ShowDevInfo();
} catch (_error) {
let _tmval = 50;
HotelTV.ui_utils.ShowErrMsg(true,
@@ -231,7 +231,7 @@ HotelTV.Init = async function() {
$('.error #countdown #message').text(`System will be reboot in ${_tmval} second...`);
},
"cb_eoe": function() {
setTimeout(HotelTV.hcap.Reboot, 500);
setTimeout(HotelTV.hal.Reboot, 500);
}
});
}
@@ -258,7 +258,7 @@ HotelTV.Init = async function() {
$('.error #countdown #message').text(`The Device ID is ${HotelTV.devinfo.serial_number}.\r\n\r\nSystem will be reboot in ${_tmval} second...`);
},
"cb_eoe": function() {
setTimeout(HotelTV.hcap.Reboot, 500);
setTimeout(HotelTV.hal.Reboot, 500);
}
});
}
@@ -272,7 +272,7 @@ HotelTV.Init = async function() {
// FULL LICENSE MODE
try {
HotelTV.settings = await HotelTV.api.GetSettings();
let need_reboot = await HotelTV.hcap.SetDevice(HotelTV.settings);
let need_reboot = await HotelTV.hal.SetDevice(HotelTV.settings);
if (need_reboot == true) {
console.log("System Need to Reboot");
HotelTV.ui_utils.SetBusy(false);
@@ -292,7 +292,7 @@ HotelTV.Init = async function() {
$('.error #countdown #message').text(`System will be reboot in ${_tmval} second...`);
},
"cb_eoe": function() {
setTimeout(HotelTV.hcap.Reboot, 500);
setTimeout(HotelTV.hal.Reboot, 500);
}
});
return;
@@ -313,7 +313,7 @@ HotelTV.Init = async function() {
$('.error #countdown #message').text(`The Device ID is ${HotelTV.devinfo.serial_number}.\r\n\r\nSystem will be reboot in ${_tmval} second...`);
},
"cb_eoe": function() {
setTimeout(HotelTV.hcap.Reboot, 500);
setTimeout(HotelTV.hal.Reboot, 500);
}
});
}
@@ -336,7 +336,7 @@ HotelTV.Init = async function() {
$('.error #countdown #message').text(`The Device ID is ${HotelTV.devinfo.serial_number}.\r\n\r\nSystem will be reboot in ${_tmval} second...`);
},
"cb_eoe": function() {
setTimeout(HotelTV.hcap.Reboot, 500);
setTimeout(HotelTV.hal.Reboot, 500);
}
});
}
@@ -365,7 +365,7 @@ HotelTV.Init = async function() {
$('.error #countdown #message').text(`The Device ID is ${HotelTV.devinfo.serial_number}.\r\n\r\nSystem will be reboot in ${_tmval} second...`);
},
"cb_eoe": function() {
setTimeout(HotelTV.hcap.Reboot, 500);
setTimeout(HotelTV.hal.Reboot, 500);
}
});
}
@@ -388,7 +388,7 @@ HotelTV.Init = async function() {
$('.error #countdown #message').text(`The Device ID is ${HotelTV.devinfo.serial_number}.\r\n\r\nSystem will be reboot in ${_tmval} second...`);
},
"cb_eoe": function() {
setTimeout(HotelTV.hcap.Reboot, 500);
setTimeout(HotelTV.hal.Reboot, 500);
}
});
}
@@ -424,7 +424,7 @@ HotelTV.Init = async function() {
$('.error #countdown #message').text(`The Device ID is ${HotelTV.devinfo.serial_number}.\r\n\r\nSystem will be reboot in ${_tmval} second...`);
},
"cb_eoe": function() {
setTimeout(HotelTV.hcap.Reboot, 500);
setTimeout(HotelTV.hal.Reboot, 500);
}
});
}
@@ -448,7 +448,7 @@ HotelTV.Init = async function() {
$('.error #countdown #message').text(`The Device ID is ${HotelTV.devinfo.serial_number}.\r\n\r\nSystem will be reboot in ${_tmval} second...`);
},
"cb_eoe": function() {
setTimeout(HotelTV.hcap.Reboot, 500);
setTimeout(HotelTV.hal.Reboot, 500);
}
});
}
@@ -531,7 +531,7 @@ HotelTV.Init = async function() {
},
"cb_eoe": function() {
$('.error #countdown #message').text(`The Device ID is ${HotelTV.devinfo.serial_number}.\r\n\r\nSystem will be reboot`);
setTimeout(HotelTV.hcap.Reboot, 500);
setTimeout(HotelTV.hal.Reboot, 500);
}
}
);
@@ -579,7 +579,7 @@ HotelTV.LoadWelCome = async function() {
let _res = HotelTV.devinfo.display_resolution.split("x");
HotelTV.ui_welcome.Init(_res[0], _res[1]);
//await HotelTV.hcap.ShowDevInfo();
//await HotelTV.hal.ShowDevInfo();
HotelTV.ui_welcome.Show();
@@ -603,8 +603,8 @@ HotelTV.LoadWelCome = async function() {
//console.log(`Recv Msg[${recvMsg.event}]::> ${recvMsg.ret} ::> ${recvMsg.data}`);
//console.log(`Recv Msg[${recvMsg.event}]::> ${recvMsg.ret}`);
if (recvMsg.event == "update_report") {
HotelTV.hcap.GetUptime();
HotelTV.hcap.GetDeviceUsage().then(_usage => {
HotelTV.hal.GetUptime();
HotelTV.hal.GetDeviceUsage().then(_usage => {
//console.log(`USAGE::> CPU[${_usage.cpu}%]`);
HotelTV.api.ReportBrief(HotelTV.devinfo, HotelTV.guestinfo, _usage);
});
@@ -761,7 +761,7 @@ HotelTV.LoadAppFull = async function() {
//STEP#03: INIT HCAP for HotelTV FullAPP
let tmrAppAuth = setInterval(async function() {
let _foundNetflix = false;
let _hcapAppInfo = await HotelTV.hcap.PreAppGetInfo(false);
let _hcapAppInfo = await HotelTV.hal.PreAppGetInfo(false);
HotelTV.state['hcap_app'] = _hcapAppInfo.applist;
for (_i = 0; _i < HotelTV.state['hcap_app'].length; _i++) {
if (HotelTV.state['hcap_app'][_i].title == "Netflix") {
@@ -783,7 +783,7 @@ HotelTV.LoadAppFull = async function() {
//siAppToken = _progam[_i].service;
if (siAppName && siAppToken) {
HotelTV.hcap.siAppAuth(siAppName, siAppToken, false);
HotelTV.hal.siAppAuth(siAppName, siAppToken, false);
}
}
}
@@ -799,7 +799,7 @@ HotelTV.LoadAppFull = async function() {
HotelTV.ui_appfull.Init(_res[0], _res[1]);
//STEP#06; Show UI
//await HotelTV.hcap.ShowDevInfo();
//await HotelTV.hal.ShowDevInfo();
HotelTV.ui_appfull.Show();
//STEP#06 Register Service web worker
@@ -840,8 +840,8 @@ HotelTV.LoadAppFull = async function() {
HotelTV.widget = recvMsg.data;
}
} else if (recvMsg.event == "update_report") {
HotelTV.hcap.GetUptime();
HotelTV.hcap.GetDeviceUsage().then(_usage => {
HotelTV.hal.GetUptime();
HotelTV.hal.GetDeviceUsage().then(_usage => {
//console.log(`USAGE::> CPU[${_usage.cpu}%]`);
HotelTV.api.ReportBrief(HotelTV.devinfo, HotelTV.guestinfo, _usage);
});
@@ -899,7 +899,7 @@ HotelTV.LoadAppFull = async function() {
//
//HotelTV.hcap.Test();
//HotelTV.hal.Test();
}
HotelTV.UnloadAppFull = async function() {