vrpn  07.33
Virtual Reality Peripheral Network
vrpn_Button.C File Reference
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
#include "vrpn_Connection.h"
#include "vrpn_Serial.h"
#include "vrpn_Shared.h"
#include "vrpn_Button.h"
Include dependency graph for vrpn_Button.C:

Go to the source code of this file.

Macros

#define BUTTON_READY   (1)
 
#define BUTTON_FAIL   (-1)
 
#define PACK_ADMIN_MESSAGE(i, event)
 
#define PACK_ALERT_MESSAGE(i, event)
 
#define PACK_MESSAGE(i, event)
 

Functions

const unsigned char PG_START_BYTE_DATA (0x80)
 
const unsigned char PG_START_BYTE_DATA_TIME (0x81)
 
const unsigned char PG_END_BYTE (0x8F)
 

Macro Definition Documentation

◆ BUTTON_FAIL

#define BUTTON_FAIL   (-1)

Definition at line 36 of file vrpn_Button.C.

◆ BUTTON_READY

#define BUTTON_READY   (1)

Definition at line 35 of file vrpn_Button.C.

◆ PACK_ADMIN_MESSAGE

#define PACK_ADMIN_MESSAGE (   i,
  event 
)
Value:
{ \
char msgbuf[1000]; \
vrpn_int32 len = encode_to(msgbuf, i, event); \
if (d_connection->pack_message(len, timestamp, admin_message_id, \
d_sender_id, msgbuf, \
fprintf(stderr, "vrpn_Button: can't write message: tossing\n"); \
} \
}

Definition at line 58 of file vrpn_Button.C.

◆ PACK_ALERT_MESSAGE

#define PACK_ALERT_MESSAGE (   i,
  event 
)
Value:
{ \
char msgbuf[1000]; \
vrpn_int32 len = encode_to(msgbuf, i, event); \
if (d_connection->pack_message(len, timestamp, alert_message_id, \
d_sender_id, msgbuf, \
fprintf(stderr, "vrpn_Button: can't write message: tossing\n"); \
} \
}

Definition at line 68 of file vrpn_Button.C.

◆ PACK_MESSAGE

#define PACK_MESSAGE (   i,
  event 
)
Value:
{ \
char msgbuf[1000]; \
vrpn_int32 len = encode_to(msgbuf, i, event); \
if (d_connection->pack_message(len, timestamp, change_message_id, \
d_sender_id, msgbuf, \
fprintf(stderr, "vrpn_Button: can't write message: tossing\n"); \
} \
}

Definition at line 79 of file vrpn_Button.C.

Function Documentation

◆ PG_END_BYTE()

const unsigned char PG_END_BYTE ( 0x8F  )

◆ PG_START_BYTE_DATA()

const unsigned char PG_START_BYTE_DATA ( 0x80  )

◆ PG_START_BYTE_DATA_TIME()

const unsigned char PG_START_BYTE_DATA_TIME ( 0x81  )
vrpn_CONNECTION_RELIABLE
const vrpn_uint32 vrpn_CONNECTION_RELIABLE
Classes of service for messages, specify multiple by ORing them together Priority of satisfying these...
Definition: vrpn_Connection.h:120