ConOpSys V2970  P004.07
ANVILEX control operating system
sync_obj.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ********************************************************************************
3 ** **
4 ** ABCC Starter Kit version 3.04.01 (2018-01-23) **
5 ** **
6 ** Delivered with: **
7 ** ABP 7.55.01 (2017-12-20) **
8 ** ABCC Driver 5.04.01 (2017-12-18) **
9 ** */
10 /*******************************************************************************
11 ********************************************************************************
12 ** COPYRIGHT NOTIFICATION (c) 2015 HMS Industrial Networks AB **
13 ** **
14 ** This code is the property of HMS Industrial Networks AB. **
15 ** The source code may not be reproduced, distributed, or used without **
16 ** permission. When used together with a product from HMS, permission is **
17 ** granted to modify, reproduce and distribute the code in binary form **
18 ** without any restrictions. **
19 ** **
20 ** THE CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. HMS DOES NOT **
21 ** WARRANT THAT THE FUNCTIONS OF THE CODE WILL MEET YOUR REQUIREMENTS, OR **
22 ** THAT THE OPERATION OF THE CODE WILL BE UNINTERRUPTED OR ERROR-FREE, OR **
23 ** THAT DEFECTS IN IT CAN BE CORRECTED. **
24 ********************************************************************************
25 ********************************************************************************
26 ** Sync Object 0xEE - Public interfaces
27 ********************************************************************************
28 ********************************************************************************
29 ** Services:
30 ** SYNC_GetCycleTime() - Returns the set cycle time
31 ** SYNC_GetInputCaptureTime() - Returns the set input capture time
32 ** SYNC_GetMode() - Returns the set sync mode
33 ** SYNC_GetOutputValidTime() - Returns the set output valid time
34 ** SYNC_ProcessCmdMsg() - Processes a message addressed to this
35 ** object
36 ** SYNC_SetInputProcessingTime() - Set the input processing time
37 ** SYNC_SetMinCycleTime() - Set the minimum allowed cycle time
38 ** SYNC_SetOutputProcessingTime() - Set the output processing time
39 ********************************************************************************
40 ********************************************************************************
41 */
42 #ifndef SYNC_OBJ_H
43 #define SYNC_OBJ_H
44 
45 #include "abcc_drv_cfg.h"
46 
47 #include "abp.h"
48 #include "abcc_ad_if.h"
49 
50 
51 /*******************************************************************************
52 ** Typedefs
53 ********************************************************************************
54 */
55 
56 /*------------------------------------------------------------------------------
57 ** Structure describing the sync modes of attribute 7, 'Sync mode'.
58 **------------------------------------------------------------------------------
59 */
60 typedef enum SYNC_SyncMode
61 {
64 }
66 
67 /*******************************************************************************
68 ** Public Services
69 ********************************************************************************
70 */
71 
72 /*------------------------------------------------------------------------------
73 ** Get the currently configured cycle time
74 **------------------------------------------------------------------------------
75 ** Arguments:
76 ** None
77 **
78 ** Returns:
79 ** Cycle time in nanoseconds
80 **------------------------------------------------------------------------------
81 */
83 
84 /*------------------------------------------------------------------------------
85 ** Get the currently configured input capture time
86 **------------------------------------------------------------------------------
87 ** Arguments:
88 ** None
89 **
90 ** Returns:
91 ** Input capture time in nanoseconds
92 **------------------------------------------------------------------------------
93 */
95 
96 /*------------------------------------------------------------------------------
97 ** Get the currently configured sync mode
98 **------------------------------------------------------------------------------
99 ** Arguments:
100 ** None
101 **
102 ** Returns:
103 ** Sync mode of type SYNC_SyncModeType.
104 **------------------------------------------------------------------------------
105 */
107 
108 /*------------------------------------------------------------------------------
109 ** Get the currently configured output valid time
110 **------------------------------------------------------------------------------
111 ** Arguments:
112 ** None
113 **
114 ** Returns:
115 ** Output valid time in nanoseconds
116 **------------------------------------------------------------------------------
117 */
119 
120 /*------------------------------------------------------------------------------
121 ** Process an object request against the SYNC Object.
122 **------------------------------------------------------------------------------
123 ** Arguments:
124 ** psMsgBuffer - Pointer to ABCC command message.
125 **
126 ** Returns:
127 ** None
128 **------------------------------------------------------------------------------
129 */
130 EXTFUNC void SYNC_ProcessCmdMsg( ABP_MsgType* psNewMessage );
131 
132 /*------------------------------------------------------------------------------
133 ** Updates the input processing time reported to the ABCC upon request.
134 ** This value may be changed in runtime to reflect the timing required for the
135 ** current process data map.
136 **------------------------------------------------------------------------------
137 ** Arguments:
138 ** lInputProcTimeNs - Input processing time in nanoseconds
139 **
140 ** Returns:
141 ** None
142 **------------------------------------------------------------------------------
143 */
144 EXTFUNC void SYNC_SetInputProcessingTime( U32 lInputProcTimeNs );
145 
146 /*------------------------------------------------------------------------------
147 ** Updates the minimum cycle time reported to the ABCC upon request.
148 ** This value may be changed in runtime to reflect the timing required for the
149 ** current process data map.
150 **------------------------------------------------------------------------------
151 ** Arguments:
152 ** lMinCycleTimeNs - Minimum cycle time in nanoseconds
153 **
154 ** Returns:
155 ** None
156 **------------------------------------------------------------------------------
157 */
158 EXTFUNC void SYNC_SetMinCycleTime( U32 lMinCycleTimeNs );
159 
160 /*------------------------------------------------------------------------------
161 ** Updates the output processing time reported to the ABCC upon request.
162 ** This value may change in runtime to reflect the timing required for the
163 ** current process data map.
164 **------------------------------------------------------------------------------
165 ** Arguments:
166 ** lOutputProcTimeNs - Output processing time in nanoseconds
167 **
168 ** Returns:
169 ** None
170 **------------------------------------------------------------------------------
171 */
172 EXTFUNC void SYNC_SetOutputProcessingTime( U32 lOutputProcTimeNs );
173 
174 #endif
#define EXTFUNC
Definition: Defines.h:998
unsigned long U32
Binary 32-Bit unsigned integer datatype defenition.
Definition: Defines.h:203
EXTFUNC void SYNC_ProcessCmdMsg(ABP_MsgType *psNewMessage)
EXTFUNC void SYNC_SetInputProcessingTime(U32 lInputProcTimeNs)
EXTFUNC U32 SYNC_GetOutputValidTime(void)
SYNC_SyncMode
Definition: sync_obj.h:61
@ SYNC_MODE_NONSYNCHRONOUS
Definition: sync_obj.h:62
@ SYNC_MODE_SYNCHRONOUS
Definition: sync_obj.h:63
EXTFUNC SYNC_SyncModeType SYNC_GetMode(void)
EXTFUNC U32 SYNC_GetInputCaptureTime(void)
EXTFUNC U32 SYNC_GetCycleTime(void)
enum SYNC_SyncMode SYNC_SyncModeType
EXTFUNC void SYNC_SetMinCycleTime(U32 lMinCycleTimeNs)
EXTFUNC void SYNC_SetOutputProcessingTime(U32 lOutputProcTimeNs)