summaryrefslogtreecommitdiff
path: root/i/siroco/src/message_asservissement_data.h
blob: 885502a8cdb8425984e82b9b2f57374cc3670498 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#ifndef message_asservissement_data_h
#define message_asservissement_data_h
// message_asservissement_data.h
//  {{{
//
// Copyright (C) 2003 Nicolas Schodet et Pierre-Andr� Galmes
//
// Robot APB Team/Efrei 2004.
//        Web: http://assos.efrei.fr/robot/
//      Email: robot AT efrei DOT fr
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// }}}
#include <list>
#include <iterator>
#include "message.h"

namespace Siroco
{

class MessageAsservissementData : public Message
{
  public:
    struct Point
      {
	int consign, pwm, measure;
	// Constructeur d'aisance (hey, hey !).
	Point (int c = 1, int p = 1, int m = 1)
	  {
	    consign = c; 
	    pwm = p; 
	    measure = m;
	  }
	// BIG 3
	//Point (const Point pt);
	// Point &operator= (Point pt)
      };

    typedef std::list<Point> pointList_type;
    typedef pointList_type::const_iterator const_iterator;
    typedef const_iterator iterator;

  private:
    pointList_type pointList_;
  public:
    // Constructeur.
    MessageAsservissementData (void);
    // R�cup�re les iterators de d�but et de fin.
    const_iterator begin (void) const;
    const_iterator end (void) const;
    // Ajoute des points.
    void add (int c, int p, int m);
    // Optenir la taille de la liste.
    int size (void);
};

};

#endif // message_asservissement_data_h