Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Leander Schulten
Lichtsteuerung
Commits
2036decf
Commit
2036decf
authored
Apr 10, 2018
by
Leander Schulten
Browse files
Move to namespace
parent
a0023fa3
Changes
2
Hide whitespace changes
Inline
Side-by-side
programms/dmxconsumer.cpp
View file @
2036decf
#include
"dmxconsumer.h"
DMXConsumer
::
DMXConsumer
()
{
namespace
Modules
{
}
DMXConsumer
::
DMXConsumer
()
{
void
DMXConsumer
::
setInputSize
(
unsigned
int
size
){
channel
.
resize
(
size
,
-
1
);
}
}
void
DMXConsumer
::
start
(){}
void
DMXConsumer
::
setInputSize
(
unsigned
int
size
){
channel
.
resize
(
size
,
-
1
);
}
void
DMXConsumer
::
start
(){}
void
DMXConsumer
::
show
(
void
*
data
){
brightness_t
*
b
=
static_cast
<
brightness_t
*>
(
data
);
for
(
auto
i
=
channel
.
cbegin
();
i
!=
channel
.
cend
();
++
i
,
++
b
){
if
(
*
i
>
0
){
//dmxData[*i] = *b;
//TODO;
void
DMXConsumer
::
show
(
void
*
data
){
brightness_t
*
b
=
static_cast
<
brightness_t
*>
(
data
);
for
(
auto
i
=
channel
.
cbegin
();
i
!=
channel
.
cend
();
++
i
,
++
b
){
if
(
*
i
>
0
){
//dmxData[*i] = *b;
//TODO;
}
}
}
}
programms/dmxconsumer.h
View file @
2036decf
...
...
@@ -4,16 +4,19 @@
#include
"consumer.h"
#include
<vector>
class
DMXConsumer
:
public
Modules
::
Consumer
{
std
::
vector
<
short
>
channel
;
public:
DMXConsumer
();
virtual
ValueType
getInputValueType
()
override
{
return
Brightness
;}
virtual
void
setInputSize
(
unsigned
int
)
override
;
virtual
void
start
()
override
;
virtual
void
show
(
void
*
data
)
override
;
const
std
::
vector
<
short
>
&
getChannelAssoziation
()
const
{
return
channel
;}
};
namespace
Modules
{
class
DMXConsumer
:
public
Modules
::
Consumer
{
std
::
vector
<
short
>
channel
;
public:
DMXConsumer
();
virtual
ValueType
getInputValueType
()
override
{
return
Brightness
;}
virtual
void
setInputSize
(
unsigned
int
)
override
;
virtual
void
start
()
override
;
virtual
void
show
(
void
*
data
)
override
;
const
std
::
vector
<
short
>
&
getChannelAssoziatfion
()
const
{
return
channel
;}
};
}
#endif // DMXCONSUMER_H
Write
Preview
Supports
Markdown
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