aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/epl/EplErrDef.h
diff options
context:
space:
mode:
authorDaniel Krueger <daniel.krueger@systec-electronic.com>2008-12-19 14:41:57 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 16:52:36 -0500
commit9d7164cfdb611c2f864d535ae5794f23db3d84f7 (patch)
tree046847f7d6432f1f3dc8236f62492503f4c9ebdc /drivers/staging/epl/EplErrDef.h
parent37bcd24b845abbfd85c838ee9ce07c2b254d3a05 (diff)
Staging: add epl stack
This is the openPOWERLINK network stack from systec electronic. It's a bit messed up as there is a driver mixed into the middle of it, lots of work needs to be done to unwind the different portions to make it sane. Cc: Daniel Krueger <daniel.krueger@systec-electronic.com> Cc: Ronald Sieber <Ronald.Sieber@systec-electronic.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/epl/EplErrDef.h')
-rw-r--r--drivers/staging/epl/EplErrDef.h302
1 files changed, 302 insertions, 0 deletions
diff --git a/drivers/staging/epl/EplErrDef.h b/drivers/staging/epl/EplErrDef.h
new file mode 100644
index 00000000000..526169270d9
--- /dev/null
+++ b/drivers/staging/epl/EplErrDef.h
@@ -0,0 +1,302 @@
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: definitions for all EPL-function return codes
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: EplErrDef.h,v $
53
54 $Author: D.Krueger $
55
56 $Revision: 1.9 $ $Date: 2008/06/23 14:56:33 $
57
58 $State: Exp $
59
60 Build Environment:
61 all
62
63 -------------------------------------------------------------------------
64
65 Revision History:
66
67 2005/12/05 -as: start of the implementation, version 1.00
68
69****************************************************************************/
70
71#ifndef _EPL_ERRORDEF_H_
72#define _EPL_ERRORDEF_H_
73
74
75//---------------------------------------------------------------------------
76// return codes
77//---------------------------------------------------------------------------
78
79typedef enum
80{
81 // area for generic errors 0x0000 - 0x000F
82 kEplSuccessful = 0x0000, // no error/successful run
83 kEplIllegalInstance = 0x0001, // the called Instanz does not exist
84 kEplInvalidInstanceParam = 0x0002, //
85 kEplNoFreeInstance = 0x0003, // XxxAddInstance was called but no free instance is available
86 kEplWrongSignature = 0x0004, // wrong signature while writing to object 0x1010 or 0x1011
87 kEplInvalidOperation = 0x0005, // operation not allowed in this situation
88 kEplInvalidNodeId = 0x0007, // invalid NodeId was specified
89 kEplNoResource = 0x0008, // resource could not be created (Windows, PxROS, ...)
90 kEplShutdown = 0x0009, // stack is shutting down
91 kEplReject = 0x000A, // reject the subsequent command
92
93 // area for EDRV module 0x0010 - 0x001F
94// kEplEdrvNoFrame = 0x0010, // no CAN message was received
95// kEplEdrvMsgHigh = 0x0011, // CAN message with high priority was received
96// kEplEdrvMsgLow = 0x0012, // CAN message with low priority was received
97 kEplEdrvInitError = 0x0013, // initialisation error
98 kEplEdrvNoFreeBufEntry = 0x0014, // no free entry in internal buffer table for Tx frames
99 kEplEdrvBufNotExisting = 0x0015, // specified Tx buffer does not exist
100// kEplEdrvNoFreeChannel = 0x0014, // CAN controller has not a free channel
101// kEplEdrvTxBuffHighOverrun = 0x0015, // buffer for high priority CAN transmit messages has overrun
102// kEplEdrvTxBuffLowOverrun = 0x0016, // buffer for low priority CAN transmit messages has overrun
103// kEplEdrvIllegalBdi = 0x0017, // unsupported baudrate within baudrate table
104// kEplEdrvBusy = 0x0018, // remote frame can not be updated because no bus contact or CAN
105 // transmission is activ
106// kEplEdrvInvalidDriverType = 0x0019, // (PC: Windows or Linux) invalid driver type
107// kEplEdrvDriverNotFound = 0x001A, // (PC: Windows or Linux) driver (DLL) could not be found
108// kEplEdrvInvalidBaseAddress = 0x001B, // (PC: Windows or Linux) driver could not found the CAN controller
109// kEplEdrvInvalidParam = 0x001C, // invalid param in function call
110
111 // area for COB module 0x0020 - 0x002F
112/* kEplCobNoFreeEntry = 0x0020, // no free entry in RX- or TX-COB table
113 kEplCobAlreadyExist = 0x0021, // COB-ID already exists in RX- resp. TX-COB table
114 */
115 kEplDllIllegalHdl = 0x0022, // illegal handle for a TxFrame was passed
116 kEplDllCbAsyncRegistered = 0x0023, // handler for non-EPL frames was already registered before
117// kEplDllAsyncRxBufferFull = 0x0024, // receive buffer for asynchronous frames is full
118 kEplDllAsyncTxBufferEmpty = 0x0025, // transmit buffer for asynchronous frames is empty
119 kEplDllAsyncTxBufferFull = 0x0026, // transmit buffer for asynchronous frames is full
120 kEplDllNoNodeInfo = 0x0027, // MN: too less space in the internal node info structure
121 kEplDllInvalidParam = 0x0028, // invalid parameters passed to function
122 kEplDllTxBufNotReady = 0x002E, // TxBuffer (e.g. for PReq) is not ready yet
123 kEplDllTxFrameInvalid = 0x002F, // TxFrame (e.g. for PReq) is invalid or does not exist
124/* kEplCobIllegalCanId = 0x0023, // COB-ID is not allowed (like 0x000 is reserved for NMT, ...)
125 kEplCobInvalidCanId = 0x0024, // COB-ID is switched off
126 kEplCobCdrvStateSet = 0x0025, // at least one bit of CAN driver state is set
127 kEplCobNoFreeEntryHighBuf = 0x0026, // no free entry in high priotity RX- or TX-COB table
128 kEplCobOwnId = 0x0027, // COB-ID already exists in own module which calls CobDefine() or CobCheck()
129*/
130 // area for OBD module 0x0030 - 0x003F
131 kEplObdIllegalPart = 0x0030, // unknown OD part
132 kEplObdIndexNotExist = 0x0031, // object index does not exist in OD
133 kEplObdSubindexNotExist = 0x0032, // subindex does not exist in object index
134 kEplObdReadViolation = 0x0033, // read access to a write-only object
135 kEplObdWriteViolation = 0x0034, // write access to a read-only object
136 kEplObdAccessViolation = 0x0035, // access not allowed
137 kEplObdUnknownObjectType = 0x0036, // object type not defined/known
138 kEplObdVarEntryNotExist = 0x0037, // object does not contain VarEntry structure
139 kEplObdValueTooLow = 0x0038, // value to write to an object is too low
140 kEplObdValueTooHigh = 0x0039, // value to write to an object is too high
141 kEplObdValueLengthError = 0x003A, // value to write is to long or to short
142// kEplObdIllegalFloat = 0x003B, // illegal float variable
143// kEplObdWrongOdBuilderKey = 0x003F, // OD was generated with demo version of tool ODBuilder
144
145 // area for NMT module 0x0040 - 0x004F
146 kEplNmtUnknownCommand = 0x0040, // unknown NMT command
147 kEplNmtInvalidFramePointer = 0x0041, // pointer to the frame is not valid
148 kEplNmtInvalidEvent = 0x0042, // invalid event send to NMT-modul
149 kEplNmtInvalidState = 0x0043, // unknown state in NMT-State-Maschine
150 kEplNmtInvalidParam = 0x0044, // invalid parameters specified
151
152 // area for SDO/UDP module 0x0050 - 0x005F
153 kEplSdoUdpMissCb = 0x0050, // missing callback-function pointer during inti of
154 // module
155 kEplSdoUdpNoSocket = 0x0051, // error during init of socket
156 kEplSdoUdpSocketError = 0x0052, // error during usage of socket
157 kEplSdoUdpThreadError = 0x0053, // error during start of listen thread
158 kEplSdoUdpNoFreeHandle = 0x0054, // no free connection handle for Udp
159 kEplSdoUdpSendError = 0x0055, // Error during send of frame
160 kEplSdoUdpInvalidHdl = 0x0056, // the connection handle is invalid
161
162 // area for SDO Sequence layer module 0x0060 - 0x006F
163 kEplSdoSeqMissCb = 0x0060, // no callback-function assign
164 kEplSdoSeqNoFreeHandle = 0x0061, // no free handle for connection
165 kEplSdoSeqInvalidHdl = 0x0062, // invalid handle in SDO sequence layer
166 kEplSdoSeqUnsupportedProt = 0x0063, // unsupported Protocol selected
167 kEplSdoSeqNoFreeHistory = 0x0064, // no free entry in history
168 kEplSdoSeqFrameSizeError = 0x0065, // the size of the frames is not correct
169 kEplSdoSeqRequestAckNeeded = 0x0066, // indeicates that the history buffer is full
170 // and a ack request is needed
171 kEplSdoSeqInvalidFrame = 0x0067, // frame not valid
172 kEplSdoSeqConnectionBusy = 0x0068, // connection is busy -> retry later
173 kEplSdoSeqInvalidEvent = 0x0069, // invalid event received
174
175 // area for SDO Command Layer Module 0x0070 - 0x007F
176 kEplSdoComUnsupportedProt = 0x0070, // unsupported Protocol selected
177 kEplSdoComNoFreeHandle = 0x0071, // no free handle for connection
178 kEplSdoComInvalidServiceType= 0x0072, // invalid SDO service type specified
179 kEplSdoComInvalidHandle = 0x0073, // handle invalid
180 kEplSdoComInvalidSendType = 0x0074, // the stated to of frame to send is
181 // not possible
182 kEplSdoComNotResponsible = 0x0075, // internal error: command layer handle is
183 // not responsible for this event from sequence layer
184 kEplSdoComHandleExists = 0x0076, // handle to same node already exists
185 kEplSdoComHandleBusy = 0x0077, // transfer via this handle is already running
186 kEplSdoComInvalidParam = 0x0078, // invalid parameters passed to function
187
188 // area for EPL Event-Modul 0x0080 - 0x008F
189 kEplEventUnknownSink = 0x0080, // unknown sink for event
190 kEplEventPostError = 0x0081, // error during post of event
191
192
193
194 // area for EPL Timer Modul 0x0090 - 0x009F
195 kEplTimerInvalidHandle = 0x0090, // invalid handle for timer
196 kEplTimerNoTimerCreated = 0x0091, // no timer was created caused by
197 // an error
198
199 // area for EPL SDO/Asnd Module 0x00A0 - 0x0AF
200 kEplSdoAsndInvalidNodeId = 0x00A0, //0 node id is invalid
201 kEplSdoAsndNoFreeHandle = 0x00A1, // no free handle for connection
202 kEplSdoAsndInvalidHandle = 0x00A2, // handle for connection is invalid
203
204
205 // area for PDO module 0x00B0 - 0x00BF
206 kEplPdoNotExist = 0x00B0, // selected PDO does not exist
207 kEplPdoLengthExceeded = 0x00B1, // length of PDO mapping exceedes 64 bis
208 kEplPdoGranularityMismatch = 0x00B2, // configured PDO granularity is not equal to supported granularity
209 kEplPdoInitError = 0x00B3, // error during initialisation of PDO module
210 kEplPdoErrorPdoEncode = 0x00B4, // error during encoding a PDO
211 kEplPdoErrorPdoDecode = 0x00B5, // error during decoding a PDO
212 kEplPdoErrorSend = 0x00B6, // error during sending a PDO
213 kEplPdoErrorSyncWin = 0x00B7, // the SYNC window runs out during sending SYNC-PDOs
214 kEplPdoErrorMapp = 0x00B8, // invalid PDO mapping
215 kEplPdoVarNotFound = 0x00B9, // variable was not found in function PdoSignalVar()
216 kEplPdoErrorEmcyPdoLen = 0x00BA, // the length of a received PDO is unequal to the expected value
217 kEplPdoWriteConstObject = 0x00BB, // constant object can not be written
218 // (only TxType, Inhibit-, Event Time for CANopen Kit)
219
220 // area for LSS slave module
221/* kEplLsssResetNode = 0x0080, // NMT command "reset node" has to be processed after LSS configuration
222 // new of NodeId
223 kEplLsssInvalidNodeId = 0x0081, // no valid NodeId is configured -> wait until it is configured with
224 // LSS service before calling CcmConnectToNet()
225*/
226 // area for emergency consumer module 0x0090 - 0x009F
227/* kEplEmccNoFreeProducerEntry = 0x0090, // no free entry to add a Emergency Producer
228 kEplEmccNodeIdNotExist = 0x0091, // selected NodeId was never added
229 kEplEmccNodeIdInvalid = 0x0092, // selected NodeId is outside of range (0x01 until 0x7F)
230 kEplEmccNodeIdExist = 0x0093, // selected NodeId already exist
231*/
232 // area for dynamic OD 0x00A0 - 0x00AF
233/* kEplDynNoMemory = 0x00A0, // no memory available
234 kEplDynInvalidConfig = 0x00A1, // invalid configuration in segment container
235*/
236 // area for hertbeat consumer module 0x00B0 - 0x00BF
237/* kEplHbcEntryNotExist = 0x00B0, // Heartbeat Producer node not configured
238 kEplHbcEntryAlreadyExist = 0x00B1, // NodeId was already defined in heartbeat consumer table (object 0x1016)
239*/
240 // Configuration manager module 0x00C0 - 0x00CF
241 kEplCfgMaConfigError = 0x00C0, // error in configuration manager
242 kEplCfgMaSdocTimeOutError = 0x00C1, // error in configuration manager, Sdo timeout
243 kEplCfgMaInvalidDcf = 0x00C2, // configration file not valid
244 kEplCfgMaUnsupportedDcf = 0x00C3, // unsupported Dcf format
245 kEplCfgMaConfigWithErrors = 0x00C4, // configuration finished with errors
246 kEplCfgMaNoFreeConfig = 0x00C5, // no free configuration entry
247 kEplCfgMaNoConfigData = 0x00C6, // no configuration data present
248 kEplCfgMaUnsuppDatatypeDcf = 0x00C7, // unsupported datatype found in dcf
249 // -> this entry was not configured
250
251
252 // area for LSS master module 0x00D0 - 0x00DF
253/* kEplLssmIllegalMode = 0x00D0, // illegal LSS mode (operation / configuration)
254 kEplLssmIllegalState = 0x00D1, // function was called in illegal state of LSS master
255 kEplLssmBusy = 0x00D2, // LSS process is busy with an previous service
256 kEplLssmIllegalCmd = 0x00D3, // illegal command code was set for function LssmInquireIdentity()
257 kEplLssmTimeout = 0x00D4, // LSS slave did not answer a LSS service
258 kEplLssmErrorInConfirm = 0x00D5, // LSS slave replied an error code for a LSS service
259*/
260 // area for CCM modules 0x00E0 - 0xEF
261/* kEplCcmStoreUnvalidState = 0x00E0, // memory device not available due device state
262 kEplCcmStoreHwError = 0x00E1, // hw error due device access
263*/
264 // area for SRDO module 0x0100 - 0x011F
265/* kEplSrdoNotExist = 0x0100, // selected SRDO does not exist
266 kEplSrdoGranularityMismatch = 0x0101, // configured SRDO granularity is not equal to supported granularity
267 kEplSrdoCfgTimingError = 0x0102, // configuration is not ok (Timing)
268 kEplSrdoCfgIdError = 0x0103, // configuration is not ok (CobIds)
269 kEplSrdoCfgCrcError = 0x0104, // configuration is not ok (CRC)
270 kEplSrdoNmtError = 0x0105, // an action was tried in a wrong NMT state
271 kEplSrdoInvalidCfg = 0x0106, // an action was tried with an invald SRDO configuration
272 kEplSrdoInvalid = 0x0107, // an action was tried with an invald SRDO
273 kEplSrdoRxTxConflict = 0x0108, // an transmission was tried with an receive SRDO (or the other way)
274 kEplSrdoIllegalCanId = 0x0109, // the CanId is invalid
275 kEplSrdoCanIdAlreadyInUse = 0x010A, // the CanId is already in use
276 kEplSrdoNotInOrder = 0x010B, // the two messages of a SRDO are not in order
277 kEplSrdoSctTimeout = 0x010C, // timeout of SCT
278 kEplSrdoSrvtTimeout = 0x010D, // timeout of SRVT
279 kEplSrdoCanIdNotValid = 0x010E, // one of received CAN-IDs are not equal to configured one
280 kEplSrdoDlcNotValid = 0x010F, // one of received CAN-DLC are not equal to configured one
281 kEplSrdoErrorMapp = 0x0110, // wrong values in mapping found
282 kEplSrdoDataError = 0x0111, // data of CAN messages are not invers
283 kEplSrdoLengthExceeded = 0x0112, // length of SRDO mapping exceedes 64 bit per CAN-message
284 kEplSrdoNotHandledInApp = 0x0113, // the SRDO error was not handled in AppSrdoError()
285 kEplSrdoOverrun = 0x0114 // a RxSRDO was received but the pevious one was not else processed
286*/
287
288 kEplApiTaskDeferred = 0x0140, // EPL performs task in background and informs the application (or vice-versa), when it is finished
289 kEplApiInvalidParam = 0x0142, // passed invalid parameters to a function (e.g. invalid node id)
290
291 // area untill 0x07FF is reserved
292 // area for user application from 0x0800 to 0x7FFF
293
294} tEplKernel;
295
296
297#endif
298//EOF
299
300// Die letzte Zeile muß unbedingt eine leere Zeile sein, weil manche Compiler
301// damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder).
302