32 ,
int run_speed_tics_sec = 3200
33 ,
int start_speed_tics_sec = 1200
34 ,
int end_speed_tics_sec = 2000
35 ,
int accel_rate_tics_sec_sec = 40000
36 ,
int decel_rate_tics_sec_sec = 100000
37 ,
int run_current = 290
38 ,
int hold_current = 0
39 ,
int accel_current = 290
40 ,
int decel_current = 290
43 ,
int high_limit_index = -1
44 ,
int low_limit_index = -1
45 ,
int output_1_setting = -1
46 ,
int output_2_setting = -1
47 ,
int output_3_setting = -1
48 ,
int output_4_setting = -1
49 ,
double initial_move = 0
50 ,
double fractional_c_a = 1.0
51 ,
double reset_location = 0.0
86 virtual int reset(
void);
vrpn_Analog_Output(const char *name, vrpn_Connection *c=NULL)
virtual void report(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY, const struct timeval time=vrpn_ANALOG_NOW)
Send a report whether something has changed or not (for servers) Optionally, tell what time to stamp ...
virtual void report_changes(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY, const struct timeval time=vrpn_ANALOG_NOW)
Send a report only if something has changed (for servers) Optionally, tell what time to stamp the val...
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
Generic connection class not specific to the transport mechanism.
int d_accel_rate_tics_sec_sec
bool send_command(const char *cmd)
Appends carriage-return and then sends the command.
struct timeval d_timestamp
struct timeval d_last_poll
bool send_move_request(vrpn_float64 location_in_steps, double scale=1.0)
Request a move from the motor to the specified location.
int d_decel_rate_tics_sec_sec
static int VRPN_CALLBACK handle_request_message(void *userdata, vrpn_HANDLERPARAM p)
Responds to a request to change one of the values by setting the channel to that value.
virtual int get_report(void)
vrpn_IDEA(const char *name, vrpn_Connection *c, const char *port, int run_speed_tics_sec=3200, int start_speed_tics_sec=1200, int end_speed_tics_sec=2000, int accel_rate_tics_sec_sec=40000, int decel_rate_tics_sec_sec=100000, int run_current=290, int hold_current=0, int accel_current=290, int decel_current=290, int delay=50, int step=8, int high_limit_index=-1, int low_limit_index=-1, int output_1_setting=-1, int output_2_setting=-1, int output_3_setting=-1, int output_4_setting=-1, double initial_move=0, double fractional_c_a=1.0, double reset_location=0.0)
static int VRPN_CALLBACK handle_request_channels_message(void *userdata, vrpn_HANDLERPARAM p)
Responds to a request to change multiple channels at once.
int convert_report_to_buttons(unsigned char *buf)
Parses an input/output report. Returns -1 on failure, 0 on no value.
int convert_report_to_position(unsigned char *buf)
Parses a position report. Returns -1 on failure, 0 on no value.
unsigned char d_buffer[512]
bool move_until_done_or_error(vrpn_float64 location_in_steps, double scale=1.0)
Send a move request and then wait for the move to complete. Repeat.
static int VRPN_CALLBACK handle_connect_message(void *userdata, vrpn_HANDLERPARAM p)
Responds to a connection request with a report of the values.
int d_start_speed_tics_sec
vrpn_Serial_Analog(const char *name, vrpn_Connection *connection, const char *port, int baud=9600, int bits=8, vrpn_SER_PARITY parity=vrpn_SER_PARITY_NONE, bool rts_flow=false)
This structure is what is passed to a vrpn_Connection message callback.
const vrpn_uint32 vrpn_CONNECTION_RELIABLE
Classes of service for messages, specify multiple by ORing them together Priority of satisfying these...