TMSCommander

TAPs für die SRP- und CRP-Serie
deangelj
Erfahrener Benutzer
Erfahrener Benutzer
Beiträge: 156
Registriert: Mo 12. Mär 2007, 21:21
Receivertyp: TRF-2400
Wohnort: Sydney, Australia

TMSCommander

#1

Beitrag von deangelj » So 21. Mär 2010, 22:29

(please excuse me using English as I cannot write in German)

I have written a replacement for TAPCommander, called TMSCommander. What this TAP does is once a TAP has the appropriate code in its event handler, TMSCommander can call it to tell it to display its menu (or perform other functions). Below is a graphic for its menu - it basically discovers at run time which TAPs it can talk to, then you scroll to that line and press OK to call the menu.

I would like to thank Firebird for his library and help.

Download here: TMSCommander


Fixes/changes in 1.3
- When selecting an item by number update the buttons available for that item
- When selecting an item by number allow 0 to select the 10th item

Fixes/changes in 1.2
- Listen on network port for commands.
- On exiting TMSCommander pass Exit key on.
- Check for Info box on screen on processing TMSCommander key
- Allow OK button for UserEvent. If OK and no UserEvent default to Menu
- Allow selection of TAP using the numbers for the item
- uses FireBird’s KeyTranslate to support different remotes/boxes

Fixes/changes in 1.1
- Allow TMSCommander to work without the language file – it will default to English
(this is for those users that find it difficult to get the lng file onto the box)

Fixes/changes in 1.0
- this version allows a TAP writer to support another calling method (UserEvent).
For example say a TAP has a menu but also has another screen - then by supporting the UserEvent,
a user can use TMSCommander and press the yellow key on the TAP list to call the TAP's other screen.

Fixes/changes in 0.9
- fixes the reboot issue with disabled TAPs

Fixes/changes in 0.8
- add general language support (German/English language file included) - thanks to Olaf/Firebird
- Firebird's mods to disable taps
Need to copy the TMSCommander.lng file to the same folder as the .TAP.

Fixes/changes in 0.7
- Allow user to change between OK or Menu to select a TAP's menu
- Info button cycles between different screens: Description, Capabilities, TAPIDs, Authors

Fixes/changes in 0.6
- fix bug where infoscreen clearing leaves hole in menu
- refresh list after stopping tap





This is the code that you would add to your TAP:

Code: Alles auswählen

if (wEvent == EVT_TMSCommander)
{
       switch (dwParam1)
      {
	   case TMSCMDR_Capabilities:
                                //TMSCommander wants to know what we support
		return (dword)(TMSCMDR_HaveMenu | TMSCMDR_CanBeStopped);
	   case TMSCMDR_Stop:
                                //TMSCommander has told me to stop
		//call your TAP's exit function or
		TAP_Exit();
		return TMSCMDR_OK;
	   case TMSCMDR_Menu:
                                //TMSCommander has told me to show my menu
		//call your TAP's menu
		return TMSCMDR_OK;
	   case TMSCMDR_Exiting:
                               //TMSCommander is exiting - do we want to do anything?
                               break;
	   default:
		//unknown TMSCommander function
		return TMSCMDR_UnknownFunction;
         }
}
Zuletzt geändert von Alter Sack am So 3. Okt 2010, 08:53, insgesamt 14-mal geändert.
Grund: changes V1.3 added

Benutzeravatar
Happy
TAP-Guru
TAP-Guru
Beiträge: 5718
Registriert: Fr 9. Dez 2005, 09:32
Receivertyp: TF4000-5500-6000-TMS
Wohnort: bei Karlsruhe
Kontaktdaten:

AW: An alle TAP Entwickler: Gemeinsame Benutzung der Fernbedienung

#2

Beitrag von Happy » So 21. Mär 2010, 23:01

That's great. I'm really looking forward to this release.

I will certainly support this for my TAPs. It seems even easier than integrating the old TAP Commander into a TAP.

Regards,
Happy
:type: Meine TAPs und Tools

TF5500 PVR (Fw Jan. 2007 P)- 400GB Samsung - AC light 1.05 - Yamaha RX-V 1500
- LAN: Asus WL-500g Deluxe mit ftpd-topfield 0.7.4
TAPs: Quicktimer, Autodelete, Standby, 3PG, Automove, NiceDisplay, PowerRestore, WSS Killer, Eurostirf, Overfly
TV: Sony KDL-46W4500
TF6000 PVR (Fw Okt. 2008)- 160GB Samsung SV1604N
TAPs: iTina, Autodelete, Automove, Autoresume, NiceDisplay, WSS Killer
SRP-2100 (Fw Okt. 2009)
TAPs: SmartEPG, ChangePreview, Autodelete, Automove, BackupSettings,RescueRecs, MySkip, NiceDisplay

Benutzeravatar
Twilight
Zauberküchencheflehrling mit extra Butter
Zauberküchencheflehrling mit extra Butter
Beiträge: 60342
Registriert: Fr 9. Dez 2005, 09:17
Receivertyp: 1 x SRP 2100(TMS) TFIR und .1 x SRP 2410 M
Wohnort: Wien Umgebung

AW: An alle TAP Entwickler: Gemeinsame Benutzung der Fernbedienung

#3

Beitrag von Twilight » Mo 22. Mär 2010, 07:15

thank you for your support deangelj :up:

twilight

Benutzeravatar
Indy
Topfversteher
Topfversteher
Beiträge: 403
Registriert: Mi 3. Jun 2009, 11:22
Receivertyp: SRP-2100
Wohnort: Warendorf

AW: An alle TAP Entwickler: Gemeinsame Benutzung der Fernbedienung

#4

Beitrag von Indy » Mo 22. Mär 2010, 09:56

That is a great solution :hello: I was about to think nobody was interrested in solving this problem.
I have some additional questions:

What state does TAP_GetState return when I get the TMSCMDR_Menu? I have a lot of testing against normal state in my code.

How do we solve the situation when people do not have TMSCommander running? Are we running our own code when we startup and disable that when we receive a TMSCMDR_Capabilities event.

People will not always use TMSCommander to stop TAPS. Will you know that a TAP has been stopped or wouldn't it be better if a TAP has a register and unregister with TMSCommander (method) Event.

I would still like to ask if you could consider a "short cut" implementation like I proposed. Pressing 2 keys shortly after each other is quicker than going via an extra TAP menu.

What I also miss is a way to see what TAP is activ. This is something that is not integrated in TAP_GetState. It would be great if we could register SUBSTATES for our own TAPs. But I don't see it very likely Topfield is going to add that to the API. Or even own Events

Is this something you could add to your TAP?
I'm a Dutchmen lost in Germany :D :

Benutzeravatar
Happy
TAP-Guru
TAP-Guru
Beiträge: 5718
Registriert: Fr 9. Dez 2005, 09:32
Receivertyp: TF4000-5500-6000-TMS
Wohnort: bei Karlsruhe
Kontaktdaten:

AW: An alle TAP Entwickler: Gemeinsame Benutzung der Fernbedienung

#5

Beitrag von Happy » Mo 22. Mär 2010, 16:30

FireBird hat geschrieben:If I?ve understood John correctly, TMSCommander just shows a list of user defined TAPs and not all running TAPs. If this is the case, we need a mechanism so that a TAP can find out if it is TMSCommander?s target (registering?).

I would have thought that TMSCommander shows a list of all running TAPs.
By sending a "TMSCMDR_Capabilities" request, TMSCommander finds out which TAPs are handling its requests properly. If a target TAP receives this request it automatically sees that TMSCommander is running.

Regards,
Till
:type: Meine TAPs und Tools

TF5500 PVR (Fw Jan. 2007 P)- 400GB Samsung - AC light 1.05 - Yamaha RX-V 1500
- LAN: Asus WL-500g Deluxe mit ftpd-topfield 0.7.4
TAPs: Quicktimer, Autodelete, Standby, 3PG, Automove, NiceDisplay, PowerRestore, WSS Killer, Eurostirf, Overfly
TV: Sony KDL-46W4500
TF6000 PVR (Fw Okt. 2008)- 160GB Samsung SV1604N
TAPs: iTina, Autodelete, Automove, Autoresume, NiceDisplay, WSS Killer
SRP-2100 (Fw Okt. 2009)
TAPs: SmartEPG, ChangePreview, Autodelete, Automove, BackupSettings,RescueRecs, MySkip, NiceDisplay

Benutzeravatar
FireBird
Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru
Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru
Beiträge: 25571
Registriert: Fr 9. Dez 2005, 09:59
Receivertyp: SRP-2401CI+ TFIR
Wohnort: Wien

AW: An alle TAP Entwickler: Gemeinsame Benutzung der Fernbedienung

#6

Beitrag von FireBird » Mo 22. Mär 2010, 18:23

Happy hat geschrieben:I would have thought that TMSCommander shows a list of all running TAPs.

This needs to be answered by John.
By sending a "TMSCMDR_Capabilities" request, TMSCommander finds out which TAPs are handling its requests properly. If a target TAP receives this request it automatically sees that TMSCommander is running.
And if someone stops TMSCommander?

Benutzeravatar
Happy
TAP-Guru
TAP-Guru
Beiträge: 5718
Registriert: Fr 9. Dez 2005, 09:32
Receivertyp: TF4000-5500-6000-TMS
Wohnort: bei Karlsruhe
Kontaktdaten:

AW: An alle TAP Entwickler: Gemeinsame Benutzung der Fernbedienung

#7

Beitrag von Happy » Mo 22. Mär 2010, 19:12

FireBird hat geschrieben:
And if someone stops TMSCommander?

Good point :thinker:
:wink:
:type: Meine TAPs und Tools

TF5500 PVR (Fw Jan. 2007 P)- 400GB Samsung - AC light 1.05 - Yamaha RX-V 1500
- LAN: Asus WL-500g Deluxe mit ftpd-topfield 0.7.4
TAPs: Quicktimer, Autodelete, Standby, 3PG, Automove, NiceDisplay, PowerRestore, WSS Killer, Eurostirf, Overfly
TV: Sony KDL-46W4500
TF6000 PVR (Fw Okt. 2008)- 160GB Samsung SV1604N
TAPs: iTina, Autodelete, Automove, Autoresume, NiceDisplay, WSS Killer
SRP-2100 (Fw Okt. 2009)
TAPs: SmartEPG, ChangePreview, Autodelete, Automove, BackupSettings,RescueRecs, MySkip, NiceDisplay

deangelj
Erfahrener Benutzer
Erfahrener Benutzer
Beiträge: 156
Registriert: Mo 12. Mär 2007, 21:21
Receivertyp: TRF-2400
Wohnort: Sydney, Australia

AW: An alle TAP Entwickler: Gemeinsame Benutzung der Fernbedienung

#8

Beitrag von deangelj » Di 23. Mär 2010, 10:44

Indy hat geschrieben:
What state does TAP_GetState return when I get the TMSCMDR_Menu? I have a lot of testing against normal state in my code.

I don't know...

Indy hat geschrieben:
How do we solve the situation when people do not have TMSCommander running? Are we running our own code when we startup and disable that when we receive a TMSCMDR_Capabilities event.

People will not always use TMSCommander to stop TAPS. Will you know that a TAP has been stopped or wouldn't it be better if a TAP has a register and unregister with TMSCommander (method) Event.


That sounds like a good solution!

Indy hat geschrieben:
What I also miss is a way to see what TAP is activ. This is something that is not integrated in TAP_GetState. It would be great if we could register SUBSTATES for our own TAPs. But I don't see it very likely Topfield is going to add that to the API. Or even own Events
Is this something you could add to your TAP?


Yes, this is what my TAP does - shows the running TAPs, and only the ones that can be managed can be selected. I use Firebird's library for pretty much all the "smart stuff" :)

deangelj
Erfahrener Benutzer
Erfahrener Benutzer
Beiträge: 156
Registriert: Mo 12. Mär 2007, 21:21
Receivertyp: TRF-2400
Wohnort: Sydney, Australia

AW: An alle TAP Entwickler: Gemeinsame Benutzung der Fernbedienung

#9

Beitrag von deangelj » Di 23. Mär 2010, 11:04

FireBird hat geschrieben:
And if someone stops TMSCommander?


Yes good point! But generally easily fixed - you just restart it - the user will quickly learn :)
The TAP discovers the TAPs it can manage at run time.

Here's the current kit - just copy the TAP to ProgramFiles and run it. Then press Exit to see the table.

TMSCommander v0.4 kit

deangelj
Erfahrener Benutzer
Erfahrener Benutzer
Beiträge: 156
Registriert: Mo 12. Mär 2007, 21:21
Receivertyp: TRF-2400
Wohnort: Sydney, Australia

AW: An alle TAP Entwickler: Gemeinsame Benutzung der Fernbedienung

#10

Beitrag von deangelj » Di 23. Mär 2010, 11:15

By the way, I use the same mechanism to manage the TMSCommander menu - you will always see at least one TAP that can be managed in the TAP list: TMSCommander!

Benutzeravatar
FireBird
Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru
Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru
Beiträge: 25571
Registriert: Fr 9. Dez 2005, 09:59
Receivertyp: SRP-2401CI+ TFIR
Wohnort: Wien

AW: An alle TAP Entwickler: Gemeinsame Benutzung der Fernbedienung

#11

Beitrag von FireBird » Di 23. Mär 2010, 11:25

Then I missunderstood your intentions. I thought that you just want to display a subset off all running TAPs. Now it is easy: whenever a TAP receives its hotkey, it checks if TMSCommander is running by calling HDD_TAP_isRunning (). If it returns false, the hotkey magic should be done.
Thanks for V0.4

Benutzeravatar
Happy
TAP-Guru
TAP-Guru
Beiträge: 5718
Registriert: Fr 9. Dez 2005, 09:32
Receivertyp: TF4000-5500-6000-TMS
Wohnort: bei Karlsruhe
Kontaktdaten:

AW: An alle TAP Entwickler: Gemeinsame Benutzung der Fernbedienung

#12

Beitrag von Happy » Di 23. Mär 2010, 13:07

deangelj hat geschrieben:Yes good point! But generally easily fixed - you just restart it - the user will quickly learn :)
The TAP discovers the TAPs it can manage at run time.


FireBird hat geschrieben:Now it is easy: whenever a TAP receives its hotkey, it checks if TMSCommander is running by calling HDD_TAP_isRunning ().


Couldn't TMSCommander even send a message when it is stopped and inform the target TAPs ?
:type: Meine TAPs und Tools

TF5500 PVR (Fw Jan. 2007 P)- 400GB Samsung - AC light 1.05 - Yamaha RX-V 1500
- LAN: Asus WL-500g Deluxe mit ftpd-topfield 0.7.4
TAPs: Quicktimer, Autodelete, Standby, 3PG, Automove, NiceDisplay, PowerRestore, WSS Killer, Eurostirf, Overfly
TV: Sony KDL-46W4500
TF6000 PVR (Fw Okt. 2008)- 160GB Samsung SV1604N
TAPs: iTina, Autodelete, Automove, Autoresume, NiceDisplay, WSS Killer
SRP-2100 (Fw Okt. 2009)
TAPs: SmartEPG, ChangePreview, Autodelete, Automove, BackupSettings,RescueRecs, MySkip, NiceDisplay

Benutzeravatar
TV-Junkie
Alteingesessener
Alteingesessener
Beiträge: 26971
Registriert: Sa 16. Jun 2007, 19:10
Receivertyp: SRP-2401
Receiverfirmware: immer die beste
Wohnort: Düsseldorf

AW: An alle TAP Entwickler: Gemeinsame Benutzung der Fernbedienung

#13

Beitrag von TV-Junkie » Di 23. Mär 2010, 18:31

So, welches Tap hat denn als erstes den Code für den TMScommander drin :thinker:
Das Tap selber läuft, lässt sich nichts einstellen (logischerweise) :cry:
Gruß Ha-Jü
----------------------------------------------------------------------------------------------
Zum Tippspiel BuLi 2016/21017 hier entlang
Und wer Lust auf tippen beim DFB Pokal hat, darf sich hier austoben
Viel Spaß

Tap im AutoStart:Ab Tap 3 gestartet mit X-Start
AutoPIN / Smart EPG / TimerDiags / F***skip / Smart Filer / / BackupSettings / NiceDisplay /
RebuildNAV / SmartDecrypter / NASMount / BackgroundCopy / lost+found

Immer die aktuellste Version

Benutzeravatar
FireBird
Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru
Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru
Beiträge: 25571
Registriert: Fr 9. Dez 2005, 09:59
Receivertyp: SRP-2401CI+ TFIR
Wohnort: Wien

TMSCommander

#14

Beitrag von FireBird » Di 23. Mär 2010, 19:25

I've tried to add the TMSCommander events to ScreenCapture OSD. But as soon as I add the TMSCMDR_CanBeStopped capability flag, the list entry is not selectable.

TMSCMDR_Stop is not included in the quickstart doc but I guess this is because that feature is not yet available.

Having TMSCMDRTAPID in TMSCommander.h would be great. :wink:


/Edit: @Ha-Jü: Erster :D
Zuletzt geändert von FireBird am Di 23. Mär 2010, 19:48, insgesamt 4-mal geändert.

deangelj
Erfahrener Benutzer
Erfahrener Benutzer
Beiträge: 156
Registriert: Mo 12. Mär 2007, 21:21
Receivertyp: TRF-2400
Wohnort: Sydney, Australia

AW: TMSCommander

#15

Beitrag von deangelj » Di 23. Mär 2010, 21:58

Yes, I'll add the Stop function in the next version. The reason the TAP is no longer selectable is due to my lazy coding in my ReturnCode check (I only check for exactly that flag, not an ORed set). I will fix this as well.

And good suggestion about the TAPID too.

And thanks Firebird for your library and your technical assistance.

cheers,
John

deangelj
Erfahrener Benutzer
Erfahrener Benutzer
Beiträge: 156
Registriert: Mo 12. Mär 2007, 21:21
Receivertyp: TRF-2400
Wohnort: Sydney, Australia

AW: An alle TAP Entwickler: Gemeinsame Benutzung der Fernbedienung

#16

Beitrag von deangelj » Di 23. Mär 2010, 22:01

[quote="Happy"]Couldn't TMSCommander even send a message when it is stopped and inform the target TAPs ?[/quote]

Yes, it could. It would then need to send a message when starting as well. Let me think about that some more.

Benutzeravatar
Happy
TAP-Guru
TAP-Guru
Beiträge: 5718
Registriert: Fr 9. Dez 2005, 09:32
Receivertyp: TF4000-5500-6000-TMS
Wohnort: bei Karlsruhe
Kontaktdaten:

AW: TMSCommander

#17

Beitrag von Happy » Di 23. Mär 2010, 22:15

I was also trying to add TMSCommander to a TAP without menu, just with the ability to stop it. But it didn't work.
Also, when pressing EXIT now while in a TAP's menu, the TMSCommander OSD is covering this TAP's menu. (i.e. iTiNa NiceDisplay or Automove)
In the source I see that the substate is not checked.
Also I don't get the fancy icons, that are visible in John's screenshot.

Regards,
Till
:type: Meine TAPs und Tools

TF5500 PVR (Fw Jan. 2007 P)- 400GB Samsung - AC light 1.05 - Yamaha RX-V 1500
- LAN: Asus WL-500g Deluxe mit ftpd-topfield 0.7.4
TAPs: Quicktimer, Autodelete, Standby, 3PG, Automove, NiceDisplay, PowerRestore, WSS Killer, Eurostirf, Overfly
TV: Sony KDL-46W4500
TF6000 PVR (Fw Okt. 2008)- 160GB Samsung SV1604N
TAPs: iTina, Autodelete, Automove, Autoresume, NiceDisplay, WSS Killer
SRP-2100 (Fw Okt. 2009)
TAPs: SmartEPG, ChangePreview, Autodelete, Automove, BackupSettings,RescueRecs, MySkip, NiceDisplay

deangelj
Erfahrener Benutzer
Erfahrener Benutzer
Beiträge: 156
Registriert: Mo 12. Mär 2007, 21:21
Receivertyp: TRF-2400
Wohnort: Sydney, Australia

AW: TMSCommander

#18

Beitrag von deangelj » Mi 24. Mär 2010, 10:54

Hi Till,

The ability to stop is not in 0.4 - hopefully next version. Also I took the icons off because it as only to show which could or could not be managed. I now do this by disabling the line with that TAP on it and you can only select the lines/TAPs that can be managed.

As for covering the TAPs menu, when those TAPs display their menu do they exit normal state? If so then I would imagine that Main State would not be normal? Unless I misunderstand how that works, which is quite likely.

cheers,
John

Benutzeravatar
TV-Junkie
Alteingesessener
Alteingesessener
Beiträge: 26971
Registriert: Sa 16. Jun 2007, 19:10
Receivertyp: SRP-2401
Receiverfirmware: immer die beste
Wohnort: Düsseldorf

AW: TMSCommander

#19

Beitrag von TV-Junkie » Mi 24. Mär 2010, 10:56

FireBird hat geschrieben:
/Edit: @Ha-Jü: Erster :D

Und, kann man es schon herunterladen? :wink:
Gruß Ha-Jü
----------------------------------------------------------------------------------------------
Zum Tippspiel BuLi 2016/21017 hier entlang
Und wer Lust auf tippen beim DFB Pokal hat, darf sich hier austoben
Viel Spaß

Tap im AutoStart:Ab Tap 3 gestartet mit X-Start
AutoPIN / Smart EPG / TimerDiags / F***skip / Smart Filer / / BackupSettings / NiceDisplay /
RebuildNAV / SmartDecrypter / NASMount / BackgroundCopy / lost+found

Immer die aktuellste Version

Benutzeravatar
FireBird
Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru
Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru
Beiträge: 25571
Registriert: Fr 9. Dez 2005, 09:59
Receivertyp: SRP-2401CI+ TFIR
Wohnort: Wien

AW: TMSCommander

#20

Beitrag von FireBird » Mi 24. Mär 2010, 11:19

TV-Junkie hat geschrieben:Und, kann man es schon herunterladen? :wink:

Schon seit Ewigkeiten. :)

Antworten

Zurück zu „SRP/CRP TAP-Bereich“