Classes | Macros | Typedefs | Functions
ethercatfoe.c File Reference

File over EtherCAT (FoE) module. More...

#include <stdio.h>
#include <string.h>
#include "osal.h"
#include "oshw.h"
#include "ethercattype.h"
#include "ethercatbase.h"
#include "ethercatmain.h"
#include "ethercatfoe.h"
Include dependency graph for ethercatfoe.c:

Go to the source code of this file.

Classes

struct  PACKED
 

Macros

#define EC_MAXFOEDATA   512
 

Typedefs

typedef PACKED_BEGIN struct PACKED ec_FOEt
 

Functions

int ec_FOEdefinehook (void *hook)
 
int ec_FOEread (uint16 slave, char *filename, uint32 password, int *psize, void *p, int timeout)
 
int ec_FOEwrite (uint16 slave, char *filename, uint32 password, int psize, void *p, int timeout)
 
PACKED_END int ecx_FOEdefinehook (ecx_contextt *context, void *hook)
 
int ecx_FOEread (ecx_contextt *context, uint16 slave, char *filename, uint32 password, int *psize, void *p, int timeout)
 
int ecx_FOEwrite (ecx_contextt *context, uint16 slave, char *filename, uint32 password, int psize, void *p, int timeout)
 

Detailed Description

File over EtherCAT (FoE) module.

SDO read / write and SDO service functions

Definition in file ethercatfoe.c.

Macro Definition Documentation

◆ EC_MAXFOEDATA

#define EC_MAXFOEDATA   512

Definition at line 22 of file ethercatfoe.c.

Typedef Documentation

◆ ec_FOEt

typedef PACKED_BEGIN struct PACKED ec_FOEt

FOE structure. Used for Read, Write, Data, Ack and Error mailbox packets.

Function Documentation

◆ ec_FOEdefinehook()

int ec_FOEdefinehook ( void *  hook)

Definition at line 356 of file ethercatfoe.c.

◆ ec_FOEread()

int ec_FOEread ( uint16  slave,
char *  filename,
uint32  password,
int *  psize,
void *  p,
int  timeout 
)

Definition at line 361 of file ethercatfoe.c.

◆ ec_FOEwrite()

int ec_FOEwrite ( uint16  slave,
char *  filename,
uint32  password,
int  psize,
void *  p,
int  timeout 
)

Definition at line 366 of file ethercatfoe.c.

◆ ecx_FOEdefinehook()

PACKED_END int ecx_FOEdefinehook ( ecx_contextt context,
void *  hook 
)

FoE progress hook.

Parameters
[in]context= context struct
[in]hook= Pointer to hook function.
Returns
1

Definition at line 54 of file ethercatfoe.c.

◆ ecx_FOEread()

int ecx_FOEread ( ecx_contextt context,
uint16  slave,
char *  filename,
uint32  password,
int *  psize,
void *  p,
int  timeout 
)

FoE read, blocking.

Parameters
[in]context= context struct
[in]slave= Slave number.
[in]filename= Filename of file to read.
[in]password= password.
[in,out]psize= Size in bytes of file buffer, returns bytes read from file.
[out]p= Pointer to file buffer
[in]timeout= Timeout per mailbox cycle in us, standard is EC_TIMEOUTRXM
Returns
Workcounter from last slave response

Definition at line 71 of file ethercatfoe.c.

◆ ecx_FOEwrite()

int ecx_FOEwrite ( ecx_contextt context,
uint16  slave,
char *  filename,
uint32  password,
int  psize,
void *  p,
int  timeout 
)

FoE write, blocking.

Parameters
[in]context= context struct
[in]slave= Slave number.
[in]filename= Filename of file to write.
[in]password= password.
[in]psize= Size in bytes of file buffer.
[out]p= Pointer to file buffer
[in]timeout= Timeout per mailbox cycle in us, standard is EC_TIMEOUTRXM
Returns
Workcounter from last slave response

Definition at line 199 of file ethercatfoe.c.



soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Mon Feb 28 2022 23:46:57