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
Operations
Operations
Metrics
Environments
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
Mateus Goto
IC-Interface Control
Commits
00d76691
Commit
00d76691
authored
Jun 22, 2022
by
Mateus Goto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Addded] NHR9430 class
parent
72e471c1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
7 deletions
+25
-7
NHR9400series/NHR9400.py
NHR9400series/NHR9400.py
+13
-7
NHR9400series/NHR9410.py
NHR9400series/NHR9410.py
+12
-0
No files found.
NHR9400
/NRH
9400.py
→
NHR9400
series/NHR
9400.py
View file @
00d76691
import
random
import
socket
from
Utility
import
IPFinder
,
RefineOutput
from
Utility.RefineOutput
import
RefineOutput
from
Utility.IPFinder
import
IPFinder
class
NHR9400
:
def
__init__
(
self
):
def
__init__
(
self
,
name
):
self
.
__name
=
name
self
.
__s
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
self
.
__s
.
timeout
(
1
)
self
.
__out
=
RefineOutput
def
setIp
(
self
):
pass
self
.
__ip
=
"1912c25"
def
getIp
(
self
):
pass
clients
=
IPFinder
.
getAllIp
()
for
client
in
clients
:
self
.
__s
.
connect
((
client
[
'ip'
],
5025
))
self
.
__s
.
send
(
"SYST:RWL
\n
"
)
self
.
__s
.
send
(
"*IDN?
\n
"
)
#Function that receives messages back and transform it in a string
def
receiveString
(
self
):
msg
=
self
.
__s
.
recv
(
1024
)
msg
=
self
.
__out
.
RefineOutput
.
byteToString
(
msg
)
msg
=
self
.
__out
.
byteToString
(
msg
)
return
msg
#Function that receives messages back and transform it in a float
def
receiveFloat
(
self
):
msg
=
self
.
__s
.
recv
(
1024
)
msg
=
self
.
__out
.
RefineOutput
.
byteToFloat
(
msg
)
msg
=
self
.
__out
.
byteToFloat
(
msg
)
return
msg
def
identify
(
self
):
...
...
NHR9400series/NHR9410.py
0 → 100644
View file @
00d76691
from
NHR9400series.NHR9400
import
NHR9400
from
Utility
import
IPFinder
class
NHR9410
(
NHR9400
):
def
__init__
(
self
):
super
().
__init__
(
"NHR9410"
)
def
getIp
(
self
):
return
super
().
getIp
()
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