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
2159fa41
Commit
2159fa41
authored
May 18, 2015
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Configuration): подправил ключ командной строки для логов на более
интуитивный... "--xxx-log-in-file" ---> "--xxx-logfile"
parent
f1375eb7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
test.xml
conf/test.xml
+2
-1
MBSlave.cc
extensions/ModbusSlave/MBSlave.cc
+2
-2
Configuration.cc
src/Various/Configuration.cc
+4
-4
No files found.
conf/test.xml
View file @
2159fa41
...
@@ -246,9 +246,10 @@
...
@@ -246,9 +246,10 @@
<item
id=
"58"
iotype=
"AO"
name=
"Lamp58_C"
textname=
"Lamp 58"
rrd=
"1"
rrd1_ds=
"GAUGE:20:U:U"
/>
<item
id=
"58"
iotype=
"AO"
name=
"Lamp58_C"
textname=
"Lamp 58"
rrd=
"1"
rrd1_ds=
"GAUGE:20:U:U"
/>
<item
id=
"62"
iotype=
"AI"
name=
"LogLevel_S"
textname=
"LogLevel control"
/>
<item
id=
"62"
iotype=
"AI"
name=
"LogLevel_S"
textname=
"LogLevel control"
/>
<item
id=
"63"
iotype=
"AI"
name=
"SVU_AskCount_AS"
textname=
"svu asl count"
/>
<item
id=
"63"
iotype=
"AI"
name=
"SVU_AskCount_AS"
textname=
"svu asl count"
/>
<item
id=
"64"
iotype=
"AI"
name=
"AI64_AS"
textname=
"AI64"
mbaddr=
"0x01"
mbfunc=
"0x03"
mbreg=
"64"
mbtype=
"rtu"
rs=
"5"
tcp=
"6"
/>
<item
id=
"64"
iotype=
"AI"
name=
"AI64_AS"
textname=
"AI64"
mbaddr=
"0x01"
mbfunc=
"0x03"
mbreg=
"64"
mbtype=
"rtu"
rs=
"5"
/>
<item
id=
"66"
iotype=
"DI"
name=
"DI66_AS"
textname=
"DI66"
mbaddr=
"0x01"
mbfunc=
"0x01"
mbreg=
"66"
mbtype=
"rtu"
rs=
"5"
/>
<item
id=
"66"
iotype=
"DI"
name=
"DI66_AS"
textname=
"DI66"
mbaddr=
"0x01"
mbfunc=
"0x01"
mbreg=
"66"
mbtype=
"rtu"
rs=
"5"
/>
<item
id=
"65"
iotype=
"DI"
name=
"D65_S"
textname=
"D65"
threshold_aid=
"AI64_AS"
lowlimit=
"3"
hilimit=
"5"
threshold_invert=
"1"
rs=
"5"
/>
<item
id=
"65"
iotype=
"DI"
name=
"D65_S"
textname=
"D65"
threshold_aid=
"AI64_AS"
lowlimit=
"3"
hilimit=
"5"
threshold_invert=
"1"
rs=
"5"
/>
<item
id=
"100"
iotype=
"AI"
name=
"AI100_AS"
textname=
"AI100"
mbaddr=
"0x01"
mbfunc=
"0x03"
mbreg=
"100"
mbtype=
"rtu"
tcp=
"6"
vtype=
"F2"
/>
</sensors>
</sensors>
<thresholds
name=
"thresholds"
>
<thresholds
name=
"thresholds"
>
<sensor
iotype=
"AI"
name=
"AI_AS"
>
<sensor
iotype=
"AI"
name=
"AI_AS"
>
...
...
extensions/ModbusSlave/MBSlave.cc
View file @
2159fa41
...
@@ -1727,7 +1727,7 @@ ModbusRTU::mbErrCode MBSlave::real_read_prop( IOProperty* p, ModbusRTU::ModbusDa
...
@@ -1727,7 +1727,7 @@ ModbusRTU::mbErrCode MBSlave::real_read_prop( IOProperty* p, ModbusRTU::ModbusDa
// оптимизируем и проверку не делаем
// оптимизируем и проверку не делаем
// считая, что при "загрузке" всё было правильно
// считая, что при "загрузке" всё было правильно
// инициализировано
// инициализировано
// if( p->wnum >=0 && p->wnum < f
4
.wsize()
// if( p->wnum >=0 && p->wnum < f
2
.wsize()
val
=
f2
.
raw
.
v
[
p
->
wnum
];
val
=
f2
.
raw
.
v
[
p
->
wnum
];
}
}
else
if
(
p
->
vtype
==
VTypes
::
vtF2r
)
else
if
(
p
->
vtype
==
VTypes
::
vtF2r
)
...
@@ -1737,7 +1737,7 @@ ModbusRTU::mbErrCode MBSlave::real_read_prop( IOProperty* p, ModbusRTU::ModbusDa
...
@@ -1737,7 +1737,7 @@ ModbusRTU::mbErrCode MBSlave::real_read_prop( IOProperty* p, ModbusRTU::ModbusDa
// оптимизируем и проверку не делаем
// оптимизируем и проверку не делаем
// считая, что при "загрузке" всё было правильно
// считая, что при "загрузке" всё было правильно
// инициализировано
// инициализировано
// if( p->wnum >=0 && p->wnum < f
4
.wsize()
// if( p->wnum >=0 && p->wnum < f
2
.wsize()
val
=
f2
.
raw_backorder
.
v
[
p
->
wnum
];
val
=
f2
.
raw_backorder
.
v
[
p
->
wnum
];
}
}
else
if
(
p
->
vtype
==
VTypes
::
vtF4
)
else
if
(
p
->
vtype
==
VTypes
::
vtF4
)
...
...
src/Various/Configuration.cc
View file @
2159fa41
...
@@ -61,7 +61,7 @@ ostream& UniSetTypes::Configuration::help(ostream& os)
...
@@ -61,7 +61,7 @@ ostream& UniSetTypes::Configuration::help(ostream& os)
os
<<
"
\n
Debug command:
\n
"
;
os
<<
"
\n
Debug command:
\n
"
;
print_help
(
os
,
25
,
" [debname]"
,
"имя DebugStream указанное в конфигурационном файле
\n
"
);
print_help
(
os
,
25
,
" [debname]"
,
"имя DebugStream указанное в конфигурационном файле
\n
"
);
print_help
(
os
,
25
,
"--[debname]-no-debug"
,
"отключение логов
\n
"
);
print_help
(
os
,
25
,
"--[debname]-no-debug"
,
"отключение логов
\n
"
);
print_help
(
os
,
25
,
"--[debname]-log
-in-
file"
,
"перенаправление лога в файл
\n
"
);
print_help
(
os
,
25
,
"--[debname]-logfile"
,
"перенаправление лога в файл
\n
"
);
print_help
(
os
,
25
,
"--[debname]-add-levels"
,
"добавить уровень вывода логов
\n
"
);
print_help
(
os
,
25
,
"--[debname]-add-levels"
,
"добавить уровень вывода логов
\n
"
);
print_help
(
os
,
25
,
"--[debname]-del-levels"
,
"удалить уровень вывода логов
\n
"
);
print_help
(
os
,
25
,
"--[debname]-del-levels"
,
"удалить уровень вывода логов
\n
"
);
print_help
(
os
,
25
,
"--uniport num"
,
"использовать заданный порт (переопеределяет 'defaultport' заданный в конф. файле в разделе <nodes>)
\n
"
);
print_help
(
os
,
25
,
"--uniport num"
,
"использовать заданный порт (переопеределяет 'defaultport' заданный в конф. файле в разделе <nodes>)
\n
"
);
...
@@ -69,7 +69,7 @@ ostream& UniSetTypes::Configuration::help(ostream& os)
...
@@ -69,7 +69,7 @@ ostream& UniSetTypes::Configuration::help(ostream& os)
print_help
(
os
,
25
,
"--transientIOR {1,0}"
,
"использовать генерируемые IOR(не постоянные). Переопределяет параметр в конфигурационном файле. Default=1
\n
"
);
print_help
(
os
,
25
,
"--transientIOR {1,0}"
,
"использовать генерируемые IOR(не постоянные). Переопределяет параметр в конфигурационном файле. Default=1
\n
"
);
return
os
<<
"
\n
Пример использования:
\t
myUniSetProgram "
return
os
<<
"
\n
Пример использования:
\t
myUniSetProgram "
<<
"--ulog-add-levels level1,info,system,warn --ulog-log
-in-
file myprogrpam.log
\n\n
"
;
<<
"--ulog-add-levels level1,info,system,warn --ulog-logfile myprogrpam.log
\n\n
"
;
}
}
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
namespace
UniSetTypes
namespace
UniSetTypes
...
@@ -872,14 +872,14 @@ namespace UniSetTypes
...
@@ -872,14 +872,14 @@ namespace UniSetTypes
}
}
// теперь смотрим командную строку
// теперь смотрим командную строку
string
log
_in
(
"--"
+
debname
+
"-log-in-
file"
);
string
log
file
(
"--"
+
debname
+
"-log
file"
);
string
add_level
(
"--"
+
debname
+
"-add-levels"
);
string
add_level
(
"--"
+
debname
+
"-add-levels"
);
string
del_level
(
"--"
+
debname
+
"-del-levels"
);
string
del_level
(
"--"
+
debname
+
"-del-levels"
);
// смотрим командную строку
// смотрим командную строку
for
(
int
i
=
1
;
i
<
(
_argc
-
1
);
i
++
)
for
(
int
i
=
1
;
i
<
(
_argc
-
1
);
i
++
)
{
{
if
(
log
_in
==
_argv
[
i
]
)
// "--debug-log_in_
file"
if
(
log
file
==
_argv
[
i
]
)
// "--debug-log
file"
{
{
deb
->
logFile
(
_argv
[
i
+
1
]);
deb
->
logFile
(
_argv
[
i
+
1
]);
}
}
...
...
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