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

◆ CHECK_JOINT_ID

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

Definition at line 38 of file iob.cpp.

◆ CHECK_JOINT_ID_DOF

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

Definition at line 39 of file iob.cpp.

◆ JID_INVALID

#define JID_INVALID   -2

Definition at line 33 of file iob.cpp.

Function Documentation

◆ close_iob()

int close_iob ( void  )

Definition at line 558 of file iob.cpp.

◆ get_signal_period()

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.

◆ initializeJointAngle()

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

Definition at line 681 of file iob.cpp.

◆ length_digital_input()

int length_digital_input ( )

Definition at line 697 of file iob.cpp.

◆ length_digital_output()

int length_digital_output ( )

Definition at line 721 of file iob.cpp.

◆ length_of_extra_servo_state()

size_t length_of_extra_servo_state ( int  id)

Definition at line 388 of file iob.cpp.

◆ lock_iob()

int lock_iob ( )

Definition at line 587 of file iob.cpp.

◆ number_of_accelerometers()

int number_of_accelerometers ( )

Definition at line 85 of file iob.cpp.

◆ number_of_attitude_sensors()

int number_of_attitude_sensors ( )

Definition at line 99 of file iob.cpp.

◆ number_of_force_sensors()

int number_of_force_sensors ( )

Definition at line 57 of file iob.cpp.

◆ number_of_gyro_sensors()

int number_of_gyro_sensors ( )

Definition at line 71 of file iob.cpp.

◆ number_of_joints()

int number_of_joints ( )

Definition at line 43 of file iob.cpp.

◆ number_of_substeps()

int number_of_substeps ( )

Definition at line 629 of file iob.cpp.

◆ open_iob()

int open_iob ( void  )

Definition at line 501 of file iob.cpp.

◆ read_accelerometer()

int read_accelerometer ( int  id,
double *  accels 
)

Definition at line 446 of file iob.cpp.

◆ read_accelerometer_offset()

int read_accelerometer_offset ( int  id,
double *  offset 
)

Definition at line 453 of file iob.cpp.

◆ read_actual_angle()

int read_actual_angle ( int  id,
double *  angle 
)

Definition at line 107 of file iob.cpp.

◆ read_actual_angles()

int read_actual_angles ( double *  angles)

Definition at line 117 of file iob.cpp.

◆ read_actual_torque()

int read_actual_torque ( int  id,
double *  angle 
)

Definition at line 207 of file iob.cpp.

◆ read_actual_torques()

int read_actual_torques ( double *  torques)

Definition at line 214 of file iob.cpp.

◆ read_actual_velocities()

int read_actual_velocities ( double *  vels)

Definition at line 344 of file iob.cpp.

◆ read_actual_velocity()

int read_actual_velocity ( int  id,
double *  vel 
)

Definition at line 318 of file iob.cpp.

◆ read_angle_offset()

int read_angle_offset ( int  id,
double *  angle 
)

Definition at line 127 of file iob.cpp.

◆ read_attitude_sensor()

int read_attitude_sensor ( int  id,
double *  att 
)

Definition at line 467 of file iob.cpp.

◆ read_calib_state()

int read_calib_state ( int  id,
int s 
)

Definition at line 378 of file iob.cpp.

◆ read_command_angle()

int read_command_angle ( int  id,
double *  angle 
)

Definition at line 248 of file iob.cpp.

◆ read_command_angles()

int read_command_angles ( double *  angles)

Definition at line 258 of file iob.cpp.

◆ read_command_torque()

int read_command_torque ( int  id,
double *  torque 
)

Definition at line 221 of file iob.cpp.

◆ read_command_torques()

int read_command_torques ( double *  torques)

Definition at line 235 of file iob.cpp.

◆ read_command_velocities()

int read_command_velocities ( double *  vels)

Definition at line 339 of file iob.cpp.

◆ read_command_velocity()

int read_command_velocity ( int  id,
double *  vel 
)

Definition at line 325 of file iob.cpp.

◆ read_control_mode()

int read_control_mode ( int  id,
joint_control_mode s 
)

Definition at line 193 of file iob.cpp.

◆ read_dgain()

int read_dgain ( int  id,
double *  gain 
)

Definition at line 302 of file iob.cpp.

◆ read_digital_input()

int read_digital_input ( char *  dIn)

Definition at line 689 of file iob.cpp.

◆ read_digital_output()

int read_digital_output ( char *  doutput)

Definition at line 729 of file iob.cpp.

◆ read_driver_temperature()

int read_driver_temperature ( int  id,
unsigned char *  v 
)

Definition at line 368 of file iob.cpp.

◆ read_extra_servo_state()

int read_extra_servo_state ( int  id,
int state 
)

Definition at line 395 of file iob.cpp.

◆ read_force_offset()

int read_force_offset ( int  id,
double *  offsets 
)

Definition at line 409 of file iob.cpp.

◆ read_force_sensor()

int read_force_sensor ( int  id,
double *  forces 
)

Definition at line 402 of file iob.cpp.

◆ read_gyro_sensor()

int read_gyro_sensor ( int  id,
double *  rates 
)

Definition at line 424 of file iob.cpp.

◆ read_gyro_sensor_offset()

int read_gyro_sensor_offset ( int  id,
double *  offset 
)

Definition at line 431 of file iob.cpp.

◆ read_iob_frame()

unsigned long long read_iob_frame ( )

Definition at line 618 of file iob.cpp.

◆ read_lock_owner()

int read_lock_owner ( pid_t pid)

Definition at line 607 of file iob.cpp.

◆ read_pgain()

int read_pgain ( int  id,
double *  gain 
)

Definition at line 288 of file iob.cpp.

◆ read_power()

int read_power ( double *  voltage,
double *  current 
)

Definition at line 481 of file iob.cpp.

◆ read_power_command()

int read_power_command ( int  id,
int com 
)

Definition at line 163 of file iob.cpp.

◆ read_power_state()

int read_power_state ( int  id,
int s 
)

Definition at line 143 of file iob.cpp.

◆ read_servo_alarm()

int read_servo_alarm ( int  id,
int a 
)

Definition at line 183 of file iob.cpp.

◆ read_servo_state()

int read_servo_state ( int  id,
int s 
)

Definition at line 173 of file iob.cpp.

◆ read_temperature()

int read_temperature ( int  id,
double *  v 
)

Definition at line 492 of file iob.cpp.

◆ reset_body()

int reset_body ( void  )

Definition at line 578 of file iob.cpp.

◆ set_number_of_accelerometers()

int set_number_of_accelerometers ( int  num)

Definition at line 92 of file iob.cpp.

◆ set_number_of_force_sensors()

int set_number_of_force_sensors ( int  num)

Definition at line 64 of file iob.cpp.

◆ set_number_of_gyro_sensors()

int set_number_of_gyro_sensors ( int  num)

Definition at line 78 of file iob.cpp.

◆ set_number_of_joints()

int set_number_of_joints ( int  num)

Definition at line 50 of file iob.cpp.

◆ set_signal_period()

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.

◆ unlock_iob()

int unlock_iob ( )

Definition at line 598 of file iob.cpp.

◆ wait_for_iob_signal()

int wait_for_iob_signal ( )

Definition at line 640 of file iob.cpp.

◆ write_accelerometer_offset()

int write_accelerometer_offset ( int  id,
double *  offset 
)

Definition at line 460 of file iob.cpp.

◆ write_angle_offset()

int write_angle_offset ( int  id,
double  angle 
)

Definition at line 134 of file iob.cpp.

◆ write_attitude_sensor_offset()

int write_attitude_sensor_offset ( int  id,
double *  offset 
)

Definition at line 474 of file iob.cpp.

◆ write_command_angle()

int write_command_angle ( int  id,
double  angle 
)

Definition at line 268 of file iob.cpp.

◆ write_command_angles()

int write_command_angles ( const double *  angles)

Definition at line 278 of file iob.cpp.

◆ write_command_torque()

int write_command_torque ( int  id,
double  torque 
)

Definition at line 228 of file iob.cpp.

◆ write_command_torques()

int write_command_torques ( const double *  torques)

Definition at line 240 of file iob.cpp.

◆ write_command_velocities()

int write_command_velocities ( const double *  vels)

Definition at line 351 of file iob.cpp.

◆ write_command_velocity()

int write_command_velocity ( int  id,
double  vel 
)

Definition at line 332 of file iob.cpp.

◆ write_control_mode()

int write_control_mode ( int  id,
joint_control_mode  s 
)

Definition at line 200 of file iob.cpp.

◆ write_dgain()

int write_dgain ( int  id,
double  gain 
)

Definition at line 310 of file iob.cpp.

◆ write_digital_output()

int write_digital_output ( const char *  doutput)

Definition at line 705 of file iob.cpp.

◆ write_digital_output_with_mask()

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

Definition at line 713 of file iob.cpp.

◆ write_force_offset()

int write_force_offset ( int  id,
double *  offsets 
)

Definition at line 416 of file iob.cpp.

◆ write_gyro_sensor_offset()

int write_gyro_sensor_offset ( int  id,
double *  offset 
)

Definition at line 438 of file iob.cpp.

◆ write_pgain()

int write_pgain ( int  id,
double  gain 
)

Definition at line 295 of file iob.cpp.

◆ write_power_command()

int write_power_command ( int  id,
int  com 
)

Definition at line 153 of file iob.cpp.

◆ write_servo()

int write_servo ( int  id,
int  com 
)

Definition at line 358 of file iob.cpp.

Variable Documentation

◆ nxifv1

NEXTAGE_OPEN::OpenIFv10* nxifv1 = NULL
static

Definition at line 36 of file iob.cpp.

◆ openLock

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 Mon Feb 28 2022 23:45:15