Well the cleanest way would be to figure out how to make "osdmain" re-read the .recordings file. A simple program should do it, just calls the right function. Restarting osdmain just isn't nice.
Ok, first off to everyone in this topic, please if you want to further discuss this, join the developers mailing list:
http://groups.google.com/group/Neuros-DM320HardwareYou will get a more prompt response by posting there, since most of the devs hang out there. Keeping eyes on forums is just too cumbersome, sorry.
Now, to the actual issue:
- why do you all mention "osdmain" ? I suppose you mean "desktop", which is the name of the component of the split osdmain that handles schedules (among other things). If you still have "osdmain" in your firmwares, it's time to upgrade, you will find a ton of changed things from the versions that still have monolithic osdmain. It's not really worth your time working on pretty old versions.
- to pull off the PC-side scheduler application as you suggest, you need to patch "desktop" to do any of the following:
A) add a periodic timer that checks if the date of modification of the schedules file is changed, and if so asks it to be reloaded (more on this below).
B) make desktop listen on the network for a simple message on certain port, and have your OSX app (or any other PC-side scheduler) send this message when it has changed the schedules file. when the desktop receive this message from network, it asks the file to be reloaded. Or write a tiny daemon that does this and then communicated with desktop via Neux WM messages.
- to force re-read of the schedules, you need to load the settings plugin for recorder (desktop already does this, and i see you already found this out from your previous posts). Then use NeuxPluginControl to send to the plugin the command INIT_SCHEDULE_DATA. This in theory reloads all the schedules. Then you call GET_NEXT_SCHEDULE_ALARM and use the returned value to set the next-scheduled timer (desktop already does this, so check how it does it).
A word of warning: I have not actually tried to do any of this, i just looked into the code. If none of you feels confident enough to try your hand at writing a patch on this and submit it, we can add this task to official developers schedule and do it internally for you.
Please quote any of the above on the mailing list for further discussion.
Thank you,
--
nero