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
64cc0668
Commit
64cc0668
authored
Feb 04, 2014
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Для защиты от ошибок стал использовать "override" (нашёл пару багов).
parent
6480bf57
Show whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
167 additions
and
174 deletions
+167
-174
ctl-cpp-common.xsl
Utilities/codegen/ctl-cpp-common.xsl
+7
-7
DBServer_MySQL.h
extensions/DBServer-MySQL/DBServer_MySQL.h
+4
-4
DBServer_SQLite.h
extensions/DBServer-SQLite/DBServer_SQLite.h
+4
-4
IOControl.h
extensions/IOControl/IOControl.h
+5
-5
Element.h
extensions/LogicProcessor/Element.h
+10
-10
PassiveLProcessor.h
extensions/LogicProcessor/PassiveLProcessor.h
+5
-5
TDelay.h
extensions/LogicProcessor/TDelay.h
+5
-5
MBExchange.h
extensions/ModbusMaster/MBExchange.h
+5
-5
MBTCPMaster.h
extensions/ModbusMaster/MBTCPMaster.h
+2
-6
MBTCPMultiMaster.h
extensions/ModbusMaster/MBTCPMultiMaster.h
+3
-3
RTUExchange.h
extensions/ModbusMaster/RTUExchange.h
+4
-4
MBSlave.h
extensions/ModbusSlave/MBSlave.h
+4
-4
RRDServer.h
extensions/RRDServer/RRDServer.h
+6
-6
SharedMemory.h
extensions/SharedMemory/SharedMemory.h
+8
-8
UNetExchange.h
extensions/UNetUDP/UNetExchange.h
+3
-3
UniExchange.h
extensions/UniNetwork/UniExchange.h
+3
-3
DBServer.h
include/DBServer.h
+2
-2
IOController.h
include/IOController.h
+18
-18
IONotifyController.h
include/IONotifyController.h
+9
-9
ObjectIndex_Array.h
include/ObjectIndex_Array.h
+6
-7
ObjectIndex_XML.h
include/ObjectIndex_XML.h
+7
-7
ObjectIndex_idXML.h
include/ObjectIndex_idXML.h
+7
-7
SMonitor.h
include/SMonitor.h
+4
-4
UniSetActivator.h
include/UniSetActivator.h
+2
-2
UniSetManager.h
include/UniSetManager.h
+6
-6
UniSetObject.h
include/UniSetObject.h
+6
-6
ModbusClient.h
include/modbus/ModbusClient.h
+0
-2
ModbusRTUMaster.h
include/modbus/ModbusRTUMaster.h
+5
-5
ModbusRTUSlave.h
include/modbus/ModbusRTUSlave.h
+6
-6
ModbusServer.h
include/modbus/ModbusServer.h
+0
-0
ModbusServerSlot.h
include/modbus/ModbusServerSlot.h
+0
-0
ModbusTCPMaster.h
include/modbus/ModbusTCPMaster.h
+5
-5
ModbusTCPServer.h
include/modbus/ModbusTCPServer.h
+6
-6
No files found.
Utilities/codegen/ctl-cpp-common.xsl
View file @
64cc0668
...
@@ -182,14 +182,14 @@
...
@@ -182,14 +182,14 @@
</xsl:template>
</xsl:template>
<xsl:template
name=
"COMMON-HEAD-PROTECTED"
>
<xsl:template
name=
"COMMON-HEAD-PROTECTED"
>
virtual void callback();
virtual void callback()
override
;
virtual void processingMessage( UniSetTypes::VoidMessage* msg );
virtual void processingMessage( UniSetTypes::VoidMessage* msg )
override
;
virtual void sysCommand( const UniSetTypes::SystemMessage* sm );
virtual void sysCommand( const UniSetTypes::SystemMessage* sm )
override
;
virtual void askSensors( UniversalIO::UIOCommand cmd ){}
virtual void askSensors( UniversalIO::UIOCommand cmd ){}
virtual void sensorInfo( const UniSetTypes::SensorMessage* sm ){}
virtual void sensorInfo( const UniSetTypes::SensorMessage* sm )
override
{}
virtual void timerInfo( const UniSetTypes::TimerMessage* tm ){}
virtual void timerInfo( const UniSetTypes::TimerMessage* tm )
override
{}
virtual void sigterm( int signo );
virtual void sigterm( int signo )
override
;
virtual bool activateObject();
virtual bool activateObject()
override
;
virtual void testMode( bool state );
virtual void testMode( bool state );
void updatePreviousValues();
void updatePreviousValues();
void checkSensors();
void checkSensors();
...
...
extensions/DBServer-MySQL/DBServer_MySQL.h
View file @
64cc0668
...
@@ -147,10 +147,10 @@ class DBServer_MySQL:
...
@@ -147,10 +147,10 @@ class DBServer_MySQL:
virtual
void
initDB
(
MySQLInterface
*
db
){};
virtual
void
initDB
(
MySQLInterface
*
db
){};
virtual
void
initDBTableMap
(
DBTableMap
&
tblMap
){};
virtual
void
initDBTableMap
(
DBTableMap
&
tblMap
){};
virtual
void
timerInfo
(
const
UniSetTypes
::
TimerMessage
*
tm
);
virtual
void
timerInfo
(
const
UniSetTypes
::
TimerMessage
*
tm
)
override
;
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
);
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
)
override
;
virtual
void
sensorInfo
(
const
UniSetTypes
::
SensorMessage
*
sm
);
virtual
void
sensorInfo
(
const
UniSetTypes
::
SensorMessage
*
sm
)
override
;
virtual
void
confirmInfo
(
const
UniSetTypes
::
ConfirmMessage
*
cmsg
);
virtual
void
confirmInfo
(
const
UniSetTypes
::
ConfirmMessage
*
cmsg
)
override
;
bool
writeToBase
(
const
string
&
query
);
bool
writeToBase
(
const
string
&
query
);
virtual
void
init_dbserver
();
virtual
void
init_dbserver
();
...
...
extensions/DBServer-SQLite/DBServer_SQLite.h
View file @
64cc0668
...
@@ -147,10 +147,10 @@ class DBServer_SQLite:
...
@@ -147,10 +147,10 @@ class DBServer_SQLite:
virtual
void
initDB
(
SQLiteInterface
*
db
){};
virtual
void
initDB
(
SQLiteInterface
*
db
){};
virtual
void
initDBTableMap
(
DBTableMap
&
tblMap
){};
virtual
void
initDBTableMap
(
DBTableMap
&
tblMap
){};
virtual
void
timerInfo
(
const
UniSetTypes
::
TimerMessage
*
tm
);
virtual
void
timerInfo
(
const
UniSetTypes
::
TimerMessage
*
tm
)
override
;
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
);
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
)
override
;
virtual
void
sensorInfo
(
const
UniSetTypes
::
SensorMessage
*
sm
);
virtual
void
sensorInfo
(
const
UniSetTypes
::
SensorMessage
*
sm
)
override
;
virtual
void
confirmInfo
(
const
UniSetTypes
::
ConfirmMessage
*
cmsg
);
virtual
void
confirmInfo
(
const
UniSetTypes
::
ConfirmMessage
*
cmsg
)
override
;
bool
writeToBase
(
const
string
&
query
);
bool
writeToBase
(
const
string
&
query
);
virtual
void
init_dbserver
();
virtual
void
init_dbserver
();
...
...
extensions/IOControl/IOControl.h
View file @
64cc0668
...
@@ -281,12 +281,12 @@ class IOControl:
...
@@ -281,12 +281,12 @@ class IOControl:
void
blink
();
void
blink
();
// действия при завершении работы
// действия при завершении работы
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
);
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
)
override
;
virtual
void
askSensors
(
UniversalIO
::
UIOCommand
cmd
);
virtual
void
askSensors
(
UniversalIO
::
UIOCommand
cmd
);
virtual
void
sensorInfo
(
const
UniSetTypes
::
SensorMessage
*
sm
);
virtual
void
sensorInfo
(
const
UniSetTypes
::
SensorMessage
*
sm
)
override
;
virtual
void
timerInfo
(
const
UniSetTypes
::
TimerMessage
*
tm
);
virtual
void
timerInfo
(
const
UniSetTypes
::
TimerMessage
*
tm
)
override
;
virtual
void
sigterm
(
int
signo
);
virtual
void
sigterm
(
int
signo
)
override
;
virtual
bool
activateObject
();
virtual
bool
activateObject
()
override
;
// начальная инициализация выходов
// начальная инициализация выходов
void
initOutputs
();
void
initOutputs
();
...
...
extensions/LogicProcessor/Element.h
View file @
64cc0668
...
@@ -112,10 +112,10 @@ class TOR:
...
@@ -112,10 +112,10 @@ class TOR:
TOR
(
ElementID
id
,
int
numbers
=
0
,
bool
st
=
false
);
TOR
(
ElementID
id
,
int
numbers
=
0
,
bool
st
=
false
);
virtual
~
TOR
();
virtual
~
TOR
();
virtual
void
setIn
(
int
num
,
bool
state
);
virtual
void
setIn
(
int
num
,
bool
state
)
override
;
virtual
bool
getOut
(){
return
myout
;
}
virtual
bool
getOut
()
override
{
return
myout
;
}
virtual
std
::
string
getType
(){
return
"OR"
;
}
virtual
std
::
string
getType
()
override
{
return
"OR"
;
}
protected
:
protected
:
TOR
()
:
myout
(
false
){}
TOR
()
:
myout
(
false
){}
...
@@ -133,8 +133,8 @@ class TAND:
...
@@ -133,8 +133,8 @@ class TAND:
TAND
(
ElementID
id
,
int
numbers
=
0
,
bool
st
=
false
);
TAND
(
ElementID
id
,
int
numbers
=
0
,
bool
st
=
false
);
virtual
~
TAND
();
virtual
~
TAND
();
virtual
void
setIn
(
int
num
,
bool
state
);
virtual
void
setIn
(
int
num
,
bool
state
)
override
;
virtual
std
::
string
getType
(){
return
"AND"
;
}
virtual
std
::
string
getType
()
override
{
return
"AND"
;
}
protected
:
protected
:
TAND
(){}
TAND
(){}
...
@@ -152,14 +152,14 @@ class TNOT:
...
@@ -152,14 +152,14 @@ class TNOT:
TNOT
(
ElementID
id
,
bool
out_default
);
TNOT
(
ElementID
id
,
bool
out_default
);
virtual
~
TNOT
();
virtual
~
TNOT
();
virtual
bool
getOut
(){
return
myout
;
}
virtual
bool
getOut
()
override
{
return
myout
;
}
/* num игнорируется, т.к. элемент с одним входом
/* num игнорируется, т.к. элемент с одним входом
*/
*/
virtual
void
setIn
(
int
num
,
bool
state
);
virtual
void
setIn
(
int
num
,
bool
state
)
override
;
virtual
std
::
string
getType
(){
return
"NOT"
;
}
virtual
std
::
string
getType
()
override
{
return
"NOT"
;
}
virtual
void
addInput
(
int
num
,
bool
state
=
false
){}
virtual
void
addInput
(
int
num
,
bool
state
=
false
)
override
{}
virtual
void
delInput
(
int
num
){}
virtual
void
delInput
(
int
num
)
override
{}
protected
:
protected
:
TNOT
()
:
myout
(
false
){}
TNOT
()
:
myout
(
false
){}
...
...
extensions/LogicProcessor/PassiveLProcessor.h
View file @
64cc0668
...
@@ -33,16 +33,16 @@ class PassiveLProcessor:
...
@@ -33,16 +33,16 @@ class PassiveLProcessor:
virtual
void
getInputs
();
virtual
void
getInputs
();
virtual
void
setOuts
();
virtual
void
setOuts
();
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
msg
);
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
msg
)
override
;
void
sensorInfo
(
const
UniSetTypes
::
SensorMessage
*
sm
);
void
sensorInfo
(
const
UniSetTypes
::
SensorMessage
*
sm
)
override
;
void
timerInfo
(
const
UniSetTypes
::
TimerMessage
*
tm
);
void
timerInfo
(
const
UniSetTypes
::
TimerMessage
*
tm
)
override
;
void
askSensors
(
const
UniversalIO
::
UIOCommand
cmd
);
void
askSensors
(
const
UniversalIO
::
UIOCommand
cmd
);
// void initOutput();
// void initOutput();
// действия при завершении работы
// действия при завершении работы
virtual
void
sigterm
(
int
signo
);
virtual
void
sigterm
(
int
signo
)
override
;
void
initIterators
();
void
initIterators
();
virtual
bool
activateObject
();
virtual
bool
activateObject
()
override
;
SMInterface
*
shm
;
SMInterface
*
shm
;
...
...
extensions/LogicProcessor/TDelay.h
View file @
64cc0668
...
@@ -15,12 +15,12 @@ class TDelay:
...
@@ -15,12 +15,12 @@ class TDelay:
virtual
~
TDelay
();
virtual
~
TDelay
();
virtual
void
tick
();
virtual
void
tick
()
override
;
virtual
void
setIn
(
int
num
,
bool
state
);
virtual
void
setIn
(
int
num
,
bool
state
)
override
;
virtual
bool
getOut
();
virtual
bool
getOut
()
override
;
virtual
std
::
string
getType
(){
return
"Delay"
;
}
virtual
std
::
string
getType
()
override
{
return
"Delay"
;
}
v
irtual
void
setDelay
(
int
timeMS
);
v
oid
setDelay
(
int
timeMS
);
inline
int
getDelay
(){
return
delay
;
}
inline
int
getDelay
(){
return
delay
;
}
protected
:
protected
:
...
...
extensions/ModbusMaster/MBExchange.h
View file @
64cc0668
...
@@ -200,13 +200,13 @@ class MBExchange:
...
@@ -200,13 +200,13 @@ class MBExchange:
protected
:
protected
:
virtual
void
step
();
virtual
void
step
();
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
msg
);
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
msg
)
override
;
virtual
void
sensorInfo
(
const
UniSetTypes
::
SensorMessage
*
sm
);
virtual
void
sensorInfo
(
const
UniSetTypes
::
SensorMessage
*
sm
)
override
;
virtual
void
timerInfo
(
const
UniSetTypes
::
TimerMessage
*
tm
);
virtual
void
timerInfo
(
const
UniSetTypes
::
TimerMessage
*
tm
)
override
;
virtual
void
askSensors
(
UniversalIO
::
UIOCommand
cmd
);
virtual
void
askSensors
(
UniversalIO
::
UIOCommand
cmd
);
virtual
void
initOutput
();
virtual
void
initOutput
();
virtual
void
sigterm
(
int
signo
);
virtual
void
sigterm
(
int
signo
)
override
;
virtual
bool
activateObject
();
virtual
bool
activateObject
()
override
;
virtual
void
initIterators
();
virtual
void
initIterators
();
struct
InitRegInfo
struct
InitRegInfo
...
...
extensions/ModbusMaster/MBTCPMaster.h
View file @
64cc0668
...
@@ -205,16 +205,12 @@ class MBTCPMaster:
...
@@ -205,16 +205,12 @@ class MBTCPMaster:
static
void
help_print
(
int
argc
,
const
char
*
const
*
argv
);
static
void
help_print
(
int
argc
,
const
char
*
const
*
argv
);
protected
:
protected
:
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
);
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
)
override
;
virtual
ModbusClient
*
initMB
(
bool
reopen
=
false
)
override
;
UniSetTypes
::
uniset_rwmutex
mbMutex
;
UniSetTypes
::
uniset_rwmutex
mbMutex
;
std
::
string
iaddr
;
std
::
string
iaddr
;
// ost::InetAddress* ia;
int
port
;
int
port
;
// int recv_timeout;
// virtual void step();
virtual
ModbusClient
*
initMB
(
bool
reopen
=
false
);
void
poll_thread
();
void
poll_thread
();
bool
force_disconnect
;
bool
force_disconnect
;
...
...
extensions/ModbusMaster/MBTCPMultiMaster.h
View file @
64cc0668
...
@@ -227,9 +227,9 @@ class MBTCPMultiMaster:
...
@@ -227,9 +227,9 @@ class MBTCPMultiMaster:
static
void
help_print
(
int
argc
,
const
char
*
const
*
argv
);
static
void
help_print
(
int
argc
,
const
char
*
const
*
argv
);
protected
:
protected
:
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
);
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
)
override
;
virtual
void
initIterators
();
virtual
void
initIterators
()
override
;
virtual
ModbusClient
*
initMB
(
bool
reopen
=
false
);
virtual
ModbusClient
*
initMB
(
bool
reopen
=
false
)
override
;
void
poll_thread
();
void
poll_thread
();
void
check_thread
();
void
check_thread
();
...
...
extensions/ModbusMaster/RTUExchange.h
View file @
64cc0668
...
@@ -33,11 +33,11 @@ class RTUExchange:
...
@@ -33,11 +33,11 @@ class RTUExchange:
bool
use485F
;
bool
use485F
;
bool
transmitCtl
;
bool
transmitCtl
;
virtual
void
step
();
virtual
void
step
()
override
;
virtual
void
poll
();
virtual
void
poll
()
override
;
virtual
ModbusClient
*
initMB
(
bool
reopen
=
false
);
virtual
ModbusClient
*
initMB
(
bool
reopen
=
false
)
override
;
virtual
bool
initDeviceInfo
(
RTUDeviceMap
&
m
,
ModbusRTU
::
ModbusAddr
a
,
UniXML_iterator
&
it
);
virtual
bool
initDeviceInfo
(
RTUDeviceMap
&
m
,
ModbusRTU
::
ModbusAddr
a
,
UniXML_iterator
&
it
)
override
;
private
:
private
:
RTUExchange
();
RTUExchange
();
...
...
extensions/ModbusSlave/MBSlave.h
View file @
64cc0668
...
@@ -138,17 +138,17 @@ class MBSlave:
...
@@ -138,17 +138,17 @@ class MBSlave:
SMInterface
*
shm
;
SMInterface
*
shm
;
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
msg
);
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
msg
)
override
;
virtual
void
sensorInfo
(
const
UniSetTypes
::
SensorMessage
*
sm
);
virtual
void
sensorInfo
(
const
UniSetTypes
::
SensorMessage
*
sm
)
override
;
void
askSensors
(
UniversalIO
::
UIOCommand
cmd
);
void
askSensors
(
UniversalIO
::
UIOCommand
cmd
);
void
waitSMReady
();
void
waitSMReady
();
void
execute_rtu
();
void
execute_rtu
();
void
execute_tcp
();
void
execute_tcp
();
virtual
bool
activateObject
();
virtual
bool
activateObject
()
override
;
// действия при завершении работы
// действия при завершении работы
virtual
void
sigterm
(
int
signo
);
virtual
void
sigterm
(
int
signo
)
override
;
void
initIterators
();
void
initIterators
();
bool
initItem
(
UniXML_iterator
&
it
);
bool
initItem
(
UniXML_iterator
&
it
);
...
...
extensions/RRDServer/RRDServer.h
View file @
64cc0668
...
@@ -73,13 +73,13 @@ class RRDServer:
...
@@ -73,13 +73,13 @@ class RRDServer:
protected
:
protected
:
RRDServer
();
RRDServer
();
virtual
void
askSensors
(
UniversalIO
::
UIOCommand
cmd
);
virtual
void
askSensors
(
UniversalIO
::
UIOCommand
cmd
)
override
;
virtual
void
sensorInfo
(
const
UniSetTypes
::
SensorMessage
*
sm
);
virtual
void
sensorInfo
(
const
UniSetTypes
::
SensorMessage
*
sm
)
override
;
virtual
void
timerInfo
(
const
UniSetTypes
::
TimerMessage
*
tm
);
virtual
void
timerInfo
(
const
UniSetTypes
::
TimerMessage
*
tm
)
override
;
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
);
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
)
override
;
v
irtual
v
oid
initRRD
(
xmlNode
*
cnode
,
int
tmID
);
void
initRRD
(
xmlNode
*
cnode
,
int
tmID
);
v
oid
step
()
;
v
irtual
void
step
()
override
;
SMInterface
*
shm
;
SMInterface
*
shm
;
...
...
extensions/SharedMemory/SharedMemory.h
View file @
64cc0668
...
@@ -350,14 +350,14 @@ class SharedMemory:
...
@@ -350,14 +350,14 @@ class SharedMemory:
typedef
std
::
list
<
Restorer_XML
::
ReaderSlot
>
ReadSlotList
;
typedef
std
::
list
<
Restorer_XML
::
ReaderSlot
>
ReadSlotList
;
ReadSlotList
lstRSlot
;
ReadSlotList
lstRSlot
;
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
);
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
)
override
;
virtual
void
timerInfo
(
const
UniSetTypes
::
TimerMessage
*
tm
);
virtual
void
timerInfo
(
const
UniSetTypes
::
TimerMessage
*
tm
)
override
;
virtual
void
askSensors
(
UniversalIO
::
UIOCommand
cmd
);
virtual
void
askSensors
(
UniversalIO
::
UIOCommand
cmd
);
v
irtual
v
oid
sendEvent
(
UniSetTypes
::
SystemMessage
&
sm
);
void
sendEvent
(
UniSetTypes
::
SystemMessage
&
sm
);
// действия при завершении работы
// действия при завершении работы
virtual
void
sigterm
(
int
signo
);
virtual
void
sigterm
(
int
signo
)
override
;
bool
activateObject
()
;
virtual
bool
activateObject
()
override
;
// virtual void logging(UniSetTypes::SensorMessage& sm){}
// virtual void logging(UniSetTypes::SensorMessage& sm){}
// virtual void dumpToDB(){}
// virtual void dumpToDB(){}
bool
readItem
(
const
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
);
bool
readItem
(
const
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
);
...
@@ -416,9 +416,9 @@ class SharedMemory:
...
@@ -416,9 +416,9 @@ class SharedMemory:
int
evntPause
;
int
evntPause
;
int
activateTimeout
;
int
activateTimeout
;
virtual
void
loggingInfo
(
UniSetTypes
::
SensorMessage
&
sm
);
virtual
void
loggingInfo
(
UniSetTypes
::
SensorMessage
&
sm
)
override
;
virtual
void
dumpOrdersList
(
const
UniSetTypes
::
ObjectId
sid
,
const
IONotifyController
::
ConsumerList
&
lst
){}
virtual
void
dumpOrdersList
(
const
UniSetTypes
::
ObjectId
sid
,
const
IONotifyController
::
ConsumerList
Info
&
lst
)
override
{};
virtual
void
dumpThresholdList
(
const
UniSetTypes
::
ObjectId
sid
,
const
IONotifyController
::
ThresholdExtList
&
lst
){}
virtual
void
dumpThresholdList
(
const
UniSetTypes
::
ObjectId
sid
,
const
IONotifyController
::
ThresholdExtList
&
lst
)
override
{}
bool
dblogging
;
bool
dblogging
;
...
...
extensions/UNetUDP/UNetExchange.h
View file @
64cc0668
...
@@ -101,9 +101,9 @@ class UNetExchange:
...
@@ -101,9 +101,9 @@ class UNetExchange:
SMInterface
*
shm
;
SMInterface
*
shm
;
void
step
();
void
step
();
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
msg
);
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
msg
)
override
;
void
sensorInfo
(
const
UniSetTypes
::
SensorMessage
*
sm
);
void
sensorInfo
(
const
UniSetTypes
::
SensorMessage
*
sm
)
override
;
void
timerInfo
(
const
UniSetTypes
::
TimerMessage
*
tm
);
void
timerInfo
(
const
UniSetTypes
::
TimerMessage
*
tm
)
override
;
void
askSensors
(
UniversalIO
::
UIOCommand
cmd
);
void
askSensors
(
UniversalIO
::
UIOCommand
cmd
);
void
waitSMReady
();
void
waitSMReady
();
void
receiverEvent
(
UNetReceiver
*
r
,
UNetReceiver
::
Event
ev
);
void
receiverEvent
(
UNetReceiver
*
r
,
UNetReceiver
::
Event
ev
);
...
...
extensions/UniNetwork/UniExchange.h
View file @
64cc0668
...
@@ -49,13 +49,13 @@ class UniExchange:
...
@@ -49,13 +49,13 @@ class UniExchange:
/*! глобальная функция для вывода help-а */
/*! глобальная функция для вывода help-а */
static
void
help_print
(
int
argc
,
const
char
**
argv
);
static
void
help_print
(
int
argc
,
const
char
**
argv
);
virtual
IOController_i
::
ShortMapSeq
*
getSensors
();
virtual
IOController_i
::
ShortMapSeq
*
getSensors
()
override
;
protected
:
protected
:
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
);
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
)
override
;
virtual
void
askSensors
(
UniversalIO
::
UIOCommand
cmd
);
virtual
void
askSensors
(
UniversalIO
::
UIOCommand
cmd
);
virtual
void
sigterm
(
int
signo
);
virtual
void
sigterm
(
int
signo
)
override
;
xmlNode
*
cnode
;
xmlNode
*
cnode
;
std
::
string
s_field
;
std
::
string
s_field
;
...
...
include/DBServer.h
View file @
64cc0668
...
@@ -56,10 +56,10 @@ class DBServer:
...
@@ -56,10 +56,10 @@ class DBServer:
protected
:
protected
:
virtual
void
processingMessage
(
UniSetTypes
::
VoidMessage
*
msg
);
virtual
void
processingMessage
(
UniSetTypes
::
VoidMessage
*
msg
)
override
;
virtual
void
confirmInfo
(
const
UniSetTypes
::
ConfirmMessage
*
cmsg
){}
virtual
void
confirmInfo
(
const
UniSetTypes
::
ConfirmMessage
*
cmsg
){}
virtual
bool
activateObject
();
virtual
bool
activateObject
()
override
;
virtual
void
init_dbserver
(){};
virtual
void
init_dbserver
(){};
private
:
private
:
...
...
include/IOController.h
View file @
64cc0668
...
@@ -45,40 +45,40 @@ class IOController:
...
@@ -45,40 +45,40 @@ class IOController:
IOController
(
const
UniSetTypes
::
ObjectId
id
);
IOController
(
const
UniSetTypes
::
ObjectId
id
);
~
IOController
();
~
IOController
();
virtual
UniSetTypes
::
ObjectType
getType
(){
return
UniSetTypes
::
ObjectType
(
"IOController"
);
}
virtual
UniSetTypes
::
ObjectType
getType
()
override
{
return
UniSetTypes
::
ObjectType
(
"IOController"
);
}
virtual
CORBA
::
Long
getValue
(
UniSetTypes
::
ObjectId
sid
);
virtual
CORBA
::
Long
getValue
(
UniSetTypes
::
ObjectId
sid
)
override
;
// -------------------- !!!!!!!!! ---------------------------------
// -------------------- !!!!!!!!! ---------------------------------
// Реализуются конкретным i/o контроллером
// Реализуются конкретным i/o контроллером
// Не забывайте писать реализацию этих функций
// Не забывайте писать реализацию этих функций
virtual
void
setValue
(
UniSetTypes
::
ObjectId
sid
,
CORBA
::
Long
value
,
virtual
void
setValue
(
UniSetTypes
::
ObjectId
sid
,
CORBA
::
Long
value
,
UniSetTypes
::
ObjectId
sup_id
=
UniSetTypes
::
DefaultObjectId
);
UniSetTypes
::
ObjectId
sup_id
=
UniSetTypes
::
DefaultObjectId
)
override
;
virtual
void
fastSetValue
(
UniSetTypes
::
ObjectId
sid
,
CORBA
::
Long
value
,
virtual
void
fastSetValue
(
UniSetTypes
::
ObjectId
sid
,
CORBA
::
Long
value
,
UniSetTypes
::
ObjectId
sup_id
=
UniSetTypes
::
DefaultObjectId
);
UniSetTypes
::
ObjectId
sup_id
=
UniSetTypes
::
DefaultObjectId
)
override
;
// ----------------------------------------------------------------
// ----------------------------------------------------------------
virtual
void
setUndefinedState
(
UniSetTypes
::
ObjectId
sid
,
virtual
void
setUndefinedState
(
UniSetTypes
::
ObjectId
sid
,
CORBA
::
Boolean
undefined
,
CORBA
::
Boolean
undefined
,
UniSetTypes
::
ObjectId
sup_id
=
UniSetTypes
::
DefaultObjectId
);
UniSetTypes
::
ObjectId
sup_id
=
UniSetTypes
::
DefaultObjectId
)
override
;
virtual
IOController_i
::
SensorInfoSeq
*
getSensorSeq
(
const
UniSetTypes
::
IDSeq
&
lst
);
virtual
IOController_i
::
SensorInfoSeq
*
getSensorSeq
(
const
UniSetTypes
::
IDSeq
&
lst
)
override
;
virtual
UniSetTypes
::
IDSeq
*
setOutputSeq
(
const
IOController_i
::
OutSeq
&
lst
,
UniSetTypes
::
ObjectId
sup_id
);
virtual
UniSetTypes
::
IDSeq
*
setOutputSeq
(
const
IOController_i
::
OutSeq
&
lst
,
UniSetTypes
::
ObjectId
sup_id
)
override
;
// ----------------------------------------------------------------
// ----------------------------------------------------------------
virtual
UniversalIO
::
IOType
getIOType
(
UniSetTypes
::
ObjectId
sid
);
virtual
UniversalIO
::
IOType
getIOType
(
UniSetTypes
::
ObjectId
sid
)
override
;
virtual
IOController_i
::
SensorInfoSeq
*
getSensorsMap
();
virtual
IOController_i
::
SensorInfoSeq
*
getSensorsMap
()
override
;
virtual
IOController_i
::
SensorIOInfo
getSensorIOInfo
(
UniSetTypes
::
ObjectId
sid
);
virtual
IOController_i
::
SensorIOInfo
getSensorIOInfo
(
UniSetTypes
::
ObjectId
sid
)
override
;
virtual
CORBA
::
Long
getRawValue
(
UniSetTypes
::
ObjectId
sid
)
;
virtual
CORBA
::
Long
getRawValue
(
UniSetTypes
::
ObjectId
sid
)
override
;
virtual
void
calibrate
(
UniSetTypes
::
ObjectId
sid
,
virtual
void
calibrate
(
UniSetTypes
::
ObjectId
sid
,
const
IOController_i
::
CalibrateInfo
&
ci
,
const
IOController_i
::
CalibrateInfo
&
ci
,
UniSetTypes
::
ObjectId
adminId
);
UniSetTypes
::
ObjectId
adminId
)
override
;
IOController_i
::
CalibrateInfo
getCalibrateInfo
(
UniSetTypes
::
ObjectId
sid
);
IOController_i
::
CalibrateInfo
getCalibrateInfo
(
UniSetTypes
::
ObjectId
sid
)
override
;
inline
IOController_i
::
SensorInfo
SensorInfo
(
const
UniSetTypes
::
ObjectId
sid
,
inline
IOController_i
::
SensorInfo
SensorInfo
(
const
UniSetTypes
::
ObjectId
sid
,
const
UniSetTypes
::
ObjectId
node
=
UniSetTypes
::
conf
->
getLocalNode
())
const
UniSetTypes
::
ObjectId
node
=
UniSetTypes
::
conf
->
getLocalNode
())
...
@@ -91,9 +91,9 @@ class IOController:
...
@@ -91,9 +91,9 @@ class IOController:
UniSetTypes
::
Message
::
Priority
getPriority
(
const
UniSetTypes
::
ObjectId
id
);
UniSetTypes
::
Message
::
Priority
getPriority
(
const
UniSetTypes
::
ObjectId
id
);
virtual
IOController_i
::
ShortIOInfo
getChangedTime
(
const
UniSetTypes
::
ObjectId
id
);
virtual
IOController_i
::
ShortIOInfo
getChangedTime
(
const
UniSetTypes
::
ObjectId
id
)
override
;
virtual
IOController_i
::
ShortMapSeq
*
getSensors
();
virtual
IOController_i
::
ShortMapSeq
*
getSensors
()
override
;
public
:
public
:
...
@@ -189,8 +189,8 @@ class IOController:
...
@@ -189,8 +189,8 @@ class IOController:
protected
:
protected
:
// переопределяем для добавления вызова регистрации датчиков
// переопределяем для добавления вызова регистрации датчиков
virtual
bool
disactivateObject
();
virtual
bool
disactivateObject
()
override
;
virtual
bool
activateObject
();
virtual
bool
activateObject
()
override
;
/*! Начальная инициализация (выставление значений) */
/*! Начальная инициализация (выставление значений) */
virtual
void
activateInit
();
virtual
void
activateInit
();
...
...
include/IONotifyController.h
View file @
64cc0668
...
@@ -136,27 +136,27 @@ class IONotifyController:
...
@@ -136,27 +136,27 @@ class IONotifyController:
virtual
~
IONotifyController
();
virtual
~
IONotifyController
();
virtual
UniSetTypes
::
ObjectType
getType
(){
return
UniSetTypes
::
ObjectType
(
"IONotifyController"
);
}
virtual
UniSetTypes
::
ObjectType
getType
()
override
{
return
UniSetTypes
::
ObjectType
(
"IONotifyController"
);
}
virtual
void
askSensor
(
const
UniSetTypes
::
ObjectId
sid
,
const
UniSetTypes
::
ConsumerInfo
&
ci
,
UniversalIO
::
UIOCommand
cmd
);
virtual
void
askSensor
(
const
UniSetTypes
::
ObjectId
sid
,
const
UniSetTypes
::
ConsumerInfo
&
ci
,
UniversalIO
::
UIOCommand
cmd
)
override
;
virtual
void
askThreshold
(
const
UniSetTypes
::
ObjectId
sid
,
const
UniSetTypes
::
ConsumerInfo
&
ci
,
virtual
void
askThreshold
(
const
UniSetTypes
::
ObjectId
sid
,
const
UniSetTypes
::
ConsumerInfo
&
ci
,
UniSetTypes
::
ThresholdId
tid
,
UniSetTypes
::
ThresholdId
tid
,
CORBA
::
Long
lowLimit
,
CORBA
::
Long
hiLimit
,
CORBA
::
Boolean
invert
,
CORBA
::
Long
lowLimit
,
CORBA
::
Long
hiLimit
,
CORBA
::
Boolean
invert
,
UniversalIO
::
UIOCommand
cmd
);
UniversalIO
::
UIOCommand
cmd
)
override
;
virtual
IONotifyController_i
::
ThresholdInfo
getThresholdInfo
(
const
UniSetTypes
::
ObjectId
sid
,
UniSetTypes
::
ThresholdId
tid
);
virtual
IONotifyController_i
::
ThresholdInfo
getThresholdInfo
(
const
UniSetTypes
::
ObjectId
sid
,
UniSetTypes
::
ThresholdId
tid
)
override
;
virtual
IONotifyController_i
::
ThresholdList
*
getThresholds
(
const
UniSetTypes
::
ObjectId
sid
);
virtual
IONotifyController_i
::
ThresholdList
*
getThresholds
(
const
UniSetTypes
::
ObjectId
sid
)
override
;
virtual
IONotifyController_i
::
ThresholdsListSeq
*
getThresholdsList
();
virtual
IONotifyController_i
::
ThresholdsListSeq
*
getThresholdsList
()
override
;
virtual
UniSetTypes
::
IDSeq
*
askSensorsSeq
(
const
UniSetTypes
::
IDSeq
&
lst
,
virtual
UniSetTypes
::
IDSeq
*
askSensorsSeq
(
const
UniSetTypes
::
IDSeq
&
lst
,
const
UniSetTypes
::
ConsumerInfo
&
ci
,
UniversalIO
::
UIOCommand
cmd
);
const
UniSetTypes
::
ConsumerInfo
&
ci
,
UniversalIO
::
UIOCommand
cmd
)
override
;
// --------------------------------------------
// --------------------------------------------
// функция для работы напрямую черех iterator (оптимизация)
// функция для работы напрямую черех iterator (оптимизация)
virtual
void
localSetValue
(
IOController
::
IOStateList
::
iterator
&
it
,
virtual
void
localSetValue
(
IOController
::
IOStateList
::
iterator
&
it
,
UniSetTypes
::
ObjectId
sid
,
UniSetTypes
::
ObjectId
sid
,
CORBA
::
Long
value
,
UniSetTypes
::
ObjectId
sup_id
);
CORBA
::
Long
value
,
UniSetTypes
::
ObjectId
sup_id
)
override
;
// --------------------------------------------
// --------------------------------------------
...
@@ -256,7 +256,7 @@ class IONotifyController:
...
@@ -256,7 +256,7 @@ class IONotifyController:
protected
:
protected
:
IONotifyController
();
IONotifyController
();
virtual
bool
activateObject
();
virtual
bool
activateObject
()
override
;
virtual
void
initItem
(
IOStateList
::
iterator
&
it
,
IOController
*
ic
);
virtual
void
initItem
(
IOStateList
::
iterator
&
it
,
IOController
*
ic
);
// ФИЛЬТРЫ
// ФИЛЬТРЫ
...
...
include/ObjectIndex_Array.h
View file @
64cc0668
...
@@ -44,14 +44,13 @@ class ObjectIndex_Array:
...
@@ -44,14 +44,13 @@ class ObjectIndex_Array:
ObjectIndex_Array
(
const
ObjectInfo
*
objectInfo
);
ObjectIndex_Array
(
const
ObjectInfo
*
objectInfo
);
virtual
~
ObjectIndex_Array
();
virtual
~
ObjectIndex_Array
();
virtual
const
ObjectInfo
*
getObjectInfo
(
const
ObjectId
)
override
;
virtual
const
ObjectInfo
*
getObjectInfo
(
const
std
::
string
&
name
)
override
;
virtual
ObjectId
getIdByName
(
const
std
::
string
&
name
)
override
;
virtual
std
::
string
getMapName
(
const
ObjectId
id
)
override
;
virtual
std
::
string
getTextName
(
const
ObjectId
id
)
override
;
virtual
const
ObjectInfo
*
getObjectInfo
(
const
ObjectId
);
virtual
std
::
ostream
&
printMap
(
std
::
ostream
&
os
)
override
;
virtual
const
ObjectInfo
*
getObjectInfo
(
const
std
::
string
&
name
);
virtual
ObjectId
getIdByName
(
const
std
::
string
&
name
);
virtual
std
::
string
getMapName
(
const
ObjectId
id
);
virtual
std
::
string
getTextName
(
const
ObjectId
id
);
virtual
std
::
ostream
&
printMap
(
std
::
ostream
&
os
);
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
ObjectIndex_Array
&
oi
);
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
ObjectIndex_Array
&
oi
);
private
:
private
:
...
...
include/ObjectIndex_XML.h
View file @
64cc0668
...
@@ -41,17 +41,17 @@ class ObjectIndex_XML:
...
@@ -41,17 +41,17 @@ class ObjectIndex_XML:
ObjectIndex_XML
(
UniXML
&
xml
,
int
minSize
=
1000
);
ObjectIndex_XML
(
UniXML
&
xml
,
int
minSize
=
1000
);
virtual
~
ObjectIndex_XML
();
virtual
~
ObjectIndex_XML
();
virtual
const
UniSetTypes
::
ObjectInfo
*
getObjectInfo
(
const
ObjectId
);
virtual
const
UniSetTypes
::
ObjectInfo
*
getObjectInfo
(
const
ObjectId
)
override
;
virtual
const
UniSetTypes
::
ObjectInfo
*
getObjectInfo
(
const
std
::
string
&
name
);
virtual
const
UniSetTypes
::
ObjectInfo
*
getObjectInfo
(
const
std
::
string
&
name
)
override
;
virtual
ObjectId
getIdByName
(
const
std
::
string
&
name
);
virtual
ObjectId
getIdByName
(
const
std
::
string
&
name
)
override
;
virtual
std
::
string
getMapName
(
const
ObjectId
id
);
virtual
std
::
string
getMapName
(
const
ObjectId
id
)
override
;
virtual
std
::
string
getTextName
(
const
ObjectId
id
);
virtual
std
::
string
getTextName
(
const
ObjectId
id
)
override
;
virtual
std
::
ostream
&
printMap
(
std
::
ostream
&
os
);
virtual
std
::
ostream
&
printMap
(
std
::
ostream
&
os
)
override
;
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
ObjectIndex_XML
&
oi
);
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
ObjectIndex_XML
&
oi
);
protected
:
protected
:
v
irtual
void
build
(
UniXML
&
xml
);
v
oid
build
(
UniXML
&
xml
);
unsigned
int
read_section
(
UniXML
&
xml
,
const
std
::
string
&
sec
,
unsigned
int
ind
);
unsigned
int
read_section
(
UniXML
&
xml
,
const
std
::
string
&
sec
,
unsigned
int
ind
);
unsigned
int
read_nodes
(
UniXML
&
xml
,
const
std
::
string
&
sec
,
unsigned
int
ind
);
unsigned
int
read_nodes
(
UniXML
&
xml
,
const
std
::
string
&
sec
,
unsigned
int
ind
);
...
...
include/ObjectIndex_idXML.h
View file @
64cc0668
...
@@ -15,17 +15,17 @@ class ObjectIndex_idXML:
...
@@ -15,17 +15,17 @@ class ObjectIndex_idXML:
ObjectIndex_idXML
(
UniXML
&
xml
);
ObjectIndex_idXML
(
UniXML
&
xml
);
virtual
~
ObjectIndex_idXML
();
virtual
~
ObjectIndex_idXML
();
virtual
const
UniSetTypes
::
ObjectInfo
*
getObjectInfo
(
const
UniSetTypes
::
ObjectId
);
virtual
const
UniSetTypes
::
ObjectInfo
*
getObjectInfo
(
const
UniSetTypes
::
ObjectId
)
override
;
virtual
const
UniSetTypes
::
ObjectInfo
*
getObjectInfo
(
const
std
::
string
&
name
);
virtual
const
UniSetTypes
::
ObjectInfo
*
getObjectInfo
(
const
std
::
string
&
name
)
override
;
virtual
UniSetTypes
::
ObjectId
getIdByName
(
const
std
::
string
&
name
);
virtual
UniSetTypes
::
ObjectId
getIdByName
(
const
std
::
string
&
name
)
override
;
virtual
std
::
string
getMapName
(
const
UniSetTypes
::
ObjectId
id
);
virtual
std
::
string
getMapName
(
const
UniSetTypes
::
ObjectId
id
)
override
;
virtual
std
::
string
getTextName
(
const
UniSetTypes
::
ObjectId
id
);
virtual
std
::
string
getTextName
(
const
UniSetTypes
::
ObjectId
id
)
override
;
virtual
std
::
ostream
&
printMap
(
std
::
ostream
&
os
);
virtual
std
::
ostream
&
printMap
(
std
::
ostream
&
os
)
override
;
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
ObjectIndex_idXML
&
oi
);
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
ObjectIndex_idXML
&
oi
);
protected
:
protected
:
v
irtual
v
oid
build
(
UniXML
&
xml
);
void
build
(
UniXML
&
xml
);
void
read_section
(
UniXML
&
xml
,
const
std
::
string
&
sec
);
void
read_section
(
UniXML
&
xml
,
const
std
::
string
&
sec
);
void
read_nodes
(
UniXML
&
xml
,
const
std
::
string
&
sec
);
void
read_nodes
(
UniXML
&
xml
,
const
std
::
string
&
sec
);
...
...
include/SMonitor.h
View file @
64cc0668
...
@@ -15,10 +15,10 @@ class SMonitor:
...
@@ -15,10 +15,10 @@ class SMonitor:
// -----
// -----
protected
:
protected
:
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
);
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
)
override
;
virtual
void
sensorInfo
(
const
UniSetTypes
::
SensorMessage
*
si
);
virtual
void
sensorInfo
(
const
UniSetTypes
::
SensorMessage
*
si
)
override
;
virtual
void
timerInfo
(
const
UniSetTypes
::
TimerMessage
*
tm
);
virtual
void
timerInfo
(
const
UniSetTypes
::
TimerMessage
*
tm
)
override
;
virtual
void
sigterm
(
int
signo
);
virtual
void
sigterm
(
int
signo
)
override
;
SMonitor
();
SMonitor
();
private
:
private
:
...
...
include/UniSetActivator.h
View file @
64cc0668
...
@@ -65,7 +65,7 @@ class UniSetActivator:
...
@@ -65,7 +65,7 @@ class UniSetActivator:
inline
void
oakill
(
int
signo
){
raise
(
signo
);}
inline
void
oakill
(
int
signo
){
raise
(
signo
);}
virtual
UniSetTypes
::
ObjectType
getType
(){
return
UniSetTypes
::
ObjectType
(
"UniSetActivator"
);
}
virtual
UniSetTypes
::
ObjectType
getType
()
override
{
return
UniSetTypes
::
ObjectType
(
"UniSetActivator"
);
}
protected
:
protected
:
...
@@ -94,7 +94,7 @@ class UniSetActivator:
...
@@ -94,7 +94,7 @@ class UniSetActivator:
return
orb
;
return
orb
;
}
}
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
);
virtual
void
sysCommand
(
const
UniSetTypes
::
SystemMessage
*
sm
)
override
;
// уносим в protected, т.к. Activator должен быть только один..
// уносим в protected, т.к. Activator должен быть только один..
...
...
include/UniSetManager.h
View file @
64cc0668
...
@@ -62,11 +62,11 @@ class UniSetManager:
...
@@ -62,11 +62,11 @@ class UniSetManager:
UniSetManager
(
const
std
::
string
&
name
,
const
std
::
string
&
section
);
UniSetManager
(
const
std
::
string
&
name
,
const
std
::
string
&
section
);
virtual
~
UniSetManager
();
virtual
~
UniSetManager
();
virtual
UniSetTypes
::
ObjectType
getType
(){
return
UniSetTypes
::
ObjectType
(
"UniSetManager"
);
}
virtual
UniSetTypes
::
ObjectType
getType
()
override
{
return
UniSetTypes
::
ObjectType
(
"UniSetManager"
);
}
// ------ функции объявленные в интерфейсе(IDL) ------
// ------ функции объявленные в интерфейсе(IDL) ------
virtual
void
broadcast
(
const
UniSetTypes
::
TransportMessage
&
msg
)
;
virtual
void
broadcast
(
const
UniSetTypes
::
TransportMessage
&
msg
)
override
;
virtual
UniSetTypes
::
SimpleInfoSeq
*
getObjectsInfo
(
CORBA
::
Long
MaxLength
=
300
);
virtual
UniSetTypes
::
SimpleInfoSeq
*
getObjectsInfo
(
CORBA
::
Long
MaxLength
=
300
)
override
;
// --------------------------
// --------------------------
void
initPOA
(
UniSetManager
*
rmngr
);
void
initPOA
(
UniSetManager
*
rmngr
);
...
@@ -127,12 +127,12 @@ class UniSetManager:
...
@@ -127,12 +127,12 @@ class UniSetManager:
// работа со списком менеджеров
// работа со списком менеджеров
void
managers
(
OManagerCommand
cmd
);
void
managers
(
OManagerCommand
cmd
);
virtual
void
sigterm
(
int
signo
);
virtual
void
sigterm
(
int
signo
)
override
;
//! \note Переопределяя не забывайте вызвать базовую
//! \note Переопределяя не забывайте вызвать базовую
virtual
bool
activateObject
();
virtual
bool
activateObject
()
override
;
//! \note Переопределяя не забывайте вызвать базовую
//! \note Переопределяя не забывайте вызвать базовую
virtual
bool
disactivateObject
();
virtual
bool
disactivateObject
()
override
;
typedef
UniSetManagerList
::
iterator
MListIterator
;
typedef
UniSetManagerList
::
iterator
MListIterator
;
...
...
include/UniSetObject.h
View file @
64cc0668
...
@@ -71,18 +71,18 @@ class UniSetObject:
...
@@ -71,18 +71,18 @@ class UniSetObject:
virtual
~
UniSetObject
();
virtual
~
UniSetObject
();
// Функции объявленные в IDL
// Функции объявленные в IDL
virtual
CORBA
::
Boolean
exist
();
virtual
CORBA
::
Boolean
exist
()
override
;
virtual
char
*
getName
(){
return
(
char
*
)
myname
.
c_str
();}
virtual
UniSetTypes
::
ObjectId
getId
(){
return
myid
;
}
virtual
UniSetTypes
::
ObjectId
getId
()
override
{
return
myid
;
}
inline
const
UniSetTypes
::
ObjectId
getId
()
const
{
return
myid
;
}
inline
const
UniSetTypes
::
ObjectId
getId
()
const
{
return
myid
;
}
inline
std
::
string
getName
(){
return
myname
;
}
virtual
UniSetTypes
::
ObjectType
getType
()
{
return
UniSetTypes
::
ObjectType
(
"UniSetObject"
);
}
virtual
UniSetTypes
::
ObjectType
getType
()
override
{
return
UniSetTypes
::
ObjectType
(
"UniSetObject"
);
}
virtual
UniSetTypes
::
SimpleInfo
*
getInfo
();
virtual
UniSetTypes
::
SimpleInfo
*
getInfo
()
override
;
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
UniSetObject
&
obj
);
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
UniSetObject
&
obj
);
//! поместить сообщение в очередь
//! поместить сообщение в очередь
virtual
void
push
(
const
UniSetTypes
::
TransportMessage
&
msg
)
;
virtual
void
push
(
const
UniSetTypes
::
TransportMessage
&
msg
)
override
;
/*! получить ссылку (на себя) */
/*! получить ссылку (на себя) */
inline
UniSetTypes
::
ObjectPtr
getRef
()
const
inline
UniSetTypes
::
ObjectPtr
getRef
()
const
...
...
include/modbus/ModbusClient.h
View file @
64cc0668
...
@@ -199,8 +199,6 @@ class ModbusClient
...
@@ -199,8 +199,6 @@ class ModbusClient
void
printProcessingTime
();
void
printProcessingTime
();
PassiveTimer
tmProcessing
;
PassiveTimer
tmProcessing
;
private
:
private
:
};
};
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
...
...
include/modbus/ModbusRTUMaster.h
View file @
64cc0668
...
@@ -23,7 +23,7 @@ class ModbusRTUMaster:
...
@@ -23,7 +23,7 @@ class ModbusRTUMaster:
ModbusRTUMaster
(
const
std
::
string
&
dev
,
bool
use485
=
false
,
bool
tr_ctl
=
false
);
ModbusRTUMaster
(
const
std
::
string
&
dev
,
bool
use485
=
false
,
bool
tr_ctl
=
false
);
virtual
~
ModbusRTUMaster
();
virtual
~
ModbusRTUMaster
();
virtual
void
cleanupChannel
(){
if
(
port
)
port
->
cleanupChannel
();
}
virtual
void
cleanupChannel
()
override
{
if
(
port
)
port
->
cleanupChannel
();
}
void
setSpeed
(
ComPort
::
Speed
s
);
void
setSpeed
(
ComPort
::
Speed
s
);
void
setSpeed
(
const
std
::
string
&
s
);
void
setSpeed
(
const
std
::
string
&
s
);
...
@@ -43,16 +43,16 @@ class ModbusRTUMaster:
...
@@ -43,16 +43,16 @@ class ModbusRTUMaster:
\param len - size of buf
\param len - size of buf
\return real data lenght ( must be <= len )
\return real data lenght ( must be <= len )
*/
*/
virtual
int
getNextData
(
unsigned
char
*
buf
,
int
len
);
virtual
int
getNextData
(
unsigned
char
*
buf
,
int
len
)
override
;
/*! set timeout for send/receive data */
/*! set timeout for send/receive data */
virtual
void
setChannelTimeout
(
timeout_t
msec
);
virtual
void
setChannelTimeout
(
timeout_t
msec
)
override
;
virtual
ModbusRTU
::
mbErrCode
sendData
(
unsigned
char
*
buf
,
int
len
);
virtual
ModbusRTU
::
mbErrCode
sendData
(
unsigned
char
*
buf
,
int
len
)
override
;
/*! функция запрос-ответ */
/*! функция запрос-ответ */
virtual
ModbusRTU
::
mbErrCode
query
(
ModbusRTU
::
ModbusAddr
addr
,
ModbusRTU
::
ModbusMessage
&
msg
,
virtual
ModbusRTU
::
mbErrCode
query
(
ModbusRTU
::
ModbusAddr
addr
,
ModbusRTU
::
ModbusMessage
&
msg
,
ModbusRTU
::
ModbusMessage
&
reply
,
timeout_t
timeout
);
ModbusRTU
::
ModbusMessage
&
reply
,
timeout_t
timeout
)
override
;
std
::
string
dev
;
/*!< устройство */
std
::
string
dev
;
/*!< устройство */
...
...
include/modbus/ModbusRTUSlave.h
View file @
64cc0668
...
@@ -31,18 +31,18 @@ class ModbusRTUSlave:
...
@@ -31,18 +31,18 @@ class ModbusRTUSlave:
void
setSpeed
(
const
std
::
string
&
s
);
void
setSpeed
(
const
std
::
string
&
s
);
ComPort
::
Speed
getSpeed
();
ComPort
::
Speed
getSpeed
();
virtual
ModbusRTU
::
mbErrCode
receive
(
ModbusRTU
::
ModbusAddr
addr
,
timeout_t
msecTimeout
);
virtual
ModbusRTU
::
mbErrCode
receive
(
ModbusRTU
::
ModbusAddr
addr
,
timeout_t
msecTimeout
)
override
;
virtual
void
cleanupChannel
(){
if
(
port
)
port
->
cleanupChannel
();
}
virtual
void
cleanupChannel
()
override
{
if
(
port
)
port
->
cleanupChannel
();
}
virtual
void
terminate
();
virtual
void
terminate
()
override
;
protected
:
protected
:
// realisation (see ModbusServer.h)
// realisation (see ModbusServer.h)
virtual
int
getNextData
(
unsigned
char
*
buf
,
int
len
);
virtual
int
getNextData
(
unsigned
char
*
buf
,
int
len
)
override
;
virtual
void
setChannelTimeout
(
timeout_t
msec
);
virtual
void
setChannelTimeout
(
timeout_t
msec
)
override
;
virtual
ModbusRTU
::
mbErrCode
sendData
(
unsigned
char
*
buf
,
int
len
);
virtual
ModbusRTU
::
mbErrCode
sendData
(
unsigned
char
*
buf
,
int
len
)
override
;
std
::
string
dev
;
/*!< устройство */
std
::
string
dev
;
/*!< устройство */
ComPort
*
port
;
/*!< устройство для работы с COM-портом */
ComPort
*
port
;
/*!< устройство для работы с COM-портом */
...
...
include/modbus/ModbusServer.h
View file @
64cc0668
include/modbus/ModbusServerSlot.h
View file @
64cc0668
include/modbus/ModbusTCPMaster.h
View file @
64cc0668
...
@@ -31,15 +31,15 @@ class ModbusTCPMaster:
...
@@ -31,15 +31,15 @@ class ModbusTCPMaster:
void
reconnect
();
void
reconnect
();
void
cleanInputStream
();
void
cleanInputStream
();
virtual
void
cleanupChannel
(){
cleanInputStream
();
}
virtual
void
cleanupChannel
()
override
{
cleanInputStream
();
}
protected
:
protected
:
virtual
int
getNextData
(
unsigned
char
*
buf
,
int
len
);
virtual
int
getNextData
(
unsigned
char
*
buf
,
int
len
)
override
;
virtual
void
setChannelTimeout
(
timeout_t
msec
);
virtual
void
setChannelTimeout
(
timeout_t
msec
)
override
;
virtual
ModbusRTU
::
mbErrCode
sendData
(
unsigned
char
*
buf
,
int
len
);
virtual
ModbusRTU
::
mbErrCode
sendData
(
unsigned
char
*
buf
,
int
len
)
override
;
virtual
ModbusRTU
::
mbErrCode
query
(
ModbusRTU
::
ModbusAddr
addr
,
ModbusRTU
::
ModbusMessage
&
msg
,
virtual
ModbusRTU
::
mbErrCode
query
(
ModbusRTU
::
ModbusAddr
addr
,
ModbusRTU
::
ModbusMessage
&
msg
,
ModbusRTU
::
ModbusMessage
&
reply
,
timeout_t
timeout
);
ModbusRTU
::
ModbusMessage
&
reply
,
timeout_t
timeout
)
override
;
private
:
private
:
ost
::
TCPStream
*
tcp
;
ost
::
TCPStream
*
tcp
;
...
...
include/modbus/ModbusTCPServer.h
View file @
64cc0668
...
@@ -22,15 +22,15 @@ class ModbusTCPServer:
...
@@ -22,15 +22,15 @@ class ModbusTCPServer:
ModbusTCPServer
(
ost
::
InetAddress
&
ia
,
int
port
=
502
);
ModbusTCPServer
(
ost
::
InetAddress
&
ia
,
int
port
=
502
);
virtual
~
ModbusTCPServer
();
virtual
~
ModbusTCPServer
();
virtual
ModbusRTU
::
mbErrCode
receive
(
ModbusRTU
::
ModbusAddr
addr
,
timeout_t
msecTimeout
);
virtual
ModbusRTU
::
mbErrCode
receive
(
ModbusRTU
::
ModbusAddr
addr
,
timeout_t
msecTimeout
)
override
;
inline
void
setIgnoreAddrMode
(
bool
st
){
ignoreAddr
=
st
;
}
inline
void
setIgnoreAddrMode
(
bool
st
){
ignoreAddr
=
st
;
}
inline
bool
getIgnoreAddrMode
(){
return
ignoreAddr
;
}
inline
bool
getIgnoreAddrMode
(){
return
ignoreAddr
;
}
void
cleanInputStream
();
void
cleanInputStream
();
virtual
void
cleanupChannel
()
{
cleanInputStream
();
}
virtual
void
cleanupChannel
()
override
{
cleanInputStream
();
}
virtual
void
terminate
();
virtual
void
terminate
()
override
;
protected
:
protected
:
...
@@ -38,9 +38,9 @@ class ModbusTCPServer:
...
@@ -38,9 +38,9 @@ class ModbusTCPServer:
// virtual ModbusRTU::mbErrCode post_send_request( ModbusRTU::ModbusMessage& request );
// virtual ModbusRTU::mbErrCode post_send_request( ModbusRTU::ModbusMessage& request );
// realisation (see ModbusServer.h)
// realisation (see ModbusServer.h)
virtual
int
getNextData
(
unsigned
char
*
buf
,
int
len
);
virtual
int
getNextData
(
unsigned
char
*
buf
,
int
len
)
override
;
virtual
void
setChannelTimeout
(
timeout_t
msec
);
virtual
void
setChannelTimeout
(
timeout_t
msec
)
override
;
virtual
ModbusRTU
::
mbErrCode
sendData
(
unsigned
char
*
buf
,
int
len
);
virtual
ModbusRTU
::
mbErrCode
sendData
(
unsigned
char
*
buf
,
int
len
)
override
;
virtual
ModbusRTU
::
mbErrCode
tcp_processing
(
ost
::
TCPStream
&
tcp
,
ModbusTCP
::
MBAPHeader
&
mhead
);
virtual
ModbusRTU
::
mbErrCode
tcp_processing
(
ost
::
TCPStream
&
tcp
,
ModbusTCP
::
MBAPHeader
&
mhead
);
...
...
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