versadac  1
versadac - Scalable Recorder Firmware
mrp_portitf.h
1 /***************************************************************************************
2  *********** Copyright 2005 Zurich University of Applied Sciences / InES **************
3  ***************************************************************************************
4  **
5  ** File : mrp_portitf.h
6  **
7  ** Description : This file provides the interfaces necessary to send and receive
8  ** MRP messages and other port related functions.
9  **
10  ***************************************************************************************
11  ** Department : Institute of Embedded Systems
12  ** Project : MRP
13  ** Modul : MRP_LogItf_T
14  ** Author : Christian Schaer
15  ** Contact : scc@zhwin.ch
16  ** Date : 10.04.2006
17  ****************************** Modifications ******************************************
18  **
19  ** Date : Who : Comment :
20  ** 10.05.06 scc initial release
21  **************************************************************************************/
22 /* $Workfile:: mrp_portitf.h $*/
23 /* $Revision:: 3 $*/
24 /* $Date:: 16/12/10 14:44 $*/
25 
26 #ifndef MRP_PORTITF_H
27 #define MRP_PORTITF_H
28 
29 #include "mrp_pkg.h"
30 
31 #define MRP_HOST_MAC 9
32 
33 /********************************************/
34 /*** Constructors and destructors ***/
35 /********************************************/
36 
37 void MRP_PortItf_T_Init( void );
38 
39 void MRP_PortItf_T_Cleanup( void );
40 
41 
42 /********************************************/
43 /*** public Methods ***/
44 /********************************************/
45 
47 void MRP_PortItf_T_receive(Unsigned16 rx_port, Unsigned16 vlan_id, char* const data_ptr, Unsigned16 data_length);
48 
50 void MRP_PortItf_T_send(Unsigned16 tx_port, Unsigned16 vlan_id, const char* data_ptr, Unsigned16 data_length);
51 
53 void MRP_PortItf_T_setPortState(Unsigned16 port, MRPPortState port_state);
54 
56 MRPPortState MRP_PortItf_T_getPortState(Unsigned16 port);
57 
59 void MRP_PortItf_T_signalLocalLinkChange(Unsigned16 port, MRPLinkState link_state);
60 
62 MRPLinkState MRP_PortItf_T_getLinkState(Unsigned16 port);
63 
65 MRPBoolean MRP_PortItf_T_getMAC(Unsigned16 port, UChar address[6]);
66 
69 Unsigned16 MRP_PortItf_T_getNumberOfPorts( void );
70 
71 
72 #endif
73