Skip to content

Commit 76d31fe

Browse files
committed
Update #169: Created RedRat remote type
Created RedRat remoteController. Created remoteController interface class. Updated example rack config to show redrat parameters. Created example redrat keymap.
1 parent e141031 commit 76d31fe

File tree

8 files changed

+480
-9
lines changed

8 files changed

+480
-9
lines changed

examples/configs/example_keymap.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
#!/usr/bin/env python3
2+
#** *****************************************************************************
3+
# *
4+
# * If not stated otherwise in this file or this component's LICENSE file the
5+
# * following copyright and licenses apply:
6+
# *
7+
# * Copyright 2023 RDK Management
8+
# *
9+
# * Licensed under the Apache License, Version 2.0 (the "License");
10+
# * you may not use this file except in compliance with the License.
11+
# * You may obtain a copy of the License at
12+
# *
13+
# *
14+
# http://www.apache.org/licenses/LICENSE-2.0
15+
# *
16+
# * Unless required by applicable law or agreed to in writing, software
17+
# * distributed under the License is distributed on an "AS IS" BASIS,
18+
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19+
# * See the License for the specific language governing permissions and
20+
# * limitations under the License.
21+
# *
22+
#* ******************************************************************************
123
# Remote Commander Key Translation Maps
224

325
remoteMaps:
@@ -56,8 +78,7 @@ remoteMaps:
5678
HELP: "HELP"
5779
HOME: "HOME"
5880
INFO: "INFO"
59-
INPUT_DOWN: "INPUT_DOWN"
60-
INPUT_UP: "INPUT_UP"
81+
INTERACTIVE: "INTERACTIVE"
6182
INTERNET: "INTERNET"
6283
INTERNET_RADIO: "INTERNET_RADIO"
6384
LAST: "LAST"
@@ -83,6 +104,7 @@ remoteMaps:
83104
NUM_7: "NUM_7"
84105
NUM_8: "NUM_8"
85106
NUM_9: "NUM_9"
107+
OPEN: "OPEN"
86108
OPTIONS: "OPTIONS"
87109
PAGE_DOWN: "PAGE_DOWN"
88110
PAGE_UP: "PAGE_UP"
@@ -115,7 +137,10 @@ remoteMaps:
115137
RS232: "RS232"
116138
RESET: "RESET"
117139
SEARCH: "SEARCH"
140+
SEARCH_BACK: "SEARCH_BACK"
141+
SEARCH_FWD: "SEARCH_FWD"
118142
SELECT: "SELECT"
143+
SERVICES: "SERVICES"
119144
SETUP: "SETUP"
120145
SKY: "SKY"
121146
SOURCE: "SOURCE"
@@ -128,8 +153,6 @@ remoteMaps:
128153
TEST: "TEST"
129154
TEXT: "TEXT"
130155
TOOLS: "TOOLS"
131-
TUNING_LEFT: "TUNING_LEFT"
132-
TUNING_RIGHT: "TUNING_RIGHT"
133156
USB: "USB"
134157
VGA: "VGA"
135158
VIRGIN: "VIRGIN"

examples/configs/example_rack_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ rackConfig:
7373
# [ type: "None" ]
7474
# To use keySimulator RDK Middleware is required
7575
# [ type: "keySimulator", ip: "192.168.50.99", port: 10022, username: "root", password: '', map: "keysimulator_rdk", config: "rdk_keymap.yml" ]
76+
# [ type: "redrat", hub_ip: "192.168.0.1" hub_port: 10022, netbox_ip: 192.168.0.2, output(optional, default=1): "10", map: 'SKY+', config: "example_redrat_keymap.yml"]
7677

7778
# [ outbound: optional ] - This section is used to configure paths for downloads and uploads from your test
7879
# supported usage:
Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
#** *****************************************************************************
2+
# *
3+
# * If not stated otherwise in this file or this component's LICENSE file the
4+
# * following copyright and licenses apply:
5+
# *
6+
# * Copyright 2023 RDK Management
7+
# *
8+
# * Licensed under the Apache License, Version 2.0 (the "License");
9+
# * you may not use this file except in compliance with the License.
10+
# * You may obtain a copy of the License at
11+
# *
12+
# *
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
# *
15+
# * Unless required by applicable law or agreed to in writing, software
16+
# * distributed under the License is distributed on an "AS IS" BASIS,
17+
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
# * See the License for the specific language governing permissions and
19+
# * limitations under the License.
20+
# *
21+
#* ******************************************************************************
22+
# Remote Commander Key Translation Maps
23+
24+
remoteMaps:
25+
remoteCommanderMap0:
26+
name : 'XfinityXR2'
27+
prefix: 'dataset="XfinityXR2" '
28+
codes:
29+
NUM_0: 'signal="0"'
30+
NUM_1: 'signal="1"'
31+
NUM_2: 'signal="2"'
32+
NUM_3: 'signal="3"'
33+
NUM_4: 'signal="4"'
34+
NUM_5: 'signal="5"'
35+
NUM_6: 'signal="6"'
36+
NUM_7: 'signal="7"'
37+
NUM_8: 'signal="8"'
38+
NUM_9: 'signal="9"'
39+
BLUE: 'signal="Blue"'
40+
CHANNEL_UP: 'signal="Chan+"'
41+
CHANNEL_DOWN: 'signal="Chan-"'
42+
ARROW_DOWN: 'signal="Down"'
43+
EXIT: 'signal="Exit"'
44+
FFORWARD: 'signal="FF"'
45+
GREEN: 'signal="Green"'
46+
GUIDE: 'signal="Guide"'
47+
INFO: 'signal="Info"'
48+
LAST: 'signal="Last"'
49+
ARROW_LEFT: 'signal="Left"'
50+
MUTE: 'signal="Mute"'
51+
SELECT: 'signal="OK"'
52+
PAGE_DOWN: 'signal="PageDown"'
53+
PAGE_UP: 'signal="PageUp"'
54+
PLAY: 'signal="Play-Pause"'
55+
POWER: 'signal="Power"'
56+
RECORD: 'signal="Record"'
57+
RED: 'signal="Red"'
58+
REPLAY: 'signal="Replay"'
59+
REWIND: 'signal="Rew"'
60+
ARROW_RIGHT: 'signal="Right"'
61+
ARROW_UP: 'signal="Up"'
62+
VOL_UP: 'signal="Vol+"'
63+
VOL_DOWN: 'signal="Vol-"'
64+
XFINITY: 'signal="xfinity"'
65+
YELLOW: 'signal="Yellow"'
66+
67+
remoteCommanderMap1:
68+
name: 'Panasonic'
69+
prefix: 'dataset="Panasonic" '
70+
codes:
71+
ARROW_DOWN: 'signal="Down"'
72+
SELECT: 'signal="OK"'
73+
CHANNEL_UP: 'signal="Program+"'
74+
CHANNEL_DOWN: 'signal="Program-"'
75+
ARROW_UP: 'signal="Up"'
76+
77+
remoteCommanderMap2:
78+
name: 'Sky Digibox'
79+
prefix: 'dataset="Sky Digibox" '
80+
codes:
81+
NUM_0: 'signal="0"'
82+
NUM_1: 'signal="1"'
83+
NUM_2: 'signal="2"'
84+
NUM_3: 'signal="3"'
85+
NUM_4: 'signal="4"'
86+
NUM_5: 'signal="5"'
87+
NUM_6: 'signal="6"'
88+
NUM_7: 'signal="7"'
89+
NUM_8: 'signal="8"'
90+
NUM_9: 'signal="9"'
91+
BACK: 'signal="Backup'
92+
BLUE: 'signal="Blue"'
93+
CHANNEL_UP: 'signal="Chan+"'
94+
CHANNEL_DOWN: 'signal="Chan-"'
95+
ARROW_DOWN: 'signal="Down"'
96+
GREEN: 'signal="Green"'
97+
HELP: 'signal="Help"'
98+
INFO: 'signal="i"'
99+
INTERACTIVE: 'signal="Interactive'
100+
ARROW_LEFT: 'signal="Left"'
101+
MUTE: 'signal="Mute"'
102+
POWER: 'signal="Power"'
103+
RED: 'signal="Red"'
104+
ARROW_RIGHT: 'signal="Right"'
105+
SELECT: 'signal="Select"'
106+
SERVICES: 'signal="Services"'
107+
SKY: 'signal="SKY"'
108+
TEXT: 'signal="Text"'
109+
SOURCE: 'signal="TV"'
110+
GUIDE: 'signal="TV_GUIDE"'
111+
ARROW_UP: 'signal="Up"'
112+
VOL_UP: 'signal="Vol+"'
113+
VOL_DOWN: 'signal="Vol-"'
114+
YELLOW: 'signal="Yellow"'
115+
116+
remoteCommanderMap3:
117+
name: 'Hauppauge'
118+
prefix: 'dataset="Hauppauge" '
119+
codes:
120+
NUM_1: 'signal="1"'
121+
NUM_2: 'signal="2"'
122+
NUM_3: 'signal="3"'
123+
NUM_4: 'signal="4"'
124+
NUM_5: 'signal="5"'
125+
126+
remoteCommanderMap4:
127+
name: 'CD'
128+
prefix: 'dataset="CD"'
129+
codes:
130+
NUM_1: 'signal="1"'
131+
NUM_2: 'signal="2"'
132+
NUM_3: 'signal="3"'
133+
NUM_4: 'signal="4"'
134+
NUM_5: 'signal="5"'
135+
OPEN: 'signal="Open"'
136+
PAUSE: 'signal="Pause"'
137+
PLAY: 'signal="Play"'
138+
SEARCH_FWD: 'signal="Search+"'
139+
SEARCH_BACK: 'signal="Search-"'
140+
FFORWARD: 'signal="Skip+"'
141+
REWIND: 'signal="Skip-"'
142+
STOP: 'signal="Stop"'
143+
144+
remoteCommanderMap5:
145+
name: 'Tuner'
146+
prefix: 'dataset="Tuner" '
147+
codes:
148+
CHANNEL_UP: 'signal="Channel+"'
149+
CHANNEL_DOWN: 'signal="Channel+"'
150+
151+
remoteCommanderMap6:
152+
name: 'Sony_Sat'
153+
prefix: 'dataset="Sony_Sat" '
154+
codes:
155+
NUM_0: 'signal="0"'
156+
NUM_1: 'signal="1"'
157+
NUM_2: 'signal="2"'
158+
NUM_3: 'signal="3"'
159+
NUM_4: 'signal="4"'
160+
NUM_5: 'signal="5"'
161+
NUM_6: 'signal="6"'
162+
NUM_7: 'signal="7"'
163+
NUM_8: 'signal="8"'
164+
NUM_9: 'signal="9"'
165+
166+
remoteCommanderMap7:
167+
name: 'BlaupunkTV'
168+
prefix: 'dataset="BlaupunkTV" '
169+
codes:
170+
NUM_0: 'signal="0"'
171+
NUM_1: 'signal="1"'
172+
NUM_2: 'signal="2"'
173+
NUM_3: 'signal="3"'
174+
NUM_4: 'signal="4"'
175+
NUM_5: 'signal="5"'
176+
NUM_6: 'signal="6"'
177+
NUM_7: 'signal="7"'
178+
NUM_8: 'signal="8"'
179+
NUM_9: 'signal="9"'
180+
BLUE: 'signal="Blue"'
181+
CHANNEL_UP: 'signal="Chan+"'
182+
CHANNEL_DOWN: 'signal="Chan-"'
183+
ARROW_DOWN: 'signal="Down"'
184+
EXIT: 'signal="Exit"'
185+
GREEN: 'signal="Green"'
186+
INFO: 'signal="Info"'
187+
ARROW_LEFT: 'signal="Left"'
188+
MENU: 'signal="Menu"'
189+
SELECT: 'signal="OK"'
190+
VOL_UP: 'signal="Vol+"'
191+
VOL_DOWN: 'signal="Vol-"'
192+
YELLOW: 'signal="Yellow"'
193+
194+
remoteCommanderMap8:
195+
name: 'eTRV'
196+
prefix: 'dataset="eTRV" '
197+
codes:
198+
NUM_2: 'signal="2"'
199+
NUM_5: 'signal="5"'
200+
NUM_8: 'signal="8"'
201+
ARROW_DOWN: 'signal="DOWN"'
202+
SELECT: 'signal="SET"'
203+
ARROW_UP: 'signal="UP"'
204+
205+
remoteCommanderMap9:
206+
name: 'Sony Mini System'
207+
prefix: 'dataset="Sony Mini System" '
208+
codes:
209+
PAUSE: 'signal="Pause"'
210+
PLAY: 'signal="Play"'
211+
212+
remoteCommanderMap10:
213+
name: 'Extigy'
214+
prefix: 'dataset="Extigy" '
215+
codes:
216+
ARROW_DOWN: 'signal="Down"'
217+
POWER: 'signal="Power"'
218+
ARROW_UP: 'signal="Up"'
219+
VOL_UP: 'signal="Vol+"'
220+
VOL_DOWN: 'signal="Vol-"'
221+
222+
remoteCommanderMap11:
223+
name: 'SKY+'
224+
prefix: 'dataset="SKY+" '
225+
codes:
226+
NUM_0: 'signal="0"'
227+
NUM_1: 'signal="1"'
228+
NUM_2: 'signal="2"'
229+
NUM_3: 'signal="3"'
230+
NUM_4: 'signal="4"'
231+
NUM_5: 'signal="5"'
232+
NUM_6: 'signal="6"'
233+
NUM_7: 'signal="7"'
234+
NUM_8: 'signal="8"'
235+
NUM_9: 'signal="9"'
236+
BACK: 'signal="Backup"'
237+
BLUE: 'signal="Blue"'
238+
MOVIE: 'signal="Box_office"'
239+
CHANNEL_UP: 'signal="Channel+"'
240+
CHANNEL_DOWN: 'signal="Channel+"'
241+
ARROW_DOWN: 'signal="Down"'
242+
FFORWARD: 'signal="FFwd"'
243+
GREEN: 'signal="Green"'
244+
HELP: 'signal="Help"'
245+
INFO: 'signal="Info"'
246+
INTERACTIVE: 'signal="Interactive"'
247+
ARROW_LEFT: 'signal="Left"'
248+
MUTE: 'signal="Mute"'
249+
PAUSE: 'signal="Pause"'
250+
PLAY: 'signal="Play"'
251+
POWER: 'signal="Power"'
252+
RECORD: 'signal="Record"'
253+
RED: 'signal="Red"'
254+
REWIND: 'signal="Rew"'
255+
ARROW_RIGHT: 'signal="Right"'
256+
SELECT: 'signal="Select"'
257+
SERVICES: 'signal="Services"'
258+
SKY: 'signal="SKY"'
259+
STOP: 'signal="Stop"'
260+
TEXT: 'signal="Text"'
261+
SOURCE: 'signal="TV"'
262+
GUIDE: 'signal="TV_Guide"'
263+
ARROW_UP: 'signal="Up"'
264+
VOL_UP: 'signal="Vol +"'
265+
VOL_DOWN: 'signal="Vol -"'
266+
YELLOW: 'signal="Yellow"'

framework/core/commonRemote.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@
3434
import os
3535
from framework.core.logModule import logModule
3636
from framework.core.rcCodes import rcCode as rc
37-
from framework.core.remoteControllerModules.olimex import remoteOlimex
38-
from framework.core.remoteControllerModules.skyProc import remoteSkyProc
39-
from framework.core.remoteControllerModules.arduino import remoteArduino
40-
from framework.core.remoteControllerModules.none import remoteNone
41-
from framework.core.remoteControllerModules.keySimulator import remoteKeySimulator
37+
from framework.core.remoteControllerModules import remoteArduino, \
38+
remoteKeySimulator, \
39+
remoteNone, \
40+
remoteOlimex, \
41+
remoteRedRat, \
42+
remoteSkyProc
4243

4344
class remoteControllerMapping():
4445
def __init__(self, log:logModule, mappingConfig:dict):
@@ -137,6 +138,8 @@ def __init__(self, log:logModule, remoteConfig:dict, **kwargs:dict):
137138
self.remoteController = remoteArduino (self.log, remoteConfig)
138139
elif self.type == "keySimulator":
139140
self.remoteController = remoteKeySimulator (self.log, remoteConfig)
141+
elif self.type == "redrat":
142+
self.remoteController = remoteRedRat(self.log, remoteConfig)
140143
else: # remoteNone otherwise
141144
self.remoteController = remoteNone( self.log, remoteConfig )
142145

framework/core/rcCodes.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ class rcCode(Enum):
8787
HELP = "HELP"
8888
HOME = "HOME"
8989
INFO = "INFO"
90+
INTERACTIVE = "INTERACTIVE"
9091
INTERNET = "INTERNET"
9192
INTERNET_RADIO = "INTERNET_RADIO"
9293
LAST = "LAST"
@@ -113,6 +114,7 @@ class rcCode(Enum):
113114
NUM_7 = "NUM_7"
114115
NUM_8 = "NUM_8"
115116
NUM_9 = "NUM_9"
117+
OPEN = "OPEN"
116118
OPTIONS = "OPTIONS"
117119
PAGE_DOWN = "PAGE_DOWN"
118120
PAGE_UP = "PAGE_UP"
@@ -150,6 +152,7 @@ class rcCode(Enum):
150152
SEARCH_BACK = "SEARCH_BACK"
151153
SEARCH_FWD = "SEARCH_FWD"
152154
SELECT = "SELECT"
155+
SERVICES = "SERVICES"
153156
SETUP = "SETUP"
154157
SKY = "SKY"
155158
SOURCE = "SOURCE"

0 commit comments

Comments
 (0)