Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

MobileInterface.C File Reference

#include <stdio.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
#include <time.h>
#include <netinet/in.h>
#include "MobileInterface.h"
#include "DisplayDevice.h"
#include "TextEvent.h"
#include "CommandQueue.h"
#include "Inform.h"
#include "PickList.h"
#include "Animation.h"
#include "VMDApp.h"
#include "math.h"
#include "stdlib.h"

Go to the source code of this file.

Compounds

struct  mobilehandle

Defines

#define CURRENTAPIVERSION   9
#define PACKET_ORIENT   1
#define PACKET_TOUCH   2
#define PACKET_HEARTBEAT   3
#define PACKET_CONNECT   4
#define PACKET_DISCONNECT   5
#define PACKET_BUTTON   6
#define EVENT_NON_TOUCH   -1
#define EVENT_TOUCH_DOWN   0
#define EVENT_TOUCH_UP   1
#define EVENT_TOUCH_MOVE   2
#define EVENT_TOUCH_SOMEUP   5
#define EVENT_TOUCH_SOMEDOWN   6
#define EVENT_COMMAND   7
#define SEND_HEARTBEAT   0
#define SEND_ADDCLIENT   1
#define SEND_REMOVECLIENT   2
#define SEND_SETACTIVECLIENT   3
#define SEND_SETMODE   4
#define SEND_MESSAGE   5

Functions

void swap4_aligned (void *v, long ndata)
void * mobile_listener_create (int port)
int getint32 (char *bufptr)
float getfloat32 (char *bufptr)
int mobile_listener_poll (void *voidhandle, float &tx, float &ty, float &tz, float &rx, float &ry, float &rz, int &padaction, int &upid, int &touchcnt, int *touchid, float *padx, float *pady, int &buttons, int &packtype, JString &incomingIP, JString &currentNick, int &listenerPort, float &tranScal, float &rotScal, float &zoomScal, JString &commandToSend)
int mobile_listener_destroy (void *voidhandle)
int send_dgram (const char *host_addr, int port, const unsigned char *buf, int buflen)


Define Documentation

#define CURRENTAPIVERSION   9
 

Definition at line 55 of file MobileInterface.C.

Referenced by Mobile::get_APIsupported, and mobile_listener_poll.

#define EVENT_COMMAND   7
 

Definition at line 72 of file MobileInterface.C.

Referenced by Mobile::check_event, and mobile_listener_poll.

#define EVENT_NON_TOUCH   -1
 

Definition at line 66 of file MobileInterface.C.

Referenced by Mobile::check_event, and mobile_listener_poll.

#define EVENT_TOUCH_DOWN   0
 

Definition at line 67 of file MobileInterface.C.

Referenced by Mobile::check_event.

#define EVENT_TOUCH_MOVE   2
 

Definition at line 69 of file MobileInterface.C.

Referenced by Mobile::check_event.

#define EVENT_TOUCH_SOMEDOWN   6
 

Definition at line 71 of file MobileInterface.C.

Referenced by Mobile::check_event.

#define EVENT_TOUCH_SOMEUP   5
 

Definition at line 70 of file MobileInterface.C.

Referenced by Mobile::check_event.

#define EVENT_TOUCH_UP   1
 

Definition at line 68 of file MobileInterface.C.

Referenced by Mobile::check_event.

#define PACKET_BUTTON   6
 

Definition at line 63 of file MobileInterface.C.

#define PACKET_CONNECT   4
 

Definition at line 61 of file MobileInterface.C.

#define PACKET_DISCONNECT   5
 

Definition at line 62 of file MobileInterface.C.

#define PACKET_HEARTBEAT   3
 

Definition at line 60 of file MobileInterface.C.

Referenced by mobile_listener_poll.

#define PACKET_ORIENT   1
 

Definition at line 58 of file MobileInterface.C.

Referenced by mobile_listener_poll.

#define PACKET_TOUCH   2
 

Definition at line 59 of file MobileInterface.C.

Referenced by mobile_listener_poll.

#define SEND_ADDCLIENT   1
 

Definition at line 76 of file MobileInterface.C.

Referenced by Mobile::addNewClient.

#define SEND_HEARTBEAT   0
 

Definition at line 75 of file MobileInterface.C.

#define SEND_MESSAGE   5
 

Definition at line 80 of file MobileInterface.C.

#define SEND_REMOVECLIENT   2
 

Definition at line 77 of file MobileInterface.C.

Referenced by Mobile::removeClient.

#define SEND_SETACTIVECLIENT   3
 

Definition at line 78 of file MobileInterface.C.

Referenced by Mobile::set_activeClient.

#define SEND_SETMODE   4
 

Definition at line 79 of file MobileInterface.C.

Referenced by Mobile::move_mode.


Function Documentation

float getfloat32 char *    bufptr
 

Definition at line 247 of file MobileInterface.C.

Referenced by mobile_listener_poll.

int getint32 char *    bufptr
 

Definition at line 241 of file MobileInterface.C.

Referenced by mobile_listener_poll.

void* mobile_listener_create int    port [static]
 

Definition at line 198 of file MobileInterface.C.

References NULL, mobilehandle::sockaddr, and mobilehandle::sockfd.

Referenced by Mobile::move_mode, and Mobile::network_port.

int mobile_listener_destroy void *    voidhandle [static]
 

Definition at line 529 of file MobileInterface.C.

References mobilehandle::sockfd.

Referenced by Mobile::move_mode, Mobile::network_port, and Mobile::~Mobile.

int mobile_listener_poll void *    voidhandle,
float &    tx,
float &    ty,
float &    tz,
float &    rx,
float &    ry,
float &    rz,
int &    padaction,
int &    upid,
int &    touchcnt,
int *    touchid,
float *    padx,
float *    pady,
int &    buttons,
int &    packtype,
JString   incomingIP,
JString   currentNick,
int &    listenerPort,
float &    tranScal,
float &    rotScal,
float &    zoomScal,
JString   commandToSend
[static]
 

Definition at line 255 of file MobileInterface.C.

References mobilehandle::buffer, mobilehandle::buttons, CURRENTAPIVERSION, EVENT_COMMAND, EVENT_NON_TOUCH, getfloat32, getint32, PACKET_HEARTBEAT, PACKET_ORIENT, PACKET_TOUCH, mobilehandle::padaction, mobilehandle::padx, mobilehandle::pady, mobilehandle::rotmatrix, mobilehandle::rx, mobilehandle::ry, mobilehandle::rz, mobilehandle::seqnum, mobilehandle::sockaddr, mobilehandle::sockfd, swap4_aligned, mobilehandle::touchcnt, mobilehandle::touchid, mobilehandle::tx, mobilehandle::ty, mobilehandle::tz, and mobilehandle::upid.

Referenced by Mobile::check_event.

int send_dgram const char *    host_addr,
int    port,
const unsigned char *    buf,
int    buflen
 

Definition at line 600 of file MobileInterface.C.

void swap4_aligned void *    v,
long    ndata
[static]
 

Definition at line 85 of file MobileInterface.C.

References data.

Referenced by imd_recv_handshake, and mobile_listener_poll.


Generated on Fri Nov 8 02:46:03 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002