Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
1044b53c
Commit
1044b53c
authored
Oct 19, 2009
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add new service function: operator<<(IOController_i::CalibrationInfo)
parent
49d0fa05
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
27 deletions
+23
-27
admin.cc
Utilities/Admin/admin.cc
+1
-5
IOControl.cc
extensions/IOControl/IOControl.cc
+1
-4
MBTCPMaster.cc
extensions/MBTCPMaster/MBTCPMaster.cc
+1
-4
MBSlave.cc
extensions/ModbusSlave/MBSlave.cc
+1
-4
RTUExchange.cc
extensions/RTUExchange/RTUExchange.cc
+1
-4
UniSetTypes.h
include/UniSetTypes.h
+4
-0
UniSetTypes.cc
src/ObjectRepository/UniSetTypes.cc
+14
-6
No files found.
Utilities/Admin/admin.cc
View file @
1044b53c
...
@@ -1208,11 +1208,7 @@ int getCalibrate(string arg, UniversalInterface &ui)
...
@@ -1208,11 +1208,7 @@ int getCalibrate(string arg, UniversalInterface &ui)
si
.
id
=
sid
;
si
.
id
=
sid
;
si
.
node
=
conf
->
getLocalNode
();
si
.
node
=
conf
->
getLocalNode
();
IOController_i
::
CalibrateInfo
ci
=
ui
.
getCalibrateInfo
(
si
);
IOController_i
::
CalibrateInfo
ci
=
ui
.
getCalibrateInfo
(
si
);
cout
<<
"rmin="
<<
ci
.
minRaw
<<
" rmax="
<<
ci
.
maxRaw
;
cout
<<
ci
<<
endl
;
cout
<<
" cmin="
<<
ci
.
minCal
<<
" cmax="
<<
ci
.
maxCal
;
cout
<<
" sensibility="
<<
ci
.
sensibility
;
cout
<<
endl
;
return
0
;
return
0
;
}
}
...
...
extensions/IOControl/IOControl.cc
View file @
1044b53c
...
@@ -18,10 +18,7 @@ std::ostream& operator<<( std::ostream& os, IOControl::IOInfo& inf )
...
@@ -18,10 +18,7 @@ std::ostream& operator<<( std::ostream& os, IOControl::IOInfo& inf )
<<
" default="
<<
inf
.
defval
<<
" safety="
<<
inf
.
safety
;
<<
" default="
<<
inf
.
defval
<<
" safety="
<<
inf
.
safety
;
if
(
inf
.
cal
.
minRaw
!=
inf
.
cal
.
maxRaw
)
if
(
inf
.
cal
.
minRaw
!=
inf
.
cal
.
maxRaw
)
os
<<
" rmin="
<<
inf
.
cal
.
minRaw
os
<<
inf
.
cal
;
<<
" rmax="
<<
inf
.
cal
.
maxRaw
<<
" cmin="
<<
inf
.
cal
.
minCal
<<
" cmax="
<<
inf
.
cal
.
maxCal
;
return
os
;
return
os
;
}
}
...
...
extensions/MBTCPMaster/MBTCPMaster.cc
View file @
1044b53c
...
@@ -1331,10 +1331,7 @@ std::ostream& operator<<( std::ostream& os, const MBTCPMaster::RSProperty& p )
...
@@ -1331,10 +1331,7 @@ std::ostream& operator<<( std::ostream& os, const MBTCPMaster::RSProperty& p )
if
(
p
.
stype
==
UniversalIO
::
AnalogInput
||
p
.
stype
==
UniversalIO
::
AnalogOutput
)
if
(
p
.
stype
==
UniversalIO
::
AnalogInput
||
p
.
stype
==
UniversalIO
::
AnalogOutput
)
{
{
os
<<
" rmin="
<<
p
.
cal
.
minRaw
os
<<
p
.
cal
<<
" rmax="
<<
p
.
cal
.
maxRaw
<<
" cmin="
<<
p
.
cal
.
maxCal
<<
" cmax="
<<
p
.
cal
.
maxCal
<<
" cdiagram="
<<
(
p
.
cdiagram
?
"yes"
:
"no"
);
<<
" cdiagram="
<<
(
p
.
cdiagram
?
"yes"
:
"no"
);
}
}
...
...
extensions/ModbusSlave/MBSlave.cc
View file @
1044b53c
...
@@ -787,10 +787,7 @@ std::ostream& operator<<( std::ostream& os, MBSlave::IOProperty& p )
...
@@ -787,10 +787,7 @@ std::ostream& operator<<( std::ostream& os, MBSlave::IOProperty& p )
if
(
p
.
stype
==
UniversalIO
::
AnalogInput
||
p
.
stype
==
UniversalIO
::
AnalogOutput
)
if
(
p
.
stype
==
UniversalIO
::
AnalogInput
||
p
.
stype
==
UniversalIO
::
AnalogOutput
)
{
{
os
<<
" rmin="
<<
p
.
cal
.
minRaw
os
<<
p
.
cal
<<
" rmax="
<<
p
.
cal
.
maxRaw
<<
" cmin="
<<
p
.
cal
.
maxCal
<<
" cmax="
<<
p
.
cal
.
maxCal
<<
" cdiagram="
<<
(
p
.
cdiagram
?
"yes"
:
"no"
);
<<
" cdiagram="
<<
(
p
.
cdiagram
?
"yes"
:
"no"
);
}
}
...
...
extensions/RTUExchange/RTUExchange.cc
View file @
1044b53c
...
@@ -1473,10 +1473,7 @@ std::ostream& operator<<( std::ostream& os, const RTUExchange::RSProperty& p )
...
@@ -1473,10 +1473,7 @@ std::ostream& operator<<( std::ostream& os, const RTUExchange::RSProperty& p )
if
(
p
.
stype
==
UniversalIO
::
AnalogInput
||
p
.
stype
==
UniversalIO
::
AnalogOutput
)
if
(
p
.
stype
==
UniversalIO
::
AnalogInput
||
p
.
stype
==
UniversalIO
::
AnalogOutput
)
{
{
os
<<
" rmin="
<<
p
.
cal
.
minRaw
os
<<
p
.
cal
<<
" rmax="
<<
p
.
cal
.
maxRaw
<<
" cmin="
<<
p
.
cal
.
maxCal
<<
" cmax="
<<
p
.
cal
.
maxCal
<<
" cdiagram="
<<
(
p
.
cdiagram
?
"yes"
:
"no"
);
<<
" cdiagram="
<<
(
p
.
cdiagram
?
"yes"
:
"no"
);
}
}
...
...
include/UniSetTypes.h
View file @
1044b53c
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
#include <omniORB4/CORBA.h>
#include <omniORB4/CORBA.h>
#include "UniSetTypes_i.hh"
#include "UniSetTypes_i.hh"
#include "IOController_i.hh"
#include "Mutex.h"
#include "Mutex.h"
// -----------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------
/*! */
/*! */
...
@@ -56,6 +57,9 @@ namespace UniSetTypes
...
@@ -56,6 +57,9 @@ namespace UniSetTypes
UniversalIO
::
IOTypes
getIOType
(
const
std
::
string
s
);
UniversalIO
::
IOTypes
getIOType
(
const
std
::
string
s
);
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
UniversalIO
::
IOTypes
t
);
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
UniversalIO
::
IOTypes
t
);
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
IOController_i
::
CalibrateInfo
c
);
/*! */
/*! */
enum
LampCommand
enum
LampCommand
{
{
...
...
src/ObjectRepository/UniSetTypes.cc
View file @
1044b53c
...
@@ -204,14 +204,14 @@ using namespace UniSetTypes;
...
@@ -204,14 +204,14 @@ using namespace UniSetTypes;
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
UniversalIO
::
IOTypes
UniSetTypes
::
getIOType
(
const
std
::
string
stype
)
UniversalIO
::
IOTypes
UniSetTypes
::
getIOType
(
const
std
::
string
stype
)
{
{
if
(
stype
==
"AI"
)
if
(
stype
==
"DI"
||
stype
==
"di"
)
return
UniversalIO
::
DigitalInput
;
if
(
stype
==
"AI"
||
stype
==
"ai"
)
return
UniversalIO
::
AnalogInput
;
return
UniversalIO
::
AnalogInput
;
if
(
stype
==
"AO"
)
if
(
stype
==
"DO"
||
stype
==
"do"
)
return
UniversalIO
::
AnalogOutput
;
if
(
stype
==
"DO"
)
return
UniversalIO
::
DigitalOutput
;
return
UniversalIO
::
DigitalOutput
;
if
(
stype
==
"
DI
"
)
if
(
stype
==
"
AO"
||
stype
==
"ao
"
)
return
UniversalIO
::
DigitalIn
put
;
return
UniversalIO
::
AnalogOut
put
;
return
UniversalIO
::
UnknownIOType
;
return
UniversalIO
::
UnknownIOType
;
}
}
...
@@ -233,3 +233,11 @@ using namespace UniSetTypes;
...
@@ -233,3 +233,11 @@ using namespace UniSetTypes;
return
os
<<
"UnknownIOType"
;
return
os
<<
"UnknownIOType"
;
}
}
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
std
::
ostream
&
UniSetTypes
::
operator
<<
(
std
::
ostream
&
os
,
const
IOController_i
::
CalibrateInfo
c
)
{
return
os
<<
" rmin="
<<
c
.
minRaw
<<
" rmax="
<<
c
.
maxRaw
<<
" cmin="
<<
c
.
minCal
<<
" cmax="
<<
c
.
maxCal
<<
" precision="
<<
c
.
precision
<<
" sensibility="
<<
c
.
sensibility
;
}
// ------------------------------------------------------------------------------------------
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