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
6d4d4265
Commit
6d4d4265
authored
Feb 20, 2012
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(SM): сделал возможность указывать conf-секцию.
parent
85049d9c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
SharedMemory.cc
extensions/SharedMemory/SharedMemory.cc
+8
-3
SharedMemory.h
extensions/SharedMemory/SharedMemory.h
+1
-1
No files found.
extensions/SharedMemory/SharedMemory.cc
View file @
6d4d4265
...
...
@@ -34,7 +34,7 @@ void SharedMemory::help_print( int argc, const char* const* argv )
cout
<<
"--pulsar-iotype - [DI|DO]тип датчика для 'мигания'. По умолчанию DI."
<<
endl
;
}
// -----------------------------------------------------------------------------
SharedMemory
::
SharedMemory
(
ObjectId
id
,
string
datafile
)
:
SharedMemory
::
SharedMemory
(
ObjectId
id
,
string
datafile
,
std
::
string
confname
)
:
IONotifyController_LT
(
id
),
heartbeatCheckTime
(
5000
),
histSaveTime
(
0
),
...
...
@@ -45,7 +45,9 @@ SharedMemory::SharedMemory( ObjectId id, string datafile ):
iotypePulsar
(
UniversalIO
::
DigitalInput
),
msecPulsar
(
0
)
{
string
cname
(
ORepHelpers
::
getShortName
(
conf
->
oind
->
getMapName
(
id
))
);
string
cname
(
confname
);
if
(
cname
.
empty
()
)
cname
=
ORepHelpers
::
getShortName
(
conf
->
oind
->
getMapName
(
id
));
xmlNode
*
cnode
=
conf
->
getNode
(
cname
);
if
(
cnode
==
NULL
)
...
...
@@ -595,7 +597,10 @@ SharedMemory* SharedMemory::init_smemory( int argc, const char* const* argv )
<<
endl
;
return
0
;
}
return
new
SharedMemory
(
ID
,
dfile
);
string
cname
=
conf
->
getArgParam
(
"--smemory--confnode"
,
ORepHelpers
::
getShortName
(
conf
->
oind
->
getMapName
(
ID
))
);
return
new
SharedMemory
(
ID
,
dfile
,
cname
);
}
// -----------------------------------------------------------------------------
void
SharedMemory
::
buildEventList
(
xmlNode
*
cnode
)
...
...
extensions/SharedMemory/SharedMemory.h
View file @
6d4d4265
...
...
@@ -257,7 +257,7 @@ class SharedMemory:
public
IONotifyController_LT
{
public
:
SharedMemory
(
UniSetTypes
::
ObjectId
id
,
std
::
string
datafile
);
SharedMemory
(
UniSetTypes
::
ObjectId
id
,
std
::
string
datafile
,
std
::
string
confname
=
""
);
virtual
~
SharedMemory
();
/*! глобальная функция для инициализации объекта */
...
...
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