Main Page · Modules · All Classes · Class Hierarchy
MALedSkit.hpp
1 /*
2  * This file is part of the AiBO+ project
3  *
4  * Copyright (C) 2005-2015 Csaba Kertész (csaba.kertesz@gmail.com)
5  *
6  * AiBO+ is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * AiBO+ is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
19  *
20  */
21 
22 #pragma once
23 
24 #include "types/MABodyTypes.hpp"
25 #include "types/MALeg.hpp"
26 #include "MASkitBase.hpp"
27 
28 #include <MCTypes.hpp>
29 
30 #include <string>
31 
32 class MCBinaryData;
34 class MALedSkit;
35 
41 namespace MA
42 {
44 typedef boost::shared_ptr<MALedSkit> LedSkitSPtr;
45 
47 typedef enum
48 {
49  EarsRed = 0x48,
50  EarsGreen = 0x49,
51  EarsBlue = 0x4a,
52  HeadYellow = 0x52,
53  HeadWhite = 0x53,
54  HeadWiFi = 0x4b,
55  Face1White = 0x30,
56  Face1Color = 0x18,
57  Face2White = 0x31,
58  Face2Color = 0x19,
59  Face3White = 0x32,
60  Face3Color = 0x1a,
61  Face4White = 0x33,
62  Face4Color = 0x1b,
63  Face5White = 0x34,
64  Face6White = 0x35,
65  Face7White = 0x36,
66  Face8White = 0x37,
67  Face9White = 0x38,
68  Face10White = 0x39,
69  Face11White = 0x3a,
70  Face12White = 0x3b,
71  Face13Color0 = 0x3c,
72  Face13Color1 = 0x24,
73  Face14Color0 = 0x3d,
74  Face14Color1 = 0x25,
75  BackFWhite = 0x55,
76  BackMWhite = 0x57,
77  BackRWhite = 0x59,
78  BackFBlue = 0x54,
79  BackMOrange = 0x56,
80  BackRRed = 0x58
81 } LedsType;
82 }
83 
87 class MALedSkit : public MASkitBase
88 {
90  MALedSkit();
91 public:
99  std::string GetName() const;
100 
108  int GetDuration() const;
109 
115  void Dump() const;
116 
127  static MALedSkit* DecodeLedData(const MCBinaryData& binary_data, const std::string& name);
128 
138  MAGeneratorContainer* GetGeneratorContainer(unsigned int device) const;
139 
140 private:
142  std::string Name;
144  MC::IntTable Animations;
147 };
148 
Skit base class.
Definition: MASkitBase.hpp:40
std::string Name
LED name.
Definition: MALedSkit.hpp:142
MC::IntTable Animations
LED animations (first columns - start time, second - duration, third - intensity...)
Definition: MALedSkit.hpp:144
Binary data class.
LED sequence (LED skit) class.
Definition: MALedSkit.hpp:87
int SkitDuration
Skit duration (in msec)
Definition: MALedSkit.hpp:146
Generator container class.