Classes | Defines | Functions | Variables
ethercatconfig.c File Reference

Configuration module for EtherCAT master. More...

#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <unistd.h>
#include <youbot_driver/soem/ethercattype.h>
#include <youbot_driver/soem/nicdrv.h>
#include <youbot_driver/soem/ethercatbase.h>
#include <youbot_driver/soem/ethercatmain.h>
#include <youbot_driver/soem/ethercatcoe.h>
#include <youbot_driver/soem/ethercatsoe.h>
#include <youbot_driver/soem/ethercatconfig.h>
#include <youbot_driver/soem/ethercatconfiglist.h>
Include dependency graph for ethercatconfig.c:

Go to the source code of this file.

Classes

struct  ec_configlist_t

Defines

#define EC_DEFAULTDOSM0   0x00010044
#define EC_DEFAULTMBXSM0   0x00010026
#define EC_DEFAULTMBXSM1   0x00010022
#define EC_PRINT(...)   do {} while (0)

Functions

int ec_config (uint8 usetable, void *pIOmap)
int ec_config_init (uint8 usetable)
int ec_config_map (void *pIOmap)
int ec_config_map_group (void *pIOmap, uint8 group)
int ec_findconfig (uint32 man, uint32 id)
int ec_reconfig_slave (uint16 slave)
int ec_recover_slave (uint16 slave)

Variables

static ec_eepromFMMUt ec_FMMU
static ec_eepromSMt ec_SM

Detailed Description

Configuration module for EtherCAT master.

After successful initialisation with ec_init() or ec_init_redundant() the slaves can be auto configured with this module.

Definition in file ethercatconfig.c.


Define Documentation

#define EC_DEFAULTDOSM0   0x00010044

standard SM0 flags configuration for digital output slaves

Definition at line 106 of file ethercatconfig.c.

#define EC_DEFAULTMBXSM0   0x00010026

standard SM0 flags configuration for mailbox slaves

Definition at line 102 of file ethercatconfig.c.

#define EC_DEFAULTMBXSM1   0x00010022

standard SM1 flags configuration for mailbox slaves

Definition at line 104 of file ethercatconfig.c.

#define EC_PRINT (   ...)    do {} while (0)

Definition at line 67 of file ethercatconfig.c.


Function Documentation

int ec_config ( uint8  usetable,
void *  pIOmap 
)

Enumerate / map and init all slaves.

Parameters:
[in]usetable= TRUE when using configtable to init slaves, FALSE otherwise
[out]pIOmap= pointer to IOmap
Returns:
Workcounter of slave discover datagram = number of slaves found

Definition at line 909 of file ethercatconfig.c.

int ec_config_init ( uint8  usetable)

Enumerate and init all slaves.

Parameters:
[in]usetable= TRUE when using configtable to init slaves, FALSE otherwise
Returns:
Workcounter of slave discover datagram = number of slaves found

Definition at line 138 of file ethercatconfig.c.

int ec_config_map ( void *  pIOmap)

Map all PDOs from slaves to IOmap.

Parameters:
[out]pIOmap= pointer to IOmap
Returns:
IOmap size

Definition at line 898 of file ethercatconfig.c.

int ec_config_map_group ( void *  pIOmap,
uint8  group 
)

Map all PDOs in one group of slaves to IOmap.

Parameters:
[out]pIOmap= pointer to IOmap
[in]group= group to map, 0 = all groups
Returns:
IOmap size

Definition at line 471 of file ethercatconfig.c.

int ec_findconfig ( uint32  man,
uint32  id 
)

Find slave in standard configuration list ec_configlist[]

Parameters:
[in]man= manufacturer
[in]id= ID
Returns:
index in ec_configlist[] when found, otherwise 0

Definition at line 119 of file ethercatconfig.c.

int ec_reconfig_slave ( uint16  slave)

Reconfigure slave.

Parameters:
[in]slave= slave to reconfigure
Returns:
Slave state

Definition at line 964 of file ethercatconfig.c.

int ec_recover_slave ( uint16  slave)

Recover slave.

Parameters:
[in]slave= slave to recover
Returns:
>0 if successful

Definition at line 923 of file ethercatconfig.c.


Variable Documentation

buffer for EEPROM FMMU data

Definition at line 111 of file ethercatconfig.c.

ec_eepromSMt ec_SM [static]

buffer for EEPROM SM data

Definition at line 109 of file ethercatconfig.c.



youbot_driver
Author(s): Jan Paulus
autogenerated on Mon Oct 6 2014 09:08:03