You can subscribe to this list here.
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(121) |
Dec
(58) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2011 |
Jan
(38) |
Feb
(36) |
Mar
(7) |
Apr
(2) |
May
(32) |
Jun
(24) |
Jul
(16) |
Aug
(21) |
Sep
(17) |
Oct
(62) |
Nov
(60) |
Dec
(70) |
| 2012 |
Jan
(54) |
Feb
(41) |
Mar
(21) |
Apr
(38) |
May
(76) |
Jun
(47) |
Jul
(25) |
Aug
(72) |
Sep
(29) |
Oct
(64) |
Nov
(93) |
Dec
(97) |
| 2013 |
Jan
(100) |
Feb
(168) |
Mar
(115) |
Apr
(59) |
May
(37) |
Jun
(32) |
Jul
(45) |
Aug
(42) |
Sep
(24) |
Oct
(73) |
Nov
(64) |
Dec
(4) |
| 2014 |
Jan
(14) |
Feb
(57) |
Mar
(58) |
Apr
(10) |
May
(18) |
Jun
(12) |
Jul
(7) |
Aug
(12) |
Sep
(15) |
Oct
(6) |
Nov
(32) |
Dec
(17) |
| 2015 |
Jan
(50) |
Feb
(5) |
Mar
(1) |
Apr
(26) |
May
(10) |
Jun
(3) |
Jul
(3) |
Aug
(2) |
Sep
(3) |
Oct
(18) |
Nov
(18) |
Dec
(8) |
| 2016 |
Jan
(33) |
Feb
(35) |
Mar
(50) |
Apr
(20) |
May
(25) |
Jun
(17) |
Jul
(8) |
Aug
(73) |
Sep
(64) |
Oct
(51) |
Nov
(20) |
Dec
(14) |
| 2017 |
Jan
(41) |
Feb
(57) |
Mar
(44) |
Apr
(136) |
May
(32) |
Jun
(39) |
Jul
(2) |
Aug
(12) |
Sep
(32) |
Oct
(103) |
Nov
(12) |
Dec
(4) |
| 2018 |
Jan
(9) |
Feb
(1) |
Mar
(60) |
Apr
(24) |
May
(15) |
Jun
(1) |
Jul
(2) |
Aug
(23) |
Sep
(15) |
Oct
(57) |
Nov
(21) |
Dec
(77) |
| 2019 |
Jan
(62) |
Feb
(99) |
Mar
(98) |
Apr
(49) |
May
(6) |
Jun
(3) |
Jul
(6) |
Aug
(18) |
Sep
(9) |
Oct
(15) |
Nov
(30) |
Dec
(6) |
| 2020 |
Jan
(14) |
Feb
(2) |
Mar
(22) |
Apr
(33) |
May
(47) |
Jun
(12) |
Jul
|
Aug
|
Sep
(4) |
Oct
(2) |
Nov
(5) |
Dec
(5) |
| 2021 |
Jan
(4) |
Feb
(101) |
Mar
(13) |
Apr
(32) |
May
(40) |
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
(25) |
Nov
(12) |
Dec
|
| 2022 |
Jan
(154) |
Feb
(82) |
Mar
(63) |
Apr
(27) |
May
(26) |
Jun
(5) |
Jul
(12) |
Aug
(23) |
Sep
(17) |
Oct
(37) |
Nov
(13) |
Dec
(21) |
| 2023 |
Jan
(43) |
Feb
(43) |
Mar
(15) |
Apr
(8) |
May
(3) |
Jun
(25) |
Jul
(6) |
Aug
(38) |
Sep
(5) |
Oct
(20) |
Nov
(9) |
Dec
(28) |
| 2024 |
Jan
(15) |
Feb
(2) |
Mar
(12) |
Apr
(2) |
May
(8) |
Jun
(10) |
Jul
(10) |
Aug
(2) |
Sep
(3) |
Oct
(15) |
Nov
(6) |
Dec
(20) |
| 2025 |
Jan
|
Feb
(2) |
Mar
(6) |
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(11) |
Nov
(2) |
Dec
|
|
From: <ma...@us...> - 2011-12-09 10:31:57
|
Revision: 555
http://openautomation.svn.sourceforge.net/openautomation/?rev=555&view=rev
Author: mayerch
Date: 2011-12-09 10:31:43 +0000 (Fri, 09 Dec 2011)
Log Message:
-----------
Move from old SVG implementation to WebGL using Three.js. Also moving towards jQuery to make things easier.
This is still much work in progress and the first working version. It's still needing lots of polishing to reach a similar state it was before with the SVG implementation.
Modified Paths:
--------------
JSFloorPlan/trunk/index.html
JSFloorPlan/trunk/jsfloorplan.js
JSFloorPlan/trunk/jsfloorplan_example_helper.js
Added Paths:
-----------
JSFloorPlan/trunk/css/
JSFloorPlan/trunk/css/ui-lightness/
JSFloorPlan/trunk/css/ui-lightness/images/
JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png
JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png
JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png
JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png
JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png
JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png
JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png
JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
JSFloorPlan/trunk/css/ui-lightness/images/ui-icons_222222_256x240.png
JSFloorPlan/trunk/css/ui-lightness/images/ui-icons_228ef1_256x240.png
JSFloorPlan/trunk/css/ui-lightness/images/ui-icons_ef8c08_256x240.png
JSFloorPlan/trunk/css/ui-lightness/images/ui-icons_ffd27a_256x240.png
JSFloorPlan/trunk/css/ui-lightness/images/ui-icons_ffffff_256x240.png
JSFloorPlan/trunk/css/ui-lightness/jquery-ui-1.8.16.custom.css
JSFloorPlan/trunk/lib/
JSFloorPlan/trunk/lib/Three.js
JSFloorPlan/trunk/lib/jquery-1.7.1.min.js
JSFloorPlan/trunk/lib/jquery-ui-1.8.16.custom.min.js
Added: JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png
===================================================================
(Binary files differ)
Property changes on: JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png
===================================================================
(Binary files differ)
Property changes on: JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png
===================================================================
(Binary files differ)
Property changes on: JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png
===================================================================
(Binary files differ)
Property changes on: JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png
===================================================================
(Binary files differ)
Property changes on: JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png
===================================================================
(Binary files differ)
Property changes on: JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png
===================================================================
(Binary files differ)
Property changes on: JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
===================================================================
(Binary files differ)
Property changes on: JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
===================================================================
(Binary files differ)
Property changes on: JSFloorPlan/trunk/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JSFloorPlan/trunk/css/ui-lightness/images/ui-icons_222222_256x240.png
===================================================================
(Binary files differ)
Property changes on: JSFloorPlan/trunk/css/ui-lightness/images/ui-icons_222222_256x240.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JSFloorPlan/trunk/css/ui-lightness/images/ui-icons_228ef1_256x240.png
===================================================================
(Binary files differ)
Property changes on: JSFloorPlan/trunk/css/ui-lightness/images/ui-icons_228ef1_256x240.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JSFloorPlan/trunk/css/ui-lightness/images/ui-icons_ef8c08_256x240.png
===================================================================
(Binary files differ)
Property changes on: JSFloorPlan/trunk/css/ui-lightness/images/ui-icons_ef8c08_256x240.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JSFloorPlan/trunk/css/ui-lightness/images/ui-icons_ffd27a_256x240.png
===================================================================
(Binary files differ)
Property changes on: JSFloorPlan/trunk/css/ui-lightness/images/ui-icons_ffd27a_256x240.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JSFloorPlan/trunk/css/ui-lightness/images/ui-icons_ffffff_256x240.png
===================================================================
(Binary files differ)
Property changes on: JSFloorPlan/trunk/css/ui-lightness/images/ui-icons_ffffff_256x240.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JSFloorPlan/trunk/css/ui-lightness/jquery-ui-1.8.16.custom.css
===================================================================
--- JSFloorPlan/trunk/css/ui-lightness/jquery-ui-1.8.16.custom.css (rev 0)
+++ JSFloorPlan/trunk/css/ui-lightness/jquery-ui-1.8.16.custom.css 2011-12-09 10:31:43 UTC (rev 555)
@@ -0,0 +1,568 @@
+/*
+ * jQuery UI CSS Framework 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
+.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
+.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
+.ui-helper-clearfix { display: inline-block; }
+/* required comment for clearfix to work in Opera \*/
+* html .ui-helper-clearfix { height:1%; }
+.ui-helper-clearfix { display:block; }
+/* end clearfix */
+.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
+
+
+/*
+ * jQuery UI CSS Framework 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
+ */
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; }
+.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; }
+.ui-widget-content a { color: #333333; }
+.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
+.ui-widget-header a { color: #ffffff; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; }
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; }
+.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; }
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; }
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; }
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
+.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
+.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
+.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
+.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
+.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
+.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+
+/* Overlays */
+.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); }
+.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -khtml-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/*
+ * jQuery UI Resizable 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Resizable#theming
+ */
+.ui-resizable { position: relative;}
+.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; }
+.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
+.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
+.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
+.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
+.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
+.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
+.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
+.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
+.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
+ * jQuery UI Selectable 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Selectable#theming
+ */
+.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
+/*
+ * jQuery UI Accordion 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Accordion#theming
+ */
+/* IE/Win - Fix animation bug - #4615 */
+.ui-accordion { width: 100%; }
+.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
+.ui-accordion .ui-accordion-li-fix { display: inline; }
+.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
+.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
+.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
+.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
+.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
+.ui-accordion .ui-accordion-content-active { display: block; }
+/*
+ * jQuery UI Autocomplete 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Autocomplete#theming
+ */
+.ui-autocomplete { position: absolute; cursor: default; }
+
+/* workarounds */
+* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
+
+/*
+ * jQuery UI Menu 1.8.16
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+.ui-menu {
+ list-style:none;
+ padding: 2px;
+ margin: 0;
+ display:block;
+ float: left;
+}
+.ui-menu .ui-menu {
+ margin-top: -3px;
+}
+.ui-menu .ui-menu-item {
+ margin:0;
+ padding: 0;
+ zoom: 1;
+ float: left;
+ clear: left;
+ width: 100%;
+}
+.ui-menu .ui-menu-item a {
+ text-decoration:none;
+ display:block;
+ padding:.2em .4em;
+ line-height:1.5;
+ zoom:1;
+}
+.ui-menu .ui-menu-item a.ui-state-hover,
+.ui-menu .ui-menu-item a.ui-state-active {
+ font-weight: normal;
+ margin: -1px;
+}
+/*
+ * jQuery UI Button 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Button#theming
+ */
+.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
+.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
+button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
+.ui-button-icons-only { width: 3.4em; }
+button.ui-button-icons-only { width: 3.7em; }
+
+/*button text element */
+.ui-button .ui-button-text { display: block; line-height: 1.4; }
+.ui-button-text-only .ui-button-text { padding: .4em 1em; }
+.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
+.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
+.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
+.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
+/* no icon support for input elements, provide padding by default */
+input.ui-button { padding: .4em 1em; }
+
+/*button icon element(s) */
+.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
+.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
+.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
+.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+
+/*button sets*/
+.ui-buttonset { margin-right: 7px; }
+.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
+
+/* workarounds */
+button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
+/*
+ * jQuery UI Dialog 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Dialog#theming
+ */
+.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
+.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
+.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
+.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
+.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
+.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
+.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
+.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
+.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
+.ui-draggable .ui-dialog-titlebar { cursor: move; }
+/*
+ * jQuery UI Slider 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider#theming
+ */
+.ui-slider { position: relative; text-align: left; }
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
+
+.ui-slider-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
+ * jQuery UI Tabs 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Tabs#theming
+ */
+.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
+.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
+.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
+.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
+.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
+.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
+.ui-tabs .ui-tabs-hide { display: none !important; }
+/*
+ * jQuery UI Datepicker 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Datepicker#theming
+ */
+.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
+.ui-datepicker .ui-datepicker-next-hover { right:1px; }
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
+.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover {
+ display: none; /*sorry for IE5*/
+ display/**/: block; /*sorry for IE5*/
+ position: absolute; /*must have*/
+ z-index: -1; /*must have*/
+ filter: mask(); /*must have*/
+ top: -4px; /*must have*/
+ left: -4px; /*must have*/
+ width: 200px; /*must have*/
+ height: 200px; /*must have*/
+}/*
+ * jQuery UI Progressbar 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Progressbar#theming
+ */
+.ui-progressbar { height:2em; text-align: left; }
+.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
\ No newline at end of file
Modified: JSFloorPlan/trunk/index.html
===================================================================
--- JSFloorPlan/trunk/index.html 2011-12-08 17:00:19 UTC (rev 554)
+++ JSFloorPlan/trunk/index.html 2011-12-09 10:31:43 UTC (rev 555)
@@ -3,12 +3,19 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:lang="de">
<head>
+ <meta charset="utf-8" />
+ <!--
<object id="AdobeSVG" classid="clsid:78156a80-c6a1-4bbf-8e6a-3cd390eeb4e2"></object>
<?import namespace="svg" implementation="#AdobeSVG"?>
+ -->
<title>JS Floor Plan</title>
<!-- -->
+<script src="lib/jquery-1.7.1.min.js" type="text/javascript"></script>
+<script src="lib/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
+<script src="lib/Three.js" type="text/javascript"></script>
<script src="jsfloorplan_example_helper.js" type="text/javascript"></script>
<script src="jsfloorplan.js" type="text/javascript"></script>
+<link rel="stylesheet" type="text/css" href="css/ui-lightness/jquery-ui-1.8.16.custom.css" />
<link rel="stylesheet" type="text/css" href="demo.css" />
<!-- -->
</head>
@@ -18,38 +25,20 @@
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<h2>Plan:</h2>
<!--
-<object id="top_level" data="generic_plan2.svg" width="600" height="300"
-type="image/svg+xml" name="object_name">ERROR: The browser does not support SVG!</object>
-->
-<!--
-<iframe src="generic_plan2.svg" width="300" height="100">
-</iframe>
- <svg:polygon points="10.0,10.0 10.0,200.0 200.0,200.0 200.0,10.0" style="stroke:black;stroke-width:5;" />
- <svg:polygon points="10.0,10.0 10.0,200.0 200.0,200.0 200.0,10.0" />
- <svg:g fill="black" fill-opacity=".5" transform="matrix(1 1.5 0 1 50 50)">
- <svg:g transform="matrix(1 1.5 0 1 50 50)">
- <svg:g style="stroke:black;stroke-width:5;stroke-width=length;" >
- </svg:g>
- <svg:image width="200" height="200" xlink:href="./textures/BodenGrau_1_3.jpg" transform="matrix(1 1.5 0 1 50 50)" />
- <svg:g stroke="black" stroke-width="5" >
- <svg:g>
- <svg:image width="200" height="200" xlink:href="./textures/BodenGrau_1_3.jpg" transform="matrix(1 1.5 0 1 50 50)" />
-<svg:g transform="translate(50,50)">
-<svg:image width="200" height="200" xlink:href="./textures/Wand.jpg" transform="matrix(1, 0, 0, 1, 0, 0)"/>
- </svg:g>
- </svg:g>
--->
+<div id="top_level" style="border:1px black;width:800px;height:400px">
+</div>
<table>
- <tr style="border: 1px black;"><td rowspan="2" style="border: 1px black;">
-<svg:svg width="800" height="400" id="top_level" style="border:1px black;">
-</svg:svg>
+ <tr style="border: 1px black;">
+ <td>
+ Rotation</td><td><div style="width:150px;" height="100" id="rollSlider"></div>
</td>
<td>
- Rotation</td><td><svg:svg width="150" height="100" id="rollSlider"></svg:svg>
+ Kippen</td><td><div style="width:150px;" height="100" id="tiltSlider"></div>
+ </td>
+ <td>
+ Entfernung</td><td><div style="width:150px;" height="100" id="distSlider"></div>
</td></tr>
- <tr><td>
- Kippen</td><td><svg:svg width="150" height="100" id="tiltSlider"></svg:svg>
- </td></tr>
</table>
<hr />
<h2>Status Infos:</h2>
Modified: JSFloorPlan/trunk/jsfloorplan.js
===================================================================
--- JSFloorPlan/trunk/jsfloorplan.js 2011-12-08 17:00:19 UTC (rev 554)
+++ JSFloorPlan/trunk/jsfloorplan.js 2011-12-09 10:31:43 UTC (rev 555)
@@ -27,7 +27,6 @@
// don't change anything below:
var SVG_NS ="http://www.w3.org/2000/svg";
var XLINK_NS ="http://www.w3.org/1999/xlink";
-var xmlDoc;
var ELEMENT_NODE = 1;
// calculate the distance between two cartesian 2D points
@@ -95,6 +94,7 @@
return element.setAttributeNS( XLINK_NS, attribute, value );
}
+/*
function newXMLHttpRequest()
{
try { return new XMLHttpRequest() } catch(e){}
@@ -115,7 +115,8 @@
try { return new ActiveXObject("Microsoft.XMLHTTP") } catch(e){}
return null;
};
-}
+}
+*/
/*******************************************************************/
/* IE compatability stuff ends here */
@@ -141,7 +142,7 @@
else if(httpRequest.responseXML.document == null)
{
// IE
- if (!isLocal)
+ if (!isLocal) documentElement
{
// HTTP failure
failure();
@@ -169,6 +170,7 @@
parseXMLFloorPlan();
*/
// code for IE
+ /*
if (window.ActiveXObject)
{
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
@@ -185,16 +187,10 @@
xmlDoc.async=false;
xmlDoc.onload = parseXMLFloorPlan;
xmlDoc.load("floorplan01.xml");
+ */
+ $.get('floorplan01.xml', parseXMLFloorPlan, 'xml');
+
}
-function failure()
-{
- alert("failure()");
-}
-function success( dom )
-{
- xmlDoc = dom;
- alert( xmlDoc );
-}
var floor;
var floorCount = -1;
@@ -207,8 +203,10 @@
var buildingProperties = new Object;
var imageCenter = new Object;
-function parseXMLFloorPlan()
+var noFloorplan = true;
+function parseXMLFloorPlan( xmlDoc )
{
+ noFloorplan = false;
// create the SVG node where all elements are collected in
//var plan = document.createElementNS( SVG_NS, "g" );
var plan = createSVGElement( "g" );
@@ -401,9 +399,9 @@
imageCenter.y = buildingProperties.y_center;
imageCenter.z = buildingProperties.z_max / 2;
- show25D( 35*Math.PI/180, 30*Math.PI/180, plan );
- document.getElementById( "top_level" ).appendChild( plan );
-
+ show3D( 35*Math.PI/180, 30*Math.PI/180, plan );
+ //document.getElementById( "top_level" ).appendChild( plan );
+
// clean up and save space
delete xmlDoc;
}
@@ -520,6 +518,7 @@
//var textures = new Object();
function parseTextures( nodes )
{
+ return;
var defs = createSVGElement( 'defs' );
for( var i=0; i < nodes.childNodes.length; i++ )
{
@@ -573,6 +572,8 @@
function show25D( rotation, tilt, plan )
{
////t_25d_start = new Date;
+ //console.log( rotation, tilt, plan );
+ return;
var h_short = Math.cos( tilt ); // horizontal shortening factor
var v_short = Math.sin( tilt ); // vertical shortening factor
@@ -834,3 +835,161 @@
delete plan;
plan = createSVGElement( "g" );
}
+
+var noSetup = true;
+function setup3D()
+{
+ if( noFloorplan ) return;
+ noSetup = false;
+
+ for( var i=0; i<lines[showFloor].length; )
+ {
+ //console.log(i);
+ /*
+ var s1 = rotate2D( rot_s, rot_c, vertices [ lines[showFloor][ i][0] ], imageCenter );
+ var e1 = rotate2D( rot_s, rot_c, vertices [ lines[showFloor][ i][1] ], imageCenter );
+ var sm = rotate2D( rot_s, rot_c, floorNodes[ lines[showFloor][++i][1] ], imageCenter );
+ var em = rotate2D( rot_s, rot_c, floorNodes[ lines[showFloor][ i][0] ], imageCenter );
+ var sh = v_short * floorNodes[ lines[showFloor][i][1] ].z;
+ var eh = v_short * floorNodes[ lines[showFloor][i][0] ].z;
+ var thickness = lines[showFloor][ i][2];
+ var texture = lines[showFloor][ i][3];
+ var holes = lines[showFloor][ i][4];
+ var s2 = rotate2D( rot_s, rot_c, vertices [ lines[showFloor][++i][0] ], imageCenter );
+ var e2 = rotate2D( rot_s, rot_c, vertices [ lines[showFloor][ i][1] ], imageCenter );
+ */
+ var s1 = vertices [ lines[showFloor][ i][0] ];
+ var e1 = vertices [ lines[showFloor][ i][1] ];
+ var sm = floorNodes[ lines[showFloor][++i][1] ];
+ var em = floorNodes[ lines[showFloor][ i][0] ];
+// var sh = 2.44;//floorNodes[ lines[showFloor][i][1] ].z ;
+// var eh = 2.44;//floorNodes[ lines[showFloor][i][0] ].z ;
+ var sh = floorNodes[ lines[showFloor][i][1] ].z ;
+ var eh = floorNodes[ lines[showFloor][i][0] ].z ;
+ var s2 = vertices [ lines[showFloor][++i][0] ];
+ var e2 = vertices [ lines[showFloor][ i][1] ];
+ ++i;
+ var wallSideOrder = (s2.x-s1.x)*(e1.y-s1.y) - (s2.y-s1.y)*(e1.x-s1.x);
+ //var Tvertices = [];
+
+ /**************
+ var sphere = new THREE.Mesh( new THREE.SphereGeometry(0.1, 4, 4), sphereMaterial);
+ sphere.position = new THREE.Vector3(sm.x,sm.y,0);
+ //Tvertices.push(sphere.position);
+ scene.add(sphere);
+ var sphere = new THREE.Mesh( new THREE.SphereGeometry(0.1, 4, 4), sphereMaterial);
+ sphere.position = new THREE.Vector3(sm.x,sm.y,sh);
+ //Tvertices.push(sphere.position);
+ scene.add(sphere);
+ var sphere = new THREE.Mesh( new THREE.SphereGeometry(0.1, 4, 4), sphereMaterial);
+ sphere.position = new THREE.Vector3(em.x,em.y,0);
+ //Tvertices.push(sphere.position);
+ scene.add(sphere);
+ var sphere = new THREE.Mesh( new THREE.SphereGeometry(0.1, 4, 4), sphereMaterial);
+ sphere.position = new THREE.Vector3(em.x,em.y,eh);
+ //Tvertices.push(sphere.position);
+ scene.add(sphere);
+ */
+ var geometry = new THREE.Geometry();
+
+//var vertices = [];
+//vertices.push(new THREE.Vector3(0, 0, 0));
+//vertices.push(new THREE.Vector3(1, 0, 0));
+//vertices.push(new THREE.Vector3(0, 1, 0));
+ /*
+ for ( j = 0; j < vertices.length; j = j + 4) {
+ geometry.vertices.push(new THREE.Vertex(Tvertices[j]));
+ geometry.vertices.push(new THREE.Vertex(Tvertices[j+1]));
+ geometry.vertices.push(new THREE.Vertex(Tvertices[j+2]));
+ geometry.vertices.push(new THREE.Vertex(Tvertices[j+3]));
+
+ geometry.faces.push(new THREE.Face3( j, j+1, j+2 ));
+ geometry.faces.push(new THREE.Face3( j+2, j+1, j+3 ));
+
+ //geometry.faceVertexUvs[0].push([
+ // new THREE.UV(u_value, v_value)), new THREE.UV(u_value, v_value)), new THREE.UV(u_value, v_value))
+ //]);
+ }
+ */
+ geometry.vertices.push(new THREE.Vertex(new THREE.Vector3(e1.x,e1.y,0)));
+ geometry.vertices.push(new THREE.Vertex(new THREE.Vector3(e1.x,e1.y,sh)));
+ geometry.vertices.push(new THREE.Vertex(new THREE.Vector3(s1.x,s1.y,0)));
+ geometry.vertices.push(new THREE.Vertex(new THREE.Vector3(s1.x,s1.y,sh)));
+ geometry.vertices.push(new THREE.Vertex(new THREE.Vector3(sm.x,sm.y,sh)));
+
+ geometry.vertices.push(new THREE.Vertex(new THREE.Vector3(s2.x,s2.y,0)));
+ geometry.vertices.push(new THREE.Vertex(new THREE.Vector3(s2.x,s2.y,sh)));
+ geometry.vertices.push(new THREE.Vertex(new THREE.Vector3(e2.x,e2.y,0)));
+ geometry.vertices.push(new THREE.Vertex(new THREE.Vector3(e2.x,e2.y,sh)));
+ geometry.vertices.push(new THREE.Vertex(new THREE.Vector3(em.x,em.y,sh)));
+
+ if( wallSideOrder < 0 )
+ {
+ // Add the wall sides
+ geometry.faces.push(new THREE.Face3( 0, 1, 2 ));
+ geometry.faces.push(new THREE.Face3( 3, 2, 1 ));
+ geometry.faces.push(new THREE.Face3( 5, 6, 7 ));
+ geometry.faces.push(new THREE.Face3( 8, 7, 6 ));
+ // Add the wall tops
+ geometry.faces.push(new THREE.Face3( 4, 3, 6 ));
+ geometry.faces.push(new THREE.Face3( 1, 6, 3 ));
+ geometry.faces.push(new THREE.Face3( 6, 1, 8 ));
+ geometry.faces.push(new THREE.Face3( 9, 8, 1 ));
+ } else {
+ // Add the wall sides
+ geometry.faces.push(new THREE.Face3( 0, 2, 1 ));
+ geometry.faces.push(new THREE.Face3( 3, 1, 2 ));
+ geometry.faces.push(new THREE.Face3( 5, 7, 6 ));
+ geometry.faces.push(new THREE.Face3( 8, 6, 7 ));
+ // Add the wall tops
+ geometry.faces.push(new THREE.Face3( 4, 6, 3 ));
+ geometry.faces.push(new THREE.Face3( 1, 3, 6 ));
+ geometry.faces.push(new THREE.Face3( 6, 8, 1 ));
+ geometry.faces.push(new THREE.Face3( 9, 1, 8 ));
+ }
+
+
+ geometry.computeFaceNormals();
+ //var mesh = new THREE.Mesh(geometry, new THREE.MeshNormalMaterial());
+ var mesh = new THREE.Mesh(geometry, cubeMaterial);
+ scene.add(mesh);
+ }
+
+ ///////////
+ scene.add(pointLight);
+ scene.add(ambientLight);
+ scene.add( camera );
+ var $container = $('#top_level');
+ // attach the render-supplied DOM element
+ $container.append(renderer.domElement);
+ // draw!
+ //scene.add( camera );
+ //renderer.render(scene, camera);
+ //render();
+// animate();
+
+}
+
+function show3D( rotation, tilt, plan )
+{
+ if( noSetup ) setup3D();
+
+ //var dist = 30;
+ /*
+ //camera.position.z = rotation * 180 / Math.PI;
+ //camera.rotation.z = rotation;
+ //camera.rotation.y = tilt;
+ camera.position.z = Math.sin(tilt) * dist;
+ camera.position.x = Math.cos(tilt) * dist * Math.sin(rotation);
+ camera.position.y = Math.cos(tilt) * dist * Math.cos(rotation);
+ */
+ //renderer.render(scene, camera);
+ var cx = -Math.cos(rotation) * Math.cos(tilt);
+ var cy = Math.sin(rotation) * Math.cos(tilt);
+ var cz = Math.sin(tilt);
+ camera.up = new THREE.Vector3( -cx, -cy, 1 );
+ camera.position = new THREE.Vector3( cx*dist + buildingProperties.x_center, cy*dist + buildingProperties.y_center, dist * cz );
+ camera.lookAt( new THREE.Vector3( buildingProperties.x_center, buildingProperties.y_center, 0) );
+ pointLight.position = camera.position;
+ render();
+}
\ No newline at end of file
Modified: JSFloorPlan/trunk/jsfloorplan_example_helper.js
===================================================================
--- JSFloorPlan/trunk/jsfloorplan_example_helper.js 2011-12-08 17:00:19 UTC (rev 554)
+++ JSFloorPlan/trunk/jsfloorplan_example_helper.js 2011-12-09 10:31:43 UTC (rev 555)
@@ -22,6 +22,145 @@
* *
***************************************************************************/
+
+function three_init()
+{
+ return;
+ // get the DOM element to attach to
+ // - assume we've got jQuery to hand
+ //var $container = $('#container');
+ var $container = $('#top_level');
+ // attach the render-supplied DOM element
+ $container.append(renderer.domElement);
+ // draw!
+ //scene.add( camera );
+ //renderer.render(scene, camera);
+ //render();
+ animate();
+}
+// set the scene size
+var WIDTH = 800,
+ HEIGHT = 400;
+
+// set some camera attributes
+var VIEW_ANGLE = 45,
+ ASPECT = WIDTH / HEIGHT,
+ NEAR = 0.1,
+ FAR = 10000;
+
+
+// create a WebGL renderer, camera
+// and a scene
+var renderer = new THREE.WebGLRenderer();
+var camera = new THREE.PerspectiveCamera(
+ VIEW_ANGLE,
+ ASPECT,
+ NEAR,
+ FAR );
+var controls = new THREE.TrackballControls( camera );
+//controls.rotateSpeed = 1.0;
+//controls.zoomSpeed = 1.2;
+//controls.panSpeed = 0.8;
+
+controls.noZoom = false;
+controls.noPan = false;
+
+controls.staticMoving = true;
+controls.dynamicDampingFactor = 0.3;
+
+controls.keys = [ 65, 83, 68 ];
+
+var scene = new THREE.Scene();
+
+// the camera starts at 0,0,0 so pull it back
+camera.position.z = 300;
+
+// start the renderer
+renderer.setSize(WIDTH, HEIGHT);
+
+
+// set up the sphere vars
+var radius = 50, segments = 16, rings = 16;
+
+// create the sphere's material
+var sphereMaterial = new THREE.MeshLambertMaterial(
+{
+ color: 0xCC0000
+});
+// create a new mesh with sphere geometry -
+// we will cover the sphereMaterial next!
+var sphere = new THREE.Mesh(
+ new THREE.SphereGeometry(radius,
+ segments,
+ rings),
+
+ sphereMaterial);
+
+// add the sphere to the scene
+//scene.add(sphere);
+
+var cubeMaterial = new THREE.MeshLambertMaterial(
+{
+ color: 0x0000CC
+});
+var cube = new THREE.Mesh(
+ new THREE.CubeGeometry(
+ 10, 20, 30,
+ 2, 2),
+ cubeMaterial
+);
+cube.position = new THREE.Vector3(50,50,50);
+//scene.add( cube );
+
+// create a point light
+var pointLight = new THREE.PointLight( 0xFFFFFF );
+
+var ambientLight = new THREE.AmbientLight( 0xFFFFFF );
+// set its position
+pointLight.position.x = 10;
+pointLight.position.y = 50;
+pointLight.position.z = 130;
+
+// add to the scene
+//scene.add(pointLight);
+
+
+/**
+ * Provides requestAnimationFrame in a cross browser way.
+ * http://paulirish.com/2011/requestanimationframe-for-smart-animating/
+ */
+
+if ( !window.requestAnimationFrame ) {
+ window.requestAnimationFrame = ( function() {
+ return window.webkitRequestAnimationFrame ||
+ window.mozRequestAnimationFrame ||
+ window.oRequestAnimationFrame ||
+ window.msRequestAnimationFrame ||
+ function( /* function FrameRequestCallback */ callback, /* DOMElement Element */ element ) {
+ window.setTimeout( callback, 1000 / 60 );
+ };
+} )();
+
+}
+function animate() {
+ requestAnimationFrame( animate );
+ //render();
+ show3D();
+ //stats.update();
+}
+
+function render() {
+ //controls.update();
+ renderer.render( scene, camera );
+}
+
+//}
+
+/////////////////////////////////////////////////////////////////////////////
+$(function() {
+ three_init();
+});
+/////////////////////////////////////////////////////////////////////////////
// setup script here:
var sc = 40; // overall scaling
var showWallSides = true;
@@ -32,7 +171,7 @@
var showHoles = true;
var showZones = true;
var showVisibleZones = false;
-var showFloor = 0;
+var showFloor = 1;
var wallMouseOver = true;
var fillOpacity = 0.5;
var fillColor = 'black';
@@ -41,6 +180,7 @@
var roll = 35*Math.PI/180;
var tilt = 30*Math.PI/180;
var tilt_dir = 1;
+var dist = 10;
//var plan = createSVGElement( "g" );
var f_avr = 0;
var m_avr = 0;
@@ -99,15 +239,11 @@
if( tilt < 0 )
tilt_dir = 1;
- show25D( roll, tilt, plan );
+ show3D( roll, tilt, plan );
//////
var middle = new Date();
- //////
- replaceSVG( document.getElementById( 'top_level' ) );
- //////
-
var post = new Date();
//////
@@ -132,7 +268,8 @@
var txt = '';//"c1: " + calc1 + "; c2: " + calc2;
- var text = (m_avr<10?"0":"")+Math.floor(m_avr)+" Millisekunden zum Neuzeichnen verwendet\n"
+ var text = "roll: " + roll + "; tilt: " + tilt + " (" + (tilt*180/Math.PI) + "; " + tilt_dir + ")\n" +
+ (m_avr<10?"0":"")+Math.floor(m_avr)+" Millisekunden zum Neuzeichnen verwendet\n"
+ Math.floor(f_avr)+" Millisekunden inklusive Neuberechnung verwendet (von " + redrawInterval + " Millisekunden)\n"
+ "Aktuelle, maximale Rate wären "+fps+" fps (aktuell festgesetzt sind "+Math.floor(1000/redrawInterval)+" FPS)\n"
+ "Die letzten 10 Schritte wären mindestes " + fps_min + " FPS und höchstens " + fps_max + " FPS möglich gewesen.\n"
@@ -181,8 +318,7 @@
if( redraw )
{
- show25D( roll, tilt, plan );
- replaceSVG( document.getElementById( 'top_level' ) );
+ show3D( roll, tilt, plan );
}
}
@@ -204,8 +340,7 @@
if( redraw )
{
- show25D( roll, tilt, plan );
- replaceSVG( document.getElementById( 'top_level' ) );
+ show3D( roll, tilt, plan );
}
}
@@ -213,138 +348,41 @@
// as well as the buttons to manipulate them
function...
[truncated message content] |
|
From: <j-...@us...> - 2011-12-08 17:00:26
|
Revision: 554
http://openautomation.svn.sourceforge.net/openautomation/?rev=554&view=rev
Author: j-n-k
Date: 2011-12-08 17:00:19 +0000 (Thu, 08 Dec 2011)
Log Message:
-----------
Unwetterzentrale: changed to conf.d, added heiht detection (thanks ctr)
Modified Paths:
--------------
wiregate/plugin/generic/Unwetterzentrale.pl
Added Paths:
-----------
wiregate/plugin/generic/conf.d/Unwetterzentrale.conf_sample
Modified: wiregate/plugin/generic/Unwetterzentrale.pl
===================================================================
--- wiregate/plugin/generic/Unwetterzentrale.pl 2011-12-06 22:22:46 UTC (rev 553)
+++ wiregate/plugin/generic/Unwetterzentrale.pl 2011-12-08 17:00:19 UTC (rev 554)
@@ -1,34 +1,37 @@
# Plugin zum Auslesen der Unwettermeldungen
-# Version 0.2 14.11.2011
+# Version 0.3 07.12.2011
# Copyright: JNK (http://knx-user-forum.de/members/jnk.html)
# In Anlehnung an HS/FS Logikbaustein 19909 by Michael Grosalski
+# Hoehenerkennung angeregt von ctr (http://knx-user-forum.de/members/ctr.html)
# License: GPL (v2)
-# Aufbau m\xF6glichst so, dass man unterhalb der Einstellungen nichts ver\xE4ndern muss!
-
####################
###Einstellungen:###
####################
-# fuer alle Adressen gilt: wenn = '', dann kein senden an diese Adresse
+# !!!!!! config-file beachten !!!!!
-my $unwetter_txt_GA = '0/1/1'; # sendet Textmeldung DPT 16
-my $unwetter_max_stufe_GA = '0/1/2'; # sendet h\xF6chste Warnstufe als DPT 5.005
-my $unwetter_max_typ_GA = '0/1/3'; # sendet h\xF6chsten Warntyp als DPT 5.005
-my $unwetter_max_neu_GA = '0/1/4'; # sendet 1=neue Meldungen, 0=alte Meldungen, DPT 1
+my $unwetter_txt_GA; # sendet Textmeldung DPT 16
+my $unwetter_max_stufe_GA; # sendet h\xF6chste Warnstufe als DPT 5.005
+my $unwetter_max_typ_GA; # sendet h\xF6chsten Warntyp als DPT 5.005
+my $unwetter_max_neu_GA; # sendet 1=neue Meldungen, 0=alte Meldungen, DPT 1
-my $plz = '45886'; #PLZ
+my $plz; #PLZ
my $baseurl = 'http://www.unwetterzentrale.de/uwz/getwarning_de.php?plz='; # Basis-URL
my $country = 'DE'; # Land
my $lang = 'de'; # deutsch
+my $hoehe; # Hoehenbegrenzung
-my $udp_addr = '192.168.0.51:50018'; # udp Adresse fuer Textmeldung (z.B. an PROWL Plugin)
+my $udp_addr; # udp Adresse fuer Textmeldung (z.B. an PROWL Plugin)
+my $show_debug = 0;
+
######################
##ENDE Einstellungen##
######################
use LWP::Simple;
+use Encode;
my %warnstufen = ( gelb => 1, orange => 2, rot => 3, violett => 4 );
my %warntyp = ( gewitter => 1, glatteisregen => 2, regen => 3, schnee => 4, sturm => 5, temperatur => 6, strassenglaette => 7);
@@ -36,6 +39,33 @@
my @warnstufen_txt = ( 'keine Meldung', 'Vorwarn.', '', 'stark. ', 'extr. ' );
my @warntyp_txt = ( '', 'Gewitter', 'Glatteis', 'Regen', 'Schnee', 'Sturm', 'Temperatur', 'Glaette' );
+my $confFile = '/etc/wiregate/plugin/generic/conf.d/'.basename($plugname,'.pl');
+if (! -f $confFile)
+{
+ plugin_log($plugname, " no conf file [$confFile] found.");
+}
+else
+{
+ plugin_log($plugname, " reading conf file [$confFile].") if( $show_debug > 1);
+ open(CONF, $confFile);
+ my @lines = <CONF>;
+ close($confFile);
+ my $result = eval("@lines");
+ if( $show_debug > 1 )
+ {
+ ($result) and plugin_log($plugname, "conf file [$confFile] returned result[$result]");
+ }
+ if ($@)
+ {
+ plugin_log($plugname, "conf file [$confFile] returned:") if( $show_debug > 1 );
+ my @parts = split(/\n/, $@);
+ if( $show_debug > 1 )
+ {
+ plugin_log($plugname, "--> $_") foreach (@parts);
+ }
+ }
+}
+
$plugin_info{$plugname.'_cycle'} = 900;
# Abfrage
@@ -43,24 +73,69 @@
my $url = $baseurl.$plz.'&uwz=UWZ-'.$country.'&lang='.$lang;
my $content = get($url);
-if ($content eq undef) {
+if ($content eq undef)
+{
return 'HTTP failed.';
}
-my @LINES = split (/\n/, $content);
+my @LINES = split (/\n/, decode('UTF-8', $content));
my $high_typ = 0;
my $high_stufe = 0;
my $all_str = '';
my $typ;
my $stufe;
+my $process_next = 1; # 1 = beachten, 0= nicht beachten, standard ist: beachten.
-for (my $i=0;$i<@LINES;$i++) {
- if ($LINES[$i] =~ /<div style="float:left;display:block;width:117px;height:110px;padding-top:6px;"><img src="..\/images\/icons\/(.*?)-(.*?).gif" width="117" height="104"><\/div>/i) {
+for (my $i=0;$i<@LINES;$i++)
+{
+ if ($LINES[$i] =~ /\s*<span style="\s*color:.*?;">g.?ltig f.?r:<\/span> <b>(.*?)<\/b>/i)
+ {
+ my $warnung_hoehe_text = $1;
+ if ($warnung_hoehe_text =~ /\s*H.hen bis (\d+) m/i)
+ {
+ if ($show_debug > 1)
+ {
+ plugin_log($plugname, "naechste Meldung bis ".$1 );
+ }
+ $process_next = ($1 ge $hoehe);
+ }
+ elsif ($warnung_hoehe_text =~ /\s*H.hen ab (\d+) m/i)
+ {
+ if ($show_debug > 1)
+ {
+ plugin_log($plugname, "naechste Meldung ab ".$1 );
+ }
+ $process_next = ($1 le $hoehe);
+ }
+ elsif ($warnung_hoehe_text =~ /\s*H.hen von (\d+) bis (\d+) m/i)
+ {
+ if ($show_debug > 1)
+ {
+ plugin_log($plugname, "naechste Meldung von ".$1." bis ".$2 );
+ }
+ $process_next = (($1 le $hoehe) && ($2 ge $hoehe));
+ }
+ else
+ {
+ if ($show_debug > 1)
+ {
+ plugin_log($plugname, "naechste Meldung Hoehe nicht erkannt/alle Hoehen" );
+ }
+ $process_next = 1;
+ }
+ if ($show_debug > 1)
+ {
+ plugin_log($plugname, "naechste Meldung prozessieren: ".$process_next );
+ }
+ }
+ elsif (($process_next || ($hoehe eq undef)) && ($LINES[$i] =~ /<div style="float:left;display:block;width:117px;height:110px;padding-top:6px;"><img src="..\/images\/icons\/(.*?)-(.*?).gif" width="117" height="104"><\/div>/i))
+ {
$typ = $warntyp{$1};
$stufe = $warnstufen{$2};
my $str = $stufe.$typ;
- if ($stufe>$high_stufe) {
+ if ($stufe>$high_stufe)
+ {
$high_stufe = $stufe;
$high_typ = $typ;
}
@@ -68,38 +143,44 @@
}
}
-
-
-if ($unwetter_txt_GA) {
+if ($unwetter_txt_GA)
+{
knx_write($unwetter_txt_GA, $warnstufen_txt[$high_stufe].$warntyp_txt[$high_typ], 16);
}
-if ($unwetter_max_stufe_GA) {
+if ($unwetter_max_stufe_GA)
+{
knx_write($unwetter_max_stufe_GA, $high_stufe, 5.005);
}
-if ($unwetter_max_typ_GA) {
+if ($unwetter_max_typ_GA)
+{
knx_write($unwetter_max_typ_GA, $high_typ, 5.005);
}
-if ($plugin_info{$plugname.'_allstr'} == $all_str) {
- if ($unwetter_max_neu_GA) {
+if ($plugin_info{$plugname.'_allstr'} == $all_str)
+{
+ if ($unwetter_max_neu_GA)
+ {
knx_write($unwetter_max_neu_GA, 0, 1);
}
-} else {
- if ($unwetter_max_neu_GA) {
+}
+else
+{
+ if ($unwetter_max_neu_GA)
+ {
knx_write($unwetter_max_neu_GA, 1, 1);
}
- if ($udp_addr) {
+ if ($udp_addr)
+ {
my $sock = IO::Socket::INET->new(
Proto => 'udp',
PeerAddr => $udp_addr,
);
- my $meldung = $warnstufen_txt[$high_stufe].' '.$warntyp_txt[$high_typ];
+ my $meldung = $warnstufen_txt[$high_stufe].$warntyp_txt[$high_typ];
$sock->send("0;Unwetterwarnung;Unwetterwarnung;$meldung\n");
}
$plugin_info{$plugname.'_allstr'} = $all_str;
-
}
-return $all_str;
\ No newline at end of file
+return 0;
\ No newline at end of file
Added: wiregate/plugin/generic/conf.d/Unwetterzentrale.conf_sample
===================================================================
--- wiregate/plugin/generic/conf.d/Unwetterzentrale.conf_sample (rev 0)
+++ wiregate/plugin/generic/conf.d/Unwetterzentrale.conf_sample 2011-12-08 17:00:19 UTC (rev 554)
@@ -0,0 +1,67 @@
+#############################################################################
+# Konfiguration
+#############################################################################
+
+#############################################################################
+# Adress-Optionen
+#############################################################################
+#
+# $unwetter_txt_GA = '0/1/1';
+# => sendet Textmeldung DPT 16 auf die angebene GA
+#
+# $unwetter_max_stufe_GA = '0/1/2';
+# => sendet h\xF6chste Warnstufe als DPT 5.005
+#
+# $unwetter_max_typ_GA = '0/1/3';
+# => sendet h\xF6chsten Warntyp als DPT 5.005
+#
+# $unwetter_max_neu_GA = '0/1/4';
+# => sendet 1=neue Meldungen, 0=alte Meldungen, DPT 1
+#
+# $udp_addr = '192.168.0.51:50018';
+# => UDP Adresse fuer Textmeldung (z.B. an PROWL Plugin)
+#
+# fuer alle Adressen gilt: wenn NICHT definiert => Funktion unbenutzt
+# wenn definiert: Funktion benutzt
+#
+
+$unwetter_txt_GA = '0/1/1';
+$unwetter_max_stufe_GA = '0/1/2';
+$unwetter_max_typ_GA = '0/1/3';
+$unwetter_max_neu_GA = '0/1/4';
+$udp_addr = '192.168.0.51:50018';
+
+#############################################################################
+# Orts-Optionen
+#############################################################################
+#
+# $plz = '45886';
+# => PLZ des Warnortes, wird unbedingt benoetigt
+#
+# $baseurl = 'http://www.unwetterzentrale.de/uwz/getwarning_de.php?plz=';
+# => Basis-URL der Unwetterzentrale, Voreinstellung: Deutschland
+# fuer Deutschland: 'http://www.unwetterzentrale.de/uwz/getwarning_de.php?plz=';
+# fuer die Schweiz: 'http://alarm.meteocentrale.ch/getwarning_de.php?plz='
+#
+# $country = 'DE';
+# => Laenderkuerzel, Voreinstellung: DE
+#
+# $lang = 'de';
+# => Mitteilungssprache, Voreinstellung: deutsch
+#
+# $hoehe = 430;
+# => Hoehe des Ortes in m, wenn nicht definiert: alle Meldungen werden bearbeitet
+#
+
+$plz = '45886'; # Gelsenkirchen-Ueckendorf
+
+
+#############################################################################
+
+#############################################################################
+
+# emacs setting
+# ;;; Local Variables: ***
+# ;;; mode:perl ***
+# ;;; End: ***
+# vim: set filetype=perl expandtab tabstop=8 shiftwidth=2 autoindent smartindent:
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-12-06 22:22:52
|
Revision: 553
http://openautomation.svn.sourceforge.net/openautomation/?rev=553&view=rev
Author: makki1
Date: 2011-12-06 22:22:46 +0000 (Tue, 06 Dec 2011)
Log Message:
-----------
Plugin for SMA Sunny Webbox
Added Paths:
-----------
wiregate/plugin/generic/SunnyWeb.pl
Added: wiregate/plugin/generic/SunnyWeb.pl
===================================================================
--- wiregate/plugin/generic/SunnyWeb.pl (rev 0)
+++ wiregate/plugin/generic/SunnyWeb.pl 2011-12-06 22:22:46 UTC (rev 553)
@@ -0,0 +1,57 @@
+# Plugin zur Abfrage einer Sunny Webbox-2 (BT)
+# V 1.0
+# Aufbau moeglichst so, dass man unterhalb der Definitionen nichts aendern muss!
+
+##################
+### DEFINITION ###
+##################
+
+my $ip = "192.168.1.110";
+my $user = "Installer";
+my $pass = "1111";
+my $url = "/culture/login?Language=LangDE&Userlevels=".$user."&password=".$pass;
+
+# 13.010 DPT_ActiveEnergy [-2 147 483 648 ... 2 147 483 647] Wh
+my $name = "PV-Anlage"; # Name fuer die RRD-Archive
+my $ga_ertrag = "13/3/1"; # GA fuer Gesamtertrag in Wh DPT13
+my $ga_tagesertrag = "13/3/2"; # GA fuer Tagesertrag in Wh DPT13
+my $ga_error = "13/3/0"; # GA erhaelt eine 1 wenn Anlagenzustand nicht Ok
+
+$plugin_info{$plugname.'_cycle'} = 300; # Eigenen Aufruf-Zyklus setzen
+
+#######################
+### ENDE DEFINITION ###
+#######################
+
+# Hauptverarbeitung
+use LWP::Simple;
+use XML::Simple;
+
+my $xml = get("http://".$ip.$url);
+return "Fehler beim auslesen!" unless $xml;
+my $data = XMLin($xml)->{Content}->{Element}->{Tab}->{'hp.PlantOverview'}->{Element};
+my $separator = $data->{'decimalSeparator'};
+my $dataP = $data->{Element}[0]->{Items}->{XmlItem}->{'Solar-Wechselrichter'}->{Items}->{XmlItem};
+
+my $zustand = $dataP->{Zustand}{'Value'};
+my $gesErtrag = $dataP->{Gesamtertrag}{'Value'};
+my $tagErtrag = $dataP->{Tagesertrag}{'Value'};
+my $gesFactor = $dataP->{Gesamtertrag}{'factor'};
+$gesErtrag =~ s/$separator/\./;
+$gesErtrag *= $gesFactor;
+
+knx_write($ga_ertrag,$gesErtrag,13);
+knx_write($ga_tagesertrag,$tagErtrag,13);
+
+if ($zustand !~ /Ok/) {
+ # Etwas mit dem Problem machen
+ knx_write($ga_error,1,1)
+}
+
+# Werte loggen
+update_rrd($name,"_Leistung",$gesErtrag*3600,"COUNTER");
+update_rrd($name,"_Tag",$tagErtrag);
+
+#DEBUG: return "Zustand $zustand Tag: $tagErtrag Wh Gesamt $gesErtrag Wh";
+return;
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-12-05 18:53:10
|
Revision: 552
http://openautomation.svn.sourceforge.net/openautomation/?rev=552&view=rev
Author: makki1
Date: 2011-12-05 18:53:03 +0000 (Mon, 05 Dec 2011)
Log Message:
-----------
Fix encoding for current (v4.0.7) .knxproj
Modified Paths:
--------------
tools/ets4tools/ets4parser.pl
Modified: tools/ets4tools/ets4parser.pl
===================================================================
--- tools/ets4tools/ets4parser.pl 2011-11-30 21:53:11 UTC (rev 551)
+++ tools/ets4tools/ets4parser.pl 2011-12-05 18:53:03 UTC (rev 552)
@@ -21,6 +21,7 @@
use XML::Simple;
use Data::Dumper;
use POSIX;
+binmode(STDOUT, ":utf8");
no warnings qw(uninitialized);
@@ -31,8 +32,8 @@
}
my $file0 = glob("P-*/0.xml");
-open(my $fh, "<:encoding(ISO-8859-1)", $file0) || die "can't open file: $!";
-open(my $knxmfh, "<:encoding(ISO-8859-1)", 'knx_master.xml') || die "can't open file: $!";
+open(my $fh, $file0) || die "can't open file: $!";
+open(my $knxmfh, 'knx_master.xml') || die "can't open file: $!";
#special case: only one MG/GA etc. fixed with forcearray
my $proj = XMLin($fh, ForceArray => ['GroupRange','GroupAddress','Area','Line','DeviceInstance','ComObjectInstanceRef','Send','Receive']);
@@ -150,3 +151,4 @@
return;
}
}
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-30 21:53:17
|
Revision: 551
http://openautomation.svn.sourceforge.net/openautomation/?rev=551&view=rev
Author: mayerch
Date: 2011-11-30 21:53:11 +0000 (Wed, 30 Nov 2011)
Log Message:
-----------
As discussed: last minute change for 0.6.1 and "backport" to trunk: remove version information in visu_config.xml (but leave it in visu_config_demo.xml)
Modified Paths:
--------------
CometVisu/branches/release_0.6.1/visu/visu_config.xml
CometVisu/trunk/visu/visu_config.xml
Modified: CometVisu/branches/release_0.6.1/visu/visu_config.xml
===================================================================
--- CometVisu/branches/release_0.6.1/visu/visu_config.xml 2011-11-29 16:33:08 UTC (rev 550)
+++ CometVisu/branches/release_0.6.1/visu/visu_config.xml 2011-11-30 21:53:11 UTC (rev 551)
@@ -59,7 +59,6 @@
]]></status>
<status type="html"><![CDATA[
- <a href="check_config.php">Check Config</a>
- <div style="float:right;padding-right:0.5em">Version: 0.6.1</div>
]]></status>
</statusbar>
</meta>
Modified: CometVisu/trunk/visu/visu_config.xml
===================================================================
--- CometVisu/trunk/visu/visu_config.xml 2011-11-29 16:33:08 UTC (rev 550)
+++ CometVisu/trunk/visu/visu_config.xml 2011-11-30 21:53:11 UTC (rev 551)
@@ -59,7 +59,6 @@
]]></status>
<status type="html"><![CDATA[
- <a href="check_config.php">Check Config</a>
- <div style="float:right;padding-right:0.5em">Version: SVN</div>
]]></status>
</statusbar>
</meta>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2011-11-29 16:33:18
|
Revision: 550
http://openautomation.svn.sourceforge.net/openautomation/?rev=550&view=rev
Author: j-n-k
Date: 2011-11-29 16:33:08 +0000 (Tue, 29 Nov 2011)
Log Message:
-----------
merged all changes from post-0.6.0 to HEAD, fixing TAB in a lot of places
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/lib/templateengine.js
CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
CometVisu/trunk/visu/visu_config.xsd
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2011-11-27 21:44:05 UTC (rev 549)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-11-29 16:33:08 UTC (rev 550)
@@ -60,7 +60,14 @@
this.addCreator('page', {
create: function( page, path, flavour ) {
var $p = $(page);
- var ret_val = $('<div class="widget" />');
+
+ var address = {};
+ if ($p.attr('ga')) {
+ src = $p.attr('ga');
+ ga_list.push($p.attr('ga'));
+ address[ '_' + $p.attr('ga') ] = [ 'DPT:1.001', 0 ];
+ }
+
var pstyle = ( '0' != path ) ? 'display:none;' : ''; // subPage style
var name = $p.attr('name');
var type = $p.attr('type'); //text, 2d or 3d
@@ -68,10 +75,24 @@
var wstyle = ''; // widget style
if( $p.attr('align') ) wstyle += 'text-align:' + $p.attr('align') + ';';
if( wstyle != '' ) wstyle = 'style="' + wstyle + '"';
- ret_val.addClass( 'link' ).addClass('pagelink');
- ret_val.append( '<div ' + wstyle + '><a href="javascript:scrollToPage(\''+path+'\')">' + name + '</a></div>' );
+
+ var ret_val;
+
+ if ($p.attr('visible')=='false') {
+ ret_val=$('');
+ } else { // default is visible
+ ret_val = $('<div class="widget"/>');
+ ret_val.addClass( 'link' ).addClass('pagelink');
+ ret_val.append( '<div ' + wstyle + '><a href="javascript:scrollToPage(\''+path+'\')">' + name + '</a></div>' );
+ }
+
var childs = $p.children();
var container = $( '<div class="clearfix"/>' );
+
+ var $container = $( '<div class="clearfix" path="'+path+'"/>');
+ for( var addr in address ) $container.bind( addr, this.update );
+ var container=$container;
+
container.append( '<h1>' + name + '</h1>' );
$( childs ).each( function(i){
container.append( create_pages( childs[i], path + '_' + i, flavour ) );
@@ -85,10 +106,18 @@
attributes: {
align: { type: 'string', required: false },
flavour:{ type: 'string', required: false },
- name: { type: 'string', required: true }
+ name: { type: 'string', required: true },
+ ga: { type: 'addr', required: false },
+ visible:{ type: 'string', required: false }
},
elements: {
},
+ update: function(e, data) {
+ if (data==01) {
+ scrollToPage(this.attributes.path.nodeValue);
+ visu.write(e.type.substr(1), transformEncode("DPT:1.001", 0));
+ }
+ },
content: true
});
@@ -697,7 +726,11 @@
if( $p.attr('background') ) style += 'background-color:' + $p.attr('background') + ';';
if( style != '' ) style = 'style="' + style + '"';
var actor = '<div class="actor"><iframe src="' +$p.attr('src') + '" ' + style + '></iframe></div>';
- ret_val.append( $(actor) );
+
+ var refresh = $p.attr('refresh') ? $p.attr('refresh')*1000 : 0;
+ ret_val.append( $(actor).data( {
+ 'refresh': refresh
+ } ).each(setupRefreshAction) ); // abuse "each" to call in context...
return ret_val;
},
attributes: {
@@ -705,7 +738,8 @@
width: { type: 'string', required: false },
height: { type: 'string', required: false },
frameborder: { type: 'list' , required: false, list: {'true': "yes", 'false': "no"} },
- background: { type: 'string', required: false }
+ background: { type: 'string', required: false },
+ refresh: { type: 'numeric', required: false }
},
elements: {
label: { type: 'string', required: false, multi: false }
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2011-11-27 21:44:05 UTC (rev 549)
+++ CometVisu/trunk/visu/lib/templateengine.js 2011-11-29 16:33:08 UTC (rev 550)
@@ -344,6 +344,14 @@
{
$('#'+page_id).css( 'display', '' ); // show new page
main_scroll.seekTo( $('.page').index( $('#'+page_id)[0] ), speed ); // scroll to it
+ var pagedivs=$('div', '#'+page_id);
+ for( var i = 0; i<pagedivs.length; i++) //check for inline diagrams & refresh
+ {
+ if( pagedivs[i].className == 'diagram_inline')
+ {
+ refreshDiagram(pagedivs[i]);
+ }
+ }
}
function updateTopNavigation()
@@ -408,7 +416,7 @@
var refresh = $(this).data('refresh');
if( refresh && refresh > 0 )
{
- var target = $('img', $(this) )[0];
+ var target = $('img', $(this) )[0] || $('iframe', $(this) )[0];
var src = target.src;
if( src.indexOf('?') < 0 ) src += '?';
$(this).data('interval', setInterval( function(){refreshAction(target, src);}, refresh ) );
Modified: CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2011-11-27 21:44:05 UTC (rev 549)
+++ CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2011-11-29 16:33:08 UTC (rev 550)
@@ -56,6 +56,8 @@
diagram.data("datasource", $p.attr("datasource") || "AVERAGE");
diagram.data("label", $p.find('label')[0] ? $p.find('label')[0].textContent : '');
diagram.data("refresh", $p.attr("refresh"));
+ diagram.data("linecolor", $p.attr("linecolor") || "");
+ diagram.data("gridcolor", $p.attr("gridcolor") || "");
refreshDiagram(diagram, {});
@@ -69,7 +71,9 @@
series: {type: "list", required: false, list: {hour: "hours", day: "days", week: "weeks", month: "months", year: "years"}},
period: {type: "numeric", required: false},
datasource: {type: "list", required: false, list: {'MIN': "Min", 'AVERAGE': "Avg", 'MAX': "Max"}},
- refresh: {type: "numeric", required: false}
+ refresh: {type: "numeric", required: false},
+ linecolor: {type: "string", required: false},
+ gridcolor: {type: "string", required: false}
},
elements: {
label: { type: 'string', required: false, multi: false }
@@ -112,6 +116,8 @@
diagram.data("datasource", $p.attr("datasource") || "AVERAGE");
diagram.data("label", $p.find('label')[0] ? $p.find('label')[0].textContent : '');
diagram.data("refresh", $p.attr("refresh"));
+ diagram.data("linecolor", $p.attr("linecolor") || "");
+ diagram.data("gridcolor", $p.attr("gridcolor") || "");
var bDiagram = $("<div class=\"diagram\" id=\"" + id + "_big\"/>");
@@ -177,6 +183,8 @@
period: {type: "numeric", required: false},
datasource: {type: "list", required: false, list: {'MIN': "Min", 'AVERAGE': "Avg", 'MAX': "Max"}},
refresh: {type: "numeric", required: false},
+ linecolor: {type: "string", required: false},
+ gridcolor: {type: "string", required: false},
tooltip: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
},
elements: {
@@ -185,6 +193,140 @@
content: false
});
+VisuDesign_Custom.prototype.addCreator("diagram_info", {
+ create: function( page, path ) {
+ var $p = $(page);
+
+ var address = {};
+ $p.find('address').each( function(){
+ var src = this.textContent;
+ ga_list.push( src )
+ address[ '_' + src ] = [ this.getAttribute('transform') ];
+ });
+
+ function uniqid() {
+ var newDate = new Date;
+ return newDate.getTime();
+ }
+
+ var id = "diagram_" + uniqid();
+
+ var ret_val = $('<div class="widget" />');
+ ret_val.addClass( 'diagram' );
+
+ var labelElement = $p.find('label')[0];
+ var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
+
+ var actor = '<div class="actor switchUnpressed ';
+ if ( $p.attr( 'align' ) )
+ actor += $p.attr( 'align' );
+ actor += '">';
+ var map = $p.attr('mapping');
+ if( mappings[map] && mappings[map][value] )
+ actor += '<div class="value">' + mappings[map][value] + '</div>';
+ else
+ actor += '<div class="value">-</div>';
+ actor += '</div>';
+
+ var $actor = $(actor).data({
+ 'address' : address,
+ 'format' : $p.attr('format'),
+ 'mapping' : $p.attr('mapping'),
+ 'styling' : $p.attr('styling')
+ });
+ for( var addr in address ) $actor.bind( addr, this.update );
+
+ ret_val.append(label).append($actor);
+
+ $actor.addClass("clickable");
+
+ var bDiagram = $("<div class=\"diagram\" id=\"" + id + "_big\"/>");
+
+ bDiagram.data("id", id);
+ bDiagram.data("rrd", $p.attr("rrd"));
+ bDiagram.data("unit", $p.attr("unit") || "");
+ bDiagram.data("series", $p.attr("series") || "day");
+ bDiagram.data("period", $p.attr("period") || 1);
+ bDiagram.data("datasource", $p.attr("datasource") || "AVERAGE");
+ bDiagram.data("label", labelElement.textContent);
+ bDiagram.data("refresh", $p.attr("refresh"));
+ bDiagram.data("linecolor", $p.attr("linecolor") || "");
+ bDiagram.data("gridcolor", $p.attr("gridcolor") || "");
+
+ var data = jQuery.extend({}, bDiagram.data());
+
+ $actor.bind("click", function() {
+ bDiagram.data(data);
+ bDiagram.css({height: "90%"});
+
+ showPopup("unknown", {title: labelElement.textContent, content: bDiagram});
+ bDiagram.parent("div").css({height: "100%", width: "90%", margin: "auto"}); // define parent as 100%!
+
+ var bDiagramOpts = {yaxis: {labelWidth: null}};
+ if ($p.attr("tooltip") == "true") {
+ // if we want to display a tooltip, we need to listen to the event
+ var previousPoint = null;
+ jQuery(bDiagram).bind("plothover", function (event, pos, item) {
+ jQuery("#x").text(pos.x.toFixed(2));
+ jQuery("#y").text(pos.y.toFixed(2));
+
+ if (item) {
+ if (previousPoint != item.datapoint) {
+ previousPoint = item.datapoint;
+
+ $("#diagramTooltip").remove();
+ var x = item.datapoint[0],
+ y = item.datapoint[1].toFixed(2);
+
+ //This is a mess but toLocaleString expects UTC again
+ var offset = new Date().getTimezoneOffset() * 60 * 1000;
+ var dte = new Date(x + offset);
+ showDiagramTooltip(item.pageX, item.pageY,
+ dte.toLocaleString() + ": " + y + jQuery(this).data("unit"));
+ }
+ }
+ else {
+ $("#diagramTooltip").remove();
+ previousPoint = null;
+ }
+
+ })
+ .bind("click", function(event) {
+ // don't let the popup know about the click, or it will close on touch-displays
+ event.stopPropagation();
+ });
+
+ bDiagramOpts = jQuery.extend(bDiagramOpts, {grid: {hoverable: true, clickable: true} });
+ }
+
+ refreshDiagram(bDiagram, bDiagramOpts);
+ return false;
+ });
+
+ return ret_val;
+ },
+ update: defaultUpdate,
+ attributes: {
+ rrd: {type: "string", required: true},
+ unit: {type: "string", required: false},
+ series: {type: "list", required: false, list: {hour: "hours", day: "days", week: "weeks", month: "months", year: "years"}},
+ period: {type: "numeric", required: false},
+ datasource: {type: "list", required: false, list: {'MIN': "Min", 'AVERAGE': "Avg", 'MAX': "Max"}},
+ refresh: {type: "numeric", required: false},
+ tooltip: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
+ linecolor: {type: "string", required: false},
+ gridcolor: {type: "string", required: false},
+ format: { type: 'format', required: false },
+ mapping: { type: 'mapping', required: false },
+ styling: { type: 'styling', required: false }
+ },
+ elements: {
+ label: { type: 'string', required: true, multi: false },
+ address: { type: 'address', required: true, multi: true }
+ },
+ content: {type: "string", required: true}
+});
+
diagramColors = {
data: $("<span class='link'><a href='#' /></a>").find("a").css("color")
};
@@ -209,7 +351,9 @@
var refresh = diagram.data("refresh");
var datasource = diagram.data("datasource") || "AVERAGE";
var period = diagram.data("period") || 1;
-
+ var linecolor = diagram.data("linecolor") || diagramColors.data;
+ var gridcolor = diagram.data("gridcolor") || "#81664B";
+
var series = {
hour: {label: "hour", res: "60", start: "hour", end: "now"},
day: {label: "day", res: "300", start: "day", end: "now"},
@@ -236,12 +380,10 @@
grid: {
show: true,
aboveData: false,
- color: "#81664B",
+ color: gridcolor,
backgroundColor: "black",
- tickColor: "#81664B",
- borderColor: "#81664B"//,
- //axisMargin: 0,
- //labelMargin: 0
+ tickColor: gridcolor,
+ borderColor: gridcolor
}
},
flotoptions);
@@ -255,7 +397,7 @@
dataType: "json",
type: "GET",
success: function(data) {
- var color = diagramColors.data || options.grid.color;
+ var color = linecolor || options.grid.color;
var offset = new Date().getTimezoneOffset() * 60 * 1000;
//TODO: find a better way
for (var j = 0; j < data.length; j++) {
@@ -275,9 +417,6 @@
}
}
-
-
-
return false;
}
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2011-11-27 21:44:05 UTC (rev 549)
+++ CometVisu/trunk/visu/visu_config.xsd 2011-11-29 16:33:08 UTC (rev 550)
@@ -43,7 +43,6 @@
<xsd:attribute name="max" type="xsd:decimal" />
<xsd:attribute name="step" type="xsd:decimal" />
-
<xsd:attribute name="transform" type="xsd:string" />
<xsd:attribute name="format" type="xsd:string" />
@@ -152,17 +151,17 @@
<xsd:element name="page">
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
- <!-- visual effects -->
+ <!-- visual effects -->
<xsd:element name="line" type="line" />
- <xsd:element name="break" type="break" />
- <xsd:element name="group" type="group" />
+ <xsd:element name="break" type="break" />
+ <xsd:element name="group" type="group" />
<!-- list all possbile widgets here -->
<xsd:element name="text" type="text" />
<xsd:element name="switch" type="switch" />
<xsd:element name="toggle" type="switch" />
<xsd:element name="trigger" type="trigger" />
<xsd:element name="multitrigger" type="multitrigger" />
- <xsd:element name="infotrigger" type="infotrigger" />
+ <xsd:element name="infotrigger" type="infotrigger" />
<xsd:element name="designtoggle" type="designtoggle" />
<xsd:element name="slide" type="slide" />
<xsd:element name="info" type="info" />
@@ -179,21 +178,23 @@
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="flavour" type="xsd:string" use="optional" />
<xsd:attribute ref="align" use="optional" />
+ <xsd:attribute name="ga" type="addr" use="optional" />
+ <xsd:attribute name="visible" type="xsd:boolean" />
</xsd:complexType>
</xsd:element>
<xsd:complexType name="group">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
- <!-- visual effects -->
+ <!-- visual effects -->
<xsd:element name="line" type="line" />
- <xsd:element name="break" type="break" />
- <!-- list all possbile widgets here -->
+ <xsd:element name="break" type="break" />
+ <!-- list all possbile widgets here -->
<xsd:element name="text" type="text" />
<xsd:element name="switch" type="switch" />
<xsd:element name="toggle" type="switch" />
<xsd:element name="trigger" type="trigger" />
<xsd:element name="multitrigger" type="multitrigger" />
- <xsd:element name="infotrigger" type="infotrigger" />
+ <xsd:element name="infotrigger" type="infotrigger" />
<xsd:element name="designtoggle" type="designtoggle" />
<xsd:element name="slide" type="slide" />
<xsd:element name="info" type="info" />
@@ -267,17 +268,17 @@
<xsd:element name="address" type="address" minOccurs="1" maxOccurs="unbounded"/>
</xsd:choice>
<xsd:attribute name="upvalue" type="xsd:string" use="optional"/>
- <xsd:attribute name="downvalue" type="xsd:string" use="optional"/>
- <xsd:attribute name="uplabel" type="xsd:string" use="optional"/>
- <xsd:attribute name="downlabel" type="xsd:string" use="optional"/>
+ <xsd:attribute name="downvalue" type="xsd:string" use="optional"/>
+ <xsd:attribute name="uplabel" type="xsd:string" use="optional"/>
+ <xsd:attribute name="downlabel" type="xsd:string" use="optional"/>
<xsd:attribute name="change" type="xsd:string" use="optional"/>
<xsd:attribute ref="min" />
<xsd:attribute ref="max" />
<xsd:attribute ref="mapping" use="optional"/>
- <xsd:attribute ref="styling" use="optional"/>
+ <xsd:attribute ref="styling" use="optional"/>
<xsd:attribute ref="align" use="optional" />
- <xsd:attribute ref="format" use="optional" />
- <xsd:attribute name="infoposition" type="xsd:decimal" use="optional" />
+ <xsd:attribute ref="format" use="optional" />
+ <xsd:attribute name="infoposition" type="xsd:decimal" use="optional" />
</xsd:complexType>
<xsd:complexType name="multitrigger">
@@ -331,7 +332,7 @@
<xsd:complexType name="video">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
</xsd:choice>
<xsd:attribute name="src" type="uri" use="required" />
<xsd:attribute name="width" type="dimension" />
@@ -341,13 +342,14 @@
<xsd:complexType name="iframe">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
</xsd:choice>
<xsd:attribute name="src" type="uri" use="required" />
<xsd:attribute name="width" type="dimension" />
<xsd:attribute name="height" type="dimension" />
<xsd:attribute name="frameborder" type="xsd:string" />
<xsd:attribute name="background" type="xsd:string" />
+ <xsd:attribute name="refresh" type="xsd:decimal" />
</xsd:complexType>
<xsd:complexType name="colorchooser" >
@@ -358,40 +360,60 @@
</xsd:complexType>
<xsd:complexType name="diagram_inline">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="rrd" type="xsd:string" use="required" />
- <xsd:attribute name="unit" type="xsd:string" use="optional" />
- <xsd:attribute name="width" type="dimension" use="optional"/>
- <xsd:attribute name="series" type="xsd:string" use="optional"/>
- <xsd:attribute name="height" type="dimension" use="optional"/>
- <xsd:attribute name="refresh" type="xsd:integer" use="optional" />
- <xsd:attribute name="period" type="xsd:string" use="optional" />
- <xsd:attribute name="datasource" type="xsd:string" use="optional" />
- </xsd:extension>
- </xsd:simpleContent>
+ <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ </xsd:choice>
+ <xsd:attribute name="rrd" type="xsd:string" use="required" />
+ <xsd:attribute name="unit" type="xsd:string" use="optional" />
+ <xsd:attribute name="width" type="dimension" use="optional"/>
+ <xsd:attribute name="series" type="xsd:string" use="optional"/>
+ <xsd:attribute name="height" type="dimension" use="optional"/>
+ <xsd:attribute name="refresh" type="xsd:integer" use="optional" />
+ <xsd:attribute name="period" type="xsd:string" use="optional" />
+ <xsd:attribute name="datasource" type="xsd:string" use="optional" />
+ <xsd:attribute name="linecolor" type="xsd:string" use="optional" />
+ <xsd:attribute name="gridcolor" type="xsd:string" use="optional" />
</xsd:complexType>
<xsd:complexType name="diagram_popup" >
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="rrd" type="xsd:string" use="required" />
- <xsd:attribute name="unit" type="xsd:string" use="optional" />
- <xsd:attribute name="series" type="xsd:string" use="optional" />
- <xsd:attribute name="refresh" type="xsd:integer" use="optional" />
- <xsd:attribute name="period" type="xsd:string" use="optional" />
- <xsd:attribute name="datasource" type="xsd:string" use="optional" />
- <xsd:attribute name="tooltip" type="xsd:string" use="optional" />
- </xsd:extension>
- </xsd:simpleContent>
+ <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ </xsd:choice>
+ <xsd:attribute name="rrd" type="xsd:string" use="required" />
+ <xsd:attribute name="unit" type="xsd:string" use="optional" />
+ <xsd:attribute name="series" type="xsd:string" use="optional" />
+ <xsd:attribute name="refresh" type="xsd:integer" use="optional" />
+ <xsd:attribute name="period" type="xsd:string" use="optional" />
+ <xsd:attribute name="datasource" type="xsd:string" use="optional" />
+ <xsd:attribute name="tooltip" type="xsd:string" use="optional" />
+ <xsd:attribute name="linecolor" type="xsd:string" use="optional" />
+ <xsd:attribute name="gridcolor" type="xsd:string" use="optional" />
</xsd:complexType>
+<xsd:complexType name="diagram_info" >
+ <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:element name="address" type="address" minOccurs="1"/>
+ </xsd:choice>
+ <xsd:attribute ref="format" use="optional" />
+ <xsd:attribute ref="styling" use="optional" />
+ <xsd:attribute ref="mapping" use="optional" />
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:attribute name="rrd" type="xsd:string" use="required" />
+ <xsd:attribute name="unit" type="xsd:string" use="optional" />
+ <xsd:attribute name="series" type="xsd:string" use="optional" />
+ <xsd:attribute name="refresh" type="xsd:integer" use="optional" />
+ <xsd:attribute name="period" type="xsd:string" use="optional" />
+ <xsd:attribute name="datasource" type="xsd:string" use="optional" />
+ <xsd:attribute name="tooltip" type="xsd:string" use="optional" />
+ <xsd:attribute name="linecolor" type="xsd:string" use="optional" />
+ <xsd:attribute name="gridcolor" type="xsd:string" use="optional" />
+</xsd:complexType>
+
<xsd:complexType name="break" />
<xsd:complexType name="line" />
<!-- toggle is not yet implemented -->
-<!-- shade is not yet implemented -->
-
</xsd:schema>
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-11-27 21:44:05 UTC (rev 549)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-11-29 16:33:08 UTC (rev 550)
@@ -370,6 +370,10 @@
<label>KNX traffic</label>
</diagram_popup>
<diagram_inline rrd="eib_traffic" width="600" height="400"/>
+ <diagram_info rrd="200_DALI_Linie_1_Strom" unit="mA" series="day" refresh="300">
+ <label>DALI Strom L1</label>
+ <address transform="DPT:9.021">14/2/7</address>
+ </diagram_info>
<line/>
<page name="Erweiterte Widgets">
<text>Auf dieser Seite sind Widgets zu finden, die noch in Entwicklung
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-27 21:44:11
|
Revision: 549
http://openautomation.svn.sourceforge.net/openautomation/?rev=549&view=rev
Author: mayerch
Date: 2011-11-27 21:44:05 +0000 (Sun, 27 Nov 2011)
Log Message:
-----------
Release notes for 0.6.1
Modified Paths:
--------------
CometVisu/branches/release_0.6.1/ChangeLog
CometVisu/trunk/ChangeLog
Modified: CometVisu/branches/release_0.6.1/ChangeLog
===================================================================
--- CometVisu/branches/release_0.6.1/ChangeLog 2011-11-27 21:32:53 UTC (rev 548)
+++ CometVisu/branches/release_0.6.1/ChangeLog 2011-11-27 21:44:05 UTC (rev 549)
@@ -1,3 +1,9 @@
+0.6.1
+=====
+
+The identically to release 0.6.0
+This additional release is due to technical reasons.
+
0.6.0
=====
Modified: CometVisu/trunk/ChangeLog
===================================================================
--- CometVisu/trunk/ChangeLog 2011-11-27 21:32:53 UTC (rev 548)
+++ CometVisu/trunk/ChangeLog 2011-11-27 21:44:05 UTC (rev 549)
@@ -1,3 +1,14 @@
+HEAD
+====
+
+-
+
+0.6.1
+=====
+
+The identically to release 0.6.0
+This additional release is due to technical reasons.
+
0.6.0
=====
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-27 21:33:00
|
Revision: 548
http://openautomation.svn.sourceforge.net/openautomation/?rev=548&view=rev
Author: mayerch
Date: 2011-11-27 21:32:53 +0000 (Sun, 27 Nov 2011)
Log Message:
-----------
New release: 0.6.1
Modified Paths:
--------------
CometVisu/branches/release_0.6.1/visu/index.html
CometVisu/branches/release_0.6.1/visu/visu_config.xml
CometVisu/branches/release_0.6.1/visu/visu_config_demo.xml
Modified: CometVisu/branches/release_0.6.1/visu/index.html
===================================================================
--- CometVisu/branches/release_0.6.1/visu/index.html 2011-11-27 21:32:32 UTC (rev 547)
+++ CometVisu/branches/release_0.6.1/visu/index.html 2011-11-27 21:32:53 UTC (rev 548)
@@ -4,7 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CometVisu-Client</title>
- <link rel="icon" href="icon/comet_16x16_000000.png" type="image/png" />
+ <link rel="icon" href="icon/comet_16x16_ff8000.png" type="image/png" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0; webkit-user-select: none;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
Modified: CometVisu/branches/release_0.6.1/visu/visu_config.xml
===================================================================
--- CometVisu/branches/release_0.6.1/visu/visu_config.xml 2011-11-27 21:32:32 UTC (rev 547)
+++ CometVisu/branches/release_0.6.1/visu/visu_config.xml 2011-11-27 21:32:53 UTC (rev 548)
@@ -59,7 +59,7 @@
]]></status>
<status type="html"><![CDATA[
- <a href="check_config.php">Check Config</a>
- <div style="float:right;padding-right:0.5em">Version: SVN</div>
+ <div style="float:right;padding-right:0.5em">Version: 0.6.1</div>
]]></status>
</statusbar>
</meta>
Modified: CometVisu/branches/release_0.6.1/visu/visu_config_demo.xml
===================================================================
--- CometVisu/branches/release_0.6.1/visu/visu_config_demo.xml 2011-11-27 21:32:32 UTC (rev 547)
+++ CometVisu/branches/release_0.6.1/visu/visu_config_demo.xml 2011-11-27 21:32:53 UTC (rev 548)
@@ -77,7 +77,7 @@
]]></status>
<status type="html"><![CDATA[
- <a href="check_config.php">Check Config</a>
- <div style="float:right;padding-right:0.5em">Version: SVN</div>
+ <div style="float:right;padding-right:0.5em">Version: 0.6.1</div>
]]></status>
</statusbar>
</meta>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-27 21:32:38
|
Revision: 547
http://openautomation.svn.sourceforge.net/openautomation/?rev=547&view=rev
Author: mayerch
Date: 2011-11-27 21:32:32 +0000 (Sun, 27 Nov 2011)
Log Message:
-----------
Creating release branch 0.6.1
Added Paths:
-----------
CometVisu/branches/release_0.6.1/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-27 21:30:58
|
Revision: 546
http://openautomation.svn.sourceforge.net/openautomation/?rev=546&view=rev
Author: mayerch
Date: 2011-11-27 21:30:52 +0000 (Sun, 27 Nov 2011)
Log Message:
-----------
New release: 0.6.0
Modified Paths:
--------------
CometVisu/branches/release_0.6.0/visu/index.html
CometVisu/branches/release_0.6.0/visu/visu_config.xml
CometVisu/branches/release_0.6.0/visu/visu_config_demo.xml
Modified: CometVisu/branches/release_0.6.0/visu/index.html
===================================================================
--- CometVisu/branches/release_0.6.0/visu/index.html 2011-11-27 21:30:30 UTC (rev 545)
+++ CometVisu/branches/release_0.6.0/visu/index.html 2011-11-27 21:30:52 UTC (rev 546)
@@ -4,7 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CometVisu-Client</title>
- <link rel="icon" href="icon/comet_16x16_000000.png" type="image/png" />
+ <link rel="icon" href="icon/comet_16x16_ff8000.png" type="image/png" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0; webkit-user-select: none;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
Modified: CometVisu/branches/release_0.6.0/visu/visu_config.xml
===================================================================
--- CometVisu/branches/release_0.6.0/visu/visu_config.xml 2011-11-27 21:30:30 UTC (rev 545)
+++ CometVisu/branches/release_0.6.0/visu/visu_config.xml 2011-11-27 21:30:52 UTC (rev 546)
@@ -59,7 +59,7 @@
]]></status>
<status type="html"><![CDATA[
- <a href="check_config.php">Check Config</a>
- <div style="float:right;padding-right:0.5em">Version: SVN</div>
+ <div style="float:right;padding-right:0.5em">Version: 0.6.0</div>
]]></status>
</statusbar>
</meta>
Modified: CometVisu/branches/release_0.6.0/visu/visu_config_demo.xml
===================================================================
--- CometVisu/branches/release_0.6.0/visu/visu_config_demo.xml 2011-11-27 21:30:30 UTC (rev 545)
+++ CometVisu/branches/release_0.6.0/visu/visu_config_demo.xml 2011-11-27 21:30:52 UTC (rev 546)
@@ -77,7 +77,7 @@
]]></status>
<status type="html"><![CDATA[
- <a href="check_config.php">Check Config</a>
- <div style="float:right;padding-right:0.5em">Version: SVN</div>
+ <div style="float:right;padding-right:0.5em">Version: 0.6.0</div>
]]></status>
</statusbar>
</meta>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-27 21:30:36
|
Revision: 545
http://openautomation.svn.sourceforge.net/openautomation/?rev=545&view=rev
Author: mayerch
Date: 2011-11-27 21:30:30 +0000 (Sun, 27 Nov 2011)
Log Message:
-----------
Creating release branch 0.6.0
Added Paths:
-----------
CometVisu/branches/release_0.6.0/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-27 21:29:58
|
Revision: 544
http://openautomation.svn.sourceforge.net/openautomation/?rev=544&view=rev
Author: mayerch
Date: 2011-11-27 21:29:52 +0000 (Sun, 27 Nov 2011)
Log Message:
-----------
Prepare release 0.6.0
Modified Paths:
--------------
CometVisu/trunk/ChangeLog
Modified: CometVisu/trunk/ChangeLog
===================================================================
--- CometVisu/trunk/ChangeLog 2011-11-27 20:55:38 UTC (rev 543)
+++ CometVisu/trunk/ChangeLog 2011-11-27 21:29:52 UTC (rev 544)
@@ -1,3 +1,9 @@
+0.6.0
+=====
+
+The public beta release!
+(Basically the same as the 0.6.0-RC5)
+
0.6.0-RC5
=========
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-27 20:55:45
|
Revision: 543
http://openautomation.svn.sourceforge.net/openautomation/?rev=543&view=rev
Author: mayerch
Date: 2011-11-27 20:55:38 +0000 (Sun, 27 Nov 2011)
Log Message:
-----------
Name change
Modified Paths:
--------------
CometVisu/trunk/AUTHORS
Modified: CometVisu/trunk/AUTHORS
===================================================================
--- CometVisu/trunk/AUTHORS 2011-11-27 14:29:44 UTC (rev 542)
+++ CometVisu/trunk/AUTHORS 2011-11-27 20:55:38 UTC (rev 543)
@@ -3,8 +3,8 @@
The list of contributors is:
Patrik Häni - swiss1 - paede (dot) haeni (at) bluewin (dot) ch
-Julian Hartmann - netzkind - julian.hartmann (at) gmail (dot) com
Jan N. Klug - j-n-k - jan.n.klug (at) rub (dot) de
+Julian Makowski - netzkind - julian (at) makowskis (dot) de
Michael Markstaller - makki1 - mm (at) elabnet (dot) de
Christian Mayer - mayerch - CometVisu (at) ChristianMayer (dot) de
Axel Otterstätter - panzaeron - Mr.O (at) gmx (dot) de
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-27 14:29:50
|
Revision: 542
http://openautomation.svn.sourceforge.net/openautomation/?rev=542&view=rev
Author: mayerch
Date: 2011-11-27 14:29:44 +0000 (Sun, 27 Nov 2011)
Log Message:
-----------
Creating branch to show end of SVG implementation and to start with WebGL
Added Paths:
-----------
JSFloorPlan/branches/release_0.1/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-26 12:01:44
|
Revision: 541
http://openautomation.svn.sourceforge.net/openautomation/?rev=541&view=rev
Author: mayerch
Date: 2011-11-26 12:01:38 +0000 (Sat, 26 Nov 2011)
Log Message:
-----------
Updated entry for swiss
Modified Paths:
--------------
CometVisu/trunk/AUTHORS
Modified: CometVisu/trunk/AUTHORS
===================================================================
--- CometVisu/trunk/AUTHORS 2011-11-23 19:43:39 UTC (rev 540)
+++ CometVisu/trunk/AUTHORS 2011-11-26 12:01:38 UTC (rev 541)
@@ -2,6 +2,7 @@
other developers.
The list of contributors is:
+Patrik Häni - swiss1 - paede (dot) haeni (at) bluewin (dot) ch
Julian Hartmann - netzkind - julian.hartmann (at) gmail (dot) com
Jan N. Klug - j-n-k - jan.n.klug (at) rub (dot) de
Michael Markstaller - makki1 - mm (at) elabnet (dot) de
@@ -9,4 +10,3 @@
Axel Otterstätter - panzaeron - Mr.O (at) gmx (dot) de
Christian - chris_ace - chris_ace (at) users (dot) sourceforge (dot) net
David - daviid5 - daviid5 (at) users (dot) sourceforge (dot) net
-Patrik - swiss1 - swiss1 (at) users (dot) sourceforge (dot) net
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2011-11-23 19:43:45
|
Revision: 540
http://openautomation.svn.sourceforge.net/openautomation/?rev=540&view=rev
Author: j-n-k
Date: 2011-11-23 19:43:39 +0000 (Wed, 23 Nov 2011)
Log Message:
-----------
FR 3128533 : Added diagram_info (combined diagram_popup/info) widget
Modified Paths:
--------------
CometVisu/tags/post_0.6.0/visu/plugins/diagram/structure_plugin.js
CometVisu/tags/post_0.6.0/visu/visu_config.xsd
CometVisu/tags/post_0.6.0/visu/visu_config_demo.xml
Modified: CometVisu/tags/post_0.6.0/visu/plugins/diagram/structure_plugin.js
===================================================================
--- CometVisu/tags/post_0.6.0/visu/plugins/diagram/structure_plugin.js 2011-11-20 21:45:11 UTC (rev 539)
+++ CometVisu/tags/post_0.6.0/visu/plugins/diagram/structure_plugin.js 2011-11-23 19:43:39 UTC (rev 540)
@@ -185,6 +185,140 @@
content: {type: "string", required: true}
});
+VisuDesign_Custom.prototype.addCreator("diagram_info", {
+ create: function( page, path ) {
+ var $p = $(page);
+
+ var address = {};
+ $p.find('address').each( function(){
+ var src = this.textContent;
+ ga_list.push( src )
+ address[ '_' + src ] = [ this.getAttribute('transform') ];
+ });
+
+ function uniqid() {
+ var newDate = new Date;
+ return newDate.getTime();
+ }
+
+ var id = "diagram_" + uniqid();
+
+ var ret_val = $('<div class="widget" />');
+ ret_val.addClass( 'diagram' );
+
+ var labelElement = $p.find('label')[0];
+ var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
+
+ var actor = '<div class="actor switchUnpressed ';
+ if ( $p.attr( 'align' ) )
+ actor += $p.attr( 'align' );
+ actor += '">';
+ var map = $p.attr('mapping');
+ if( mappings[map] && mappings[map][value] )
+ actor += '<div class="value">' + mappings[map][value] + '</div>';
+ else
+ actor += '<div class="value">-</div>';
+ actor += '</div>';
+
+ var $actor = $(actor).data({
+ 'address' : address,
+ 'format' : $p.attr('format'),
+ 'mapping' : $p.attr('mapping'),
+ 'styling' : $p.attr('styling')
+ });
+ for( var addr in address ) $actor.bind( addr, this.update );
+
+ ret_val.append(label).append($actor);
+
+ $actor.addClass("clickable");
+
+ var bDiagram = $("<div class=\"diagram\" id=\"" + id + "_big\"/>");
+
+ bDiagram.data("id", id);
+ bDiagram.data("rrd", $p.attr("rrd"));
+ bDiagram.data("unit", $p.attr("unit") || "");
+ bDiagram.data("series", $p.attr("series") || "day");
+ bDiagram.data("period", $p.attr("period") || 1);
+ bDiagram.data("datasource", $p.attr("datasource") || "AVERAGE");
+ bDiagram.data("label", labelElement.textContent);
+ bDiagram.data("refresh", $p.attr("refresh"));
+ bDiagram.data("linecolor", $p.attr("linecolor") || "");
+ bDiagram.data("gridcolor", $p.attr("gridcolor") || "");
+
+ var data = jQuery.extend({}, bDiagram.data());
+
+ $actor.bind("click", function() {
+ bDiagram.data(data);
+ bDiagram.css({height: "90%"});
+
+ showPopup("unknown", {title: labelElement.textContent, content: bDiagram});
+ bDiagram.parent("div").css({height: "100%", width: "90%", margin: "auto"}); // define parent as 100%!
+
+ var bDiagramOpts = {yaxis: {labelWidth: null}};
+ if ($p.attr("tooltip") == "true") {
+ // if we want to display a tooltip, we need to listen to the event
+ var previousPoint = null;
+ jQuery(bDiagram).bind("plothover", function (event, pos, item) {
+ jQuery("#x").text(pos.x.toFixed(2));
+ jQuery("#y").text(pos.y.toFixed(2));
+
+ if (item) {
+ if (previousPoint != item.datapoint) {
+ previousPoint = item.datapoint;
+
+ $("#diagramTooltip").remove();
+ var x = item.datapoint[0],
+ y = item.datapoint[1].toFixed(2);
+
+ //This is a mess but toLocaleString expects UTC again
+ var offset = new Date().getTimezoneOffset() * 60 * 1000;
+ var dte = new Date(x + offset);
+ showDiagramTooltip(item.pageX, item.pageY,
+ dte.toLocaleString() + ": " + y + jQuery(this).data("unit"));
+ }
+ }
+ else {
+ $("#diagramTooltip").remove();
+ previousPoint = null;
+ }
+
+ })
+ .bind("click", function(event) {
+ // don't let the popup know about the click, or it will close on touch-displays
+ event.stopPropagation();
+ });
+
+ bDiagramOpts = jQuery.extend(bDiagramOpts, {grid: {hoverable: true, clickable: true} });
+ }
+
+ refreshDiagram(bDiagram, bDiagramOpts);
+ return false;
+ });
+
+ return ret_val;
+ },
+ update: defaultUpdate,
+ attributes: {
+ rrd: {type: "string", required: true},
+ unit: {type: "string", required: false},
+ series: {type: "list", required: false, list: {hour: "hours", day: "days", week: "weeks", month: "months", year: "years"}},
+ period: {type: "numeric", required: false},
+ datasource: {type: "list", required: false, list: {'MIN': "Min", 'AVERAGE': "Avg", 'MAX': "Max"}},
+ refresh: {type: "numeric", required: false},
+ tooltip: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
+ linecolor: {type: "string", required: false},
+ gridcolor: {type: "string", required: false},
+ format: { type: 'format', required: false },
+ mapping: { type: 'mapping', required: false },
+ styling: { type: 'styling', required: false }
+ },
+ elements: {
+ label: { type: 'string', required: true, multi: false },
+ address: { type: 'address', required: true, multi: true }
+ },
+ content: {type: "string", required: true}
+});
+
diagramColors = {
data: $("<span class='link'><a href='#' /></a>").find("a").css("color")
};
Modified: CometVisu/tags/post_0.6.0/visu/visu_config.xsd
===================================================================
--- CometVisu/tags/post_0.6.0/visu/visu_config.xsd 2011-11-20 21:45:11 UTC (rev 539)
+++ CometVisu/tags/post_0.6.0/visu/visu_config.xsd 2011-11-23 19:43:39 UTC (rev 540)
@@ -393,6 +393,26 @@
</xsd:simpleContent>
</xsd:complexType>
+<xsd:complexType name="diagram_info" >
+ <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:element name="address" type="address" minOccurs="1"/>
+ </xsd:choice>
+ <xsd:attribute ref="format" use="optional" />
+ <xsd:attribute ref="styling" use="optional" />
+ <xsd:attribute ref="mapping" use="optional" />
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ <xsd:attribute name="rrd" type="xsd:string" use="required" />
+ <xsd:attribute name="unit" type="xsd:string" use="optional" />
+ <xsd:attribute name="series" type="xsd:string" use="optional" />
+ <xsd:attribute name="refresh" type="xsd:integer" use="optional" />
+ <xsd:attribute name="period" type="xsd:string" use="optional" />
+ <xsd:attribute name="datasource" type="xsd:string" use="optional" />
+ <xsd:attribute name="tooltip" type="xsd:string" use="optional" />
+ <xsd:attribute name="linecolor" type="xsd:string" use="optional" />
+ <xsd:attribute name="gridcolor" type="xsd:string" use="optional" />
+</xsd:complexType>
+
<xsd:complexType name="break" />
<xsd:complexType name="line" />
Modified: CometVisu/tags/post_0.6.0/visu/visu_config_demo.xml
===================================================================
--- CometVisu/tags/post_0.6.0/visu/visu_config_demo.xml 2011-11-20 21:45:11 UTC (rev 539)
+++ CometVisu/tags/post_0.6.0/visu/visu_config_demo.xml 2011-11-23 19:43:39 UTC (rev 540)
@@ -271,6 +271,10 @@
</slide>
<diagram_popup rrd="200_DALI_Linie_1_Strom" unit="mA" series="day" refresh="300">DALI Strom L1</diagram_popup>
<diagram_inline rrd="200_DALI_Linie_1_Strom" width="600" height="400"/>
+ <diagram_info rrd="200_DALI_Linie_1_Strom" unit="mA" series="day" refresh="300">
+ <label>DALI Strom L1</label>
+ <address transform="DPT:9.021">14/2/7</address>
+ </diagram_info>
<infotrigger uplabel="wärmer" downlabel="kälter" upvalue="1" downvalue="0" align="center" format="%.1f °C">
<label>Temperatur Sollwert</label>
<address transform="DPT:1.001">4/1/3</address>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-20 21:45:17
|
Revision: 539
http://openautomation.svn.sourceforge.net/openautomation/?rev=539&view=rev
Author: mayerch
Date: 2011-11-20 21:45:11 +0000 (Sun, 20 Nov 2011)
Log Message:
-----------
New release: 0.6.0-RC5
Modified Paths:
--------------
CometVisu/branches/release_0.6.0-RC5/visu/index.html
CometVisu/branches/release_0.6.0-RC5/visu/visu_config.xml
CometVisu/branches/release_0.6.0-RC5/visu/visu_config_demo.xml
Modified: CometVisu/branches/release_0.6.0-RC5/visu/index.html
===================================================================
--- CometVisu/branches/release_0.6.0-RC5/visu/index.html 2011-11-20 21:44:44 UTC (rev 538)
+++ CometVisu/branches/release_0.6.0-RC5/visu/index.html 2011-11-20 21:45:11 UTC (rev 539)
@@ -4,7 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CometVisu-Client</title>
- <link rel="icon" href="icon/comet_16x16_000000.png" type="image/png" />
+ <link rel="icon" href="icon/comet_16x16_ff8000.png" type="image/png" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0; webkit-user-select: none;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
Modified: CometVisu/branches/release_0.6.0-RC5/visu/visu_config.xml
===================================================================
--- CometVisu/branches/release_0.6.0-RC5/visu/visu_config.xml 2011-11-20 21:44:44 UTC (rev 538)
+++ CometVisu/branches/release_0.6.0-RC5/visu/visu_config.xml 2011-11-20 21:45:11 UTC (rev 539)
@@ -59,7 +59,7 @@
]]></status>
<status type="html"><![CDATA[
- <a href="check_config.php">Check Config</a>
- <div style="float:right;padding-right:0.5em">Version: SVN</div>
+ <div style="float:right;padding-right:0.5em">Version: 0.6.0-RC5</div>
]]></status>
</statusbar>
</meta>
Modified: CometVisu/branches/release_0.6.0-RC5/visu/visu_config_demo.xml
===================================================================
--- CometVisu/branches/release_0.6.0-RC5/visu/visu_config_demo.xml 2011-11-20 21:44:44 UTC (rev 538)
+++ CometVisu/branches/release_0.6.0-RC5/visu/visu_config_demo.xml 2011-11-20 21:45:11 UTC (rev 539)
@@ -77,7 +77,7 @@
]]></status>
<status type="html"><![CDATA[
- <a href="check_config.php">Check Config</a>
- <div style="float:right;padding-right:0.5em">Version: SVN</div>
+ <div style="float:right;padding-right:0.5em">Version: 0.6.0-RC5</div>
]]></status>
</statusbar>
</meta>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-20 21:44:50
|
Revision: 538
http://openautomation.svn.sourceforge.net/openautomation/?rev=538&view=rev
Author: mayerch
Date: 2011-11-20 21:44:44 +0000 (Sun, 20 Nov 2011)
Log Message:
-----------
Creating release branch 0.6.0-RC5
Added Paths:
-----------
CometVisu/branches/release_0.6.0-RC5/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-20 21:44:01
|
Revision: 537
http://openautomation.svn.sourceforge.net/openautomation/?rev=537&view=rev
Author: mayerch
Date: 2011-11-20 21:43:55 +0000 (Sun, 20 Nov 2011)
Log Message:
-----------
Prepare 0.6.0-RC5
Modified Paths:
--------------
CometVisu/trunk/ChangeLog
Modified: CometVisu/trunk/ChangeLog
===================================================================
--- CometVisu/trunk/ChangeLog 2011-11-20 21:35:22 UTC (rev 536)
+++ CometVisu/trunk/ChangeLog 2011-11-20 21:43:55 UTC (rev 537)
@@ -1,3 +1,12 @@
+0.6.0-RC5
+=========
+
+- Last minute bug fix: in relative mode the infotrigger is using the variant
+ types "button" and "display" now
+- Last minute bug fix: change diagram to new syntax that uses explicit "label"
+ element
+- Layout fix: make help button in editor look the same
+
0.6.0-RC4
=========
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-20 21:35:28
|
Revision: 536
http://openautomation.svn.sourceforge.net/openautomation/?rev=536&view=rev
Author: mayerch
Date: 2011-11-20 21:35:22 +0000 (Sun, 20 Nov 2011)
Log Message:
-----------
Added "swiss" who's doing great work on the documentation
Modified Paths:
--------------
CometVisu/trunk/AUTHORS
Modified: CometVisu/trunk/AUTHORS
===================================================================
--- CometVisu/trunk/AUTHORS 2011-11-20 21:31:00 UTC (rev 535)
+++ CometVisu/trunk/AUTHORS 2011-11-20 21:35:22 UTC (rev 536)
@@ -9,3 +9,4 @@
Axel Otterstätter - panzaeron - Mr.O (at) gmx (dot) de
Christian - chris_ace - chris_ace (at) users (dot) sourceforge (dot) net
David - daviid5 - daviid5 (at) users (dot) sourceforge (dot) net
+Patrik - swiss1 - swiss1 (at) users (dot) sourceforge (dot) net
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tho...@us...> - 2011-11-20 21:31:07
|
Revision: 535
http://openautomation.svn.sourceforge.net/openautomation/?rev=535&view=rev
Author: thomas_s
Date: 2011-11-20 21:31:00 +0000 (Sun, 20 Nov 2011)
Log Message:
-----------
- added removed global vars from devicemanager to enable unit testing with mock objects
- implemented first unittest
Modified Paths:
--------------
xPLHAL/branches/thomas_s_dev/CMakeLists.txt
xPLHAL/branches/thomas_s_dev/src/CMakeLists.txt
xPLHAL/branches/thomas_s_dev/src/devicemanager.cpp
xPLHAL/branches/thomas_s_dev/src/devicemanager.h
xPLHAL/branches/thomas_s_dev/src/main.cpp
xPLHAL/branches/thomas_s_dev/src/xplcache.h
xPLHAL/branches/thomas_s_dev/src/xplhandler.cpp
xPLHAL/branches/thomas_s_dev/src/xplhandler.h
xPLHAL/branches/thomas_s_dev/test/CMakeLists.txt
Added Paths:
-----------
xPLHAL/branches/thomas_s_dev/src/i_devicemanager.h
xPLHAL/branches/thomas_s_dev/src/i_xplcache.h
xPLHAL/branches/thomas_s_dev/src/i_xplhandler.h
xPLHAL/branches/thomas_s_dev/test/test_devicemanager.cpp
Removed Paths:
-------------
xPLHAL/branches/thomas_s_dev/test/test_test.cpp
Modified: xPLHAL/branches/thomas_s_dev/CMakeLists.txt
===================================================================
--- xPLHAL/branches/thomas_s_dev/CMakeLists.txt 2011-11-20 21:29:50 UTC (rev 534)
+++ xPLHAL/branches/thomas_s_dev/CMakeLists.txt 2011-11-20 21:31:00 UTC (rev 535)
@@ -24,7 +24,7 @@
#set(CMAKE_CXX_COMPILER lsbc++)
message("CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
-set(create_STATIC_build ON)
+set(create_STATIC_build OFF)
if(create_STATIC_build)
message("Creating a static build...")
Modified: xPLHAL/branches/thomas_s_dev/src/CMakeLists.txt
===================================================================
--- xPLHAL/branches/thomas_s_dev/src/CMakeLists.txt 2011-11-20 21:29:50 UTC (rev 534)
+++ xPLHAL/branches/thomas_s_dev/src/CMakeLists.txt 2011-11-20 21:31:00 UTC (rev 535)
@@ -18,7 +18,7 @@
cmake_minimum_required(VERSION 2.6)
#set(CMAKE_CXX_FLAGS "-g -O2 -std=c++0x")
-set(CMAKE_CXX_FLAGS "-g -std=c++0x")
+set(CMAKE_CXX_FLAGS "-g -Os -std=c++0x")
set(xPLHAL_SRCS xplmessagequeue.cpp devicemanager.cpp xplhandler.cpp xplcache.cpp xhcpthread.cpp log.cpp xhcp.cpp main.cpp)
add_executable(xPLHAL ${xPLHAL_SRCS})
Modified: xPLHAL/branches/thomas_s_dev/src/devicemanager.cpp
===================================================================
--- xPLHAL/branches/thomas_s_dev/src/devicemanager.cpp 2011-11-20 21:29:50 UTC (rev 534)
+++ xPLHAL/branches/thomas_s_dev/src/devicemanager.cpp 2011-11-20 21:31:00 UTC (rev 535)
@@ -16,6 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
#include <boost/algorithm/string.hpp>
#include <boost/regex.hpp>
#include <cstdio>
@@ -24,75 +25,57 @@
#include "log.h"
#include "devicemanager.h"
+#include "i_xplcache.h"
using namespace boost::posix_time;
-void deviceManagerClass::add( const xPLDevice& device ) const
+deviceManagerClass::deviceManagerClass(IxPLHandler* xplhandler, IxPLCacheClass* xplcache)
+:m_xPL(xplhandler)
+,m_xPLCache(xplcache)
{
- writeLog( "deviceManagerClass::add("+device.VDI+")", logLevel::debug );
- if( contains( device.VDI ) ) {
- update( device );
- } else {
- std::string newtag = "device." + device.VDI + ".";
- ptime expires = second_clock::local_time() + minutes( 2*device.Interval + 1 );
+}
- xPLCache->updateEntry(newtag + "vdi", device.VDI, false);
- xPLCache->updateEntry(newtag + "configdone", device.ConfigDone?"true":"false", false);
- xPLCache->updateEntry(newtag + "configmissing", device.ConfigMissing?"true":"false", false);
- xPLCache->updateEntry(newtag + "configsource", device.ConfigSource, false);
- xPLCache->updateEntry(newtag + "configtype", device.ConfigType?"true":"false", false);
- xPLCache->updateEntry(newtag + "waitingconfig", device.WaitingConfig?"true":"false", false);
- xPLCache->updateEntry(newtag + "current", device.Current?"true":"false", false);
- xPLCache->updateEntry(newtag + "configlistsent", device.ConfigListSent?"true":"false", false);
- xPLCache->updateEntry(newtag + "suspended", device.Suspended?"true":"false", false);
- xPLCache->updateEntry(newtag + "interval", lexical_cast<std::string>(device.Interval), false);
- xPLCache->updateEntry(newtag + "expires", timeConverter( expires ), false);
+void deviceManagerClass::add( const xPLDevice& device )
+{
+ writeLog("deviceManagerClass::add(" + device.VDI + ")", logLevel::debug);
+ if (contains( device.VDI )) {
+ mDeviceMap[device.VDI] = device;
+ } else {
+ mDeviceMap[device.VDI] = device;
+ mDeviceMap[device.VDI].Expires = calculateExpireTime(device.Interval);
}
}
-bool deviceManagerClass::remove( const std::string& deviceTag ) const
+bool deviceManagerClass::remove( const std::string& deviceTag )
{
writeLog( "deviceManagerClass::remove("+deviceTag+")", logLevel::debug );
- if( contains( deviceTag ) ) {
- std::vector<std::string> list = xPLCache->childNodes( "device." + deviceTag );
- //for( std::vector<std::string>::const_iterator it = list.begin(); it != list.end(); it++ )
- for( auto it : list )
- xPLCache->deleteEntry( it );
+ auto device = mDeviceMap.find(deviceTag);
+ if (device != mDeviceMap.end()) {
+ mDeviceMap.erase(device);
return true;
- } else {
- return false;
}
+ return false;
}
bool deviceManagerClass::removeConfig( const std::string& deviceTag ) const
{
writeLog( "deviceManagerClass::remove("+deviceTag+")", logLevel::debug );
if( containsConfig( deviceTag ) ) {
- std::vector<std::string> list = xPLCache->childNodes( "config." + deviceTag );
- //for( std::vector<std::string>::const_iterator it = list.begin(); it != list.end(); it++ )
- for (auto it : list)
- xPLCache->deleteEntry( it );
+ std::vector<std::string> list = m_xPLCache->childNodes( "config." + deviceTag );
+ for (auto listitem : list) {
+ m_xPLCache->deleteEntry(listitem);
+ }
return true;
- } else {
- return false;
}
+ return false;
}
xPLDevice deviceManagerClass::getDevice( const std::string& deviceTag ) const
{
xPLDevice retval;
- if( contains( deviceTag ) ) {
- retval.ConfigDone = xPLCache->objectValue( "device." + deviceTag + ".configdone" ) == "true";
- retval.ConfigMissing = xPLCache->objectValue( "device." + deviceTag + ".configmissing" ) == "true";
- retval.ConfigSource = xPLCache->objectValue( "device." + deviceTag + ".configsource" );
- retval.ConfigType = xPLCache->objectValue( "device." + deviceTag + ".configtype" ) == "true";
- retval.Current = xPLCache->objectValue( "device." + deviceTag + ".current" ) == "true";
- retval.Expires = timeConverter( xPLCache->objectValue( "device." + deviceTag + ".expires" ) );
- retval.Interval = atoi(xPLCache->objectValue( "device." + deviceTag + ".interval" ).c_str());
- retval.VDI = xPLCache->objectValue( "device." + deviceTag + ".vdi" );
- retval.WaitingConfig = xPLCache->objectValue( "device." + deviceTag + ".waitingconfig" ) == "true";
- retval.ConfigListSent = xPLCache->objectValue( "device." + deviceTag + ".configlistsent" ) == "true";
- retval.Suspended = xPLCache->objectValue( "device." + deviceTag + ".suspended" ) == "true";
+ auto device = mDeviceMap.find(deviceTag);
+ if (device != mDeviceMap.end()) {
+ retval = device->second;
}
return retval;
}
@@ -100,42 +83,24 @@
std::vector<std::string> deviceManagerClass::getAllDeviceNames() const
{
std::vector<std::string> retval;
- std::vector<std::string> nodes = xPLCache->childNodes( "device." );
-// for( std::vector<std::string>::iterator it = nodes.begin(); it != nodes.end(); ++it )
- for (auto node : nodes) {
- if( ends_with( node, ".vdi" ) ) {
- retval.push_back( node.substr( 7, node.size() - 7 - 4 ) ); // leave "device." and ".vdi" away
- writeLog( "deviceManagerClass::getAllDeviceNames() = "+ node.substr( 7, node.size() - 7 - 4 ), logLevel::debug );
- }
+ retval.reserve(mDeviceMap.size());
+ for (auto node : mDeviceMap) {
+ retval.push_back(node.first);
+ writeLog( "deviceManagerClass::getAllDeviceNames() = "+ node.first, logLevel::debug );
}
return retval;
}
-void deviceManagerClass::update( const xPLDevice& device ) const
+void deviceManagerClass::processConfigList( const xPL_MessagePtr message )
{
- writeLog( "deviceManagerClass::update("+device.VDI+") - known: "+ (contains( device.VDI )?"true":"false"), logLevel::debug );
-
- if( contains( device.VDI ) ) {
- remove( device.VDI );
- }
- writeLog( "deviceManagerClass::update("+device.VDI+") -> add", logLevel::debug );
- add( device );
-}
-
-void deviceManagerClass::processConfigList( const xPL_MessagePtr message ) const
-{
- std::string source = std::string("")
- + xPL_getSourceVendor ( message ) + "-"
- + xPL_getSourceDeviceID ( message ) + "."
- + xPL_getSourceInstanceID( message );
+ std::string source = extractSourceFromXplMessage(message);
xPLDevice device = getDevice( source );
writeLog( "deviceManagerClass::processConfigList("+source+") - found ["+device.VDI+"]", logLevel::debug );
if( "" == device.VDI ) {
// A config list turned up that we haven't asked for...
// create a new device...
- const char* intervalString = xPL_getMessageNamedValue( message, "interval" );
- int interval = intervalString ? atoi(intervalString) : 5; // default to 5 minutes
- ptime expires = second_clock::local_time() + minutes( 2*interval + 1 );
+ int interval = 5;
+ ptime expires = calculateExpireTime(xPL_getMessageNamedValue(message, "interval"), &interval);
device.VDI = source; // vendor / device / instance = unique id
device.ConfigDone = false; // false = new waiting check, true = sent/not required
device.ConfigMissing = false; // true = no config file, no response from device, false = have/waiting config
@@ -147,57 +112,70 @@
device.Suspended = false; // lost heartbeat
device.Interval = interval; // current heartbeat interval
device.Expires = expires; // time expires
- update( device );
+ mDeviceMap[device.VDI] = device;
}
xPL_NameValueListPtr nvList = xPL_getMessageBody( message );
xPL_NameValuePairPtr nvPair = NULL;
int nvCount = xPL_getNamedValueCount(nvList);
- for( int nvIndex = 0; nvIndex < nvCount; nvIndex++ ) {
+ for (int nvIndex = 0; nvIndex < nvCount; nvIndex++ ) {
std::string newtag = "config." + source + ".options.";
nvPair = xPL_getNamedValuePairAt( nvList, nvIndex );
std::string value = nvPair->itemValue; to_lower( value );
std::string key = nvPair->itemName ; to_lower( key );
boost::regex re( "([a-z0-9]{1,16})\\[(\\d{1,3})\\]" );
boost::smatch matches;
- if( boost::regex_match( value, matches, re) ) {
- xPLCache->updateEntry( newtag + matches[1] , "" , false );
- xPLCache->updateEntry( newtag + matches[1] + ".type" , key , false );
- xPLCache->updateEntry( newtag + matches[1] + ".count", matches[2], false );
- } else {
- xPLCache->updateEntry( newtag + value , "" , false );
- xPLCache->updateEntry( newtag + value + ".type" , key , false );
- xPLCache->updateEntry( newtag + value + ".count", "" , false );
+ if (boost::regex_match(value, matches, re)) {
+ m_xPLCache->updateEntry( newtag + matches[1] , "" , false );
+ m_xPLCache->updateEntry( newtag + matches[1] + ".type" , key , false );
+ m_xPLCache->updateEntry( newtag + matches[1] + ".count", matches[2], false );
+ }
+ else {
+ m_xPLCache->updateEntry( newtag + value , "" , false );
+ m_xPLCache->updateEntry( newtag + value + ".type" , key , false );
+ m_xPLCache->updateEntry( newtag + value + ".count", "" , false );
}
}
// send the config response, but only if we have a config (e.g. from the use via XHCP)
- if( xPLCache->exists( "config." + source + ".current" ) ) {
- xPLCache->updateEntry( "device." + source + ".configdone", "true", false );
+ if( m_xPLCache->exists( "config." + source + ".current" ) ) {
+ mDeviceMap[source].ConfigDone = true;
sendConfigResponse( source, false );
- } else {
+ }
+ else {
// try to get at least the current config
xPLMessage::namedValueList command_request; command_request.push_back( std::make_pair( "command", "request" ) );
- xPL->sendMessage( xPL_MESSAGE_COMMAND,
+ m_xPL->sendMessage( xPL_MESSAGE_COMMAND,
xPL_getSourceVendor( message ), xPL_getSourceDeviceID( message ), xPL_getSourceInstanceID( message ),
"config", "current", command_request );
}
}
-void deviceManagerClass::processConfigHeartBeat( const xPL_MessagePtr message ) const
+ptime deviceManagerClass::calculateExpireTime(const char* string_interval, int *pInterval)
{
- std::string source = std::string("")
- + xPL_getSourceVendor ( message ) + "-"
- + xPL_getSourceDeviceID ( message ) + "."
- + xPL_getSourceInstanceID( message );
+ int interval = string_interval ? atoi(string_interval) : 5; // default to 5 minutes
+ if (pInterval) {
+ *pInterval = interval;
+ }
+ return calculateExpireTime(interval);
+}
+
+ptime deviceManagerClass::calculateExpireTime(int interval)
+{
+ return second_clock::local_time() + minutes( 2* interval + 1 );
+}
+
+void deviceManagerClass::processConfigHeartBeat( const xPL_MessagePtr message )
+{
+ std::string source = extractSourceFromXplMessage(message);
+
xPLDevice device = getDevice( source );
writeLog( "deviceManagerClass::processConfigHeartBeat("+source+") - found ["+device.VDI+"]", logLevel::debug );
- if( "" == device.VDI ) {
+ if( device.VDI.empty() ) {
// this handles a new application that identifies itself with a hbeat straight away.
// it must either be storing it's config locally, can't be configured, or is configured somewhere else.
- const char* intervalString = xPL_getMessageNamedValue( message, "interval" );
- int interval = intervalString ? atoi(intervalString) : 5; // default to 5 minutes
- ptime expires = second_clock::local_time() + minutes( 2*interval + 1 );
+ int interval = 5;
+ ptime expires = calculateExpireTime(xPL_getMessageNamedValue(message, "interval"), &interval);
device.VDI = source; // vendor / device / instance = unique id
device.ConfigDone = false; // false = new waiting check, true = sent/not required
device.ConfigMissing = true; // true = no config file, no response from device, false = have/waiting config
@@ -209,29 +187,27 @@
device.Suspended = false; // lost heartbeat
device.Interval = interval; // current heartbeat interval
device.Expires = expires; // time expires
- update( device );
+ mDeviceMap[device.VDI] = device;
} else {
- xPLCache->updateEntry( "device." + source + ".expires", timeConverter( second_clock::local_time() + minutes( 2*device.Interval + 1 ) ), false );
+ mDeviceMap[device.VDI].Expires = calculateExpireTime(device.Interval);
+ mDeviceMap[device.VDI].ConfigSource = "objectcache";
// FIXME - that line look like that in the VB code - but it seems really strange!
- xPLCache->updateEntry( "device." + source + ".expires.configdone", "objectcache", false );
+// m_xPLCache->updateEntry( "device." + source + ".expires.configdone", "objectcache", false );
}
// ask device for configuration (if haven't asked it before...)
if( !device.ConfigListSent ) {
xPLMessage::namedValueList command_request; command_request.push_back( std::make_pair( "command", "request" ) );
- xPL->sendMessage( xPL_MESSAGE_COMMAND,
+ m_xPL->sendMessage( xPL_MESSAGE_COMMAND,
xPL_getSourceVendor( message ), xPL_getSourceDeviceID( message ), xPL_getSourceInstanceID( message ),
"config", "list", command_request );
- xPLCache->updateEntry( "device." + source + ".configlistsend", "true", false );
+ mDeviceMap[device.VDI].ConfigListSent = true;
}
}
-void deviceManagerClass::processCurrentConfig( const xPL_MessagePtr message ) const
+void deviceManagerClass::processCurrentConfig( const xPL_MessagePtr message )
{
- std::string source = std::string("")
- + xPL_getSourceVendor ( message ) + "-"
- + xPL_getSourceDeviceID ( message ) + "."
- + xPL_getSourceInstanceID( message );
+ std::string source = extractSourceFromXplMessage(message);
xPLDevice device = getDevice( source );
writeLog( "deviceManagerClass::processCurrentConfig("+source+") - found ["+device.VDI+"]", logLevel::debug );
if( "" == device.VDI ) {
@@ -240,8 +216,9 @@
// => just treat it like an heartbeat
return processConfigHeartBeat( message );
} else {
- xPLCache->updateEntry( "config." + source + ".expires", timeConverter( second_clock::local_time() + minutes( 2*device.Interval + 1 ) ), false );
- xPLCache->updateEntry( "config." + source + ".current", "true", false );
+// ptime expires = calculateExpireTime(device.Interval);
+// m_xPLCache->updateEntry( "config." + source + ".expires", timeConverter(calculateExpireTime(device.Interval), false ));
+ m_xPLCache->updateEntry( "config." + source + ".current", "true", false );
}
xPL_NameValueListPtr nvList = xPL_getMessageBody( message );
@@ -253,7 +230,7 @@
nvPair = xPL_getNamedValuePairAt( nvList, nvIndex );
std::string value = nvPair->itemValue; to_lower( value );
std::string key = nvPair->itemName ; to_lower( key );
- std::string count = xPLCache->objectValue( "config." + source + ".options." + key + ".count" );
+ std::string count = m_xPLCache->objectValue( "config." + source + ".options." + key + ".count" );
if( "" != count ) {
if( multiKey == key ) {
multiCount++;
@@ -265,20 +242,25 @@
snprintf( buf, 6, "{%.3d}", multiCount );
key += buf;
}
- xPLCache->updateEntry( "config." + source + ".current." + key, value, false );
+ m_xPLCache->updateEntry( "config." + source + ".current." + key, value, false );
}
}
-void deviceManagerClass::processHeartbeat( xPL_MessagePtr message ) const
+std::string deviceManagerClass::extractSourceFromXplMessage( xPL_MessagePtr message )
{
- std::string source = std::string("")
- + xPL_getSourceVendor ( message ) + "-"
- + xPL_getSourceDeviceID ( message ) + "."
- + xPL_getSourceInstanceID( message );
+ return std::string(xPL_getSourceVendor(message)) + "-"
+ + xPL_getSourceDeviceID ( message ) + "."
+ + xPL_getSourceInstanceID( message );
+}
+
+void deviceManagerClass::processHeartbeat( xPL_MessagePtr message )
+{
+ std::string source = extractSourceFromXplMessage(message);
+
xPLDevice device = getDevice( source );
- int interval = atoi(std::string( xPL_getMessageNamedValue( message, "interval" ) ).c_str());
- ptime expires = second_clock::local_time() + minutes( 2*interval + 1 );
+ int interval = 5;
+ ptime expires = calculateExpireTime(xPL_getMessageNamedValue(message, "interval"), &interval);
writeLog( "deviceManagerClass::processHeartbeat("+source+") - found ["+device.VDI+"]", logLevel::debug );
if( "" == device.VDI ) {
@@ -295,56 +277,52 @@
device.Suspended = false; // lost heartbeat
device.Interval = interval; // current heartbeat interval
device.Expires = expires; // time expires
- update( device );
+ mDeviceMap[device.VDI] = device;
// Throw it a config request anyway, see what turns up..
xPLMessage::namedValueList command_request; command_request.push_back( std::make_pair( "command", "request" ) );
- xPL->sendMessage( xPL_MESSAGE_COMMAND,
+ m_xPL->sendMessage( xPL_MESSAGE_COMMAND,
xPL_getSourceVendor( message ), xPL_getSourceDeviceID( message ), xPL_getSourceInstanceID( message ),
"config", "list" , command_request );
/* // that code below was from the VB - but we don't need it as processConfigList will
// itself send the config.current request...
- xPL->sendMessage( xPL_MESSAGE_COMMAND,
+ m_xPL->sendMessage( xPL_MESSAGE_COMMAND,
xPL_getSourceVendor( message ), xPL_getSourceDeviceID( message ), xPL_getSourceInstanceID( message ),
"config", "current", command_request );
*/
} else {
- xPLCache->updateEntry( "device." + source + ".expires", timeConverter( expires ), false );
+ mDeviceMap[source].Expires = expires;
}
}
-void deviceManagerClass::processRemove( xPL_MessagePtr message ) const
+void deviceManagerClass::processRemove( xPL_MessagePtr message )
{
- std::string source = std::string("")
- + xPL_getSourceVendor ( message ) + "-"
- + xPL_getSourceDeviceID ( message ) + "."
- + xPL_getSourceInstanceID( message );
+ std::string source = extractSourceFromXplMessage(message);
remove( source );
removeConfig( source );
}
-void deviceManagerClass::sendConfigResponse( const std::string& source, const bool removeOldValue ) const
+void deviceManagerClass::sendConfigResponse( const std::string& source, const bool removeOldValue )
{
writeLog( "deviceManagerClass::sendConfigResponse("+source+", "+(removeOldValue?"true":"false")+")", logLevel::debug );
boost::regex re( "config\\." + source + "\\.current\\.([a-z0-9]{1,16})(?:\\{([0-9]{1,3})\\})?" );
- std::vector<std::string> entries = xPLCache->filterByRegEx( re );
+ std::vector<std::string> entries = m_xPLCache->filterByRegEx( re );
xPLMessage::namedValueList list;
-// for( std::vector<std::string>::const_iterator it = entries.begin(); it != entries.end(); ++it )
for( auto entry : entries) {
boost::smatch matches;
boost::regex_match( entry, matches, re );
writeLog( "deviceManagerClass::sendConfigResponse: ["+entry+"] -> ["+matches[1]+"]("+matches[2]+")",logLevel::debug );
if( matches.size() > 1 ) {
- list.push_back( std::make_pair( matches[1], xPLCache->objectValue( entry ) ) );
+ list.push_back( std::make_pair( matches[1], m_xPLCache->objectValue( entry ) ) );
}
}
if( list.size() > 0 ) {
- xPL->sendMessage( xPL_MESSAGE_COMMAND, source, "config", "response", list );
- xPLCache->updateEntry( "config." + source + ".configmissing", "false", false );
- xPLCache->updateEntry( "config." + source + ".waitingconfig", "false", false );
- xPLCache->updateEntry( "config." + source + ".configdone" , "true" , false ); // FIXME the VB code says "false"...
+ m_xPL->sendMessage( xPL_MESSAGE_COMMAND, source, "config", "response", list );
+ m_xPLCache->updateEntry( "config." + source + ".configmissing", "false", false );
+ m_xPLCache->updateEntry( "config." + source + ".waitingconfig", "false", false );
+ m_xPLCache->updateEntry( "config." + source + ".configdone" , "true" , false ); // FIXME the VB code says "false"...
}
if( removeOldValue ) {
@@ -353,24 +331,24 @@
}
}
-bool deviceManagerClass::storeNewConfig( const std::string& source, const std::string& config ) const
+bool deviceManagerClass::storeNewConfig( const std::string& source, const std::string& config )
{
writeLog( "deviceManagerClass::storeNewConfig("+source+", "+config+")", logLevel::debug );
- if( !contains( source ) ) {
+ auto device = mDeviceMap.find(source);
+ if (device == mDeviceMap.end()) {
return false;
}
std::vector<std::string> list;
split( list, config, is_any_of("\r\n"), token_compress_on );
std::string multiKey;
- int multiCount = 0;
-// for( std::vector<std::string>::const_iterator it = list.begin(); it != list.end(); ++it )
- for( auto it : list) {
+ int multiCount = 0;
+ for( auto listitem : list) {
std::vector<std::string> tags;
- split( tags, it, is_any_of("=") );
+ split( tags, listitem, is_any_of("=") );
to_lower( tags[0] );
to_lower( tags[1] );
- std::string count = xPLCache->objectValue( "config." + source + ".options." + tags[0] + ".count" );
+ std::string count = m_xPLCache->objectValue( "config." + source + ".options." + tags[0] + ".count" );
if( "" != count ) {
if( multiKey != tags[0] ) {
multiKey = tags[0];
@@ -383,10 +361,21 @@
snprintf( buf, 6, "{%.3d}", multiCount );
tags[0] += buf;
}
- xPLCache->updateEntry( "config." + source + ".current." + tags[0], tags[1], false );
+ m_xPLCache->updateEntry( "config." + source + ".current." + tags[0], tags[1], false );
}
- if( xPLCache->childNodes( "config." + source + ".current" ).size() > 0 ) {
+ if( m_xPLCache->childNodes( "config." + source + ".current" ).size() > 0 ) {
sendConfigResponse( source, false ); // FIXME the VB said true - but why should I delete the values that I've just stored?
}
return true;
}
+
+bool deviceManagerClass::contains( const std::string& deviceTag ) const
+{
+ return mDeviceMap.find(deviceTag) != mDeviceMap.end();
+}
+
+bool deviceManagerClass::containsConfig( const std::string& configTag ) const
+{
+ return m_xPLCache->childNodes( "config." + configTag ).size() > 0;
+}
+
Modified: xPLHAL/branches/thomas_s_dev/src/devicemanager.h
===================================================================
--- xPLHAL/branches/thomas_s_dev/src/devicemanager.h 2011-11-20 21:29:50 UTC (rev 534)
+++ xPLHAL/branches/thomas_s_dev/src/devicemanager.h 2011-11-20 21:31:00 UTC (rev 535)
@@ -20,52 +20,65 @@
#define DEVICEMANAGER_H
#include <string>
+#include <map>
// this is also including the xPL.h with its data structures:
#include "xplhandler.h"
+class IxPLHandler;
+class IxPLCacheClass;
+
#include "xplcache.h"
#include "globals.h"
#include "xpldevice.h"
+#include "i_devicemanager.h"
-class deviceManagerClass
+class deviceManagerClass: public IdeviceManagerClass
{
- public:
- /** \brief Looks if the device deviceTag is known. */
- bool contains( const std::string& deviceTag ) const
- { return xPLCache->childNodes( "device." + deviceTag ).size() > 0; }
+ public:
+ deviceManagerClass(IxPLHandler* xplhandler, IxPLCacheClass* xplcache);
- /** \brief Looks if the config configTag is known. */
- bool containsConfig( const std::string& configTag ) const
- { return xPLCache->childNodes( "config." + configTag ).size() > 0; }
+ /** \brief Looks if the device deviceTag is known. */
+ bool contains( const std::string& deviceTag ) const;
- void add( const xPLDevice& device ) const;
- bool remove( const std::string& deviceTag ) const;
- bool removeConfig( const std::string& deviceTag ) const;
+ /** \brief Looks if the config configTag is known. */
+ bool containsConfig( const std::string& configTag ) const;
- /** \brief Returns the device deviceTag when it's known or an empty device */
- xPLDevice getDevice( const std::string& deviceTag ) const;
+ void add( const xPLDevice& device );
+ bool remove( const std::string& deviceTag );
+ bool removeConfig( const std::string& deviceTag ) const;
- /** \brief Returns all known device names */
- std::vector<std::string> getAllDeviceNames() const;
+ /** \brief Returns the device deviceTag when it's known or an empty device */
+ xPLDevice getDevice( const std::string& deviceTag ) const;
- void update( const xPLDevice& device ) const;
+ /** \brief Returns all known device names */
+ std::vector<std::string> getAllDeviceNames() const;
- /** \brief Handle the returned config list that someone (porbably we) have asked for */
- void processConfigList ( const xPL_MessagePtr message ) const;
+ /** \brief Handle the returned config list that someone (porbably we) have asked for */
+ void processConfigList ( const xPL_MessagePtr message );
- /** \brief Called when a new device poped up and is waiting to be configured */
- void processConfigHeartBeat( const xPL_MessagePtr message ) const;
+ /** \brief Called when a new device poped up and is waiting to be configured */
+ void processConfigHeartBeat( const xPL_MessagePtr message );
- /** \brief Called when a device sends its configuration */
- void processCurrentConfig ( const xPL_MessagePtr message ) const;
- void processHeartbeat ( const xPL_MessagePtr message ) const;
- void processRemove ( const xPL_MessagePtr message ) const;
+ /** \brief Called when a device sends its configuration */
+ void processCurrentConfig ( const xPL_MessagePtr message );
+ void processHeartbeat ( const xPL_MessagePtr message );
+ void processRemove ( const xPL_MessagePtr message );
- void sendConfigResponse( const std::string& source, const bool removeOldValue ) const;
-
- /** \brief A new configuration arrived via XHCP, handle it... */
- bool storeNewConfig( const std::string& source, const std::string& config ) const;
+ void sendConfigResponse( const std::string& source, const bool removeOldValue );
+
+ /** \brief A new configuration arrived via XHCP, handle it... */
+ bool storeNewConfig( const std::string& source, const std::string& config );
+
+ private:
+ /*! \TODO: move to correct class, maybe xplMessage */
+ std::string extractSourceFromXplMessage( xPL_MessagePtr message );
+ boost::posix_time::ptime calculateExpireTime(int interval);
+ boost::posix_time::ptime calculateExpireTime(const char* string_interval, int *pInterval = 0);
+
+ IxPLHandler* m_xPL;
+ IxPLCacheClass* m_xPLCache;
+ std::map<std::string, xPLDevice> mDeviceMap;
};
#endif // DEVICEMANAGER_H
Added: xPLHAL/branches/thomas_s_dev/src/i_devicemanager.h
===================================================================
--- xPLHAL/branches/thomas_s_dev/src/i_devicemanager.h (rev 0)
+++ xPLHAL/branches/thomas_s_dev/src/i_devicemanager.h 2011-11-20 21:31:00 UTC (rev 535)
@@ -0,0 +1,42 @@
+/*
+ xPLHAL implementation in C++
+ Copyright (C) 2009 by Christian Mayer - xpl at ChristianMayer dot de
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef IDEVICEMANAGER_H
+#define IDEVICEMANAGER_H
+
+// this is also including the xPL.h with its data structures:
+#include "xplhandler.h"
+
+class IdeviceManagerClass
+{
+ public:
+ virtual ~IdeviceManagerClass() {}
+
+ /** \brief Handle the returned config list that someone (porbably we) have asked for */
+ virtual void processConfigList ( const xPL_MessagePtr message ) = 0;
+
+ /** \brief Called when a new device poped up and is waiting to be configured */
+ virtual void processConfigHeartBeat( const xPL_MessagePtr message ) = 0;
+
+ /** \brief Called when a device sends its configuration */
+ virtual void processCurrentConfig ( const xPL_MessagePtr message ) = 0;
+ virtual void processHeartbeat ( const xPL_MessagePtr message ) = 0;
+ virtual void processRemove ( const xPL_MessagePtr message ) = 0;
+};
+
+#endif // IDEVICEMANAGER_H
Added: xPLHAL/branches/thomas_s_dev/src/i_xplcache.h
===================================================================
--- xPLHAL/branches/thomas_s_dev/src/i_xplcache.h (rev 0)
+++ xPLHAL/branches/thomas_s_dev/src/i_xplcache.h 2011-11-20 21:31:00 UTC (rev 535)
@@ -0,0 +1,66 @@
+/*
+ xPLHAL implementation in C++
+ Copyright (C) 2009 by Christian Mayer - xpl at ChristianMayer dot de
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef IXPLCACHE_H
+#define IXPLCACHE_H
+
+#include <string>
+#include <vector>
+#include <boost/regex.hpp>
+
+//class boost::regex;
+
+class IxPLCacheClass
+{
+ public:
+
+ /** \returns true if the element name exists. */
+ virtual bool exists( const std::string& name ) const = 0;
+
+ /** \returns the value of element name if it exists - or an empty std::string otherwise. */
+ virtual std::string objectValue( const std::string& name ) const = 0;
+
+ /** \returns all objectes stored in the cache. */
+ virtual std::string listAllObjects( bool forceEverything = false ) const = 0;
+
+ /** \brief Create a new object or update it if it exists in the cache. */
+ virtual void updateEntry( const std::string& name, const std::string& value, const bool expires = true ) = 0;
+
+ /** \brief Delete an object if it exists in the cache - or do nothing. */
+ virtual void deleteEntry( const std::string& name ) = 0;
+
+ /** \brief Delete all expired entries. */
+ virtual void flushExpiredEntries( void ) = 0;
+
+ /** \returns all entries that start with filter. */
+ virtual std::vector<std::string> childNodes( const std::string& filter ) const = 0;
+
+ /** \returns all entries that fit the regular expression. */
+ virtual std::vector<std::string> filterByRegEx( const boost::regex& regex ) const = 0;
+
+ /** \returns all entries that fit the regular expression. */
+ virtual std::vector<std::string> filterByRegEx( const std::string& regex ) const = 0;
+
+ /** \brief Load object cache from file system */
+ virtual void loadCache( void ) = 0;
+
+ /** \brief Save object cache to file system */
+ virtual void saveCache( void ) const = 0;
+};
+
+#endif // IXPLCACHE_H
Added: xPLHAL/branches/thomas_s_dev/src/i_xplhandler.h
===================================================================
--- xPLHAL/branches/thomas_s_dev/src/i_xplhandler.h (rev 0)
+++ xPLHAL/branches/thomas_s_dev/src/i_xplhandler.h 2011-11-20 21:31:00 UTC (rev 535)
@@ -0,0 +1,50 @@
+/*
+ xPLHAL implementation in C++
+ Copyright (C) 2009 by Christian Mayer - xpl at ChristianMayer dot de
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#ifndef IXPLHANDLER_H
+#define IXPLHANDLER_H
+
+#include <string>
+
+// this is also including the xPL.h
+#include "xplmessagequeue.h"
+
+/**
+ * \brief Handle all xPL communication.
+ */
+class IxPLHandler
+{
+ public:
+ virtual ~IxPLHandler() {}
+
+ /** \brief Broadcast one message to the xPL network. */
+ virtual void sendBroadcastMessage( const std::string& msgClass, const std::string& msgType, const xPLMessage::namedValueList& namedValues ) const = 0;
+
+ /** \brief Send a directed message to the xPL network. */
+ virtual void sendMessage( const xPL_MessageType type, const std::string& tgtVendor, const std::string& tgtDeviceID,
+ const std::string& tgtInstanceID, const std::string& msgClass, const std::string& msgType,
+ const xPLMessage::namedValueList& namedValues ) const = 0;
+
+ /** \brief Send a directed message to the xPL network. */
+ virtual void sendMessage( const xPL_MessageType type, const std::string& VDI,
+ const std::string& msgClass, const std::string& msgType, const xPLMessage::namedValueList& namedValues ) const = 0;
+
+};
+
+#endif // IXPLHANDLER_H
Modified: xPLHAL/branches/thomas_s_dev/src/main.cpp
===================================================================
--- xPLHAL/branches/thomas_s_dev/src/main.cpp 2011-11-20 21:29:50 UTC (rev 534)
+++ xPLHAL/branches/thomas_s_dev/src/main.cpp 2011-11-20 21:31:00 UTC (rev 535)
@@ -107,7 +107,8 @@
xPLCache = new xPLCacheClass;
XHCPServer *xhcpServer = new XHCPServer();
xPL = new xPLHandler( boost::asio::ip::host_name() ); //xPL->start();
- deviceManager = new deviceManagerClass();
+ deviceManager = new deviceManagerClass(xPL, xPLCache);
+ xPL->setDeviceManager(deviceManager);
writeLog( "started", logLevel::all );
// force everyone to send their configuration so that we start up to date...
Modified: xPLHAL/branches/thomas_s_dev/src/xplcache.h
===================================================================
--- xPLHAL/branches/thomas_s_dev/src/xplcache.h 2011-11-20 21:29:50 UTC (rev 534)
+++ xPLHAL/branches/thomas_s_dev/src/xplcache.h 2011-11-20 21:31:00 UTC (rev 535)
@@ -26,6 +26,7 @@
#include <boost/thread/shared_mutex.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/regex.hpp>
+#include "i_xplcache.h"
/** Helper function */
@@ -64,7 +65,7 @@
*
* This class contains a std::map to stores xPL messages and the global variables.
*/
-class xPLCacheClass
+class xPLCacheClass: public IxPLCacheClass
{
protected:
/**
Modified: xPLHAL/branches/thomas_s_dev/src/xplhandler.cpp
===================================================================
--- xPLHAL/branches/thomas_s_dev/src/xplhandler.cpp 2011-11-20 21:29:50 UTC (rev 534)
+++ xPLHAL/branches/thomas_s_dev/src/xplhandler.cpp 2011-11-20 21:31:00 UTC (rev 535)
@@ -21,9 +21,10 @@
using namespace boost::algorithm;
#include "log.h"
-#include "devicemanager.h"
+#include "i_devicemanager.h"
#include "xplhandler.h"
+#include "globals.h"
/** Handle a change to the logger service configuration */
/* static void configChangedHandler(xPL_ServicePtr theService, xPL_ObjectPtr userData) {
@@ -31,10 +32,13 @@
int xPLHandler::m_refcount = 0;
-xPLHandler::xPLHandler( const std::string& host_name )
- : xPLService(0),
- m_exit_thread(false),
- vendor( "CHRISM" ), deviceID( "xplhalqt" ), instanceID( host_name )
+xPLHandler::xPLHandler( const std::string& host_name, IdeviceManagerClass* devManager )
+: xPLService(0)
+, m_exit_thread(false)
+, vendor( "CHRISM" )
+, deviceID( "xplhalqt" )
+, instanceID( host_name )
+, m_deviceManager(devManager)
{
writeLog( "xPLHandler::xPLHandler( "+host_name+" )", logLevel::debug );
//xPL_setDebugging(TRUE);
@@ -98,6 +102,10 @@
}
}
+void xPLHandler::setDeviceManager(IdeviceManagerClass* devManager)
+{
+ m_deviceManager = devManager;
+}
void xPLHandler::run()
{
@@ -253,15 +261,15 @@
if( "config.list" == schema )
{
// someone (probably we) have asked for the config list - handle it now...
- deviceManager->processConfigList( theMessage );
+ m_deviceManager->processConfigList( theMessage );
} else if( "config.current" == schema )
{
// someone requested the device to send it's current configuration
- deviceManager->processCurrentConfig( theMessage );
+ m_deviceManager->processCurrentConfig( theMessage );
} else if( "config.app" == schema || "config.basic" == schema )
{
// a new device poped up and wants to be configured
- deviceManager->processConfigHeartBeat( theMessage );
+ m_deviceManager->processConfigHeartBeat( theMessage );
} else if( "hbeat.basic" == schema || "hbeat.app" == schema )
{
/*
@@ -269,10 +277,10 @@
RaiseEvent AddtoCache("xplhal." & msgSource & ".alive", Now.ToString, False)
End If
*/
- deviceManager->processHeartbeat( theMessage );
+ m_deviceManager->processHeartbeat( theMessage );
} else if( "hbeat.end" == schema )
{
- deviceManager->processRemove( theMessage );
+ m_deviceManager->processRemove( theMessage );
}
}
}
Modified: xPLHAL/branches/thomas_s_dev/src/xplhandler.h
===================================================================
--- xPLHAL/branches/thomas_s_dev/src/xplhandler.h 2011-11-20 21:29:50 UTC (rev 534)
+++ xPLHAL/branches/thomas_s_dev/src/xplhandler.h 2011-11-20 21:31:00 UTC (rev 535)
@@ -27,21 +27,26 @@
#include <boost/thread/locks.hpp>
// this is also including the xPL.h
+#include "i_xplhandler.h"
#include "xplmessagequeue.h"
+class IdeviceManagerClass;
+
/**
* \brief Handle all xPL communication.
*/
-class xPLHandler
+class xPLHandler: public IxPLHandler
{
/** \brief variable to ensure that the xPL library is only called at the same time... */
//mutable boost::mutex xPLLock;
//typedef boost::lock_guard<boost::mutex> lock_guard;
public:
- xPLHandler( const std::string& host_name );
+ xPLHandler( const std::string& host_name, IdeviceManagerClass* devManager = 0);
~xPLHandler();
+ void setDeviceManager(IdeviceManagerClass* devManager);
+
void run();
/** \brief Broadcast one message to the xPL network. */
@@ -73,6 +78,7 @@
boost::thread* m_thread;
static int m_refcount;
bool m_exit_thread;
+ IdeviceManagerClass* m_deviceManager;
};
#endif // XPLHANDLER_H
Modified: xPLHAL/branches/thomas_s_dev/test/CMakeLists.txt
===================================================================
--- xPLHAL/branches/thomas_s_dev/test/CMakeLists.txt 2011-11-20 21:29:50 UTC (rev 534)
+++ xPLHAL/branches/thomas_s_dev/test/CMakeLists.txt 2011-11-20 21:31:00 UTC (rev 535)
@@ -14,15 +14,31 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#project(xPLHALTest)
cmake_minimum_required(VERSION 2.6)
-set(CMAKE_CXX_FLAGS "-g -Os")
-set(xPLHALTest_SRCS test_test.cpp)
+include(CTest)
-add_executable(test_runner ${xPLHALTest_SRCS})
+find_package(Boost COMPONENTS unit_test_framework REQUIRED)
+
+file(GLOB_RECURSE UnitTests_sources *.cpp)
+
+#set(UnitTest_tsrc ../src/devicemanager.cpp ../src/xplcache.cpp ../src/xplhandler.cpp ../src/xplmessagequeue.cpp)
+set(UnitTest_tsrc ../src/devicemanager.cpp)
+
+add_executable(test_runner ${UnitTests_sources} ${UnitTest_tsrc})
+
+include_directories(../src)
+
+enable_testing()
+
+set(CMAKE_CXX_FLAGS "-g -std=c++0x -fprofile-arcs -ftest-coverage")
+#set(xPLHALTest_SRCS test_test.cpp test_xplcache.cpp)
+#add_executable(test_runner ${xPLHALTest_SRCS})
#message(STATUS "Boost_LIBRARIES=${Boost_LIBRARIES}")
#message(STATUS "LIBRARIES=${LIBS}")
+#message(STATUS "SOURCE=${SOURCES}")
#target_link_libraries(xPLHAL ${Boost_LIBRARIES} -dynamic xPL pthread -static)
-target_link_libraries(test_runner ${LIBS} boost_unit_test_framework-mt)
+target_link_libraries(test_runner ${LIBS})
+add_test(UnitTests test_runner)
+
Added: xPLHAL/branches/thomas_s_dev/test/test_devicemanager.cpp
===================================================================
--- xPLHAL/branches/thomas_s_dev/test/test_devicemanager.cpp (rev 0)
+++ xPLHAL/branches/thomas_s_dev/test/test_devicemanager.cpp 2011-11-20 21:31:00 UTC (rev 535)
@@ -0,0 +1,147 @@
+#include "../src/devicemanager.h"
+#define BOOST_TEST_MODULE "DeviceManager"
+#include <boost/test/unit_test.hpp>
+
+//#include "xplcache.h"
+#include "devicemanager.h"
+
+// load globas and give them their space to live
+//#include "globals.h"
+
+#if 0
+using namespace boost::filesystem;
+path xPLHalRootFolder;
+path DataFileFolder;
+path ScriptEngineFolder;
+path rulesFolder;
+#endif
+
+
+class MockXplHandler: public IxPLHandler
+{
+ public:
+ void sendBroadcastMessage( const std::string& msgClass, const std::string& msgType, const xPLMessage::namedValueList& namedValues ) const
+ {
+ std::cerr << "sendBroadcastMessage(" << msgClass;
+ std::cerr << std::endl;
+ }
+
+ /** \brief Send a directed message to the xPL network. */
+ void sendMessage( const xPL_MessageType type, const std::string& tgtVendor, const std::string& tgtDeviceID,
+ const std::string& tgtInstanceID, const std::string& msgClass, const std::string& msgType,
+ const xPLMessage::namedValueList& namedValues ) const
+ {
+ std::cerr << "sendMessage";
+ std::cerr << std::endl;
+ }
+
+ /** \brief Send a directed message to the xPL network. */
+ void sendMessage( const xPL_MessageType type, const std::string& VDI,
+ const std::string& msgClass, const std::string& msgType, const xPLMessage::namedValueList& namedValues ) const
+ {
+ std::cerr << "sendMessage";
+ std::cerr << std::endl;
+ }
+};
+
+class MockXplCache: public IxPLCacheClass
+{
+ /** \returns true if the element name exists. */
+ virtual bool exists( const std::string& name ) const
+ {
+ return false;
+ }
+
+ /** \returns the value of element name if it exists - or an empty std::string otherwise. */
+ virtual std::string objectValue( const std::string& name ) const { return ""; }
+
+ /** \returns all objectes stored in the cache. */
+ virtual std::string listAllObjects( bool forceEverything = false ) const { return ""; }
+
+ /** \brief Create a new object or update it if it exists in the cache. */
+ virtual void updateEntry( const std::string& name, const std::string& value, const bool expires = true ) { }
+
+ /** \brief Delete an object if it exists in the cache - or do nothing. */
+ virtual void deleteEntry( const std::string& name ) { }
+
+ /** \brief Delete all expired entries. */
+ virtual void flushExpiredEntries( void ) { }
+
+ /** \returns all entries that start with filter. */
+ virtual std::vector<std::string> childNodes( const std::string& filter ) const { std::vector<std::string> a; return a; }
+
+ /** \returns all entries that fit the regular expression. */
+ virtual std::vector<std::string> filterByRegEx( const boost::regex& regex ) const { std::vector<std::string> a; return a; }
+
+ /** \returns all entries that fit the regular expression. */
+ virtual std::vector<std::string> filterByRegEx( const std::string& regex ) const { std::vector<std::string> a; return a; }
+
+ /** \brief Load object cache from file system */
+ virtual void loadCache( void ) { }
+
+ /** \brief Save object cache to file system */
+ virtual void saveCache( void ) const { }
+};
+
+BOOST_AUTO_TEST_SUITE(DeviceManagerSuite);
+
+BOOST_AUTO_TEST_CASE( add_device )
+{
+ xPL_MessagePtr msg = new xPL_Message;
+ msg->messageType = xPL_MESSAGE_TRIGGER;
+ msg->hopCount = 0;
+ msg->receivedMessage = TRUE; /* TRUE if received, FALSE if being sent */
+ msg->sourceVendor = "pnxs";
+ msg->sourceDeviceID = "hs485";
+ msg->sourceInstanceID = "default1";
+ msg->isGroupMessage = FALSE;
+ msg->groupName = 0;
+ msg->isBroadcastMessage = TRUE;
+ msg->targetVendor = "*";
+ msg->targetDeviceID = "";
+ msg->targetInstanceID = "";
+ msg->schemaClass = "blah";
+ msg->schemaType = "blub";
+ xPL_addMessageNamedValue(msg, "tag", "value");
+
+ MockXplHandler mockHandler;
+ MockXplCache mockCache;
+
+ deviceManagerClass dm(&mockHandler, &mockCache);
+ BOOST_CHECK( dm.contains("pnxs-hs485.default1") == false);
+ dm.processHeartbeat(msg);
+ BOOST_CHECK( dm.contains("pnxs-hs485.default1") == true);
+}
+
+BOOST_AUTO_TEST_CASE( remove_device )
+{
+ xPL_MessagePtr msg = new xPL_Message;
+ msg->messageType = xPL_MESSAGE_TRIGGER;
+ msg->hopCount = 0;
+ msg->receivedMessage = TRUE; /* TRUE if received, FALSE if being sent */
+ msg->sourceVendor = "pnxs";
+ msg->sourceDeviceID = "hs485";
+ msg->sourceInstanceID = "default1";
+ msg->isGroupMessage = FALSE;
+ msg->groupName = 0;
+ msg->isBroadcastMessage = TRUE;
+ msg->targetVendor = "*";
+ msg->targetDeviceID = "";
+ msg->targetInstanceID = "";
+ msg->schemaClass = "blah";
+ msg->schemaType = "blub";
+ xPL_addMessageNamedValue(msg, "tag", "value");
+
+ MockXplHandler mockHandler;
+ MockXplCache mockCache;
+
+ deviceManagerClass dm(&mockHandler, &mockCache);
+ BOOST_CHECK( dm.contains("pnxs-hs485.default1") == false);
+ dm.processHeartbeat(msg);
+ BOOST_CHECK( dm.contains("pnxs-hs485.default1") == true);
+
+ dm.processRemove(msg);
+ BOOST_CHECK( dm.contains("pnxs-hs485.default1") == false);
+}
+
+BOOST_AUTO_TEST_SUITE_END();
Deleted: xPLHAL/branches/thomas_s_dev/test/test_test.cpp
===================================================================
--- xPLHAL/branches/thomas_s_dev/test/test_test.cpp 2011-11-20 21:29:50 UTC (rev 534)
+++ xPLHAL/branches/thomas_s_dev/test/test_test.cpp 2011-11-20 21:31:00 UTC (rev 535)
@@ -1,8 +0,0 @@
-#define BOOST_TEST_DYN_LINK
-#define BOOST_TEST_MODULE "MyTest"
-#include <boost/test/unit_test.hpp>
-
-BOOST_AUTO_TEST_CASE( my_test )
-{
- BOOST_CHECK( true );
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-20 21:29:56
|
Revision: 534
http://openautomation.svn.sourceforge.net/openautomation/?rev=534&view=rev
Author: mayerch
Date: 2011-11-20 21:29:50 +0000 (Sun, 20 Nov 2011)
Log Message:
-----------
Layout fix: make help button in editor look the same (and thus clean up the CSS a bit)
Modified Paths:
--------------
CometVisu/trunk/visu/edit/style_edit.css
Modified: CometVisu/trunk/visu/edit/style_edit.css
===================================================================
--- CometVisu/trunk/visu/edit/style_edit.css 2011-11-20 21:22:17 UTC (rev 533)
+++ CometVisu/trunk/visu/edit/style_edit.css 2011-11-20 21:29:50 UTC (rev 534)
@@ -56,14 +56,12 @@
cursor: pointer;
float: right;
margin-right: .5em;
-}
-
-div#saveconfigcontrol {
padding: 0 .2em;
}
div#addwidgetcontrol {
width: 1.5em;
+ padding: 0;
}
div#addMaster {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-20 21:22:23
|
Revision: 533
http://openautomation.svn.sourceforge.net/openautomation/?rev=533&view=rev
Author: mayerch
Date: 2011-11-20 21:22:17 +0000 (Sun, 20 Nov 2011)
Log Message:
-----------
Last minute bug fix as discussed in the forum: change diagram to new syntax that uses explicit "label" element
Modified Paths:
--------------
CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2011-11-20 21:10:37 UTC (rev 532)
+++ CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2011-11-20 21:22:17 UTC (rev 533)
@@ -34,7 +34,8 @@
var ret_val = $('<div class="widget" />');
ret_val.addClass( 'diagram' );
- var label = '<div class="label">' + page.textContent + '</div>';
+ var labelElement = $p.find('label')[0];
+ var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
var actor = $("<div class=\"actor\"><div class=\"diagram_inline\" id=\"" + id + "\">loading...</div></div>");
var diagram = $("#" + id, actor);
@@ -53,7 +54,7 @@
diagram.data("series", $p.attr("series") || "day");
diagram.data("period", $p.attr("period") || 1);
diagram.data("datasource", $p.attr("datasource") || "AVERAGE");
- diagram.data("label", page.textContent);
+ diagram.data("label", $p.find('label')[0] ? $p.find('label')[0].textContent : '');
diagram.data("refresh", $p.attr("refresh"));
refreshDiagram(diagram, {});
@@ -70,7 +71,10 @@
datasource: {type: "list", required: false, list: {'MIN': "Min", 'AVERAGE': "Avg", 'MAX': "Max"}},
refresh: {type: "numeric", required: false}
},
- content: {type: "string", required: true}
+ elements: {
+ label: { type: 'string', required: false, multi: false }
+ },
+ content: false
});
VisuDesign_Custom.prototype.addCreator("diagram_popup", {
@@ -86,7 +90,8 @@
var ret_val = $('<div class="widget" />');
ret_val.addClass( 'diagram' );
- var label = '<div class="label">' + page.textContent + '</div>';
+ var labelElement = $p.find('label')[0];
+ var label = labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '';
var actor = $("<div class=\"actor\"><div class=\"diagram_preview\" id=\"" + id + "\">loading...</div></div>");
var diagram = $("#" + id, actor);
@@ -105,7 +110,7 @@
diagram.data("series", $p.attr("series") || "day");
diagram.data("period", $p.attr("period") || 1);
diagram.data("datasource", $p.attr("datasource") || "AVERAGE");
- diagram.data("label", page.textContent);
+ diagram.data("label", $p.find('label')[0] ? $p.find('label')[0].textContent : '');
diagram.data("refresh", $p.attr("refresh"));
var bDiagram = $("<div class=\"diagram\" id=\"" + id + "_big\"/>");
@@ -174,7 +179,10 @@
refresh: {type: "numeric", required: false},
tooltip: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
},
- content: {type: "string", required: true}
+ elements: {
+ label: { type: 'string', required: false, multi: false }
+ },
+ content: false
});
diagramColors = {
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-11-20 21:10:37 UTC (rev 532)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-11-20 21:22:17 UTC (rev 533)
@@ -366,7 +366,9 @@
<address transform="DPT:5.001" type="">12/7/52</address>
</slide>
<break/>
- <diagram_popup rrd="eib_traffic" unit="tps" series="day" refresh="300">KNX traffic</diagram_popup>
+ <diagram_popup rrd="eib_traffic" unit="tps" series="day" refresh="300">
+ <label>KNX traffic</label>
+ </diagram_popup>
<diagram_inline rrd="eib_traffic" width="600" height="400"/>
<line/>
<page name="Erweiterte Widgets">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-20 21:10:43
|
Revision: 532
http://openautomation.svn.sourceforge.net/openautomation/?rev=532&view=rev
Author: mayerch
Date: 2011-11-20 21:10:37 +0000 (Sun, 20 Nov 2011)
Log Message:
-----------
Last minute bug fix as discussed in the forum: in relative mode the infotrigger is using the variant types "button" and "display" now
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2011-11-20 16:34:18 UTC (rev 531)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-11-20 21:10:37 UTC (rev 532)
@@ -728,10 +728,10 @@
$p.find('address').each( function(){
var src = this.textContent;
var transform = this.getAttribute('transform');
- var readonly = this.getAttribute('readonly' ) == 'true' ;
- var relative = this.getAttribute('variant' ) == 'relative';
- address[ '_' + src ] = [ transform, readonly, relative ];
- if( !relative ) { // no need to listen to relative address
+ var readonly = this.getAttribute('readonly' ) == 'true';
+ var isButton = this.getAttribute('variant' ) == 'button';
+ address[ '_' + src ] = [ transform, readonly, isButton ];
+ if( !isButton ) { // no need to listen to relative address
ga_list.push( src );
};
});
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-11-20 16:34:18 UTC (rev 531)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-11-20 21:10:37 UTC (rev 532)
@@ -120,11 +120,11 @@
<break/>
<infotrigger uplabel="wärmer" downlabel="kälter" upvalue="0.1" downvalue="-0.1" align="center" format="%.1f °C" change="absolute" min="7" max="24">
<label>Infotrigger: Sollwert</label>
- <address transform="DPT:9" variant="absolute">12/7/9</address>
+ <address transform="DPT:9">12/7/9</address>
</infotrigger>
<infotrigger uplabel=">" downlabel="<" upvalue="1" downvalue="-1" min="0" max="5" align="center" infoposition="1" change="absolute" mapping="AudioSource" >
<label>Infotrigger: Audioquelle</label>
- <address transform="DPT:5.010" variant="absolute">12/7/105</address>
+ <address transform="DPT:5.010">12/7/105</address>
</infotrigger>
<page name="Infotrigger: Erweitert..." align="center">
<text>Ein Infotrigger lässt sich in zwei verschiedenen Betriebsarten betreiben: relativ und absolut</text>
@@ -133,8 +133,8 @@
<break/>
<infotrigger uplabel="+" upvalue="1" downlabel="-" downvalue="0" align="center" infoposition="1" change="relative">
<label>Lautstärke</label>
- <address transform="DPT:16.000" readonly="true" variant="absolute">12/7/16</address>
- <address transform="DPT:1.001" readonly="false" variant="relative">12/7/1</address>
+ <address transform="DPT:16.000" readonly="true" variant="display">12/7/16</address>
+ <address transform="DPT:1.001" readonly="false" variant="button">12/7/1</address>
</infotrigger>
<break/>
<info>
@@ -154,7 +154,7 @@
<break/>
<infotrigger uplabel="+" upvalue="5" downlabel="-" downvalue="-5" align="center" infoposition="1" change="absolute" format="%.1f%%" max="100">
<label>Lautstärke</label>
- <address transform="DPT:5.001" readonly="false" variant="absolute">12/7/5</address>
+ <address transform="DPT:5.001" readonly="false">12/7/5</address>
</infotrigger>
</page>
<break/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-20 16:34:25
|
Revision: 531
http://openautomation.svn.sourceforge.net/openautomation/?rev=531&view=rev
Author: mayerch
Date: 2011-11-20 16:34:18 +0000 (Sun, 20 Nov 2011)
Log Message:
-----------
change to external config (-> conf.d)
Modified Paths:
--------------
wiregate/plugin/generic/Multi-RTR.pl
Added Paths:
-----------
wiregate/plugin/generic/conf.d/Multi-RTR.conf_sample
Modified: wiregate/plugin/generic/Multi-RTR.pl
===================================================================
--- wiregate/plugin/generic/Multi-RTR.pl 2011-11-20 16:24:27 UTC (rev 530)
+++ wiregate/plugin/generic/Multi-RTR.pl 2011-11-20 16:34:18 UTC (rev 531)
@@ -1,6 +1,6 @@
#############################################################################
# Plugin: Multi RTR
-# V0.6 2011-09-18
+# V0.7 2011-11-20
# Copyright: Christian Mayer (mail at ChristianMayer.de)
# License: GPL (v3)
#
@@ -23,39 +23,48 @@
#############################################################################
# Configuration:
-my %controllers = (
- '130_Hobby1_HK' => {
- 'SetPointGA' => '3/3/130', 'SetPointRRD' => '130_Hobby1_HK_Sollwert',
- 'SensorGA' => '4/0/130',
- 'ActuatorGA' => '3/0/130', 'ActuatorRRD' => '130_Hobby1_HK_Regelung',
- 'ProportionalGain' => 5, 'IntegralTime' => 150
- },
- '140_Hobby2_HK' => {
- 'SetPointGA' => '3/3/140', 'SetPointRRD' => '140_Hobby2_HK_Sollwert',
- 'SensorGA' => '4/0/140',
- 'ActuatorGA' => '3/0/140', 'ActuatorRRD' => '140_Hobby2_HK_Regelung',
- 'ProportionalGain' => 5, 'IntegralTime' => 240
- },
-);
-my %default = (
- 'SetPointDPT' => 9.001,
- 'SensorDPT' => 9.001,
- 'ActuatorDPT' => 5,
- 'DisableDPT' => 1,
- 'SetPointInit' => 21.0,
- 'SetPointLFlag' => 1, # true
- 'ActuatorLFlag' => 1, # true
- 'MinUpdateRate' => 5 * 60, # 5 minutes
-);
+# --> change values in the conf.d directory!
+my %controllers = ();
+my %default = ();
my $GlobalDisableGA = '14/5/50';
my $reset = 0; # set to 1 to reset the states, run script and change to 0 again
-my $show_debug = 1; # switches debug information that will be shown in the log
+my $show_debug = 0; # switches debug information that will be shown in the log
#############################################################################
# Do NOT change anything below!
#############################################################################
+my $confFile = '/etc/wiregate/plugin/generic/conf.d/'.basename($plugname,'.pl').'.conf';
+if (! -f $confFile)
+{
+ plugin_log($plugname, " no conf file [$confFile] found.");
+}
+else
+{
+ plugin_log($plugname, " reading conf file [$confFile].") if( $show_debug > 1);
+ open(CONF, $confFile);
+ my @lines = <CONF>;
+ close($confFile);
+ my $result = eval("@lines");
+ if( $show_debug > 1 )
+ {
+ ($result) and plugin_log($plugname, "conf file [$confFile] returned result[$result]");
+ }
+ if ($@)
+ {
+ plugin_log($plugname, "conf file [$confFile] returned:") if( $show_debug > 1 );
+ my @parts = split(/\n/, $@);
+ if( $show_debug > 1 )
+ {
+ plugin_log($plugname, "--> $_") foreach (@parts);
+ }
+ }
+}
+
+#############################################################################
+# main()
+#############################################################################
my $busActive = !(!keys %msg); # true if script was called due to bus traffic
my $ret_val = '';
@@ -174,7 +183,7 @@
{
my $dt = time() - $plugin_info{ $plugname . '_tlast' };
$plugin_info{ $plugname . '_tlast' } = time();
- $ret_val .= 'dt: ' . $dt . '; ';
+ $ret_val .= sprintf( ' dt: %.3f; ', $dt );
for my $this_controller_name ( keys %controllers )
{
@@ -239,6 +248,8 @@
# Version history:
# ================
#
+# 0.7:
+# * change to external config (-> conf.d)
# 0.6:
# * Bug fix for setups where the WireGate didn't know the ActuatorGA
# * Force sending of actuator after x seconds/minutes so that the watchdog in
Added: wiregate/plugin/generic/conf.d/Multi-RTR.conf_sample
===================================================================
--- wiregate/plugin/generic/conf.d/Multi-RTR.conf_sample (rev 0)
+++ wiregate/plugin/generic/conf.d/Multi-RTR.conf_sample 2011-11-20 16:34:18 UTC (rev 531)
@@ -0,0 +1,45 @@
+#-----------------------------------------------------------------------------
+# ACHTUNG: Variablen duerfen nur im Plugin mit 'my' definiert werden,
+# 'my' hier nicht verwenden!
+#-----------------------------------------------------------------------------
+
+#############################################################################
+# Configuration:
+%controllers = (
+ '130_Hobby1_HK' => {
+ 'SetPointGA' => '3/3/130', 'SetPointRRD' => '130_Hobby1_HK_Sollwert',
+ 'SensorGA' => '4/0/130',
+ 'ActuatorGA' => '3/0/130', 'ActuatorRRD' => '130_Hobby1_HK_Regelung',
+ 'ProportionalGain' => 5, 'IntegralTime' => 150
+ },
+ '140_Hobby2_HK' => {
+ 'SetPointGA' => '3/3/140', 'SetPointRRD' => '140_Hobby2_HK_Sollwert',
+ 'SensorGA' => '4/0/140',
+ 'ActuatorGA' => '3/0/140', 'ActuatorRRD' => '140_Hobby2_HK_Regelung',
+ 'ProportionalGain' => 5, 'IntegralTime' => 240
+ },
+);
+%default = (
+ 'SetPointDPT' => 9.001,
+ 'SensorDPT' => 9.001,
+ 'ActuatorDPT' => 5,
+ 'DisableDPT' => 1,
+ 'SetPointInit' => 21.0,
+ 'SetPointLFlag' => 1, # true
+ 'ActuatorLFlag' => 1, # true
+ 'MinUpdateRate' => 5 * 60, # 5 minutes
+);
+
+$GlobalDisableGA = '14/5/50';
+
+$reset = 0; # set to 1 to reset the states, run script and change to 0 again
+$show_debug = 1; # switches debug information that will be shown in the log
+
+#############################################################################
+1;
+
+# emacs setting
+# ;;; Local Variables: ***
+# ;;; mode:perl ***
+# ;;; End: ***
+# vim: set filetype=perl expandtab tabstop=8 shiftwidth=2 autoindent smartindent:
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|