[brlcad-commits] SF.net SVN: brlcad:[41790] brlcad/trunk/NEWS

2010-12-22 Thread starseeker
Revision: 41790
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41790&view=rev
Author:   starseeker
Date: 2010-12-23 03:52:28 + (Thu, 23 Dec 2010)

Log Message:
---
call out the command that was removed

Modified Paths:
--
brlcad/trunk/NEWS

Modified: brlcad/trunk/NEWS
===
--- brlcad/trunk/NEWS   2010-12-23 03:47:58 UTC (rev 41789)
+++ brlcad/trunk/NEWS   2010-12-23 03:52:28 UTC (rev 41790)
@@ -13,7 +13,7 @@
 --- 2010-12-XX  Release 7.18.2 ---
 --
 
-* removed shell execution from vdeck - Cliff Yapp
+* removed shell execution ! command from vdeck - Cliff Yapp
 
 --
 --- 2010-12-07  Release 7.18.0 ---


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41789] brlcad/trunk/NEWS

2010-12-22 Thread starseeker
Revision: 41789
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41789&view=rev
Author:   starseeker
Date: 2010-12-23 03:47:58 + (Thu, 23 Dec 2010)

Log Message:
---
remove -> removed

Modified Paths:
--
brlcad/trunk/NEWS

Modified: brlcad/trunk/NEWS
===
--- brlcad/trunk/NEWS   2010-12-23 03:45:59 UTC (rev 41788)
+++ brlcad/trunk/NEWS   2010-12-23 03:47:58 UTC (rev 41789)
@@ -13,7 +13,7 @@
 --- 2010-12-XX  Release 7.18.2 ---
 --
 
-* remove shell execution from vdeck - Cliff Yapp
+* removed shell execution from vdeck - Cliff Yapp
 
 --
 --- 2010-12-07  Release 7.18.0 ---


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41788] brlcad/trunk

2010-12-22 Thread starseeker
Revision: 41788
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41788&view=rev
Author:   starseeker
Date: 2010-12-23 03:45:59 + (Thu, 23 Dec 2010)

Log Message:
---
Remove the 'execute shell command' misfeature from vdeck.

Modified Paths:
--
brlcad/trunk/NEWS
brlcad/trunk/src/vdeck/vdeck.c

Modified: brlcad/trunk/NEWS
===
--- brlcad/trunk/NEWS   2010-12-23 03:29:01 UTC (rev 41787)
+++ brlcad/trunk/NEWS   2010-12-23 03:45:59 UTC (rev 41788)
@@ -13,6 +13,7 @@
 --- 2010-12-XX  Release 7.18.2 ---
 --
 
+* remove shell execution from vdeck - Cliff Yapp
 
 --
 --- 2010-12-07  Release 7.18.0 ---

Modified: brlcad/trunk/src/vdeck/vdeck.c
===
--- brlcad/trunk/src/vdeck/vdeck.c  2010-12-23 03:29:01 UTC (rev 41787)
+++ brlcad/trunk/src/vdeck/vdeck.c  2010-12-23 03:45:59 UTC (rev 41788)
@@ -61,9 +61,6 @@
 #ifdef HAVE_SYS_TYPES_H
 #  include 
 #endif
-#ifdef HAVE_SYS_WAIT_H
-#  include 
-#endif
 #include "bio.h"
 
 #include "vmath.h"
@@ -88,7 +85,6 @@
 "remove [object[s]] Remove an object from current list.",
 "sort   Sort table of contents alphabetically.",
 "toc [object[s]]Table of contents of solids database.",
-"! [shell command]  Execute a UNIX shell command.",
 "",
 "NOTE:",
 "First letter of command is sufficient, and all arguments are optional.",
@@ -177,7 +173,6 @@
 extern int col_prt();
 extern int match();
 extern int delete();
-extern int shell();
 extern int cgarbs();
 extern int redoarb();
 
@@ -323,14 +318,6 @@
case RETURN :
prompt( PROMPT );
continue;
-   case SHELL :
-   if ( arg_list[1] == 0 )
-   {
-   prompt( "enter shell command: " );
-   (void) getcmd( arg_list, arg_ct );
-   }
-   (void) shell( arg_list );
-   break;
case SORT_TOC :
qsort( (genptr_t)toc_list, (unsigned)ndir,
   sizeof(char *), sortFunc );
@@ -1349,66 +1336,7 @@
 /* XXX should free soltab list */
 }
 
-
 /**
- * s h e l l
- *
- * Execute shell command.
- */
-int
-shell(char *args[])
-{
-char   *from, *to;
-char   *argv[4], cmdbuf[MAXLN];
-intpid, ret, status;
-inti;
-
-(void) signal( SIGINT, SIG_IGN );
-
-/* Build arg vector.   */
-argv[0] = "Shell( deck )";
-argv[1] = "-c";
-to = argv[2] = cmdbuf;
-for ( i = 1; i < arg_ct; i++ ) {
-   from = args[i];
-   if ( (to + strlen( args[i] )) - argv[2] > MAXLN - 1 ) {
-   (void) fprintf( stderr, "\ncommand line too long\n" );
-   bu_exit( 10, NULL );
-   }
-   (void) printf( "%s ", args[i] );
-   while ( *from )
-   *to++ = *from++;
-   *to++ = ' ';
-}
-to[-1] = '\0';
-(void) printf( "\n" );
-argv[3] = 0;
-if ( (pid = fork()) == -1 ) {
-   perror( "shell()" );
-   return -1;
-} else if ( pid == 0 ) {
-   /*
-* CHILD process - execs a shell command
-*/
-   (void) signal( SIGINT, SIG_DFL );
-   (void) execv( "/bin/sh", argv );
-   perror( "/bin/sh -c" );
-   bu_exit( 99, NULL );
-} else /*
-* PARENT process - waits for shell command
-* to finish.
-*/
-   do {
-   if ( (ret = wait( &status )) == -1 ) {
-   perror( "wait( /bin/sh -c )" );
-   break;
-   }
-   } while ( ret != pid );
-return 0;
-}
-
-
-/**
  * t o c
  *
  * Build a sorted list of names of all the objects accessable in the


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41787] brlcad/branches/cmake/src/vdeck/vdeck.c

2010-12-22 Thread starseeker
Revision: 41787
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41787&view=rev
Author:   starseeker
Date: 2010-12-23 03:29:01 + (Thu, 23 Dec 2010)

Log Message:
---
OK, that's not the wait functionality being assumed on Unix - what's the 
equalivent call on Windows?

Modified Paths:
--
brlcad/branches/cmake/src/vdeck/vdeck.c

Modified: brlcad/branches/cmake/src/vdeck/vdeck.c
===
--- brlcad/branches/cmake/src/vdeck/vdeck.c 2010-12-22 21:39:40 UTC (rev 
41786)
+++ brlcad/branches/cmake/src/vdeck/vdeck.c 2010-12-23 03:29:01 UTC (rev 
41787)
@@ -64,13 +64,6 @@
 #ifdef HAVE_SYS_WAIT_H
 #  include 
 #endif
-#ifdef _WIN32
-#  include 
-inline int wait(int *sec){
-Sleep(*sec * 1000);
-return 1;
-}
-#endif
 #include "bio.h"
 
 #include "vmath.h"


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41786] brlcad/branches/cmake/src/vdeck/vdeck.c

2010-12-22 Thread starseeker
Revision: 41786
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41786&view=rev
Author:   starseeker
Date: 2010-12-22 21:39:40 + (Wed, 22 Dec 2010)

Log Message:
---
Try defining wait for Windows using Sleep... will this work?

Modified Paths:
--
brlcad/branches/cmake/src/vdeck/vdeck.c

Modified: brlcad/branches/cmake/src/vdeck/vdeck.c
===
--- brlcad/branches/cmake/src/vdeck/vdeck.c 2010-12-22 20:42:57 UTC (rev 
41785)
+++ brlcad/branches/cmake/src/vdeck/vdeck.c 2010-12-22 21:39:40 UTC (rev 
41786)
@@ -64,6 +64,13 @@
 #ifdef HAVE_SYS_WAIT_H
 #  include 
 #endif
+#ifdef _WIN32
+#  include 
+inline int wait(int *sec){
+Sleep(*sec * 1000);
+return 1;
+}
+#endif
 #include "bio.h"
 
 #include "vmath.h"


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41785] brlcad/branches/cmake/src/rt/hurt.c

2010-12-22 Thread starseeker
Revision: 41785
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41785&view=rev
Author:   starseeker
Date: 2010-12-22 20:42:57 + (Wed, 22 Dec 2010)

Log Message:
---
Swap in code from the individual rt files to hurt.c - see if this fixes hurt on 
Windows, since the others build successfully.

Modified Paths:
--
brlcad/branches/cmake/src/rt/hurt.c

Modified: brlcad/branches/cmake/src/rt/hurt.c
===
--- brlcad/branches/cmake/src/rt/hurt.c 2010-12-22 20:34:02 UTC (rev 41784)
+++ brlcad/branches/cmake/src/rt/hurt.c 2010-12-22 20:42:57 UTC (rev 41785)
@@ -162,22 +162,31 @@
 
 /* Viewing module specific "set" variables */
 struct bu_structparse view_parse[] = {
-{"%d", 1, "bounces",   bu_byteoffset(max_bounces), 
BU_STRUCTPARSE_FUNC_NULL, "bounces", &max_bounces },
-{"%d", 1, "ireflect",  bu_byteoffset(max_ireflect),
BU_STRUCTPARSE_FUNC_NULL, "max ireflect", &max_ireflect },
-{"%d", 1, "a_onehit",  bu_byteoffset(a_onehit),
BU_STRUCTPARSE_FUNC_NULL, "one hit", &a_onehit },
-{"%f", ELEMENTS_PER_VECT, "background", bu_byteoffset(background[0]),  
BU_STRUCTPARSE_FUNC_NULL, "background color", &background },
-{"",   0, (char *)0,   0,  
BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }
+   {"%f", 1, "gamma", 0, BU_STRUCTPARSE_FUNC_NULL},
+   {"%d", 1, "bounces", 0, BU_STRUCTPARSE_FUNC_NULL},
+   {"%d", 1, "ireflect", 0, BU_STRUCTPARSE_FUNC_NULL},
+   {"%d", 1, "a_onehit", 0, BU_STRUCTPARSE_FUNC_NULL},
+   {"%f", ELEMENTS_PER_VECT, "background", 0, BU_STRUCTPARSE_FUNC_NULL},
+   {"%d", 1, "overlay", 0, BU_STRUCTPARSE_FUNC_NULL},
+   {"%d", 1, "ov", 0, BU_STRUCTPARSE_FUNC_NULL},
+   {"", 0, (char *)0, 0, BU_STRUCTPARSE_FUNC_NULL}
 };
 
 struct bu_structparse set_parse[] = {
-{"%d", 1, "width", bu_byteoffset(width),   
BU_STRUCTPARSE_FUNC_NULL, "width", &width },
-{"%d", 1, "height",bu_byteoffset(height),  
BU_STRUCTPARSE_FUNC_NULL, "height", &height },
-{"%f", 1, "perspective", bu_byteoffset(rt_perspective),
BU_STRUCTPARSE_FUNC_NULL, "perspective", &rt_perspective },
-{"%f", 1, "angle", bu_byteoffset(rt_perspective),  
BU_STRUCTPARSE_FUNC_NULL, "angle", &rt_perspective },
-{"%p", bu_byteoffset(view_parse[0]), "View_Module-Specific Parameters", 0, 
BU_STRUCTPARSE_FUNC_NULL, "params", NULL },
-{"",   0, (char *)0,   0,  
BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }
+   {"%d",  1, "width", bu_byteoffset(width),   
BU_STRUCTPARSE_FUNC_NULL },
+   {"%d",  1, "height",bu_byteoffset(height),  
BU_STRUCTPARSE_FUNC_NULL },
+   {"%f",  1, "perspective", bu_byteoffset(rt_perspective),
BU_STRUCTPARSE_FUNC_NULL },
+   {"%f",  1, "angle", bu_byteoffset(rt_perspective),  
BU_STRUCTPARSE_FUNC_NULL },
+#if !defined(_WIN32) || defined(__CYGWIN__)
+   {"%d",  1, "rt_bot_minpieces", bu_byteoffset(rt_bot_minpieces), 
BU_STRUCTPARSE_FUNC_NULL },
+   {"%d",  1, "rt_bot_tri_per_piece", bu_byteoffset(rt_bot_tri_per_piece), 
BU_STRUCTPARSE_FUNC_NULL },
+   {"%f",  1, "rt_cline_radius", bu_byteoffset(rt_cline_radius), 
BU_STRUCTPARSE_FUNC_NULL },
+#endif
+   {"%p", bu_byteoffset(view_parse[0]), "View_Module-Specific Parameters", 
0, BU_STRUCTPARSE_FUNC_NULL },
+   {"",0, (char *)0,   0,  
BU_STRUCTPARSE_FUNC_NULL }
 };
 
+
 /*
  * For certain hypersample values there is a particular advantage to 
subdividing
  * the pixel and shooting a ray in each sub-pixel.  This structure keeps track 
of


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41784] brlcad/branches/cmake/src/util/CMakeLists.txt

2010-12-22 Thread starseeker
Revision: 41784
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41784&view=rev
Author:   starseeker
Date: 2010-12-22 20:34:02 + (Wed, 22 Dec 2010)

Log Message:
---
Wrap the dunn stuff in WIN32 conditionals - these will not be fixed, and will 
be going away.

Modified Paths:
--
brlcad/branches/cmake/src/util/CMakeLists.txt

Modified: brlcad/branches/cmake/src/util/CMakeLists.txt
===
--- brlcad/branches/cmake/src/util/CMakeLists.txt   2010-12-22 20:31:25 UTC 
(rev 41783)
+++ brlcad/branches/cmake/src/util/CMakeLists.txt   2010-12-22 20:34:02 UTC 
(rev 41784)
@@ -61,8 +61,11 @@
 BRLCAD_ADDEXEC(double-asc double-asc.c "libfb libbu")
 BRLCAD_ADDEXEC(dpix-pix dpix-pix.c libbu)
 BRLCAD_ADDEXEC(dsp_add dsp_add.c libbu)
-BRLCAD_ADDEXEC(dunncolor "dunncolor.c dunncomm.c" libbu)
-BRLCAD_ADDEXEC(dunnsnap "dunnsnap.c dunncomm.c" "libfb libbu")
+# Not fixing these for Windows - they're on their way out (deprecated)
+IF(NOT WIN32)
+   BRLCAD_ADDEXEC(dunncolor "dunncolor.c dunncomm.c" libbu)
+   BRLCAD_ADDEXEC(dunnsnap "dunnsnap.c dunncomm.c" "libfb libbu")
+ENDIF(NOT WIN32)
 BRLCAD_ADDEXEC(fix_polysolids fix_polysolids.c "librt libbu")
 BRLCAD_ADDEXEC(gencolor gencolor.c libbu)
 BRLCAD_ADDEXEC(hex hex.c libbu)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41783] brlcad/branches/cmake/bench/CMakeLists.txt

2010-12-22 Thread starseeker
Revision: 41783
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41783&view=rev
Author:   starseeker
Date: 2010-12-22 20:31:25 + (Wed, 22 Dec 2010)

Log Message:
---
Try adding a few MSVC definitions (this is not under the src umbrella)

Modified Paths:
--
brlcad/branches/cmake/bench/CMakeLists.txt

Modified: brlcad/branches/cmake/bench/CMakeLists.txt
===
--- brlcad/branches/cmake/bench/CMakeLists.txt  2010-12-22 20:27:34 UTC (rev 
41782)
+++ brlcad/branches/cmake/bench/CMakeLists.txt  2010-12-22 20:31:25 UTC (rev 
41783)
@@ -9,6 +9,13 @@
   -DBRLCADBUILD
 )
 
+IF(MSVC)
+   add_definitions(
+   -DCONSOLE
+   -DBRLCAD_DLL
+   )
+ENDIF(MSVC)
+
 BRLCAD_ADDEXEC(pixcmp pixcmp.c libbu)
 
 configure_file(run.sh ${CMAKE_BINARY_DIR}/bin/benchmark COPYONLY)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41782] brlcad/trunk/src/tclscripts/lib/TkTable.tcl

2010-12-22 Thread bob1961
Revision: 41782
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41782&view=rev
Author:   bob1961
Date: 2010-12-22 20:27:34 + (Wed, 22 Dec 2010)

Log Message:
---
Annotate the selected row by changing the background color of corresponding 
cell in the title column.

Modified Paths:
--
brlcad/trunk/src/tclscripts/lib/TkTable.tcl

Modified: brlcad/trunk/src/tclscripts/lib/TkTable.tcl
===
--- brlcad/trunk/src/tclscripts/lib/TkTable.tcl 2010-12-22 20:05:53 UTC (rev 
41781)
+++ brlcad/trunk/src/tclscripts/lib/TkTable.tcl 2010-12-22 20:27:34 UTC (rev 
41782)
@@ -38,6 +38,7 @@
method setDataEntry {_index _val}
method setTableCol {_col _val}
method setTableVal {_index _val}
+   method updateTitleCol {}
method width {args}
 }
 
@@ -164,12 +165,13 @@
 bind $itk_component(table)  "[::itcl::code $this handleUpDown %W 
%K]; break"
 
 set bg [$itk_component(table) tag cget title -background]
-$itk_component(table) tag col select_col 0
+#$itk_component(table) tag col select_col 0
 $itk_component(table) tag configure select_col \
-   -background $bg \
-   -relief raised
+   -background \#ff
+$itk_component(table) tag col title 0
 $itk_component(table) tag configure title \
-relief raised
+$itk_component(table) tag raise select_col
 
 eval itk_initialize $args
 set mNumRows [$itk_component(table) cget -rows]
@@ -192,6 +194,14 @@
 while {[info exists $mTableDataVar\($row,$_col\)]} {
set $mTableDataVar\($row,$_col\) $_val
 
+   if {$_col == 0} {
+   if {$_val == "*"} {
+   $itk_component(table) tag cell select_col $row,$_col
+   } else {
+   $itk_component(table) tag cell {} $row,$_col
+   }
+   }
+
incr row
 }
 
@@ -209,6 +219,24 @@
 }
 
 
+::itcl::body cadwidgets::TkTable::updateTitleCol {} {
+set row 1
+while {[info exists $mTableDataVar\($row,0\)]} {
+   if {[set [subst $mTableDataVar\($row,0\)]] == "*"} {
+   $itk_component(table) tag cell select_col $row,0
+   } else {
+   $itk_component(table) tag cell {} $row,0
+   }
+
+   incr row
+}
+
+# Do the rest of the rows. Note - these have NO data
+for {} {$row < $mNumRows} {incr row} {
+   $itk_component(table) tag cell {} $row,0
+}
+}
+
 ::itcl::body cadwidgets::TkTable::width {args} {
 eval $itk_component(table) width $args
 }
@@ -224,16 +252,23 @@
 ::itcl::body cadwidgets::TkTable::handleKey {_win _key} {
 set index [$_win index active]
 set ilist [split $index ,]
+set row [lindex $ilist 0]
 set col [lindex $ilist 1]
 
-if {$col != 0 && $_key != "Down" && $_key != "Up" && !$mInsertMode} {
+if {$row == 0} {
set mDoBreak 1
+   return
+}
+
+# Don't need to check for Left/Right/Down/Up
+# (i.e. these get swallowed up by more specific bindings).
+if {$col != 0 && !$mInsertMode} {
+   set mDoBreak 1
setInsertMode 1
 
# Overwrite what's in the cell
if {[keyVisible $_key]} {
if {$itk_option(-validatecommand) != ""} {
-   set row [lindex $ilist 0]
if {[catch {$itk_option(-validatecommand) $row $col $_key 
$itk_option(-vclientdata)} isvalid]} {
set isvalid 0
}
@@ -258,8 +293,10 @@
 
if {[set [subst $mTableDataVar\($index\)]] == "*"} {
setTableVal $index ""
+   $itk_component(table) tag cell {} $index
} else {
setTableVal $index "*"
+   $itk_component(table) tag cell select_col $index
}
} else {
set mDoBreak 0
@@ -273,6 +310,10 @@
 set row [lindex $ilist 0]
 set col [lindex $ilist 1]
 
+if {$row == 0} {
+   return
+}
+
 # This is a <> or 
 if {$_sflag} {
incr col -1
@@ -324,6 +365,10 @@
 set row [lindex $ilist 0]
 set col [lindex $ilist 1]
 
+if {$row == 0} {
+   return
+}
+
 if {$_key == "Up"} {
incr row -1
if {$row < 1} {
@@ -391,7 +436,7 @@
return
 }
 
-set mDoBreak 1
+set mDoBreak 0
 if {![info exists $mTableDataVar\($row,$col\)]} {
return
 }
@@ -403,10 +448,13 @@
# Using "set" instead.
if {[set [subst $mTableDataVar\($index\)]] == "*"} {
setTableVal $index ""
+   $itk_component(table) tag cell {} $index
} else {
setTableVal $index "*"
+   $itk_component(table) tag cell select_col $index
}
 } else {
+   set mDoBreak 1
if {$mToggleSelectMode} {
set mToggleSelectMode 0
setTableCol 0 ""


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

---

[brlcad-commits] SF.net SVN: brlcad:[41781] brlcad/branches/cmake/src/proc-db/csgbrep.cpp

2010-12-22 Thread starseeker
Revision: 41781
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41781&view=rev
Author:   starseeker
Date: 2010-12-22 20:05:53 + (Wed, 22 Dec 2010)

Log Message:
---
Need the functab before calling it.  This seems to restore things to the state 
they were in before (broken, but trying to do the correct operations.)

Modified Paths:
--
brlcad/branches/cmake/src/proc-db/csgbrep.cpp

Modified: brlcad/branches/cmake/src/proc-db/csgbrep.cpp
===
--- brlcad/branches/cmake/src/proc-db/csgbrep.cpp   2010-12-22 19:52:47 UTC 
(rev 41780)
+++ brlcad/branches/cmake/src/proc-db/csgbrep.cpp   2010-12-22 20:05:53 UTC 
(rev 41781)
@@ -91,6 +91,7 @@
VMOVE( arb4->pt[i], ptarb4[i] );
 }
 tmp_internal->idb_ptr = (genptr_t)arb4;
+tmp_internal->idb_meth = &rt_functab[ID_ARB8];
 tmp_internal->idb_meth->ft_brep(&arb4brep, tmp_internal, tol);
 const char* arb4_name = "arb4_nurb.s";
 mk_brep(outfp, arb4_name, arb4brep);
@@ -114,6 +115,7 @@
VMOVE( arb5->pt[i], ptarb5[i] );
 }
 tmp_internal->idb_ptr = (genptr_t)arb5;
+tmp_internal->idb_meth = &rt_functab[ID_ARB8];
 tmp_internal->idb_meth->ft_brep(&arb5brep, tmp_internal, tol);
 const char* arb5_name = "arb5_nurb.s";
 mk_brep(outfp, arb5_name, arb5brep);
@@ -137,6 +139,7 @@
VMOVE( arb6->pt[i], ptarb6[i] );
 }
 tmp_internal->idb_ptr = (genptr_t)arb6;
+tmp_internal->idb_meth = &rt_functab[ID_ARB8];
 tmp_internal->idb_meth->ft_brep(&arb6brep, tmp_internal, tol);
 const char* arb6_name = "arb6_nurb.s";
 mk_brep(outfp, arb6_name, arb6brep);
@@ -160,6 +163,7 @@
VMOVE( arb7->pt[i], ptarb7[i] );
 }
 tmp_internal->idb_ptr = (genptr_t)arb7;
+tmp_internal->idb_meth = &rt_functab[ID_ARB8];
 tmp_internal->idb_meth->ft_brep(&arb7brep, tmp_internal, tol);
 const char* arb7_name = "arb7_nurb.s";
 mk_brep(outfp, arb7_name, arb7brep);
@@ -183,6 +187,7 @@
VMOVE( arb8->pt[i], pt8[i] );
 }
 tmp_internal->idb_ptr = (genptr_t)arb8;
+tmp_internal->idb_meth = &rt_functab[ID_ARB8];
 tmp_internal->idb_meth->ft_brep(&arb8brep, tmp_internal, tol);
 const char* arb8_name = "arb8_nurb.s";
 mk_brep(outfp, arb8_name, arb8brep);
@@ -216,6 +221,8 @@
 arbn->eqn[6][3] = 1000;
 VSET(arbn->eqn[7], -0.57735, -0.57735, -0.57735);
 arbn->eqn[7][3] = 1000;
+tmp_internal->idb_ptr = (genptr_t)arbn;
+tmp_internal->idb_meth = &rt_functab[ID_ARBN];
 tmp_internal->idb_meth->ft_brep(&arbnbrep, &arbninternal, tol);
 const char* arbn_name = "arbn_nurb.s";
 mk_brep(outfp, arbn_name, arbnbrep);
@@ -250,8 +257,11 @@
 // Now, need nmg form of the arb
 struct model *m = nmg_mm();
 struct nmgregion *r;
+tmp_internal->idb_ptr = (genptr_t)arbnmg8;
+tmp_internal->idb_meth = &rt_functab[ID_ARB8];
 tmp_internal->idb_meth->ft_tessellate(&r, m, tmp_internal, ttol, tol);
 tmp_internal->idb_ptr = (genptr_t)m;
+tmp_internal->idb_meth = &rt_functab[ID_ARBN];
 tmp_internal->idb_meth->ft_brep(&nmgbrep, tmp_internal, tol);
 const char* nmg_name = "nmg_nurb.s";
 mk_brep(outfp, nmg_name, nmgbrep);
@@ -273,6 +283,7 @@
 VMOVE(sph->b, b);
 VMOVE(sph->c, c);
 tmp_internal->idb_ptr = (genptr_t)sph;
+tmp_internal->idb_meth = &rt_functab[ID_SPH];
 tmp_internal->idb_meth->ft_brep(&sphbrep, tmp_internal, tol);
 const char* sph_name = "sph_nurb.s";
 mk_brep(outfp, sph_name, sphbrep);
@@ -292,6 +303,7 @@
 VMOVE(ell->b, b);
 VMOVE(ell->c, c);
 tmp_internal->idb_ptr = (genptr_t)ell;
+tmp_internal->idb_meth = &rt_functab[ID_ELL];
 tmp_internal->idb_meth->ft_brep(&ellbrep, tmp_internal, tol);
 const char* ell_name = "ell_nurb.s";
 mk_brep(outfp, ell_name, ellbrep);
@@ -308,6 +320,7 @@
 rhc->rhc_r = 1000;
 rhc->rhc_c = 400;
 tmp_internal->idb_ptr = (genptr_t)rhc;
+tmp_internal->idb_meth = &rt_functab[ID_RHC];
 tmp_internal->idb_meth->ft_brep(&rhcbrep, tmp_internal, tol);
 const char* rhc_name = "rhc_nurb.s";
 mk_brep(outfp, rhc_name, rhcbrep);
@@ -325,6 +338,7 @@
 VSCALE(rpc->rpc_B, rpc->rpc_B, 2000);
 rpc->rpc_r = 1000;
 tmp_internal->idb_ptr = (genptr_t)rpc;
+tmp_internal->idb_meth = &rt_functab[ID_RPC];
 tmp_internal->idb_meth->ft_brep(&rpcbrep, tmp_internal, tol);
 const char* rpc_name = "rpc_nurb.s";
 mk_brep(outfp, rpc_name, rpcbrep);
@@ -341,6 +355,7 @@
 epa->epa_r1 = 1000;
 epa->epa_r2 = 500;
 tmp_internal->idb_ptr = (genptr_t)epa;
+tmp_internal->idb_meth = &rt_functab[ID_EPA];
 tmp_internal->idb_meth->ft_brep(&epabrep, tmp_internal, tol);
 const char* epa_name = "epa_nurb.s";
 mk_brep(outfp, epa_name, epabrep);
@@ -358,6 +373,7 @@
 ehy->ehy_r2 = 500;
 ehy->ehy_c = 400;
 tmp_internal->idb_ptr = (genptr_t)ehy;
+tmp_internal->idb_meth = &rt_functab[ID_EHY];
 tmp_internal

[brlcad-commits] SF.net SVN: brlcad:[41780] brlcad/branches/cmake

2010-12-22 Thread starseeker
Revision: 41780
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41780&view=rev
Author:   starseeker
Date: 2010-12-22 19:52:47 + (Wed, 22 Dec 2010)

Log Message:
---
Make a stab at doing rt_*_brep functions the 'right way' through the functab.

Modified Paths:
--
brlcad/branches/cmake/include/raytrace.h
brlcad/branches/cmake/src/librt/primitives/arb8/arb8_brep.cpp
brlcad/branches/cmake/src/librt/primitives/table.c
brlcad/branches/cmake/src/librt/primitives/tor/tor_brep.cpp
brlcad/branches/cmake/src/proc-db/csgbrep.cpp

Modified: brlcad/branches/cmake/include/raytrace.h
===
--- brlcad/branches/cmake/include/raytrace.h2010-12-22 18:35:39 UTC (rev 
41779)
+++ brlcad/branches/cmake/include/raytrace.h2010-12-22 19:52:47 UTC (rev 
41780)
@@ -1999,6 +1999,9 @@
 struct model * /*m*/,
 struct rt_db_internal * /*ip*/,
 const struct bn_tol * /*tol*/));
+void (*ft_brep) BU_ARGS((ON_Brep ** /*b*/,
+   struct rt_db_internal * /*ip*/,
+   const struct bn_tol * /*tol*/));
 int (*ft_import5) BU_ARGS((struct rt_db_internal * /*ip*/,
   const struct bu_external * /*ep*/,
   const mat_t /*mat*/,

Modified: brlcad/branches/cmake/src/librt/primitives/arb8/arb8_brep.cpp
===
--- brlcad/branches/cmake/src/librt/primitives/arb8/arb8_brep.cpp   
2010-12-22 18:35:39 UTC (rev 41779)
+++ brlcad/branches/cmake/src/librt/primitives/arb8/arb8_brep.cpp   
2010-12-22 19:52:47 UTC (rev 41780)
@@ -40,7 +40,7 @@
  * R T _ A R B 8 _ B R E P
  */
 extern "C" void
-rt_arb8_brep(ON_Brep **b, const struct rt_db_internal *ip, const struct bn_tol 
*tol)
+rt_arb_brep(ON_Brep **b, const struct rt_db_internal *ip, const struct bn_tol 
*tol)
 {
 struct rt_db_internal *tmp_internal = (struct rt_db_internal *) 
bu_malloc(sizeof(struct rt_db_internal), "allocate structure");
 RT_INIT_DB_INTERNAL(tmp_internal);

Modified: brlcad/branches/cmake/src/librt/primitives/table.c
===
--- brlcad/branches/cmake/src/librt/primitives/table.c  2010-12-22 18:35:39 UTC 
(rev 41779)
+++ brlcad/branches/cmake/src/librt/primitives/table.c  2010-12-22 19:52:47 UTC 
(rev 41780)
@@ -56,6 +56,7 @@
BU_EXTERN(void rt_##name##_vshot, (struct soltab *stp[], struct xray 
*rp[], struct seg *segp, int n, struct application *ap)); \
BU_EXTERN(int rt_##name##_tess, (struct nmgregion **r, struct model *m, 
struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol 
*tol)); \
BU_EXTERN(int rt_##name##_tnurb, (struct nmgregion **r, struct model 
*m, struct rt_db_internal *ip, const struct bn_tol *tol)); \
+   BU_EXTERN(void rt_##name##_brep, (ON_Brep **b, struct rt_db_internal 
*ip, const struct bn_tol *tol)); \
BU_EXTERN(int rt_##name##_import5, (struct rt_db_internal *ip, const 
struct bu_external *ep, const mat_t mat, const struct db_i *dbip, struct 
resource *resp)); \
BU_EXTERN(int rt_##name##_export5, (struct bu_external *ep, const 
struct rt_db_internal *ip, double local2mm, const struct db_i *dbip, struct 
resource *resp)); \
BU_EXTERN(int rt_##name##_import4, (struct rt_db_internal *ip, const 
struct bu_external *ep, const mat_t mat, const struct db_i *dbip, struct 
resource *resp)); \
@@ -172,6 +173,7 @@
NULL,
NULL,
NULL,
+   NULL,
0,
0,
NULL,
@@ -199,6 +201,7 @@
rt_tor_vshot,
rt_tor_tess,
NULL,
+   rt_tor_brep,
rt_tor_import5,
rt_tor_export5,
rt_tor_import4,
@@ -234,6 +237,7 @@
rt_tgc_vshot,
rt_tgc_tess,
rt_tgc_tnurb,
+   rt_tgc_brep,
rt_tgc_import5,
rt_tgc_export5,
rt_tgc_import4,
@@ -269,6 +273,7 @@
rt_ell_vshot,
rt_ell_tess,
rt_ell_tnurb,
+   rt_ell_brep,
rt_ell_import5,
rt_ell_export5,
rt_ell_import4,
@@ -304,6 +309,7 @@
rt_arb_vshot,
rt_arb_tess,
rt_arb_tnurb,
+   rt_arb_brep,
rt_arb_import5,
rt_arb_export5,
rt_arb_import4,
@@ -339,6 +345,7 @@
NULL,
rt_ars_tess,
NULL,
+   NULL,
rt_ars_import5,
rt_ars_export5,
rt_ars_import4,
@@ -374,6 +381,7 @@
rt_hlf_vshot,
rt_hlf_tess,
NULL,
+   NULL,
rt_hlf_import5,
rt_hlf_export5,
rt_hlf_import4,
@@ -409,6 +417,7 @@
rt_rec_vshot,
rt_tgc_tess,
NULL,
+   rt_tgc_brep,
rt_tgc_import5,
rt_tgc_export5,
rt_tgc_import4,
@@ -446,6 +455,7 @@
NULL,
NULL,
NULL,
+   NULL,
rt_pg_i

[brlcad-commits] SF.net SVN: brlcad:[41778] brlcad/trunk/src/mged/mged.c

2010-12-22 Thread indianlarry
Revision: 41778
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41778&view=rev
Author:   indianlarry
Date: 2010-12-22 17:18:04 + (Wed, 22 Dec 2010)

Log Message:
---
Valgrind squelch - valgrind reporting read error on the dm_list member dml_dmp 
from function doEvent(). The problem is that the display manager pointer 
'dml_dmp' was being free'd from DM_CLOSE() but the parent list element(struct 
dm_list) was not being dequeued or removed in mged_finish() and would turn up 
in the event loop after being free'd 

Modified Paths:
--
brlcad/trunk/src/mged/mged.c

Modified: brlcad/trunk/src/mged/mged.c
===
--- brlcad/trunk/src/mged/mged.c2010-12-22 15:40:34 UTC (rev 41777)
+++ brlcad/trunk/src/mged/mged.c2010-12-22 17:18:04 UTC (rev 41778)
@@ -2518,12 +2518,17 @@
 log_event("CEASE", place);
 
 /* Release all displays */
-FOR_ALL_DISPLAYS(p, &head_dm_list.l) {
-   curr_dm_list = p;
+struct dm_list *dml;
+while (BU_LIST_WHILE(p, dm_list, &(head_dm_list.l))) {
+   BU_LIST_DEQUEUE(&(p->l));
+   if (p && p->dml_dmp) {
+   DM_CLOSE(p->dml_dmp);
+   }
 
-   if (curr_dm_list && dmp) {
-   DM_CLOSE(dmp);
-   }
+   RT_FREE_VLIST(&p->dml_p_vlist);
+   mged_slider_free_vls(p);
+   bu_free((genptr_t) p, "release: curr_dm_list");
+   curr_dm_list = DM_LIST_NULL;
 }
 
 for (BU_LIST_FOR (c, cmd_list, &head_cmd_list.l)) {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41777] rt^3/trunk/src/libNet/NetMsgFactory.cxx

2010-12-22 Thread davidloman
Revision: 41777
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41777&view=rev
Author:   davidloman
Date: 2010-12-22 15:40:34 + (Wed, 22 Dec 2010)

Log Message:
---
Plug another small memory leak surrounding the allocation (and lack of 
free-ing) of QDataStream objects in NetMsgFactory.  Use local variable instead.

Modified Paths:
--
rt^3/trunk/src/libNet/NetMsgFactory.cxx

Modified: rt^3/trunk/src/libNet/NetMsgFactory.cxx
===
--- rt^3/trunk/src/libNet/NetMsgFactory.cxx 2010-12-22 15:37:05 UTC (rev 
41776)
+++ rt^3/trunk/src/libNet/NetMsgFactory.cxx 2010-12-22 15:40:34 UTC (rev 
41777)
@@ -70,69 +70,69 @@
   s.append(") from node: '" + origin->getRemoteNodeName() + "'");
   Logger::getInstance()->logDEBUG("NetMsgFactory", s);
 */
-  QDataStream* qds = new QDataStream(data);
+  QDataStream qds(data);
 
   /* TODO Replace this with a map for registration scheme */
   switch (msgType)
 {
   case TEST_GENERIC_4BYTE_MSG:
-return new GenericFourBytesMsg(qds, origin);
+return new GenericFourBytesMsg(&qds, origin);
 
   case TEST_GENERIC_2BYTE_MSG:
-return new GenericTwoBytesMsg(qds, origin);
+return new GenericTwoBytesMsg(&qds, origin);
 
   case TEST_GENERIC_1BYTE_MSG:
-return new GenericOneByteMsg(qds, origin);
+return new GenericOneByteMsg(&qds, origin);
 
   case TEST_GENERIC_MULTIBYTE_MSG:
-return new GenericMultiByteMsg(qds, origin);
+return new GenericMultiByteMsg(&qds, origin);
 
   case TEST_GENERIC_1STRING_MSG:
-return new GenericOneStringMsg(qds, origin);
+return new GenericOneStringMsg(&qds, origin);
 
   case RUALIVE:
-return new TypeOnlyMsg(qds, origin);
+return new TypeOnlyMsg(&qds, origin);
   case IMALIVE:
-return new TypeOnlyMsg(qds, origin);
+return new TypeOnlyMsg(&qds, origin);
 
   case FAILURE:
-return new GenericOneByteMsg(qds, origin);
+return new GenericOneByteMsg(&qds, origin);
   case SUCCESS:
-return new GenericOneByteMsg(qds, origin);
+return new GenericOneByteMsg(&qds, origin);
   case GS_REMOTE_NODENAME_SET:
-return new GenericOneStringMsg(qds, origin);
+return new GenericOneStringMsg(&qds, origin);
 
   case DISCONNECTREQ:
-return new TypeOnlyMsg(qds, origin);
+return new TypeOnlyMsg(&qds, origin);
 
   case NEWNODEONNET:
-return new GenericOneStringMsg(qds, origin);
+return new GenericOneStringMsg(&qds, origin);
 /* case FULL_NODE_LISTREQ: */
-/* return new NetMsg(qds, origin); */
+/* return new NetMsg(&qds, origin); */
 /* case FULL_NODE_LIST: */
-/* return new NetMsg(qds, origin); */
+/* return new NetMsg(&qds, origin); */
 
   case NEWSESSIONREQ:
-return new NewSessionReqMsg(qds, origin);
+return new NewSessionReqMsg(&qds, origin);
   case SESSIONINFO:
-return new SessionInfoMsg(qds, origin);
+return new SessionInfoMsg(&qds, origin);
 
   case GEOMETRYREQ:
-return new GeometryReqMsg(qds, origin);
+return new GeometryReqMsg(&qds, origin);
   case GEOMETRYMANIFEST:
-return new GeometryManifestMsg(qds, origin);
+return new GeometryManifestMsg(&qds, origin);
   case GEOMETRYCHUNK:
-return new GeometryChunkMsg(qds, origin);
+return new GeometryChunkMsg(&qds, origin);
 
   case PING:
-return new PingMsg(qds, origin);
+return new PingMsg(&qds, origin);
   case PONG:
-return new PongMsg(qds, origin);
+return new PongMsg(&qds, origin);
 
 
 /* Admin commands */
   case CMD_SHUTDOWN:
-return new TypeOnlyMsg(qds, origin);
+return new TypeOnlyMsg(&qds, origin);
 
 
   default:


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41776]

2010-12-22 Thread davidloman
Revision: 41776
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41776&view=rev
Author:   davidloman
Date: 2010-12-22 15:37:05 + (Wed, 22 Dec 2010)

Log Message:
---
Comment out a handful of debug log points.

Modified Paths:
--
rt^3/trunk/src/GS/SessionManager.cxx
rt^3/trunk/src/libNet/NetMsgFactory.cxx
rt^3/trunk/src/libNet/NetMsgRouter.cxx
rt^3/trunk/src/libNet/Portal.cxx
rt^3/trunk/src/libNet/PortalManager.cxx

Modified: rt^3/trunk/src/GS/SessionManager.cxx
===
--- rt^3/trunk/src/GS/SessionManager.cxx2010-12-22 15:21:24 UTC (rev 
41775)
+++ rt^3/trunk/src/GS/SessionManager.cxx2010-12-22 15:37:05 UTC (rev 
41776)
@@ -142,7 +142,7 @@
  */
 void SessionManager::handleNewSessionReqMsg(NewSessionReqMsg* msg)
 {
-   log->logINFO("SessionManager", "Recv'ed NewSessionReqMsg.");
+/* log->logINFO("SessionManager", "Recv'ed NewSessionReqMsg."); */
 
/* Check for a good pointer to msg */
if (msg == NULL) {
@@ -192,7 +192,7 @@
 void
 SessionManager::handleDisconnectReqMsg(TypeOnlyMsg* msg)
 {
-   log->logINFO("SessionManager", "Recv'ed DisconnectReqMsg.");
+/* log->logINFO("SessionManager", "Recv'ed DisconnectReqMsg."); */
Portal* origin = msg->getOrigin();
 
/* validate incoming data */
@@ -212,10 +212,12 @@
delete a;
 }
 
-// Local Variables: ***
-// mode: C++ ***
-// tab-width: 8 ***
-// c-basic-offset: 2 ***
-// indent-tabs-mode: t ***
-// End: ***
-// ex: shiftwidth=2 tabstop=8
+/*
+ * Local Variables: ***
+ * mode: C++ ***
+ * tab-width: 8 ***
+ * c-basic-offset: 2 ***
+ * indent-tabs-mode: t ***
+ * End: ***
+ * ex: shiftwidth=2 tabstop=8
+*/

Modified: rt^3/trunk/src/libNet/NetMsgFactory.cxx
===
--- rt^3/trunk/src/libNet/NetMsgFactory.cxx 2010-12-22 15:21:24 UTC (rev 
41775)
+++ rt^3/trunk/src/libNet/NetMsgFactory.cxx 2010-12-22 15:37:05 UTC (rev 
41776)
@@ -63,25 +63,13 @@
   QDataStream temp(data);
   quint16 msgType = 0;
   temp >> msgType;
-
+/*
   QString s("Got msg. type: 0x");
   s.append(QString::number(msgType,16).toUpper());
-  s.append(" len: ");
-  s.append(QString::number(data.size()));
+  s.append(" (len: " + QString::number(data.size()));
+  s.append(") from node: '" + origin->getRemoteNodeName() + "'");
   Logger::getInstance()->logDEBUG("NetMsgFactory", s);
-/*
-  QString dstr("Bytes: ");
-
-  data.data();
-
-  for (int i = 0; i < data.size(); ++i) {
- quint8 b = data.data()[i];
- dstr.append(QString::number(b));
- dstr.append(", ");
-  }
-  Logger::getInstance()->logDEBUG("NetMsgFactory", dstr);
 */
-
   QDataStream* qds = new QDataStream(data);
 
   /* TODO Replace this with a map for registration scheme */

Modified: rt^3/trunk/src/libNet/NetMsgRouter.cxx
===
--- rt^3/trunk/src/libNet/NetMsgRouter.cxx  2010-12-22 15:21:24 UTC (rev 
41775)
+++ rt^3/trunk/src/libNet/NetMsgRouter.cxx  2010-12-22 15:37:05 UTC (rev 
41776)
@@ -59,6 +59,8 @@
/* First get the appropriate list: */
QList* list = 
this->getListOfHandlers(msg->getMsgType());
 
+   QString s;
+/*
QString s("Got a message whos origin is Portal: ");
Portal* origin = msg->getOrigin();
if (origin != 0) {
@@ -69,11 +71,10 @@
s.append(" and type: ");
s.append(QString::number(msg->getMsgType(),16).toUpper());
Logger::getInstance()->logINFO("NetMsgRouter", s);
+*/
 
if (list->length() == 0) {
-   /* If no routing table, send back an error */
-/* FailureMsg failMsg(UNHANDLED_MSG_TYPE);*/
-/* origin->send(&failMsg);*/
+   /* If no routing table, print an error */
s.clear();
s.append("Msg type: ");
s.append(QString::number(msg->getMsgType(),16).toUpper());

Modified: rt^3/trunk/src/libNet/Portal.cxx
===
--- rt^3/trunk/src/libNet/Portal.cxx2010-12-22 15:21:24 UTC (rev 41775)
+++ rt^3/trunk/src/libNet/Portal.cxx2010-12-22 15:37:05 UTC (rev 41776)
@@ -50,13 +50,13 @@
 int
 Portal::send(NetMsg* msg) {
QByteArray* ba = msg->serialize();
-
+/*
QString s("Sending msg.  Type: 0x");
s.append(QString::number(msg->getMsgType(),16).toUpper());
s.append(" len: ");
s.append(QString::number(ba->size()));
log->logDEBUG("Portal", s);
-
+*/
int retval = this->pkgClient->send(PKG_MAGIC2, ba->data(), ba->size());
 
delete ba;
@@ -148,13 +148,17 @@
this->remoteNodeName = t->getRemoteNodename();
this->handshakeComplete = true;
 
+   /*
QString s("Recv-ed a RemoteNodename: ");
s.append(this->remote

[brlcad-commits] SF.net SVN: brlcad:[41775]

2010-12-22 Thread davidloman
Revision: 41775
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41775&view=rev
Author:   davidloman
Date: 2010-12-22 15:21:24 + (Wed, 22 Dec 2010)

Log Message:
---
Clean up boot logic for both server and client.  Mandate the presence of a 
.config file (for now)

Modified Paths:
--
rt^3/trunk/src/GS/geoclient.cxx
rt^3/trunk/src/GS/geoserv.cxx

Modified: rt^3/trunk/src/GS/geoclient.cxx
===
--- rt^3/trunk/src/GS/geoclient.cxx 2010-12-22 15:20:39 UTC (rev 41774)
+++ rt^3/trunk/src/GS/geoclient.cxx 2010-12-22 15:21:24 UTC (rev 41775)
@@ -24,11 +24,51 @@
  */
 
 #include "GSClient.h"
+#include "libutility.h"
+#include 
+#include 
 
+int gsExit(int code)
+{
+   Logger* log = Logger::getInstance();
+log->logBANNER("geoclient", "GSClient is Shutting Down...");
+
+   JobManager::getInstance()->shutdown(true);
+
+   log->logINFO("geoclient", "Exiting.");
+   usleep(1000); /* Yeild main thread, let other threads finish unlocking 
*/
+   exit(code);
+}
+
 int
 main(int argc, char* argv[])
 {
-   GSClient gsClient("TestingLocalNodeName");
+   std::cout << std::endl << std::endl;
+
+   Logger::getInstance();
+   JobManager::getInstance()->startup();
+
+   Logger* log = Logger::getInstance();
+   log->logBANNER("geoclient", "GSClient Config Loader");
+
+   Config* c = Config::getInstance();
+
+   /* Load configs from File */
+   bool goodLoad = c->loadFile("geoclient.config", true);
+
+   if ( ! goodLoad) {
+   log->logERROR("geoclient","Failed to properly Load config File. 
 Exiting.");
+   gsExit(1);
+   }
+
+   /* Check for a local node name.  This is imperative to be set. */
+   QString localNodeName = c->getConfigValue("LocalNodeName");
+   if (localNodeName.length() == 0) {
+   log->logERROR("geoclient", "Config File does not contain a 
'LocalNodeName' parameter");
+   gsExit(1);
+   }
+
+   GSClient gsClient(localNodeName);
 return gsClient.run();
 }
 

Modified: rt^3/trunk/src/GS/geoserv.cxx
===
--- rt^3/trunk/src/GS/geoserv.cxx   2010-12-22 15:20:39 UTC (rev 41774)
+++ rt^3/trunk/src/GS/geoserv.cxx   2010-12-22 15:21:24 UTC (rev 41775)
@@ -58,41 +58,44 @@
 
 Config* c = Config::getInstance();
 
-//TODO Configure system loads stuff here, could be prettier
-if (c->loadFile("geoserv.config", true) == false) {
+/* Load configs from File */
+bool goodLoad = c->loadFile("geoserv.config", true);
+
+if ( ! goodLoad) {
log->logERROR("geoserv","Failed to properly Load config File.  
Exiting.");
gsExit(1);
 }
 
-QString localNodename = c->getConfigValue("LocalNodeName");
-if (localNodename == "") {
-   localNodename = "DefaultGSNodename";
-}
+/* Check for a local node name.  This is imperative to be set. */
+QString localNodeName = c->getConfigValue("LocalNodeName");
+if (localNodeName.length() == 0) {
+   log->logERROR("geoserv", "Config File does not contain a 
'LocalNodeName' parameter");
+   gsExit(1);
+   }
 
-log->logBANNER("geoserv", "Booting GeometryService: " + localNodename);
+log->logBANNER("geoserv", "Booting GeometryService: " + localNodeName);
 
-QString sport = c->getConfigValue("ListenPort");
-if (sport == NULL){
+QString sPort = c->getConfigValue("ListenPort");
+if (sPort == NULL){
log->logERROR("geoserv", "Config File does not contain a 'ListenPort' 
parameter");
gsExit(1);
 }
-if (sport.length() <= 0){
+if (sPort.length() <= 0){
log->logERROR("geoserv", "Config File contains a 'ListenPort' key, 
however the value length was <= 0.");
gsExit(1);
 }
 
 bool ok;
-quint16 port = sport.toUShort(&ok, 10);
+quint16 port = sPort.toUShort(&ok, 10);
 if (!ok){
log->logERROR("geoserv", "Config File contains a 'ListenPort' key, 
however the value failed to parse to a valid number.");
return 1;
 }
 
-bool daemon = false;
 
-GeometryService* gs = new GeometryService(localNodename, port);
+GeometryService gs (localNodeName, port);
 
-//DataManager elements.
+/* DataManager elements. */
 QString useFileRepo = c->getConfigValue("UseFileRepo").toLower();
  if (useFileRepo == "yes" || useFileRepo == "true"){
QString fileRepoPath = c->getConfigValue("FileRepoPath").toLower();
@@ -104,16 +107,12 @@
 
log->logINFO("geoserv", "FileDataSouce being used.");
 FileDataSource* fds = new FileDataSource(fileRepoPath);
-gs->getDataManager()->addDataSource(fds);
+gs.getDataManager()->addDataSource(fds);
  }
 
-if (daemon){
-   gs->start(); //will exit
-} else {
-   gs->run(); //blocks
-}
 
+gs.run(); /* blocks */
+

[brlcad-commits] SF.net SVN: brlcad:[41774]

2010-12-22 Thread davidloman
Revision: 41774
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41774&view=rev
Author:   davidloman
Date: 2010-12-22 15:20:39 + (Wed, 22 Dec 2010)

Log Message:
---
Add a config file for the client.  Mod server config file a bit.

Modified Paths:
--
rt^3/trunk/src/GS/geoserv.config

Added Paths:
---
rt^3/trunk/src/GS/geoclient.config

Added: rt^3/trunk/src/GS/geoclient.config
===
--- rt^3/trunk/src/GS/geoclient.config  (rev 0)
+++ rt^3/trunk/src/GS/geoclient.config  2010-12-22 15:20:39 UTC (rev 41774)
@@ -0,0 +1,3 @@
+# GSClient Configuration File
+
+LocalNodeName  Artemis
\ No newline at end of file


Property changes on: rt^3/trunk/src/GS/geoclient.config
___
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native

Modified: rt^3/trunk/src/GS/geoserv.config
===
--- rt^3/trunk/src/GS/geoserv.config2010-12-22 14:57:42 UTC (rev 41773)
+++ rt^3/trunk/src/GS/geoserv.config2010-12-22 15:20:39 UTC (rev 41774)
@@ -1,6 +1,6 @@
 # Geometry Service Configuration File
 
-LocalNodeName  Aries
+LocalNodeName  Apollo
 ListenAddress  127.0.0.1
 ListenPort 5309
 UseFileRepoyes


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41773]

2010-12-22 Thread davidloman
Revision: 41773
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41773&view=rev
Author:   davidloman
Date: 2010-12-22 14:57:42 + (Wed, 22 Dec 2010)

Log Message:
---
Made PortalManager take a localNodeName parameter.  Made Portal lookup 
localNodeName on its associated PortalManager rather than the Config system.  
This will allow multiple PortalManager's (with different node names) to exist 
in the same application.  Also standardizes LocalNodeName access.

Modified Paths:
--
rt^3/trunk/include/GSClient.h
rt^3/trunk/include/PortalManager.h
rt^3/trunk/src/GS/GSClient.cxx
rt^3/trunk/src/GS/GeometryService.cxx
rt^3/trunk/src/GS/geoclient.cxx
rt^3/trunk/src/libNet/Portal.cxx
rt^3/trunk/src/libNet/PortalManager.cxx
rt^3/trunk/tests/libNet/libNetTest.cxx

Modified: rt^3/trunk/include/GSClient.h
===
--- rt^3/trunk/include/GSClient.h   2010-12-22 14:54:38 UTC (rev 41772)
+++ rt^3/trunk/include/GSClient.h   2010-12-22 14:57:42 UTC (rev 41773)
@@ -43,7 +43,7 @@
friend class LogoutCmd;
 
 public:
-   GSClient();
+   GSClient(QString localNodeName);
virtual ~GSClient();
 
int run();

Modified: rt^3/trunk/include/PortalManager.h
===
--- rt^3/trunk/include/PortalManager.h  2010-12-22 14:54:38 UTC (rev 41772)
+++ rt^3/trunk/include/PortalManager.h  2010-12-22 14:57:42 UTC (rev 41773)
@@ -43,17 +43,19 @@
 class PortalManager : public ControlledThread, public INetMsgHandler
 {
 public:
-   PortalManager(quint16 port = 0);
+   PortalManager(QString localNodeName, quint16 port = 0);
~PortalManager();
 
Portal* connectToHost(QString host, quint16 port);
void disconnect(Portal* p);
 bool handleNetMsg(NetMsg* msg);
+QString getLocalNodeName();
 
 protected:
void _run();
 
 private:
+   QString localNodeName;
Logger* log;
quint16 port;
PkgTcpServer* tcpServer;

Modified: rt^3/trunk/src/GS/GSClient.cxx
===
--- rt^3/trunk/src/GS/GSClient.cxx  2010-12-22 14:54:38 UTC (rev 41772)
+++ rt^3/trunk/src/GS/GSClient.cxx  2010-12-22 14:57:42 UTC (rev 41773)
@@ -35,13 +35,13 @@
 
 const std::string GSClient::defaultPrompt ="geoclient> ";
 
-GSClient::GSClient() {
+GSClient::GSClient(QString localNodeName) {
this->ccReg = ClientCmdRegistry::getInstance();
this->log = Logger::getInstance();
this->jobMan = JobManager::getInstance();
this->jobMan->startup();
 
-   this->portMan = new PortalManager();
+   this->portMan = new PortalManager(localNodeName);
this->portMan->start();
GSThread::msleep(100);
 

Modified: rt^3/trunk/src/GS/GeometryService.cxx
===
--- rt^3/trunk/src/GS/GeometryService.cxx   2010-12-22 14:54:38 UTC (rev 
41772)
+++ rt^3/trunk/src/GS/GeometryService.cxx   2010-12-22 14:57:42 UTC (rev 
41773)
@@ -36,7 +36,7 @@
 this->log = Logger::getInstance();
 this->log->logINFO("GeometryService", localNodeName + " is starting 
up...");
 
-this->portalMan = new PortalManager(listenPort);
+this->portalMan = new PortalManager(localNodeName, listenPort);
 this->registerMsgRoutes();
 
 this->dataMan = DataManager::getInstance();

Modified: rt^3/trunk/src/GS/geoclient.cxx
===
--- rt^3/trunk/src/GS/geoclient.cxx 2010-12-22 14:54:38 UTC (rev 41772)
+++ rt^3/trunk/src/GS/geoclient.cxx 2010-12-22 14:57:42 UTC (rev 41773)
@@ -28,7 +28,7 @@
 int
 main(int argc, char* argv[])
 {
-   GSClient gsClient;
+   GSClient gsClient("TestingLocalNodeName");
 return gsClient.run();
 }
 

Modified: rt^3/trunk/src/libNet/Portal.cxx
===
--- rt^3/trunk/src/libNet/Portal.cxx2010-12-22 14:54:38 UTC (rev 41772)
+++ rt^3/trunk/src/libNet/Portal.cxx2010-12-22 14:57:42 UTC (rev 41773)
@@ -83,8 +83,7 @@
 
 void
 Portal::sendGSNodeName() {
-   QString localNodeName = Config::getInstance()->getConfigValue(
-   "LocalNodeName");
+   QString localNodeName = this->pm->getLocalNodeName();
 
if (localNodeName.length() == 0) {
localNodeName = QUuid::createUuid().toString();

Modified: rt^3/trunk/src/libNet/PortalManager.cxx
===
--- rt^3/trunk/src/libNet/PortalManager.cxx 2010-12-22 14:54:38 UTC (rev 
41772)
+++ rt^3/trunk/src/libNet/PortalManager.cxx 2010-12-22 14:57:42 UTC (rev 
41773)
@@ -32,8 +32,9 @@
 #include 
 #include 
 
-PortalManager::PortalManager(quint16 port) :
-   ControlledThread("PortalManager") {
+PortalManager::PortalManager(QString localNodeName, quint16 por

[brlcad-commits] SF.net SVN: brlcad:[41772] rt^3/trunk/src/libNet/Portal.cxx

2010-12-22 Thread davidloman
Revision: 41772
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41772&view=rev
Author:   davidloman
Date: 2010-12-22 14:54:38 + (Wed, 22 Dec 2010)

Log Message:
---
Fixed a config issue where a Portal was attempting to search the config system 
for the incorrect Key.  This was preventing the Portal from knowing what the 
correct localNodeName was.  Additionally, fixed a small memory leak from a 
pointer that was being allocated but not deallocated.  Converted to local 
variable for simplicity.

Modified Paths:
--
rt^3/trunk/src/libNet/Portal.cxx

Modified: rt^3/trunk/src/libNet/Portal.cxx
===
--- rt^3/trunk/src/libNet/Portal.cxx2010-12-22 14:47:41 UTC (rev 41771)
+++ rt^3/trunk/src/libNet/Portal.cxx2010-12-22 14:54:38 UTC (rev 41772)
@@ -84,14 +84,14 @@
 void
 Portal::sendGSNodeName() {
QString localNodeName = Config::getInstance()->getConfigValue(
-   "LocalGSNodeName");
+   "LocalNodeName");
+
if (localNodeName.length() == 0) {
localNodeName = QUuid::createUuid().toString();
}
 
-
-   RemoteNodenameSetMsg* msg = new RemoteNodenameSetMsg(localNodeName);
-   this->send(msg);
+   RemoteNodenameSetMsg msg(localNodeName);
+   this->send(&msg);
 }
 
 int


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41771] brlcad/trunk/src/tclscripts/archer/CombEditFrame .tcl

2010-12-22 Thread bob1961
Revision: 41771
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41771&view=rev
Author:   bob1961
Date: 2010-12-22 14:47:41 + (Wed, 22 Dec 2010)

Log Message:
---
Mods to accommodate updates to the cadwidgets::TkTable

Modified Paths:
--
brlcad/trunk/src/tclscripts/archer/CombEditFrame.tcl

Modified: brlcad/trunk/src/tclscripts/archer/CombEditFrame.tcl
===
--- brlcad/trunk/src/tclscripts/archer/CombEditFrame.tcl2010-12-22 
14:46:48 UTC (rev 41770)
+++ brlcad/trunk/src/tclscripts/archer/CombEditFrame.tcl2010-12-22 
14:47:41 UTC (rev 41771)
@@ -570,11 +570,10 @@
-maxheight 2000 \
-width 0 \
-rows 10 \
-   -titlecols 1 \
-   -titlerows 1 \
-colstretchmode unset \
-validate 1 \
-   -validatecommand [::itcl::code $this validateTableEntry %r %c 
%S $tname] \
+   -validatecommand [::itcl::code $this validateTableEntry] \
+   -vclientdata $tname \
-tablePopupHandler [::itcl::code $this handleTablePopup]
} {}
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41770] brlcad/trunk/src/tclscripts/lib/TkTable.tcl

2010-12-22 Thread bob1961
Revision: 41770
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41770&view=rev
Author:   bob1961
Date: 2010-12-22 14:46:48 + (Wed, 22 Dec 2010)

Log Message:
---
Started adding behaviors similar to what's in Excel w.r.t. cell traversal and 
editing.

Modified Paths:
--
brlcad/trunk/src/tclscripts/lib/TkTable.tcl

Modified: brlcad/trunk/src/tclscripts/lib/TkTable.tcl
===
--- brlcad/trunk/src/tclscripts/lib/TkTable.tcl 2010-12-22 14:42:15 UTC (rev 
41769)
+++ brlcad/trunk/src/tclscripts/lib/TkTable.tcl 2010-12-22 14:46:48 UTC (rev 
41770)
@@ -31,6 +31,8 @@
 
 itk_option define -dataCallback dataCallback DataCallback ""
 itk_option define -tablePopupHandler tablePopupHandler TablePopupHandler ""
+itk_option define -validatecommand validatecommand ValidateCommand ""
+itk_option define -vclientdata vclientdata VClientData ""
 
 public {
method setDataEntry {_index _val}
@@ -40,12 +42,25 @@
 }
 
 protected {
+   variable mNumCols 3
+   variable mLastCol 2
+   variable mNumRows 10
+   variable mLastRow 9
variable mTableDataVar
variable mTableHeadings
variable mToggleSelectMode 0
+   variable mInsertMode 0
+   variable mDoBreak 0
 
+   method doBreak {}
+   method handleKey {_win _key}
+   method handleLeftRight {_win _sflag}
method handleTablePopup {_win _x _y _X _Y}
+   method handleUpDown {_win _key}
+   method keyVisible {_key}
+   method setInsertMode {_imode}
method toggleSelect {_win _x _y}
+   method validateTableEntry {_row _col _newval}
 }
 
 private {}
@@ -56,6 +71,7 @@
 # 
 
 
+
 # 
 #  CONSTRUCTOR
 # 
@@ -64,11 +80,16 @@
 set mTableDataVar $_datavar
 set mTableHeadings $_headings
 
-set numcols [llength $_headings]
+set mNumCols [llength $_headings]
+set mLastCol [expr {$mNumCols - 1}]
 
 itk_component add table {
::table $itk_interior.table \
-   -cols $numcols \
+   -state disabled \
+   -titlecols 0 \
+   -titlerows 1 \
+   -cols $mNumCols \
+   -validatecommand [::itcl::code $this validateTableEntry %r %c %S] \
-variable $mTableDataVar
 } {
keep -anchor -autoclear -background -bordercursor -borderwidth \
@@ -81,12 +102,16 @@
-maxwidth -multiline -padx -pady -relief -resizeborders -rowheight \
-roworigin -rows -rowseparator -rowstretchmode -rowtagcommand \
-selectioncommand -selectmode -selecttitles -selecttype 
-sparsearray \
-   -state -takefocus -titlecols -titlerows -usecommand -validate \
-   -validatecommand -width -wrap
+   -takefocus -usecommand -validate \
+   -width -wrap
 }
 
 # Hide these options from users of TkTable
 #-cols
+#-state
+#-titlecols
+#-titlerows
+#-validatecommand
 #-variable
 #-xscrollcommand -yscrollcommand
 
@@ -121,17 +146,34 @@
 grid rowconfigure $itk_interior 0 -weight 1
 
 
-bind $itk_component(table)  [::itcl::code $this toggleSelect %W 
%x %y]
+# Button Bindings
+bind $itk_component(table)  "[::itcl::code $this toggleSelect %W 
%x %y]; if {\[[::itcl::code $this doBreak]\]} {break}"
 bind $itk_component(table)  [::itcl::code $this handleTablePopup 
%W %x %y %X %Y]
 bind $itk_component(table) 
 
+# Key Bindings
+bind $itk_component(table)  "[::itcl::code $this handleKey %W %K]; if 
{\[[::itcl::code $this doBreak]\]} {break}"
+bind $itk_component(table)  "[::itcl::code $this handleLeftRight 
%W 0]; break"
+#bind $itk_component(table)  "[::itcl::code $this 
handleLeftRight %W 1]; break"
+bind $itk_component(table) <> "[::itcl::code $this 
handleLeftRight %W 1]; break"
+bind $itk_component(table)  "[::itcl::code $this handleLeftRight 
%W 1]; break"
+bind $itk_component(table)  "[::itcl::code $this 
handleLeftRight %W 0]; break"
+bind $itk_component(table)  {%W icursor [expr {[%W 
icursor]-1}]; break}
+bind $itk_component(table)  {%W icursor [expr {[%W 
icursor]+1}]; break}
+bind $itk_component(table)  "[::itcl::code $this handleUpDown %W 
%K]; break"
+bind $itk_component(table)  "[::itcl::code $this handleUpDown %W 
%K]; break"
+
+set bg [$itk_component(table) tag cget title -background]
 $itk_component(table) tag col select_col 0
 $itk_component(table) tag configure select_col \
+   -background $bg \
-relief raised
 $itk_component(table) tag configure title \
-relief raised
 
 eval itk_initialize $args
+set mNumRows [$itk_component(table) cget -rows]
+set mLastRow [expr {$mNumRows - 1}]
 }
 
 # ---

[brlcad-commits] SF.net SVN: brlcad:[41769] rt^3/trunk/src/utility/Logger.cxx

2010-12-22 Thread davidloman
Revision: 41769
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41769&view=rev
Author:   davidloman
Date: 2010-12-22 14:42:15 + (Wed, 22 Dec 2010)

Log Message:
---
Hrm, I think my svn client might be acting up.  This is the second half of 
commit r41761

Modified Paths:
--
rt^3/trunk/src/utility/Logger.cxx

Modified: rt^3/trunk/src/utility/Logger.cxx
===
--- rt^3/trunk/src/utility/Logger.cxx   2010-12-22 14:39:21 UTC (rev 41768)
+++ rt^3/trunk/src/utility/Logger.cxx   2010-12-22 14:42:15 UTC (rev 41769)
@@ -25,7 +25,10 @@
 
 #include "Logger.h"
 #include 
+
 #include "brlcad/bu.h"
+
+#include 
 #include 
 #include 
 
@@ -132,6 +135,14 @@
}
 }
 
+quint64
+Logger::getCurrentTime()
+{
+   timeval tim;
+   gettimeofday(&tim, NULL);
+   quint64 now = (tim.tv_sec * 1000 ) + (tim.tv_usec/1000);
+   return now;
+}
 
 /*
  * Local Variables:


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41768] rt^3/trunk/src/GS/CMakeLists.txt

2010-12-22 Thread davidloman
Revision: 41768
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41768&view=rev
Author:   davidloman
Date: 2010-12-22 14:39:21 + (Wed, 22 Dec 2010)

Log Message:
---
Forgot to add PingCmd to the cmake system.

Modified Paths:
--
rt^3/trunk/src/GS/CMakeLists.txt

Modified: rt^3/trunk/src/GS/CMakeLists.txt
===
--- rt^3/trunk/src/GS/CMakeLists.txt2010-12-22 14:27:32 UTC (rev 41767)
+++ rt^3/trunk/src/GS/CMakeLists.txt2010-12-22 14:39:21 UTC (rev 41768)
@@ -61,6 +61,7 @@
cmds/LogoutCmd.cxx
cmds/ShutdownCmd.cxx
cmds/ExitCmd.cxx
+   cmds/PingCmd.cxx
 )
 
 #Set INST Headers


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41767]

2010-12-22 Thread davidloman
Revision: 41767
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41767&view=rev
Author:   davidloman
Date: 2010-12-22 14:27:32 + (Wed, 22 Dec 2010)

Log Message:
---
Clean up PingMsg/PongMsg handling logic a bit.

Modified Paths:
--
rt^3/trunk/src/GS/GSClient.cxx
rt^3/trunk/src/GS/GeometryService.cxx

Modified: rt^3/trunk/src/GS/GSClient.cxx
===
--- rt^3/trunk/src/GS/GSClient.cxx  2010-12-22 14:20:37 UTC (rev 41766)
+++ rt^3/trunk/src/GS/GSClient.cxx  2010-12-22 14:27:32 UTC (rev 41767)
@@ -115,6 +115,7 @@
} else {
log->logINFO("GSClient", "Can't return ping.  
NULL Portal*");
}
+   return true;
}
case PONG:
{
@@ -126,17 +127,14 @@
quint64 now = Logger::getCurrentTime();
quint64 diff = now -start;
 
-   log->logINFO("GSClient", "Start: " + 
QString::number(start) +
-   ", now: " + QString::number(now) +
-   ", diff: " + QString::number(diff) );
+   QString time = "roundtrip time: " + 
QString::number(diff) + "ms.";
+   QString remNodeName = "unknown";
 
if (p != NULL) {
-   QString remNodeName = p->getRemoteNodeName();
-   log->logINFO("GSClient", "Pong from: '" + 
remNodeName + "'");
-   } else {
-   log->logINFO("GSClient", "Can't return ping.  
NULL Portal*");
+   remNodeName = p->getRemoteNodeName();
}
 
+   log->logINFO("GSClient", "Pong from: '" + remNodeName + 
"', " + time);
return true;
}
}

Modified: rt^3/trunk/src/GS/GeometryService.cxx
===
--- rt^3/trunk/src/GS/GeometryService.cxx   2010-12-22 14:20:37 UTC (rev 
41766)
+++ rt^3/trunk/src/GS/GeometryService.cxx   2010-12-22 14:27:32 UTC (rev 
41767)
@@ -136,6 +136,26 @@
 
return true;
}
+   case PONG:
+   {
+   Portal* p = msg->getOrigin();
+   PongMsg* pongMsg = (PongMsg*)msg;
+
+   /* calc current and differential times */
+   quint64 start = pongMsg->getStartTime();
+   quint64 now = Logger::getCurrentTime();
+   quint64 diff = now -start;
+
+   QString time = "roundtrip time: " + 
QString::number(diff) + "ms.";
+   QString remNodeName = "unknown";
+
+   if (p != NULL) {
+   remNodeName = p->getRemoteNodeName();
+   }
+
+   log->logINFO("GSClient", "Pong from: '" + remNodeName + 
"', " + time);
+   return true;
+   }
}
return false;
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41766]

2010-12-22 Thread davidloman
Revision: 41766
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41766&view=rev
Author:   davidloman
Date: 2010-12-22 14:20:37 + (Wed, 22 Dec 2010)

Log Message:
---
Now that the NetMsgFactory can properly build PingMsg and PongMsg, have 
GeometryService and GSClient classes register them with the NetMsgRouter

Modified Paths:
--
rt^3/trunk/src/GS/GSClient.cxx
rt^3/trunk/src/GS/GeometryService.cxx

Modified: rt^3/trunk/src/GS/GSClient.cxx
===
--- rt^3/trunk/src/GS/GSClient.cxx  2010-12-22 14:19:34 UTC (rev 41765)
+++ rt^3/trunk/src/GS/GSClient.cxx  2010-12-22 14:20:37 UTC (rev 41766)
@@ -78,6 +78,8 @@
router->registerType(DISCONNECTREQ, this->portMan);
router->registerType(SESSIONINFO, this);
router->registerType(FAILURE, this);
+   router->registerType(PING, this);
+   router->registerType(PONG, this);
 }
 
 bool

Modified: rt^3/trunk/src/GS/GeometryService.cxx
===
--- rt^3/trunk/src/GS/GeometryService.cxx   2010-12-22 14:19:34 UTC (rev 
41765)
+++ rt^3/trunk/src/GS/GeometryService.cxx   2010-12-22 14:20:37 UTC (rev 
41766)
@@ -59,6 +59,7 @@
NetMsgRouter* router = NetMsgRouter::getInstance();
 
router->registerType(PING, this);
+   router->registerType(PONG, this);
 
router->registerType(NEWSESSIONREQ, SessionManager::getInstance());
//router->registerType(SESSIONINFO, SessionManager::getInstance());


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41765] rt^3/trunk/src/GS/GSClient.cxx

2010-12-22 Thread davidloman
Revision: 41765
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41765&view=rev
Author:   davidloman
Date: 2010-12-22 14:19:34 + (Wed, 22 Dec 2010)

Log Message:
---
Register PingCmd class in the CmdRegistry so GSClient can use it.

Modified Paths:
--
rt^3/trunk/src/GS/GSClient.cxx

Modified: rt^3/trunk/src/GS/GSClient.cxx
===
--- rt^3/trunk/src/GS/GSClient.cxx  2010-12-22 14:18:40 UTC (rev 41764)
+++ rt^3/trunk/src/GS/GSClient.cxx  2010-12-22 14:19:34 UTC (rev 41765)
@@ -31,6 +31,7 @@
 #include "LoginCmd.h"
 #include "LogoutCmd.h"
 #include "ShutdownCmd.h"
+#include "PingCmd.h"
 
 const std::string GSClient::defaultPrompt ="geoclient> ";
 
@@ -66,6 +67,7 @@
this->ccReg->registerCmd(new LoginCmd());
this->ccReg->registerCmd(new LogoutCmd());
this->ccReg->registerCmd(new ShutdownCmd());
+   this->ccReg->registerCmd(new PingCmd());
 }
 
 void


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41764]

2010-12-22 Thread davidloman
Revision: 41764
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41764&view=rev
Author:   davidloman
Date: 2010-12-22 14:18:40 + (Wed, 22 Dec 2010)

Log Message:
---
Implement PingCmd.  Used by GSClient to initiate a ping.

Added Paths:
---
rt^3/trunk/include/PingCmd.h
rt^3/trunk/src/GS/cmds/PingCmd.cxx

Added: rt^3/trunk/include/PingCmd.h
===
--- rt^3/trunk/include/PingCmd.h(rev 0)
+++ rt^3/trunk/include/PingCmd.h2010-12-22 14:18:40 UTC (rev 41764)
@@ -0,0 +1,54 @@
+/*   P I N G C M D . H
+ * BRLCAD
+ *
+ * Copyright (c) 2010 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * 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 file; see the file named COPYING for more
+ * information.
+ */
+/** @file PingCmd.h
+ * PingCmd.h
+ *
+ *  Created on: Dec 22, 2010
+ */
+
+#ifndef __PINGCMD_H__
+#define __PINGCMD_H__
+
+#include "AbstractClientCmd.h"
+#include 
+
+class PingCmd: public AbstractClientCmd {
+public:
+   PingCmd();
+   virtual ~PingCmd();
+   QString getUsage();
+   QString getHelp();
+
+protected:
+   bool _exec(GSClient* client, QStringList args);
+
+};
+
+#endif /* __PINGCMD_H__ */
+
+/*
+ * Local Variables:
+ * tab-width: 8
+ * mode: C
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */


Property changes on: rt^3/trunk/include/PingCmd.h
___
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Revision Date Author
Added: svn:eol-style
   + native

Added: rt^3/trunk/src/GS/cmds/PingCmd.cxx
===
--- rt^3/trunk/src/GS/cmds/PingCmd.cxx  (rev 0)
+++ rt^3/trunk/src/GS/cmds/PingCmd.cxx  2010-12-22 14:18:40 UTC (rev 41764)
@@ -0,0 +1,68 @@
+/* P I N G C M D . C X X
+ * BRLCAD
+ *
+ * Copyright (c) 2010 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * 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 file; see the file named COPYING for more
+ * information.
+ */
+/** @file PingCmd.cxx
+ * PingCmd.cxx
+ *
+ *  Created on: Dec 22, 2010
+ */
+
+#include "PingCmd.h"
+
+PingCmd::PingCmd(): AbstractClientCmd("ping"){}
+
+PingCmd::~PingCmd() {}
+
+
+QString
+PingCmd::getUsage(){
+   return "Usage: ping";
+}
+
+QString
+PingCmd::getHelp(){
+   return "Pings the remote host.  Pong is expected in return.";
+}
+
+bool
+PingCmd::_exec(GSClient* client, QStringList args){
+   Portal* p = client->getCurrentPortal();
+
+   if (p == NULL)  {
+   this->log->logERROR("LoginCmd", "Current Portal is NULL.");
+   return false;
+   }
+
+   quint64 now = Logger::getCurrentTime();
+   PingMsg msg(now);
+
+   p->send(&msg);
+   return true;
+}
+
+
+/*
+ * Local Variables:
+ * tab-width: 8
+ * mode: C
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */


Property changes on: rt^3/trunk/src/GS/cmds/PingCmd.cxx
___
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Revision Date Author
Added: svn:eol-style
   + native


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/google

[brlcad-commits] SF.net SVN: brlcad:[41763]

2010-12-22 Thread davidloman
Revision: 41763
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41763&view=rev
Author:   davidloman
Date: 2010-12-22 14:17:09 + (Wed, 22 Dec 2010)

Log Message:
---
Didn't put in the proper constructors and the NetMsgFactory threw a fit about 
it.  Should be fixed now.

Modified Paths:
--
rt^3/trunk/include/PingMsg.h
rt^3/trunk/include/PongMsg.h
rt^3/trunk/src/libNet/NetMsgFactory.cxx
rt^3/trunk/src/libNet/netMsg/PingMsg.cxx
rt^3/trunk/src/libNet/netMsg/PongMsg.cxx

Modified: rt^3/trunk/include/PingMsg.h
===
--- rt^3/trunk/include/PingMsg.h2010-12-22 13:58:52 UTC (rev 41762)
+++ rt^3/trunk/include/PingMsg.h2010-12-22 14:17:09 UTC (rev 41763)
@@ -31,9 +31,19 @@
 
 class PingMsg: public GenericEightBytesMsg {
 public:
+   /* Normal Constructor */
PingMsg(quint64 startT);
+
+   /* Reply Constructor */
+   PingMsg(NetMsg* msg, quint64 startT);
+
+   /* Deserializing Constructor */
+   PingMsg(QDataStream* ds, Portal* origin);
+
+   /* Destructor */
virtual ~PingMsg();
 
+
quint64 getStartTime();
 };
 

Modified: rt^3/trunk/include/PongMsg.h
===
--- rt^3/trunk/include/PongMsg.h2010-12-22 13:58:52 UTC (rev 41762)
+++ rt^3/trunk/include/PongMsg.h2010-12-22 14:17:09 UTC (rev 41763)
@@ -26,12 +26,20 @@
 #ifndef __PONGMSG_H__
 #define __PONGMSG_H__
 
+#include "GenericEightBytesMsg.h"
 #include "PingMsg.h"
-#include "GenericEightBytesMsg.h"
 
+#include 
+
 class PongMsg: public GenericEightBytesMsg {
 public:
+   /* Normal & Reply Constructor */
PongMsg(PingMsg* ping);
+
+   /* Deserializing Constructor */
+   PongMsg(QDataStream* ds, Portal* origin);
+
+   /* Destructor */
virtual ~PongMsg();
 
quint64 getStartTime();

Modified: rt^3/trunk/src/libNet/NetMsgFactory.cxx
===
--- rt^3/trunk/src/libNet/NetMsgFactory.cxx 2010-12-22 13:58:52 UTC (rev 
41762)
+++ rt^3/trunk/src/libNet/NetMsgFactory.cxx 2010-12-22 14:17:09 UTC (rev 
41763)
@@ -37,6 +37,8 @@
 #include "NewSessionReqMsg.h"
 #include "SessionInfoMsg.h"
 #include "TypeOnlyMsg.h"
+#include "PingMsg.h"
+#include "PongMsg.h"
 
 NetMsgFactory* NetMsgFactory::pInstance = NULL;
 
@@ -134,10 +136,17 @@
   case GEOMETRYCHUNK:
 return new GeometryChunkMsg(qds, origin);
 
+  case PING:
+return new PingMsg(qds, origin);
+  case PONG:
+return new PongMsg(qds, origin);
+
+
 /* Admin commands */
   case CMD_SHUTDOWN:
 return new TypeOnlyMsg(qds, origin);
 
+
   default:
 return NULL;
 }

Modified: rt^3/trunk/src/libNet/netMsg/PingMsg.cxx
===
--- rt^3/trunk/src/libNet/netMsg/PingMsg.cxx2010-12-22 13:58:52 UTC (rev 
41762)
+++ rt^3/trunk/src/libNet/netMsg/PingMsg.cxx2010-12-22 14:17:09 UTC (rev 
41763)
@@ -27,7 +27,9 @@
 #include "PingMsg.h"
 #include 
 
-PingMsg::PingMsg(quint64 startT):GenericEightBytesMsg(PONG, startT) {}
+PingMsg::PingMsg(quint64 startT):GenericEightBytesMsg(PING, startT) {}
+PingMsg::PingMsg(NetMsg* msg, quint64 startT):GenericEightBytesMsg(PING, msg, 
startT) {}
+PingMsg::PingMsg(QDataStream* ds, Portal* origin):GenericEightBytesMsg(ds, 
origin) {}
 
 PingMsg::~PingMsg() {}
 

Modified: rt^3/trunk/src/libNet/netMsg/PongMsg.cxx
===
--- rt^3/trunk/src/libNet/netMsg/PongMsg.cxx2010-12-22 13:58:52 UTC (rev 
41762)
+++ rt^3/trunk/src/libNet/netMsg/PongMsg.cxx2010-12-22 14:17:09 UTC (rev 
41763)
@@ -26,11 +26,10 @@
 #include "NetMsgTypes.h"
 #include "PongMsg.h"
 
-PongMsg::PongMsg(PingMsg* ping) : GenericEightBytesMsg(PING, 
ping->getStartTime()){
-}
+PongMsg::PongMsg(PingMsg* ping): GenericEightBytesMsg(PONG, 
ping->getStartTime()){}
+PongMsg::PongMsg(QDataStream* ds, Portal* origin): GenericEightBytesMsg(ds, 
origin) {}
 
-PongMsg::~PongMsg() {
-}
+PongMsg::~PongMsg(){}
 
 quint64
 PongMsg::getStartTime(){


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41762] rt^3/trunk/src/GS/GSClient.cxx

2010-12-22 Thread davidloman
Revision: 41762
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41762&view=rev
Author:   davidloman
Date: 2010-12-22 13:58:52 + (Wed, 22 Dec 2010)

Log Message:
---
Use the Logger::getCurrentTime() fn instead of locally calculating it.

Modified Paths:
--
rt^3/trunk/src/GS/GSClient.cxx

Modified: rt^3/trunk/src/GS/GSClient.cxx
===
--- rt^3/trunk/src/GS/GSClient.cxx  2010-12-22 13:56:31 UTC (rev 41761)
+++ rt^3/trunk/src/GS/GSClient.cxx  2010-12-22 13:58:52 UTC (rev 41762)
@@ -22,8 +22,6 @@
  *
  */
 
-#include 
-
 #include "GSClient.h"
 #include "NetMsgRouter.h"
 
@@ -120,11 +118,9 @@
PongMsg* pongMsg = (PongMsg*)msg;
 
/* calc current and differential times */
-   quint32 start = pongMsg->getStartTime();
-   timeval tim;
-   gettimeofday(&tim, NULL);
-   quint32 now=(tim.tv_sec * 1000 ) + (tim.tv_usec/1000);
-   quint32 diff = now -start;
+   quint64 start = pongMsg->getStartTime();
+   quint64 now = Logger::getCurrentTime();
+   quint64 diff = now -start;
 
log->logINFO("GSClient", "Start: " + 
QString::number(start) +
", now: " + QString::number(now) +


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41761] rt^3/trunk/include/Logger.h

2010-12-22 Thread davidloman
Revision: 41761
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41761&view=rev
Author:   davidloman
Date: 2010-12-22 13:56:31 + (Wed, 22 Dec 2010)

Log Message:
---
Add a utility function to get the current time in ms and return it as a quint64.

Modified Paths:
--
rt^3/trunk/include/Logger.h

Modified: rt^3/trunk/include/Logger.h
===
--- rt^3/trunk/include/Logger.h 2010-12-22 13:53:27 UTC (rev 41760)
+++ rt^3/trunk/include/Logger.h 2010-12-22 13:56:31 UTC (rev 41761)
@@ -78,6 +78,8 @@
BANNER, INFO, WARNING, ERROR, FATAL, DEBUG
};
 
+   static quint64 getCurrentTime();
+
 private:
static Logger* instance;
static QMutex* lock;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41760] rt^3/trunk/src/utility/Logger.cxx

2010-12-22 Thread davidloman
Revision: 41760
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41760&view=rev
Author:   davidloman
Date: 2010-12-22 13:53:27 + (Wed, 22 Dec 2010)

Log Message:
---
C -> C++ comment conversion.

Modified Paths:
--
rt^3/trunk/src/utility/Logger.cxx

Modified: rt^3/trunk/src/utility/Logger.cxx
===
--- rt^3/trunk/src/utility/Logger.cxx   2010-12-22 13:31:08 UTC (rev 41759)
+++ rt^3/trunk/src/utility/Logger.cxx   2010-12-22 13:53:27 UTC (rev 41760)
@@ -132,10 +132,13 @@
}
 }
 
-// Local Variables: ***
-// mode: C++ ***
-// tab-width: 8 ***
-// c-basic-offset: 2 ***
-// indent-tabs-mode: t ***
-// End: ***
-// ex: shiftwidth=2 tabstop=8
+
+/*
+ * Local Variables:
+ * tab-width: 8
+ * mode: C
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41759]

2010-12-22 Thread davidloman
Revision: 41759
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41759&view=rev
Author:   davidloman
Date: 2010-12-22 13:31:08 + (Wed, 22 Dec 2010)

Log Message:
---
Converted PingMsg and PongMsg over to transporting 64bit values instead of 
32bit.  Needed to get proper startTime in ms.

Modified Paths:
--
rt^3/trunk/include/PingMsg.h
rt^3/trunk/include/PongMsg.h
rt^3/trunk/src/libNet/netMsg/PingMsg.cxx
rt^3/trunk/src/libNet/netMsg/PongMsg.cxx

Modified: rt^3/trunk/include/PingMsg.h
===
--- rt^3/trunk/include/PingMsg.h2010-12-22 13:28:08 UTC (rev 41758)
+++ rt^3/trunk/include/PingMsg.h2010-12-22 13:31:08 UTC (rev 41759)
@@ -26,17 +26,15 @@
 #ifndef __PINGMSG_H__
 #define __PINGMSG_H__
 
-#include "GenericFourBytesMsg.h"
+#include "GenericEightBytesMsg.h"
 #include 
 
-class PingMsg: public GenericFourBytesMsg {
+class PingMsg: public GenericEightBytesMsg {
 public:
-   PingMsg(quint32 startT);
+   PingMsg(quint64 startT);
virtual ~PingMsg();
 
-   quint32 getStartTime();
-
-
+   quint64 getStartTime();
 };
 
 #endif /* __PINGMSG_H__ */

Modified: rt^3/trunk/include/PongMsg.h
===
--- rt^3/trunk/include/PongMsg.h2010-12-22 13:28:08 UTC (rev 41758)
+++ rt^3/trunk/include/PongMsg.h2010-12-22 13:31:08 UTC (rev 41759)
@@ -23,18 +23,18 @@
  *  Created on: Dec 20, 2010
  */
 
-#ifndef PONGMSG_H_
-#define PONGMSG_H_
+#ifndef __PONGMSG_H__
+#define __PONGMSG_H__
 
 #include "PingMsg.h"
-#include "GenericFourBytesMsg.h"
+#include "GenericEightBytesMsg.h"
 
-class PongMsg: public GenericFourBytesMsg {
+class PongMsg: public GenericEightBytesMsg {
 public:
PongMsg(PingMsg* ping);
virtual ~PongMsg();
 
-   quint32 getStartTime();
+   quint64 getStartTime();
 };
 
-#endif /* PONGMSG_H_ */
+#endif /* __PONGMSG_H__ */

Modified: rt^3/trunk/src/libNet/netMsg/PingMsg.cxx
===
--- rt^3/trunk/src/libNet/netMsg/PingMsg.cxx2010-12-22 13:28:08 UTC (rev 
41758)
+++ rt^3/trunk/src/libNet/netMsg/PingMsg.cxx2010-12-22 13:31:08 UTC (rev 
41759)
@@ -27,19 +27,16 @@
 #include "PingMsg.h"
 #include 
 
-PingMsg::PingMsg(quint32 startT):GenericFourBytesMsg(PONG, startT) {
-}
+PingMsg::PingMsg(quint64 startT):GenericEightBytesMsg(PONG, startT) {}
 
-PingMsg::~PingMsg() {
-}
+PingMsg::~PingMsg() {}
 
-quint32
+quint64
 PingMsg::getStartTime()
 {
return this->data;
 }
 
-
 /*
  * Local Variables:
  * tab-width: 8

Modified: rt^3/trunk/src/libNet/netMsg/PongMsg.cxx
===
--- rt^3/trunk/src/libNet/netMsg/PongMsg.cxx2010-12-22 13:28:08 UTC (rev 
41758)
+++ rt^3/trunk/src/libNet/netMsg/PongMsg.cxx2010-12-22 13:31:08 UTC (rev 
41759)
@@ -26,13 +26,13 @@
 #include "NetMsgTypes.h"
 #include "PongMsg.h"
 
-PongMsg::PongMsg(PingMsg* ping) : GenericFourBytesMsg(PING, 
ping->getStartTime()){
+PongMsg::PongMsg(PingMsg* ping) : GenericEightBytesMsg(PING, 
ping->getStartTime()){
 }
 
 PongMsg::~PongMsg() {
 }
 
-quint32
+quint64
 PongMsg::getStartTime(){
return this->data;
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41758]

2010-12-22 Thread davidloman
Revision: 41758
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41758&view=rev
Author:   davidloman
Date: 2010-12-22 13:28:08 + (Wed, 22 Dec 2010)

Log Message:
---
Introduce a new generic class: GenericEightBytesMsg.  Is designed to transport 
a single 64 bit value.  Prompted by Ping/PongMsg's need to move a 64 time value.

Modified Paths:
--
rt^3/trunk/src/libNet/CMakeLists.txt

Added Paths:
---
rt^3/trunk/include/GenericEightBytesMsg.h
rt^3/trunk/src/libNet/netMsg/GenericEightBytesMsg.cxx

Added: rt^3/trunk/include/GenericEightBytesMsg.h
===
--- rt^3/trunk/include/GenericEightBytesMsg.h   (rev 0)
+++ rt^3/trunk/include/GenericEightBytesMsg.h   2010-12-22 13:28:08 UTC (rev 
41758)
@@ -0,0 +1,74 @@
+/*  G E N E R I C E I G H T B Y T E S M S G . H
+ * BRL-CAD
+ *
+ * Copyright (c) 2010 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * 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 file; see the file named COPYING for more
+ * information.
+ */
+/** @file GenericEightBytesMsg.h
+ *
+ * Brief description
+ *
+ */
+
+#ifndef __GENERICEIGHTBYTESMSG_H__
+#define __GENERICEIGHTBYTESMSG_H__
+
+#include "NetMsg.h"
+
+class GenericEightBytesMsg : public NetMsg
+{
+public:
+   /* Normal Constructor */
+   GenericEightBytesMsg(quint32 type, quint64 b);
+
+   /* Reply Constructor */
+   GenericEightBytesMsg(quint32 type, NetMsg* msg, quint64 b);
+
+   /* Deserializing Constructor */
+   GenericEightBytesMsg(QDataStream* ds, Portal* origin);
+
+   /* Destructor */
+   virtual ~GenericEightBytesMsg();
+
+   /*
+* Utilities
+*/
+   virtual QString toString();
+
+protected:
+   quint64 getData();
+   quint64 data;
+
+   virtual bool _serialize(QDataStream* ds);
+   virtual bool _equals(const NetMsg& msg);
+
+private:
+   /* Disable copy cstr and =operator */
+   GenericEightBytesMsg(GenericEightBytesMsg const&):NetMsg(0){};
+   GenericEightBytesMsg& operator=(GenericEightBytesMsg const&){};
+};
+
+#endif /* __GENERICEIGHTBYTESMSG_H__ */
+
+/*
+ * Local Variables: ***
+ * mode: C++ ***
+ * tab-width: 8 ***
+ * c-basic-offset: 2 ***
+ * indent-tabs-mode: t ***
+ * End: ***
+ * ex: shiftwidth=2 tabstop=8
+*/


Property changes on: rt^3/trunk/include/GenericEightBytesMsg.h
___
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Revision Date Author
Added: svn:eol-style
   + native

Modified: rt^3/trunk/src/libNet/CMakeLists.txt
===
--- rt^3/trunk/src/libNet/CMakeLists.txt2010-12-22 13:18:51 UTC (rev 
41757)
+++ rt^3/trunk/src/libNet/CMakeLists.txt2010-12-22 13:28:08 UTC (rev 
41758)
@@ -56,6 +56,7 @@
netMsg/GenericOneByteMsg.cxx
netMsg/GenericTwoBytesMsg.cxx
netMsg/GenericFourBytesMsg.cxx
+   netMsg/GenericEightBytesMsg.cxx
netMsg/GenericMultiByteMsg.cxx
netMsg/FailureMsg.cxx
netMsg/SuccessMsg.cxx
@@ -86,6 +87,7 @@
GenericOneByteMsg.h
GenericTwoBytesMsg.h
GenericFourBytesMsg.h
+   GenericEightBytesMsg.h
GenericMultiByteMsg.h
FailureMsg.h
SuccessMsg.h

Added: rt^3/trunk/src/libNet/netMsg/GenericEightBytesMsg.cxx
===
--- rt^3/trunk/src/libNet/netMsg/GenericEightBytesMsg.cxx   
(rev 0)
+++ rt^3/trunk/src/libNet/netMsg/GenericEightBytesMsg.cxx   2010-12-22 
13:28:08 UTC (rev 41758)
@@ -0,0 +1,96 @@
+/*G E N E R I C E I G H T B Y T E S M S G . C X X
+ * BRL-CAD
+ *
+ * Copyright (c) 2010 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * 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
+ * Licens

[brlcad-commits] SF.net SVN: brlcad:[41757] rt^3/trunk/src/GS/GSClient.cxx

2010-12-22 Thread davidloman
Revision: 41757
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41757&view=rev
Author:   davidloman
Date: 2010-12-22 13:18:51 + (Wed, 22 Dec 2010)

Log Message:
---
Implement PongMsg handling.  Add in ability to calculate current time to the 
nearest ms and get roundtrip ping time.  Also fixed logging label errors.

Modified Paths:
--
rt^3/trunk/src/GS/GSClient.cxx

Modified: rt^3/trunk/src/GS/GSClient.cxx
===
--- rt^3/trunk/src/GS/GSClient.cxx  2010-12-22 13:17:13 UTC (rev 41756)
+++ rt^3/trunk/src/GS/GSClient.cxx  2010-12-22 13:18:51 UTC (rev 41757)
@@ -98,7 +98,7 @@
 
QUuid re = fMsg->getReUUID();
 
-   log->logINFO("GeometryService", "Recv'ed A FailureMsg 
with code: " +QString::number( fc) + " (" + QString::number(fc, 16)+ ")");
+   log->logINFO("GSClient", "Recv'ed A FailureMsg with 
code: " +QString::number( fc) + " (" + QString::number(fc, 16)+ ")");
return true;
}
case PING:
@@ -107,14 +107,38 @@
 
if (p != NULL) {
QString remNodeName = p->getRemoteNodeName();
-   log->logINFO("GeometryService", "PING from: '" 
+ remNodeName + "'");
+   log->logINFO("GSClient", "PING from: '" + 
remNodeName + "'");
PongMsg pongMsg((PingMsg*)msg);
p->send(&pongMsg);
} else {
-   log->logINFO("GeometryService", "Can't return 
ping.  NULL Portal*");
+   log->logINFO("GSClient", "Can't return ping.  
NULL Portal*");
}
}
+   case PONG:
+   {
+   Portal* p = msg->getOrigin();
+   PongMsg* pongMsg = (PongMsg*)msg;
 
+   /* calc current and differential times */
+   quint32 start = pongMsg->getStartTime();
+   timeval tim;
+   gettimeofday(&tim, NULL);
+   quint32 now=(tim.tv_sec * 1000 ) + (tim.tv_usec/1000);
+   quint32 diff = now -start;
+
+   log->logINFO("GSClient", "Start: " + 
QString::number(start) +
+   ", now: " + QString::number(now) +
+   ", diff: " + QString::number(diff) );
+
+   if (p != NULL) {
+   QString remNodeName = p->getRemoteNodeName();
+   log->logINFO("GSClient", "Pong from: '" + 
remNodeName + "'");
+   } else {
+   log->logINFO("GSClient", "Can't return ping.  
NULL Portal*");
+   }
+
+   return true;
+   }
}
return false;
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41756]

2010-12-22 Thread davidloman
Revision: 41756
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41756&view=rev
Author:   davidloman
Date: 2010-12-22 13:17:13 + (Wed, 22 Dec 2010)

Log Message:
---
Add squigglies to prevent cross initialization in the switch block.

Modified Paths:
--
rt^3/trunk/src/GS/GSClient.cxx
rt^3/trunk/src/GS/GeometryService.cxx

Modified: rt^3/trunk/src/GS/GSClient.cxx
===
--- rt^3/trunk/src/GS/GSClient.cxx  2010-12-22 13:04:58 UTC (rev 41755)
+++ rt^3/trunk/src/GS/GSClient.cxx  2010-12-22 13:17:13 UTC (rev 41756)
@@ -22,6 +22,8 @@
  *
  */
 
+#include 
+
 #include "GSClient.h"
 #include "NetMsgRouter.h"
 
@@ -100,18 +102,19 @@
return true;
}
case PING:
-   Portal* p = msg->getOrigin();
+   {
+   Portal* p = msg->getOrigin();
 
-   if (p != NULL) {
-   QString remNodeName = p->getRemoteNodeName();
-   log->logINFO("GeometryService", "PING from: '" + 
remNodeName + "'");
-   PongMsg pongMsg((PingMsg*)msg);
-   p->send(&pongMsg);
-   } else {
-   log->logINFO("GeometryService", "Can't return ping.  
NULL Portal*");
+   if (p != NULL) {
+   QString remNodeName = p->getRemoteNodeName();
+   log->logINFO("GeometryService", "PING from: '" 
+ remNodeName + "'");
+   PongMsg pongMsg((PingMsg*)msg);
+   p->send(&pongMsg);
+   } else {
+   log->logINFO("GeometryService", "Can't return 
ping.  NULL Portal*");
+   }
}
 
-   return true;
}
return false;
 }

Modified: rt^3/trunk/src/GS/GeometryService.cxx
===
--- rt^3/trunk/src/GS/GeometryService.cxx   2010-12-22 13:04:58 UTC (rev 
41755)
+++ rt^3/trunk/src/GS/GeometryService.cxx   2010-12-22 13:17:13 UTC (rev 
41756)
@@ -121,18 +121,20 @@
return true;
}
case PING:
-   Portal* p = msg->getOrigin();
+   {
+   Portal* p = msg->getOrigin();
 
-   if (p != NULL) {
-   QString remNodeName = p->getRemoteNodeName();
-   log->logINFO("GeometryService", "PING from: '" + 
remNodeName + "'");
-   PongMsg pongMsg((PingMsg*)msg);
-   p->send(&pongMsg);
-   } else {
-   log->logINFO("GeometryService", "Can't return ping.  
NULL Portal*");
+   if (p != NULL) {
+   QString remNodeName = p->getRemoteNodeName();
+   log->logINFO("GeometryService", "PING from: '" 
+ remNodeName + "'");
+   PongMsg pongMsg((PingMsg*)msg);
+   p->send(&pongMsg);
+   } else {
+   log->logINFO("GeometryService", "Can't return 
ping.  NULL Portal*");
+   }
+
+   return true;
}
-
-   return true;
}
return false;
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41755] rt^3/trunk/src/GS/GeometryService.cxx

2010-12-22 Thread davidloman
Revision: 41755
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41755&view=rev
Author:   davidloman
Date: 2010-12-22 13:04:58 + (Wed, 22 Dec 2010)

Log Message:
---
Implement FailureMsg handling in GeometryService class.

Modified Paths:
--
rt^3/trunk/src/GS/GeometryService.cxx

Modified: rt^3/trunk/src/GS/GeometryService.cxx
===
--- rt^3/trunk/src/GS/GeometryService.cxx   2010-12-22 13:04:38 UTC (rev 
41754)
+++ rt^3/trunk/src/GS/GeometryService.cxx   2010-12-22 13:04:58 UTC (rev 
41755)
@@ -110,6 +110,16 @@
this->portalMan->terminate(false);
this->terminate(false);
return true;
+   case FAILURE:
+   {
+   FailureMsg* fMsg = (FailureMsg*)msg;
+   quint8 fc = fMsg->getFailureCode();
+
+   QUuid re = fMsg->getReUUID();
+
+   log->logINFO("GeometryService", "Recv'ed A FailureMsg 
with code: " +QString::number( fc) + " (" + QString::number(fc, 16)+ ")");
+   return true;
+   }
case PING:
Portal* p = msg->getOrigin();
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41754] rt^3/trunk/src/GS/GSClient.cxx

2010-12-22 Thread davidloman
Revision: 41754
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41754&view=rev
Author:   davidloman
Date: 2010-12-22 13:04:38 + (Wed, 22 Dec 2010)

Log Message:
---
Implement PING handling in GSClient class.

Modified Paths:
--
rt^3/trunk/src/GS/GSClient.cxx

Modified: rt^3/trunk/src/GS/GSClient.cxx
===
--- rt^3/trunk/src/GS/GSClient.cxx  2010-12-22 13:02:11 UTC (rev 41753)
+++ rt^3/trunk/src/GS/GSClient.cxx  2010-12-22 13:04:38 UTC (rev 41754)
@@ -96,9 +96,22 @@
 
QUuid re = fMsg->getReUUID();
 
-   log->logINFO("GSClient", "Recv'ed A FailureMsg with 
code: " +QString::number( fc) + " (" + QString::number(fc, 16)+ ")");
+   log->logINFO("GeometryService", "Recv'ed A FailureMsg 
with code: " +QString::number( fc) + " (" + QString::number(fc, 16)+ ")");
return true;
}
+   case PING:
+   Portal* p = msg->getOrigin();
+
+   if (p != NULL) {
+   QString remNodeName = p->getRemoteNodeName();
+   log->logINFO("GeometryService", "PING from: '" + 
remNodeName + "'");
+   PongMsg pongMsg((PingMsg*)msg);
+   p->send(&pongMsg);
+   } else {
+   log->logINFO("GeometryService", "Can't return ping.  
NULL Portal*");
+   }
+
+   return true;
}
return false;
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41753] rt^3/trunk/src/GS/GeometryService.cxx

2010-12-22 Thread davidloman
Revision: 41753
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41753&view=rev
Author:   davidloman
Date: 2010-12-22 13:02:11 + (Wed, 22 Dec 2010)

Log Message:
---
Accidentally submitted old version of file: 'GeometryService.cxx'.  This is the 
correct one.  Honest.

Modified Paths:
--
rt^3/trunk/src/GS/GeometryService.cxx

Modified: rt^3/trunk/src/GS/GeometryService.cxx
===
--- rt^3/trunk/src/GS/GeometryService.cxx   2010-12-22 12:59:39 UTC (rev 
41752)
+++ rt^3/trunk/src/GS/GeometryService.cxx   2010-12-22 13:02:11 UTC (rev 
41753)
@@ -26,7 +26,10 @@
 #include "GeometryService.h"
 #include "SessionManager.h"
 #include "FileDataSource.h"
+#include "PingMsg.h"
+#include "PongMsg.h"
 
+
 GeometryService::GeometryService(const QString localNodeName, quint16 
listenPort) :
 localNodeName(localNodeName), listenPort(listenPort)
 {
@@ -111,10 +114,10 @@
Portal* p = msg->getOrigin();
 
if (p != NULL) {
-   remNodeName = p->getRemoteNodeName();
+   QString remNodeName = p->getRemoteNodeName();
log->logINFO("GeometryService", "PING from: '" + 
remNodeName + "'");
PongMsg pongMsg((PingMsg*)msg);
-   p->send(pongMsg);
+   p->send(&pongMsg);
} else {
log->logINFO("GeometryService", "Can't return ping.  
NULL Portal*");
}


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41752] rt^3/trunk/src/GS/GeometryService.cxx

2010-12-22 Thread davidloman
Revision: 41752
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41752&view=rev
Author:   davidloman
Date: 2010-12-22 12:59:39 + (Wed, 22 Dec 2010)

Log Message:
---
Implement PingMsg handling in GeometryService class.  Precursor to KeepAlive 
functionality.

Modified Paths:
--
rt^3/trunk/src/GS/GeometryService.cxx

Modified: rt^3/trunk/src/GS/GeometryService.cxx
===
--- rt^3/trunk/src/GS/GeometryService.cxx   2010-12-22 12:59:05 UTC (rev 
41751)
+++ rt^3/trunk/src/GS/GeometryService.cxx   2010-12-22 12:59:39 UTC (rev 
41752)
@@ -55,6 +55,8 @@
 {
NetMsgRouter* router = NetMsgRouter::getInstance();
 
+   router->registerType(PING, this);
+
router->registerType(NEWSESSIONREQ, SessionManager::getInstance());
//router->registerType(SESSIONINFO, SessionManager::getInstance());
router->registerType(DISCONNECTREQ, SessionManager::getInstance());
@@ -105,14 +107,29 @@
this->portalMan->terminate(false);
this->terminate(false);
return true;
+   case PING:
+   Portal* p = msg->getOrigin();
+
+   if (p != NULL) {
+   remNodeName = p->getRemoteNodeName();
+   log->logINFO("GeometryService", "PING from: '" + 
remNodeName + "'");
+   PongMsg pongMsg((PingMsg*)msg);
+   p->send(pongMsg);
+   } else {
+   log->logINFO("GeometryService", "Can't return ping.  
NULL Portal*");
+   }
+
+   return true;
}
return false;
 }
 
-// Local Variables: ***
-// mode: C++ ***
-// tab-width: 8 ***
-// c-basic-offset: 2 ***
-// indent-tabs-mode: t ***
-// End: ***
-// ex: shiftwidth=2 tabstop=8
+/*
+ * Local Variables:
+ * tab-width: 8
+ * mode: C
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[41751] rt^3/trunk/include/NetMsgTypes.h

2010-12-22 Thread davidloman
Revision: 41751
  http://brlcad.svn.sourceforge.net/brlcad/?rev=41751&view=rev
Author:   davidloman
Date: 2010-12-22 12:59:05 + (Wed, 22 Dec 2010)

Log Message:
---
C -> C++ comment conversion.

Modified Paths:
--
rt^3/trunk/include/NetMsgTypes.h

Modified: rt^3/trunk/include/NetMsgTypes.h
===
--- rt^3/trunk/include/NetMsgTypes.h2010-12-22 00:31:40 UTC (rev 41750)
+++ rt^3/trunk/include/NetMsgTypes.h2010-12-22 12:59:05 UTC (rev 41751)
@@ -61,7 +61,7 @@
 #define GEOMETRYMANIFEST   0x0405
 #define GEOMETRYCHUNK  0x0410
 
-//Admin commands
+/* Admin commands */
 #define CMD_SHUTDOWN   0x9000
 
 /*  Failure Codes */


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits