iCub-main
msgList.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 __MSGLIST__
9 #define __MSGLIST__
10 
11 #include <mutex>
12 #include <yarp/dev/CanBusInterface.h>
13 #include "fbCanBusMessage.h"
14 
15 #include <list>
16 
17 typedef std::list<FCMSG>::iterator MsgIt;
18 typedef std::list<FCMSG>::const_iterator MsgConstIt;
19 
20 class MsgList: public std::list<FCMSG>
21 {
22  std::mutex _mutex;
23 public:
24  void lock() { _mutex.lock(); }
25  void unlock() { _mutex.unlock(); }
26 };
27 
28 #endif
void lock()
Definition: msgList.h:24
void unlock()
Definition: msgList.h:25
std::list< FCMSG >::const_iterator MsgConstIt
Definition: msgList.h:18
std::list< FCMSG >::iterator MsgIt
Definition: msgList.h:17