percolate.h
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 2 of the License, or
5  * (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15  *
16  */
17 #ifndef percolate
18 #define percolate
19 
20 #include "MbICP2.h"
21 #include "TData.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 void heapsort(TAsoc a[], int n);
28 
29 #ifdef __cplusplus
30 }
31 #endif
32 
33 #endif
Request to get an integer property.
Definition: player.h:459
String Property Class.
Definition: property.h:171
#define PLAYER_MSG1(level, msg, a)
Definition: error.h:106
uint32_t host
The "host" on which the device resides.
Definition: player.h:148
static bool MatchMessage(player_msghdr_t *hdr, int type, int subtype, player_devaddr_t addr)
Helper for message processing.
Definition: message.h:159
#define PLAYER_SET_STRPROP_REQ
String property set request subtype.
Definition: player.h:440
Generic message header.
Definition: player.h:162
int Subscribe(QueuePointer &sub_queue)
Subscribe the given queue to this device.
virtual int MainSetup(void)
Sets up the resources needed by the driver thread.
Definition: driver.h:658
Encapsulates a device (i.e., a driver bound to an interface)
Definition: device.h:75
uint32_t robot
The "robot" or device collection in which the device resides.
Definition: player.h:151
virtual void Main(void)=0
Main method for driver thread.
#define PLAYER_MSG4(level, msg, a, b, c, d)
Definition: error.h:109
void * GetPayload()
Get pointer to payload.
Definition: message.h:188
#define PLAYER_MSGTYPE_DATA
A data message.
Definition: player.h:95
Definition: TData.h:73
int32_t value
The property value.
Definition: player.h:465
#define PLAYER_MSGTYPE_RESP_ACK
A positive response message.
Definition: player.h:112
virtual int ProcessMessage(QueuePointer &resp_queue, player_msghdr *hdr, void *data)
Message handler.
#define PLAYER_MSGTYPE_REQ
A request message.
Definition: player.h:106
Integer property class.
Definition: property.h:115
int ReadDeviceAddr(player_devaddr_t *addr, int section, const char *name, int code, int index, const char *key)
Read a device id.
int GetTupleCount(int section, const char *name)
Get the number of values in a tuple.
Class for loading configuration file information.
Definition: configfile.h:197
#define PLAYER_CAPABILITIES_REQ
Capability request message type.
Definition: player.h:397
A device address.
Definition: player.h:146
An autopointer for the message queue.
Definition: message.h:74
char * key
The property key.
Definition: player.h:485
#define PLAYER_ERROR1(msg, a)
Definition: error.h:82
#define PLAYER_ERROR(msg)
Definition: error.h:81
Base class for drivers which oeprate with a thread.
Definition: driver.h:553
char * key
The property key.
Definition: player.h:463
Reference-counted message objects.
Definition: message.h:133
Base class for all drivers.
Definition: driver.h:109
char * value
The property value.
Definition: player.h:489
Request to get a string property.
Definition: player.h:481
#define PLAYER_ERROR3(msg, a, b, c)
Definition: error.h:84
#define PLAYER_MSG0(level, msg)
General messages.
Definition: error.h:105
int Unsubscribe(QueuePointer &sub_queue)
Unsubscribe the given queue from this device.
#define PLAYER_SET_INTPROP_REQ
Integer property set request subtype.
Definition: player.h:432
player_msghdr_t * GetHeader()
Get pointer to header.
Definition: message.h:186
uint16_t index
Which device of that interface.
Definition: player.h:155
player_devaddr_t addr
Device to which this message pertains.
Definition: player.h:164
uint16_t interf
The interface provided by the device; must be one of PLAYER_*_CODE.
Definition: player.h:153
#define PLAYER_MSGQUEUE_DEFAULT_MAXLEN
Default maximum length for a message queue.
Definition: player.h:76