iCub-main
Loading...
Searching...
No Matches
icub-main
src
libraries
icubmod
fakeCan
fakeBoard.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2008 RobotCub Consortium
3
* Author: Lorenzo Natale
4
* CopyPolicy: Released under the terms of the GNU GPL v2.0.
5
*
6
*/
7
8
#ifndef __FAKEBOARD__
9
#define __FAKEBOARD__
10
11
#include <yarp/os/PeriodicThread.h>
12
#include "
msgList.h
"
13
14
class
FakeBoard
:
public
yarp::os::PeriodicThread
15
{
16
int
canId;
17
MsgList
inMessages;
18
MsgList
*outMessages;
19
20
public
:
21
FakeBoard
(
int
id
=0,
int
p
=100);
22
23
~FakeBoard
();
24
25
bool
threadInit
();
26
27
void
threadRelease
();
28
29
void
setId
(
int
id
)
30
{
31
canId=id;
32
}
33
34
void
setReplyFifo
(
MsgList
*outBuffer)
35
{
36
outMessages=outBuffer;
37
}
38
39
void
pushMessage
(
const
FCMSG
&msg)
40
{
41
inMessages.
lock
();
42
inMessages.push_back(msg);
43
inMessages.
unlock
();
44
}
45
46
void
run
();
47
};
48
49
#endif
FakeBoard
Definition
fakeBoard.h:15
FakeBoard::pushMessage
void pushMessage(const FCMSG &msg)
Definition
fakeBoard.h:39
FakeBoard::threadInit
bool threadInit()
Definition
fakeBoard.cpp:127
FakeBoard::setReplyFifo
void setReplyFifo(MsgList *outBuffer)
Definition
fakeBoard.h:34
FakeBoard::setId
void setId(int id)
Definition
fakeBoard.h:29
FakeBoard::threadRelease
void threadRelease()
Definition
fakeBoard.cpp:133
FakeBoard::run
void run()
Definition
fakeBoard.cpp:27
FakeBoard::~FakeBoard
~FakeBoard()
Definition
fakeBoard.cpp:22
MsgList
Definition
msgList.h:21
MsgList::lock
void lock()
Definition
msgList.h:24
MsgList::unlock
void unlock()
Definition
msgList.h:25
msgList.h
p
p
Definition
show_eyes_axes.m:23
FCMSG
Definition
fbCanBusMessage.h:11
Generated on Wed Dec 18 2024 16:34:47 for iCub-main by
1.9.8