vrpn 07.35
Virtual Reality Peripheral Network
Loading...
Searching...
No Matches
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

◆ BUTTON_READY

◆ 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"); \
} \
}
const vrpn_uint32 vrpn_CONNECTION_RELIABLE
Classes of service for messages, specify multiple by ORing them together Priority of satisfying these...

Definition at line 59 of file vrpn_Button.C.

Referenced by vrpn_Button::set_all_momentary(), vrpn_Button::set_all_toggle(), vrpn_Button::set_momentary(), and vrpn_Button::set_toggle().

◆ 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 69 of file vrpn_Button.C.

Referenced by vrpn_Button_Filter::report_changes(), vrpn_Button_Filter::set_all_momentary(), vrpn_Button_Filter::set_all_toggle(), vrpn_Button_Filter::set_momentary(), and vrpn_Button_Filter::set_toggle().

◆ 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 80 of file vrpn_Button.C.

Referenced by vrpn_Button::report_changes(), and vrpn_Button_Filter::report_changes().

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 )