versadac  1
versadac - Scalable Recorder Firmware
msg_mrp.h
1 /*---------------------------------------------------------------------------*/
2 /* Copyright (C) 2006 Woodhead Software & Electonics. All rights reserved. */
3 /*---------------------------------------------------------------------------*/
4 /* This program is protected by international copyright. */
5 /* */
6 /* The use of this software including but not limited to its Source Code */
7 /* is subject to restrictions as agreed in the license agreement between */
8 /* you and Woodhead. */
9 /* Copying or distribution is not allowed unless expressly permitted */
10 /* according to your license agreement with Woodhead. */
11 /*---------------------------------------------------------------------------*/
12 /* */
13 /* Project : STACK PROFINET Controller */
14 /* Component : MRP */
15 /* $Workfile:: msg_mrp.h $*/
16 /* $Revision:: 10 $*/
17 /* $Date:: 16/12/10 14:27 $*/
18 /* */
19 /*---------------------------------------------------------------------------*/
20 /* */
21 /* D e s c r i p t i o n : */
22 /* */
23 /*---------------------------------------------------------------------------*/
24 
25 
26 #ifndef __MSG_MRP_H__
27 #define __MSG_MRP_H__
28 
29 
30 APP_DWORD APP_FAR ase_mrp_init (LPST_MSG* ppMsg);
31 APP_DWORD APP_FAR ase_mrp_exit (LPST_MSG* ppMsg);
32 APP_DWORD APP_FAR ase_mrm_start (LPST_MSG* ppMsg);
33 APP_DWORD APP_FAR ase_mrm_stop (LPST_MSG* ppMsg);
34 APP_DWORD APP_FAR ase_mrm_read (LPST_MSG* ppMsg);
35 APP_DWORD APP_FAR ase_mrc_start (LPST_MSG* ppMsg);
36 APP_DWORD APP_FAR ase_mrc_stop (LPST_MSG* ppMsg);
37 APP_DWORD APP_FAR ase_mrc_read (LPST_MSG* ppMsg);
38 APP_DWORD APP_FAR ase_mrp_rcv_pdu (LPST_MSG* ppMsg);
39 APP_DWORD APP_FAR ase_mrp_local_link_change (LPST_MSG* ppMsg);
40 APP_DWORD APP_FAR ase_mrp_timer (LPST_MSG* ppMsg);
41 
42 typedef struct _ST_MRM_CONF{
43 
44  LPST_MRP_UUID lpstDomainUUID; /*ID--> if null stack will auto generate an UUID*/
45  APP_WORD wRing_port_1_id;
46  APP_WORD wRing_port_2_id;
47  APP_WORD wVlan_id;
48  APP_WORD wManager_priority;
49  APP_WORD wTopology_change_interval;
50  APP_WORD wTopology_change_repeat_count;
51  APP_WORD wShort_test_interval;
52  APP_WORD wDefault_test_interval;
53  APP_WORD wTest_monitoring_count;
54  APP_BOOL bNon_blocking_MRC_supported;
55  APP_WORD wTest_monitoring_extended_count;
56  APP_BYTE bReact_on_link_change;
57  APP_BYTE wCheck_media_redundancy;
58  APP_BYTE byDomainName[240];
59  APP_BYTE byDomainNameLen;
60 
61 }ST_MRM_CONF, APP_FAR * LPST_MRM_CONF;
62 
63 typedef struct _ST_MRC_CONF
64 {
65  LPST_MRP_UUID lpstDomainUUID; /*ID--> if null stack will auto generate an UUID*/
66  APP_WORD wRing_port_1_id;
67  APP_WORD wRing_port_2_id;
68  APP_WORD wVlan_id;
69  APP_WORD wLink_down_interval;
70  APP_WORD wLink_up_interval;
71  APP_WORD wLink_change_count;
72  APP_BOOL bBlocked_state_supported;
73  APP_BYTE byDomainName[240];
74  APP_BYTE byDomainNameLen;
75 
76 }ST_MRC_CONF, APP_FAR * LPST_MRC_CONF;
77 
78 
79 /*
80 ---PDInterfaceMrpDataAdjust:---
81 
82 ( 6) ST_PND_BLOCHEADER stHeader;
83 
84 ( 1) APP_BYTE Padding; Make it Uint32Align
85 ( 1) APP_BYTE Padding; Make it Uint32Align
86 
87 (16) ST_CLR_RPC_UUID stDomainUUID; ID
88 ( 2) APP_WORD wMrpRole; Manager or Client ?
89 ( 1) APP_BYTE Padding; Make it Uint32Align
90 ( 1) APP_BYTE Padding; Make it Uint32Align
91 --> 28 ( = 4 * 7)
92 */
94 
95  ST_MRP_UUID stDomainUUID; /*ID */
96  APP_WORD wMrpRole; /*Manager or Client ? */
97  APP_BYTE byMrpDomainNameLen;
98  APP_BYTE byMrpDomainName[240];
99  /*APP_BYTE bPadding1; Make it Uint32Align */
100  /*APP_BYTE bPadding2; Make it Uint32Align */
101 };
102 typedef struct _ST_MRP_PDINTERFACE_DATA_ADJUST (ST_MRP_PDINTERFACE_DATA_ADJUST), APP_FAR * LPST_MRP_PDINTERFACE_DATA_ADJUST;
103 
104 /*
105 ---MrpManagerParams---
106 
107 ( 6) ST_PND_BLOCHEADER stHeader,
108 
109 ( 2) APP_WORD wMrpPrio,
110 ( 2) APP_WORD wMrpTopChangeT,
111 ( 2) APP_WORD wMrpTopNrMax,
112 ( 2) APP_WORD wMrpTstShortT,
113 ( 2) APP_WORD wMrpTstDefaultT,
114 ( 2) APP_WORD wMrpTstNrMax,
115 ( 2) APP_WORD Padding, Make it Uint32Align
116 */
118 
119  APP_WORD wMrpPrio;
120  APP_WORD wMrpTopChangeT;
121  APP_WORD wMrpTopNrMax;
122  APP_WORD wMrpTstShortT;
123  APP_WORD wMrpTstDefaultT;
124  APP_WORD wMrpTstNrMax;
125  /*APP_WORD wPadding;*/
126 
127 };
128 typedef struct _ST_MRP_MANAGER_PARAM (ST_MRP_MANAGER_PARAM), APP_FAR * LPST_MRP_MANAGER_PARAM;
129 
130 /*
131 --MrpClientParams--
132 
133 ( 6) ST_PND_BLOCHEADER stHeader,
134 ( 2) APP_WORD wMrpLnkDownT,
135 ( 2) APP_WORD wMrpLnkUpT,
136 ( 2) APP_WORD wMrpLnkNRmax,
137 */
139 
140  APP_WORD wMrpLnkDownT;
141  APP_WORD wMrpLnkUpT;
142  APP_WORD wMrpLnkNRmax;
143 
144 };
145 typedef struct _ST_MRP_CLIENT_PARAM (ST_MRP_CLIENT_PARAM), APP_FAR * LPST_MRP_CLIENT_PARAM;
146 
147 
149 
150  ST_MRP_PDINTERFACE_DATA_ADJUST stMrpPdiDa;
151  ST_MRP_MANAGER_PARAM stMrpMp;
152  ST_MRP_CLIENT_PARAM stMrpCp;
153  APP_BYTE bCheckMrManager; /* for PDInterfaceMrpDataCheck */
154 
155 };
156 typedef struct _ST_MRP_ALL_DATA (ST_MRP_ALL_DATA), APP_FAR * LPST_MRP_ALL_DATA;
157 
158 
160 
161  ST_MRP_UUID stMrpUuid;
162  APP_BYTE byIsFree;
163  APP_BYTE byDomainName[240];
164  APP_BYTE byDomainNameLen;
165 
166 };
167 typedef struct _ST_MRP_STORAGE (ST_MRP_STORAGE), APP_FAR * LPST_MRP_STORAGE;
168 
169 
170 APP_DWORD APP_FAR mrpReadInternal (LPST_MRP_ALL_DATA lpstMrpData);
171 
172 #endif
173 
174 
175 
Definition: msg_mrp.h:148
Definition: message.h:1163
Definition: mrp_pkg.h:81
Definition: msg_mrp.h:63
Definition: msg_mrp.h:138
Definition: msg_mrp.h:93
Definition: msg_mrp.h:159
Definition: msg_mrp.h:117
Definition: msg_mrp.h:42