|
Robot Agent
1.0
|
#include <stdio.h>#include <string.h>#include <stdlib.h>#include <math.h>#include "protocol.h"#include "config.h"#include "def.h"#include "rfid.h"#include "openinterface.h"#include "robot.h"#include "pheromone.h"#include "timelib.h"Go to the source code of this file.
Functions | |
| int | protocol_encode (char *udp_packet, int *len, int recv_id, int send_id, int send_team, char type, int seqno, int seqid, int seq_lid, int data_type, void *data) |
| int | protocol_decode (protocol_t *packet, char *udp_packet, int len, int robot_id, int robot_team) |
| int | protocol_destroy () |
Functions to encode/decode communication packets.
Definition in file protocol.c.
| int protocol_decode | ( | protocol_t * | packet, |
| char * | udp_packet, | ||
| int | len, | ||
| int | robot_id, | ||
| int | robot_team | ||
| ) |
Decode string received from UDP into interpretable data
| packet | |
| udp_packet | |
| len | |
| robot_id | |
| robot_team |
Definition at line 169 of file protocol.c.
| int protocol_destroy | ( | ) |
| int protocol_encode | ( | char * | udp_packet, |
| int * | len, | ||
| int | recv_id, | ||
| int | send_id, | ||
| int | send_team, | ||
| char | type, | ||
| int | seqno, | ||
| int | seqid, | ||
| int | seq_lid, | ||
| int | data_type, | ||
| void * | data | ||
| ) |
Encode data structure into string to be sent through UDP
| udp_packet | |
| len | |
| recv_id | |
| send_id | |
| send_team | |
| type | |
| data_type | |
| data |
Definition at line 43 of file protocol.c.
1.8.5