versadac  1
versadac - Scalable Recorder Firmware
mrp_protocolevent.h
1 /***************************************************************************************
2  *********** Copyright 2005 Zurich University of Applied Sciences / InES **************
3  ***************************************************************************************
4  **
5  ** File : mrp_protocolevent.h
6  **
7  ** Description : This file provides the protocol events
8  **
9  ***************************************************************************************
10  ** Department : Institute of Embedded Systems
11  ** Project : MRP
12  ** Modul : MRP_ProtocolEvent_T
13  ** Author : Christian Schaer
14  ** Contact : scc@zhwin.ch
15  ** Date : 10.04.2006
16  ****************************** Modifications ******************************************
17  **
18  ** Date : Who : Comment :
19  ** 10.05.06 scc initial release
20  **************************************************************************************/
21 /* $Workfile:: mrp_protocolevent.h $*/
22 /* $Revision:: 2 $*/
23 /* $Date:: 16/12/10 14:44 $*/
24 
25 #ifndef MRP_PROTOCOLEVENT_H
26 #define MRP_PROTOCOLEVENT_H
27 
28 
29 /***********************************************************************/
30 /*** Header Files Includes ***/
31 /***********************************************************************/
32 
33 #include "mrp_pkg.h"
34 
35 
36 /***********************************************************************/
37 /*** Definitions ***/
38 /***********************************************************************/
39 
40 typedef enum MRPProtocolEvents {
41  MRP_ProtEvPowerOn,
42  MRP_ProtEvMAUTypeChangeInd,
43  MRP_ProtEvLinkChangeInd,
44  MRP_ProtEvTestRingInd,
45  MRP_ProtEvTopologyChangeInd,
46  MRP_ProtEvTestTimerExpired,
47  MRP_ProtEvTopTimerExpired,
48  MRP_ProtEvUpTimerExpired,
49  MRP_ProtEvDownTimerExpired,
50  MRP_ProtEvFDBClearTimerExpired
51 } MRPProtocolEvents;
52 
53 
54 typedef struct MAUTypeChangeIndData {
55  Unsigned16 RPort_;
56  Unsigned16 LinkStatus_;
58 
59 typedef struct LinkChangeIndData {
60  Unsigned16 PortMode_;
61  Unsigned16 LinkStatus_;
63 
64 typedef struct TopologyChangeIndData {
65  UChar MRP_SA_[6];
66  Unsigned16 t_;
68 
69 typedef struct TestRingIndData {
70  UChar MRP_SA_[6];
71  Unsigned16 MRP_Prio_;
73 
74 
75 /**********************************************************************/
76 /*** class MRP_ProtocolEvent_T ***/
77 /**********************************************************************/
78 
80 {
81  MRPProtocolEvents event_; /* The event type */
82  void * data_ptr_; /* Pointer to data if exists */
83 };
84 
85 
86 /********************************************/
87 /*** Constructors and destructors ***/
88 /********************************************/
89 
90 void MRP_ProtocolEvent_T_Init( MRP_ProtocolEvent_T* const me,
91  MRPProtocolEvents event,
92  void * data_ptr );
93 
94 void MRP_ProtocolEvent_T_Cleanup( MRP_ProtocolEvent_T* const me );
95 
96 
97 
98 /********************************************/
99 /*** public Methods ***/
100 /********************************************/
101 
103 void MRP_ProtocolEvent_T_copy( MRP_ProtocolEvent_T* const me, const MRP_ProtocolEvent_T * in_event );
104 
105 #endif
106 
107 
Definition: mrp_protocolevent.h:54
Definition: mrp_protocolevent.h:64
Definition: mrp_protocolevent.h:69
Definition: mrp_protocolevent.h:79