Project

General

Profile

Statistics
| Branch: | Revision:

scoutos / scout / power / msg_gen / cpp / include / power / power_state_changed.h @ dd4eb68c

History | View | Annotate | Download (9.48 KB)

1
/* Auto-generated by genmsg_cpp for file /home/jeff/code/scoutos/scout/power/msg/power_state_changed.msg */
2
#ifndef POWER_MESSAGE_POWER_STATE_CHANGED_H
3
#define POWER_MESSAGE_POWER_STATE_CHANGED_H
4
#include <string>
5
#include <vector>
6
#include <ostream>
7
#include "ros/serialization.h"
8
#include "ros/builtin_message_traits.h"
9
#include "ros/message_operations.h"
10
#include "ros/message.h"
11
#include "ros/time.h"
12

    
13
#include "std_msgs/Header.h"
14

    
15
namespace power
16
{
17
template <class ContainerAllocator>
18
struct power_state_changed_ : public ros::Message
19
{
20
  typedef power_state_changed_<ContainerAllocator> Type;
21

    
22
  power_state_changed_()
23
  : header()
24
  , voltage(0)
25
  , percentage(0)
26
  , draw(0)
27
  , externalpower(false)
28
  , warning(false)
29
  , critical(false)
30
  {
31
  }
32

    
33
  power_state_changed_(const ContainerAllocator& _alloc)
34
  : header(_alloc)
35
  , voltage(0)
36
  , percentage(0)
37
  , draw(0)
38
  , externalpower(false)
39
  , warning(false)
40
  , critical(false)
41
  {
42
  }
43

    
44
  typedef  ::std_msgs::Header_<ContainerAllocator>  _header_type;
45
   ::std_msgs::Header_<ContainerAllocator>  header;
46

    
47
  typedef uint32_t _voltage_type;
48
  uint32_t voltage;
49

    
50
  typedef uint32_t _percentage_type;
51
  uint32_t percentage;
52

    
53
  typedef uint32_t _draw_type;
54
  uint32_t draw;
55

    
56
  typedef uint8_t _externalpower_type;
57
  uint8_t externalpower;
58

    
59
  typedef uint8_t _warning_type;
60
  uint8_t warning;
61

    
62
  typedef uint8_t _critical_type;
63
  uint8_t critical;
64

    
65

    
66
private:
67
  static const char* __s_getDataType_() { return "power/power_state_changed"; }
68
public:
69
  ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
70

    
71
  ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
72

    
73
private:
74
  static const char* __s_getMD5Sum_() { return "fc98f58bb6056947bbbbbad6cc36490a"; }
75
public:
76
  ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
77

    
78
  ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
79

    
80
private:
81
  static const char* __s_getMessageDefinition_() { return "Header header\n\
82
#32-bit integer with current voltage info\n\
83
uint32 voltage\n\
84
#power percentage [0-100]\n\
85
uint32 percentage\n\
86
#current draw in mW\n\
87
uint32 draw\n\
88
#are we on external power?\n\
89
bool externalpower\n\
90
#is the battery at a warning state?\n\
91
bool warning\n\
92
#is the battery at a critical state?\n\
93
bool critical\n\
94
\n\
95
\n\
96
================================================================================\n\
97
MSG: std_msgs/Header\n\
98
# Standard metadata for higher-level stamped data types.\n\
99
# This is generally used to communicate timestamped data \n\
100
# in a particular coordinate frame.\n\
101
# \n\
102
# sequence ID: consecutively increasing ID \n\
103
uint32 seq\n\
104
#Two-integer timestamp that is expressed as:\n\
105
# * stamp.secs: seconds (stamp_secs) since epoch\n\
106
# * stamp.nsecs: nanoseconds since stamp_secs\n\
107
# time-handling sugar is provided by the client library\n\
108
time stamp\n\
109
#Frame this data is associated with\n\
110
# 0: no frame\n\
111
# 1: global frame\n\
112
string frame_id\n\
113
\n\
114
"; }
115
public:
116
  ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
117

    
118
  ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
119

    
120
  ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
121
  {
122
    ros::serialization::OStream stream(write_ptr, 1000000000);
123
    ros::serialization::serialize(stream, header);
124
    ros::serialization::serialize(stream, voltage);
125
    ros::serialization::serialize(stream, percentage);
126
    ros::serialization::serialize(stream, draw);
127
    ros::serialization::serialize(stream, externalpower);
128
    ros::serialization::serialize(stream, warning);
129
    ros::serialization::serialize(stream, critical);
130
    return stream.getData();
131
  }
132

    
133
  ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
134
  {
135
    ros::serialization::IStream stream(read_ptr, 1000000000);
136
    ros::serialization::deserialize(stream, header);
137
    ros::serialization::deserialize(stream, voltage);
138
    ros::serialization::deserialize(stream, percentage);
139
    ros::serialization::deserialize(stream, draw);
140
    ros::serialization::deserialize(stream, externalpower);
141
    ros::serialization::deserialize(stream, warning);
142
    ros::serialization::deserialize(stream, critical);
143
    return stream.getData();
144
  }
145

    
146
  ROS_DEPRECATED virtual uint32_t serializationLength() const
147
  {
148
    uint32_t size = 0;
149
    size += ros::serialization::serializationLength(header);
150
    size += ros::serialization::serializationLength(voltage);
151
    size += ros::serialization::serializationLength(percentage);
152
    size += ros::serialization::serializationLength(draw);
153
    size += ros::serialization::serializationLength(externalpower);
154
    size += ros::serialization::serializationLength(warning);
155
    size += ros::serialization::serializationLength(critical);
156
    return size;
157
  }
158

    
159
  typedef boost::shared_ptr< ::power::power_state_changed_<ContainerAllocator> > Ptr;
160
  typedef boost::shared_ptr< ::power::power_state_changed_<ContainerAllocator>  const> ConstPtr;
161
}; // struct power_state_changed
162
typedef  ::power::power_state_changed_<std::allocator<void> > power_state_changed;
163

    
164
typedef boost::shared_ptr< ::power::power_state_changed> power_state_changedPtr;
165
typedef boost::shared_ptr< ::power::power_state_changed const> power_state_changedConstPtr;
166

    
167

    
168
template<typename ContainerAllocator>
169
std::ostream& operator<<(std::ostream& s, const  ::power::power_state_changed_<ContainerAllocator> & v)
170
{
171
  ros::message_operations::Printer< ::power::power_state_changed_<ContainerAllocator> >::stream(s, "", v);
172
  return s;}
173

    
174
} // namespace power
175

    
176
namespace ros
177
{
178
namespace message_traits
179
{
180
template<class ContainerAllocator>
181
struct MD5Sum< ::power::power_state_changed_<ContainerAllocator> > {
182
  static const char* value() 
183
  {
184
    return "fc98f58bb6056947bbbbbad6cc36490a";
185
  }
186

    
187
  static const char* value(const  ::power::power_state_changed_<ContainerAllocator> &) { return value(); } 
188
  static const uint64_t static_value1 = 0xfc98f58bb6056947ULL;
189
  static const uint64_t static_value2 = 0xbbbbbad6cc36490aULL;
190
};
191

    
192
template<class ContainerAllocator>
193
struct DataType< ::power::power_state_changed_<ContainerAllocator> > {
194
  static const char* value() 
195
  {
196
    return "power/power_state_changed";
197
  }
198

    
199
  static const char* value(const  ::power::power_state_changed_<ContainerAllocator> &) { return value(); } 
200
};
201

    
202
template<class ContainerAllocator>
203
struct Definition< ::power::power_state_changed_<ContainerAllocator> > {
204
  static const char* value() 
205
  {
206
    return "Header header\n\
207
#32-bit integer with current voltage info\n\
208
uint32 voltage\n\
209
#power percentage [0-100]\n\
210
uint32 percentage\n\
211
#current draw in mW\n\
212
uint32 draw\n\
213
#are we on external power?\n\
214
bool externalpower\n\
215
#is the battery at a warning state?\n\
216
bool warning\n\
217
#is the battery at a critical state?\n\
218
bool critical\n\
219
\n\
220
\n\
221
================================================================================\n\
222
MSG: std_msgs/Header\n\
223
# Standard metadata for higher-level stamped data types.\n\
224
# This is generally used to communicate timestamped data \n\
225
# in a particular coordinate frame.\n\
226
# \n\
227
# sequence ID: consecutively increasing ID \n\
228
uint32 seq\n\
229
#Two-integer timestamp that is expressed as:\n\
230
# * stamp.secs: seconds (stamp_secs) since epoch\n\
231
# * stamp.nsecs: nanoseconds since stamp_secs\n\
232
# time-handling sugar is provided by the client library\n\
233
time stamp\n\
234
#Frame this data is associated with\n\
235
# 0: no frame\n\
236
# 1: global frame\n\
237
string frame_id\n\
238
\n\
239
";
240
  }
241

    
242
  static const char* value(const  ::power::power_state_changed_<ContainerAllocator> &) { return value(); } 
243
};
244

    
245
template<class ContainerAllocator> struct HasHeader< ::power::power_state_changed_<ContainerAllocator> > : public TrueType {};
246
template<class ContainerAllocator> struct HasHeader< const ::power::power_state_changed_<ContainerAllocator> > : public TrueType {};
247
} // namespace message_traits
248
} // namespace ros
249

    
250
namespace ros
251
{
252
namespace serialization
253
{
254

    
255
template<class ContainerAllocator> struct Serializer< ::power::power_state_changed_<ContainerAllocator> >
256
{
257
  template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
258
  {
259
    stream.next(m.header);
260
    stream.next(m.voltage);
261
    stream.next(m.percentage);
262
    stream.next(m.draw);
263
    stream.next(m.externalpower);
264
    stream.next(m.warning);
265
    stream.next(m.critical);
266
  }
267

    
268
  ROS_DECLARE_ALLINONE_SERIALIZER;
269
}; // struct power_state_changed_
270
} // namespace serialization
271
} // namespace ros
272

    
273
namespace ros
274
{
275
namespace message_operations
276
{
277

    
278
template<class ContainerAllocator>
279
struct Printer< ::power::power_state_changed_<ContainerAllocator> >
280
{
281
  template<typename Stream> static void stream(Stream& s, const std::string& indent, const  ::power::power_state_changed_<ContainerAllocator> & v) 
282
  {
283
    s << indent << "header: ";
284
s << std::endl;
285
    Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + "  ", v.header);
286
    s << indent << "voltage: ";
287
    Printer<uint32_t>::stream(s, indent + "  ", v.voltage);
288
    s << indent << "percentage: ";
289
    Printer<uint32_t>::stream(s, indent + "  ", v.percentage);
290
    s << indent << "draw: ";
291
    Printer<uint32_t>::stream(s, indent + "  ", v.draw);
292
    s << indent << "externalpower: ";
293
    Printer<uint8_t>::stream(s, indent + "  ", v.externalpower);
294
    s << indent << "warning: ";
295
    Printer<uint8_t>::stream(s, indent + "  ", v.warning);
296
    s << indent << "critical: ";
297
    Printer<uint8_t>::stream(s, indent + "  ", v.critical);
298
  }
299
};
300

    
301

    
302
} // namespace message_operations
303
} // namespace ros
304

    
305
#endif // POWER_MESSAGE_POWER_STATE_CHANGED_H
306