Classes | Defines | Functions
wge100_sim.cc File Reference
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
#include <sched.h>
#include <ros/console.h>
#include <ros/time.h>
#include <wge100_camera/ipcam_packet.h>
#include <wge100_camera/host_netutil.h>
#include <wge100_camera/wge100lib.h>
#include <wge100_camera/mt9v.h>
Include dependency graph for wge100_sim.cc:

Go to the source code of this file.

Classes

class  WGE100Simulator

Defines

#define CAST_AND_CHK(type)
#define FILL_HDR(pkttype, pktid)
#define SEND_RSP

Functions

int main (int argc, char **argv)

Define Documentation

#define CAST_AND_CHK (   type)
Value:
if (len != sizeof(type)) \
{ \
   ROS_INFO("Got a "#type" with incorrect length"); \
   continue;\
} \
if (false) ROS_INFO("Got a "#type""); \
type *pkt = (type *) buff;
#define FILL_HDR (   pkttype,
  pktid 
)
Value:
if (false) ROS_INFO("Sending a "#pkttype" packet."); \
Packet##pkttype rsp; \
rsp.hdr.magic_no = htonl(WG_MAGIC_NO); \
strncpy(rsp.hdr.hrt, #pkttype, sizeof(rsp.hdr.hrt)); \
rsp.hdr.type = htonl(pktid);

Definition at line 404 of file wge100_sim.cc.

#define SEND_RSP
Value:
sockaddr_in rsp_addr; \
bzero(&rsp_addr, sizeof(rsp_addr)); \
rsp_addr.sin_family = AF_INET; \
rsp_addr.sin_addr.s_addr = hdr->reply_to.addr; \
rsp_addr.sin_port = hdr->reply_to.port; \
sendto(socket_, &rsp, sizeof(rsp), 0, \
    (struct sockaddr *) &rsp_addr, sizeof(rsp_addr));

Definition at line 412 of file wge100_sim.cc.


Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 472 of file wge100_sim.cc.



wge100_camera
Author(s): Blaise Gassend, Patrick Mihelich, Eric MacIntosh, David Palchak
autogenerated on Fri Jan 3 2014 12:16:01