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
e3418768
Commit
e3418768
authored
Sep 05, 2009
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix code style (add missed spaces)
parent
8673fe98
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
20 additions
and
21 deletions
+20
-21
admin.cc
Utilities/Admin/admin.cc
+1
-1
MBSlave.cc
Utilities/MBTester/MBSlave.cc
+1
-1
MBTCPServer.cc
Utilities/MBTester/MBTCPServer.cc
+1
-1
SharedMemory.cc
extensions/SharedMemory/SharedMemory.cc
+1
-1
UDPExchange.cc
extensions/UDPExchange/UDPExchange.cc
+1
-1
DigitalFilter.cc
extensions/lib/DigitalFilter.cc
+2
-2
IOBase.cc
extensions/lib/IOBase.cc
+1
-1
ComPort.cc
src/Communications/ComPort.cc
+1
-1
ComPort485F.cc
src/Communications/ComPort485F.cc
+1
-1
ModbusClient.cc
src/Communications/Modbus/ModbusClient.cc
+1
-1
ModbusServer.cc
src/Communications/Modbus/ModbusServer.cc
+1
-1
ModbusTCPCore.cc
src/Communications/Modbus/ModbusTCPCore.cc
+3
-3
CycleStorage.cc
src/Various/CycleStorage.cc
+3
-3
Mutex.cc
src/Various/Mutex.cc
+1
-1
passivetimer.cc
tests/passivetimer.cc
+0
-1
ui.cc
tests/ui.cc
+1
-1
No files found.
Utilities/Admin/admin.cc
View file @
e3418768
...
...
@@ -1194,7 +1194,7 @@ int getValue(string args, UniversalInterface &ui )
int
getCalibrate
(
string
arg
,
UniversalInterface
&
ui
)
{
UniSetTypes
::
ObjectId
sid
(
uni_atoi
(
arg
));
if
(
sid
<=
0
)
if
(
sid
<=
0
)
{
cout
<<
"(getCalibrate): SensorId !!!!!!"
<<
endl
;
return
1
;
...
...
Utilities/MBTester/MBSlave.cc
View file @
e3418768
...
...
@@ -341,7 +341,7 @@ ModbusRTU::mbErrCode MBSlave::fileTransfer( ModbusRTU::FileTransferMessage& quer
std::string fname(it->second);
int fd = open(fname.c_str(), O_RDONLY | O_NONBLOCK );
if( fd <=0 )
if( fd <=
0 )
{
dlog[Debug::WARN] << "(fileTransfer): open '" << fname << "' with error: " << strerror(errno) << endl;
return ModbusRTU::erOperationFailed;
...
...
Utilities/MBTester/MBTCPServer.cc
View file @
e3418768
...
...
@@ -341,7 +341,7 @@ ModbusRTU::mbErrCode MBTCPServer::fileTransfer( ModbusRTU::FileTransferMessage&
std::string fname(it->second);
int fd = open(fname.c_str(), O_RDONLY | O_NONBLOCK );
if( fd <=0 )
if( fd <=
0 )
{
dlog[Debug::WARN] << "(fileTransfer): open '" << fname << "' with error: " << strerror(errno) << endl;
return ModbusRTU::erOperationFailed;
...
...
extensions/SharedMemory/SharedMemory.cc
View file @
e3418768
...
...
@@ -612,7 +612,7 @@ void SharedMemory::buildHistoryList( xmlNode* cnode )
HistoryInfo
hi
;
hi
.
id
=
it
.
getIntProp
(
"id"
);
hi
.
size
=
it
.
getIntProp
(
"size"
);
if
(
hi
.
size
<=
0
)
if
(
hi
.
size
<=
0
)
continue
;
hi
.
filter
=
it
.
getProp
(
"filter"
);
...
...
extensions/UDPExchange/UDPExchange.cc
View file @
e3418768
...
...
@@ -566,7 +566,7 @@ bool UDPExchange::initItem( UniXML_iterator& it )
if
(
!
tid
.
empty
()
)
{
sid
=
UniSetTypes
::
uni_atoi
(
tid
);
if
(
sid
<=
0
)
if
(
sid
<=
0
)
sid
=
DefaultObjectId
;
}
else
...
...
extensions/lib/DigitalFilter.cc
View file @
e3418768
...
...
@@ -96,7 +96,7 @@ double DigitalFilter::firstLevel()
//--------------------------------------------------------------------------
int
DigitalFilter
::
filterRC
(
int
rawval
)
{
if
(
Ti
<=
0
)
if
(
Ti
<=
0
)
return
rawval
;
return
lroundf
(
secondLevel
(
rawval
));
...
...
@@ -105,7 +105,7 @@ int DigitalFilter::filterRC( int rawval )
double
DigitalFilter
::
secondLevel
(
double
rawval
)
{
if
(
Ti
<=
0
)
if
(
Ti
<=
0
)
return
rawval
;
//
...
...
extensions/lib/IOBase.cc
View file @
e3418768
...
...
@@ -16,7 +16,7 @@ std::ostream& operator<<( std::ostream& os, IOBase& inf )
bool
IOBase
::
check_channel_break
(
long
val
)
{
// ... ( )
if
(
breaklim
<=
0
)
if
(
breaklim
<=
0
)
return
false
;
return
(
val
<
breaklim
);
...
...
src/Communications/ComPort.cc
View file @
e3418768
...
...
@@ -205,7 +205,7 @@ unsigned char ComPort::m_receiveByte( bool wait )
}
else
bufLength
=
read
(
fd
,
buf
,
BufSize
);
if
(
bufLength
<=
0
)
if
(
bufLength
<=
0
)
{
throw
UniSetTypes
::
TimeOut
();
}
...
...
src/Communications/ComPort485F.cc
View file @
e3418768
...
...
@@ -123,7 +123,7 @@ unsigned char ComPort485F::m_receiveByte( bool wait )
}
}
if
(
rc
<=
0
)
if
(
rc
<=
0
)
throw
UniSetTypes
::
TimeOut
();
}
...
...
src/Communications/Modbus/ModbusClient.cc
View file @
e3418768
...
...
@@ -222,7 +222,7 @@ void ModbusClient::fileTransfer( ModbusAddr addr, ModbusData numfile,
<<
ret
.
numpacks
<<
" curpack="
<<
curpack
+
1
<<
endl
;
// save data...
if
(
fwrite
(
&
ret
.
data
,
ret
.
dlen
,
1
,
fdsave
)
<=
0
)
if
(
fwrite
(
&
ret
.
data
,
ret
.
dlen
,
1
,
fdsave
)
<=
0
)
{
dlog
[
Debug
::
WARN
]
<<
"(fileTransfer): fwrite '"
<<
save2filename
<<
"' with error: "
...
...
src/Communications/Modbus/ModbusServer.cc
View file @
e3418768
...
...
@@ -1121,7 +1121,7 @@ ModbusRTU::mbErrCode ModbusServer::replyFileTransfer( const std::string fname,
(
*
dlog
)[
Debug
::
INFO
]
<<
"(replyFileTransfer): "
<<
query
<<
endl
;
int
fd
=
open
(
fname
.
c_str
(),
O_RDONLY
|
O_NONBLOCK
);
if
(
fd
<=
0
)
if
(
fd
<=
0
)
{
if
(
dlog
&&
dlog
->
debugging
(
Debug
::
WARN
)
)
(
*
dlog
)[
Debug
::
WARN
]
<<
"(replyFileTransfer): open '"
<<
fname
<<
"' with error: "
<<
strerror
(
errno
)
<<
endl
;
...
...
src/Communications/Modbus/ModbusTCPCore.cc
View file @
e3418768
...
...
@@ -16,7 +16,7 @@ int ModbusTCPCore::readNextData( ost::TCPStream* tcp,
{
char
c
;
tcp
->
read
(
&
c
,
sizeof
(
c
));
if
(
tcp
->
gcount
()
<=
0
)
if
(
tcp
->
gcount
()
<=
0
)
break
;
qrecv
.
push
(
(
unsigned
char
)(
c
)
);
...
...
@@ -34,12 +34,12 @@ int ModbusTCPCore::getNextData( unsigned char* buf, int len,
if
(
qrecv
.
empty
()
)
{
if
(
len
<=
0
)
if
(
len
<=
0
)
len
=
7
;
int
ret
=
ModbusTCPCore
::
readNextData
(
tcp
,
qrecv
,
len
);
if
(
ret
<=
0
)
if
(
ret
<=
0
)
return
0
;
}
...
...
src/Various/CycleStorage.cc
View file @
e3418768
...
...
@@ -382,13 +382,13 @@ bool CycleStorage::delAllRows()
/*! TODO: str, */
void
*
CycleStorage
::
readRow
(
int
num
,
void
*
str
)
{
if
(
size
<=
0
)
return
0
;
if
(
size
<=
0
)
return
NULL
;
/*! */
int
j
=
(
head
+
num
)
%
size
;
if
((
file
==
NULL
)
||
(
num
>=
size
))
return
0
;
if
((
file
==
NULL
)
||
(
num
>=
size
))
return
NULL
;
if
((
head
!=
tail
+
1
)
&&
(
num
>
tail
)
&&
(
head
!=
tail
))
return
0
;
if
((
head
!=
tail
+
1
)
&&
(
num
>
tail
)
&&
(
head
!=
tail
))
return
NULL
;
CycleStorageElem
*
jrn
=
(
CycleStorageElem
*
)
new
char
[
full_size
];
fseek
(
file
,
seekpos
+
j
*
full_size
,
0
);
...
...
src/Various/Mutex.cc
View file @
e3418768
...
...
@@ -153,7 +153,7 @@ uniset_mutex::uniset_mutex( const uniset_mutex& r ):
uniset_mutex_lock
::
uniset_mutex_lock
(
uniset_mutex
&
m
,
int
timeMS
)
:
mutex
(
&
m
)
{
if
(
timeMS
<=
0
||
mutex
->
isRelease
()
)
if
(
timeMS
<=
0
||
mutex
->
isRelease
()
)
{
mutex
->
lock
();
mutex_atomic_set
(
&
mlock
,
1
);
...
...
tests/passivetimer.cc
View file @
e3418768
...
...
@@ -9,7 +9,6 @@ PassiveTimer pt(1000);
int
main
()
{
PassiveTimer
pt1
(
5000
);
cout
<<
" pt1.getInterval()="
<<
pt1
.
getInterval
()
<<
endl
;
...
...
tests/ui.cc
View file @
e3418768
...
...
@@ -13,7 +13,7 @@ int main( int argc, const char **argv )
uniset_init
(
argc
,
argv
,
"test.xml"
);
int
id
=
conf
->
getArgInt
(
"--sid"
);
if
(
id
<=
0
)
if
(
id
<=
0
)
{
cerr
<<
"unknown sensor ID. Use --sid "
<<
endl
;
return
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