versadac  1
versadac - Scalable Recorder Firmware
fspmdev.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 device */
14 /* Component : fspmdev header */
15 /* $Workfile:: fspmdev.h $*/
16 /* $Revision:: 5 $*/
17 /* $Date:: 30/08/10 11:52 $*/
18 /* */
19 /*---------------------------------------------------------------------------*/
20 /* */
21 /* D e s c r i p t i o n : */
22 /* fal service protocole machine device header */
23 /* */
24 /*---------------------------------------------------------------------------*/
25 
26 #ifndef _FSPMDEV_H
27 #define _FSPMDEV_H
28 
29 APP_DWORD APP_FAR fspmdev_start_stack_device (LPST_MSG* ppMsg);
30 
31 APP_DWORD APP_FAR rm_init_cnf_neg (LPST_MSG* ppMsg);
32 APP_DWORD APP_FAR rm_init_cnf_pos (LPST_MSG* ppMsg);
33 APP_DWORD APP_FAR rm_stop_ind (LPST_MSG* ppMsg);
34 APP_DWORD APP_FAR asesm_read_rsp_neg (LPST_MSG* ppMsg);
35 APP_DWORD APP_FAR asesm_read_rsp_pos (LPST_MSG* ppMsg);
36 APP_DWORD APP_FAR asesm_write_rsp_neg (LPST_MSG* ppMsg);
37 APP_DWORD APP_FAR asesm_write_rsp_pos (LPST_MSG* ppMsg);
38 
39 
40 APP_DWORD APP_FAR asesm_alarm_req(LPST_MSG* ppMsg);
41 APP_DWORD APP_FAR asesm_ctrl_alarm_ack(LPST_MSG* ppMsg);
42 APP_DWORD APP_FAR asesm_dcontrol_rsp_pos(LPST_MSG* ppMsg);
43 APP_DWORD APP_FAR asesm_dcontrol_rsp_neg(LPST_MSG* ppMsg);
44 APP_DWORD APP_FAR asesm_ccontrol_req(LPST_MSG* ppMsg);
45 APP_DWORD APP_FAR cmdev_in_data_ind(LPST_MSG* ppMsg);
46 APP_DWORD APP_FAR cmdev_new_output_ind(LPST_MSG* ppMsg);
47 APP_DWORD APP_FAR cmdev_ccontrol_cnf_pos(LPST_MSG* ppMsg);
48 APP_DWORD APP_FAR cmdev_ccontrol_cnf_neg(LPST_MSG* ppMsg);
49 
50 APP_DWORD APP_FAR asesm_alamr_ack_req (LPST_MSG* ppMsg);
51 APP_DWORD APP_FAR asesm_connect_rsp_pos (LPST_MSG* ppMsg);
52 APP_DWORD APP_FAR asesm_connect_rsp_neg (LPST_MSG* ppMsg);
53 APP_DWORD APP_FAR asesm_release_rsp_pos (LPST_MSG* ppMsg);
54 APP_DWORD APP_FAR asesm_release_rsp_neg (LPST_MSG* ppMsg);
55 APP_DWORD APP_FAR asesm_abort_req (LPST_MSG* ppMsg);
56 APP_DWORD APP_FAR asesm_connect_rsp_pos (LPST_MSG* ppMsg);
57 APP_DWORD APP_FAR asesm_connect_rsp_neg (LPST_MSG* ppMsg);
58 APP_DWORD APP_FAR asesm_release_rsp_pos (LPST_MSG* ppMsg);
59 APP_DWORD APP_FAR asesm_release_rsp_neg (LPST_MSG* ppMsg);
60 APP_DWORD APP_FAR asesm_abort_req (LPST_MSG* ppMsg);
61 APP_DWORD APP_FAR asesm_app_rdy_req (LPST_MSG* ppMsg);
62 APP_DWORD APP_FAR asesm_end_of_parameter_rsp (LPST_MSG* ppMsg);
63 APP_DWORD APP_FAR alpmi_alarm_notification_cnf_pos (LPST_MSG* ppMsg);
64 APP_DWORD APP_FAR alpmi_alarm_notification_cnf_neg (LPST_MSG* ppMsg);
65 APP_DWORD APP_FAR almpi_alarm_ack (LPST_MSG* ppMsg);
66 APP_DWORD APP_FAR cmdev_abort_ind (LPST_MSG* ppMsg);
67 APP_DWORD APP_FAR alpmi_activate_cnf_neg (LPST_MSG* ppMsg);
68 APP_DWORD APP_FAR alpmi_activate_cnf_pos (LPST_MSG* ppMsg);
69 APP_DWORD APP_FAR alpmr_alarm_ack_cnf_pos (LPST_MSG* ppMsg);
70 APP_DWORD APP_FAR alpmr_alarm_ack_cnf_neg (LPST_MSG* ppMsg);
71 APP_DWORD APP_FAR alpmr_alarm_ind (LPST_MSG* ppMsg);
72 APP_DWORD APP_FAR cmdev_init_cnf_pos (LPST_MSG* ppMsg);
73 APP_DWORD APP_FAR cmdev_ccontrol_cnf (LPST_MSG* ppMsg);
74 APP_DWORD APP_FAR cmdev_connect_ind (LPST_MSG* ppMsg);
75 APP_DWORD APP_FAR cmdev_dcontrol_ind (LPST_MSG* ppMsg);
76 APP_DWORD APP_FAR cmdev_read_ind (LPST_MSG* ppMsg);
77 APP_DWORD APP_FAR cmdev_write_ind (LPST_MSG* ppMsg);
78 APP_DWORD APP_FAR cmdev_release_ind (LPST_MSG* ppMsg);
79 APP_DWORD APP_FAR cmdev_stopped_ind (LPST_MSG* ppMsg);
80 APP_DWORD APP_FAR rm_dcp_set_name (LPST_MSG* ppMsg);
81 APP_DWORD APP_FAR rm_dcp_set_ip (LPST_MSG* ppMsg);
82 APP_DWORD APP_FAR rm_dcp_set_blink (LPST_MSG* ppMsg);
83 APP_DWORD APP_FAR rm_dcp_set_reset_factory (LPST_MSG* ppMsg);
84 APP_DWORD APP_FAR rm_no_data_ind (LPST_MSG* ppMsg);
85 APP_DWORD APP_FAR cm_init_cnf_pos (LPST_MSG* ppMsg);
86 APP_DWORD APP_FAR cm_init_cnf_neg (LPST_MSG* ppMsg);
87 APP_DWORD APP_FAR asesm_dcp_set_name_rsp_pos (LPST_MSG* ppMsg);
88 APP_DWORD APP_FAR asesm_dcp_set_name_rsp_neg (LPST_MSG* ppMsg);
89 APP_DWORD APP_FAR asesm_dcp_set_ip_rsp_pos (LPST_MSG* ppMsg);
90 APP_DWORD APP_FAR asesm_dcp_set_ip_rsp_neg (LPST_MSG* ppMsg);
91 APP_DWORD APP_FAR asesm_dcp_set_blink_rsp_pos (LPST_MSG* ppMsg);
92 APP_DWORD APP_FAR asesm_dcp_set_reset_factory_rsp_pos(LPST_MSG* ppMsg);
93 APP_DWORD APP_FAR asesm_dcp_set_reset_factory_rsp_neg(LPST_MSG* ppMsg);
94 APP_DWORD APP_FAR alpmr_ack_cnf_neg (LPST_MSG* ppMsg);
95 APP_DWORD APP_FAR alpmr_ack_cnf_pos (LPST_MSG* ppMsg);
96 APP_DWORD APP_FAR asesm_pool_unlock_req (LPST_MSG* ppMsg);
97 #ifdef DHCP_ACTIVATE
98 APP_DWORD APP_FAR rm_dcp_dhcp_ind (LPST_MSG* ppMsg);
99 APP_DWORD APP_FAR asesm_dcp_dhcp_rsp_pos(LPST_MSG* ppMsg);
100 APP_DWORD APP_FAR asesm_dcp_dhcp_rsp_neg(LPST_MSG* ppMsg);
101 #endif /* DHCP_ACTIVATE */
102 
103 #ifdef NEW_INPUT_DATA_MODE
104 #define RETURN_FSPM_CPM_NEW_DATA_IND (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_FSPMDEV_DCP_NEW_DATA_IND; return SEND_MESSAGE
105 #endif
106 
107 #define RETURN_FSPM_DCP_SET_NAME_IND (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_FSPMDEV_DCP_SET_NAME_IND; return SEND_MESSAGE
108 #define RETURN_RMPM_SET_NAME_RSP_POS (*ppMsg)->dwQueue = ID_QUEUE_RMPM; (*ppMsg)->wCodeFnct = ID_RMPM_DCP_SET_NAME_CNF_POS; return SEND_MESSAGE
109 #define RETURN_RMPM_SET_NAME_RSP_NEG (*ppMsg)->dwQueue = ID_QUEUE_RMPM; (*ppMsg)->wCodeFnct = ID_RMPM_DCP_SET_NAME_CNF_NEG; return SEND_MESSAGE
110 
111 #define RETURN_FSPM_DCP_SET_IP_IND (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_FSPMDEV_DCP_SET_IP_IND; return SEND_MESSAGE
112 #define RETURN_RMPM_SET_IP_RSP_POS (*ppMsg)->dwQueue = ID_QUEUE_RMPM; (*ppMsg)->wCodeFnct = ID_RMPM_DCP_SET_IP_CNF_POS; return SEND_MESSAGE
113 #define RETURN_RMPM_SET_IP_RSP_NEG (*ppMsg)->dwQueue = ID_QUEUE_RMPM; (*ppMsg)->wCodeFnct = ID_RMPM_DCP_SET_IP_CNF_NEG; return SEND_MESSAGE
114 
115 #define RETURN_FSPM_DCP_SET_BLINK_IND (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_FSPMDEV_DCP_SET_BLINK_IND; return SEND_MESSAGE
116 #define RETURN_RMPM_SET_BLINK_RSP_POS (*ppMsg)->dwQueue = ID_QUEUE_RMPM; (*ppMsg)->wCodeFnct = ID_RMPM_DCP_SET_BLINK_CNF_POS; return SEND_MESSAGE
117 
118 #define RETURN_FSPM_DCP_SET_RESET_FACTORY_IND (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_FSPMDEV_DCP_SET_RESET_FACTORY_IND; return SEND_MESSAGE
119 #define RETURN_RMPM_SET_RESET_FACT_RSP_POS (*ppMsg)->dwQueue = ID_QUEUE_RMPM; (*ppMsg)->wCodeFnct = ID_RMPM_DCP_SET_RESET_FACTORY_CNF_POS; return SEND_MESSAGE
120 #define RETURN_RMPM_SET_RESET_FACT_RSP_NEG (*ppMsg)->dwQueue = ID_QUEUE_RMPM; (*ppMsg)->wCodeFnct = ID_RMPM_DCP_SET_RESET_FACTORY_CNF_NEG; return SEND_MESSAGE
121 
122 #ifdef DHCP_ACTIVATE
123 #define RETURN_FSPM_DCP_SET_DHCP_IND (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_FSPMDEV_DCP_SET_DHCP_IND; return SEND_MESSAGE
124 #define RETURN_RMPM_SET_DHCP_RSP_POS (*ppMsg)->dwQueue = ID_QUEUE_RMPM; (*ppMsg)->wCodeFnct = ID_RMPM_DCP_SET_DHCP_CNF_POS; return SEND_MESSAGE
125 #define RETURN_RMPM_SET_DHCP_RSP_NEG (*ppMsg)->dwQueue = ID_QUEUE_RMPM; (*ppMsg)->wCodeFnct = ID_RMPM_DCP_SET_DHCP_CNF_NEG; return SEND_MESSAGE
126 #endif /* DHCP_ACTIVATE */
127 
128 #define RETURN_FSPM_CONNECT_IND (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_FSPMDEV_CONNECT_IND; return SEND_MESSAGE
129 #define RETURN_CMDEV_CONNECT_RSP_POS (*ppMsg)->dwQueue = ID_QUEUE_CMDEV; (*ppMsg)->wCodeFnct = ID_CM_CONNECT_RSP_POS; return SEND_MESSAGE
130 #define RETURN_CMDEV_CONNECT_RSP_NEG (*ppMsg)->dwQueue = ID_QUEUE_CMDEV; (*ppMsg)->wCodeFnct = ID_CM_CONNECT_RSP_NEG; return SEND_MESSAGE
131 
132 #define RETURN_FSPM_READ_IND (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_FSPMDEV_READ_IND; return SEND_MESSAGE
133 #define RETURN_CMDEV_READ_RSP_POS (*ppMsg)->dwQueue = ID_QUEUE_CMDEV; (*ppMsg)->wCodeFnct = ID_CM_READ_RSP_POS; return SEND_MESSAGE
134 #define RETURN_CMDEV_READ_RSP_NEG (*ppMsg)->dwQueue = ID_QUEUE_CMDEV; (*ppMsg)->wCodeFnct = ID_CM_READ_RSP_NEG; return SEND_MESSAGE
135 
136 #define RETURN_FSPM_WRITE_IND (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_FSPMDEV_WRITE_IND; return SEND_MESSAGE
137 #define RETURN_CMDEV_WRITE_RSP_POS (*ppMsg)->dwQueue = ID_QUEUE_CMDEV; (*ppMsg)->wCodeFnct = ID_CM_WRITE_RSP_POS; return SEND_MESSAGE
138 #define RETURN_CMDEV_WRITE_RSP_NEG (*ppMsg)->dwQueue = ID_QUEUE_CMDEV; (*ppMsg)->wCodeFnct = ID_CM_WRITE_RSP_NEG; return SEND_MESSAGE
139 
140 #define RETURN_FSPM_RELEASE_IND (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_FSPMDEV_RELEASE_IND; return SEND_MESSAGE
141 #define RETURN_CMDEV_RELEASE_RSP_POS (*ppMsg)->dwQueue = ID_QUEUE_CMDEV; (*ppMsg)->wCodeFnct = ID_RM_RELEASE_RSP_POS; return SEND_MESSAGE
142 #define RETURN_CMDEV_RELEASE_RSP_NEG (*ppMsg)->dwQueue = ID_QUEUE_CMDEV; (*ppMsg)->wCodeFnct = ID_RM_RELEASE_RSP_NEG; return SEND_MESSAGE
143 
144 #define RETURN_FSPM_DCONTROL_IND (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_FSPMDEV_DCONTROL_IND; return SEND_MESSAGE
145 #define RETURN_CMDEV_DCONTROL_RSP_POS (*ppMsg)->dwQueue = ID_QUEUE_CMDEV; (*ppMsg)->wCodeFnct = ID_CM_DCONTROL_RSP_POS; return SEND_MESSAGE
146 #define RETURN_CMDEV_DCONTROL_RSP_NEG (*ppMsg)->dwQueue = ID_QUEUE_CMDEV; (*ppMsg)->wCodeFnct = ID_CM_DCONTROL_RSP_NEG; return SEND_MESSAGE
147 
148 #define RETURN_CMDEV_CCONTROL_REQ (*ppMsg)->dwQueue = ID_QUEUE_CMDEV; (*ppMsg)->wCodeFnct = ID_CM_CCONTROL_REQ; return SEND_MESSAGE
149 #define RETURN_FSPM_CCONTROL_CNF_POS (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_FSPMDEV_CCONTROL_RSP_POS; return SEND_MESSAGE
150 #define RETURN_FSPM_CCONTROL_CNF_NEG (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_FSPMDEV_CCONTROL_RSP_NEG; return SEND_MESSAGE
151 
152 #define RETURN_CMDEV_ABORT_CNF (*ppMsg)->dwQueue = ID_QUEUE_CMDEV; (*ppMsg)->wCodeFnct = ID_RM_ABORT_CNF; return SEND_MESSAGE
153 #define RETURN_CMDEV_ABORT_REQ (*ppMsg)->dwQueue = ID_QUEUE_CMDEV; (*ppMsg)->wCodeFnct = ID_CM_ABORT_REQ; return SEND_MESSAGE
154 
155 #define RETURN_FSPM_ABORT_IND (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_FSPMDEV_ABORT_IND; return SEND_MESSAGE
156 
157 #define RETURN_STTUP_INIT (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_STTUP_INIT; return SEND_MESSAGE
158 
159 #define RETURN_STTUP_INIT_CNF_POS (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_FSPMDEV_INIT_CNF_POS; return SEND_MESSAGE
160 #define RETURN_STTUP_INIT_CNF_NEG (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_FSPMDEV_INIT_CNF_NEG; return SEND_MESSAGE
161 
162 
163 #define SEND_STTUP_ALARM_CNF_NEG(lpMsg)\
164  lpMsg->dwQueue = ID_QUEUE_ASESM;\
165  lpMsg->wCodeFnct = ID_FSPMDEV_ALARM_NOTIFICATION_CNF_NEG;\
166  OsSendMessagePtr(gdwTaskID[ID_QUEUE_ASESM],&lpMsg,MSG_PRIO_NORMAL)
167 
168 
169 #define SEND_ALPMI_ALARM_NOTIFICATION(lpMsg)\
170  lpMsg->dwQueue = ID_QUEUE_ALM;\
171  lpMsg->wCodeFnct = ID_ALPMI_ALARM_REQ;\
172  OsSendMessagePtr(gdwTaskID[ID_QUEUE_ALM],&lpMsg,MSG_PRIO_NORMAL)
173 
174 #define RETURN_ALPMI_ALARM_NOTIFICATION (*ppMsg)->dwQueue = ID_QUEUE_ALM; (*ppMsg)->wCodeFnct = ID_ALPMI_ALARM_REQ; return SEND_MESSAGE
175 #define RETURN_FSPM_ALARM_NOTIFICATION_CNF_POS (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_FSPMDEV_ALARM_NOTIFICATION_CNF_POS; return SEND_MESSAGE
176 #define RETURN_FSPM_ALARM_NOTIFICATION_CNF_NEG (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_FSPMDEV_ALARM_NOTIFICATION_CNF_NEG; return SEND_MESSAGE
177 #define RETURN_FSPM_ALARM_ACK_IND (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_FSPMDEV_ALARM_ACK_IND; return SEND_MESSAGE
178 #define RETURN_ALPMR_ALARM_ACK (*ppMsg)->dwQueue = ID_QUEUE_ALM; (*ppMsg)->wCodeFnct = ID_ALPMR_ALARM_ACK_REQ; return SEND_MESSAGE
179 #define RETURN_ALPMR_CTRL_IND (*ppMsg)->dwQueue = ID_QUEUE_ASESM; (*ppMsg)->wCodeFnct = ID_STTUP_ALARM_CTRL_IND; return SEND_MESSAGE
180 
181 
182 #define SEND_MESSAGE_ALM_NEG_STTUP(ppMsg)\
183  (*ppMsg)->dwQueue = ID_QUEUE_ASESM;\
184  (*ppMsg)->wCodeFnct = ID_FSPMDEV_ALARM_NOTIFICATION_CNF_NEG;\
185  OsSendMessagePtr(gdwTaskID[ID_QUEUE_ASESM],(ppMsg),MSG_PRIO_NORMAL)
186 
187 
188 #endif /* _FSPMDEV_H */
Definition: message.h:1163