Macros | Functions | Variables
iob.cpp File Reference
#include <cstdio>
#include <dlfcn.h>
#include <unistd.h>
#include <pthread.h>
#include <hrpsys/io/iob.h>
#include <nextage-open.hpp>
Include dependency graph for iob.cpp:

Go to the source code of this file.

Macros

#define CHECK_JOINT_ID(id)   if((id) < 0 || (id) >= number_of_joints()) return E_ID
 
#define CHECK_JOINT_ID_DOF(id)   if((id) < 0 || (id) >= DOF) return E_ID
 
#define JID_INVALID   -2
 

Functions

int close_iob (void)
 
long get_signal_period ()
 get the period of signals issued by wait_for_iob_signal() More...
 
int initializeJointAngle (const char *name, const char *option)
 
int length_digital_input ()
 
int length_digital_output ()
 
size_t length_of_extra_servo_state (int id)
 
int lock_iob ()
 
int number_of_accelerometers ()
 
int number_of_attitude_sensors ()
 
int number_of_force_sensors ()
 
int number_of_gyro_sensors ()
 
int number_of_joints ()
 
int number_of_substeps ()
 
int open_iob (void)
 
int read_accelerometer (int id, double *accels)
 
int read_accelerometer_offset (int id, double *offset)
 
int read_actual_angle (int id, double *angle)
 
int read_actual_angles (double *angles)
 
int read_actual_torque (int id, double *angle)
 
int read_actual_torques (double *torques)
 
int read_actual_velocities (double *vels)
 
int read_actual_velocity (int id, double *vel)
 
int read_angle_offset (int id, double *angle)
 
int read_attitude_sensor (int id, double *att)
 
int read_calib_state (int id, int *s)
 
int read_command_angle (int id, double *angle)
 
int read_command_angles (double *angles)
 
int read_command_torque (int id, double *torque)
 
int read_command_torques (double *torques)
 
int read_command_velocities (double *vels)
 
int read_command_velocity (int id, double *vel)
 
int read_control_mode (int id, joint_control_mode *s)
 
int read_dgain (int id, double *gain)
 
int read_digital_input (char *dIn)
 
int read_digital_output (char *doutput)
 
int read_driver_temperature (int id, unsigned char *v)
 
int read_extra_servo_state (int id, int *state)
 
int read_force_offset (int id, double *offsets)
 
int read_force_sensor (int id, double *forces)
 
int read_gyro_sensor (int id, double *rates)
 
int read_gyro_sensor_offset (int id, double *offset)
 
unsigned long long read_iob_frame ()
 
int read_lock_owner (pid_t *pid)
 
int read_pgain (int id, double *gain)
 
int read_power (double *voltage, double *current)
 
int read_power_command (int id, int *com)
 
int read_power_state (int id, int *s)
 
int read_servo_alarm (int id, int *a)
 
int read_servo_state (int id, int *s)
 
int read_temperature (int id, double *v)
 
int reset_body (void)
 
int set_number_of_accelerometers (int num)
 
int set_number_of_force_sensors (int num)
 
int set_number_of_gyro_sensors (int num)
 
int set_number_of_joints (int num)
 
int set_signal_period (long period_ns)
 set the period of signals issued by wait_for_iob_signal() More...
 
int unlock_iob ()
 
int wait_for_iob_signal ()
 
int write_accelerometer_offset (int id, double *offset)
 
int write_angle_offset (int id, double angle)
 
int write_attitude_sensor_offset (int id, double *offset)
 
int write_command_angle (int id, double angle)
 
int write_command_angles (const double *angles)
 
int write_command_torque (int id, double torque)
 
int write_command_torques (const double *torques)
 
int write_command_velocities (const double *vels)
 
int write_command_velocity (int id, double vel)
 
int write_control_mode (int id, joint_control_mode s)
 
int write_dgain (int id, double gain)
 
int write_digital_output (const char *doutput)
 
int write_digital_output_with_mask (const char *doutput, const char *mask)
 
int write_force_offset (int id, double *offsets)
 
int write_gyro_sensor_offset (int id, double *offset)
 
int write_pgain (int id, double gain)
 
int write_power_command (int id, int com)
 
int write_servo (int id, int com)
 

Variables

static NEXTAGE_OPEN::OpenIFv10nxifv1 = NULL
 
static pthread_mutex_t openLock = PTHREAD_MUTEX_INITIALIZER
 

Macro Definition Documentation

#define CHECK_JOINT_ID (   id)    if((id) < 0 || (id) >= number_of_joints()) return E_ID

Definition at line 38 of file iob.cpp.

#define CHECK_JOINT_ID_DOF (   id)    if((id) < 0 || (id) >= DOF) return E_ID

Definition at line 39 of file iob.cpp.

#define JID_INVALID   -2

Definition at line 33 of file iob.cpp.

Function Documentation

int close_iob ( void  )

Definition at line 558 of file iob.cpp.

long get_signal_period ( )

get the period of signals issued by wait_for_iob_signal()

Returns
the period of signals[ns]

Definition at line 662 of file iob.cpp.

int initializeJointAngle ( const char *  name,
const char *  option 
)

Definition at line 681 of file iob.cpp.

int length_digital_input ( )

Definition at line 697 of file iob.cpp.

int length_digital_output ( )

Definition at line 721 of file iob.cpp.

size_t length_of_extra_servo_state ( int  id)

Definition at line 388 of file iob.cpp.

int lock_iob ( )

Definition at line 587 of file iob.cpp.

int number_of_accelerometers ( )

Definition at line 85 of file iob.cpp.

int number_of_attitude_sensors ( )

Definition at line 99 of file iob.cpp.

int number_of_force_sensors ( )

Definition at line 57 of file iob.cpp.

int number_of_gyro_sensors ( )

Definition at line 71 of file iob.cpp.

int number_of_joints ( )

Definition at line 43 of file iob.cpp.

int number_of_substeps ( )

Definition at line 629 of file iob.cpp.

int open_iob ( void  )

Definition at line 501 of file iob.cpp.

int read_accelerometer ( int  id,
double *  accels 
)

Definition at line 446 of file iob.cpp.

int read_accelerometer_offset ( int  id,
double *  offset 
)

Definition at line 453 of file iob.cpp.

int read_actual_angle ( int  id,
double *  angle 
)

Definition at line 107 of file iob.cpp.

int read_actual_angles ( double *  angles)

Definition at line 117 of file iob.cpp.

int read_actual_torque ( int  id,
double *  angle 
)

Definition at line 207 of file iob.cpp.

int read_actual_torques ( double *  torques)

Definition at line 214 of file iob.cpp.

int read_actual_velocities ( double *  vels)

Definition at line 344 of file iob.cpp.

int read_actual_velocity ( int  id,
double *  vel 
)

Definition at line 318 of file iob.cpp.

int read_angle_offset ( int  id,
double *  angle 
)

Definition at line 127 of file iob.cpp.

int read_attitude_sensor ( int  id,
double *  att 
)

Definition at line 467 of file iob.cpp.

int read_calib_state ( int  id,
int s 
)

Definition at line 378 of file iob.cpp.

int read_command_angle ( int  id,
double *  angle 
)

Definition at line 248 of file iob.cpp.

int read_command_angles ( double *  angles)

Definition at line 258 of file iob.cpp.

int read_command_torque ( int  id,
double *  torque 
)

Definition at line 221 of file iob.cpp.

int read_command_torques ( double *  torques)

Definition at line 235 of file iob.cpp.

int read_command_velocities ( double *  vels)

Definition at line 339 of file iob.cpp.

int read_command_velocity ( int  id,
double *  vel 
)

Definition at line 325 of file iob.cpp.

int read_control_mode ( int  id,
joint_control_mode s 
)

Definition at line 193 of file iob.cpp.

int read_dgain ( int  id,
double *  gain 
)

Definition at line 302 of file iob.cpp.

int read_digital_input ( char *  dIn)

Definition at line 689 of file iob.cpp.

int read_digital_output ( char *  doutput)

Definition at line 729 of file iob.cpp.

int read_driver_temperature ( int  id,
unsigned char *  v 
)

Definition at line 368 of file iob.cpp.

int read_extra_servo_state ( int  id,
int state 
)

Definition at line 395 of file iob.cpp.

int read_force_offset ( int  id,
double *  offsets 
)

Definition at line 409 of file iob.cpp.

int read_force_sensor ( int  id,
double *  forces 
)

Definition at line 402 of file iob.cpp.

int read_gyro_sensor ( int  id,
double *  rates 
)

Definition at line 424 of file iob.cpp.

int read_gyro_sensor_offset ( int  id,
double *  offset 
)

Definition at line 431 of file iob.cpp.

unsigned long long read_iob_frame ( )

Definition at line 618 of file iob.cpp.

int read_lock_owner ( pid_t pid)

Definition at line 607 of file iob.cpp.

int read_pgain ( int  id,
double *  gain 
)

Definition at line 288 of file iob.cpp.

int read_power ( double *  voltage,
double *  current 
)

Definition at line 481 of file iob.cpp.

int read_power_command ( int  id,
int com 
)

Definition at line 163 of file iob.cpp.

int read_power_state ( int  id,
int s 
)

Definition at line 143 of file iob.cpp.

int read_servo_alarm ( int  id,
int a 
)

Definition at line 183 of file iob.cpp.

int read_servo_state ( int  id,
int s 
)

Definition at line 173 of file iob.cpp.

int read_temperature ( int  id,
double *  v 
)

Definition at line 492 of file iob.cpp.

int reset_body ( void  )

Definition at line 578 of file iob.cpp.

int set_number_of_accelerometers ( int  num)

Definition at line 92 of file iob.cpp.

int set_number_of_force_sensors ( int  num)

Definition at line 64 of file iob.cpp.

int set_number_of_gyro_sensors ( int  num)

Definition at line 78 of file iob.cpp.

int set_number_of_joints ( int  num)

Definition at line 50 of file iob.cpp.

int set_signal_period ( long  period_ns)

set the period of signals issued by wait_for_iob_signal()

Parameters
period_nsthe period of signals[ns]
Returns
TRUE if set successfully, FALSE otherwise

Definition at line 653 of file iob.cpp.

int unlock_iob ( )

Definition at line 598 of file iob.cpp.

int wait_for_iob_signal ( )

Definition at line 640 of file iob.cpp.

int write_accelerometer_offset ( int  id,
double *  offset 
)

Definition at line 460 of file iob.cpp.

int write_angle_offset ( int  id,
double  angle 
)

Definition at line 134 of file iob.cpp.

int write_attitude_sensor_offset ( int  id,
double *  offset 
)

Definition at line 474 of file iob.cpp.

int write_command_angle ( int  id,
double  angle 
)

Definition at line 268 of file iob.cpp.

int write_command_angles ( const double *  angles)

Definition at line 278 of file iob.cpp.

int write_command_torque ( int  id,
double  torque 
)

Definition at line 228 of file iob.cpp.

int write_command_torques ( const double *  torques)

Definition at line 240 of file iob.cpp.

int write_command_velocities ( const double *  vels)

Definition at line 351 of file iob.cpp.

int write_command_velocity ( int  id,
double  vel 
)

Definition at line 332 of file iob.cpp.

int write_control_mode ( int  id,
joint_control_mode  s 
)

Definition at line 200 of file iob.cpp.

int write_dgain ( int  id,
double  gain 
)

Definition at line 310 of file iob.cpp.

int write_digital_output ( const char *  doutput)

Definition at line 705 of file iob.cpp.

int write_digital_output_with_mask ( const char *  doutput,
const char *  mask 
)

Definition at line 713 of file iob.cpp.

int write_force_offset ( int  id,
double *  offsets 
)

Definition at line 416 of file iob.cpp.

int write_gyro_sensor_offset ( int  id,
double *  offset 
)

Definition at line 438 of file iob.cpp.

int write_pgain ( int  id,
double  gain 
)

Definition at line 295 of file iob.cpp.

int write_power_command ( int  id,
int  com 
)

Definition at line 153 of file iob.cpp.

int write_servo ( int  id,
int  com 
)

Definition at line 358 of file iob.cpp.

Variable Documentation

NEXTAGE_OPEN::OpenIFv10* nxifv1 = NULL
static

Definition at line 36 of file iob.cpp.

pthread_mutex_t openLock = PTHREAD_MUTEX_INITIALIZER
static

Definition at line 498 of file iob.cpp.



hironx_ros_bridge
Author(s): Kei Okada , Isaac I.Y. Saito
autogenerated on Thu May 14 2020 03:52:05