51 * @brief This function is the basic function of handling RFCommunication (<b>RobotFramework</b> <b>C</b>ommunication) for all the <b>Commands</b> related to the <b>Function</b> <b>DO</b> (Digital Output)\n
52 * This function is called from <b>FH_RFCommunication()</b>
53 *
54 * @param fh_RFCommunication_Message
55 * The message frame set by <b>RobotFramework</b>
95 * @brief This function handles <b>FH_DO_Commands_Init</b> command\n
96 * There are 3 main items handled in this function as following:\n
97 * 1 - Verifying the health of the received message\n
98 * 2 - Setting the addresses of the functions in <b>FH_Functions</b>, Section <b>FH_DO</b> (Digital Output) to an array of function pointer\n
99 * 3 - Calling the related function in <b>FH_Functions</b>, Section <b>FH_DO</b> (Digital Output) according to the first parameter of the Data in the message frame
100 *
101 * @param fh_RFCommunication_Message
102 * The message frame set by <b>RobotFramework</b>
139FH_DO_Init_S (FH_DO_Init_FuncPtr); // Setting the address of the functions
140
141// Item 3 - Calling the related function in <b>FH_Functions</b>, Section <b>FH_DO</b> (Digital Output) according to the first parameter of the Data in the message frame
142FH_ResetErrorInfo(&fh_ErrorInfo); // Reset Error Information to default
143 fh_ErrorInfo = FH_DO_Init_C (fh_RFCommunication_Message, FH_DO_Init_FuncPtr); // Calling the related function according to the first parameter of the Data in the message frame
144return fh_ErrorInfo;
145}
146
147/**
148 * @brief This function handles <b>FH_DO_Commands_SetStatus</b> command\n
149 * There are 3 main items handled in this function as following:\n
150 * 1 - Verifying the health of the received message\n
151 * 2 - Setting the addresses of the functions in <b>FH_Functions</b>, Section <b>FH_DO</b> (Digital Output) to an array of function pointer\n
152 * 3 - Calling the related function in <b>FH_Functions</b>, Section <b>FH_DO</b> (Digital Output) according to the first parameter of the Data in the message frame
153 * (The second parameter resemble the digital data to be set as 1 or 0)
154 *
155 * @param fh_RFCommunication_Message
156 * The message frame set by <b>RobotFramework</b>
194 FH_DO_SetStatus_S (FH_DO_SetStatus_FuncPtr); // Setting the address of the functions
195
196// Item 3 - Calling the related function in <b>FH_Functions</b>, Section <b>FH_DO</b> (Digital Output) according to the first parameter of the Data in the message frame
197FH_ResetErrorInfo(&fh_ErrorInfo); // Reset Error Information to default
198 fh_ErrorInfo = FH_DO_SetStatus_C (fh_RFCommunication_Message, FH_DO_SetStatus_FuncPtr); // Calling the related function according to the first parameter of the Data in the message frame
199return fh_ErrorInfo;
200}
201
202/**
203 * @brief This function handles <b>FH_DO_ProcessCommand_InitMULTI</b> command\n
204 * With this function, mass initialization of up to 64 <b>DO</b> (Digital Output) is possible instead of just 1 <b>DO</b> (Digital Output)\n
205 * There are 3 main items handled in this function as following:\n
206 * 1 - Verifying the health of the received message\n
207 * 2 - Setting the addresses of the functions in <b>FH_Functions</b>, Section <b>FH_DO</b> (Digital Output) to an array of function pointer\n
208 * 3 - Calling the related function(s) in <b>FH_Functions</b>, Section <b>FH_DO</b> (Digital Output) according to the 8 first parameters of the Data in the message frame
209 * (The first 8 bytes resemble 64 bits and each bit resembles 1 <b>DO</b> (Digital Output) and if the bit is 1, the related <b>DO</b> (Digital Output) function will be called)
210 *
211 * @param fh_RFCommunication_Message
212 * The message frame set by <b>RobotFramework</b>
224 FF FF FF FF FF FF FF FF => Example data as the first 8 parameters of the Data in the message frame utilized as mask (In this example it means all 64 digital outputs shall be initialized)
225 DeviceAddress_01 => It shall be equal to the address of the device: FH_RFCommunication_DeviceAddress
226 Function_DO => It is the function in the message frame
227 DO_Commands_InitMULTI => It is the command of the function in the message frame
248FH_DO_Init_S (FH_DO_Init_FuncPtr); // Setting the address of the functions
249
250// Item 3 - Calling the related function(s) in <b>FH_Functions</b>, Section <b>FH_DO</b> (Digital Output) according to the 8 first parameters of the Data in the message frame
251// (8 bytes resemble 64 bits and each bit resembles 1 <b>DO</b> (Digital Output) and if the bit is 1, the related <b>DO</b> (Digital Output) function will be called)
252FH_ResetErrorInfo(&fh_ErrorInfo); // Reset Error Information to default
253 fh_ErrorInfo = FH_DO_InitMULTI_C (fh_RFCommunication_Message, FH_DO_Init_FuncPtr); // Calling the related function according to the first 8 parameters of Data in the message frame
254return fh_ErrorInfo;
255}
256
257/**
258 * @brief This function handles <b>FH_DO_ProcessCommand_SetStatusMULTI</b> command\n
259 * With this function, mass status set of up to 64 <b>DO</b> (Digital Output) is possible instead of just 1 <b>DO</b> (Digital Output)\n
260 * There are 3 main items handled in this function as following:\n
261 * 1 - Verifying the health of the received message\n
262 * 2 - Setting the addresses of the functions in <b>FH_Functions</b>, Section <b>FH_DO</b> (Digital Output) to an array of function pointer\n
263 * 3 - Calling the related function in <b>FH_Functions</b>, Section <b>FH_DO</b> (Digital Output) according to the 16 first parameters of the Data in the message frame\n
264 * (The first 8 bytes as mask resemble 64 bits and each bit resembles 1 <b>DO</b> (Digital Output) and if the bit is 1, the related <b>DO</b> (Digital Output) function will be called)\n
265 * (The second 8 bytes as data resemble 64 bits and each bit resembles status of 1 <b>DO</b> (Digital Output) as 1 or 0 of the corresponding bit in the first 8 bytes)
266 *
267 * @param fh_RFCommunication_Message
268 * The message frame set by <b>RobotFramework</b>
280 FF FF FF FF FF FF FF FF => Example data as the first 8 parameters of the Data in the message frame utilized as mask (In this example it means all 64 digital outputs shall set status)
281 01 02 03 04 05 06 07 08 => Example data as the second 8 parameters of the Data in the message frame as data value of 1 or 0, corresponding to the first 8 bytes)
282 DeviceAddress_01 => It shall be equal to the address of the device: FH_RFCommunication_DeviceAddress
283 Function_DO => It is the function in the message frame
284 DO_Commands_SetStatusMULTI => It is the command of the function in the message frame
305 FH_DO_SetStatus_S (FH_DO_SetStatus_FuncPtr); // Setting the address of the functions
306
307// 3 - Calling the related function in <b>FH_Functions</b>, Section <b>FH_DO</b> (Digital Output) according to the 16 first parameters of the Data in the message frame
308// (First 8 bytes as mask resemble 64 bits and each bit resembles 1 <b>DO</b> (Digital Output) and if the bit is 1, the related <b>DO</b> (Digital Output) function will be called)
309// (Second 8 bytes as data resemble 64 bits and each bit resembles status of 1 <b>DO</b> (Digital Output) as 1 or 0 of the corresponding bit in the first 8 bytes)
310FH_ResetErrorInfo(&fh_ErrorInfo); // Reset Error Information to default
311 fh_ErrorInfo = FH_DO_SetStatusMULTI_C (fh_RFCommunication_Message, FH_DO_SetStatus_FuncPtr); // Calling the related function according to the first 8 parameters of the Data in the message frame