#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <sys/resource.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <pthread.h>
#include <igh_eml/ecrt.h>
#include "realtime.h"
Go to the source code of this file.
Defines | |
#define | BM3411 0x0000015a, 0x03010001 |
#define | CONFIGURE_PDOS 1 |
#define | EXTERNAL_MEMORY 1 |
#define | FREQUENCY 1000 |
#define | M0SlavePos 0, 0 |
#define | M1SlavePos 0, 1 |
#define | M2SlavePos 0, 2 |
#define | M3SlavePos 0, 3 |
#define | SDO_ACCESS 0 |
Functions | |
void | check_domain1_state (void) |
void | check_master_state (void) |
void | check_slave_config_states (void) |
void | cyclic_task () |
static void | enforce_max_velocities (omniwrite_t *t) |
struct omniread | omni_read_data () |
void | omni_write_data (struct omniwrite data) |
void * | realtimeMain (void *udata) |
int | start_omni_realtime (int max_vel) |
static void | stop_motors (void) |
void | stop_omni_realtime (void) |
static void | timespecInc (struct timespec *tick, int nsec) |
Variables | |
static unsigned int | counter = 0 |
static omniread_t | cur |
static omniread_t | cur_buffer |
static ec_domain_t * | domain1 = NULL |
static uint8_t * | domain1_pd |
static const ec_pdo_entry_reg_t | domain1_regs [] |
static ec_domain_state_t | domain1_state |
static int | exiting = 0 |
static ec_pdo_entry_info_t | foo_pdo_entries [] |
static ec_pdo_info_t | foo_pdos [] |
static ec_sync_info_t | foo_syncs [] |
static ec_master_t * | master = NULL |
static ec_master_state_t | master_state |
static int | max_v = 100 |
static int | misses = 0 |
static pthread_mutex_t | mutex = PTHREAD_MUTEX_INITIALIZER |
static unsigned int | off_actual_position [4] |
static unsigned int | off_actual_velocity [4] |
static unsigned int | off_pos_ctrlr_output [4] |
static unsigned int | off_speed_ctrlr_output [4] |
static unsigned int | off_statusword [4] |
static unsigned int | off_target_position [4] |
static unsigned int | off_target_velocity [4] |
static unsigned int | off_torque_actual_value [4] |
static unsigned int | off_torque_add_value [4] |
static char | prevent_set_position = 0 |
static ec_slave_config_t * | sc [4] |
static ec_slave_config_state_t | sc_state [4] |
static omniwrite_t | tar |
static omniwrite_t | tar_buffer |
static pthread_t | thread |
#define BM3411 0x0000015a, 0x03010001 |
Definition at line 80 of file realtime.c.
#define CONFIGURE_PDOS 1 |
Definition at line 46 of file realtime.c.
#define EXTERNAL_MEMORY 1 |
Definition at line 47 of file realtime.c.
#define FREQUENCY 1000 |
Definition at line 43 of file realtime.c.
#define M0SlavePos 0, 0 |
Definition at line 74 of file realtime.c.
#define M1SlavePos 0, 1 |
Definition at line 75 of file realtime.c.
#define M2SlavePos 0, 2 |
Definition at line 76 of file realtime.c.
#define M3SlavePos 0, 3 |
Definition at line 77 of file realtime.c.
#define SDO_ACCESS 0 |
Definition at line 48 of file realtime.c.
void check_domain1_state | ( | void | ) |
Definition at line 192 of file realtime.c.
void check_master_state | ( | void | ) |
Definition at line 212 of file realtime.c.
void check_slave_config_states | ( | void | ) |
Definition at line 235 of file realtime.c.
void cyclic_task | ( | ) |
Definition at line 262 of file realtime.c.
static void enforce_max_velocities | ( | omniwrite_t * | t | ) | [static] |
Definition at line 331 of file realtime.c.
struct omniread omni_read_data | ( | ) | [read] |
Definition at line 532 of file realtime.c.
void omni_write_data | ( | struct omniwrite | data | ) |
Definition at line 524 of file realtime.c.
void* realtimeMain | ( | void * | udata | ) |
Definition at line 372 of file realtime.c.
int start_omni_realtime | ( | int | max_vel | ) |
Definition at line 421 of file realtime.c.
static void stop_motors | ( | void | ) | [static] |
Definition at line 346 of file realtime.c.
void stop_omni_realtime | ( | void | ) |
Definition at line 506 of file realtime.c.
static void timespecInc | ( | struct timespec * | tick, |
int | nsec | ||
) | [static] |
Definition at line 361 of file realtime.c.
unsigned int counter = 0 [static] |
Definition at line 150 of file realtime.c.
omniread_t cur [static] |
Definition at line 155 of file realtime.c.
omniread_t cur_buffer [static] |
Definition at line 155 of file realtime.c.
Definition at line 55 of file realtime.c.
uint8_t* domain1_pd [static] |
Definition at line 71 of file realtime.c.
const ec_pdo_entry_reg_t domain1_regs[] [static] |
Definition at line 98 of file realtime.c.
ec_domain_state_t domain1_state [static] |
Definition at line 56 of file realtime.c.
int exiting = 0 [static] |
Definition at line 64 of file realtime.c.
ec_pdo_entry_info_t foo_pdo_entries[] [static] |
{ {0x4169, 0, 32}, {0x6042, 0, 16}, {0x43fe, 0, 16}, {0x6041, 0, 16}, {0x415F, 0, 16}, {0x416a, 0, 32}, {0x606c, 0, 32}, {0x414d, 0, 16}, }
Definition at line 160 of file realtime.c.
ec_pdo_info_t foo_pdos[] [static] |
{ {0x1600, 3, foo_pdo_entries}, {0x1a00, 5, foo_pdo_entries + 3}, }
Definition at line 176 of file realtime.c.
ec_sync_info_t foo_syncs[] [static] |
{ {2 , EC_DIR_OUTPUT, 1, foo_pdos, EC_WD_DISABLE}, {3 , EC_DIR_INPUT, 1, foo_pdos + 1, EC_WD_DISABLE}, {0xff , 0, 0, 0, EC_WD_DISABLE} }
Definition at line 182 of file realtime.c.
Definition at line 52 of file realtime.c.
ec_master_state_t master_state [static] |
Definition at line 53 of file realtime.c.
int max_v = 100 [static] |
Definition at line 152 of file realtime.c.
int misses = 0 [static] |
Definition at line 66 of file realtime.c.
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER [static] |
Definition at line 63 of file realtime.c.
unsigned int off_actual_position[4] [static] |
Definition at line 89 of file realtime.c.
unsigned int off_actual_velocity[4] [static] |
Definition at line 90 of file realtime.c.
unsigned int off_pos_ctrlr_output[4] [static] |
Definition at line 95 of file realtime.c.
unsigned int off_speed_ctrlr_output[4] [static] |
Definition at line 88 of file realtime.c.
unsigned int off_statusword[4] [static] |
Definition at line 87 of file realtime.c.
unsigned int off_target_position[4] [static] |
Definition at line 94 of file realtime.c.
unsigned int off_target_velocity[4] [static] |
Definition at line 84 of file realtime.c.
unsigned int off_torque_actual_value[4] [static] |
Definition at line 92 of file realtime.c.
unsigned int off_torque_add_value[4] [static] |
Definition at line 93 of file realtime.c.
char prevent_set_position = 0 [static] |
Definition at line 61 of file realtime.c.
ec_slave_config_t* sc[4] [static] |
Definition at line 58 of file realtime.c.
ec_slave_config_state_t sc_state[4] [static] |
Definition at line 59 of file realtime.c.
omniwrite_t tar [static] |
Definition at line 154 of file realtime.c.
omniwrite_t tar_buffer [static] |
Definition at line 154 of file realtime.c.
pthread_t thread [static] |
Definition at line 65 of file realtime.c.