Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
IC-Interface Control
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
João Santos
IC-Interface Control
Commits
6af36fa2
Commit
6af36fa2
authored
Jun 24, 2022
by
Mateus Goto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Updated] method of connecting
parent
4ddcb4f6
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
3246 additions
and
23 deletions
+3246
-23
IC-Interface.mdj
IC-Interface.mdj
+3209
-0
Main.jpg
Main.jpg
+0
-0
NHR9400series/NHR9400.py
NHR9400series/NHR9400.py
+1
-1
NHR9400series/NHR9410.py
NHR9400series/NHR9410.py
+14
-11
NHR9400series/NHR9430.py
NHR9400series/NHR9430.py
+14
-10
test.py
test.py
+8
-1
No files found.
IC-Interface.mdj
0 → 100644
View file @
6af36fa2
This diff is collapsed.
Click to expand it.
Main.jpg
0 → 100644
View file @
6af36fa2
154 KB
NHR9400series/NHR9400.py
View file @
6af36fa2
...
...
@@ -9,7 +9,7 @@ class NHR9400:
def
__init__
(
self
,
name
):
self
.
__name
=
name
self
.
__s
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
self
.
__s
.
timeout
(
1
)
self
.
__s
.
set
timeout
(
1
)
self
.
__out
=
RefineOutput
...
...
NHR9400series/NHR9410.py
View file @
6af36fa2
...
...
@@ -6,18 +6,21 @@ class NHR9410(NHR9400):
def
__init__
(
self
):
super
().
__init__
(
"NHR9410"
)
def
locateIp
(
self
,
clients
=
[]):
def
locateIp
(
self
,
clients
=
[]):
for
client
in
clients
:
self
.
__s
.
connect
((
client
,
5025
))
self
.
__s
.
send
(
"SYST:RWL
\n
"
)
#Command to activate remote control and locking the touchscreen
self
.
__s
.
send
(
"*IDN?
\n
"
)
recv
=
self
.
receiveString
()
if
str
.
find
(
"NH Research,9410-"
)
!=
-
1
:
#if find this subtring
self
.
__ip
=
client
clients
.
remove
(
client
)
break
else
:
self
.
__s
.
close
()
try
:
self
.
__s
.
connect
((
client
,
5025
))
self
.
__s
.
send
(
"SYST:RWL
\n
"
)
#Command to activate remote control and locking the touchscreen
self
.
__s
.
send
(
"*IDN?
\n
"
)
recv
=
super
().
receiveString
()
if
recv
.
find
(
"NH Research,9410-"
)
!=
-
1
:
#if find this subtring
self
.
__ip
=
client
clients
.
remove
(
client
)
break
else
:
self
.
__s
.
close
()
except
:
pass
NHR9400series/NHR9430.py
View file @
6af36fa2
...
...
@@ -8,16 +8,20 @@ class NHR9430(NHR9400):
def
locateIp
(
self
,
clients
=
[]):
for
client
in
clients
:
self
.
__s
.
connect
((
client
,
5025
))
self
.
__s
.
send
(
"SYST:RWL
\n
"
)
#Command to activate remote control and locking the touchscreen
self
.
__s
.
send
(
"*IDN?
\n
"
)
recv
=
super
().
receiveString
()
if
recv
.
find
(
"NH Research,9410-"
)
!=
-
1
:
#if find this subtring
self
.
__ip
=
client
clients
.
remove
(
client
)
break
else
:
self
.
__s
.
close
()
try
:
self
.
__s
.
connect
((
client
,
5025
))
self
.
__s
.
send
(
"SYST:RWL
\n
"
)
#Command to activate remote control and locking the touchscreen
self
.
__s
.
send
(
"*IDN?
\n
"
)
recv
=
super
().
receiveString
()
if
recv
.
find
(
"NH Research,9430-"
)
!=
-
1
:
#if find this subtring
self
.
__ip
=
client
clients
.
remove
(
client
)
break
else
:
self
.
__s
.
close
()
except
:
pass
test.py
View file @
6af36fa2
#Arquivo para teste em geral
import
socket
from
scapy.all
import
ARP
,
Ether
,
srp
,
arping
import
socket
import
time
start
=
time
.
time
()
...
...
@@ -25,4 +26,10 @@ def getAllIp():
print
(
client
)
getAllIp
()
print
(
time
.
time
()
-
start
)
\ No newline at end of file
s
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
s
.
settimeout
(
1
)
try
:
s
.
connect
((
"192.168.15.10"
,
5025
))
except
:
print
(
"conexão falhou"
)
print
(
time
.
time
()
-
start
)
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