|

INTRODUCTION
Overview
Download and Install
Documentation
Publications
REPOSITORY
Libraries
DEVELOPER
Dev Guide
Dashboard
PEOPLE
Contributors
Users

Project
Download
Mailing lists
|
|
|
20 #ifndef HOKUYO_ERRORS_H__
21 #define HOKUYO_ERRORS_H__
26 typedef unsigned char uint8_t;
27 typedef unsigned int uint32_t;
28 #if defined(HOKUYO_AIST_STATIC)
29 #define HOKUYO_AIST_EXPORT
30 #elif defined(HOKUYO_AIST_EXPORTS)
31 #define HOKUYO_AIST_EXPORT __declspec(dllexport)
33 #define HOKUYO_AIST_EXPORT __declspec(dllimport)
37 #define HOKUYO_AIST_EXPORT
49 char const* const cmd);
56 class HOKUYO_AIST_EXPORT BaseError : public std::exception
62 BaseError( unsigned int desc_code, char const* error_type);
66 virtual unsigned int desc_code() const throw()
67 { return desc_code_; }
69 virtual char const* error_type() const throw()
70 { return error_type_; }
72 virtual const char* what() throw();
95 LogicError( unsigned int desc_code, char const* error_type)
98 virtual ~LogicError() throw() {};
112 RuntimeError( unsigned int desc_code, char const* error_type)
115 virtual ~RuntimeError() throw() {};
159 unsigned int baud() const throw()
162 const char* what() throw();
175 : RuntimeError(3, "CloseError")
243 ArgError( unsigned int desc_code, char const* error_type)
246 virtual ~ArgError() throw() {};
330 ProtocolError( unsigned int desc_code, char const* error_type)
333 virtual ~ProtocolError() throw() {}
347 calculated_(calculated)
351 calculated_(rhs.calculated())
354 virtual int expected() const throw()
355 { return expected_; }
357 virtual int calculated() const throw()
358 { return calculated_; }
360 const char* what() throw();
375 : ProtocolError(25, "DataCountError")
400 virtual char const* const line() const throw()
403 const char* what() throw();
419 ParseError( char const* const line, char const* const type);
422 virtual char const* const line() const throw()
425 virtual char const* const type() const throw()
428 const char* what() throw();
459 error_[0] = error[0]; error_[1] = error[1];
460 cmd_[0] = cmd[0]; cmd_[1] = cmd[1];
472 virtual char const* const error_code() const throw()
476 virtual char const* const cmd_code() const throw()
479 const char* what() throw();
498 : ProtocolError(30, "Scip1ResponseError"),
499 error_(error), cmd_(cmd)
502 : ProtocolError(rhs), error_(rhs.error_code()),
507 virtual char error_code() const throw()
511 virtual char cmd_code() const throw()
514 const char* what() throw();
533 : ProtocolError(31, "CommandEchoError")
535 cmd_[0] = cmd[0]; cmd_[1] = cmd[1];
536 echo_[0] = echo[0]; echo_[1] = echo[1];
548 virtual char const* const cmd_code() const throw()
552 virtual char const* const cmd_echo() const throw()
555 const char* what() throw();
573 : ProtocolError(32, "ParamEchoError")
575 cmd_[0] = cmd[0]; cmd_[1] = cmd[1];
585 virtual char const* const cmd_code() const throw()
588 const char* what() throw();
605 : ProtocolError(33, "InsufficientBytesError"),
606 num_(num), line_length_(line_length)
609 : ProtocolError(rhs), num_(rhs.num()),
610 line_length_(rhs.line_length())
613 virtual int num() const throw()
616 virtual int line_length() const throw()
617 { return line_length_; }
619 const char* what() throw();
638 : ProtocolError(34, "LineLengthError"),
639 length_(length), expected_(expected)
642 : ProtocolError(rhs), length_(rhs.length()),
643 expected_(rhs.expected())
646 virtual int length() const throw()
649 virtual int expected() const throw()
650 { return expected_; }
652 const char* what() throw();
665 #endif // HOKUYO_ERRORS_H__
|
|