Main Page
Namespaces
Classes
Files
File List
File Members
src
datatypes
Trigger.cpp
Go to the documentation of this file.
1
//
2
// Trigger.cpp
3
// Contains the class "Trigger"
4
//
5
6
// HISTORY
7
//
8
// 1.0.0 2011-06-06, VWi
9
// Initial version
10
11
12
#include "
Trigger.hpp
"
13
#include "../tools/errorhandler.hpp"
14
#include <sstream>
// for std::ostringstream
15
16
namespace
datatypes
17
{
18
19
Trigger::Trigger
()
20
: m_number (0)
21
{
22
m_datatype
=
Datatype_Trigger
;
23
}
24
28
Trigger::Trigger
(
UINT32
number,
UINT8
sourceId)
29
:
m_number
(number)
30
{
31
m_datatype
=
Datatype_Trigger
;
32
m_sourceId
= sourceId;
33
}
34
35
36
// MSVC requires that virtual destructors are located in the cpp-file ...
37
Trigger::~Trigger
()
38
{}
39
40
41
void
Trigger::setNumber
(
UINT32
number)
42
{
43
m_number
= number;
44
}
45
46
47
//
48
// For debug
49
//
50
std::string
Trigger::toString
()
51
{
52
std::ostringstream stream;
53
54
stream <<
"DeviceID="
55
<<
m_sourceId
56
<<
", Number="
57
<<
m_number
;
58
59
return
stream.str();
60
}
61
62
}
// namespace datatypes
63
datatypes
Definition:
BasicDatatypes.hpp:91
datatypes::Trigger::m_number
UINT32 m_number
The trigger counter.
Definition:
Trigger.hpp:45
UINT32
uint32_t UINT32
Definition:
BasicDatatypes.hpp:26
datatypes::BasicData::m_sourceId
UINT16 m_sourceId
Definition:
BasicDatatypes.hpp:108
Trigger.hpp
Contains the classes Trigger.
datatypes::BasicData::m_datatype
UINT16 m_datatype
Definition:
BasicDatatypes.hpp:107
datatypes::Trigger::Trigger
Trigger()
Default constructor.
Definition:
Trigger.cpp:19
datatypes::Trigger::setNumber
void setNumber(UINT32 number)
Definition:
Trigger.cpp:41
datatypes::Trigger::~Trigger
virtual ~Trigger()
Destructor.
Definition:
Trigger.cpp:37
datatypes::Trigger::toString
std::string toString()
Definition:
Trigger.cpp:50
Datatype_Trigger
Definition:
BasicDatatypes.hpp:62
UINT8
uint8_t UINT8
Definition:
BasicDatatypes.hpp:29
libsick_ldmrs
Author(s): SICK AG
, Martin Günther
, Jochen Sprickerhof
autogenerated on Mon Oct 26 2020 03:27:30