⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 emgcy.h

📁 This library is Copyright (c) Raphael Zulliger <zulli@gmx.net>. It is licensed under the GNU L
💻 H
字号:
/***************************************************************************
                          emgcy.h  -  description
                             -------------------
    begin                : Fri May 17 2002
    copyright            : (C) 2002 by Raphael Zulliger
    email                : zulli@hsr.ch
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is Copyright (c) Raphael Zulliger <zulli@gmx.net>.       *
 *   It is licensed under the GNU Library General Public License (LGPL).   *
 *                                                                         *
 ***************************************************************************/


/** \file
 *  \brief Contains emergency-service related functions
 *
 *  This file contains functions that can handle emergency related things
 *  \warning No functions of this file are implemented yet!
 */

#ifndef __emgcy_h__
#define __emgcy_h__

#include <canop.h>

/** This function is called by proccessRxCanMessages( ). It is responsible 
 *  for analysing remotely received Emergency messages.
 */
void processReceivedEmergency( s_rx_buffer_message* canopenMessage );


/** This function sends an emergency message, where the user can define
 *  the values of the last 5 bytes. (see standard). This user-defined 
 *  informations consists of a 5 Byte long BYTE-array. 
 *  The first argument (emergencyCode) stands for one of the defined 
 *  errors like: NO_ERROR, GENERIC_ERROR, CURRENT_ERROR, VOLTAGE_ERROR, 
 *  HARDWARE_ERROR this constants are defined in the file def.h
 */
void sendEmergency( WORD emergencyCode, BYTE FAR* userDefinedInformations );


/** If an error occures somewhere out in the CANopen network, this function
 *	is called. The user is then able to analyse the error, decide wheter
 *  this error is interessting for him and react appropriately.
 *	The error is saved in a global variable called:
 *            WORD netError;
 */
void NetErrorCallback( void );


/** this function sets the actual error of this node. after setting a new
 *  error, you should call sendEmergency, so the error is sent to the other
 *  nodes
 */
void setError( BYTE bError );


#endif // __emgcy_h__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -