versadac  1
versadac - Scalable Recorder Firmware
stack.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 : */
15 /* $Workfile:: stack.h $*/
16 /* $Revision:: 3 $*/
17 /* $Date:: 30/08/10 9:56 $*/
18 /* */
19 /*---------------------------------------------------------------------------*/
20 /* */
21 /* D e s c r i p t i o n : */
22 /* Global managment function of the stack */
23 /* */
24 /*---------------------------------------------------------------------------*/
25 
26 #ifndef __STACK_H__
27  #define __STACK_H__
28 
29 #include "pniostat.h"
30 #include "platform.h"
31 #include "os_net.h"
32 #include "hwif.h"
33 #include "netif.h"
34 #include "pool.h"
35 #include "uuid.h"
36 #include "cross.h"
37 #include "stk_thd.h"
38 #include "link.h"
39 #include "schedule.h"
40 #include "commonid.h"
41 #include "types.h"
42 #include "message.h"
43 #include "pnio_pdu.h"
44 #include "pnlog.h"
45 #include "param.h"
46 #include "tools.h"
47 #include "fspm.h"
48 #include "system.h"
49 
50 
51 #include "rpctools.h"
52 #include "rpcrunti.h"
53 #include "arep.h"
54 #include "crep.h"
55 
56 #include "monitor.h"
57 
58 
59 /*Initialize resources then start all internal threads*/
60 APP_WORD InitStackController(APP_LPVOID lpSharedMemoryIO , APP_DWORD dwSizeSharedMemoryIO);
61 /*Stop all internal threads and free resources */
62 APP_WORD ExitStackController();
63 
64 /*check alignment/platform problems*/
65 APP_VOID STACK_Check_Platform_Align();
66 
67 APP_DWORD StackGetThreadId (void);
68 APP_VOID StackEnterX (APP_DWORD dwSyncId);
69 APP_VOID StackExitX (APP_DWORD dwSyncId);
70 
71 #define DEFAULT_QUEUE 0 /*Default queue for a thread*/
72 
73 #define CHECK_PTR(p) \
74  OS_ASSERT(APP_NULL == p)
75 
76 #define UNUSED_ARG(p) p=p
77 
78 #endif