netlinx-modules-commit Mailing List for NetLinx Module Library
Brought to you by:
coffler
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
(1) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(5) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2007 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Jeff C. <co...@us...> - 2007-02-25 20:45:01
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules/DawnDusk In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv18532/DawnDusk Modified Files: DawnDuskMod.axs Log Message: Fix DawnDuskMod.axs for latest 2007 daylight savings time rules. Latest SlimServerMod changes (primarily for async update support). Index: DawnDuskMod.axs =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/DawnDusk/DawnDuskMod.axs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DawnDuskMod.axs 27 Jan 2003 17:14:57 -0000 1.1 --- DawnDuskMod.axs 25 Feb 2007 20:44:54 -0000 1.2 *************** *** 14,18 **** (* FILE CREATED ON: 01/26/2003 AT: 07:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 01/26/2003 AT: 09:00:20 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) --- 14,18 ---- (* FILE CREATED ON: 01/26/2003 AT: 07:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 02/25/2007 AT: 10:34:19 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) *************** *** 136,155 **** Select { ! // Are we before or after the first Sunday? ! Active (snMonth = 4): { ! SLong snFirstSunday; // Day number for first Sunday ! nTempDOW = Day_Of_Week("'04-07-',itoa(snYear)"); ! snFirstSunday = 7 - nTempDOW + 1; Select { ! // Before first Sunday? (If so, DLS not in effect) ! Active (snDay < snFirstSunday): fDLSActive = 0; // After first Sunday? (If so, DLS is in effect) ! Active (snDay > snFirstSunday): fDLSActive = 1; ! // Must be first Sunday (DLS begins at 2:00 AM) Active (TIME < '02:00:00'): fDLSActive = 0; --- 136,155 ---- Select { ! // Are we before or after the second Sunday in March? ! Active (snMonth = 3): { ! SLong snSecondSunday; // Day number for first Sunday ! nTempDOW = Day_Of_Week("'03-14-',itoa(snYear)"); ! snSecondSunday = 14 - nTempDOW + 1; // Second Sunday of month Select { ! // Before second Sunday? (If so, DLS not in effect) ! Active (snDay < snSecondSunday): fDLSActive = 0; // After first Sunday? (If so, DLS is in effect) ! Active (snDay > snSecondSunday): fDLSActive = 1; ! // Must be second Sunday (DLS begins at 2:00 AM) Active (TIME < '02:00:00'): fDLSActive = 0; *************** *** 160,177 **** } ! // Are we before or after the last Sunday? ! Active (snMonth = 10): { ! SLong snLastSunday; // Day number for last Sunday ! nTempDOW = Day_Of_Week("'10-24-',itoa(snYear)"); ! snLastSunday = 31 - nTempDOW + 1; Select { ! // Before last Sunday? (If so, DLS is in effect) ! Active (snDay < snLastSunday): fDLSActive = 1; ! // After last Sunday? (If so, DLS not in effect) ! Active (snDay > snLastSunday): fDLSActive = 0; --- 160,177 ---- } ! // Are we before or after the first Sunday in November? ! Active (snMonth = 11): { ! SLong snFirstSunday; // Day number for first Sunday ! nTempDOW = Day_Of_Week("'11-07-',itoa(snYear)"); ! snFirstSunday = 31 - nTempDOW + 1; Select { ! // Before first Sunday? (If so, DLS is in effect) ! Active (snDay < snFirstSunday): fDLSActive = 1; ! // After first Sunday? (If so, DLS not in effect) ! Active (snDay > snFirstSunday): fDLSActive = 0; *************** *** 185,193 **** } ! // November through March - DLS is not active ! Active (snMonth > 10 || snMonth < 4): fDLSActive = 0; ! // Must be May through September - DLS is active Active (1): fDLSActive = 1; --- 185,193 ---- } ! // December through February - DLS is not active ! Active (snMonth > 11 || snMonth < 3): fDLSActive = 0; ! // Must be April through October - DLS is active Active (1): fDLSActive = 1; |
|
From: Jeff C. <co...@us...> - 2007-02-25 20:44:58
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv18532/SlimServer Modified Files: SlimServerMod.axi SlimServerMod.axs Log Message: Fix DawnDuskMod.axs for latest 2007 daylight savings time rules. Latest SlimServerMod changes (primarily for async update support). Index: SlimServerMod.axi =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer/SlimServerMod.axi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SlimServerMod.axi 21 Sep 2005 14:27:17 -0000 1.3 --- SlimServerMod.axi 25 Feb 2007 20:44:54 -0000 1.4 *************** *** 18,22 **** (*}}PS_SOURCE_INFO *) (* *) ! (* copyright : (C) 2004-2005 by Jeff Coffler *) (* email : net...@ta... *) (* *) --- 18,22 ---- (*}}PS_SOURCE_INFO *) (* *) ! (* copyright : (C) 2004-2006 by Jeff Coffler *) (* email : net...@ta... *) (* *) Index: SlimServerMod.axs =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer/SlimServerMod.axs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SlimServerMod.axs 1 Nov 2005 20:40:26 -0000 1.3 --- SlimServerMod.axs 25 Feb 2007 20:44:54 -0000 1.4 *************** *** 12,16 **** (* FILE CREATED ON: 10/03/2004 AT: 09:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 10/30/2005 AT: 09:52:47 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) --- 12,16 ---- (* FILE CREATED ON: 10/03/2004 AT: 09:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 05/20/2006 AT: 15:15:38 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) *************** *** 26,30 **** (*}}PS_SOURCE_INFO *) (* *) ! (* copyright : (C) 2004-2005 by Jeff Coffler *) (* email : net...@ta... *) (* *) --- 26,30 ---- (*}}PS_SOURCE_INFO *) (* *) ! (* copyright : (C) 2004-2006 by Jeff Coffler *) (* email : net...@ta... *) (* *) *************** *** 79,84 **** char MAX_UI_Level = 5; // Maximum number of levels in UI item array - char MIN_Status_Freq = 2; // Minimum number of seconds that must elapse to issue 'status' - char CmdCommands[][20] = { // Valid commands for SS_opDoCommand 'play', 'stop', 'pause', '~B jump_fwd', // 01-04 --- 79,82 ---- *************** *** 105,109 **** // Support for NetLinx timelines - LONG tlGetStatusUpds = 1; // Timeline to perform automatic status updates LONG tlConnectProgress = 2; // Progress with connection to SlimServer LONG ConnectSeconds = 10; // Number of seconds for connection notifications (0=None) --- 103,106 ---- *************** *** 177,181 **** volatile integer vdChannelsUsed = 255; // Number of channels used for virtual device feedback (255 by default) ! volatile integer statusUpdSecs = 30; // By default, update status every 30 seconds volatile integer panelUpdateFlags = 0; // Default flags set for panel updating --- 174,178 ---- volatile integer vdChannelsUsed = 255; // Number of channels used for virtual device feedback (255 by default) ! volatile integer statusUpdSecs = 60; // By default, update status every 30 seconds volatile integer panelUpdateFlags = 0; // Default flags set for panel updating *************** *** 360,366 **** updateTimes[1] = secs * 1000; - if (timeline_active(tlConnectProgress)) - timeline_kill(tlConnectProgress); - timeline_create(tlConnectProgress, updateTimes, 1, TIMELINE_ABSOLUTE, TIMELINE_REPEAT); } --- 357,360 ---- *************** *** 375,379 **** define_function Connect() ! // Connect: Establish a TCP/IP connection (via HTTP) to the SlimServer { slong slStatus; --- 369,373 ---- define_function Connect() ! // Connect: Establish a TCP/IP connection (via CLI) to the SlimServer { slong slStatus; *************** *** 390,397 **** Q_HasItems = FALSE; - // Cease status updates if they're currently in progress - if (timeline_active(tlGetStatusUpds)) - timeline_kill(tlGetStatusUpds); - lConnectRetryCount = 0; return; --- 384,387 ---- *************** *** 521,599 **** } - define_function BeginStatusTimeline(char fRestart) - // BeginStatusTimeline: Start (or restart) a status timeline - // fRestart: Restart the timeline if it's already running - { - long updateTimes[1]; - integer loop, maxLoopCount; - integer secsEntry[SS_MAX_PlayerCount]; // Number of seconds for particular entry - integer secsTimeline; // Number of seconds to next update - - // Restart timeline if it's already running? - - if (timeline_active(tlGetStatusUpds) && !fRestart) - return; - - // Determine how long we need to wait for the next status update - - secsTimeline = 0; - maxLoopCount = min_value(length_array(sUnitAddr), SS_MAX_PlayerCount); - - for (loop = 1; loop <= maxLoopCount; loop++) { - secsEntry[loop] = 0; - off[stateData[loop].fPerformStatus]; - if (stateData[loop].fFeedbackEnabled) { - secsEntry[loop] = statusUpdSecs; // Default value - - // Figure out the next optimum time for this unit to update - - if (Status[loop].Mode == SS_PlayMode_Play) { - if (Status[loop].SongDuration > 0) { - if (Status[loop].SongDuration >= Status[loop].SongTime) { - integer timeRemaining; - - timeRemaining = Status[loop].SongDuration - Status[loop].SongTime + 1; - secsEntry[loop] = max_value(min_value(timeRemaining, statusUpdSecs), MIN_Status_Freq); - } - else { - // One would think this wouldn't happen (time index into song > song length), - // but it does occationally. When it does, just refresh - it's transient. - secsEntry[loop] = MIN_Status_Freq; - } - } - } - } - - if (secsEntry[loop] > 0 && (secsTimeline == 0 || secsEntry[loop] < secsTimeline)) - secsTimeline = secsEntry[loop]; - } - - // Set (or reset) the timeline for automatic updates - - if (secsTimeline <> 0) { - // Set feedback flag for all panels who are "next up" - - for (loop = 1; loop <= maxLoopCount; loop++) - if (secsEntry[loop] > 0 && secsEntry[loop] == secsTimeline) - on[stateData[loop].fPerformStatus]; - - // Start the timeline - - updateTimes[1] = secsTimeline * 1000; - - if (timeline_active(tlGetStatusUpds)) - timeline_kill(tlGetStatusUpds); - - Diag(llSlimServer, Debug, sTagSlimServer, "'Creating timeline tlGetStatusUpds with ',itoa(updateTimes[1]),' milliseconds ...'"); - timeline_create(tlGetStatusUpds, updateTimes, 1, TIMELINE_ABSOLUTE, TIMELINE_ONCE); - } - else { - if (timeline_active(tlGetStatusUpds)) { - Diag(llSlimServer, Debug, sTagSlimServer, 'Deleting timeline tlGetStatusUpds ...'); - timeline_kill(tlGetStatusUpds); - } - } - } - define_function DoCommand(char unitNum, char opCode) // DoCommand: Handler for SlimServer command --- 511,514 ---- *************** *** 682,688 **** playerID = "GetPlayerID(unitNum)"; if (startSong == 0) ! sBuffer = "playerID,'status - ',itoa(numSongs),' charset:iso-8859-1 tags:gal'"; else ! sBuffer = "playerID,'status ',itoa(startSong),' ',itoa(numSongs),' charset:iso-8859-1 tags:gal'"; // To avoid "flooding" SlimServer with status requests, --- 597,603 ---- playerID = "GetPlayerID(unitNum)"; if (startSong == 0) ! sBuffer = "playerID,'status - ',itoa(numSongs),' charset:iso-8859-1 tags:gal subscribe:',itoa(statusUpdSecs)"; else ! sBuffer = "playerID,'status ',itoa(startSong),' ',itoa(numSongs),' charset:iso-8859-1 tags:gal subscribe:',itoa(statusUpdSecs)"; // To avoid "flooding" SlimServer with status requests, *************** *** 707,711 **** // flags: Special flags (global) to use for panel updates { ! if (secs > 0) { Diag(llSlimServer, Info, sTagSlimServer, "'SetStatusUpdates: Update frequency set to ',itoa(secs),' seconds'"); statusUpdSecs = secs; --- 622,626 ---- // flags: Special flags (global) to use for panel updates { ! if (secs >= 0) { Diag(llSlimServer, Info, sTagSlimServer, "'SetStatusUpdates: Update frequency set to ',itoa(secs),' seconds'"); statusUpdSecs = secs; *************** *** 747,760 **** off[stateData[unitNum].fStatusRequested]; ! // We're starting to track (or clearing) this panel - get on the fly status and set timeline if (numPanels) { on[stateData[unitNum].fForceRefresh]; GetStatus(unitNum, 0, 2); - BeginStatusTimeline(FALSE); SetCoverArtPath(unitNum); } - else - BeginStatusTimeline(TRUE); // Did user request extra-anal ( :-) ) per-second updates? --- 662,672 ---- off[stateData[unitNum].fStatusRequested]; ! // We're starting to track (or clearing) this panel - get on the fly status if (numPanels) { on[stateData[unitNum].fForceRefresh]; GetStatus(unitNum, 0, 2); SetCoverArtPath(unitNum); } // Did user request extra-anal ( :-) ) per-second updates? *************** *** 1840,1855 **** ParseVolumeResponse(str, cmdParams[1]); ! active (TRUE): { ! // Major hack! We need to be much smarter about updating status ! // data ourselves for "trivial" changes (rather than query again) ! // ! // Note: This will likely all go away anyway with async updates ! char unitNum; ! unitNum = GetPlayerUnitNum(cmdParams[1]); ! if (unitNum) ! GetStatus(unitNum, 0, 2); ! Diag(llSlimServer, Debug, sTagSlimServer, "'ProcessResponse: Ignoring response, p1=',cmdParams[1],', p2=',cmdParams[2]"); - } } --- 1752,1757 ---- ParseVolumeResponse(str, cmdParams[1]); ! active (TRUE): Diag(llSlimServer, Debug, sTagSlimServer, "'ProcessResponse: Ignoring response, p1=',cmdParams[1],', p2=',cmdParams[2]"); } *************** *** 2022,2026 **** } } ! active (sTag = 'tags' || sTag = 'charset'): { // Carry over from the command - we recognize it and ignore it } --- 1924,1928 ---- } } ! active (sTag = 'charset' || sTag = 'tags' || sTag = 'subscribe'): { // Carry over from the command - we recognize it and ignore it } *************** *** 2071,2079 **** UpdateVirtualDevice(); - - // Kick off the next timeline ... - - Cancel_Wait 'Failsafe_Dead_Slimserver'; - BeginStatusTimeline(TRUE); } --- 1973,1976 ---- *************** *** 2715,2718 **** --- 2612,2619 ---- sTagSlimServer = "'SlimServer ',DumpDPS(dvSlimServer)"; + // Finally, try to connect in order to get async updates + + Connect(); + (***********************************************************) *************** *** 2724,2727 **** --- 2625,2630 ---- { Online: { + char unitNum; + Diag(llSlimServer, Info, sTagSlimServer, 'Connected to SlimServer via TCP/IP networking'); lConnectRetryCount = 0; *************** *** 2732,2735 **** --- 2635,2644 ---- ConnectNotify(0); + + // We have a connection, so ask the SlimServer to monitor player changes + + for (unitNum = 1; unitNum <= length_array(sUnitAddr); unitNum++) + GetStatus(unitNum, 0, 2); + ProcessQueue(); } *************** *** 2783,2802 **** } - Timeline_Event[tlGetStatusUpds] - { - char loop, maxLoopCount; - - maxLoopCount = min_value(length_array(sUnitAddr), SS_MAX_PlayerCount); - for (loop = 1; loop <= maxLoopCount; loop++) - if (stateData[loop].fPerformStatus) - GetStatus(loop, 0, 2); - - // Normally the status timeline is updated after a status command is received - // In the event that we never get one, make sure our timer starts eventually - - Wait 50 'Failsafe_Dead_Slimserver' - BeginStatusTimeline(FALSE); - } - Timeline_Event[tlConnectProgress] { --- 2692,2695 ---- |
|
From: Jeff C. <co...@us...> - 2006-12-04 15:52:23
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules/BaytechRPC In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22537 Modified Files: BaytechRPC.axs Added Files: changelog.txt Log Message: Commit changes for BaytechRPC v1.1 of the code base. See file changelog.txt for detail of this change. --- NEW FILE: changelog.txt --- Ethernet control of Baytech RPC series remote power control units Code copyright 2005 Ryan P. Wright (http://www.ryanwright.com) Change log / version history Version 1.1 :: 12/3/2006 + Fixed problem: Outlets would flip on and off during a status update if the RPC device was in a different outlet state than Netlinx's virtual device. This was evident during a Netlinx system reboot, or if someone manually logged into the RPC device and changed outlet state. The module now tracks the RPC's outlet state in a different set of channels (101-112). Outlet state is now checked after every command execution to the device, and mapping to the virtual channels happens without flipping the outlet in the event of discrepency. + Fixed problem: Issuing multiple commands at once didn't work. The RPC device takes several seconds after a command is issued to execute and recover back to the menu. There is now a user-definable wait setting with a default of 3.5 seconds so we don't overload the device. Version 1.0 :: 2/24/2005 + First version of the code. Index: BaytechRPC.axs =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/BaytechRPC/BaytechRPC.axs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BaytechRPC.axs 24 Dec 2005 01:33:37 -0000 1.1 --- BaytechRPC.axs 4 Dec 2006 15:52:18 -0000 1.2 *************** *** 3,8 **** (* ****************************************************************************************** Ethernet control of Baytech RPC series remote power control units ! Code copyright 2005 Ryan P. Wright (http://www.ryanwright.com) ! VERSION 1.0 LAST MODIFIED: 2/24/2005 The latest version of this code is always available at: --- 3,8 ---- (* ****************************************************************************************** Ethernet control of Baytech RPC series remote power control units ! Code copyright 2005-2007 Ryan P. Wright (http://www.ryanwright.com) ! VERSION 1.1 LAST MODIFIED: 12/03/2006 The latest version of this code is always available at: *************** *** 128,131 **** --- 128,136 ---- // set to 1 to enable logging via syslog // set to 2 to enable debugging (highly detailed logging via syslog) + + integer cmdWait = 35 // time to wait between commands (ms) (default = 35 = 3.5 seconds) + // Increase this number if sequential command execution is unreliable. + // Decrease this number to increase speed of sequential command execution. + // Warning! Lower numbers will decrease reliability! Best to leave at defaults. (* **************************************************************************************** *) *************** *** 222,226 **** send_string rpcDevice, "cmd,13" if (loglevel > 0) { syslog(Info, 'BaytechRPCModule', "'Switched "',cmd,'" at ',rpcDeviceIP") } ! executingCmd = 0 } --- 227,231 ---- send_string rpcDevice, "cmd,13" if (loglevel > 0) { syslog(Info, 'BaytechRPCModule', "'Switched "',cmd,'" at ',rpcDeviceIP") } ! wait cmdWait executingCmd = 0 // wait before executing next command } *************** *** 242,291 **** channel_event [vdev_rpc, 1] { ! on: { if (outlets >= 1) { cmdQueue = "cmdQueue,'on 1!'" } } ! off: { if (outlets >= 1) { cmdQueue = "cmdQueue,'off 1!'" } } } channel_event [vdev_rpc, 2] { ! on: { if (outlets >= 2) { cmdQueue = "cmdQueue,'on 2!'" } } ! off: { if (outlets >= 2) { cmdQueue = "cmdQueue,'off 2!'" } } } channel_event [vdev_rpc, 3] { ! on: { if (outlets >= 3) { cmdQueue = "cmdQueue,'on 3!'" } } ! off: { if (outlets >= 3) { cmdQueue = "cmdQueue,'off 3!'" } } } channel_event [vdev_rpc, 4] { ! on: { if (outlets >= 4) { cmdQueue = "cmdQueue,'on 4!'" } } ! off: { if (outlets >= 4) { cmdQueue = "cmdQueue,'off 4!'" } } } channel_event [vdev_rpc, 5] { ! on: { if (outlets >= 5) { cmdQueue = "cmdQueue,'on 5!'" } } ! off: { if (outlets >= 5) { cmdQueue = "cmdQueue,'off 5!'" } } } channel_event [vdev_rpc, 6] { ! on: { if (outlets >= 6) { cmdQueue = "cmdQueue,'on 6!'" } } ! off: { if (outlets >= 6) { cmdQueue = "cmdQueue,'off 6!'" } } } channel_event [vdev_rpc, 7] { ! on: { if (outlets >= 7) { cmdQueue = "cmdQueue,'on 7!'" } } ! off: { if (outlets >= 7) { cmdQueue = "cmdQueue,'off 7!'" } } } channel_event [vdev_rpc, 8] { ! on: { if (outlets >= 8) { cmdQueue = "cmdQueue,'on 8!'" } } ! off: { if (outlets >= 8) { cmdQueue = "cmdQueue,'off 8!'" } } } channel_event [vdev_rpc, 9] { ! on: { if (outlets >= 9) { cmdQueue = "cmdQueue,'on 9!'" } } ! off: { if (outlets >= 9) { cmdQueue = "cmdQueue,'off 9!'" } } } channel_event [vdev_rpc, 10] { ! on: { if (outlets >= 10) { cmdQueue = "cmdQueue,'on 10!'" } } ! off: { if (outlets >= 10) { cmdQueue = "cmdQueue,'off 10!'" } } } channel_event [vdev_rpc, 11] { ! on: { if (outlets >= 11) { cmdQueue = "cmdQueue,'on 11!'" } } ! off: { if (outlets >= 11) { cmdQueue = "cmdQueue,'off 11!'" } } } channel_event [vdev_rpc, 12] { ! on: { if (outlets >= 12) { cmdQueue = "cmdQueue,'on 12!'" } } ! off: { if (outlets >= 12) { cmdQueue = "cmdQueue,'off 12!'" } } } --- 247,296 ---- channel_event [vdev_rpc, 1] { ! on: { if ((outlets >= 1) && (! [vdev_rpc,101])) { cmdQueue = "cmdQueue,'on 1!'" } } ! off: { if ((outlets >= 1) && ([vdev_rpc,101])) { cmdQueue = "cmdQueue,'off 1!'" } } } channel_event [vdev_rpc, 2] { ! on: { if ((outlets >= 2) && (! [vdev_rpc,102])) { cmdQueue = "cmdQueue,'on 2!'" } } ! off: { if ((outlets >= 2) && ([vdev_rpc,102])) { cmdQueue = "cmdQueue,'off 2!'" } } } channel_event [vdev_rpc, 3] { ! on: { if ((outlets >= 3) && (! [vdev_rpc,103])) { cmdQueue = "cmdQueue,'on 3!'" } } ! off: { if ((outlets >= 3) && ([vdev_rpc,103])) { cmdQueue = "cmdQueue,'off 3!'" } } } channel_event [vdev_rpc, 4] { ! on: { if ((outlets >= 4) && (! [vdev_rpc,104])) { cmdQueue = "cmdQueue,'on 4!'" } } ! off: { if ((outlets >= 4) && ([vdev_rpc,104])) { cmdQueue = "cmdQueue,'off 4!'" } } } channel_event [vdev_rpc, 5] { ! on: { if ((outlets >= 5) && (! [vdev_rpc,105])) { cmdQueue = "cmdQueue,'on 5!'" } } ! off: { if ((outlets >= 5) && ([vdev_rpc,105])) { cmdQueue = "cmdQueue,'off 5!'" } } } channel_event [vdev_rpc, 6] { ! on: { if ((outlets >= 6) && (! [vdev_rpc,106])) { cmdQueue = "cmdQueue,'on 6!'" } } ! off: { if ((outlets >= 6) && ([vdev_rpc,106])) { cmdQueue = "cmdQueue,'off 6!'" } } } channel_event [vdev_rpc, 7] { ! on: { if ((outlets >= 7) && (! [vdev_rpc,107])) { cmdQueue = "cmdQueue,'on 7!'" } } ! off: { if ((outlets >= 7) && ([vdev_rpc,107])) { cmdQueue = "cmdQueue,'off 7!'" } } } channel_event [vdev_rpc, 8] { ! on: { if ((outlets >= 8) && (! [vdev_rpc,108] )) { cmdQueue = "cmdQueue,'on 8!'" } } ! off: { if ((outlets >= 8) && ([vdev_rpc,108])) { cmdQueue = "cmdQueue,'off 8!'" } } } channel_event [vdev_rpc, 9] { ! on: { if ((outlets >= 9) && (! [vdev_rpc,109])) { cmdQueue = "cmdQueue,'on 9!'" } } ! off: { if ((outlets >= 9) && ([vdev_rpc,109])) { cmdQueue = "cmdQueue,'off 9!'" } } } channel_event [vdev_rpc, 10] { ! on: { if ((outlets >= 10) && (! [vdev_rpc,110])) { cmdQueue = "cmdQueue,'on 10!'" } } ! off: { if ((outlets >= 10) && ([vdev_rpc,110])) { cmdQueue = "cmdQueue,'off 10!'" } } } channel_event [vdev_rpc, 11] { ! on: { if ((outlets >= 11) && (! [vdev_rpc,111])) { cmdQueue = "cmdQueue,'on 11!'" } } ! off: { if ((outlets >= 11) && ([vdev_rpc,111])) { cmdQueue = "cmdQueue,'off 11!'" } } } channel_event [vdev_rpc, 12] { ! on: { if ((outlets >= 12) && (! [vdev_rpc,112])) { cmdQueue = "cmdQueue,'on 12!'" } } ! off: { if ((outlets >= 12) && ([vdev_rpc,112])) { cmdQueue = "cmdQueue,'off 12!'" } } } *************** *** 323,421 **** // at second menu, update channels from rpc data once queue has been flushed ! if ((menulevel = 1) && (find_string(rpcbuffer, '>',1)) && (updatingStatus)) { if (find_string(rpcbuffer, '1 On',1)) { ! on[vdev_rpc,1] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 1')} } if (find_string(rpcbuffer, '1 Off',1)){ ! off[vdev_rpc,1] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 1')} } if (find_string(rpcbuffer, '2 On',1)) { ! on[vdev_rpc,2] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 2')} } if (find_string(rpcbuffer, '2 Off',1)){ ! off[vdev_rpc,2] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 2')} } if (find_string(rpcbuffer, '3 On',1)) { ! on[vdev_rpc,3] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 3')} } if (find_string(rpcbuffer, '3 Off',1)){ ! off[vdev_rpc,3] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 3')} } if (find_string(rpcbuffer, '4 On',1)) { ! on[vdev_rpc,4] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 4')} } if (find_string(rpcbuffer, '4 Off',1)){ ! off[vdev_rpc,4] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 4')} } if (find_string(rpcbuffer, '5 On',1)) { ! on[vdev_rpc,5] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 5')} } if (find_string(rpcbuffer, '5 Off',1)){ ! off[vdev_rpc,5] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 5')} } if (find_string(rpcbuffer, '6 On',1)) { ! on[vdev_rpc,6] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 6')} } if (find_string(rpcbuffer, '6 Off',1)){ ! off[vdev_rpc,6] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 6')} } if (find_string(rpcbuffer, '7 On',1)) { ! on[vdev_rpc,7] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 7')} } if (find_string(rpcbuffer, '7 Off',1)){ ! off[vdev_rpc,7] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 7')} } if (find_string(rpcbuffer, '8 On',1)) { ! on[vdev_rpc,8] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 8')} } if (find_string(rpcbuffer, '8 Off',1)){ ! off[vdev_rpc,8] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 8')} } if (find_string(rpcbuffer, '9 On',1)) { ! on[vdev_rpc,9] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 9')} } if (find_string(rpcbuffer, '9 Off',1)){ ! off[vdev_rpc,9] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 9')} } if (find_string(rpcbuffer, '10 On',1)) { ! on[vdev_rpc,10] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 10')} } if (find_string(rpcbuffer, '10 Off',1)){ ! off[vdev_rpc,10] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 10')} } if (find_string(rpcbuffer, '11 On',1)) { ! on[vdev_rpc,11] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 11')} } if (find_string(rpcbuffer, '11 Off',1)){ ! off[vdev_rpc,11] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 11')} } if (find_string(rpcbuffer, '12 On',1)) { ! on[vdev_rpc,12] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 12')} } if (find_string(rpcbuffer, '12 Off',1)){ ! off[vdev_rpc,12] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 12')} } --- 328,427 ---- // at second menu, update channels from rpc data once queue has been flushed ! // if ((menulevel = 1) && (find_string(rpcbuffer, '>',1)) && (updatingStatus)) { ! if ((menulevel = 1) && (find_string(rpcbuffer, '>',1))) { if (find_string(rpcbuffer, '1 On',1)) { ! on[vdev_rpc,101] on[vdev_rpc,1] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 1')} } if (find_string(rpcbuffer, '1 Off',1)){ ! off[vdev_rpc,101] off[vdev_rpc,1] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 1')} } if (find_string(rpcbuffer, '2 On',1)) { ! on[vdev_rpc,102] on[vdev_rpc,2] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 2')} } if (find_string(rpcbuffer, '2 Off',1)){ ! off[vdev_rpc,102] off[vdev_rpc,2] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 2')} } if (find_string(rpcbuffer, '3 On',1)) { ! on[vdev_rpc,103] on[vdev_rpc,3] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 3')} } if (find_string(rpcbuffer, '3 Off',1)){ ! off[vdev_rpc,103] off[vdev_rpc,3] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 3')} } if (find_string(rpcbuffer, '4 On',1)) { ! on[vdev_rpc,104] on[vdev_rpc,4] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 4')} } if (find_string(rpcbuffer, '4 Off',1)){ ! off[vdev_rpc,104] off[vdev_rpc,4] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 4')} } if (find_string(rpcbuffer, '5 On',1)) { ! on[vdev_rpc,105] on[vdev_rpc,5] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 5')} } if (find_string(rpcbuffer, '5 Off',1)){ ! off[vdev_rpc,105] off[vdev_rpc,5] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 5')} } if (find_string(rpcbuffer, '6 On',1)) { ! on[vdev_rpc,106] on[vdev_rpc,6] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 6')} } if (find_string(rpcbuffer, '6 Off',1)){ ! off[vdev_rpc,106] off[vdev_rpc,6] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 6')} } if (find_string(rpcbuffer, '7 On',1)) { ! on[vdev_rpc,107] on[vdev_rpc,7] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 7')} } if (find_string(rpcbuffer, '7 Off',1)){ ! off[vdev_rpc,107] off[vdev_rpc,7] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 7')} } if (find_string(rpcbuffer, '8 On',1)) { ! on[vdev_rpc,108] on[vdev_rpc,8] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 8')} } if (find_string(rpcbuffer, '8 Off',1)){ ! off[vdev_rpc,108] off[vdev_rpc,8] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 8')} } if (find_string(rpcbuffer, '9 On',1)) { ! on[vdev_rpc,109] on[vdev_rpc,9] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 9')} } if (find_string(rpcbuffer, '9 Off',1)){ ! off[vdev_rpc,109] off[vdev_rpc,9] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 9')} } if (find_string(rpcbuffer, '10 On',1)) { ! on[vdev_rpc,110] on[vdev_rpc,10] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 10')} } if (find_string(rpcbuffer, '10 Off',1)){ ! off[vdev_rpc,110] off[vdev_rpc,10] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 10')} } if (find_string(rpcbuffer, '11 On',1)) { ! on[vdev_rpc,111] on[vdev_rpc,11] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 11')} } if (find_string(rpcbuffer, '11 Off',1)){ ! off[vdev_rpc,111] off[vdev_rpc,11] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 11')} } if (find_string(rpcbuffer, '12 On',1)) { ! on[vdev_rpc,112] on[vdev_rpc,12] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 12')} } if (find_string(rpcbuffer, '12 Off',1)){ ! off[vdev_rpc,112] off[vdev_rpc,12] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 12')} } |
|
From: Jeff C. <co...@us...> - 2006-02-16 20:34:59
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules/TimeSync In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11169/TimeSync Modified Files: TimeSyncMod.axi TimeSyncMod.axs Log Message: Fixed problem with TimeSync allowing update to any time at all via NTP. This was a problem because corrupted packets (due to UDP) may cause the NetLinx master to get seriously off kilter. The change is now bounded by 1.5 hours by default; this can be changed if needed via a trivial source code edit. Index: TimeSyncMod.axs =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/TimeSync/TimeSyncMod.axs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TimeSyncMod.axs 16 Sep 2003 16:58:24 -0000 1.3 --- TimeSyncMod.axs 16 Feb 2006 20:34:48 -0000 1.4 *************** *** 45,52 **** (* FILE CREATED ON: 02/05/2001 AT: 08:03:38 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 04/05/2003 AT: 06:58:30 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) (***********************************************************) (*!!FILE REVISION: Rev 5 *) (* REVISION DATE: 01/26/2003 *) --- 45,67 ---- (* FILE CREATED ON: 02/05/2001 AT: 08:03:38 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 02/16/2006 AT: 12:28:57 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) (***********************************************************) + (*!!FILE REVISION: Rev 6 *) + (* REVISION DATE: 02/16/2006 *) + (* *) + (* COMMENTS: *) + (* . Time change wasn't validated on NTP broadcast or *) + (* NTP queries, allowing corrupted packets to mess up *) + (* the time. Fixed to validate the time (adjusted if *) + (* time difference <= 1.5 hours). *) + (* . Syncing via time server (RFC868) failed if the *) + (* time was off for a few seconds at midnight. This *) + (* only worked if the dates were equal. Changed this *) + (* to look at seconds change, and allow the change if *) + (* the time <= 1.5 hours apart. *) + (* *) + (***********************************************************) (*!!FILE REVISION: Rev 5 *) (* REVISION DATE: 01/26/2003 *) *************** *** 493,496 **** --- 508,522 ---- } + Define_Function long GregorianToSdnByYear(char mmddyyyy[10]) + { + long myYYYY, myMM, myDD; + + myYYYY = Type_Cast(Date_To_Year(mmddyyyy)); + myMM = Type_Cast(Date_To_Month(mmddyyyy)); + myDD = Type_Cast(Date_To_Day(mmddyyyy)); + + return GregorianToSdn(myYYYY, myMM, myDD); + } + Define_Function SdnToGregorian(long sdn, long yy, long mm, long dd) // Due to compiler issues with TYPE_CAST and SLONG's, this routine *************** *** 621,624 **** --- 647,688 ---- } + Define_Function char Validate_Time_Change(char remoteDate[], remoteTime[]) + { + long curSdn, remoteSdn, baseSdn; + slong curSeconds, remoteSeconds; + long secondsDiff; + char curTime[8]; + + // Figure out the Sdn value for both current and remote dates + + curSdn = GregorianToSdnByYear(LDATE); + curTime = TIME; + + remoteSdn = GregorianToSdnByYear(remoteDate); + + // Normalize by the smaller of curSdn and remoteSdn ... + // The intent here is to figure out the difference in seconds + // + // If the curSdn and remoteSdn aren't even close (2 days), just fail + + baseSdn = min_value(curSdn, remoteSdn); + curSdn = curSdn - baseSdn; + remoteSdn = remoteSdn - baseSdn; + + if (abs_value(curSdn-remoteSdn) > 2) + return FALSE; + + // Determine the number of seconds difference + + curSeconds = Type_Cast(curSdn * 86400) + SecondsSinceMidnight(curTime); + remoteSeconds = Type_Cast(remoteSdn * 86400) + SecondsSinceMidnight(remoteTime); + + // If our time differece is under 1.5 hours, consider this a "good" time + if (abs_value(curSeconds - remoteSeconds) <= 5400) + return TRUE; + + return FALSE; + } + Define_Function Process_Time_Notification(char data[]) { *************** *** 640,644 **** Convert_RFC2030_To_Time(data, rSecSince1900, res.remoteDate, res.remoteTime); if (rSecSince1900 <> 0) ! dateGood = 1; } --- 704,708 ---- Convert_RFC2030_To_Time(data, rSecSince1900, res.remoteDate, res.remoteTime); if (rSecSince1900 <> 0) ! dateGood = Validate_Time_Change(res.remoteDate, res.remoteTime); } *************** *** 650,666 **** Convert_RFC868_To_Time(data, rSecSince1900, res.remoteDate, res.remoteTime); ! ! // Only allow updates if remote time and local time match: ! // a. Same day ! // b. No more than 1.5 hours apart (5400 seconds) ! // This avoids update if remote time is way off base ... ! ! IF (LDATE == res.remoteDate) { ! SLONG timeDiff; ! timeDiff = abs_value(SecondsSinceMidnight(TIME) - SecondsSinceMidnight(res.remoteTime)); ! IF (timeDiff <= 5400) { ! dateGood = 1; ! } ! } } --- 714,718 ---- Convert_RFC868_To_Time(data, rSecSince1900, res.remoteDate, res.remoteTime); ! dateGood = Validate_Time_Change(res.remoteDate, res.remoteTime); } Index: TimeSyncMod.axi =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/TimeSync/TimeSyncMod.axi,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TimeSyncMod.axi 16 Sep 2003 16:58:24 -0000 1.2 --- TimeSyncMod.axi 16 Feb 2006 20:34:48 -0000 1.3 *************** *** 5,9 **** (* FILE CREATED ON: 01/26/2003 AT: 07:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 04/05/2003 AT: 06:57:39 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) --- 5,9 ---- (* FILE CREATED ON: 01/26/2003 AT: 07:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 02/16/2006 AT: 09:49:14 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) *************** *** 88,95 **** structure _sTimeSync_Feedback { ! char remoteDate[10]; // Date as reported by remote system ! char remoteTime[8]; // Time as reported by remote system ! char diffTime[32]; // Difference from above and NetLinx time ! long diffSeconds; // Above time represented in seconds } --- 88,95 ---- structure _sTimeSync_Feedback { ! char remoteDate[10]; // Date as reported by remote system ! char remoteTime[8]; // Time as reported by remote system ! char diffTime[32]; // Difference from above and NetLinx time ! long diffSeconds; // Above time represented in seconds } |
|
From: Jeff C. <co...@us...> - 2006-02-16 20:34:56
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11169 Modified Files: ChangeLog.txt Log Message: Fixed problem with TimeSync allowing update to any time at all via NTP. This was a problem because corrupted packets (due to UDP) may cause the NetLinx master to get seriously off kilter. The change is now bounded by 1.5 hours by default; this can be changed if needed via a trivial source code edit. Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/ChangeLog.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ChangeLog.txt 31 Dec 2005 00:08:00 -0000 1.7 --- ChangeLog.txt 16 Feb 2006 20:34:47 -0000 1.8 *************** *** 1,2 **** --- 1,5 ---- + 2006-02-16: TimeSync had a problem allowing NTP times that were way off (due + to packet corruption or other issues). Corrected this problem. + 2005-12-30: Tested SlimServerMod with NetLinx firmware v3.11.323 (reported as problematic by Tony Williams, but works fine). Updated the |
|
From: Jeff C. <co...@us...> - 2005-12-31 00:08:08
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14496 Modified Files: ChangeLog.txt Log Message: Tested SlimServerMod with NetLinx firmware 3.11.323, no problems found. Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/ChangeLog.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ChangeLog.txt 24 Dec 2005 01:33:36 -0000 1.6 --- ChangeLog.txt 31 Dec 2005 00:08:00 -0000 1.7 *************** *** 1,2 **** --- 1,6 ---- + 2005-12-30: Tested SlimServerMod with NetLinx firmware v3.11.323 (reported + as problematic by Tony Williams, but works fine). Updated the + README file. + 2005-12-23 Added BaytechRPC module by Ryan Wright |
|
From: Jeff C. <co...@us...> - 2005-12-31 00:08:08
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14496/SlimServer Modified Files: README.txt Log Message: Tested SlimServerMod with NetLinx firmware 3.11.323, no problems found. Index: README.txt =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer/README.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README.txt 28 Jul 2005 21:54:20 -0000 1.2 --- README.txt 31 Dec 2005 00:08:00 -0000 1.3 *************** *** 44,48 **** SlimServer v6.0.2 and later NetLinx Master Cards: NXC-ME260, NXC-ME260/64 ! NetLinx Master (NXC) firmware 2.31.137, v3.00.316 Modero MVP-8400 firmware 2.46.38, 2.55.43 TPDesign3 version 3.16 (Build 200) --- 44,48 ---- SlimServer v6.0.2 and later NetLinx Master Cards: NXC-ME260, NXC-ME260/64 ! NetLinx Master (NXC) firmware 2.31.137, v3.00.316, 3.11.323 Modero MVP-8400 firmware 2.46.38, 2.55.43 TPDesign3 version 3.16 (Build 200) *************** *** 56,58 **** . Fred Thomas extended SlimServer CLI interface as needed for SlimServerMod. Without his assistance, SlimServerMod would likely not have been written. . Dominique Hirigoyen created the MVP-8400 touchpanel. It looks great, doesn't it? He also created the VPN-CP touchpanel. Greg Gaskill created the VPN-CP touchpanel in earlier releases. ! . Various beta testers that tested and dutifully reported problems and made suggestions. Vincèn Pujol made some great suggestions; some features of SlimServerMod likely wouldn't exist without his feedback and input. \ No newline at end of file --- 56,58 ---- . Fred Thomas extended SlimServer CLI interface as needed for SlimServerMod. Without his assistance, SlimServerMod would likely not have been written. . Dominique Hirigoyen created the MVP-8400 touchpanel. It looks great, doesn't it? He also created the VPN-CP touchpanel. Greg Gaskill created the VPN-CP touchpanel in earlier releases. ! . Various beta testers that tested and dutifully reported problems and made suggestions. Vincèn Pujol made some great suggestions; some features of SlimServerMod likely wouldn't exist without his feedback and input. |
|
From: Jeff C. <co...@us...> - 2005-12-24 01:33:46
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules/BaytechRPC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28158/BaytechRPC Added Files: BaytechRPC.axs gpl.txt Log Message: Check in BaytechRPC module by Ryan Wright --- NEW FILE: gpl.txt --- GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. --- NEW FILE: BaytechRPC.axs --- MODULE_NAME='BaytechRPC' (dev rpcDevice, char rpcDeviceIP[], dev vdev_rpc, dev vdSyslog) (* ****************************************************************************************** Ethernet control of Baytech RPC series remote power control units Code copyright 2005 Ryan P. Wright (http://www.ryanwright.com) VERSION 1.0 LAST MODIFIED: 2/24/2005 The latest version of this code is always available at: http://www.ryanwright.com/automation/ ********************************************************************************************* LICENSE: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License (included, gpl.txt) for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA02110-1301USA ********************************************************************************************* REQUIREMENTS: This module was written for the Baytech RPC-3 Remote Power Control unit. It should be useful for other Baytech RPC products, however, I have only tested with the RPC-3 (8 outlet unit) and cannot guarantee compatibility with others. Maximum of 12 ports per device (per instance of this module) can be controlled. The command queue is setup to hold roughly 30-40 commands at a time by default. This is about 20-30 more than anyone should ever need. If you're doing something weird and find you need a larger queue, increase the value of "char cmdQueue[200]" under define_variable. ********************************************************************************************* CONFIGURATION: ++ You MUST have syslogmod setup and working. If you are not using it, you are missing out on one of my favorite capabilities of Netlinx. Get it from: http://cvs.sourceforge.net/viewcvs.py/netlinx-modules/NetLinx-Modules/SyslogMod/ If you do not wish to configure syslogmod, you must go through this module and comment out every line containing the term "syslog". You must also remove "dev vdSyslog" from the module parameters at the top of this file and from the define_module section in your main code where this module is called. Note that you do not have to enable syslogging, you can set "loglevel = 0" in the config options below to turn it off, but syslogmod must be configured for this module to compile without the above modifications. ++ Each instance of this module needs the following defined in mainline: DEFINE_DEVICE vdev_BayTechRPC3_1 = 32772:1:0 // virtual device for control / status feedback vdSyslog = 33001:1:0 // virtual device for syslogmod (if using) net_BayTechRPC3_1 = 0:2:0; // local network port for your RPC device DEFINE_VARIABLE volatile char BayTechRPC3_1ip[] = '192.168.1.100'; // IP of your RPC unit DEFINE_LATCHING [vdev_BayTechRPC3_1,1]..[vdev_BayTechRPC3_1,12] DEFINE_START on[vdev_BayTechRPC3_1,99] // Match channel status to RPC's current status DEFINE_MODULE 'BaytechRPC' modBaytechRPC3_1(net_BayTechRPC3_1,BayTechRPC3_1ip,vdev_BayTechRPC3_1,vdSyslog); ++ Configure the options (under DEFINE_CONSTANT, below) to your environment. ++ You must configure your RPC unit to disable command confirmation. This configuration option is located, from the main menu: 3, Configuration; 6, Outlets; 2, Command Confirmation. Make sure your changes are saved (hit enter a few times to get out of the config menu, and you will be prompted). ********************************************************************************************* USAGE: Usage is very straightforward. Your virtual device (in the configuration example above, it is "vdev_BayTechRPC3_1") has control/feedback on the first dozen channels. So, to turn outlet 1 on, you would use "on[vdev_BayTechRPC3_1,1]". Outlet 2 is controlled by turning channel 2 on or off, outlet 3 with channel 3, etc. You just treat it like any other device. Special commands: To refresh status, turn channel 99 on: "on[vdev_BayTechRPC3_1,99]" Using the above command, turning the channel on is only a trigger. The channel will be immediately turned back off and the command will be executed. ********************************************************************************************* HOW IT ALL WORKS: The control code is very straightforward. If a channel event is detected, we hop onto the RPC device and execute that command. We then sit and wait for 10 seconds in case other commands are in the queue; if anything comes in, we start all over again. If not, we disconnect. This is all good and well, but if you reset your Netlinx master, the RPC device doesn't know this. The result is a channel mixup. Say channel 4 was on when you reset the master; channel 4 will now be off on your virtual device when the master comes back up, but still on at the RPC unit. Now when you call an "off" command later, Netlinx thinks the channel is already off and doesn't execute the off code. This little issue is solved by executing a status update (turning channel 99 on the virtual device on) in define_start in mainline. This update code is quite a hack, as I wrote it with a 100+ degree temperature while high on aspirin. Besides that, I don't claim to be the best Netlinx programmer, I just hack the code until it works reliably and leave it at that. It may not be pretty but it works and that's what matters to me. One note, there is no checking of status involved. If your RPC device malfunctions or for whatever reason doesn't receive a command in the middle of processing, the status of your virtual device channels may be incorrect. Also, if for some reason we can't connect to the RPC device, we bail out and turn all channels off. The only way to correct this situation is to bring the device back online and initiate a refresh by turning channel 99 on. ******************************************************************************************* *) #include 'SyslogMod.axi'; // if you are not using SyslogMod, comment this out DEFINE_CONSTANT (* ****************************************************************************************** CONFIGURATION OPTIONS ******************************************************************************************* *) char outlets = 8 // number of outlets on your RPC unit. max = 12. // if you are running multiple RPC units with differing // numbers of outlets, you will need multiple copies of // this module (vs calling the same copy multiple times). // actually this isn't completely true and I could probably // lose this setting alltogether (or auto-detect it), but // this is the first release and right now I really don't care. char loglevel = 1 // set to 0 to disable logging via syslog // set to 1 to enable logging via syslog // set to 2 to enable debugging (highly detailed logging via syslog) (* **************************************************************************************** *) // DO NOT MODIFY THE CODE BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING // (* **************************************************************************************** *) // other constants char Info = 6; // Informational: informational messages DEFINE_VARIABLE sinteger result char resultstring[50] integer rpconline integer rpconlineattempt integer executingCmd integer waitingForOffline integer menuLevel integer updatingStatus char rpcbuffer[1000] char cmdQueue[200] char cmd[10] (* **************************************************************************************** *) define_call 'RpcConnect' { rpconlineattempt = rpconlineattempt + 1 if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', "'Attemping to open socket to IP: ',rpcDeviceIP") } result = ip_client_open (rpcDevice.Port,rpcDeviceIP,23,1) if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', "'Result code = ',itoa(result)") } // spit out an error & clear the queue if we didn't make the connection if (result <> 0) { cmdQueue = "" // clear queue rpconlineattempt = 0 // clear attempt counter call 'RpcCleanup' // cleanup due to error switch (result) { case 1: { resultstring = 'Invalid server address' } case 2: { resultstring = 'Invalid server port' } case 3: { resultstring = 'Invalid value for protocol' } case 4: { resultstring = 'Unable to open communication port with server' } case 6: { resultstring = 'Connection refused' } case 7: { resultstring = 'Connection timed out' } case 8: { resultstring = 'Unknown connection error' } case 9: { resultstring = 'Already closed' } case 10: { resultstring = 'Binding error' } case 11: { resultstring = 'Listening error' } case 14: { resultstring = 'Local port already used' } case 15: { resultstring = 'UDP socket already listening' } case 16: { resultstring = 'Too many open sockets' } default : { resultstring = "'Could not determine; result returned: ',itoa(result)" } } if (loglevel > 0) { syslog(Info, 'BaytechRPCModule', "'Error connecting: ',resultstring") } } // netlinx sometimes returns 0 even if we didn't get online (?) // this causes an infinite loop and will make things very unhappy // so after 3 tries to get online, we're going to give up if (rpconlineattempt > 2) { cmdQueue = "" // clear queue rpconlineattempt = 0 // clear attempt counter call 'RpcCleanup' // cleanup due to error ip_client_close (rpcDevice.port) // close the port, just in case it's really opened if (loglevel > 0) { syslog(Info, 'BaytechRPCModule', 'Error connecting, but Netlinx lied. Runaway cease-fire invoked.') } } } define_call 'RpcCleanup' { if (loglevel > 0) { syslog(Info, 'BaytechRPCModule', 'Turned off all channels due to connection error') } off [vdev_rpc,1] off [vdev_rpc,2] off [vdev_rpc,3] off [vdev_rpc,4] off [vdev_rpc,5] off [vdev_rpc,6] off [vdev_rpc,7] off [vdev_rpc,8] off [vdev_rpc,9] off [vdev_rpc,10] off [vdev_rpc,11] off [vdev_rpc,12] } define_call 'RpcDisconnect' { ip_client_close (rpcDevice.port) if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'Closed connection') } clear_buffer rpcbuffer } define_call 'RpcCommand' (cmd[10]) { // execute outlet control command executingCmd = 1 send_string rpcDevice, "cmd,13" if (loglevel > 0) { syslog(Info, 'BaytechRPCModule', "'Switched "',cmd,'" at ',rpcDeviceIP") } executingCmd = 0 } (* **************************************************************************************** *) DEFINE_START rpconline = 0 rpconlineattempt = 0 executingCmd = 0 waitingForOffline = 0 menuLevel = 0 updatingStatus = 0 create_buffer rpcDevice, rpcbuffer (* **************************************************************************************** *) DEFINE_EVENT channel_event [vdev_rpc, 1] { on: { if (outlets >= 1) { cmdQueue = "cmdQueue,'on 1!'" } } off: { if (outlets >= 1) { cmdQueue = "cmdQueue,'off 1!'" } } } channel_event [vdev_rpc, 2] { on: { if (outlets >= 2) { cmdQueue = "cmdQueue,'on 2!'" } } off: { if (outlets >= 2) { cmdQueue = "cmdQueue,'off 2!'" } } } channel_event [vdev_rpc, 3] { on: { if (outlets >= 3) { cmdQueue = "cmdQueue,'on 3!'" } } off: { if (outlets >= 3) { cmdQueue = "cmdQueue,'off 3!'" } } } channel_event [vdev_rpc, 4] { on: { if (outlets >= 4) { cmdQueue = "cmdQueue,'on 4!'" } } off: { if (outlets >= 4) { cmdQueue = "cmdQueue,'off 4!'" } } } channel_event [vdev_rpc, 5] { on: { if (outlets >= 5) { cmdQueue = "cmdQueue,'on 5!'" } } off: { if (outlets >= 5) { cmdQueue = "cmdQueue,'off 5!'" } } } channel_event [vdev_rpc, 6] { on: { if (outlets >= 6) { cmdQueue = "cmdQueue,'on 6!'" } } off: { if (outlets >= 6) { cmdQueue = "cmdQueue,'off 6!'" } } } channel_event [vdev_rpc, 7] { on: { if (outlets >= 7) { cmdQueue = "cmdQueue,'on 7!'" } } off: { if (outlets >= 7) { cmdQueue = "cmdQueue,'off 7!'" } } } channel_event [vdev_rpc, 8] { on: { if (outlets >= 8) { cmdQueue = "cmdQueue,'on 8!'" } } off: { if (outlets >= 8) { cmdQueue = "cmdQueue,'off 8!'" } } } channel_event [vdev_rpc, 9] { on: { if (outlets >= 9) { cmdQueue = "cmdQueue,'on 9!'" } } off: { if (outlets >= 9) { cmdQueue = "cmdQueue,'off 9!'" } } } channel_event [vdev_rpc, 10] { on: { if (outlets >= 10) { cmdQueue = "cmdQueue,'on 10!'" } } off: { if (outlets >= 10) { cmdQueue = "cmdQueue,'off 10!'" } } } channel_event [vdev_rpc, 11] { on: { if (outlets >= 11) { cmdQueue = "cmdQueue,'on 11!'" } } off: { if (outlets >= 11) { cmdQueue = "cmdQueue,'off 11!'" } } } channel_event [vdev_rpc, 12] { on: { if (outlets >= 12) { cmdQueue = "cmdQueue,'on 12!'" } } off: { if (outlets >= 12) { cmdQueue = "cmdQueue,'off 12!'" } } } channel_event [vdev_rpc, 99] { on: { cmdQueue = "cmdQueue,'refresh!'"; off [vdev_rpc, 99] } } data_event [rpcDevice] { online: { rpconline = 1 if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'Device reported online') } } offline: { // reset flags rpconline = 0 rpconlineattempt = 0 executingCmd = 0 waitingForOffline = 0 menuLevel = 0 updatingStatus = 0 if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'Device reported offline') } } string: { // if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', "'Data: ',rpcbuffer") } // if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'Outlet status: ') } if (find_string(rpcbuffer, 'Selection>',1)) { // at main menu, so switch to outlet control clear_buffer rpcbuffer send_string rpcDevice, "'1',13" menuLevel = 1 if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'Switched to menulevel 1 (outlet control)') } } // at second menu, update channels from rpc data once queue has been flushed if ((menulevel = 1) && (find_string(rpcbuffer, '>',1)) && (updatingStatus)) { if (find_string(rpcbuffer, '1 On',1)) { on[vdev_rpc,1] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 1')} } if (find_string(rpcbuffer, '1 Off',1)){ off[vdev_rpc,1] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 1')} } if (find_string(rpcbuffer, '2 On',1)) { on[vdev_rpc,2] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 2')} } if (find_string(rpcbuffer, '2 Off',1)){ off[vdev_rpc,2] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 2')} } if (find_string(rpcbuffer, '3 On',1)) { on[vdev_rpc,3] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 3')} } if (find_string(rpcbuffer, '3 Off',1)){ off[vdev_rpc,3] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 3')} } if (find_string(rpcbuffer, '4 On',1)) { on[vdev_rpc,4] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 4')} } if (find_string(rpcbuffer, '4 Off',1)){ off[vdev_rpc,4] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 4')} } if (find_string(rpcbuffer, '5 On',1)) { on[vdev_rpc,5] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 5')} } if (find_string(rpcbuffer, '5 Off',1)){ off[vdev_rpc,5] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 5')} } if (find_string(rpcbuffer, '6 On',1)) { on[vdev_rpc,6] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 6')} } if (find_string(rpcbuffer, '6 Off',1)){ off[vdev_rpc,6] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 6')} } if (find_string(rpcbuffer, '7 On',1)) { on[vdev_rpc,7] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 7')} } if (find_string(rpcbuffer, '7 Off',1)){ off[vdev_rpc,7] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 7')} } if (find_string(rpcbuffer, '8 On',1)) { on[vdev_rpc,8] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 8')} } if (find_string(rpcbuffer, '8 Off',1)){ off[vdev_rpc,8] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 8')} } if (find_string(rpcbuffer, '9 On',1)) { on[vdev_rpc,9] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 9')} } if (find_string(rpcbuffer, '9 Off',1)){ off[vdev_rpc,9] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 9')} } if (find_string(rpcbuffer, '10 On',1)) { on[vdev_rpc,10] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 10')} } if (find_string(rpcbuffer, '10 Off',1)){ off[vdev_rpc,10] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 10')} } if (find_string(rpcbuffer, '11 On',1)) { on[vdev_rpc,11] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 11')} } if (find_string(rpcbuffer, '11 Off',1)){ off[vdev_rpc,11] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 11')} } if (find_string(rpcbuffer, '12 On',1)) { on[vdev_rpc,12] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'ON 12')} } if (find_string(rpcbuffer, '12 Off',1)){ off[vdev_rpc,12] if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'OFF 12')} } clear_buffer rpcbuffer updatingStatus = 0 } } } (* **************************************************************************************** *) DEFINE_PROGRAM if ((length_string(cmdQueue) > 0) && (! executingCmd) && (! updatingStatus)) { // we have something to process; cancel disconnect timer cancel_wait 'disconnect' waitingForOffline = 0 if ((rpconline) && (menuLevel = 1)) { // we're online, so do something if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'Processing queue') } // extract next item in queue cmd = remove_string(cmdQueue, '!', 1) cmd = left_string(cmd, length_string(cmd)-1) // execute select { active (cmd = 'refresh'): { wait 1 { clear_buffer rpcbuffer updatingStatus = 1 send_string rpcDevice, "13" } } active (1): call 'RpcCommand' (cmd) } } if (! rpconline) { call 'RpcConnect' } // initiate connection } if ((length_string(cmdQueue) = 0) && (rpconline) && (! executingCmd) && (! waitingForOffline)) { // we're online, but have nothing to process waitingForOffline = 1 if (loglevel = 2) { syslog(Info, 'BaytechRPCModule', 'Nothing left to process; closing connection in 10 seconds') } wait 100 'disconnect' { // wait 10 seconds if ((length_string(cmdQueue) = 0) && (rpconline)) { // still nothing to process, so disconnect call 'RpcDisconnect' } } } |
|
From: Jeff C. <co...@us...> - 2005-12-24 01:33:45
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28158 Modified Files: ChangeLog.txt Log Message: Check in BaytechRPC module by Ryan Wright Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/ChangeLog.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ChangeLog.txt 28 Jul 2005 22:01:53 -0000 1.5 --- ChangeLog.txt 24 Dec 2005 01:33:36 -0000 1.6 *************** *** 1,2 **** --- 1,4 ---- + 2005-12-23 Added BaytechRPC module by Ryan Wright + 2005-07-28 Checked in all files related to V1 of SlimServer; (Module previously released but sources not updated) |
|
From: Jeff C. <co...@us...> - 2005-12-24 01:29:49
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules/BaytechRPC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27588/BaytechRPC Log Message: Directory /cvsroot/netlinx-modules/NetLinx-Modules/BaytechRPC added to the repository |
|
From: Jeff C. <co...@us...> - 2005-11-01 20:40:34
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23665 Modified Files: SlimServerMod.axs Log Message: Add support for international (accented) characters (feature ID 1247542). Note that this feature depends on SlimServer CLI support, and thus requires "SlimServer Version: 6.2.0 - 4753" or later). Index: SlimServerMod.axs =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer/SlimServerMod.axs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SlimServerMod.axs 21 Sep 2005 14:27:17 -0000 1.2 --- SlimServerMod.axs 1 Nov 2005 20:40:26 -0000 1.3 *************** *** 12,16 **** (* FILE CREATED ON: 10/03/2004 AT: 09:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 09/20/2005 AT: 20:25:49 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) --- 12,16 ---- (* FILE CREATED ON: 10/03/2004 AT: 09:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 10/30/2005 AT: 09:52:47 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) *************** *** 682,688 **** playerID = "GetPlayerID(unitNum)"; if (startSong == 0) ! sBuffer = "playerID,'status - ',itoa(numSongs),' tags:gal'"; else ! sBuffer = "playerID,'status ',itoa(startSong),' ',itoa(numSongs),' tags:gal'"; // To avoid "flooding" SlimServer with status requests, --- 682,688 ---- playerID = "GetPlayerID(unitNum)"; if (startSong == 0) ! sBuffer = "playerID,'status - ',itoa(numSongs),' charset:iso-8859-1 tags:gal'"; else ! sBuffer = "playerID,'status ',itoa(startSong),' ',itoa(numSongs),' charset:iso-8859-1 tags:gal'"; // To avoid "flooding" SlimServer with status requests, *************** *** 1616,1620 **** } ! sBuffer = "sBuffer,' ',itoa(infoData.startItem),' ',itoa(infoData.countItem),' context:',itoa(sessionNum)"; // Add any other options to the command as appropriate --- 1616,1620 ---- } ! sBuffer = "sBuffer,' ',itoa(infoData.startItem),' ',itoa(infoData.countItem),' context:',itoa(sessionNum),' charset:iso-8859-1'"; // Add any other options to the command as appropriate *************** *** 2022,2026 **** } } ! active (sTag = 'tags'): { // Carry over from the command - we recognize it and ignore it } --- 2022,2026 ---- } } ! active (sTag = 'tags' || sTag = 'charset'): { // Carry over from the command - we recognize it and ignore it } *************** *** 2183,2187 **** active (sTag == 'search'): fSearchPerformed = 1; ! active (sTag = 'tags' || sTag = 'artist_id' || sTag = 'album_id' || sTag == 'genre_id'): { // Ignore filters on the original search command } --- 2183,2187 ---- active (sTag == 'search'): fSearchPerformed = 1; ! active (sTag = 'tags' || sTag = 'artist_id' || sTag = 'album_id' || sTag == 'genre_id' || sTag = 'charset'): { // Ignore filters on the original search command } *************** *** 2280,2284 **** active (sTag == 'search'): fSearchPerformed = 1; ! active (sTag = 'tags' || sTag = 'artist_id' || sTag = 'album_id' || sTag == 'genre_id' || sTag == 'sort'): { // Ignore filters on the original search command } --- 2280,2284 ---- active (sTag == 'search'): fSearchPerformed = 1; ! active (sTag = 'tags' || sTag = 'artist_id' || sTag = 'album_id' || sTag == 'genre_id' || sTag == 'sort' || sTag = 'charset'): { // Ignore filters on the original search command } *************** *** 2367,2371 **** InfoSearch[sessionNum][lvl].maxItems = atoi(strSeg); } ! active (sTag = 'tags'): { // Ignore filters on the original search command } --- 2367,2371 ---- InfoSearch[sessionNum][lvl].maxItems = atoi(strSeg); } ! active (sTag = 'tags' || sTag = 'charset'): { // Ignore filters on the original search command } |
|
From: Jeff C. <co...@us...> - 2005-09-21 14:27:29
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1434 Modified Files: CHANGES.txt SlimServerMod.axi SlimServerMod.axs SlimServerMod.odt Added Files: README.1.1.txt Log Message: Checked in files as required for SlimServer v1.1, BETA1 Index: CHANGES.txt =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer/CHANGES.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CHANGES.txt 28 Jul 2005 21:54:20 -0000 1.1 --- CHANGES.txt 21 Sep 2005 14:27:17 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- + 2005-09-20: Updated module to work properly with playlists in SlimServer v6.2 or later. Added new API to queue items directly (as needed for DMS panels or other needs). + 2005-05-16: Updated VPN-CP panel layout for "feedback" state (and colors) on primary screen and selection screen. There was no visual feedback on which button was touched. *************** *** 29,31 **** 2005-04-05: Bug fix: Setting detailed debugging didn't refresh screen ! 2005-04-02: Released v1.0 RC1 for testing \ No newline at end of file --- 31,33 ---- 2005-04-05: Bug fix: Setting detailed debugging didn't refresh screen ! 2005-04-02: Released v1.0 RC1 for testing Index: SlimServerMod.axi =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer/SlimServerMod.axi,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SlimServerMod.axi 28 Jul 2005 21:54:21 -0000 1.2 --- SlimServerMod.axi 21 Sep 2005 14:27:17 -0000 1.3 *************** *** 4,8 **** (* FILE CREATED ON: 10/03/2004 AT: 09:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 04/24/2005 AT: 16:46:46 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) --- 4,8 ---- (* FILE CREATED ON: 10/03/2004 AT: 09:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 09/20/2005 AT: 16:04:21 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) *************** *** 107,110 **** --- 107,111 ---- char SS_opSetDebugDetail = 103; // Set debugging detail char SS_opDoExtCommand = 104; // Perform extended command (Sleep, Volume, etc) + char SS_opQueueItem = 105; // Queue item to play on a Squeezebox char SS_opUICommand = 150; // Module cmd: UI (User Interface) operation *************** *** 266,269 **** --- 267,271 ---- long idArtist; long idAlbum; + long idPlaylist; // Filtering criteria (via QueueFile API - if written) *************** *** 329,336 **** long idAlbum; long idGenre; // Perform "search" (limit list of items returned to those containing search string) - char sListDir[SS_LEN_URL]; // Directory/URL for playlist char sSearch[SS_LEN_Item]; // Search restriction text --- 331,338 ---- long idAlbum; long idGenre; + long idPlaylist; // Perform "search" (limit list of items returned to those containing search string) char sSearch[SS_LEN_Item]; // Search restriction text *************** *** 689,692 **** --- 691,719 ---- + // Other (useful?) API functions + + define_function SS_QueueItem (dev vd, char unitNum, _sSS_QueueFile queueData) + // SS_QueueItem: Request SlimServer to queue an item for playing + // vd: Virtual device for transmits to SlimServer module + // unitNum: Unit number that we'd like to queue for + // queueData: Structure indicating what item we're going to queue + { + char sBuffer[SS_MAX_vdBuf]; + long lPos; + sinteger siStatus; + + // Marshall the data and transmit to the virtual device + + sBuffer = "SS_opQueueItem,unitNum"; // Store start of packet + lPos = 3; + siStatus = Variable_To_String(queueData, sBuffer, lPos); + + if (siStatus == 0) // Success + Send_Command vd, "sBuffer"; + else // Failure + Diag(llSlimServer, Error, 'SlimServer', "'Failure encoding SS_DoExtOpcode data, Error=',itoa(siStatus)"); + } + + (***********************************************************) (* STARTUP CODE GOES BELOW *) Index: SlimServerMod.axs =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer/SlimServerMod.axs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SlimServerMod.axs 28 Jul 2005 21:54:21 -0000 1.1 --- SlimServerMod.axs 21 Sep 2005 14:27:17 -0000 1.2 *************** *** 12,16 **** (* FILE CREATED ON: 10/03/2004 AT: 09:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 04/24/2005 AT: 16:52:56 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) --- 12,16 ---- (* FILE CREATED ON: 10/03/2004 AT: 09:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 09/20/2005 AT: 20:25:49 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) *************** *** 168,177 **** // sUI_ItemList: Storage for browse item lists (text/human description of item) // lUI_IDList: Internal database ID for the item - // sUI_URLList: Storage for browse URL lists (when ID can't be used) // InfoSearch: Search "blocks" (to search for items at each UI level) volatile _sSS_BrowseState BrowseState[SS_MAX_BrowseSessions]; volatile char sUI_ItemList[SS_MAX_BrowseSessions][MAX_UI_Level][SS_MAX_BrowseItemCount][SS_LEN_Item]; volatile long lUI_IDList[SS_MAX_BrowseSessions][MAX_UI_Level][SS_MAX_BrowseItemCount]; - volatile char sUI_URLList[SS_MAX_BrowseSessions][MAX_UI_Level][SS_MAX_BrowseItemCount][SS_LEN_URL]; volatile _sSS_GetBrowseInfo InfoSearch[SS_MAX_BrowseSessions][MAX_UI_Level]; --- 168,175 ---- *************** *** 313,317 **** dev G4Panels[SS_MAX_PanelsInSystem]; char fGoodPlayer, panelCount, loop; ! char sCoverArtPath[SS_LEN_URL]; // No G4 optimization? We're done! --- 311,315 ---- dev G4Panels[SS_MAX_PanelsInSystem]; char fGoodPlayer, panelCount, loop; ! char sCoverArtPath[80]; // No G4 optimization? We're done! *************** *** 860,864 **** [BrowseState[sessionNum].panel,134] = ((InfoSearch[sessionNum][lvl].startItem + BrowseState[sessionNum].numLines) < InfoSearch[sessionNum][lvl].maxItems); // Allowed to search at this time? ! [BrowseState[sessionNum].panel,SS_Channel_Search] = (lvl != 1 && InfoSearch[sessionNum][lvl].type <> SS_infoList && InfoSearch[sessionNum][lvl].type <> SS_infoTitleFromList); // Update the scroll bar to show how much data exists --- 858,862 ---- [BrowseState[sessionNum].panel,134] = ((InfoSearch[sessionNum][lvl].startItem + BrowseState[sessionNum].numLines) < InfoSearch[sessionNum][lvl].maxItems); // Allowed to search at this time? ! [BrowseState[sessionNum].panel,SS_Channel_Search] = (lvl != 1 && InfoSearch[sessionNum][lvl].type <> SS_infoTitleFromList); // Update the scroll bar to show how much data exists *************** *** 1145,1149 **** case SS_infoList: { infoData.type = SS_infoTitleFromList; ! infoData.sListDir = sUI_URLList[sessionNum][lvl][item]; } default: { --- 1143,1147 ---- case SS_infoList: { infoData.type = SS_infoTitleFromList; ! infoData.idPlaylist = lUI_IDList[sessionNum][lvl][item]; } default: { *************** *** 1169,1173 **** for (loop = 1; loop <= BrowseState[sessionNum].numLines; loop++) { clear_buffer sUI_ItemList[sessionNum][lvl][loop]; - clear_buffer sUI_URLList[sessionNum][lvl][loop]; lUI_IDList[sessionNum][lvl][loop] = 0; } --- 1167,1170 ---- *************** *** 1238,1242 **** case SS_infoTitleFromList: { qdata.itemID = lUI_IDList[sessionNum][lvl][item]; - // qdata.item = sUI_URLList[sessionNum][lvl][item]; } case SS_infoArtist: { --- 1235,1238 ---- *************** *** 1256,1260 **** } case SS_infoList: ! qdata.item = sUI_URLList[sessionNum][lvl][item]; } --- 1252,1256 ---- } case SS_infoList: ! qdata.idPlaylist = lUI_IDList[sessionNum][lvl][item]; } *************** *** 1386,1390 **** } ! if (lvl == 1 || InfoSearch[sessionNum][lvl].type == SS_infoList || InfoSearch[sessionNum][lvl].type == SS_infoTitleFromList) { UI_sendError(sessionNum, SS_UI_errSearchInvalid); return; --- 1382,1386 ---- } ! if (lvl == 1 || InfoSearch[sessionNum][lvl].type == SS_infoTitleFromList) { UI_sendError(sessionNum, SS_UI_errSearchInvalid); return; *************** *** 1543,1546 **** --- 1539,1557 ---- PanelForceUpdate(str); } + case SS_opQueueItem: { + _sSS_QueueFile queueData; + long lPos; + sinteger siStatus; + + lPos = 3; + siStatus = String_To_Variable(queueData, str, lPos); + + if (siStatus == 0) { + Diag(llSlimServer, Debug, sTagSlimServer, "'ProcessCommand: Received SS_opQueueItem; unitNum=',itoa(str[2])"); + QueueFile(str[2], queueData); + } + else + Diag(llSlimServer, Warning, sTagSlimServer, "'Failure decoding SS_opQueueItem data, Error=',itoa(siStatus)"); + } case SS_opUICommand: { _sSS_UI_DoCommand uiBuffer; *************** *** 1601,1608 **** case SS_infoAlbum: sBuffer = 'albums'; case SS_infoGenre: sBuffer = 'genres'; ! case SS_infoList: ! case SS_infoTitleFromList: { ! sBuffer = 'playlists'; ! } } --- 1612,1617 ---- case SS_infoAlbum: sBuffer = 'albums'; case SS_infoGenre: sBuffer = 'genres'; ! case SS_infoList: sBuffer = 'playlists'; ! case SS_infoTitleFromList: sBuffer = 'playlisttracks'; } *************** *** 1612,1619 **** switch (infoData.type) { ! case SS_infoList: sBuffer = "sBuffer,' tags: '"; ! case SS_infoTitleFromList: ! sBuffer = "sBuffer,' tags: dir:',EncodeURL(infoData.sListDir)"; default: { if (infoData.type == SS_infoTitle) { --- 1621,1636 ---- switch (infoData.type) { ! case SS_infoList: { sBuffer = "sBuffer,' tags: '"; ! ! if (Length_Array(infoData.sSearch)) ! sBuffer = "sBuffer,' search:',EncodeURL(infoData.sSearch)"; ! } ! case SS_infoTitleFromList: { ! sBuffer = "sBuffer,' tags: '"; ! ! if (infoData.idPlaylist <> 0) ! sBuffer = "sBuffer,' playlist_id:',itoa(infoData.idPlaylist)"; ! } default: { if (infoData.type == SS_infoTitle) { *************** *** 1659,1673 **** if (length_array(qdata.sfGenre)) ! strCommand = "strCommand,'genre:',EncodeURL(qdata.sfGenre),' '"; else strCommand = "strCommand,'* '"; if (length_array(qdata.sfArtist)) ! strCommand = "strCommand,'artist:',EncodeURL(qdata.sfArtist),' '"; else strCommand = "strCommand,'* '"; if (length_array(qdata.sfAlbum)) ! strCommand = "strCommand,'album:',EncodeURL(qdata.sfAlbum)"; else strCommand = "strCommand,'*'"; --- 1676,1690 ---- if (length_array(qdata.sfGenre)) ! strCommand = "strCommand,EncodeURL(qdata.sfGenre),' '"; else strCommand = "strCommand,'* '"; if (length_array(qdata.sfArtist)) ! strCommand = "strCommand,EncodeURL(qdata.sfArtist),' '"; else strCommand = "strCommand,'* '"; if (length_array(qdata.sfAlbum)) ! strCommand = "strCommand,EncodeURL(qdata.sfAlbum)"; else strCommand = "strCommand,'*'"; *************** *** 1686,1691 **** } } ! case SS_infoList: ! strCommand = "playerID,'playlist add ',EncodeURL(qdata.item)"; case SS_infoTitle: --- 1703,1714 ---- } } ! case SS_infoList: { ! if (qdata.idPlaylist) ! strCommand = "playerID,'playlistcontrol cmd:add playlist_id:',itoa(qdata.idPlaylist)"; ! else if (length_array(qdata.item)) ! strCommand = "playerID,'playlist add ',EncodeURL(qdata.item)"; ! else ! return; // Hmm; no ID, no URL - we can't handle this request ! } case SS_infoTitle: *************** *** 1808,1811 **** --- 1831,1836 ---- active (cmdParams[1] = 'playlists'): ParseBrowseListResponse(str, cmdParams[4]); + active (cmdParams[1] = 'playlisttracks'): + ParseBrowseTitleResponse(str, cmdParams[4]); // Intelligently handle volume changes due to simple volume adjustments *************** *** 2233,2245 **** lUI_IDList[sessionNum][lvl][cIndex] = atoi(strSeg); } ! active (sTag = 'title'): ! if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) ! sUI_ItemList[sessionNum][lvl][cIndex] = strSeg; active (sTag = 'tracknum'): if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) lTrack[cIndex] = atoi(strSeg); - // active (sTag = 'url'): - // if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) - // sUI_URLList[sessionNum][lvl][cIndex] = strSeg; active (sTag = 'context'): { sessionNum = atoi(strSeg); --- 2258,2272 ---- lUI_IDList[sessionNum][lvl][cIndex] = atoi(strSeg); } ! active (sTag = 'title'): { ! if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) { ! if (InfoSearch[sessionNum][lvl].type == SS_infoTitleFromList) ! sUI_ItemList[sessionNum][lvl][cIndex] = "itoa(InfoSearch[sessionNum][lvl].startItem+cIndex),'. ',strSeg"; ! else ! sUI_ItemList[sessionNum][lvl][cIndex] = strSeg; ! } ! } active (sTag = 'tracknum'): if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) lTrack[cIndex] = atoi(strSeg); active (sTag = 'context'): { sessionNum = atoi(strSeg); *************** *** 2277,2281 **** for (cIndex++; cIndex <= BrowseState[sessionNum].numLines; cIndex++) { clear_buffer sUI_ItemList[sessionNum][lvl][cIndex]; - // clear_buffer sUI_URLList[sessionNum][lvl][cIndex]; } --- 2304,2307 ---- *************** *** 2294,2302 **** char lvl; // Browsing "level" for this session char loop; // Loop control variable - long indexNum[SS_MAX_BrowseItemCount]; // Index numbers returned in playlist cIndex = 0; // Initialize in case of no title entries - for (loop = 1; loop < SS_MAX_BrowseItemCount; loop++) - indexNum[loop] = 0; // Skip the status portion that we don't care about ('playlists x y ') --- 2320,2325 ---- *************** *** 2326,2358 **** select { - active (sTag = 'index'): { - cIndex++; - if (cIndex < SS_MAX_BrowseItemCount) - indexNum[cIndex] = atoi(strSeg) + 1; - } - // Returned if item is a playlist path - active (sTag = 'item'): { - if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) - sUI_ItemList[sessionNum][lvl][cIndex] = strSeg; - - // Directory or nexted playlist; verify correct settings - InfoSearch[sessionNum][lvl].type = SS_infoList; - } - active (sTag = 'dir'): - if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) - sUI_URLList[sessionNum][lvl][cIndex] = strSeg; - - // Returned if item is a song active (stag = 'id'): { if (cIndex <= BrowseState[sessionNum].numLines) lUI_IDList[sessionNum][lvl][cIndex] = atoi(strSeg); } ! active (sTag = 'title'): { if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) sUI_ItemList[sessionNum][lvl][cIndex] = strSeg; } - // active (sTag = 'url'): - // if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) - // sUI_URLList[sessionNum][lvl][cIndex] = strSeg; active (sTag = 'context'): { sessionNum = atoi(strSeg); --- 2349,2361 ---- select { active (stag = 'id'): { + cIndex++; if (cIndex <= BrowseState[sessionNum].numLines) lUI_IDList[sessionNum][lvl][cIndex] = atoi(strSeg); } ! active (sTag = 'playlist'): { if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) sUI_ItemList[sessionNum][lvl][cIndex] = strSeg; } active (sTag = 'context'): { sessionNum = atoi(strSeg); *************** *** 2368,2372 **** } active (TRUE) : ! // This command returns gobs of stuff; ignore what we don't care about cRecognized = '-'; } --- 2371,2375 ---- } active (TRUE) : ! // Ignore stuff that we don't care about cRecognized = '-'; } *************** *** 2378,2390 **** } - if (InfoSearch[sessionNum][BrowseState[sessionNum].lvl].type == SS_infoTitleFromList) { - for (loop = 1; loop <= cIndex; loop++) - if (indexNum[loop] <> 0) - sUI_ItemList[sessionNum][lvl][loop] = "itoa(indexNum[loop]),'. ',sUI_ItemList[sessionNum][lvl][loop]"; - } - for (cIndex++; cIndex <= BrowseState[sessionNum].numLines; cIndex++) { clear_buffer sUI_ItemList[sessionNum][lvl][cIndex]; - clear_buffer sUI_URLList[sessionNum][lvl][cIndex]; } --- 2381,2386 ---- --- NEW FILE: README.1.1.txt --- This file is intended to be viewed with "Notepad" in word-wrap mode (see "Format" menu). Released Version: V1.1, Beta1 Release Date: Sunday, 20-Sep-2005 ----- Setup information and notes for SlimServerMod Module: See SlimServer V1.0 for full details. Note: This package is a "partial" release. It is intended to be installed on top of a SlimServerMod V1.0 package. This package replaces SlimServerMod.axi and SlimServerMod.tko. As of the time of this release, the SlimServerMod module is compatible with the nightly build of SlimServer v6.2 (9/17./2005) or later. This module is not compatible with any previous version of the SlimServer software. In particular, this module is not compatible with SlimServer v6.0 or SlimServer v6.1. The following files are provided: CHANGES.txt: Change log file LICENSE.txt: Open source license; you are obligated to abide by this or not use the software README.1.1.txt: This file SlimServerMod.axi: SlimServer Include file and API definition file SlimServerMod.tko: SlimServer Module (compiled) SlimServerMod represents an open-source project. If you want source files, they are available via CVS from the SourceForge project 'NetLinx-Modules'. You are free to download the source code if you wish. If you make improvements to the code that you believe is generally useful, please submit your changes to netlinx-modules(at)taltos.com. That way, everyone can benefit from your changes. Thanks! The SlimServerMod code is regularly used by the author and several other sites. It is anticipated that it'll work with virtually any version of applicable AMX code. However, to be precise, SlimServerMod has been successfully tested with: SlimServer v6.2 (9/17/2005 nightly) and later NetLinx Master Cards: NXC-ME260, NXC-ME260/64 NetLinx Master (NXC) firmware v3.00.316 Modero MVP-8400 firmware 2.55.43 Index: SlimServerMod.odt =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer/SlimServerMod.odt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsyq3PmO and /tmp/cvsZRp2eK differ |
|
From: Jeff C. <co...@us...> - 2005-07-28 22:32:07
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21895 Added Files: SlimServerMod.odt Removed Files: SlimServerMod.sxw Log Message: Updating SlimServerMod documentation to StarOffice v2 format --- SlimServerMod.sxw DELETED --- --- NEW FILE: SlimServerMod.odt --- (This appears to be a binary file; contents omitted.) |
|
From: Jeff C. <co...@us...> - 2005-07-28 22:02:02
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14883 Modified Files: ChangeLog.txt Log Message: Update project changelog file SlimServerMod checkin Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/ChangeLog.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ChangeLog.txt 25 Feb 2005 18:42:43 -0000 1.4 --- ChangeLog.txt 28 Jul 2005 22:01:53 -0000 1.5 *************** *** 1,2 **** --- 1,5 ---- + 2005-07-28 Checked in all files related to V1 of SlimServer; + (Module previously released but sources not updated) + 2005-02-25 Project changes in preparation for SlimServer checkin; Enabled netlinx-modules-commit mailing list |
|
From: Jeff C. <co...@us...> - 2005-07-28 21:54:32
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13139 Modified Files: Main-Sample.axs README.txt SlimServer,MVP-8400.TP4 SlimServer,VPN-CP.tpd SlimServerMod.axi Added Files: CHANGES-FR.txt CHANGES.txt README-FR.txt SlimServerMod-FR.sxw SlimServerMod.axs SlimServerMod.sxw Log Message: Update all files for SlimServerMod v1.0 release --- NEW FILE: SlimServerMod-FR.sxw --- (This appears to be a binary file; contents omitted.) --- NEW FILE: CHANGES-FR.txt --- (This appears to be a binary file; contents omitted.) --- NEW FILE: SlimServerMod.axs --- MODULE_NAME='SlimServerMod' ( dev dvSlimServer, // Physical SlimServer TCP/IP connection dev vdSlimServer, // Logical connection to SlimServer module char sIPAddr[], // TCP/IP DNS name (or IP address) of SlimServer char sUnitAddr[][], // TCP/IP Address or MAC address of SqueezeBox units dev vdSyslog, // Virtual device for Syslog char llSlimServer[] // SlimServer Syslog Logging Level ) (*{{PS_SOURCE_INFO(PROGRAM STATS) *) (***********************************************************) (* FILE CREATED ON: 10/03/2004 AT: 09:00:00 *) (***********************************************************) (* FILE_LAST_MODIFIED_ON: 04/24/2005 AT: 16:52:56 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) (***********************************************************) (*!!FILE REVISION: Rev 0 *) (* REVISION DATE: 10/03/2004 *) [...2811 lines suppressed...] } if (fPanelUpdated) { fUpdateVD = TRUE; UpdatePanel(loop, FALSE); } } if (fUpdateVD) UpdateVirtualDevice(); } (***********************************************************) (* THE ACTUAL PROGRAM GOES BELOW *) (***********************************************************) DEFINE_PROGRAM // Notify if we're currently doing some sort of communicaiton to SlimServer if (Fdbk_Connected.channel) [Fdbk_Connection_Busy] = (Q_HasItems || length_array(sLastCommand) <> 0); Index: Main-Sample.axs =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer/Main-Sample.axs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Main-Sample.axs 7 Apr 2005 20:47:40 -0000 1.1 --- Main-Sample.axs 28 Jul 2005 21:54:20 -0000 1.2 *************** *** 5,9 **** (* FILE CREATED ON: 08/19/2000 AT: 12:35:12 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 04/02/2005 AT: 14:38:31 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) --- 5,9 ---- (* FILE CREATED ON: 08/19/2000 AT: 12:35:12 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 05/03/2005 AT: 17:31:50 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) *************** *** 49,57 **** #if_defined USING_MODERO_PANEL ! TP_Setup = 10001:1:1; // Family Room - Souce Select ! TP_SServer = 10001:9:1; // Family Room - Source: SlimServer #else ! TP_Setup = 198:1:1; // Family Room - Souce Select ! TP_SServer = 200:1:1; // Family Room - Source: SlimServer #end_if --- 49,57 ---- #if_defined USING_MODERO_PANEL ! TP_Setup = 10001:1:0; // Family Room - Souce Select ! TP_SServer = 10001:9:0; // Family Room - Source: SlimServer #else ! TP_Setup = 198:1:0; // Family Room - Souce Select ! TP_SServer = 200:1:0; // Family Room - Source: SlimServer #end_if *************** *** 78,82 **** char SlimS_Unit_Family = 1; // First Unit: Family Room char SlimS_Unit_Boys = 2; // Second Unit: Boys Room ! char SlimS_Unit_Test = 3; // Third Unit: Test Unit (SoftSqueeze) // Set up generic arrays of all touch panels in the system --- 78,82 ---- char SlimS_Unit_Family = 1; // First Unit: Family Room char SlimS_Unit_Boys = 2; // Second Unit: Boys Room ! char SlimS_Unit_Test = 3; // Third Unit: Guest Room // Set up generic arrays of all touch panels in the system *************** *** 115,126 **** volatile char sSlimServer_Addr[] = 'slimserver.taltos.com'; volatile char sSlimServer_Units[SlimS_Unit_Count][SS_MAX_PlayerID] = ! { '00:04:20:05:69:dc', // SqueezeBox: Family Room ! '00:04:20:05:69:5e', // SqueezeBox: Boys Room ! '06:20:83:7f:fe:07' }; // SoftSqueeze: Test Unit volatile char SlimServer_fDebugFeedback = 0; volatile char g_SlimServer_UnitNum; // Global - Current SlimServer unit # we're controlling volatile char SServer_BScroll[SS_MAX_BrowseSessions], SServer_LastLev[SS_MAX_BrowseSessions]; ! // Flag to indicate if browse scroll bar currently being adjusted (***********************************************************) --- 115,126 ---- volatile char sSlimServer_Addr[] = 'slimserver.taltos.com'; volatile char sSlimServer_Units[SlimS_Unit_Count][SS_MAX_PlayerID] = ! { '00:04:20:05:a2:e1', // SqueezeBox: Family Room ! '00:04:20:05:a2:e3', // SqueezeBox: Boys Room ! '00:04:20:05:a2:e5' }; // SqueezeBox: Guest Room volatile char SlimServer_fDebugFeedback = 0; volatile char g_SlimServer_UnitNum; // Global - Current SlimServer unit # we're controlling volatile char SServer_BScroll[SS_MAX_BrowseSessions], SServer_LastLev[SS_MAX_BrowseSessions]; ! // Flags to indicate if browse scroll bar currently being adjusted (***********************************************************) *************** *** 142,145 **** --- 142,149 ---- DEFINE_FUNCTION PlayerStart (char unitNum) { + // To start a particular player, we must: + // Turn on the power to the player (if already on, this is harmless) + // Inform module that we want player feedback on the touchpanel + dev panelList[SS_MAX_PanelsInSystem]; *************** *** 154,165 **** } ! DEFINE_FUNCTION PlayerStop { // Disable updates for this unit (MUST be done before monitoring another Squeezebox!) SS_SetPanels(vdSlimServer, g_SlimServer_UnitNum, SS_noPanelList); ! // If desired, you can do the following to stop and turn off the player ! SS_DoCommand(vdSlimServer, g_SlimServer_UnitNum, SS_cmdStop); ! SS_DoCommand(vdSlimServer, g_SlimServer_UnitNum, SS_cmdPower_Off); g_SlimServer_UnitNum = 0; --- 158,178 ---- } ! DEFINE_FUNCTION PlayerStop (char fStopPlayer) { + // This is an example only; you may want to do this when powering off (for example) + // When we deselect a player (i.e. stop monitoring it from the touchpanel, we): + // Disable panel updates (stop updating touchpanel for this player) + // Issue a "stop" command (to kill off any transcoding for player on server) + // Turn off power to the player + // Set "player number" to zero (i.e. no player being controlled at this time) + // Disable updates for this unit (MUST be done before monitoring another Squeezebox!) SS_SetPanels(vdSlimServer, g_SlimServer_UnitNum, SS_noPanelList); ! if (fStopPlayer) { ! // If desired, you can do the following to stop and turn off the player ! SS_DoCommand(vdSlimServer, g_SlimServer_UnitNum, SS_cmdStop); ! SS_DoCommand(vdSlimServer, g_SlimServer_UnitNum, SS_cmdPower_Off); ! } g_SlimServer_UnitNum = 0; *************** *** 209,213 **** } Active (remove_string(data.text,'KEYP-',1) <> ''): { ! SS_DoExtCommand (vdSlimServer, g_SlimServer_UnitNum, SS_extCmdSleep, 0, atoi(data.text)); } } --- 222,238 ---- } Active (remove_string(data.text,'KEYP-',1) <> ''): { ! char strHH[16]; ! slong slTime; ! ! // Include hours if they are specified ! slTime = 0; ! strHH = remove_string(data.text,':',1); ! if (length_string(strHH) <> 0) ! sltime = atoi(strHH) * 60; ! ! // Add in any remaining minutes ! slTime = slTime + atoi(data.text); ! ! SS_DoExtCommand (vdSlimServer, g_SlimServer_UnitNum, SS_extCmdSleep, 0, slTime); } } *************** *** 215,219 **** } ! // Source selection buttons button_event [TP_Setup, 11] // Select Squeezebox in Family Room --- 240,244 ---- } ! // Source selection buttons - Select which sqeezebox will be controlled button_event [TP_Setup, 11] // Select Squeezebox in Family Room *************** *** 229,233 **** } ! button_event [TP_Setup, 13] // Select test player (SoftSqueeze) { PUSH: --- 254,258 ---- } ! button_event [TP_Setup, 13] // Select Squeezebox in Guest Room { PUSH: *************** *** 235,242 **** } ! button_event [TP_Setup, 20] // Stop playing current Squeezebox { PUSH: ! PlayerStop(); } --- 260,267 ---- } ! button_event [TP_Setup, 20] // Stop monitoring current Squeezebox { PUSH: ! PlayerStop(FALSE); } *************** *** 253,258 **** switch (data.text[1]) { case SS_Pkt_UI_Error: { ! // Got some sort of error feedback from the SlimServer (beep panels) ! send_command TP_SServer, 'ADBEEP'; } } --- 278,294 ---- switch (data.text[1]) { case SS_Pkt_UI_Error: { ! sinteger slResult; ! _sSS_UI_ErrorResult errData; ! slResult = SS_UI_DecodeErrPacket(errData, data.text); ! ! if (slResult == 0 && errData.panel.number <> 0) { ! send_command errData.panel, "'!T',9,errData.errText"; ! send_command errData.panel, 'ADBEEP'; ! send_command errData.panel, 'PPON-SlimServer Warning'; ! } ! else { ! // Got some sort of error feedback - not clear where error came from (beep all panels) ! send_command TP_SServer, 'ADBEEP'; ! } } } *************** *** 264,275 **** channel_event[vdSlimServer, 1] // Online/Offline changes { ! on: on[TP_SServer,256]; ! off: off[TP_SServer,256]; } channel_event[vdSlimServer, 2] // Idle/Busy changes { ! on: on[TP_SServer,257]; ! off: off[TP_SServer,257]; } --- 300,311 ---- channel_event[vdSlimServer, 1] // Online/Offline changes { ! on: on[TP_SServer,254]; ! off: off[TP_SServer,254]; } channel_event[vdSlimServer, 2] // Idle/Busy changes { ! on: on[TP_SServer,255]; ! off: off[TP_SServer,255]; } *************** *** 283,293 **** if (g_SlimServer_UnitNum == SlimS_Unit_Family) { // Squeezebox stopped playing; shutdown in 1 minute ! wait 600 'SlimS_Unit_Family_Shutdown' ! PlayerStop(); } } } ! Button_Event [TP_SServer,GenericChans] // Modero SlimServer Handler { PUSH: --- 319,333 ---- if (g_SlimServer_UnitNum == SlimS_Unit_Family) { // Squeezebox stopped playing; shutdown in 1 minute ! wait 600 'SlimS_Unit_Family_Shutdown' { ! // Keep touchpanel up to date to not confuse end user ! send_command TP_SServer, 'Page-Source Select'; ! // Now tell the player to stop and turn off ! PlayerStop(TRUE); ! } } } } ! Button_Event [TP_SServer,GenericChans] // SlimServer Handler: Generic commands { PUSH: *************** *** 295,299 **** } ! Button_Event [TP_SServer,128] { PUSH: --- 335,339 ---- } ! Button_Event [TP_SServer,128] // SlimServer: Force panel update { PUSH: *************** *** 301,305 **** } ! button_event [TP_SServer,129] // Modero SlimServer: Extended Debugging Output { PUSH: { --- 341,345 ---- } ! button_event [TP_SServer,129] // SlimServer: Extended Debugging Output { PUSH: { *************** *** 313,324 **** } ! Button_Event [TP_SServer,130] // Modero SlimServer: Deselect Browse Session { PUSH: { ! // If you have a queue of available browse sessions, add this session here } } ! Button_Event [TP_SServer,131] // Modero SlimServer: Select Songs (Select Browse Session) { PUSH: --- 353,364 ---- } ! Button_Event [TP_SServer,130] // SlimServer: Deselect Browse Session { PUSH: { ! // If you have a queue of available browse sessions, remove this session here } } ! Button_Event [TP_SServer,131] // SlimServer: Select Songs (Select Browse Session) { PUSH: *************** *** 328,332 **** } ! Button_Event [TP_SServer,132] // Modero SlimServer: Back up one level { PUSH: --- 368,372 ---- } ! Button_Event [TP_SServer,132] // SlimServer: Back up one level { PUSH: *************** *** 334,338 **** } ! Button_Event [TP_SServer,133] // Modero SlimServer: Scroll back one page { PUSH: --- 374,378 ---- } ! Button_Event [TP_SServer,133] // SlimServer: Scroll back one page { PUSH: *************** *** 343,347 **** } ! Button_Event [TP_SServer,134] // Modero SlimServer: Scroll forward one page { PUSH: --- 383,387 ---- } ! Button_Event [TP_SServer,134] // SlimServer: Scroll forward one page { PUSH: *************** *** 352,356 **** } ! button_event [TP_SServer,138] // Modero SlimServer: Enter sleep time { PUSH: { --- 392,396 ---- } ! button_event [TP_SServer,138] // SlimServer: Enter sleep time { PUSH: { *************** *** 359,363 **** } ! Button_Event [TP_SServer,139] // Modero SlimServer: Search current items { PUSH: { --- 399,403 ---- } ! Button_Event [TP_SServer,SS_Channel_Search] // SlimServer: Search current items { PUSH: { *************** *** 372,376 **** Button_Event [TP_SServer,SS_Channels_Items] ! // Modero SlimServer: Select item (drill down) { PUSH: --- 412,416 ---- Button_Event [TP_SServer,SS_Channels_Items] ! // SlimServer: Select item (drill down) { PUSH: *************** *** 379,383 **** Button_Event [TP_SServer,SS_Channels_Add] ! // Modero SlimServer: Add item to queue { PUSH: { --- 419,423 ---- Button_Event [TP_SServer,SS_Channels_Add] ! // SlimServer: Add item to queue { PUSH: { *************** *** 400,404 **** } ! level_event [TP_SServer,5] { // Save the last level, set flag to indicate we've set the level --- 440,444 ---- } ! level_event [TP_SServer,8] { // Save the last level, set flag to indicate we've set the level --- NEW FILE: README-FR.txt --- (This appears to be a binary file; contents omitted.) --- NEW FILE: SlimServerMod.sxw --- (This appears to be a binary file; contents omitted.) --- NEW FILE: CHANGES.txt --- 2005-05-16: Updated VPN-CP panel layout for "feedback" state (and colors) on primary screen and selection screen. There was no visual feedback on which button was touched. 2005-05-15: Updated README file, released V1.0 (final release). 2005-05-15: Fixed minor problem in VPN-CP panel layout (no channel assignment for sleep button). No effect on the sample code, but breaks potential implementation if panel is imported into an existing system. 2005-05-03: Incorporated new VPN-CP panel layout. Modified feedback channels for ONLINE/OFFLINE and IDLE/BUSY to be compatible with both the VPN-CP panel layout and the MVP-8400 panel layout (mainline change). Tested both the VPN-CP and MVP-8400 panel layouts. Created RC4 package for upload. 2005-04-24: Modified sample mainline code to support warning popup if UI errors occur. 2005-04-24: Added error message if search is performed and no results are found. 2005-04-24: Vincèn PUJOL converted documentation to OpenOffice format (for ease in distributing .PDF file, more "portable" than Microsoft Word). Completed conversion, fixed some formatting problems, updated for latest changes (mostly dealing with volume). 2005-04-24: Integrated new version of MVP-4800 touchpanel. Added support for volume adjustments of a player, along with feedback to the panel. Optimized internal behavior of module (optimize volume updates from server code) to smooth out volume "ramping". 2005-04-16: Released V1.0 RC3 for testing. Modified README file for credits. 2005-04-16: Modified playlist parser to use "index" tag exclusively for new item (sync with latest nightly of SlimServer v6.0.2). Note: This change requires SlimServer v6.0.2 or later. Also modified playlist to show index numbers when displaying contents of a playlist. 2005-04-16: Fix bug where displaying titles from album erroneously displayed search screen. Added one second after song completion before checking for status of player (eliminate two rapid status queries at end of each song). In case of title duration problem (or SlimServer bug), minimum query time for status is now two seconds (not one second). 2005-04-10: Released V1.0 RC2 for testing. 2005-04-10: Due to severe performance problems with "Titles" command, modified this to strictly search for titles. If selected, "browse level" increased to 2, but no "Titles" command is performed. Instead, mainline is told that "Search" was selected, and search is performed. Modified UI_Search to disallow search command if searching on titles and length is too short (helping to insure that SlimServer performs reasonably). 2005-04-10: Changed browse screen constants "Title", "Artist", "Album", "Genre", and "Playlist" to plural forms. 2005-04-05: Bug fix: Setting detailed debugging didn't refresh screen 2005-04-02: Released v1.0 RC1 for testing Index: SlimServerMod.axi =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer/SlimServerMod.axi,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SlimServerMod.axi 7 Apr 2005 20:47:41 -0000 1.1 --- SlimServerMod.axi 28 Jul 2005 21:54:21 -0000 1.2 *************** *** 4,8 **** (* FILE CREATED ON: 10/03/2004 AT: 09:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 03/28/2005 AT: 22:52:18 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) --- 4,8 ---- (* FILE CREATED ON: 10/03/2004 AT: 09:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 04/24/2005 AT: 16:46:46 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) *************** *** 82,87 **** char SS_Base_FeedbackV_Levels = 5; // Base level # for player for VD feedback char SS_Range_FeedbackV_Channels = 10; // # of channels used in VD feedback for any one unit ! char SS_Range_FeedbackV_Levels = 12; // # of levels used in VD feedback for any one unit char SS_Base_Browse_Items = 140; // Base varchar number for browse items char SS_Base_Browse_AddBtn = 160; // Base varchar number for browse "Add" button --- 82,88 ---- char SS_Base_FeedbackV_Levels = 5; // Base level # for player for VD feedback char SS_Range_FeedbackV_Channels = 10; // # of channels used in VD feedback for any one unit ! char SS_Range_FeedbackV_Levels = 13; // # of levels used in VD feedback for any one unit + char SS_Channel_Search = 139; // Channel number used for "Search" button char SS_Base_Browse_Items = 140; // Base varchar number for browse items char SS_Base_Browse_AddBtn = 160; // Base varchar number for browse "Add" button *************** *** 205,209 **** char SS_UI_errForwardTooFar = 18; // Can't go forward beyond last page char SS_UI_errSinglePage = 19; // Can't search when all data fits on screen ! char SS_UI_errStringNotFound = 20; // Requested search string not found // Arrays to easily define definitions for browse purposes --- 206,212 ---- char SS_UI_errForwardTooFar = 18; // Can't go forward beyond last page char SS_UI_errSinglePage = 19; // Can't search when all data fits on screen ! char SS_UI_errSearchInvalid = 20; // Can't perform search in current context ! char SS_UI_errStringTooShort = 21; // Requested string too short (performance issues in 'titles') ! char SS_UI_errSearchFailed = 22; // Requested search string not found // Arrays to easily define definitions for browse purposes *************** *** 285,288 **** --- 288,292 ---- integer sleepRemaining; // Number of minutes remaining prior to sleep (if sleepTime is set) char MixerVolume; // Current Volume Setting: 0-100 + char IRVolume; // Current Volume Setting: 0-40 (Like Squeezebox display) char MixerBalance; // Reserved: Current Balance Setting: 0-100 char MixerBass; // Reserved: Current Bass Setting: 0-100 *************** *** 308,311 **** --- 312,316 ---- structure _sSS_UI_ErrorResult { // Response if a UI command fails in some way char sessionNum; // Browser session number + dev panel; // Panel device that caused error char lvl; // Current depth/level of UI code integer errCode; // Error code from SlimServer UI component *************** *** 664,667 **** --- 669,691 ---- } + define_function sinteger SS_UI_DecodeErrPacket(_sSS_UI_ErrorResult errData, char str[]) + // SS_UI_DecodeErrPacket: Decode error packet from module + // errData: Error packet (to be filled in) + // str: String containing data to decode + // + // Returns: 0 if success, != 0 if failure + { + long lPos; + sinteger siStatus; + + lPos = 2; + siStatus = string_to_variable(errData, str, lPos); + + if (siStatus <> 0) + Diag(llSlimServer, Error, 'SlimServer', "'Failure decoding _sSS_UI_ErrorResult data, Error=',itoa(siStatus)"); + + return siStatus; + } + (***********************************************************) Index: SlimServer,VPN-CP.tpd =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer/SlimServer,VPN-CP.tpd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsdGgyMT and /tmp/cvsaDeIMV differ Index: README.txt =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer/README.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README.txt 7 Apr 2005 20:47:40 -0000 1.1 --- README.txt 28 Jul 2005 21:54:20 -0000 1.2 *************** *** 1,6 **** This file is intended to be viewed with "Notepad" in word-wrap mode (see "Format" menu). ! Released Version: B1.0 (Beta Release Candidate 1) ! Release Date: Saturday, 02-Apr-2005 ----- --- 1,6 ---- This file is intended to be viewed with "Notepad" in word-wrap mode (see "Format" menu). ! Released Version: V1.0 ! Release Date: Sunday, 15-Apr-2005 ----- *************** *** 10,18 **** The SlimServer project integrates an AMX NetLinx control system and a wireless (or wired) 2-way touchpanel with a Squeezebox or Squeezebox2 from Slim Devices (http://www.slimdevices.com). ! As of the time of this release, the SlimServerMod module is compatible with the released build of SlimServer v6.0 or v6.0.1. This module is not compatible with any previous version of the SlimServer software. The following files are provided: LICENSE.txt: Open source license; you are obligated to abide by this or not use the software --- 10,19 ---- The SlimServer project integrates an AMX NetLinx control system and a wireless (or wired) 2-way touchpanel with a Squeezebox or Squeezebox2 from Slim Devices (http://www.slimdevices.com). ! As of the time of this release, the SlimServerMod module is compatible with the released build of SlimServer v6.0.2 or later. This module is not compatible with any previous version of the SlimServer software. In particular, this module is not compatible with SlimServer v6.0 or SlimServer v6.0.1. The following files are provided: + CHANGES.txt: Change log file LICENSE.txt: Open source license; you are obligated to abide by this or not use the software *************** *** 24,28 **** SlimServerMod.axi: SlimServer Include file and API definition file ! SlimServerMod.doc: Complete documetation file on the module SlimServerMod.tko: SlimServer Module (compiled) SyslogMod.axi: Syslog Include file --- 25,29 ---- SlimServerMod.axi: SlimServer Include file and API definition file ! SlimServerMod.pdf: Complete documetation file on the module SlimServerMod.tko: SlimServer Module (compiled) SyslogMod.axi: Syslog Include file *************** *** 31,35 **** Notes on Syslog: All files under SourceForge project NetLinx-Modules are "syslog friendly". This means that you may choose to use syslog, or you may choose to not use syslog. By default, syslog is disabled (and only controls logging levels to the NetLinx console via 'SEND_STRING 0' commands). ! For SlimServerMod, SlimServerMod.axi defines variable 'llSlimServer', and controls logging levels for the module. SlimServerMod represents an open-source project. If you want source files, they are available via CVS from the SourceForge project 'NetLinx-Modules'. You are free to download the source code if you wish. If you make improvements to the code that you believe is generally useful, please submit your changes to netlinx-modules(at)taltos.com. That way, everyone can benefit from your changes. Thanks! --- 32,38 ---- Notes on Syslog: All files under SourceForge project NetLinx-Modules are "syslog friendly". This means that you may choose to use syslog, or you may choose to not use syslog. By default, syslog is disabled (and only controls logging levels to the NetLinx console via 'SEND_STRING 0' commands). ! For SlimServerMod, SlimServerMod.axi defines variable 'llSlimServer', and controls logging levels for the module. Mainline is free to change these values during startup, or you may edit SlimServerMod.axi to change these values prior to startup code execution. ! ! Notes on album cover art: If Album Art is enabled, then you must have album art stored in the SlimServer. See SlimServer documentation for more information. Additionally, your panel must have access to the SlimServer WWW port (defaults to port 9000). Dynamic image name "Cover_Art" must be defined on your panel, and the dynamic image must be set for HTTP, the TCP/IP address of your SlimServer, and username/password, if necessary based on your installation. Finally, if there is a firewall between your Modero panel and your SlimServer, the firewall must be configured to allow the Modero panel to contact the SlimServer on the appropriate port. SlimServerMod represents an open-source project. If you want source files, they are available via CVS from the SourceForge project 'NetLinx-Modules'. You are free to download the source code if you wish. If you make improvements to the code that you believe is generally useful, please submit your changes to netlinx-modules(at)taltos.com. That way, everyone can benefit from your changes. Thanks! *************** *** 39,45 **** The SlimServerMod code is regularly used by the author and several other sites. It is anticipated that it'll work with virtually any version of applicable AMX code. However, to be precise, SlimServerMod has been successfully tested with: ! SlimServer v6.0 and later NetLinx Master (NXC) firmware 2.31.137, v3.00.316 Modero MVP-8400 firmware 2.46.38, 2.55.43 TPDesign3 version 3.16 (Build 200) TPDesign4 version 2.3.1 (Build 353), version 2.4.0 (Build 406) --- 42,58 ---- The SlimServerMod code is regularly used by the author and several other sites. It is anticipated that it'll work with virtually any version of applicable AMX code. However, to be precise, SlimServerMod has been successfully tested with: ! SlimServer v6.0.2 and later ! NetLinx Master Cards: NXC-ME260, NXC-ME260/64 NetLinx Master (NXC) firmware 2.31.137, v3.00.316 Modero MVP-8400 firmware 2.46.38, 2.55.43 TPDesign3 version 3.16 (Build 200) TPDesign4 version 2.3.1 (Build 353), version 2.4.0 (Build 406) + + + + Credits: + + . Jeff Coffler wrote SlimServerMod itself. + . Fred Thomas extended SlimServer CLI interface as needed for SlimServerMod. Without his assistance, SlimServerMod would likely not have been written. + . Dominique Hirigoyen created the MVP-8400 touchpanel. It looks great, doesn't it? He also created the VPN-CP touchpanel. Greg Gaskill created the VPN-CP touchpanel in earlier releases. + . Various beta testers that tested and dutifully reported problems and made suggestions. Vincèn Pujol made some great suggestions; some features of SlimServerMod likely wouldn't exist without his feedback and input. \ No newline at end of file Index: SlimServer,MVP-8400.TP4 =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer/SlimServer,MVP-8400.TP4,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsun3Ot3 and /tmp/cvs4CtGL5 differ |
|
From: Jeff C. <co...@us...> - 2005-04-14 00:19:42
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules/Audiotron In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29132 Modified Files: AT-Sample.axs AT-Sample.tpd Added Files: AT-Sample.apw README.txt Log Message: Update for final Audiotron V1.0 release Index: AT-Sample.tpd =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/Audiotron/AT-Sample.tpd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvs3betBt and /tmp/cvsm8CHDm differ Index: AT-Sample.axs =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/Audiotron/AT-Sample.axs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AT-Sample.axs 23 Oct 2002 22:32:24 -0000 1.1 --- AT-Sample.axs 14 Apr 2005 00:19:31 -0000 1.2 *************** *** 5,9 **** (* FILE CREATED ON: 08/19/2000 AT: 12:35:12 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 10/23/2002 AT: 15:21:09 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) --- 5,9 ---- (* FILE CREATED ON: 08/19/2000 AT: 12:35:12 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 04/13/2005 AT: 16:47:48 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) *************** *** 23,46 **** (***********************************************************) (*}}PS_SOURCE_INFO *) ! (* *) ! (* copyright : (C) 2002 by Jeff Coffler *) ! (* email : net...@ta... *) ! (* *) ! (* This library is free software; you can redistribute it *) ! (* and/or modify it under the terms of the GNU Lesser *) ! (* General Public License as published by the Free *) ! (* Software Foundation; either version 2.1 of the License, *) ! (* or (at your option) any later version. *) ! (* *) ! (* This library is distributed in the hope that it will be *) ! (* useful, but WITHOUT ANY WARRANTY; without even the *) ! (* implied warranty of MERCHANTABILITY or FITNESS FOR A *) ! (* PARTICULAR PURPOSE. See the GNU Lesser General Public *) ! (* License for more details. *) ! (* *) ! (* You should have received a copy of the GNU Lesser *) ! (* General Public License along with this library; if not, *) ! (* write to the Free Software Foundation, Inc., 59 Temple *) ! (* Place, Suite 330, Boston, MA 02111-1307 USA *) (***********************************************************) --- 23,32 ---- (***********************************************************) (*}}PS_SOURCE_INFO *) ! (***********************************************************) ! ! (***********************************************************) ! (* System Type : Netlinx *) ! (***********************************************************) ! (* REV HISTORY: *) (***********************************************************) *************** *** 52,56 **** // AXR-NWS: Netwave Servers - connected via AXLINK ! TP1 = 194:1:1; // Other virtual devices --- 38,42 ---- // AXR-NWS: Netwave Servers - connected via AXLINK ! TP1 = 198:1:1; // Other virtual devices *************** *** 72,81 **** // Port number (must be unique) for syslog service ! DEV SyslogSocket = 0:10:0; // Port number (must be unique) for Audiotron ! DEV ATron_Family = 0:13:0; ! char AudiotronSelectLen = 7; // Number of items on select page --- 58,71 ---- // Port number (must be unique) for syslog service ! // (Not used since vdSyslog==0:0:0 and no DEFINE_MODULE for syslog) ! DEV SyslogSocket = 0:0:0; // Port number (must be unique) for Audiotron ! DEV ATron_Family = 0:4:0; ! char AudiotronSelectLen = 8; // Number of items on select page ! ! devchan vdATron_lvlBack = {vdATron_Family,1}; ! devchan vdATron_addOkay = {vdATron_Family,2}; *************** *** 104,108 **** // Support for Audiotron module ! volatile char sAT_Family_Addr[] = 'audiotron-family.taltos.com'; volatile char sAT_Family_UserPwd[] = 'admin:admin'; --- 94,98 ---- // Support for Audiotron module ! volatile char sAT_Family_Addr[] = '192.168.1.40'; volatile char sAT_Family_UserPwd[] = 'admin:admin'; *************** *** 169,173 **** // Figure out of we should say "Add" or "<Blank>", and update if needed ! if (Length_Array(LocalItems[loop]) <> 0 && displayLvl <> 1) curAddState = 'Add'; else --- 159,163 ---- // Figure out of we should say "Add" or "<Blank>", and update if needed ! if (Length_Array(LocalItems[loop]) <> 0 && [vdATron_addOkay]) curAddState = 'Add'; else *************** *** 262,267 **** } ! [TP1,58] = (AudiotronRandom); ! [TP1,59] = (AudiotronRepeat); } --- 252,258 ---- } ! [TP1,40] = [vdATron_lvlBack]; ! [TP1,123] = (AudiotronRandom); ! [TP1,124] = (AudiotronRepeat); } *************** *** 463,467 **** Button_Event [TP1,40] // Back up one level { ! Push: AT_UI_Backup(vdATron_Family); } --- 454,461 ---- Button_Event [TP1,40] // Back up one level { ! Push: { ! if (AudiotronDisplayLvl > 1) // Don't send command we know will fail ! AT_UI_Backup(vdATron_Family); ! } } *************** *** 504,531 **** } - Button_Event [TP1,58] // Random - { - Push: { - AudiotronRandom = !AudiotronRandom; - - if (AudiotronRandom) - AT_DoCommand(vdATron_Family, AT_cmdRandom, AT_cmdOn); - else - AT_DoCommand(vdATron_Family, AT_cmdRandom, AT_cmdOff); - } - } - - Button_Event [TP1,59] // Repeat - { - Push: { - AudiotronRepeat = !AudiotronRepeat; - - if (AudiotronRepeat) - AT_DoCommand(vdATron_Family, AT_cmdRepeat, AT_cmdOn); - else - AT_DoCommand(vdATron_Family, AT_cmdRepeat, AT_cmdOff); - } - } - Button_Event [TP1,120] // Select songs { --- 498,501 ---- *************** *** 545,549 **** AT_DoCommand(vdATron_Family, AT_cmdClear, AT_cmdOn); AT_DoCommand(vdATron_Family, AT_cmdStop, AT_cmdOn); ! // BUGBUG: Can't discretely turn off Random/Repeat due to Audiotron firmware bug! // AT_DoCommand(vdATron_Family, AT_cmdRandom, AT_cmdOff); // AT_DoCommand(vdATron_Family, AT_cmdRepeat, AT_cmdOff); --- 515,519 ---- AT_DoCommand(vdATron_Family, AT_cmdClear, AT_cmdOn); AT_DoCommand(vdATron_Family, AT_cmdStop, AT_cmdOn); ! // Discretely turn off Random/Repeat if desired ... // AT_DoCommand(vdATron_Family, AT_cmdRandom, AT_cmdOff); // AT_DoCommand(vdATron_Family, AT_cmdRepeat, AT_cmdOff); *************** *** 559,562 **** --- 529,556 ---- } + Button_Event [TP1,123] // Random + { + Push: { + AudiotronRandom = !AudiotronRandom; + + if (AudiotronRandom) + AT_DoCommand(vdATron_Family, AT_cmdRandom, AT_cmdOn); + else + AT_DoCommand(vdATron_Family, AT_cmdRandom, AT_cmdOff); + } + } + + Button_Event [TP1,124] // Repeat + { + Push: { + AudiotronRepeat = !AudiotronRepeat; + + if (AudiotronRepeat) + AT_DoCommand(vdATron_Family, AT_cmdRepeat, AT_cmdOn); + else + AT_DoCommand(vdATron_Family, AT_cmdRepeat, AT_cmdOff); + } + } + Button_Event [TP1,126] // Update status of Audiotron { --- NEW FILE: README.txt --- This file is intended to be viewed with "Notepad" in word-wrap mode (see "Format" menu). Released Version: V1.0 Release Date: Saturday, 02-Apr-2005 Setup information and notes for the Audiotron Module: This Audiotron project integrates an AMX NetLinx control system and a wireless, wired or webpanel 2-way touchpanel with an Audiotron from Turtle Beach (http://www.turtlebeach.com/site/products/audiotron/producthome.asp). As of the time of this release, the Audiotron module is compatible with Audiotron firmware v3.2.25 The following files are provided: LICENSE.txt: Open source license; you are obligated to abide by this or not use the software AT-Sample.apw: NetLinx Studio (v2.x) workspace file AT-Sample.axs: Sample (mainline) Driver Program AT-Sample.tpd: Sample VPT-CP (TPDesign3) File AudiotronMod.axi: Audiotron Include file and API definition file AudiotronMod.tko: Audiotron Module (compiled) README.txt: This file SyslogMod.axi: Syslog Include file Rough instructions: 1. Place all of the listed files in the same directory. 2. Open 'Audiotron.apw' in Studio2. 3. Open 'AT-Sample' from the Source folder of the workspace. 4. Change the device id for TP1 (Line 54) to match your panel or web panel. 5. Change the variable 'sAT_Family_Addr' (Line 106) to match the IP address or DNS name of your Audiotron. 6. Change the variable 'sAT_Family_UserPwd' (Line 107) to match the Username & Password used on the Web Server Settings page of your Audiotron. The default is 'admin:admin' (NOTE: The username will always be 'admin'. Be sure the username & password are separated only by a colon.) 7. Compile 'AT-Sample' & send it to the master. 8. Load the TP. Notes on Syslog: All files under SourceForge project NetLinx-Modules are "syslog friendly". This means that you may choose to use syslog, or you may choose to not use syslog. By default, syslog is disabled (and only controls logging levels to the NetLinx console via 'SEND_STRING 0' commands). If you use the syslog, be sure to change the 'SyslogHost' variable (Line 103 of AT-Sample.axs) to the IP address or DNS name of your syslog host. For SlimServerMod, SlimServerMod.axi defines variable 'llSlimServer', and controls logging levels for the module. AudiotronMod represents an open-source project. If you want source files, they are available via CVS from the SourceForge project 'NetLinx-Modules'. You are free to download the source code if you wish. If you make improvements to the code that you believe is generally useful, please submit your changes to netlinx-modules(at)taltos.com. That way, everyone can benefit from your changes. Thanks! ----- Be aware that the author of AudiotronMod no longer uses the Audiotron. However, it is used by several other sites, and it has been tested with the last released version of the Audiotron firmware (the Audiotron has been cancelled by Turtle Beach). The author will strive to answer questions (address E-Mail to netlinx-modules(at)taltos.com), but that's pretty much it. --- NEW FILE: AT-Sample.apw --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Workspace [ <!-- Common Elements --> <!ELEMENT Identifier (#PCDATA)> <!ELEMENT Comments (#PCDATA)> <!ELEMENT CreationDate (#PCDATA)> <!-- Workspace Elements--> <!ELEMENT Workspace ( Identifier, CreateVersion, PJS_File?, PJS_ConvertDate?, PJS_CreateDate?, Comments?, Project*)> <!ATTLIST Workspace CurrentVersion CDATA #REQUIRED> <!ELEMENT CreateVersion (#PCDATA)> <!-- Conversion data only: only included for files converted from the old .pjs database --> <!ELEMENT PJS_File (#PCDATA)> <!ELEMENT PJS_ConvertDate (#PCDATA)> <!ELEMENT PJS_CreateDate (#PCDATA)> <!ELEMENT Project ( Identifier, Designer?, DealerID?, SalesOrder?, PurchaseOrder?, Comments?, System*)> <!ELEMENT Designer (#PCDATA)> <!ELEMENT DealerID (#PCDATA)> <!ELEMENT SalesOrder (#PCDATA)> <!ELEMENT PurchaseOrder (#PCDATA)> <!ELEMENT System ( Identifier, SysID, TransSerial?, TransModem?, TransTCPIP?, VirtualNetLinxMasterFlag?, VNMRestoreIPSettings?, VNMSystemID?, IsAuthenticationEnabled?, UserName?, Password?, Comments?, File*)> <!ATTLIST System IsActive (true | false) "false" Platform (Axcess | Netlinx) "Axcess" Transport (Serial | Modem | TCPIP) "Serial"> <!ELEMENT SysID (#PCDATA)> <!ELEMENT TransSerial (#PCDATA)> <!ELEMENT TransModem (#PCDATA)> <!ELEMENT TransTCPIP (#PCDATA)> <!ELEMENT VirtualNetLinxMasterFlag (#PCDATA)> <!ELEMENT VNMRestoreIPSettings (#PCDATA)> <!ELEMENT VNMSystemID (#PCDATA)> <!ELEMENT IsAuthenticationEnabled (#PCDATA)> <!ELEMENT UserName (#PCDATA)> <!ELEMENT Password (#PCDATA)> <!ELEMENT File ( Identifier, FilePathName, Comments?, DeviceMap*, IRDB*)> <!ATTLIST File Type (Source | MasterSrc | Include | Module | AXB | IR | TPD | TP4 | KPD | TKO | AMX_IR_DB | IRN_DB | Other | DUET) "Other" CompileType (Axcess | Netlinx | None) "None"> <!ELEMENT FilePathName (#PCDATA)> <!ELEMENT DeviceMap (DevName)> <!ATTLIST DeviceMap DevAddr CDATA #REQUIRED> <!ELEMENT DevName (#PCDATA)> <!ELEMENT IRDB (Property, DOSName, UserDBPathName, Notes)> <!ATTLIST IRDB DBKey CDATA #REQUIRED> <!ELEMENT Property (#PCDATA)> <!ELEMENT DOSName (#PCDATA)> <!ELEMENT UserDBPathName (#PCDATA)> <!ELEMENT Notes (#PCDATA)> ]> <Workspace CurrentVersion="3.0"><Identifier>AT-Sample</Identifier> <CreateVersion>3.0</CreateVersion> <PJS_File></PJS_File> <PJS_ConvertDate>04/13/2005 16:46:30</PJS_ConvertDate> <PJS_CreateDate>2002-09-13 13:52:02</PJS_CreateDate> <Comments> </Comments> <Project><Identifier>AT-Sample (Rev 0)</Identifier> <Designer>Jeff Coffler</Designer> <DealerID></DealerID> <SalesOrder></SalesOrder> <PurchaseOrder></PurchaseOrder> <Comments></Comments> <System IsActive="true" Platform="Netlinx" Transport="TCPIP"><Identifier>Main Controller</Identifier> <SysID>1</SysID> <TransSerial>COM1,38400,8,None,1,None</TransSerial> <TransModem>COM2,57600,8,None,1,None</TransModem> <TransTCPIP>netlinx.taltos.com:1319:1</TransTCPIP> <VirtualNetLinxMasterFlag>0</VirtualNetLinxMasterFlag> <VNMRestoreIPSettings>0.0.0.0:1319:1</VNMRestoreIPSettings> <VNMSystemID>1</VNMSystemID> <IsAuthenticationEnabled>0</IsAuthenticationEnabled> <UserName></UserName> <Password></Password> <Comments></Comments> <File CompileType="Netlinx" Type="MasterSrc"><Identifier>AT-Sample</Identifier> <FilePathName>AT-Sample.axs</FilePathName> <Comments></Comments> </File> <File CompileType="Axcess" Type="TPD"><Identifier>AT-TPD</Identifier> <FilePathName>AT-Sample.tpd</FilePathName> <Comments></Comments> </File> <File CompileType="None" Type="Include"><Identifier>AudiotronMod</Identifier> <FilePathName>AudiotronMod.axi</FilePathName> <Comments></Comments> </File> <File CompileType="None" Type="Include"><Identifier>SyslogMod</Identifier> <FilePathName>SyslogMod.axi</FilePathName> <Comments></Comments> </File> </System> </Project> </Workspace> |
Update of /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19891 Added Files: Main-Sample.axs README.txt SlimServer,MVP-8400.TP4 SlimServer,VPN-CP.tpd SlimServer.apw SlimServerMod.axi SlimServerMod.doc Log Message: Initial checkin preparing for v1.0 release of SlimServerMod --- NEW FILE: Main-Sample.axs --- PROGRAM_NAME='SlimServer-Sample' (*{{PS_SOURCE_INFO(PROGRAM STATS) *) (***********************************************************) (* FILE CREATED ON: 08/19/2000 AT: 12:35:12 *) (***********************************************************) (* FILE_LAST_MODIFIED_ON: 04/02/2005 AT: 14:38:31 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) (***********************************************************) (*!!FILE REVISION: Rev 0 *) (* REVISION DATE: 01/15/2005 *) (* *) (* COMMENTS: *) (***********************************************************) (*}}PS_SOURCE_INFO *) (***********************************************************) (***********************************************************) (* System Type : Netlinx *) (***********************************************************) (* REV HISTORY: *) (***********************************************************) (***********************************************************) (* DEFINE PANEL TYPE BELOW USING #define! *) (* *) (* If you comment out USING_MODERO_PANEL, then this code *) (* assumes that you're using a VPN-CP panel. Every effort *) (* was made to keep the code base identical between the *) (* two types of panels, but a small number of differences *) (* were unavoidable. *) (* *) (* As of this time, there are two code differences: *) (* 1. Device definition *) (* 2. How to pop up keyboard for searching. This can be *) (* avoided, but not without giving up ability to hide *) (* the "Search" button based on context on G3 panels. *) (***********************************************************) //#define USING_MODERO_PANEL (***********************************************************) (* DEVICE NUMBER DEFINITIONS GO BELOW *) (***********************************************************) DEFINE_DEVICE // Modero Viewpoint Panels #if_defined USING_MODERO_PANEL TP_Setup = 10001:1:1; // Family Room - Souce Select TP_SServer = 10001:9:1; // Family Room - Source: SlimServer #else TP_Setup = 198:1:1; // Family Room - Souce Select TP_SServer = 200:1:1; // Family Room - Source: SlimServer #end_if // Other virtual devices vdSlimServer = 34003:1:0; // SlimServer communications (***********************************************************) (* COMBINED DEVICE DEFINITIONS GO BELOW *) (***********************************************************) (***********************************************************) (* CONSTANT DEFINITIONS GO BELOW *) (***********************************************************) DEFINE_CONSTANT DEV vdSyslog = 0:0:0; // SyslogMod communications // "Fake" device since we don't use Syslog here // Port number (must be unique) for SlimServer DEV dvSlimServer = 0:2:0; char SlimS_Unit_Count = 3; // Number of SqueezeBox players that we've got char SlimS_Unit_Family = 1; // First Unit: Family Room char SlimS_Unit_Boys = 2; // Second Unit: Boys Room char SlimS_Unit_Test = 3; // Third Unit: Test Unit (SoftSqueeze) // Set up generic arrays of all touch panels in the system Integer GenericChans[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127 }; (***********************************************************) (* INCLUDE FILES GO BELOW *) (***********************************************************) #include 'SyslogMod.axi'; // SYSLOG logging routines #include 'SlimServerMod.axi'; // SlimServer Network Music Player (***********************************************************) (* DATA TYPE DEFINITIONS GO BELOW *) (***********************************************************) DEFINE_TYPE (***********************************************************) (* VARIABLE DEFINITIONS GO BELOW *) (***********************************************************) DEFINE_VARIABLE // Support for SlimServer module volatile char sSlimServer_Addr[] = 'slimserver.taltos.com'; volatile char sSlimServer_Units[SlimS_Unit_Count][SS_MAX_PlayerID] = { '00:04:20:05:69:dc', // SqueezeBox: Family Room '00:04:20:05:69:5e', // SqueezeBox: Boys Room '06:20:83:7f:fe:07' }; // SoftSqueeze: Test Unit volatile char SlimServer_fDebugFeedback = 0; volatile char g_SlimServer_UnitNum; // Global - Current SlimServer unit # we're controlling volatile char SServer_BScroll[SS_MAX_BrowseSessions], SServer_LastLev[SS_MAX_BrowseSessions]; // Flag to indicate if browse scroll bar currently being adjusted (***********************************************************) (* LATCHING DEFINITIONS GO BELOW *) (***********************************************************) DEFINE_LATCHING (***********************************************************) (* MUTUALLY EXCLUSIVE DEFINITIONS GO BELOW *) (***********************************************************) DEFINE_MUTUALLY_EXCLUSIVE (***********************************************************) (* SUBROUTINE/FUNCTION DEFINITIONS GO BELOW *) (***********************************************************) (* EXAMPLE: DEFINE_FUNCTION <RETURN_TYPE> <NAME> (<PARAMETERS>) *) (* EXAMPLE: DEFINE_CALL '<NAME>' (<PARAMETERS>) *) DEFINE_FUNCTION PlayerStart (char unitNum) { dev panelList[SS_MAX_PanelsInSystem]; g_SlimServer_UnitNum = unitNum; SS_DoCommand(vdSlimServer, g_SlimServer_UnitNum, SS_cmdPower_On); // Assign touchpanel for feedback panelList[1] = TP_SServer; set_length_array(panelList, 1); SS_SetPanels(vdSlimServer, g_SlimServer_UnitNum, panelList); } DEFINE_FUNCTION PlayerStop { // Disable updates for this unit (MUST be done before monitoring another Squeezebox!) SS_SetPanels(vdSlimServer, g_SlimServer_UnitNum, SS_noPanelList); // If desired, you can do the following to stop and turn off the player SS_DoCommand(vdSlimServer, g_SlimServer_UnitNum, SS_cmdStop); SS_DoCommand(vdSlimServer, g_SlimServer_UnitNum, SS_cmdPower_Off); g_SlimServer_UnitNum = 0; } (***********************************************************) (* STARTUP CODE GOES BELOW *) (***********************************************************) DEFINE_START (***********************************************************) (* MODULE DEFINITIONS GO BELOW *) (***********************************************************) Define_Module 'SlimServerMod' SlimServer( dvSlimServer, vdSlimServer, sSlimServer_Addr, sSlimServer_Units, vdSyslog, llSlimServer); (***********************************************************) (* THE EVENTS GOES BELOW *) (***********************************************************) DEFINE_EVENT // Set up string handler for implementation of "Search" capability data_event [TP_Setup] { online: { on [TP_Setup, 1]; // Online with NetLinx controller } string: { Select { // Support for popup keyboard - search for items (artists, albums, etc) Active (Data.Text == 'KEYB-ABORT'): { // Upon an abort, we don't want to perform a search } Active (left_string(data.text, 5) == 'KEYB-'): { char searchString[SS_LEN_Item]; searchString = Right_String(Data.Text,Length_Array(Data.Text)-5); SS_UI_Search(vdSlimServer, 1, searchString); } // Support for popup keypad - enter sleep time Active (data.text == 'KEYP-ABORT'): { // Upon an abort, we don't want to sleep } Active (remove_string(data.text,'KEYP-',1) <> ''): { SS_DoExtCommand (vdSlimServer, g_SlimServer_UnitNum, SS_extCmdSleep, 0, atoi(data.text)); } } } } // Source selection buttons button_event [TP_Setup, 11] // Select Squeezebox in Family Room { PUSH: PlayerStart (SlimS_Unit_Family); } button_event [TP_Setup, 12] // Select Squeezebox in Boys Room { PUSH: PlayerStart (SlimS_Unit_Boys); } button_event [TP_Setup, 13] // Select test player (SoftSqueeze) { PUSH: PlayerStart (SlimS_Unit_Test); } button_event [TP_Setup, 20] // Stop playing current Squeezebox { PUSH: PlayerStop(); } // Communicate with SlimServer module as necessary to implement capabilities data_event [vdSlimServer] { online: { // Enable both song level and song time feedback SS_SetStatusUpdates (vdSlimServer, 30, SS_Flag_SongLvl | SS_Flag_SongTime); } string: { switch (data.text[1]) { case SS_Pkt_UI_Error: { // Got some sort of error feedback from the SlimServer (beep panels) send_command TP_SServer, 'ADBEEP'; } } } } // Example of how to use channel feedback on virtual device to make system changes channel_event[vdSlimServer, 1] // Online/Offline changes { on: on[TP_SServer,256]; off: off[TP_SServer,256]; } channel_event[vdSlimServer, 2] // Idle/Busy changes { on: on[TP_SServer,257]; off: off[TP_SServer,257]; } channel_event[vdSlimServer, SlimServer_Chan(1, 3)] // Family "Play" state changes { on: { cancel_wait 'SlimS_Unit_Family_Shutdown'; } off: { // If we're still listening in the family room, start the shutdown timer if (g_SlimServer_UnitNum == SlimS_Unit_Family) { // Squeezebox stopped playing; shutdown in 1 minute wait 600 'SlimS_Unit_Family_Shutdown' PlayerStop(); } } } Button_Event [TP_SServer,GenericChans] // Modero SlimServer Handler { PUSH: SS_DoCommand(vdSlimServer, g_SlimServer_UnitNum, TYPE_CAST(Button.Input.Channel)); } Button_Event [TP_SServer,128] { PUSH: SS_PanelForceUpdate(vdSlimServer, g_SlimServer_UnitNum); } button_event [TP_SServer,129] // Modero SlimServer: Extended Debugging Output { PUSH: { SlimServer_fDebugFeedback = !SlimServer_fDebugFeedback; SS_SetDebugDetail(vdSlimServer, SlimServer_fDebugFeedback); if (SlimServer_fDebugFeedback) llSlimServer[llEntry_Console] = Debug; else llSlimServer[llEntry_Console] = Warning; } } Button_Event [TP_SServer,130] // Modero SlimServer: Deselect Browse Session { PUSH: { // If you have a queue of available browse sessions, add this session here } } Button_Event [TP_SServer,131] // Modero SlimServer: Select Songs (Select Browse Session) { PUSH: // If you have a queue of available browse sessions, get it now // (code below hard-coded to browse session #1) SS_UI_Begin(vdSlimServer, Button.Input.Device, 1, 8); } Button_Event [TP_SServer,132] // Modero SlimServer: Back up one level { PUSH: SS_UI_Backup(vdSlimServer, 1); } Button_Event [TP_SServer,133] // Modero SlimServer: Scroll back one page { PUSH: SS_UI_Prev(vdSlimServer, 1); HOLD [10]: // If button held down, scroll to top SS_UI_SetPage(vdSlimServer, 1, 255); } Button_Event [TP_SServer,134] // Modero SlimServer: Scroll forward one page { PUSH: SS_UI_Next(vdSlimServer, 1); HOLD [10]: // If button held down, scroll to bottom SS_UI_SetPage(vdSlimServer, 1, 0); } button_event [TP_SServer,138] // Modero SlimServer: Enter sleep time { PUSH: { // No program action to begin entering sleep time } } Button_Event [TP_SServer,139] // Modero SlimServer: Search current items { PUSH: { // Note: Following command assumes G4 panel (AKB) #if_defined USING_MODERO_PANEL send_command TP_Setup, '@AKB-;Enter Music Search Substring'; #else send_command TP_Setup, 'AKEYB'; #end_if } } Button_Event [TP_SServer,SS_Channels_Items] // Modero SlimServer: Select item (drill down) { PUSH: SS_UI_Select(vdSlimServer, 1, Button.input.Channel-SS_Channels_Items[1]+1); } Button_Event [TP_SServer,SS_Channels_Add] // Modero SlimServer: Add item to queue { PUSH: { SS_UI_Queue(vdSlimServer, g_SlimServer_UnitNum, 1, Button.input.Channel-SS_Channels_Add[1]+1); SS_DoCommand(vdSlimServer, g_SlimServer_UnitNum, SS_cmdPlay); } } button_event [TP_SServer,254] // Sense if a finger is on the scroll bar for browsing ... { PUSH: SServer_BScroll[1] = 1; RELEASE: { // If level event actually fired, then send SetPage to module if (SServer_BScroll[1] = 2) SS_UI_SetPage(vdSlimServer, 1, SServer_LastLev[1]); off[SServer_BScroll[1]]; } } level_event [TP_SServer,5] { // Save the last level, set flag to indicate we've set the level SServer_LastLev[1] = level.value; SServer_BScroll[1] = 2; } (***********************************************************) (* THE ACTUAL PROGRAM GOES BELOW *) (***********************************************************) DEFINE_PROGRAM (***********************************************************) (* END OF PROGRAM *) (* DO NOT PUT ANY CODE BELOW THIS COMMENT *) (***********************************************************) --- NEW FILE: SlimServer,VPN-CP.tpd --- (This appears to be a binary file; contents omitted.) --- NEW FILE: SlimServerMod.axi --- PROGRAM_NAME='SlimServerMod' (*{{PS_SOURCE_INFO(PROGRAM STATS) *) (***********************************************************) (* FILE CREATED ON: 10/03/2004 AT: 09:00:00 *) (***********************************************************) (* FILE_LAST_MODIFIED_ON: 03/28/2005 AT: 22:52:18 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) (***********************************************************) (*!!FILE REVISION: Rev 0 *) (* REVISION DATE: 10/03/2004 *) (* *) (* COMMENTS: *) (* *) (* Initial Release *) (* *) (***********************************************************) (*}}PS_SOURCE_INFO *) (* *) (* copyright : (C) 2004-2005 by Jeff Coffler *) (* email : net...@ta... *) (* *) (* This library is free software; you can redistribute it *) (* and/or modify it under the terms of the GNU Lesser *) (* General Public License as published by the Free *) (* Software Foundation; either version 2.1 of the License, *) (* or (at your option) any later version. *) (* *) (* This library is distributed in the hope that it will be *) (* useful, but WITHOUT ANY WARRANTY; without even the *) (* implied warranty of MERCHANTABILITY or FITNESS FOR A *) (* PARTICULAR PURPOSE. See the GNU Lesser General Public *) (* License for more details. *) (* *) (* You should have received a copy of the GNU Lesser *) (* General Public License along with this library; if not, *) (* write to the Free Software Foundation, Inc., 59 Temple *) (* Place, Suite 330, Boston, MA 02111-1307 USA *) (***********************************************************) #if_not_defined __SlimServer_Include__ #define __SlimServer_Include__ #include 'SyslogMod.axi'; (***********************************************************) (* DEVICE NUMBER DEFINITIONS GO BELOW *) (***********************************************************) DEFINE_DEVICE (***********************************************************) (* CONSTANT DEFINITIONS GO BELOW *) (***********************************************************) DEFINE_CONSTANT // Edit Constants/Recompile module if necessary char SS_MAX_PlayerCount = 8; // Maximum # of players supported char SS_MAX_PanelsInSystem = 4; // Maximum # of panels using single player at once char SS_MAX_BrowseSessions = 2; // Maximum # of concurrent "browse" sessions char SS_MAX_BrowseItemCount = 20; // Maximum # of items displayed per screen // Length of various data elements integer SS_LEN_Item = 128; integer SS_LEN_URL = 256; integer SS_LEN_Title = 96; integer SS_LEN_Artist = 48; integer SS_LEN_Album = 96; integer SS_LEN_Genre = 32; integer SS_LEN_Track = 4; integer SS_LEN_Year = 4; // Do not suggest editing below this point (malfunctions may result) char SS_Base_FeedbackP_Varchar = 20; // Number of varchar's reserved for panel feedback char SS_Base_FeedbackV_Channels = 5; // Base channel # for player VD feedback char SS_Base_FeedbackV_Levels = 5; // Base level # for player for VD feedback char SS_Range_FeedbackV_Channels = 10; // # of channels used in VD feedback for any one unit char SS_Range_FeedbackV_Levels = 12; // # of levels used in VD feedback for any one unit char SS_Base_Browse_Items = 140; // Base varchar number for browse items char SS_Base_Browse_AddBtn = 160; // Base varchar number for browse "Add" button long SS_MAX_vdBuf = 128; // Maximum size of virtual device message char SS_MAX_PlayerID = 32; // Maximum length of player ID (TCP/IP # or MAC addr) - URL Encoded char SS_MAX_UI_errText = 80; // Maximum length of UI error text // Flags to control module updates for panel char SS_Flag_No_G4_Optimize = 1; // Optimize for G4 panels (if device > 255) char SS_Flag_No_Album_Art = 2; // Do not display album art on G4 panels char SS_Disable_Panel_Channels = 4; // Disable channel feedback on touchpanels char SS_Flag_SongLvl = 8; // Show level as song progresses char SS_Flag_SongTime = 16; // Show time as song progresses (more I/O to panel) // SlimServer Valid Commands: char SS_opDoCommand = 1; // Perform command (Play, Pause, etc) char SS_opGetStatus = 10; // Request one-time status from SlimServer char SS_opSetStatusUpds = 100; // Override status update frequency at "steady state" char SS_opSetPanels = 101; // Set panels that module should keep up to date char SS_opPanelForceUpd = 102; // Force panel to update state immediately char SS_opSetDebugDetail = 103; // Set debugging detail char SS_opDoExtCommand = 104; // Perform extended command (Sleep, Volume, etc) char SS_opUICommand = 150; // Module cmd: UI (User Interface) operation // Types of operations (and parameters) for SS_opDoCommand: char SS_cmdPlay = 1; // Equivalent to pressing the play button char SS_cmdStop = 2; char SS_cmdPause = 3; char SS_cmdJump_Fwd = 4; char SS_cmdJump_Rew = 5; char SS_cmdScan_Fwd = 6; char SS_cmdScan_Rew = 7; char SS_cmdScan_End = 8; char SS_cmdPower_Toggle = 9; char SS_cmdNumber_0 = 10; char SS_cmdNumber_1 = 11; char SS_cmdNumber_2 = 12; char SS_cmdNumber_3 = 13; char SS_cmdNumber_4 = 14; char SS_cmdNumber_5 = 15; char SS_cmdNumber_6 = 16; char SS_cmdNumber_7 = 17; char SS_cmdNumber_8 = 18; char SS_cmdNumber_9 = 19; char SS_cmdRescan = 20; char SS_cmdVolume_Up = 24; char SS_cmdVolume_Down = 25; char SS_cmdVolume_Mute = 26; char SS_cmdPower_Off = 27; char SS_cmdPower_On = 28; char SS_cmdBright_Tog = 30; char SS_cmdBright_Down = 31; char SS_cmdBright_Up = 32; char SS_cmdTextSz_Tog = 33; char SS_cmdTextSz_Down = 34; char SS_cmdTextSz_Up = 35; char SS_cmdShuffl_Off = 40; char SS_cmdShuffl_Song = 41; char SS_cmdShuffl_Album = 42; char SS_cmdRepeat_Off = 43; char SS_cmdRepeat_One = 44; char SS_cmdRepeat_All = 45; char SS_cmdPlaydisp_Tog = 50; char SS_cmdPlaydisp_0 = 51; char SS_cmdPlaydisp_1 = 52; char SS_cmdPlaydisp_2 = 53; char SS_cmdPlaydisp_3 = 54; char SS_cmdPlaydisp_4 = 55; char ss_cmdPlaydisp_5 = 56; char ss_cmdPlayL_Clear = 60; // Types of operations (and parameters) for SS_opDoExtCommand: char SS_extCmdVolume = 1; // Volume adjustments (supports relative adjustment) // Limit -> 0-100 Absolute, -100 - +100 Relative char SS_extCmdSleep = 2; // Sleep time adjustment (absolute only) // Play modes (from structure _sSS_StatusInfo) char SS_PlayMode_Unknown = 0; // Play Mode: Unknown char SS_PlayMode_Play = 1; // Play Mode: Play char SS_PlayMode_Pause = 2; // Play Mode: Pause char SS_PlayMode_Stop = 3; // Play Mode: Stop char SS_PlayMode_Off = 4; // Play Mode: Off // Response packets that we send to mainline code char SS_Pkt_Status = 1; // Status response char SS_Pkt_Playlist = 2; // Playlist response char SS_Pkt_UI_Error = 10; // UI Error Packet // Types of operations for _sSS_GetBrowseInfo: char SS_infoTitle = 1; // Get list of available titles char SS_infoArtist = 2; // Get list of available artists char SS_infoAlbum = 3; // Get list of available albums char SS_infoGenre = 4; // Get list of available genre char SS_infoList = 5; // Get list of available Playlists char SS_infoTitleFromList = 6; // Get list of titles given a playlist // UI (user interface) operation codes char SS_UI_opBegin = 1; // Begin presenting UI to caller char SS_UI_opReset = 2; // Reset UI to "root" screen char SS_UI_opSelect = 3; // "Select" specified item (drill down) char SS_UI_opQueue = 4; // Queue specified item char SS_UI_opBackup = 5; // Go back one "level" (unselect) char SS_UI_opNext = 6; // Set cursor to next page char SS_UI_opPrev = 7; // Set cursor to previous page char SS_UI_opSearch = 8; // Search for item at the current level char SS_UI_opSetPage = 9; // Position browse screen to specific location in list // UI (user interface) error response codes: char SS_UI_errNoBegin = 1; // UI interface has not been started yet char SS_UI_errBadSession = 2; // UI session number is not valid char SS_UI_errBadLevel = 3; // UI 'level number' is not valid char SS_UI_errListTooShort = 10; // UI list length is too short char SS_UI_errListTooLong = 11; // UI list length is longer than compiled maximum char SS_UI_errInvalidParameter = 12; // Parameter to routine is invalid char SS_UI_errNoSuchItem = 13; // Selecting or queueing an item that doesn't exist char SS_UI_errSelectTermItem = 14; // Can't select terminal item (title) char SS_UI_errMaxLevelReached = 15; // Can't select items at this level (max level reached) char SS_UI_errInvalidQueueLvl = 16; // Can't queue items at this level char SS_UI_errBackupTooFar = 17; // Can't back up before first page char SS_UI_errForwardTooFar = 18; // Can't go forward beyond last page char SS_UI_errSinglePage = 19; // Can't search when all data fits on screen char SS_UI_errStringNotFound = 20; // Requested search string not found // Arrays to easily define definitions for browse purposes integer SS_Channels_Items[] = { 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160 }; integer SS_Channels_Add[] = { 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180 }; // 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, // 191, 192, 193, 194, 195, 196, 197, 198, 199, 200 (***********************************************************) (* DATA TYPE DEFINITIONS GO BELOW *) (***********************************************************) DEFINE_TYPE // Packets to transmit to the SlimServer module structure _sSS_DoExtOpcode { char opCode; char unitNum; // Most extended commands integer intParam1; integer intParam2; // Specifically used for SS_DoExtCommand slong slParam1; } structure _sSS_UI_DoCommand { char sessionNum; char opCode; integer param1; char sParam1[SS_LEN_Item]; } structure _sSS_QueueFile { char type; // Specify either the URL *OR* the itemID to queue char item[SS_LEN_URL]; long itemID; // Filtering criteria long idGenre; long idArtist; long idAlbum; // Filtering criteria (via QueueFile API - if written) char sfGenre[SS_LEN_Genre]; char sfArtist[SS_LEN_Artist]; char sfAlbum[SS_LEN_Album]; } // Packets sent from SlimServer module to caller structure _sSS_StatusInfo { // Response to a status request: char PlayerName[32]; // Player name (size can be increased if needed) char fPlayer_Connected; // Player currently connected? char fPower; // Player currently powered on? char SignalStrength; // Signal Strength (1-100, 0 if not wireless) char Mode; // Play mode (see SS_PlayMode_* constants) sinteger Rate; // Rate (Rewinding: <0, Fast Fwd: >1, Play: 1 integer SongTime; // Seconds of song that have been played integer SongDuration; // Total seconds of current song integer sleepTime; // Number of minutes player was set to sleep integer sleepRemaining; // Number of minutes remaining prior to sleep (if sleepTime is set) char MixerVolume; // Current Volume Setting: 0-100 char MixerBalance; // Reserved: Current Balance Setting: 0-100 char MixerBass; // Reserved: Current Bass Setting: 0-100 char MixerTreble; // Reserved: Current Treble Setting: 0-100 char MixerPitch; // Reserved: Current Pitch Setting: 80-120 char PlaylistRepeat; // Playlist Repeat State (0: Stop at end, 1: Repeat current song, 2: Repeat all songs) char PlaylistShuffle; // Playlist Shuffle State (0: None, 1: Songs, 2: Albums) long PlaylistCurIndex; // Index of currently played item (1 is first item) long PlaylistTracks; // Total number of tracks in playlist } structure _sSS_Playlist { // Response to a status playlist request: long lIndex; // Index of this song in the playlist long lID; // Internal database ID of item in playlist char sTitle[SS_LEN_Title]; // Remaining fields: Tag data char sArtist[SS_LEN_Artist]; char sAlbum[SS_LEN_Album]; char sGenre[SS_LEN_Genre]; } // UI related packets structure _sSS_UI_ErrorResult { // Response if a UI command fails in some way char sessionNum; // Browser session number char lvl; // Current depth/level of UI code integer errCode; // Error code from SlimServer UI component char errText[SS_MAX_UI_errText]; // Error text from SlimServer UI component } structure _sSS_GetBrowseInfo { // Packet to fetch browse information char type; // Type of fetch operation long startItem; // Starting item number to fetch long countItem; // Number of items to fetch for page char fSortTrack; // If getting title list, sort by track? // Filtering criteria long idArtist; long idAlbum; long idGenre; // Perform "search" (limit list of items returned to those containing search string) char sListDir[SS_LEN_URL]; // Directory/URL for playlist char sSearch[SS_LEN_Item]; // Search restriction text // Returned once query is performed long maxItems; // Maximum number of items available } (***********************************************************) (* VARIABLE DEFINITIONS GO BELOW *) (***********************************************************) DEFINE_VARIABLE #if_not_defined __SlimServer_Module_Compilation__ // Note on logging levels: // "Debug" is VERY verbose ... // "Info" logs all responses from SlimServer module // "Notice" and higher notes unusual exceptions only // See Syslog module for further details on logging levels char llSlimServer[llEntry_MAX] = // Logging for SlimServer notifications { Warning (*or Debug or Info or Warning*), Error (*No_Errors*) }; volatile DEV SS_noPanelList[1]; // Empty panel list (for ease in stopping panel updates) #end_if // __SlimServer_Module_Compilation__ (***********************************************************) (* LATCHING DEFINITIONS GO BELOW *) (***********************************************************) DEFINE_LATCHING (***********************************************************) (* MUTUALLY EXCLUSIVE DEFINITIONS GO BELOW *) (***********************************************************) DEFINE_MUTUALLY_EXCLUSIVE (***********************************************************) (* SUBROUTINE/FUNCTION DEFINITIONS GO BELOW *) (***********************************************************) (* EXAMPLE: DEFINE_FUNCTION <RETURN_TYPE> <NAME> (<PARAMETERS>) *) (* EXAMPLE: DEFINE_CALL '<NAME>' (<PARAMETERS>) *) define_function integer SlimServer_Chan(char unitNum, char theChan) // SlimServer_Chan: Returns the channel number for associated SlimServer unit/channel combination { return SS_Base_FeedbackV_Channels + ((unitNum - 1) * SS_Range_FeedbackV_Channels) + theChan; } define_function SS_DoCommand (dev vd, char unitNum, char op) { char sBuffer[SS_MAX_vdBuf]; // Marshall the data and transmit to the virtual device sBuffer = "SS_opDoCommand,unitNum,op"; Diag(llSlimServer, Debug, 'SlimServer', "'Sending SS_DoCommand request to module; bytes=',Length_String(sBuffer)"); Send_Command vd, "sBuffer"; } define_function SS_DoExtCommand (dev vd, char unitNum, char opCode, char fRelative, slong param) // SS_DoExtCommand: Request SlimServer to perform an extended command // vd: Virtual device for transmits to SlimServer module // unitNum: Unit number that we'd like status for // opCode: Operations code to perform (see documentation / headers) // fRelative: Relative or absolute setting (0 -> Absolute); // relative only valid for some commands // param: Parameter to be set for related opCode { _sSS_DoExtOpcode cmdData; cmdData.opCode = SS_opDoExtCommand; cmdData.unitNum = unitNum; cmdData.intParam1 = opCode; cmdData.intParam2 = fRelative; cmdData.slParam1 = param; Diag(llSlimServer, Debug, 'SlimServer', "'Sending SS_opDoExtCommand (opcode=',itoa(opCode),') request to module'"); SS_DoExtOpcode(vd, cmdData); } define_function SS_DoExtOpcode (dev vd, _sSS_DoExtOpcode cmdData) { char sBuffer[SS_MAX_vdBuf]; long lPos; sinteger siStatus; // Marshall the data and transmit to the virtual device sBuffer = "cmdData.opCode"; // Store opCode lPos = 2; siStatus = Variable_To_String(cmdData, sBuffer, lPos); if (siStatus == 0) // Success Send_Command vd, "sBuffer"; else // Failure Diag(llSlimServer, Error, 'SlimServer', "'Failure encoding SS_DoExtOpcode data, Error=',itoa(siStatus)"); } define_function SS_GetStatus (dev vd, char unitNum, integer startSong, integer numSongs) // SS_GetStatus: Request SlimServer to return it's current status // vd: Virtual device for transmits to SlimServer module // unitNum: Unit number that we'd like status for // startSong: Starting song number (zero based for current song) // numSong: Number of songs that we'd like in the playlist { _sSS_DoExtOpcode cmdData; cmdData.opCode = SS_opGetStatus; cmdData.unitNum = unitNum; cmdData.intParam1 = startSong; cmdData.intParam2 = numSongs; Diag(llSlimServer, Debug, 'SlimServer', "'Sending SS_opGetStatus request to module'"); SS_DoExtOpcode(vd, cmdData); } define_function SS_SetDebugDetail (dev vd, char fExtDebug) // SS_SetDebugDetail: Set level of debugging detail // vd: Virtual device for transmits to SlimServer module // fExtDebug: 0 -> No extended debugging, != 0 -> Extended debugging // // Note: Extended debugging returns (via logging mechanisms) every response from // the Slim Server in excruciating detail. Almost never needed unless directed. { _sSS_DoExtOpcode cmdData; cmdData.opCode = SS_opSetDebugDetail; cmdData.intParam1 = fExtDebug; Diag(llSlimServer, Debug, 'SlimServer', "'Sending SS_opSetDebugDetail request to module'"); SS_DoExtOpcode(vd, cmdData); } define_function SS_SetStatusUpdates (dev vd, integer secs, integer flags) // SS_SetStatusUpdates: Override defaults for frequency of status updates // vd: Virtual device for transmits to SlimServer module // secs: Number of seconds for updates (Note: Module forces minimum value) // flags: Special flags (global) to use for panel updates { _sSS_DoExtOpcode cmdData; cmdData.opCode = SS_opSetStatusUpds; cmdData.intParam1 = secs; cmdData.intParam2 = flags; Diag(llSlimServer, Debug, 'SlimServer', "'Sending SS_opSetStatusUpds request to module'"); SS_DoExtOpcode(vd, cmdData); } define_function SS_SetPanels (dev vd, char unitNum, dev panelList[]) // SS_SetPanels: Set panels that module should keep up to date // vd: Virtual device for transmits to SlimServer module // unitNum: Unit number to set (or clear) for feedback // panelList: List of panels that should be kept up to date { char sBuffer[SS_MAX_vdBuf]; long lPos; sinteger siStatus; // Marshall the data and transmit to the virtual device sBuffer = "SS_opSetPanels,unitNum,length_array(panelList)"; lPos = 4; siStatus = Variable_To_String(panelList, sBuffer, lPos); if (siStatus == 0) { // Success Diag(llSlimServer, Debug, 'SlimServer', "'Sending SS_opSetPanels request to module with panelList len=',itoa(length_array(panelList))"); Send_Command vd, "sBuffer"; } else // Failure Diag(llSlimServer, Error, 'SlimServer', "'Failure encoding _sSS_SetPanels data, Error=',itoa(siStatus)"); } define_function SS_PanelForceUpdate (dev vd, char unitNum) // SS_PanelForceUpdate: Force panel to be updated immediately // vd: Virtual device for transmits to SlimServer module // unitNum: Unit number to update { Diag(llSlimServer, Debug, 'SlimServer', "'Sending SS_opForcePanelUpd request to module with unitNum=',itoa(unitNum)"); Send_Command vd, "SS_opPanelForceUpd,unitNum"; } // User Interface Simulation Routines // // The following routines implement a sample UI for the SlimServer: // // SS_UI_Begin: Begin UI Operations // SS_UI_Reset: Reset UI to "root" screen // SS_UI_Select: "Select" specified item (drill down) // SS_UI_Queue: Queue specified item // SS_UI_Backup: Back up one "level" (essentially unselect) // SS_UI_Next: Set cursor to next page // SS_UI_Prev: Set cursor to previous page // SS_UI_Search: Search for item containing w/param at current level // SS_UI_SetPage: Position browse screen to specific location in list define_function SS_UI_PerformOp(dev vd, char sessionNum, char op, integer param, char str[]) // SS_UI_PerformOp: Internal routine to perform a UI operation // vd: Virtual device for transmits to SlimServer module // sessionNum: Browse session number for query purposes // op: Type of UI operation to perform // param: Parameter for command (or zero) // str: String parameter for command (or empty string) { char sBuffer[SS_MAX_vdBuf]; long lPos; sinteger siStatus; _sSS_UI_DoCommand uiBuffer; uiBuffer.sessionNum = sessionNum; uiBuffer.opCode = op; uiBuffer.param1 = param; uiBuffer.sParam1 = str; // Marshall the data and transmit to the virtual device sBuffer = "SS_opUICommand"; // Store UI opCode (performing UI command) lPos = 2; siStatus = Variable_To_String(uiBuffer, sBuffer, lPos); if (siStatus == 0) { // Success Diag(llSlimServer, Debug, 'SlimServer', "'Sending SS_opUICommand request to module; opCode=',itoa(op),', bytes=',itoa(lPos-1)"); Send_Command vd, "sBuffer"; } else // Failure Diag(llSlimServer, Error, 'SlimServer', "'Failure encoding SS_opUICommand data, Error=',itoa(siStatus)"); } define_function SS_UI_Begin(dev vd, dev panel, char sessionNum, integer numLines) // SS_UI_Begin: Begin UI Operations // vd: Virtual device for transmits to SlimServer module // panel: Panel device that will be browsing music collection // sessionNum: Browse session number for query purposes // numLines: Number of lines to present for UI interface { char sBuffer[SS_LEN_Item]; long lPos; sinteger siStatus; // Marshall the data and transmit to the virtual device Diag(llSlimServer, Debug, 'SlimServer', 'Preparing SS_opUICommand (SS_UI_opBegin) request'); clear_buffer sBuffer; lPos = 1; siStatus = Variable_To_String(panel, sBuffer, lPos); if (siStatus != 0) { // Failure Diag(llSlimServer, Error, 'SlimServer', "'Failure encoding panel in SS_UI_Begin, Error=',itoa(siStatus)"); return; } SS_UI_PerformOp(vd, sessionNum, SS_UI_opBegin, numLines, sBuffer); } define_function SS_UI_Reset(dev vd, char sessionNum) // SS_UI_Reset: Reset UI to "root" screen // vd: Virtual device for transmits to SlimServer module // sessionNum: Browse session number for query purposes { Diag(llSlimServer, Debug, 'SlimServer', 'Preparing SS_opUICommand (SS_UI_opReset) request'); SS_UI_PerformOp(vd, sessionNum, SS_UI_opReset, 0, ''); } define_function SS_UI_Select(dev vd, char sessionNum, integer item) // SS_UI_Select: "Select" specified item (drill down) // vd: Virtual device for transmits to SlimServer module // browseNum: Browse session number for query purposes // item: Item number to select { Diag(llSlimServer, Debug, 'SlimServer', 'Preparing SS_opUICommand (SS_UI_opSelect) request'); SS_UI_PerformOp(vd, sessionNum, SS_UI_opSelect, item, ''); } define_function SS_UI_Queue(dev vd, char unitNum, char sessionNum, integer item) // SS_UI_Queue: Queue specified item // vd: Virtual device for transmits to SlimServer module // unitNum: Unit number to queue item(s) for // sessionNum: Browse session number for query purposes // item: Item number to select { Diag(llSlimServer, Debug, 'SlimServer', 'Preparing SS_opUICommand (SS_UI_opQueue) request'); SS_UI_PerformOp(vd, sessionNum, SS_UI_opQueue, item, "unitNum"); } define_function SS_UI_Backup(dev vd, char sessionNum) // SS_UI_Backup: Back up one "level" (essentially unselect) // vd: Virtual device for transmits to SlimServer module // sessionNum: Browse session number for query purposes { Diag(llSlimServer, Debug, 'SlimServer', 'Preparing SS_opUICommand (SS_UI_opBackup) request'); SS_UI_PerformOp(vd, sessionNum, SS_UI_opBackup, 0, ''); } define_function SS_UI_Next(dev vd, char sessionNum) // SS_UI_Next: Set cursor to next page // vd: Virtual device for transmits to SlimServer module // sessionNum: Browse session number for query purposes { Diag(llSlimServer, Debug, 'SlimServer', 'Preparing SS_opUICommand (SS_UI_opNext) request'); SS_UI_PerformOp(vd, sessionNum, SS_UI_opNext, 0, ''); } define_function SS_UI_Prev(dev vd, char sessionNum) // SS_UI_Prev: Set cursor to previous page // vd: Virtual device for transmits to SlimServer module // sessionNum: Browse session number for query purposes { Diag(llSlimServer, Debug, 'SlimServer', 'Preparing SS_opUICommand (SS_UI_opPrev) request'); SS_UI_PerformOp(vd, sessionNum, SS_UI_opPrev, 0, ''); } define_function SS_UI_Search(dev vd, char sessionNum, char str[]) // SS_UI_Search: Search for item at the current level // vd: Virtual device for transmits to SlimServer module // sessionNum: Browse session number for query purposes // str: String to search for (beginning of item searches only) { Diag(llSlimServer, Debug, 'SlimServer', 'Preparing SS_opUICommand (SS_UI_opSearch) request'); SS_UI_PerformOp(vd, sessionNum, SS_UI_opSearch, 0, str); } define_function SS_UI_SetPage(dev vd, char sessionNum, char location) // SS_UI_SetPage: Position browse screen to specific location in browse list // vd: Virtual device for transmits to SlimServer module // sessionNum: Browse session number for query purposes // percentage: Percentage of distance through list (255=start of list, 0=end) { Diag(llSlimServer, Debug, 'SlimServer', 'Preparing SS_opUICommand (SS_UI_opSetPage) request'); SS_UI_PerformOp(vd, sessionNum, SS_UI_opSetPage, location, ''); } (***********************************************************) (* STARTUP CODE GOES BELOW *) (***********************************************************) DEFINE_START (***********************************************************) (* THE EVENTS GOES BELOW *) (***********************************************************) DEFINE_EVENT (***********************************************************) (* THE ACTUAL PROGRAM GOES BELOW *) (***********************************************************) DEFINE_PROGRAM #end_if // __SlimServer_Include__ --- NEW FILE: SlimServerMod.doc --- (This appears to be a binary file; contents omitted.) --- NEW FILE: SlimServer.apw --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Workspace [ <!-- Common Elements --> <!ELEMENT Identifier (#PCDATA)> <!ELEMENT Comments (#PCDATA)> <!ELEMENT CreationDate (#PCDATA)> <!-- Workspace Elements--> <!ELEMENT Workspace ( Identifier, CreateVersion, PJS_File?, PJS_ConvertDate?, PJS_CreateDate?, Comments?, Project*)> <!ATTLIST Workspace CurrentVersion CDATA #REQUIRED> <!ELEMENT CreateVersion (#PCDATA)> <!-- Conversion data only: only included for files converted from the old .pjs database --> <!ELEMENT PJS_File (#PCDATA)> <!ELEMENT PJS_ConvertDate (#PCDATA)> <!ELEMENT PJS_CreateDate (#PCDATA)> <!ELEMENT Project ( Identifier, Designer?, DealerID?, SalesOrder?, PurchaseOrder?, Comments?, System*)> <!ELEMENT Designer (#PCDATA)> <!ELEMENT DealerID (#PCDATA)> <!ELEMENT SalesOrder (#PCDATA)> <!ELEMENT PurchaseOrder (#PCDATA)> <!ELEMENT System ( Identifier, SysID, TransSerial?, TransModem?, TransTCPIP?, VirtualNetLinxMasterFlag?, VNMRestoreIPSettings?, VNMSystemID?, IsAuthenticationEnabled?, UserName?, Password?, Comments?, File*)> <!ATTLIST System IsActive (true | false) "false" Platform (Axcess | Netlinx) "Axcess" Transport (Serial | Modem | TCPIP) "Serial"> <!ELEMENT SysID (#PCDATA)> <!ELEMENT TransSerial (#PCDATA)> <!ELEMENT TransModem (#PCDATA)> <!ELEMENT TransTCPIP (#PCDATA)> <!ELEMENT VirtualNetLinxMasterFlag (#PCDATA)> <!ELEMENT VNMRestoreIPSettings (#PCDATA)> <!ELEMENT VNMSystemID (#PCDATA)> <!ELEMENT IsAuthenticationEnabled (#PCDATA)> <!ELEMENT UserName (#PCDATA)> <!ELEMENT Password (#PCDATA)> <!ELEMENT File ( Identifier, FilePathName, Comments?, DeviceMap*, IRDB*)> <!ATTLIST File Type (Source | MasterSrc | Include | Module | AXB | IR | TPD | TP4 | KPD | TKO | AMX_IR_DB | IRN_DB | Other | DUET) "Other" CompileType (Axcess | Netlinx | None) "None"> <!ELEMENT FilePathName (#PCDATA)> <!ELEMENT DeviceMap (DevName)> <!ATTLIST DeviceMap DevAddr CDATA #REQUIRED> <!ELEMENT DevName (#PCDATA)> <!ELEMENT IRDB (Property, DOSName, UserDBPathName, Notes)> <!ATTLIST IRDB DBKey CDATA #REQUIRED> <!ELEMENT Property (#PCDATA)> <!ELEMENT DOSName (#PCDATA)> <!ELEMENT UserDBPathName (#PCDATA)> <!ELEMENT Notes (#PCDATA)> ]> <Workspace CurrentVersion="3.0"><Identifier>SlimServer WS</Identifier> <CreateVersion>2.1</CreateVersion> <PJS_File></PJS_File> <PJS_ConvertDate></PJS_ConvertDate> <PJS_CreateDate></PJS_CreateDate> <Comments>Sample Workspace for SlimServer Sample Program</Comments> <Project><Identifier>SlimServer</Identifier> <Designer>Jeff Coffler</Designer> <DealerID>N/A</DealerID> <SalesOrder>N/A</SalesOrder> <PurchaseOrder></PurchaseOrder> <Comments></Comments> <System IsActive="true" Platform="Netlinx" Transport="TCPIP"><Identifier>NetLinx</Identifier> <SysID>1</SysID> <TransSerial>COM1,38400,8,None,1,None</TransSerial> <TransModem>COM1,38400,8,None,1,None</TransModem> <TransTCPIP>netlinx.taltos.com:1319:1</TransTCPIP> <VirtualNetLinxMasterFlag>0</VirtualNetLinxMasterFlag> <VNMRestoreIPSettings>0.0.0.0:1319:1</VNMRestoreIPSettings> <VNMSystemID>1</VNMSystemID> <IsAuthenticationEnabled>0</IsAuthenticationEnabled> <UserName></UserName> <Password></Password> <Comments>Primary NetLinx Controller</Comments> <File CompileType="Netlinx" Type="MasterSrc"><Identifier>Main-Sample</Identifier> <FilePathName>Main-Sample.axs</FilePathName> <Comments></Comments> </File> <File CompileType="None" Type="TP4"><Identifier>SlimServer-Sample</Identifier> <FilePathName>SlimServer-Sample.TP4</FilePathName> <Comments>Sample Touchpanel File for MVP-8400</Comments> </File> <File CompileType="None" Type="Include"><Identifier>SlimServerMod</Identifier> <FilePathName>SlimServerMod.axi</FilePathName> <Comments></Comments> </File> <File CompileType="None" Type="Include"><Identifier>SyslogMod</Identifier> <FilePathName>SyslogMod.axi</FilePathName> <Comments></Comments> </File> </System> </Project> </Workspace> --- NEW FILE: README.txt --- This file is intended to be viewed with "Notepad" in word-wrap mode (see "Format" menu). Released Version: B1.0 (Beta Release Candidate 1) Release Date: Saturday, 02-Apr-2005 ----- Setup information and notes for SlimServerMod Module: The SlimServer project integrates an AMX NetLinx control system and a wireless (or wired) 2-way touchpanel with a Squeezebox or Squeezebox2 from Slim Devices (http://www.slimdevices.com). As of the time of this release, the SlimServerMod module is compatible with the released build of SlimServer v6.0 or v6.0.1. This module is not compatible with any previous version of the SlimServer software. The following files are provided: LICENSE.txt: Open source license; you are obligated to abide by this or not use the software Main-Sample.axs: Sample (mainline) Driver Program README.txt: This file SlimServer,MVP8400.TP4: Sample MVP-8400 (TPDesign4) File SlimServer,VPN-CP.tpd: Sample VPN-CP (TPDesign3) File SlimServer.apw: NetLinx Studio (v2.x) workspace file SlimServerMod.axi: SlimServer Include file and API definition file SlimServerMod.doc: Complete documetation file on the module SlimServerMod.tko: SlimServer Module (compiled) SyslogMod.axi: Syslog Include file Notes on Syslog: All files under SourceForge project NetLinx-Modules are "syslog friendly". This means that you may choose to use syslog, or you may choose to not use syslog. By default, syslog is disabled (and only controls logging levels to the NetLinx console via 'SEND_STRING 0' commands). For SlimServerMod, SlimServerMod.axi defines variable 'llSlimServer', and controls logging levels for the module. SlimServerMod represents an open-source project. If you want source files, they are available via CVS from the SourceForge project 'NetLinx-Modules'. You are free to download the source code if you wish. If you make improvements to the code that you believe is generally useful, please submit your changes to netlinx-modules(at)taltos.com. That way, everyone can benefit from your changes. Thanks! The SlimServerMod code is regularly used by the author and several other sites. It is anticipated that it'll work with virtually any version of applicable AMX code. However, to be precise, SlimServerMod has been successfully tested with: SlimServer v6.0 and later NetLinx Master (NXC) firmware 2.31.137, v3.00.316 Modero MVP-8400 firmware 2.46.38, 2.55.43 TPDesign3 version 3.16 (Build 200) TPDesign4 version 2.3.1 (Build 353), version 2.4.0 (Build 406) --- NEW FILE: SlimServer,MVP-8400.TP4 --- (This appears to be a binary file; contents omitted.) |
|
From: Jeff C. <co...@us...> - 2005-04-07 20:45:17
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18620/SlimServer Log Message: Directory /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer added to the repository |
|
From: Jeff C. <co...@us...> - 2005-02-25 18:42:55
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32047 Modified Files: ChangeLog.txt Log Message: Enable CVS commit mailing list Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/ChangeLog.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ChangeLog.txt 22 Feb 2003 21:57:57 -0000 1.3 --- ChangeLog.txt 25 Feb 2005 18:42:43 -0000 1.4 *************** *** 1,2 **** --- 1,5 ---- + 2005-02-25 Project changes in preparation for SlimServer checkin; + Enabled netlinx-modules-commit mailing list + 2003-02-22 AudiotronMod: Add TurtleRadio support |