Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
domotikad
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
domotika
domotikad
Commits
bae6cf0f
Commit
bae6cf0f
authored
Feb 15, 2014
by
nextime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move getPage in board modules to base class
parent
045c55b8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
10 deletions
+15
-10
iotype.py
domotika/boards/iotype.py
+4
-0
DMRv1.py
domotika/boards/modules/DMRv1.py
+4
-4
DMRv3.py
domotika/boards/modules/DMRv3.py
+3
-2
DMSnt84.py
domotika/boards/modules/DMSnt84.py
+4
-4
No files found.
domotika/boards/iotype.py
View file @
bae6cf0f
...
...
@@ -52,7 +52,11 @@ class BaseBoard(object):
hasInputs
=
False
hasPWMs
=
False
hasRelays
=
False
pwd
=
False
user
=
"system"
def
requestPage
(
self
,
uri
):
return
wu
.
getPage
(
uri
,
http_user
=
self
.
user
,
http_password
=
self
.
pwd
)
class
BoardAnalog
(
object
):
""" """
...
...
domotika/boards/modules/DMRv1.py
View file @
bae6cf0f
...
...
@@ -87,11 +87,11 @@ class DMBoard(BaseBoard):
return
defer
.
succeed
(
True
)
def
_getBoardConfig
(
self
,
*
a
):
return
wu
.
getPage
(
"http://"
+
self
.
host
+
":"
+
str
(
self
.
port
)
+
"/ajax.xml"
,
http_user
=
"system"
,
http_password
=
self
.
pwd
)
return
self
.
requestPage
(
"http://"
+
self
.
host
+
":"
+
str
(
self
.
port
)
+
"/ajax.xml"
)
def
_getIOConfig
(
self
,
*
a
):
return
wu
.
getPage
(
"http://"
+
self
.
host
+
":"
+
str
(
self
.
port
)
+
"/ioconf.xml"
,
http_user
=
"system"
,
http_password
=
self
.
pwd
)
return
self
.
requestPage
(
"http://"
+
self
.
host
+
":"
+
str
(
self
.
port
)
+
"/ioconf.xml"
)
def
getAnalogsNames
(
self
):
if
not
self
.
analist
:
ret
=
{}
...
...
domotika/boards/modules/DMRv3.py
View file @
bae6cf0f
...
...
@@ -84,11 +84,12 @@ class DMBoard(BaseBoard):
self
.
ioXML
=
xml
.
parseXMLString
(
res
)
return
defer
.
succeed
(
True
)
def
_getBoardConfig
(
self
,
*
a
):
return
wu
.
getPage
(
"http://"
+
self
.
host
+
":"
+
str
(
self
.
port
)
+
"/ajax.xml"
,
http_user
=
"system"
,
http_password
=
self
.
pwd
)
return
self
.
requestPage
(
"http://"
+
self
.
host
+
":"
+
str
(
self
.
port
)
+
"/ajax.xml"
)
def
_getIOConfig
(
self
,
*
a
):
return
wu
.
getPage
(
"http://"
+
self
.
host
+
":"
+
str
(
self
.
port
)
+
"/ioconf.xml"
,
http_user
=
"system"
,
http_password
=
self
.
pwd
)
return
self
.
requestPage
(
"http://"
+
self
.
host
+
":"
+
str
(
self
.
port
)
+
"/ioconf.xml"
)
def
getAnalogsNames
(
self
):
if
not
self
.
analist
:
...
...
domotika/boards/modules/DMSnt84.py
View file @
bae6cf0f
...
...
@@ -86,11 +86,11 @@ class DMBoard(BaseBoard):
return
defer
.
succeed
(
True
)
def
_getBoardConfig
(
self
,
*
a
):
return
wu
.
getPage
(
"http://"
+
self
.
host
+
":"
+
str
(
self
.
port
)
+
"/ajax.xml"
,
http_user
=
"system"
,
http_password
=
self
.
pwd
)
return
self
.
requestPage
(
"http://"
+
self
.
host
+
":"
+
str
(
self
.
port
)
+
"/ajax.xml"
)
def
_getIOConfig
(
self
,
*
a
):
return
wu
.
getPage
(
"http://"
+
self
.
host
+
":"
+
str
(
self
.
port
)
+
"/ioconf.xml"
,
http_user
=
"system"
,
http_password
=
self
.
pwd
)
return
self
.
requestPage
(
"http://"
+
self
.
host
+
":"
+
str
(
self
.
port
)
+
"/ioconf.xml"
)
def
getAnalogsNames
(
self
):
return
self
.
analist
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment