Sam Grove / Mbed 2 deprecated canopen_masternode

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

emcy.c File Reference

emcy.c File Reference

Definitions of the functions that manage EMCY (emergency) messages. More...

Go to the source code of this file.

Functions

UNS32 OnNumberOfErrorsUpdate (CO_Data *d, const indextable *unsused_indextable, UNS8 unsused_bSubindex)
UNS8 sendEMCY (CO_Data *d, UNS16 errCode, UNS8 errRegister)
void emergencyInit (CO_Data *d)
 Start EMCY consumer and producer.
void emergencyStop (CO_Data *d)
 Stop EMCY producer and consumer.
UNS8 EMCY_setError (CO_Data *d, UNS16 errCode, UNS8 errRegMask, UNS16 addInfo)
 Sets a new error with code errCode.
void EMCY_errorRecovered (CO_Data *d, UNS16 errCode)
 Indicates it has recovered from error errCode.
void proceedEMCY (CO_Data *d, Message *m)
 This function is responsible to process an EMCY canopen-message.

Detailed Description

Definitions of the functions that manage EMCY (emergency) messages.

Author:
Luis Jimenez
Date:
Wed Sep 26 2007

Definition in file emcy.c.


Function Documentation

void EMCY_errorRecovered ( CO_Data d,
UNS16  errCode 
)

Indicates it has recovered from error errCode.

Deletes error errCode. Also clears corresponding bits in Error register (1001h)

Parameters:
d
errCodeCode of the error
errRegisterBits of Error register (1001h) to be set.
Returns:
1 if error, 0 if successful

Definition at line 186 of file emcy.c.

UNS8 EMCY_setError ( CO_Data d,
UNS16  errCode,
UNS8  errRegMask,
UNS16  addInfo 
)

Sets a new error with code errCode.

Sets a new error with code errCode. Also sets corresponding bits in Error register (1001h)

Parameters:
d
errCodeCode of the error
errRegisterBits of Error register (1001h) to be set.
Returns:
1 if error, 0 if successful

Definition at line 127 of file emcy.c.

void emergencyInit ( CO_Data d )

Start EMCY consumer and producer.

start the EMCY mangagement.

Parameters:
d

Definition at line 73 of file emcy.c.

void emergencyStop ( CO_Data d )

Stop EMCY producer and consumer.

Parameters:
d

Definition at line 85 of file emcy.c.

UNS32 OnNumberOfErrorsUpdate ( CO_Data d,
const indextable unsused_indextable,
UNS8  unsused_bSubindex 
)

This is called when Index 0x1003 is updated.

Parameters:
d
unsused_indextable
unsused_bSubindex
Returns:

Definition at line 55 of file emcy.c.

void proceedEMCY ( CO_Data d,
Message m 
)

This function is responsible to process an EMCY canopen-message.

This function is responsible to process an EMCY canopen-message.

Parameters:
d
mThe CAN-message which has to be analysed.

Definition at line 227 of file emcy.c.

UNS8 sendEMCY ( CO_Data d,
UNS16  errCode,
UNS8  errRegister 
)
Parameters:
d
cob_id
Returns:

Definition at line 98 of file emcy.c.