Commit | Line | Data |
---|---|---|
9d7164cf DK |
1 | /**************************************************************************** |
2 | ||
3 | (c) SYSTEC electronic GmbH, D-07973 Greiz, August-Bebel-Str. 29 | |
4 | www.systec-electronic.com | |
5 | ||
6 | Project: openPOWERLINK | |
7 | ||
8 | Description: include file for DLL module | |
9 | ||
10 | License: | |
11 | ||
12 | Redistribution and use in source and binary forms, with or without | |
13 | modification, are permitted provided that the following conditions | |
14 | are met: | |
15 | ||
16 | 1. Redistributions of source code must retain the above copyright | |
17 | notice, this list of conditions and the following disclaimer. | |
18 | ||
19 | 2. Redistributions in binary form must reproduce the above copyright | |
20 | notice, this list of conditions and the following disclaimer in the | |
21 | documentation and/or other materials provided with the distribution. | |
22 | ||
23 | 3. Neither the name of SYSTEC electronic GmbH nor the names of its | |
24 | contributors may be used to endorse or promote products derived | |
25 | from this software without prior written permission. For written | |
26 | permission, please contact info@systec-electronic.com. | |
27 | ||
28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | |
31 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | |
32 | COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | |
33 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | |
34 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | |
35 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | |
36 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
37 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | |
38 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
39 | POSSIBILITY OF SUCH DAMAGE. | |
40 | ||
41 | Severability Clause: | |
42 | ||
43 | If a provision of this License is or becomes illegal, invalid or | |
44 | unenforceable in any jurisdiction, that shall not affect: | |
45 | 1. the validity or enforceability in that jurisdiction of any other | |
46 | provision of this License; or | |
47 | 2. the validity or enforceability in other jurisdictions of that or | |
48 | any other provision of this License. | |
49 | ||
50 | ------------------------------------------------------------------------- | |
51 | ||
52 | $RCSfile: EplDll.h,v $ | |
53 | ||
54 | $Author: D.Krueger $ | |
55 | ||
56 | $Revision: 1.4 $ $Date: 2008/04/17 21:36:32 $ | |
57 | ||
58 | $State: Exp $ | |
59 | ||
60 | Build Environment: | |
61 | GCC V3.4 | |
62 | ||
63 | ------------------------------------------------------------------------- | |
64 | ||
65 | Revision History: | |
66 | ||
67 | 2006/06/08 d.k.: start of the implementation, version 1.00 | |
68 | ||
9d7164cf DK |
69 | ****************************************************************************/ |
70 | ||
71 | #ifndef _EPL_DLL_H_ | |
72 | #define _EPL_DLL_H_ | |
73 | ||
74 | #include "EplInc.h" | |
75 | #include "EplFrame.h" | |
76 | ||
77 | //--------------------------------------------------------------------------- | |
78 | // const defines | |
79 | //--------------------------------------------------------------------------- | |
80 | ||
9d7164cf | 81 | #ifndef EPL_DLL_MAX_ASND_SERVICE_ID |
e0ca0595 | 82 | #define EPL_DLL_MAX_ASND_SERVICE_ID (EPL_C_DLL_MAX_ASND_SERVICE_IDS + 1) // last is kEplDllAsndSdo == 5 |
9d7164cf DK |
83 | #endif |
84 | ||
85 | //--------------------------------------------------------------------------- | |
86 | // typedef | |
87 | //--------------------------------------------------------------------------- | |
88 | ||
e0ca0595 GKH |
89 | typedef enum { |
90 | kEplDllAsndNotDefined = 0x00, | |
91 | kEplDllAsndIdentResponse = 0x01, | |
92 | kEplDllAsndStatusResponse = 0x02, | |
93 | kEplDllAsndNmtRequest = 0x03, | |
94 | kEplDllAsndNmtCommand = 0x04, | |
95 | kEplDllAsndSdo = 0x05 | |
9d7164cf DK |
96 | } tEplDllAsndServiceId; |
97 | ||
e0ca0595 GKH |
98 | typedef enum { |
99 | kEplDllAsndFilterNone = 0x00, | |
100 | kEplDllAsndFilterLocal = 0x01, // receive only ASnd frames with local or broadcast node ID | |
101 | kEplDllAsndFilterAny = 0x02, // receive any ASnd frame | |
9d7164cf DK |
102 | } tEplDllAsndFilter; |
103 | ||
e0ca0595 GKH |
104 | typedef enum { |
105 | kEplDllReqServiceNo = 0x00, | |
106 | kEplDllReqServiceIdent = 0x01, | |
107 | kEplDllReqServiceStatus = 0x02, | |
108 | kEplDllReqServiceNmtRequest = 0x03, | |
109 | kEplDllReqServiceUnspecified = 0xFF, | |
9d7164cf DK |
110 | |
111 | } tEplDllReqServiceId; | |
112 | ||
e0ca0595 GKH |
113 | typedef enum { |
114 | kEplDllAsyncReqPrioNmt = 0x07, // PRIO_NMT_REQUEST | |
115 | kEplDllAsyncReqPrio6 = 0x06, | |
116 | kEplDllAsyncReqPrio5 = 0x05, | |
117 | kEplDllAsyncReqPrio4 = 0x04, | |
118 | kEplDllAsyncReqPrioGeneric = 0x03, // PRIO_GENERIC_REQUEST | |
119 | kEplDllAsyncReqPrio2 = 0x02, // till WSP 0.1.3: PRIO_ABOVE_GENERIC | |
120 | kEplDllAsyncReqPrio1 = 0x01, // till WSP 0.1.3: PRIO_BELOW_GENERIC | |
121 | kEplDllAsyncReqPrio0 = 0x00, // till WSP 0.1.3: PRIO_GENERIC_REQUEST | |
9d7164cf DK |
122 | |
123 | } tEplDllAsyncReqPriority; | |
124 | ||
e0ca0595 GKH |
125 | typedef struct { |
126 | unsigned int m_uiFrameSize; | |
127 | tEplFrame *m_pFrame; | |
128 | tEplNetTime m_NetTime; | |
9d7164cf DK |
129 | |
130 | } tEplFrameInfo; | |
131 | ||
e0ca0595 GKH |
132 | typedef struct { |
133 | unsigned int m_uiSizeOfStruct; | |
134 | BOOL m_fAsyncOnly; // do not need to register PRes-Frame | |
135 | unsigned int m_uiNodeId; // local node ID | |
136 | ||
137 | // 0x1F82: NMT_FeatureFlags_U32 | |
d539cfb0 | 138 | u32 m_dwFeatureFlags; |
e0ca0595 | 139 | // Cycle Length (0x1006: NMT_CycleLen_U32) in [us] |
d539cfb0 | 140 | u32 m_dwCycleLen; // required for error detection |
e0ca0595 GKH |
141 | // 0x1F98: NMT_CycleTiming_REC |
142 | // 0x1F98.1: IsochrTxMaxPayload_U16 | |
143 | unsigned int m_uiIsochrTxMaxPayload; // const | |
144 | // 0x1F98.2: IsochrRxMaxPayload_U16 | |
145 | unsigned int m_uiIsochrRxMaxPayload; // const | |
146 | // 0x1F98.3: PResMaxLatency_U32 | |
d539cfb0 | 147 | u32 m_dwPresMaxLatency; // const in [ns], only required for IdentRes |
e0ca0595 GKH |
148 | // 0x1F98.4: PReqActPayloadLimit_U16 |
149 | unsigned int m_uiPreqActPayloadLimit; // required for initialisation (+24 bytes) | |
150 | // 0x1F98.5: PResActPayloadLimit_U16 | |
151 | unsigned int m_uiPresActPayloadLimit; // required for initialisation of Pres frame (+24 bytes) | |
152 | // 0x1F98.6: ASndMaxLatency_U32 | |
d539cfb0 | 153 | u32 m_dwAsndMaxLatency; // const in [ns], only required for IdentRes |
e0ca0595 GKH |
154 | // 0x1F98.7: MultiplCycleCnt_U8 |
155 | unsigned int m_uiMultiplCycleCnt; // required for error detection | |
156 | // 0x1F98.8: AsyncMTU_U16 | |
157 | unsigned int m_uiAsyncMtu; // required to set up max frame size | |
158 | // $$$ 0x1F98.9: Prescaler_U16 | |
159 | // $$$ Multiplexed Slot | |
160 | ||
161 | // 0x1C14: DLL_LossOfFrameTolerance_U32 in [ns] | |
d539cfb0 | 162 | u32 m_dwLossOfFrameTolerance; |
e0ca0595 GKH |
163 | |
164 | // 0x1F8A: NMT_MNCycleTiming_REC | |
165 | // 0x1F8A.1: WaitSoCPReq_U32 in [ns] | |
d539cfb0 | 166 | u32 m_dwWaitSocPreq; |
e0ca0595 GKH |
167 | |
168 | // 0x1F8A.2: AsyncSlotTimeout_U32 in [ns] | |
d539cfb0 | 169 | u32 m_dwAsyncSlotTimeout; |
9d7164cf DK |
170 | |
171 | } tEplDllConfigParam; | |
172 | ||
e0ca0595 GKH |
173 | typedef struct { |
174 | unsigned int m_uiSizeOfStruct; | |
d539cfb0 GKH |
175 | u32 m_dwDeviceType; // NMT_DeviceType_U32 |
176 | u32 m_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32 | |
177 | u32 m_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32 | |
178 | u32 m_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32 | |
179 | u32 m_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32 | |
a5c30d94 | 180 | u64 m_qwVendorSpecificExt1; |
d539cfb0 GKH |
181 | u32 m_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32 |
182 | u32 m_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32 | |
183 | u32 m_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device | |
184 | u32 m_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device | |
185 | u32 m_dwIpAddress; | |
186 | u32 m_dwSubnetMask; | |
187 | u32 m_dwDefaultGateway; | |
2ed53cf8 GKH |
188 | u8 m_sHostname[32]; |
189 | u8 m_abVendorSpecificExt2[48]; | |
9d7164cf DK |
190 | |
191 | } tEplDllIdentParam; | |
192 | ||
e0ca0595 GKH |
193 | typedef struct { |
194 | unsigned int m_uiNodeId; | |
dcf5371c GKH |
195 | u16 m_wPreqPayloadLimit; // object 0x1F8B: NMT_MNPReqPayloadLimitList_AU16 |
196 | u16 m_wPresPayloadLimit; // object 0x1F8D: NMT_PResPayloadLimitList_AU16 | |
d539cfb0 | 197 | u32 m_dwPresTimeout; // object 0x1F92: NMT_MNCNPResTimeout_AU32 |
9d7164cf DK |
198 | |
199 | } tEplDllNodeInfo; | |
200 | ||
201 | //--------------------------------------------------------------------------- | |
202 | // function prototypes | |
203 | //--------------------------------------------------------------------------- | |
204 | ||
e0ca0595 | 205 | #endif // #ifndef _EPL_DLL_H_ |