SOEM  v1.4.0
Functions | Variables
slaveinfo.c File Reference

Example code for Simple Open EtherCAT master. More...

#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include "ethercat.h"

Functions

char * dtype2string (uint16 dtype)
 
char * SDO2string (uint16 slave, uint16 index, uint8 subidx, uint16 dtype)
 
int si_PDOassign (uint16 slave, uint16 PDOassign, int mapoffset, int bitoffset)
 
int si_map_sdo (int slave)
 
int si_siiPDO (uint16 slave, uint8 t, int mapoffset, int bitoffset)
 
int si_map_sii (int slave)
 
void si_sdo (int cnt)
 
void slaveinfo (char *ifname)
 
int main (int argc, char *argv[])
 

Variables

char IOmap [4096]
 
ec_ODlistt ODlist
 
ec_OElistt OElist
 
boolean printSDO = FALSE
 
boolean printMAP = FALSE
 
char usdo [128]
 
char hstr [1024]
 
char ifbuf [1024]
 

Detailed Description

Example code for Simple Open EtherCAT master.

Usage : slaveinfo [ifname] [-sdo] [-map] Ifname is NIC interface, f.e. eth0. Optional -sdo to display CoE object dictionary. Optional -map to display slave PDO mapping

This shows the configured slave data.

(c)Arthur Ketels 2010 - 2011

Function Documentation

◆ dtype2string()

char* dtype2string ( uint16  dtype)

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ SDO2string()

char* SDO2string ( uint16  slave,
uint16  index,
uint8  subidx,
uint16  dtype 
)

◆ si_map_sdo()

int si_map_sdo ( int  slave)

◆ si_map_sii()

int si_map_sii ( int  slave)

◆ si_PDOassign()

int si_PDOassign ( uint16  slave,
uint16  PDOassign,
int  mapoffset,
int  bitoffset 
)

Read PDO assign structure

◆ si_sdo()

void si_sdo ( int  cnt)

◆ si_siiPDO()

int si_siiPDO ( uint16  slave,
uint8  t,
int  mapoffset,
int  bitoffset 
)

◆ slaveinfo()

void slaveinfo ( char *  ifname)

Variable Documentation

◆ hstr

char hstr[1024]

◆ ifbuf

char ifbuf[1024]

◆ IOmap

char IOmap[4096]

◆ ODlist

ec_ODlistt ODlist

◆ OElist

ec_OElistt OElist

◆ printMAP

boolean printMAP = FALSE

◆ printSDO

boolean printSDO = FALSE

◆ usdo

char usdo[128]