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
e1f56089
Commit
e1f56089
authored
Dec 23, 2011
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(LogicProcessor): добавил возможность задавать время ожидания готовности SM (--sm-ready-timeout)
parent
708a2f99
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
LProcessor.h
extensions/LogicProcessor/LProcessor.h
+4
-1
PassiveLProcessor.cc
extensions/LogicProcessor/PassiveLProcessor.cc
+9
-8
No files found.
extensions/LogicProcessor/LProcessor.h
View file @
e1f56089
...
@@ -94,7 +94,7 @@
...
@@ -94,7 +94,7 @@
class
LProcessor
class
LProcessor
{
{
public
:
public
:
LProcessor
();
LProcessor
(
const
std
::
string
name
=
""
);
virtual
~
LProcessor
();
virtual
~
LProcessor
();
virtual
void
execute
(
const
string
lfile
);
virtual
void
execute
(
const
string
lfile
);
...
@@ -133,6 +133,9 @@ class LProcessor
...
@@ -133,6 +133,9 @@ class LProcessor
UniversalInterface
ui
;
UniversalInterface
ui
;
int
sleepTime
;
int
sleepTime
;
int
smReadyTimeout
;
/*!< время ожидания готовности SM */
std
::
string
logname
;
private
:
private
:
...
...
extensions/LogicProcessor/PassiveLProcessor.cc
View file @
e1f56089
...
@@ -11,6 +11,7 @@ PassiveLProcessor::PassiveLProcessor( std::string lfile, UniSetTypes::ObjectId o
...
@@ -11,6 +11,7 @@ PassiveLProcessor::PassiveLProcessor( std::string lfile, UniSetTypes::ObjectId o
UniSetObject_LT
(
objId
),
UniSetObject_LT
(
objId
),
shm
(
0
)
shm
(
0
)
{
{
logname
=
myname
;
shm
=
new
SMInterface
(
shmID
,
&
(
UniSetObject_LT
::
ui
),
objId
,
ic
);
shm
=
new
SMInterface
(
shmID
,
&
(
UniSetObject_LT
::
ui
),
objId
,
ic
);
build
(
lfile
);
build
(
lfile
);
}
}
...
@@ -88,9 +89,9 @@ void PassiveLProcessor::sysCommand( UniSetTypes::SystemMessage *sm )
...
@@ -88,9 +89,9 @@ void PassiveLProcessor::sysCommand( UniSetTypes::SystemMessage *sm )
{
{
case
SystemMessage
:
:
StartUp
:
case
SystemMessage
:
:
StartUp
:
{
{
if
(
!
shm
->
waitSMready
(
10000
)
)
if
(
!
shm
->
waitSMready
(
smReadyTimeout
)
)
{
{
dlog
[
Debug
::
CRIT
]
<<
"(ERR): SM not ready. Terminated... "
<<
endl
;
dlog
[
Debug
::
CRIT
]
<<
myname
<<
"(ERR): SM not ready. Terminated... "
<<
endl
;
raise
(
SIGTERM
);
raise
(
SIGTERM
);
return
;
return
;
}
}
...
@@ -163,17 +164,17 @@ void PassiveLProcessor::setOuts()
...
@@ -163,17 +164,17 @@ void PassiveLProcessor::setOuts()
break
;
break
;
default
:
default
:
dlog
[
Debug
::
CRIT
]
<<
"(LProcessor::
setOuts): неподдерживаемый тип iotype="
<<
it
->
iotype
<<
endl
;
dlog
[
Debug
::
CRIT
]
<<
myname
<<
"(
setOuts): неподдерживаемый тип iotype="
<<
it
->
iotype
<<
endl
;
break
;
break
;
}
}
}
}
catch
(
Exception
&
ex
)
catch
(
Exception
&
ex
)
{
{
dlog
[
Debug
::
CRIT
]
<<
"(LProcessor::
setOuts): "
<<
ex
<<
endl
;
dlog
[
Debug
::
CRIT
]
<<
myname
<<
"(
setOuts): "
<<
ex
<<
endl
;
}
}
catch
(...)
catch
(...)
{
{
dlog
[
Debug
::
CRIT
]
<<
"(LProcessor::
setOuts): catch...
\n
"
;
dlog
[
Debug
::
CRIT
]
<<
myname
<<
"(
setOuts): catch...
\n
"
;
}
}
}
}
}
}
...
@@ -195,17 +196,17 @@ void PassiveLProcessor::sigterm( int signo )
...
@@ -195,17 +196,17 @@ void PassiveLProcessor::sigterm( int signo )
break
;
break
;
default
:
default
:
dlog
[
Debug
::
CRIT
]
<<
"(LProcessor::
sigterm): неподдерживаемый тип iotype="
<<
it
->
iotype
<<
endl
;
dlog
[
Debug
::
CRIT
]
<<
myname
<<
"(
sigterm): неподдерживаемый тип iotype="
<<
it
->
iotype
<<
endl
;
break
;
break
;
}
}
}
}
catch
(
Exception
&
ex
)
catch
(
Exception
&
ex
)
{
{
dlog
[
Debug
::
CRIT
]
<<
"(LProcessor::
sigterm): "
<<
ex
<<
endl
;
dlog
[
Debug
::
CRIT
]
<<
myname
<<
"(
sigterm): "
<<
ex
<<
endl
;
}
}
catch
(...)
catch
(...)
{
{
dlog
[
Debug
::
CRIT
]
<<
"(LProcessor::
sigterm): catch...
\n
"
;
dlog
[
Debug
::
CRIT
]
<<
myname
<<
"(
sigterm): catch...
\n
"
;
}
}
}
}
}
}
...
...
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