issue#1 Remodeling roomservice ui and operating scheme.
This commit is contained in:
@@ -284,8 +284,29 @@ HotelTV.hcap = (function() {
|
||||
* @param {dictionary} _param channel parameter
|
||||
*/
|
||||
function __hcapfxn_play_channel(_type, _param) {
|
||||
// IP channel class 2 change request
|
||||
if (_type === "ip") {
|
||||
const _lutBCastType = {
|
||||
'TERRESTRIAL': hcap.channel.RfBroadcastType.TERRESTRIAL,
|
||||
'TERRESTRIAL_2': hcap.channel.RfBroadcastType.TERRESTRIAL_2,
|
||||
'SATELLITE': hcap.channel.RfBroadcastType.SATELLITE,
|
||||
'SATELLITE_2': hcap.channel.RfBroadcastType.SATELLITE_2,
|
||||
'CABLE': hcap.channel.RfBroadcastType.CABLE,
|
||||
'CABLE_STD': hcap.channel.RfBroadcastType.CABLE_STD,
|
||||
'CABLE_HRC': hcap.channel.RfBroadcastType.CABLE_HRC,
|
||||
'CABLE_IRC': hcap.channel.RfBroadcastType.CABLE_IRC,
|
||||
'ANALOG_PAL_BG': hcap.channel.RfBroadcastType.ANALOG_PAL_BG,
|
||||
'ANALOG_PAL_DK': hcap.channel.RfBroadcastType.ANALOG_PAL_DK,
|
||||
'ANALOG_PAL_I': hcap.channel.RfBroadcastType.ANALOG_PAL_I,
|
||||
'ANALOG_PAL_M': hcap.channel.RfBroadcastType.ANALOG_PAL_M,
|
||||
'ANALOG_PAL_N': hcap.channel.RfBroadcastType.ANALOG_PAL_N,
|
||||
'ANALOG_SECAM_BG': hcap.channel.RfBroadcastType.ANALOG_SECAM_BG,
|
||||
'ANALOG_SECAM_DK': hcap.channel.RfBroadcastType.ANALOG_SECAM_DK,
|
||||
'ANALOG_SECAM_L': hcap.channel.RfBroadcastType.ANALOG_SECAM_L,
|
||||
'ANALOG_NTSC': hcap.channel.RfBroadcastType.ANALOG_NTSC,
|
||||
'TERRESTRIAL_ATSC3': hcap.channel.RfBroadcastType.TERRESTRIAL_ATSC3,
|
||||
'CABLE_ATSC3': hcap.channel.RfBroadcastType.CABLE_ATSC3,
|
||||
}
|
||||
// IP channel class 2 change request
|
||||
if (_type === "ipstream" || _type === "encoder") {
|
||||
hcap.channel.requestChangeCurrentChannel({
|
||||
"channelType": hcap.channel.ChannelType.IP,
|
||||
"ip": _param.ip,
|
||||
@@ -298,19 +319,26 @@ HotelTV.hcap = (function() {
|
||||
console.log("onFailure : errorMessage = " + f.errorMessage);
|
||||
}
|
||||
});
|
||||
} else if (_type === "rf_analog_ntsc") {
|
||||
hcap.channel.requestChangeCurrentChannel({
|
||||
"channelType": hcap.channel.ChannelType.RF,
|
||||
"majorNumber": _param.major,
|
||||
"minorNumber": _param.minor,
|
||||
"rfBroadcastType": hcap.channel.RfBroadcastType.ANALOG_NTSC,
|
||||
"onSuccess": function() {
|
||||
console.log("onSuccess");
|
||||
},
|
||||
"onFailure": function(f) {
|
||||
console.log("onFailure : errorMessage = " + f.errorMessage);
|
||||
}
|
||||
});
|
||||
} else if (_type === "ptcrf") {
|
||||
if (_param.rf.type == "CABLE") {
|
||||
hcap.channel.requestChangeCurrentChannel({
|
||||
"channelType": hcap.channel.ChannelType.RF,
|
||||
"majorNumber": _param.rf.major,
|
||||
"minorNumber": _param.rf.minor,
|
||||
"plpId": 0,
|
||||
"rfBroadcastType": _lutBCastType[_param.rf.type],
|
||||
"onSuccess": function() {
|
||||
console.log("onSuccess");
|
||||
},
|
||||
"onFailure": function(f) {
|
||||
console.log("onFailure : errorMessage = " + f.errorMessage);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log("Unsupported RF type:" + _param.rf.type);
|
||||
}
|
||||
} else {
|
||||
console.log("Unsupported type:" + _type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -775,7 +803,8 @@ HotelTV.hcap = (function() {
|
||||
let _netCfg = _devconfig[_cfg];
|
||||
/* Note:
|
||||
동작 스킴
|
||||
1. WLAN이 HOST모드이면 이 디바이스는 WIFI로 접속
|
||||
1. WLAN이 HOST모드이면 이 디바이스는 WIFI는 독립 AP로 활용
|
||||
2. WLAN이 NAT나 BRIDGE모드이면 이 디바이스는 WIFI로 접속
|
||||
2. 그외의 경우 ETH0를 통한 네트워크 접속 수행 */
|
||||
/* Wireless Network Configuration */
|
||||
if ('wlan0' in _netCfg) {
|
||||
@@ -790,37 +819,37 @@ HotelTV.hcap = (function() {
|
||||
|
||||
console.log(`Net Cfg enabled: ${_wlan_cfg.name}`);
|
||||
if (_wlan_cfg.apMode == 'nat') {
|
||||
hcap.network.setSoftAP({
|
||||
"channel": Number(_wlan_cfg.channel),
|
||||
"signalStrength": Number(_wlan_cfg.signalStrength),
|
||||
"vlanId": 0,
|
||||
"vlanIp": _wlan_cfg.ipaddr,
|
||||
"vlanSubnet": _wlan_cfg.subnet,
|
||||
"vlanGateway": _wlan_cfg.gateway,
|
||||
"mode": "nat",
|
||||
"securityType": (_wlan_cfg.securityType == "open") ? "open" : "psk",
|
||||
"onSuccess": function(s) {
|
||||
console.log("onSuccess");
|
||||
},
|
||||
"onFailure": function(f) {
|
||||
console.log("onFailure : errorMessage = " + f.errorMessage);
|
||||
}
|
||||
});
|
||||
// hcap.network.setSoftAP({
|
||||
// "channel": Number(_wlan_cfg.channel),
|
||||
// "signalStrength": Number(_wlan_cfg.signalStrength),
|
||||
// "vlanId": 0,
|
||||
// "vlanIp": _wlan_cfg.ipaddr,
|
||||
// "vlanSubnet": _wlan_cfg.subnet,
|
||||
// "vlanGateway": _wlan_cfg.gateway,
|
||||
// "mode": "nat",
|
||||
// "securityType": (_wlan_cfg.securityType == "open") ? "open" : "psk",
|
||||
// "onSuccess": function(s) {
|
||||
// console.log("onSuccess");
|
||||
// },
|
||||
// "onFailure": function(f) {
|
||||
// console.log("onFailure : errorMessage = " + f.errorMessage);
|
||||
// }
|
||||
// });
|
||||
} else if (_wlan_cfg.apMode == 'bridge') {
|
||||
// mode : bridge, securityType : psk
|
||||
hcap.network.setSoftAP({
|
||||
"channel": Number(_wlan_cfg.channel),
|
||||
"vlanId": 0,
|
||||
"signalStrength": Number(_wlan_cfg.signalStrength),
|
||||
"mode": "bridge",
|
||||
"securityType": (_wlan_cfg.securityType == "open") ? "open" : "psk",
|
||||
"onSuccess": function(s) {
|
||||
console.log("onSuccess");
|
||||
},
|
||||
"onFailure": function(f) {
|
||||
console.log("onFailure : errorMessage = " + f.errorMessage);
|
||||
}
|
||||
});
|
||||
// hcap.network.setSoftAP({
|
||||
// "channel": Number(_wlan_cfg.channel),
|
||||
// "vlanId": 0,
|
||||
// "signalStrength": Number(_wlan_cfg.signalStrength),
|
||||
// "mode": "bridge",
|
||||
// "securityType": (_wlan_cfg.securityType == "open") ? "open" : "psk",
|
||||
// "onSuccess": function(s) {
|
||||
// console.log("onSuccess");
|
||||
// },
|
||||
// "onFailure": function(f) {
|
||||
// console.log("onFailure : errorMessage = " + f.errorMessage);
|
||||
// }
|
||||
// });
|
||||
} else if (_wlan_cfg.apMode == 'host') {
|
||||
console.log(`Net Cfg failed: ${_wlan_cfg.name} Unsupported mode at the moment!!!`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user