Fawkes API  Fawkes Development Version
OpenraveRobotMemoryInterface.h
1 
2 /***************************************************************************
3  * OpenraveRobotMemoryInterface.h - Fawkes BlackBoard Interface - OpenraveRobotMemoryInterface
4  *
5  * Templated created: Thu Oct 12 10:49:19 2006
6  * Copyright 2016 Frederik Zwilling
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef _INTERFACES_OPENRAVEROBOTMEMORYINTERFACE_H_
25 #define _INTERFACES_OPENRAVEROBOTMEMORYINTERFACE_H_
26 
27 #include <interface/interface.h>
28 #include <interface/message.h>
29 #include <interface/field_iterator.h>
30 
31 namespace fawkes {
32 
33 class OpenraveRobotMemoryInterface : public Interface
34 {
35  /// @cond INTERNALS
36  INTERFACE_MGMT_FRIENDS(OpenraveRobotMemoryInterface)
37  /// @endcond
38  public:
39  /* constants */
40 
41  private:
42  /** Internal data storage, do NOT modify! */
43  typedef struct {
44  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
45  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
46  uint32_t dummy; /**<
47  Dummy field
48  */
49  } OpenraveRobotMemoryInterface_data_t;
50 
51  OpenraveRobotMemoryInterface_data_t *data;
52 
53  public:
54  /* messages */
55  class ConstructSceneMessage : public Message
56  {
57  private:
58  /** Internal data storage, do NOT modify! */
59  typedef struct {
60  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
61  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
62  } ConstructSceneMessage_data_t;
63 
64  ConstructSceneMessage_data_t *data;
65 
66  public:
69 
71  /* Methods */
72  virtual Message * clone() const;
73  };
74 
75  virtual bool message_valid(const Message *message) const;
76  private:
79 
80  public:
81  /* Methods */
82  uint32_t dummy() const;
83  void set_dummy(const uint32_t new_dummy);
84  size_t maxlenof_dummy() const;
85  virtual Message * create_message(const char *type) const;
86 
87  virtual void copy_values(const Interface *other);
88  virtual const char * enum_tostring(const char *enumtype, int val) const;
89 
90 };
91 
92 } // end namespace fawkes
93 
94 #endif
fawkes::OpenraveRobotMemoryInterface::create_message
virtual Message * create_message(const char *type) const
Definition: OpenraveRobotMemoryInterface.cpp:108
fawkes::Message
Definition: message.h:41
fawkes::OpenraveRobotMemoryInterface::dummy
uint32_t dummy() const
Get dummy value.
Definition: OpenraveRobotMemoryInterface.cpp:78
fawkes::OpenraveRobotMemoryInterface::ConstructSceneMessage
Definition: OpenraveRobotMemoryInterface.h:67
fawkes::Interface::type
const char * type() const
Get type of interface.
Definition: interface.cpp:645
fawkes::OpenraveRobotMemoryInterface::enum_tostring
virtual const char * enum_tostring(const char *enumtype, int val) const
Definition: OpenraveRobotMemoryInterface.cpp:134
fawkes
fawkes::OpenraveRobotMemoryInterface::ConstructSceneMessage::ConstructSceneMessage
ConstructSceneMessage()
Constructor.
Definition: OpenraveRobotMemoryInterface.cpp:148
fawkes::Interface
Definition: interface.h:78
fawkes::OpenraveRobotMemoryInterface::maxlenof_dummy
size_t maxlenof_dummy() const
Get maximum length of dummy value.
Definition: OpenraveRobotMemoryInterface.cpp:88
fawkes::OpenraveRobotMemoryInterface::message_valid
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
Definition: OpenraveRobotMemoryInterface.cpp:191
fawkes::OpenraveRobotMemoryInterface::ConstructSceneMessage::clone
virtual Message * clone() const
Clone this message.
Definition: OpenraveRobotMemoryInterface.cpp:182
fawkes::OpenraveRobotMemoryInterface::copy_values
virtual void copy_values(const Interface *other)
Copy values from other interface.
Definition: OpenraveRobotMemoryInterface.cpp:123
fawkes::OpenraveRobotMemoryInterface::set_dummy
void set_dummy(const uint32_t new_dummy)
Set dummy value.
Definition: OpenraveRobotMemoryInterface.cpp:100
fawkes::OpenraveRobotMemoryInterface::ConstructSceneMessage::~ConstructSceneMessage
~ConstructSceneMessage()
Destructor.
Definition: OpenraveRobotMemoryInterface.cpp:158
fawkes::OpenraveRobotMemoryInterface
Definition: OpenraveRobotMemoryInterface.h:39