ext_work.h 4.03 KB
Newer Older
Maxime Perrotin's avatar
Maxime Perrotin committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/*
 * Copyright 1994-2005 The MathWorks, Inc.
 *
 * File: ext_work.h     $Revision: 1.1.6.10 $
 *
 * Abstract:
 *   
 */

#ifndef __EXT_WORK_OBJECT__
#define __EXT_WORK_OBJECT__

#ifdef __cplusplus
extern "C" {
#endif

#ifdef EXT_MODE
#include "ext_types.h"

#if defined(VXWORKS)
    /*VxWorks headers*/
    #include <vxWorks.h>
    #include <taskLib.h>
    #include <sysLib.h>
    #include <semLib.h>
    #include <rebootLib.h>
    #include <logLib.h>

    extern void rtExtModeTornadoStartup(RTWExtModeInfo *ei,
                                        int_T          numSampTimes,
                                        boolean_T      *stopReqPtr,
                                        int_T          priority,
                                        int32_T        stack_size,
                                        SEM_ID         startStopSem);

    extern void rtExtModeTornadoCleanup(int_T numSampTimes);

    extern void rtExtModeTornadoSetPortInExtUD(const int_T port);

#elif defined(C6000_EXT_MODE)
    /* C6000 headers*/
    #include <std.h>
    #include <stddef.h>
    #include <sem.h>

    extern void rtExtModeC6000Startup( RTWExtModeInfo *ei,
                                       int_T          numSampTimes,
                                       boolean_T      *stopReqPtr);

    extern void rtExtModeC6000Cleanup(int_T numSampTimes);
#else
    extern void rtExtModePauseIfNeeded(RTWExtModeInfo *ei,
                                       int_T          numSampTimes,
                                       boolean_T      *stopReqPtr);

    extern void rtExtModeWaitForStartPkt(RTWExtModeInfo *ei,
                                         int_T          numSampTimes,
                                         boolean_T      *stopReqPtr);
    void rtExtModeInitUD(void);
#endif /* #if defined(VXWORKS) */

extern void rtExtModeOneStep(RTWExtModeInfo *ei,
                             int_T          numSampTimes,
                             boolean_T      *stopReqPtr);

extern void rtExtModeCheckEndTrigger(void);

extern void rtExtModeUploadCheckTrigger(int_T numSampTimes);

extern void rtExtModeUpload(int_T tid,
                            real_T taskTime);

extern void rtExtModeCheckInit(int_T numSampTimes);

extern void rtExtModeShutdown(int_T numSampTimes);

extern void rtExtModeParseArgs(int_T        argc, 
                               const char_T *argv[],
                               real_T       *rtmFinal);

extern void rtERTExtModeSetTFinal(real_T *rtmTFinal);

extern void rtERTExtModeParseArgs(int_T        argc, 
                                  const char_T *argv[]);

#else /* #ifdef EXTMODE */

#if defined(VXWORKS)
    #define rtExtModeTornadoStartup(ei,                          \
                                    numSampTimes,                \
                                    stopReqPtr,                  \
                                    priority,                    \
                                    stack_size,                  \
                                    startStopSem) /* do nothing */
    #define rtExtModeTornadoCleanup(numSampTimes); /* do nothing */
    #define rtExtModeTornadoSetPortInExtUD(port); /* do nothing */
#elif defined(C6000_EXT_MODE)  
    #define rtExtModePauseIfNeeded(ei,st,sr) /* do nothing */
    #define rtExtModeWaitForStartPkt(ei,st,sr) /* do nothing */
#else
    #define rtExtModePauseIfNeeded(ei,st,sr) /* do nothing */
    #define rtExtModeWaitForStartPkt(ei,st,sr) /* do nothing */
#endif /* #ifdef VXWORKS */

#define rtExtModeOneStep(ei,st,sr) /* do nothing */
#define rtExtModeCheckEndTrigger() /* do nothing */
#define rtExtModeUploadCheckTrigger(numSampTimes) /* do nothing */
#define rtExtModeUpload(t,ttime) /* do nothing */
#define rtExtModeCheckInit(numSampTimes) /* do nothing */
#define rtExtModeShutdown(numSampTimes) /* do nothing */
#define rtExtModeParseArgs(argc, argv, tf); /* do nothing */
#define rtERTExtModeSetTFinal(tf); /* do nothing */
#define rtERTExtModeParseArgs(argc, argv); /* do nothing */

#endif  /* #ifdef EXTMODE */

#ifdef __cplusplus
}
#endif

#endif /* __EXT_WORK_OBJECT__ */