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
50592bf8
Commit
50592bf8
authored
Oct 02, 2014
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(UniversalInterface): косметические правки
parent
a3d16428
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
UInterface.h
include/UInterface.h
+7
-7
UInterface.cc
src/Interfaces/UInterface.cc
+7
-7
No files found.
include/UInterface.h
View file @
50592bf8
...
...
@@ -49,7 +49,7 @@ namespace UniversalIO
}
// -----------------------------------------------------------------------------------------
#define
IO
_THROW_EXCEPTIONS UniSetTypes::TimeOut,UniSetTypes::IOBadParam,UniSetTypes::ORepFailed
#define
UI
_THROW_EXCEPTIONS UniSetTypes::TimeOut,UniSetTypes::IOBadParam,UniSetTypes::ORepFailed
// -----------------------------------------------------------------------------------------
/*!
* \class UInterface
...
...
@@ -72,12 +72,12 @@ class UInterface
// Работа с датчиками
//! Получение состояния датчика
long
getValue
(
const
UniSetTypes
::
ObjectId
id
,
const
UniSetTypes
::
ObjectId
node
)
const
throw
(
IO
_THROW_EXCEPTIONS
);
long
getValue
(
const
UniSetTypes
::
ObjectId
id
,
const
UniSetTypes
::
ObjectId
node
)
const
throw
(
UI
_THROW_EXCEPTIONS
);
long
getValue
(
const
UniSetTypes
::
ObjectId
id
)
const
;
long
getRawValue
(
const
IOController_i
::
SensorInfo
&
si
);
//! Выставление состояния датчика
void
setValue
(
const
UniSetTypes
::
ObjectId
id
,
long
value
,
const
UniSetTypes
::
ObjectId
node
)
const
throw
(
IO
_THROW_EXCEPTIONS
);
void
setValue
(
const
UniSetTypes
::
ObjectId
id
,
long
value
,
const
UniSetTypes
::
ObjectId
node
)
const
throw
(
UI
_THROW_EXCEPTIONS
);
void
setValue
(
const
UniSetTypes
::
ObjectId
id
,
long
value
)
const
;
void
setValue
(
IOController_i
::
SensorInfo
&
si
,
long
value
,
const
UniSetTypes
::
ObjectId
supplier
);
...
...
@@ -100,7 +100,7 @@ class UInterface
UniSetTypes
::
ObjectId
backid
=
UniSetTypes
::
DefaultObjectId
)
const
;
void
askRemoteSensor
(
const
UniSetTypes
::
ObjectId
id
,
UniversalIO
::
UIOCommand
cmd
,
const
UniSetTypes
::
ObjectId
node
,
UniSetTypes
::
ObjectId
backid
=
UniSetTypes
::
DefaultObjectId
)
const
throw
(
IO
_THROW_EXCEPTIONS
);
UniSetTypes
::
ObjectId
backid
=
UniSetTypes
::
DefaultObjectId
)
const
throw
(
UI
_THROW_EXCEPTIONS
);
//! Заказ по списку
UniSetTypes
::
IDSeq_var
askSensorsSeq
(
UniSetTypes
::
IDList
&
lst
,
UniversalIO
::
UIOCommand
cmd
,
...
...
@@ -137,14 +137,14 @@ class UInterface
// ---------------------------------------------------------------
// Вспомогательные функции
UniversalIO
::
IOType
getIOType
(
const
UniSetTypes
::
ObjectId
id
,
UniSetTypes
::
ObjectId
node
)
const
throw
(
IO
_THROW_EXCEPTIONS
);
UniversalIO
::
IOType
getIOType
(
const
UniSetTypes
::
ObjectId
id
,
UniSetTypes
::
ObjectId
node
)
const
throw
(
UI
_THROW_EXCEPTIONS
);
UniversalIO
::
IOType
getIOType
(
const
UniSetTypes
::
ObjectId
id
)
const
;
// read from xml (only for xml!) т.е. без удалённого запроса
UniversalIO
::
IOType
getConfIOType
(
const
UniSetTypes
::
ObjectId
id
)
const
;
// Получение типа объекта..
UniSetTypes
::
ObjectType
getType
(
const
UniSetTypes
::
ObjectId
id
,
const
UniSetTypes
::
ObjectId
node
)
const
throw
(
IO
_THROW_EXCEPTIONS
);
UniSetTypes
::
ObjectType
getType
(
const
UniSetTypes
::
ObjectId
id
,
const
UniSetTypes
::
ObjectId
node
)
const
throw
(
UI
_THROW_EXCEPTIONS
);
UniSetTypes
::
ObjectType
getType
(
const
UniSetTypes
::
ObjectId
id
)
const
;
...
...
@@ -227,7 +227,7 @@ class UInterface
// Посылка сообщений
/*! посылка сообщения msg объекту name на узел node */
void
send
(
const
UniSetTypes
::
ObjectId
name
,
const
UniSetTypes
::
TransportMessage
&
msg
,
UniSetTypes
::
ObjectId
node
)
throw
(
IO
_THROW_EXCEPTIONS
);
void
send
(
const
UniSetTypes
::
ObjectId
name
,
const
UniSetTypes
::
TransportMessage
&
msg
,
UniSetTypes
::
ObjectId
node
)
throw
(
UI
_THROW_EXCEPTIONS
);
void
send
(
const
UniSetTypes
::
ObjectId
name
,
const
UniSetTypes
::
TransportMessage
&
msg
);
// ---------------------------------------------------------------
...
...
src/Interfaces/UInterface.cc
View file @
50592bf8
...
...
@@ -116,7 +116,7 @@ void UInterface::initBackId( const UniSetTypes::ObjectId backid )
* \exception IOTimeOut - генерируется если в течение времени timeout небыл получен ответ
*/
long
UInterface
::
getValue
(
const
ObjectId
id
,
const
ObjectId
node
)
const
throw
(
IO
_THROW_EXCEPTIONS
)
throw
(
UI
_THROW_EXCEPTIONS
)
{
if
(
id
==
DefaultObjectId
)
throw
ORepFailed
(
"UI(getValue): error id=UniSetTypes::DefaultObjectId"
);
...
...
@@ -274,7 +274,7 @@ void UInterface::setUndefinedState( const IOController_i::SensorInfo& si, bool u
* \exception IOBadParam - генерируется если указано неправильное имя вывода или секции
*/
void
UInterface
::
setValue
(
const
ObjectId
id
,
long
value
,
const
ObjectId
node
)
const
throw
(
IO
_THROW_EXCEPTIONS
)
throw
(
UI
_THROW_EXCEPTIONS
)
{
if
(
id
==
DefaultObjectId
)
throw
ORepFailed
(
"UI(setValue): попытка обратиться к объекту с id=UniSetTypes::DefaultObjectId"
);
...
...
@@ -458,7 +458,7 @@ void UInterface::fastSetValue( const IOController_i::SensorInfo& si, long value,
* \param backid - обратный адрес (идентификатор заказчика)
*/
void
UInterface
::
askRemoteSensor
(
const
ObjectId
id
,
UniversalIO
::
UIOCommand
cmd
,
const
ObjectId
node
,
UniSetTypes
::
ObjectId
backid
)
const
throw
(
IO
_THROW_EXCEPTIONS
)
UniSetTypes
::
ObjectId
backid
)
const
throw
(
UI
_THROW_EXCEPTIONS
)
{
if
(
backid
==
UniSetTypes
::
DefaultObjectId
)
backid
=
myid
;
...
...
@@ -552,7 +552,7 @@ void UInterface::askSensor( const ObjectId name, UniversalIO::UIOCommand cmd, co
* \param node - идентификатор узла
*/
IOType
UInterface
::
getIOType
(
const
ObjectId
id
,
const
ObjectId
node
)
const
throw
(
IO
_THROW_EXCEPTIONS
)
throw
(
UI
_THROW_EXCEPTIONS
)
{
if
(
id
==
DefaultObjectId
)
throw
ORepFailed
(
"UI(getIOType): попытка обратиться к объекту с id=UniSetTypes::DefaultObjectId"
);
...
...
@@ -634,7 +634,7 @@ IOType UInterface::getIOType( const ObjectId id ) const
* \param node - идентификатор узла
*/
ObjectType
UInterface
::
getType
(
const
ObjectId
name
,
const
ObjectId
node
)
const
throw
(
IO
_THROW_EXCEPTIONS
)
throw
(
UI
_THROW_EXCEPTIONS
)
{
if
(
name
==
DefaultObjectId
)
throw
ORepFailed
(
"UI(getType): попытка обратиться к объекту с id=UniSetTypes::DefaultObjectId"
);
...
...
@@ -885,7 +885,7 @@ ObjectPtr UInterface::resolve( const ObjectId rid , const ObjectId node, int tim
// -------------------------------------------------------------------------------------------
void
UInterface
::
send
(
const
ObjectId
name
,
const
TransportMessage
&
msg
,
const
ObjectId
node
)
throw
(
IO
_THROW_EXCEPTIONS
)
throw
(
UI
_THROW_EXCEPTIONS
)
{
if
(
name
==
DefaultObjectId
)
throw
ORepFailed
(
"UI(send): ERROR: id=UniSetTypes::DefaultObjectId"
);
...
...
@@ -1898,7 +1898,7 @@ bool UInterface::waitWorking( const ObjectId id, int msec, int pmsec, const Obje
{
try
{
getValue
(
id
,
node
);
// getValue подходит и для Dx и для Ax
getValue
(
id
,
node
);
ready
=
true
;
break
;
}
...
...
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