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
b5990858
Commit
b5990858
authored
May 29, 2009
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimization
parent
ed3934ef
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
mtrconv.cc
extentions/RTUExchange/mtrconv.cc
+8
-10
MTR.h
extentions/include/MTR.h
+0
-0
No files found.
extentions/RTUExchange/mtrconv.cc
View file @
b5990858
...
@@ -3,12 +3,10 @@
...
@@ -3,12 +3,10 @@
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
#include <iostream>
#include <iostream>
#include <iomanip>
#include <iomanip>
#include <cmath>
#include "UniSetTypes.h"
#include "Configuration.h"
#include "MTR.h"
#include "MTR.h"
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
using
namespace
std
;
using
namespace
std
;
using
namespace
UniSetTypes
;
using
namespace
MTR
;
using
namespace
MTR
;
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
static
void
print_help
()
static
void
print_help
()
...
@@ -45,7 +43,7 @@ int main( int argc, char **argv )
...
@@ -45,7 +43,7 @@ int main( int argc, char **argv )
else
if
(
!
strcmp
(
type
,
"T3"
)
)
else
if
(
!
strcmp
(
type
,
"T3"
)
)
{
{
T3
t
(
v1
,
v2
);
T3
t
(
v1
,
v2
);
cout
<<
"(T3): v1="
<<
t
.
raw
.
u
.
v1
<<
" v2="
<<
t
.
raw
.
u
.
v2
cout
<<
"(T3): v1="
<<
t
.
raw
.
v
[
0
]
<<
" v2="
<<
t
.
raw
.
v
[
1
]
<<
" --> "
<<
(
long
)
t
<<
endl
;
<<
" --> "
<<
(
long
)
t
<<
endl
;
}
}
else
if
(
!
strcmp
(
type
,
"T4"
)
)
else
if
(
!
strcmp
(
type
,
"T4"
)
)
...
@@ -57,21 +55,21 @@ int main( int argc, char **argv )
...
@@ -57,21 +55,21 @@ int main( int argc, char **argv )
else
if
(
!
strcmp
(
type
,
"T5"
)
)
else
if
(
!
strcmp
(
type
,
"T5"
)
)
{
{
T5
t
(
v1
,
v2
);
T5
t
(
v1
,
v2
);
cout
<<
"(T5): v1="
<<
t
.
raw
.
u1
.
v1
<<
" v2="
<<
t
.
raw
.
u1
.
v2
cout
<<
"(T5): v1="
<<
t
.
raw
.
v
[
0
]
<<
" v2="
<<
t
.
raw
.
v
[
1
]
<<
" --> "
<<
t
.
raw
.
u2
.
val
<<
" * 10^"
<<
(
int
)
t
.
raw
.
u2
.
exp
<<
" --> "
<<
t
.
raw
.
u2
.
val
<<
" * 10^"
<<
(
int
)
t
.
raw
.
u2
.
exp
<<
" ===> "
<<
t
.
val
<<
endl
;
<<
" ===> "
<<
t
.
val
<<
endl
;
}
}
else
if
(
!
strcmp
(
type
,
"T6"
)
)
else
if
(
!
strcmp
(
type
,
"T6"
)
)
{
{
T6
t
(
v1
,
v2
);
T6
t
(
v1
,
v2
);
cout
<<
"(T6): v1="
<<
t
.
raw
.
u1
.
v1
<<
" v2="
<<
t
.
raw
.
u1
.
v2
cout
<<
"(T6): v1="
<<
t
.
raw
.
v
[
0
]
<<
" v2="
<<
t
.
raw
.
v
[
1
]
<<
" --> "
<<
t
.
raw
.
u2
.
val
<<
" * 10^"
<<
(
int
)
t
.
raw
.
u2
.
exp
<<
" --> "
<<
t
.
raw
.
u2
.
val
<<
" * 10^"
<<
(
int
)
t
.
raw
.
u2
.
exp
<<
" ===> "
<<
t
.
val
<<
endl
;
<<
" ===> "
<<
t
.
val
<<
endl
;
}
}
else
if
(
!
strcmp
(
type
,
"T7"
)
)
else
if
(
!
strcmp
(
type
,
"T7"
)
)
{
{
T7
t
(
v1
,
v2
);
T7
t
(
v1
,
v2
);
cout
<<
"(T7): v1="
<<
t
.
raw
.
u1
.
v1
<<
" v2="
<<
t
.
raw
.
u1
.
v2
cout
<<
"(T7): v1="
<<
t
.
raw
.
v
[
0
]
<<
" v2="
<<
t
.
raw
.
v
[
1
]
// << " --> " << T7.val << " * 10^-4"
// << " --> " << T7.val << " * 10^-4"
<<
" ===> "
<<
t
.
val
<<
" ===> "
<<
t
.
val
<<
" ["
<<
(
t
.
raw
.
u2
.
ic
==
0xFF
?
"CAP"
:
"IND"
)
<<
"|"
<<
" ["
<<
(
t
.
raw
.
u2
.
ic
==
0xFF
?
"CAP"
:
"IND"
)
<<
"|"
...
@@ -81,7 +79,7 @@ int main( int argc, char **argv )
...
@@ -81,7 +79,7 @@ int main( int argc, char **argv )
else
if
(
!
strcmp
(
type
,
"T8"
)
)
else
if
(
!
strcmp
(
type
,
"T8"
)
)
{
{
T8
t
(
v1
,
v2
);
T8
t
(
v1
,
v2
);
cout
<<
"(T8): v1="
<<
t
.
raw
.
u1
.
v1
<<
" v2="
<<
t
.
raw
.
u1
.
v2
cout
<<
"(T8): v1="
<<
t
.
raw
.
v
[
0
]
<<
" v2="
<<
t
.
raw
.
v
[
1
]
<<
" ===> "
<<
setfill
(
'0'
)
<<
hex
<<
" ===> "
<<
setfill
(
'0'
)
<<
hex
<<
setw
(
2
)
<<
t
.
hour
()
<<
":"
<<
setw
(
2
)
<<
t
.
min
()
<<
setw
(
2
)
<<
t
.
hour
()
<<
":"
<<
setw
(
2
)
<<
t
.
min
()
<<
" "
<<
setw
(
2
)
<<
t
.
day
()
<<
"/"
<<
setw
(
2
)
<<
t
.
mon
()
<<
" "
<<
setw
(
2
)
<<
t
.
day
()
<<
"/"
<<
setw
(
2
)
<<
t
.
mon
()
...
@@ -90,7 +88,7 @@ int main( int argc, char **argv )
...
@@ -90,7 +88,7 @@ int main( int argc, char **argv )
else
if
(
!
strcmp
(
type
,
"T9"
)
)
else
if
(
!
strcmp
(
type
,
"T9"
)
)
{
{
T9
t
(
v1
,
v2
);
T9
t
(
v1
,
v2
);
cout
<<
"(T9): v1="
<<
t
.
raw
.
u1
.
v1
<<
" v2="
<<
t
.
raw
.
u1
.
v2
cout
<<
"(T9): v1="
<<
t
.
raw
.
v
[
0
]
<<
" v2="
<<
t
.
raw
.
v
[
1
]
<<
" ===> "
<<
setfill
(
'0'
)
<<
hex
<<
" ===> "
<<
setfill
(
'0'
)
<<
hex
<<
setw
(
2
)
<<
t
.
hour
()
<<
":"
<<
setw
(
2
)
<<
t
.
min
()
<<
setw
(
2
)
<<
t
.
hour
()
<<
":"
<<
setw
(
2
)
<<
t
.
min
()
<<
":"
<<
setw
(
2
)
<<
t
.
sec
()
<<
"."
<<
setw
(
2
)
<<
t
.
ssec
()
<<
":"
<<
setw
(
2
)
<<
t
.
sec
()
<<
"."
<<
setw
(
2
)
<<
t
.
ssec
()
...
@@ -99,7 +97,7 @@ int main( int argc, char **argv )
...
@@ -99,7 +97,7 @@ int main( int argc, char **argv )
else
if
(
!
strcmp
(
type
,
"F1"
)
)
else
if
(
!
strcmp
(
type
,
"F1"
)
)
{
{
F1
f
(
v1
,
v2
);
F1
f
(
v1
,
v2
);
cout
<<
"(F1): v1="
<<
f
.
raw
.
u
.
v1
<<
" v2="
<<
f
.
raw
.
u
.
v2
cout
<<
"(F1): v1="
<<
f
.
raw
.
v
[
0
]
<<
" v2="
<<
f
.
raw
.
v
[
1
]
<<
" ===> "
<<
f
.
raw
.
val
<<
endl
;
<<
" ===> "
<<
f
.
raw
.
val
<<
endl
;
}
}
else
else
...
...
extentions/include/MTR.h
View file @
b5990858
This diff is collapsed.
Click to expand it.
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