NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 18 19 20 21 22 … 93 Next »
NPVR IEventNotification

 
  • 0 Vote(s) - 0 Average
NPVR IEventNotification
ralphy
Offline

Senior Member

Posts: 255
Threads: 51
Joined: Nov 2006
#1
2010-09-10, 11:43 AM
Has the implementation for event notification changed from PVRX2? I can get the start up messages logged, but don't seem be getting any events notified or errors display. What am I missing? (This plugin will not have a skin, but runs in a separate thread to process events received from NPVR) Do we still get all the same events (and more?) in NPVR as we did in PVRX2?

Code:
namespace Test
{

public class TestEventNotify: IEventNotification  
  {

   public   TestEventNotify()
    {
     Logger.Debug("Debug Test Message");
     Logger.Error("Error Test Message");
     Logger.Info("TestEventNotify: Version " + this.GetType().Assembly.GetName().Version.ToString() + " .ctr called by plugin or config");

      }
    
       public void Notify(string eventType, object eventText)
        {
        try
           {
        Logger.Debug("TestEventNotify: EVENTS NOTIFIED: eventType= " + eventType.ToString());
        Logger.Debug("TestEventNotify: EVENTS NOTIFIED: eventText= '" + eventText.ToString() +"'");
        }

        catch (Exception ex)
    {
        Logger.Error(ex.Message);
        Logger.Error(ex.ToString());
    }
}

}

}
[SIZE="1"]Silverstone GD01S-MXR (three dead rows of pixels in the LCD and defective remote control), Power: Zalman ZM460B-APS (blew up - can't remember what's there now); CPU: Pentium D 3.2 GHz with Asus V72 Cooler; MD: Asus P5LD2 Deluxe 2048MB,
WDC WD10EADS 1TB Data, 320GB System, Asus EN9400GT Silent 512MB, Hauppauge HVR 1300,
XP Home SP3, GB-PVR 2.0, ExternalDisplay v0.3[/SIZE]
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,767
Threads: 954
Joined: May 2006
#2
2010-09-10, 11:55 AM
I use this line in the constructor

EventBus.GetInstance().AddListener(this);

Martin
ralphy
Offline

Senior Member

Posts: 255
Threads: 51
Joined: Nov 2006
#3
2010-09-10, 12:19 PM
Thanks Martin,

That gets me going - now the rest of the funs starts!
[SIZE="1"]Silverstone GD01S-MXR (three dead rows of pixels in the LCD and defective remote control), Power: Zalman ZM460B-APS (blew up - can't remember what's there now); CPU: Pentium D 3.2 GHz with Asus V72 Cooler; MD: Asus P5LD2 Deluxe 2048MB,
WDC WD10EADS 1TB Data, 320GB System, Asus EN9400GT Silent 512MB, Hauppauge HVR 1300,
XP Home SP3, GB-PVR 2.0, ExternalDisplay v0.3[/SIZE]
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#4
2010-09-11, 02:44 AM
making an lcd/vfd interface?
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
ralphy
Offline

Senior Member

Posts: 255
Threads: 51
Joined: Nov 2006
#5
2010-09-11, 08:29 AM
pBS Wrote:making an lcd/vfd interface?

Actually, looking at porting this. Haven't looked at the code for a year now, and had to reinstalled the IDE, that got wiped out after several reloads of the OS in the past year.

Just started and looks like a potentially large task to come up to speed on the changes. Whilst some things are easy to find (eg Logger.Verbose can be changed to Logger.Debug), others are a bit more troublesome, since equivalent methods are [yet] there, methods have become fields and enumerated values are different etc etc etc.:eek: And that just to get the project to compile.
[SIZE="1"]Silverstone GD01S-MXR (three dead rows of pixels in the LCD and defective remote control), Power: Zalman ZM460B-APS (blew up - can't remember what's there now); CPU: Pentium D 3.2 GHz with Asus V72 Cooler; MD: Asus P5LD2 Deluxe 2048MB,
WDC WD10EADS 1TB Data, 320GB System, Asus EN9400GT Silent 512MB, Hauppauge HVR 1300,
XP Home SP3, GB-PVR 2.0, ExternalDisplay v0.3[/SIZE]
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#6
2010-09-11, 09:07 AM
same here..i modified the imon plugin to use the registry to store the info and retrieved it with lcdsmartie..
been using it for years now on all my vfd's..Smile
even made a drive temp warning system to monitor smart data with voice alerts..

i was wondering if you could add an option to export the events to a reg key so it can be retrieved by other progs?
[making it available for anyone who uses LCDSmartie]
the combo works nicely because smartie formats data nicely for vfd and can add in other system info etc..
my imon plugin was only used to export the events..reg is fast and reliable and hasn't given me a bit of trouble yet..
i remember your old plugin, use to for a while till i made my own..
[now i'm in same boat, re-installs ate my IDE..]
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
ralphy
Offline

Senior Member

Posts: 255
Threads: 51
Joined: Nov 2006
#7
2010-09-12, 01:42 AM
pBS Wrote:i was wondering if you could add an option to export the events to a reg key so it can be retrieved by other progs?
[making it available for anyone who uses LCDSmartie]

This might be possible by simply adding another driver, but Im sorry pBS, not sure if I have the energy for this. If you were inclined to do so, have a look at the MediaPortal code for the drivers to see what might be involved and let me know what you think.
[SIZE="1"]Silverstone GD01S-MXR (three dead rows of pixels in the LCD and defective remote control), Power: Zalman ZM460B-APS (blew up - can't remember what's there now); CPU: Pentium D 3.2 GHz with Asus V72 Cooler; MD: Asus P5LD2 Deluxe 2048MB,
WDC WD10EADS 1TB Data, 320GB System, Asus EN9400GT Silent 512MB, Hauppauge HVR 1300,
XP Home SP3, GB-PVR 2.0, ExternalDisplay v0.3[/SIZE]
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#8
2010-09-12, 06:16 AM
actually, if the above code works to extract events, that may be all i need...
is there any more code needed for above sample?
i just need the raw events, all the rest i do in a helper app already..[sql lookups,now/next,etc]

if you have something working that just logs the events, i'd be most grateful Smile

redirecting same data to registry is easy..just one line..
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#9
2010-09-28, 09:56 PM
hmmm,trying to get above code running...where do i put the EventBus.GetInstance().AddListener(this); ?
do i replace the Notify(string eventType, object eventText) with it?
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#10
2010-09-28, 10:29 PM
pBS Wrote:hmmm,trying to get above code running...where do i put the EventBus.GetInstance().AddListener(this); ?
do i replace the Notify(string eventType, object eventText) with it?
You would probably want to put it in
Code:
public   TestEventNotify()
    {
     Logger.Debug("Debug Test Message");
     Logger.Error("Error Test Message");
     Logger.Info("TestEventNotify: Version " + this.GetType().Assembly.GetName().Version.ToString() + " .ctr called by plugin or config");
     [color=darkred]EventBus.GetInstance().AddListener(this); [/color]

      }
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Way to tell programmatically if channel load in from NPVR has finished... gdogg371 3 2,319 2021-03-11, 03:59 PM
Last Post: mvallevand
  Plugins and NPVR. Where do we start? sub 80 68,061 2020-11-26, 10:02 PM
Last Post: mandai
  Test/Development environment for npvr.db3 scJohn 10 4,171 2020-09-04, 09:14 PM
Last Post: scJohn
  How to extract M3U8 and get matching XMLTV guide data from NPVR almightyj 0 3,346 2018-10-23, 07:24 AM
Last Post: almightyj
  ios app to control npvr ui idea jnbooker15 4 3,554 2015-09-21, 10:19 PM
Last Post: sub
  ios app to control npvr ui idea jnbooker15 0 2,431 2015-09-21, 06:39 PM
Last Post: jnbooker15
  Couple of questions about hacking npvr.db3 drmargarit 6 4,206 2014-09-08, 02:22 AM
Last Post: sub
  high res (256x256+) npvr icon? reven 15 5,764 2013-09-01, 05:13 AM
Last Post: psycik
  trying to fake npvr database for unit tests reven 3 2,233 2013-05-20, 08:53 AM
Last Post: reven
  Multiple genres in npvr.db3 bgowland 5 2,811 2013-04-16, 09:53 PM
Last Post: ACTCMS

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode