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
05de7184
Commit
05de7184
authored
Nov 30, 2010
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Наследовал mbException от UniSetTypes::Exception, чтобы вылавливалось.
parent
da6f95f2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
libuniset.spec
conf/libuniset.spec
+4
-1
Exceptions.h
include/Exceptions.h
+0
-2
ModbusRTUErrors.h
include/modbus/ModbusRTUErrors.h
+8
-5
No files found.
conf/libuniset.spec
View file @
05de7184
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
Name: libuniset
Name: libuniset
Version: 0.99
Version: 0.99
Release: eter2
3
Release: eter2
4
Summary: UniSet - library for building distributed industrial control systems
Summary: UniSet - library for building distributed industrial control systems
License: GPL
License: GPL
Group: Development/C++
Group: Development/C++
...
@@ -184,6 +184,9 @@ rm -f %buildroot%_libdir/*.la
...
@@ -184,6 +184,9 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
%changelog
* Tue Nov 30 2010 Pavel Vainerman <pv@altlinux.ru> 0.99-eter24
- ModbusRTU::mbException: public Exception
* Mon Nov 29 2010 Pavel Vainerman <pv@altlinux.ru> 0.99-eter23
* Mon Nov 29 2010 Pavel Vainerman <pv@altlinux.ru> 0.99-eter23
- fixed bug in Modbus<-->SM (signed and unsigned value)
- fixed bug in Modbus<-->SM (signed and unsigned value)
...
...
include/Exceptions.h
View file @
05de7184
...
@@ -20,8 +20,6 @@
...
@@ -20,8 +20,6 @@
/*! \file
/*! \file
* \brief Иерархия генерируемых библиотекой исключений
* \brief Иерархия генерируемых библиотекой исключений
* \author Pavel Vainerman
* \author Pavel Vainerman
* \date $Date: 2008/12/14 21:57:51 $
* \version $Id: Exceptions.h,v 1.10 2008/12/14 21:57:51 vpashka Exp $
*/
*/
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
#ifndef Exceptions_h_
#ifndef Exceptions_h_
...
...
include/modbus/ModbusRTUErrors.h
View file @
05de7184
/*! $Id: ModbusRTUErrors.h,v 1.2 2008/01/01 00:26:23 vpashka Exp $ */
// -------------------------------------------------------------------------
#ifndef ModbusRTUErrors_H_
#ifndef ModbusRTUErrors_H_
#define ModbusRTUErrors_H_
#define ModbusRTUErrors_H_
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
#include <string>
#include <string>
#include <iostream>
#include <iostream>
#include "Exceptions.h"
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
namespace
ModbusRTU
namespace
ModbusRTU
{
{
...
@@ -34,11 +33,15 @@ namespace ModbusRTU
...
@@ -34,11 +33,15 @@ namespace ModbusRTU
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
std
::
string
mbErr2Str
(
mbErrCode
e
);
std
::
string
mbErr2Str
(
mbErrCode
e
);
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
class
mbException
class
mbException
:
UniSetTypes
::
Exception
{
{
public
:
public
:
mbException
()
:
err
(
ModbusRTU
::
erNoError
){}
mbException
()
:
mbException
(
ModbusRTU
::
mbErrCode
err
)
:
err
(
err
){}
UniSetTypes
::
Exception
(
"mbException"
),
err
(
ModbusRTU
::
erNoError
){}
mbException
(
ModbusRTU
::
mbErrCode
err
)
:
UniSetTypes
::
Exception
(
mbErr2Str
(
err
)),
err
(
err
){}
ModbusRTU
::
mbErrCode
err
;
ModbusRTU
::
mbErrCode
err
;
...
...
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