Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1497253
Channel.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Size
1 KB
Referenced Files
None
Subscribers
None
Channel.h
View Options
#ifndef CHANNEL_HEADERFILE
#define CHANNEL_HEADERFILE
#include
<list>
#include
"Message.h"
#include
"Module.h"
#define MAX_BUFFER_LENGTH 100
#define OPEN NULL
using
namespace
std
;
class
Channel
:
public
Module
{
private
:
list
<
Message
*>
lInputMsgBufferUp
;
list
<
Message
*>
lOutputMsgBufferUp
;
list
<
Message
*>
lInputMsgBufferDown
;
list
<
Message
*>
lOutputMsgBufferDown
;
unsigned
int
maxBufferLength
;
unsigned
int
transferRate
;
void
init_channel
();
bool
add_msgAtBegin
(
list
<
Message
*>*
buffer
,
Message
*
message
);
bool
del_msgAtBegin
(
list
<
Message
*>*
buffer
);
bool
add_msgAtEnd
(
list
<
Message
*>*
buffer
,
Message
*
message
);
bool
del_msgAtEnd
(
list
<
Message
*>*
buffer
);
public
:
Channel
();
Channel
(
const
char
*
name
);
bool
set_maxBufferLength
(
unsigned
int
maxBufferLength
);
unsigned
int
get_maxBufferLength
();
unsigned
int
get_avlInputBufferUp
();
unsigned
int
get_avlOutputBufferUp
();
unsigned
int
get_avlInputBufferDown
();
unsigned
int
get_avlOutputBufferDown
();
bool
set_transferRate
(
unsigned
int
transferRate
);
unsigned
int
get_transferRate
();
bool
send_MsgUp
(
Message
*
message
);
bool
send_MsgUp
(
float
msg
);
bool
send_MsgUp
(
int
msg
);
bool
get_MsgUp
(
float
*
msg
);
bool
get_MsgUp
(
int
*
msg
);
bool
isThereFloatMsgUp
();
bool
isThereIntMsgUp
();
bool
send_MsgDown
(
Message
*
message
);
bool
send_MsgDown
(
float
msg
);
bool
send_MsgDown
(
int
msg
);
bool
get_MsgDown
(
float
*
msg
);
bool
get_MsgDown
(
int
*
msg
);
bool
isThereFloatMsgDown
();
bool
isThereIntMsgDown
();
bool
trigger
();
bool
transferMsgs
(
list
<
Message
*>*
dest_buffer
,
list
<
Message
*>*
src_buffer
);
};
#endif
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Mar 1, 9:30 PM (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
286452
Default Alt Text
Channel.h (1 KB)
Attached To
Mode
R20 SoC_Rosa_repo
Attached
Detach File
Event Timeline
Log In to Comment