|
FreeHIL
|
File Map:
FH_Root, Section FH_Perif, FH_CAN
Functions in this file, handle RFCommunication (RobotFramework Communication) for all commands related to CAN
More...
#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/FH_CAN.h"#include "stdio.h"#include "../../../../FH_Embedded/FH_Root/FH_General/FH_GeneralFunctions/FH_GeneralFunctions.h"#include "../../../../FH_Embedded/FH_Setup/FH_DeviceAddress/FH_DeviceAddress.h"#include "../../../../FH_Embedded/FH_Setup/FH_RFCommunication/FH_RFCommunication.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/Init/Init_H/FH_CAN_Init_H.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/Init/Init_C/FH_CAN_Init_C.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/Init/Init_S/FH_CAN_Init_S.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/Send/Send_H/FH_CAN_Send_H.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/Send/Send_C/FH_CAN_Send_C.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/Send/Send_S/FH_CAN_Send_S.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/Receive/Receive_H/FH_CAN_Receive_H.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/Receive/Receive_C/FH_CAN_Receive_C.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/Receive/Receive_S/FH_CAN_Receive_S.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/ReceiveW/ReceiveW_H/FH_CAN_ReceiveW_H.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/ReceiveW/ReceiveW_C/FH_CAN_ReceiveW_C.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/ReceiveW/ReceiveW_S/FH_CAN_ReceiveW_S.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/ResetRB/ResetRB_H/FH_CAN_ResetRB_H.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/ResetRB/ResetRB_C/FH_CAN_ResetRB_C.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/ResetRB/ResetRB_S/FH_CAN_ResetRB_S.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/SSD8/SSD8_H/FH_CAN_SSD8_H.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/SSD8/SSD8_C/FH_CAN_SSD8_C.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/SSD8/SSD8_S/FH_CAN_SSD8_S.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/SSD16/SSD16_H/FH_CAN_SSD16_H.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/SSD16/SSD16_C/FH_CAN_SSD16_C.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/SSD16/SSD16_S/FH_CAN_SSD16_S.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/SSD32/SSD32_H/FH_CAN_SSD32_H.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/SSD32/SSD32_C/FH_CAN_SSD32_C.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/SSD32/SSD32_S/FH_CAN_SSD32_S.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/GSD8/GSD8_H/FH_CAN_GSD8_H.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/GSD8/GSD8_C/FH_CAN_GSD8_C.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/GSD8/GSD8_S/FH_CAN_GSD8_S.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/GSD16/GSD16_H/FH_CAN_GSD16_H.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/GSD16/GSD16_C/FH_CAN_GSD16_C.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/GSD16/GSD16_S/FH_CAN_GSD16_S.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/GSD32/GSD32_H/FH_CAN_GSD32_H.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/GSD32/GSD32_C/FH_CAN_GSD32_C.h"#include "../../../../FH_Embedded/FH_Root/FH_Perif/FH_CAN/Cmd/GSD32/GSD32_S/FH_CAN_GSD32_S.h"Go to the source code of this file.
Functions | |
| FH_ErrorInfo | FH_CAN_RFCommunication (FH_RFCommunication_Message *fh_RFCommunication_Message) |
| This function is the basic function of handling RFCommunication (RobotFramework Communication) for all the Commands related to the Function CAN This function is called from FH_RFCommunication(). | |
| FH_ErrorInfo | FH_CAN_ProcessCommand_Init (FH_RFCommunication_Message *fh_RFCommunication_Message) |
| This function handles FH_CAN_Commands_Init command There are 3 main items handled in this function as following: 1 - Verifying the health of the received message 2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer 3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame. | |
| FH_ErrorInfo | FH_CAN_ProcessCommand_Send (FH_RFCommunication_Message *fh_RFCommunication_Message) |
| This function handles FH_CAN_Commands_Send command There are 3 main items handled in this function as following: 1 - Verifying the health of the received message 2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer 3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame (The next parameters after the first one, resemble the data to be sent). | |
| FH_ErrorInfo | FH_CAN_ProcessCommand_Receive (FH_RFCommunication_Message *fh_RFCommunication_Message, uint8_t *FH_CAN_ReceiveData, uint8_t *FH_CAN_DataSize) |
| This function handles FH_CAN_Commands_Receive command There are 3 main items handled in this function as following: 1 - Verifying the health of the received message 2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer 3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame. | |
| FH_ErrorInfo | FH_CAN_ProcessCommand_ReceiveW (FH_RFCommunication_Message *fh_RFCommunication_Message, uint8_t *FH_CAN_ReceiveData, uint8_t *FH_CAN_DataSize) |
| This function handles FH_CAN_Commands_ReceiveW command There are 3 main items handled in this function as following: 1 - Verifying the health of the received message 2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer 3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame (The 2nd parameter after the first one, resembles the expected number of bytes of data to be received) (The next 4 parameters, resemble the timeout of receiving the expected number of bytes). | |
| FH_ErrorInfo | FH_CAN_ProcessCommand_ResetRB (FH_RFCommunication_Message *fh_RFCommunication_Message) |
| This function handles FH_CAN_Commands_ResetRB command There are 3 main items handled in this function as following: 1 - Verifying the health of the received message 2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer 3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame. | |
| FH_ErrorInfo | FH_CAN_ProcessCommand_SSD8 (FH_RFCommunication_Message *fh_RFCommunication_Message) |
| This function handles FH_CAN_Commands_SSD8 command There are 3 main items handled in this function as following: 1 - Verifying the health of the received message 2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer 3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame (The 2nd parameter after the first one, resembles the interested length of the 8 bit data to be set) (The next parameters, resemble the data to be set in FH_CAN01_SharedDataBuf_8Bits). | |
| FH_ErrorInfo | FH_CAN_ProcessCommand_SSD16 (FH_RFCommunication_Message *fh_RFCommunication_Message) |
| This function handles FH_CAN_Commands_SSD16 command There are 3 main items handled in this function as following: 1 - Verifying the health of the received message 2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer 3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame (The 2nd parameter after the first one, resembles the interested length of the 16 bit data to be set) (The next parameters, resemble the data to be set in FH_CAN01_SharedDataBuf_16Bits). | |
| FH_ErrorInfo | FH_CAN_ProcessCommand_SSD32 (FH_RFCommunication_Message *fh_RFCommunication_Message) |
| This function handles FH_CAN_Commands_SSD32 command There are 3 main items handled in this function as following: 1 - Verifying the health of the received message 2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer 3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame (The 2nd parameter after the first one, resembles the interested length of the 32 bit data to be set) (The next parameters, resemble the data to be set in FH_CAN01_SharedDataBuf_32Bits). | |
| FH_ErrorInfo | FH_CAN_ProcessCommand_GSD8 (FH_RFCommunication_Message *fh_RFCommunication_Message, uint8_t *FH_CAN_DataLength, uint8_t *FH_CAN_FH_CAN_Data) |
| This function handles FH_CAN_Commands_GSD8 command There are 3 main items handled in this function as following: 1 - Verifying the health of the received message 2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer 3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame. | |
| FH_ErrorInfo | FH_CAN_ProcessCommand_GSD16 (FH_RFCommunication_Message *fh_RFCommunication_Message, uint8_t *FH_CAN_DataLength, uint8_t *FH_CAN_FH_CAN_Data) |
| This function handles FH_CAN_Commands_GSD16 command There are 3 main items handled in this function as following: 1 - Verifying the health of the received message 2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer 3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame. | |
| FH_ErrorInfo | FH_CAN_ProcessCommand_GSD32 (FH_RFCommunication_Message *fh_RFCommunication_Message, uint8_t *FH_CAN_DataLength, uint8_t *FH_CAN_FH_CAN_Data) |
| This function handles FH_CAN_Commands_GSD32 command There are 3 main items handled in this function as following: 1 - Verifying the health of the received message 2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer 3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame. | |
File Map:
FH_Root, Section FH_Perif, FH_CAN
Functions in this file, handle RFCommunication (RobotFramework Communication) for all commands related to CAN
SPDX-License-Identifier: Apache-2.0
Copyright 2026 Vahid Hasirchi
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
For more information refer to FreeHIL.com
Definition in file FH_CAN.c.
| FH_ErrorInfo FH_CAN_ProcessCommand_GSD16 | ( | FH_RFCommunication_Message * | fh_RFCommunication_Message, |
| uint8_t * | FH_CAN_DataLength, | ||
| uint8_t * | FH_CAN_FH_CAN_Data ) |
This function handles FH_CAN_Commands_GSD16 command
There are 3 main items handled in this function as following:
1 - Verifying the health of the received message
2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer
3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame.
| fh_RFCommunication_Message | The message frame set by RobotFramework |
==============================================================================
##### RobotFramework Example #####
==============================================================================
@{MessageData} = Create List ${CAN01}
&{Message} = Create Dictionary DeviceAddress=${DeviceAddress_01} Function=${Function_CAN} Command=${CAN_Commands_GSD16} Data=@{MessageData}
${Result} SendMessage &{Message}
Comments:
CAN01 => It indicates the CAN 01
DeviceAddress_01 => It shall be equal to the address of the device: FH_RFCommunication_DeviceAddress
Function_CAN => It is the function in the message frame
CAN_Commands_GSD16 => It is the command of the function in the message frame
Definition at line 733 of file FH_CAN.c.
References FH_ErrorInfo::error_code, FH_CAN_GSD16_C(), FH_CAN_GSD16_H(), FH_CAN_GSD16_S(), FH_CAN_MaxPeripheralNumber, FH_ERROR_OK, FH_ResetErrorInfo(), and fh_RFCommunication_Message.
Referenced by FH_CAN_RFCommunication().
| FH_ErrorInfo FH_CAN_ProcessCommand_GSD32 | ( | FH_RFCommunication_Message * | fh_RFCommunication_Message, |
| uint8_t * | FH_CAN_DataLength, | ||
| uint8_t * | FH_CAN_FH_CAN_Data ) |
This function handles FH_CAN_Commands_GSD32 command
There are 3 main items handled in this function as following:
1 - Verifying the health of the received message
2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer
3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame.
| fh_RFCommunication_Message | The message frame set by RobotFramework |
==============================================================================
##### RobotFramework Example #####
==============================================================================
@{MessageData} = Create List ${CAN01}
&{Message} = Create Dictionary DeviceAddress=${DeviceAddress_01} Function=${Function_CAN} Command=${CAN_Commands_GSD32} Data=@{MessageData}
${Result} SendMessage &{Message}
Comments:
CAN01 => It indicates the CAN 01
DeviceAddress_01 => It shall be equal to the address of the device: FH_RFCommunication_DeviceAddress
Function_CAN => It is the function in the message frame
CAN_Commands_GSD32 => It is the command of the function in the message frame
Definition at line 786 of file FH_CAN.c.
References FH_ErrorInfo::error_code, FH_CAN_GSD32_C(), FH_CAN_GSD32_H(), FH_CAN_GSD32_S(), FH_CAN_MaxPeripheralNumber, FH_ERROR_OK, FH_ResetErrorInfo(), and fh_RFCommunication_Message.
Referenced by FH_CAN_RFCommunication().
| FH_ErrorInfo FH_CAN_ProcessCommand_GSD8 | ( | FH_RFCommunication_Message * | fh_RFCommunication_Message, |
| uint8_t * | FH_CAN_DataLength, | ||
| uint8_t * | FH_CAN_FH_CAN_Data ) |
This function handles FH_CAN_Commands_GSD8 command
There are 3 main items handled in this function as following:
1 - Verifying the health of the received message
2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer
3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame.
| fh_RFCommunication_Message | The message frame set by RobotFramework |
==============================================================================
##### RobotFramework Example #####
==============================================================================
@{MessageData} = Create List ${CAN01}
&{Message} = Create Dictionary DeviceAddress=${DeviceAddress_01} Function=${Function_CAN} Command=${CAN_Commands_GSD8} Data=@{MessageData}
${Result} SendMessage &{Message}
Comments:
CAN01 => It indicates the CAN 01
DeviceAddress_01 => It shall be equal to the address of the device: FH_RFCommunication_DeviceAddress
Function_CAN => It is the function in the message frame
CAN_Commands_GSD8 => It is the command of the function in the message frame
Definition at line 680 of file FH_CAN.c.
References FH_ErrorInfo::error_code, FH_CAN_GSD8_C(), FH_CAN_GSD8_H(), FH_CAN_GSD8_S(), FH_CAN_MaxPeripheralNumber, FH_ERROR_OK, FH_ResetErrorInfo(), and fh_RFCommunication_Message.
Referenced by FH_CAN_RFCommunication().
| FH_ErrorInfo FH_CAN_ProcessCommand_Init | ( | FH_RFCommunication_Message * | fh_RFCommunication_Message | ) |
This function handles FH_CAN_Commands_Init command
There are 3 main items handled in this function as following:
1 - Verifying the health of the received message
2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer
3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame.
| fh_RFCommunication_Message | The message frame set by RobotFramework |
==============================================================================
##### RobotFramework Example #####
==============================================================================
@{MessageData} = Create List ${CAN01}
&{Message} = Create Dictionary DeviceAddress=${DeviceAddress_01} Function=${Function_CAN} Command=${CAN_Commands_Init} Data=@{MessageData}
${Result} SendMessage &{Message}
Comments:
CAN01 => It indicates the CAN 01
DeviceAddress_01 => It shall be equal to the address of the device: FH_RFCommunication_DeviceAddress
Function_CAN => It is the function in the message frame
CAN_Commands_Init => It is the command of the function in the message frame
Definition at line 241 of file FH_CAN.c.
References FH_ErrorInfo::error_code, FH_CAN_Init_C(), FH_CAN_Init_H(), FH_CAN_Init_S(), FH_CAN_MaxPeripheralNumber, FH_ERROR_OK, FH_ResetErrorInfo(), and fh_RFCommunication_Message.
Referenced by FH_CAN_RFCommunication().
| FH_ErrorInfo FH_CAN_ProcessCommand_Receive | ( | FH_RFCommunication_Message * | fh_RFCommunication_Message, |
| uint8_t * | FH_CAN_ReceiveData, | ||
| uint8_t * | FH_CAN_DataSize ) |
This function handles FH_CAN_Commands_Receive command
There are 3 main items handled in this function as following:
1 - Verifying the health of the received message
2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer
3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame.
| fh_RFCommunication_Message | The message frame set by RobotFramework |
==============================================================================
##### RobotFramework Example #####
==============================================================================
@{MessageData} = Create List ${CAN01}
&{Message} = Create Dictionary DeviceAddress=${DeviceAddress_01} Function=${Function_CAN} Command=${CAN_Commands_Receive} Data=@{MessageData}
${Result} SendMessage &{Message}
Comments:
CAN01 => It indicates the CAN 01
DeviceAddress_01 => It shall be equal to the address of the device: FH_RFCommunication_DeviceAddress
Function_CAN => It is the function in the message frame
CAN_Commands_Receive => It is the command of the function in the message frame
Definition at line 349 of file FH_CAN.c.
References FH_ErrorInfo::error_code, FH_CAN_MaxPeripheralNumber, FH_ERROR_OK, FH_ResetErrorInfo(), and fh_RFCommunication_Message.
Referenced by FH_CAN_RFCommunication().
| FH_ErrorInfo FH_CAN_ProcessCommand_ReceiveW | ( | FH_RFCommunication_Message * | fh_RFCommunication_Message, |
| uint8_t * | FH_CAN_ReceiveData, | ||
| uint8_t * | FH_CAN_DataSize ) |
This function handles FH_CAN_Commands_ReceiveW command
There are 3 main items handled in this function as following:
1 - Verifying the health of the received message
2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer
3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame
(The 2nd parameter after the first one, resembles the expected number of bytes of data to be received)
(The next 4 parameters, resemble the timeout of receiving the expected number of bytes).
| fh_RFCommunication_Message | The message frame set by RobotFramework |
==============================================================================
##### RobotFramework Example #####
==============================================================================
@{MessageData} = Create List ${CAN01} 05 00 00 0B B8
&{Message} = Create Dictionary DeviceAddress=${DeviceAddress_01} Function=${Function_CAN} Command=${CAN_Commands_ReceiveW} Data=@{MessageData}
${Result} SendMessage &{Message}
Comments:
CAN01 => It indicates the CAN 01
05 => The expected number of bytes of data to be received through the <b>ISR</b> (Interrupt Service Routine) receive buffer (FH_CAN01_ReceiveBuf) of the <b>CAN 01</b>
00 00 0B B8 => Example data (0x00000BB8 mili-seconds) as timeout of receiving the expected number of bytes
FH_GlobalTimeCounter which is a global variable is utilized to calculate the timeout
FH_GlobalTimeCounter shall be incremented every <b>1 mili-second</b> in an interested timer <b>ISR</b> (Interrupt Service Routine) by <b>FH</b> user
For this to happen, <b>FH_GlobalTimerCount.h</b> shall be included in the interested timer <b>ISR</b> (Interrupt Service Routine) file
If the expected number of bytes are received, the function does not wait anymore for the remaining time of the timeout
DeviceAddress_01 => It shall be equal to the address of the device: FH_RFCommunication_DeviceAddress
Function_CAN => It is the function in the message frame
CAN_Commands_ReceiveW => It is the command of the function in the message frame
Definition at line 410 of file FH_CAN.c.
References FH_ErrorInfo::error_code, FH_CAN_MaxPeripheralNumber, FH_ERROR_OK, FH_ResetErrorInfo(), and fh_RFCommunication_Message.
Referenced by FH_CAN_RFCommunication().
| FH_ErrorInfo FH_CAN_ProcessCommand_ResetRB | ( | FH_RFCommunication_Message * | fh_RFCommunication_Message | ) |
This function handles FH_CAN_Commands_ResetRB command
There are 3 main items handled in this function as following:
1 - Verifying the health of the received message
2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer
3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame.
| fh_RFCommunication_Message | The message frame set by RobotFramework |
==============================================================================
##### RobotFramework Example #####
==============================================================================
@{MessageData} = Create List ${CAN01}
&{Message} = Create Dictionary DeviceAddress=${DeviceAddress_01} Function=${Function_CAN} Command=${CAN_Commands_ResetRB} Data=@{MessageData}
${Result} SendMessage &{Message}
Comments:
CAN01 => It indicates the CAN 01
DeviceAddress_01 => It shall be equal to the address of the device: FH_RFCommunication_DeviceAddress
Function_CAN => It is the function in the message frame
CAN_Commands_ResetRB => It is the command of the function in the message frame
Definition at line 465 of file FH_CAN.c.
References FH_ErrorInfo::error_code, FH_CAN_MaxPeripheralNumber, FH_ERROR_OK, FH_ResetErrorInfo(), and fh_RFCommunication_Message.
Referenced by FH_CAN_RFCommunication().
| FH_ErrorInfo FH_CAN_ProcessCommand_Send | ( | FH_RFCommunication_Message * | fh_RFCommunication_Message | ) |
This function handles FH_CAN_Commands_Send command
There are 3 main items handled in this function as following:
1 - Verifying the health of the received message
2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer
3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame (The next parameters after the first one, resemble the data to be sent).
| fh_RFCommunication_Message | The message frame set by RobotFramework |
==============================================================================
##### RobotFramework Example #####
==============================================================================
@{MessageData} = Create List ${CAN01} 02 B1 FF
&{Message} = Create Dictionary DeviceAddress=${DeviceAddress_01} Function=${Function_CAN} Command=${CAN_Commands_Send} Data=@{MessageData}
${Result} SendMessage &{Message}
Comments:
CAN01 => It indicates the CAN 01
02 => Example length of the data to be sent
B1 FF => Example data (0xB1, 0xFF) to be sent (or apart from the data to be sent, it may include some other data like ID, Filter, ... to be processed too, if need be) through the <b>CAN 01</b>\n
DeviceAddress_01 => It shall be equal to the address of the device: FH_RFCommunication_DeviceAddress
Function_CAN => It is the function in the message frame
CAN_Commands_Send => It is the command of the function in the message frame
Definition at line 296 of file FH_CAN.c.
References FH_ErrorInfo::error_code, FH_CAN_MaxPeripheralNumber, FH_CAN_Send_C(), FH_CAN_Send_H(), FH_CAN_Send_S(), FH_ERROR_OK, FH_ResetErrorInfo(), and fh_RFCommunication_Message.
Referenced by FH_CAN_RFCommunication().
| FH_ErrorInfo FH_CAN_ProcessCommand_SSD16 | ( | FH_RFCommunication_Message * | fh_RFCommunication_Message | ) |
This function handles FH_CAN_Commands_SSD16 command
There are 3 main items handled in this function as following:
1 - Verifying the health of the received message
2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer
3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame
(The 2nd parameter after the first one, resembles the interested length of the 16 bit data to be set)
(The next parameters, resemble the data to be set in FH_CAN01_SharedDataBuf_16Bits).
| fh_RFCommunication_Message | The message frame set by RobotFramework |
==============================================================================
##### RobotFramework Example #####
==============================================================================
@{MessageData} = Create List ${CAN01} 02 AA BB CC DD
&{Message} = Create Dictionary DeviceAddress=${DeviceAddress_01} Function=${Function_CAN} Command=${CAN_Commands_SSD16} Data=@{MessageData}
${Result} SendMessage &{Message}
Comments:
CAN01 => It indicates the CAN 01
02 => Example interested length of the 16 bit data to be set
AA BB CC DD => Example data (0xAABB and 0xCCDD) to be set in <b>FH_CAN01_SharedDataBuf_16Bits</b>
DeviceAddress_01 => It shall be equal to the address of the device: FH_RFCommunication_DeviceAddress
Function_CAN => It is the function in the message frame
CAN_Commands_SSD16 => It is the command of the function in the message frame
Definition at line 576 of file FH_CAN.c.
References FH_ErrorInfo::error_code, FH_CAN_MaxPeripheralNumber, FH_CAN_SSD16_C(), FH_CAN_SSD16_H(), FH_CAN_SSD16_S(), FH_ERROR_OK, FH_ResetErrorInfo(), and fh_RFCommunication_Message.
Referenced by FH_CAN_RFCommunication().
| FH_ErrorInfo FH_CAN_ProcessCommand_SSD32 | ( | FH_RFCommunication_Message * | fh_RFCommunication_Message | ) |
This function handles FH_CAN_Commands_SSD32 command
There are 3 main items handled in this function as following:
1 - Verifying the health of the received message
2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer
3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame
(The 2nd parameter after the first one, resembles the interested length of the 32 bit data to be set)
(The next parameters, resemble the data to be set in FH_CAN01_SharedDataBuf_32Bits).
| fh_RFCommunication_Message | The message frame set by RobotFramework |
==============================================================================
##### RobotFramework Example #####
==============================================================================
@{MessageData} = Create List ${CAN01} 02 AA BB CC DD 01 02 03 04
&{Message} = Create Dictionary DeviceAddress=${DeviceAddress_01} Function=${Function_CAN} Command=${CAN_Commands_SSD32} Data=@{MessageData}
${Result} SendMessage &{Message}
Comments:
CAN01 => It indicates the CAN 01
02 => Example interested length of the 32 bit data to be set
AA BB CC DD 01 02 03 04 => Example data (0xAABBCCDD and 0x01020304) to be set in <b>FH_CAN01_SharedDataBuf_32Bits</b>
DeviceAddress_01 => It shall be equal to the address of the device: FH_RFCommunication_DeviceAddress
Function_CAN => It is the function in the message frame
CAN_Commands_SSD32 => It is the command of the function in the message frame
Definition at line 630 of file FH_CAN.c.
References FH_ErrorInfo::error_code, FH_CAN_MaxPeripheralNumber, FH_CAN_SSD32_C(), FH_CAN_SSD32_H(), FH_CAN_SSD32_S(), FH_ERROR_OK, FH_ResetErrorInfo(), and fh_RFCommunication_Message.
Referenced by FH_CAN_RFCommunication().
| FH_ErrorInfo FH_CAN_ProcessCommand_SSD8 | ( | FH_RFCommunication_Message * | fh_RFCommunication_Message | ) |
This function handles FH_CAN_Commands_SSD8 command
There are 3 main items handled in this function as following:
1 - Verifying the health of the received message
2 - Setting the addresses of the functions in FH_Functions, Section FH_CAN to an array of function pointer
3 - Calling the related function in FH_Functions, Section FH_CAN according to the first parameter of the Data in the message frame
(The 2nd parameter after the first one, resembles the interested length of the 8 bit data to be set)
(The next parameters, resemble the data to be set in FH_CAN01_SharedDataBuf_8Bits).
| fh_RFCommunication_Message | The message frame set by RobotFramework |
==============================================================================
##### RobotFramework Example #####
==============================================================================
@{MessageData} = Create List ${CAN01} 04 AA BB CC DD
&{Message} = Create Dictionary DeviceAddress=${DeviceAddress_01} Function=${Function_CAN} Command=${CAN_Commands_SSD8} Data=@{MessageData}
${Result} SendMessage &{Message}
Comments:
CAN01 => It indicates the CAN 01
04 => Example interested length of the 8 bit data to be set
AA BB CC DD => Example data (0xAA, 0xBB, 0xCC, 0xDD) to be set in <b>FH_CAN01_SharedDataBuf_8Bits</b>
DeviceAddress_01 => It shall be equal to the address of the device: FH_RFCommunication_DeviceAddress
Function_CAN => It is the function in the message frame
CAN_Commands_SSD8 => It is the command of the function in the message frame
Definition at line 522 of file FH_CAN.c.
References FH_ErrorInfo::error_code, FH_CAN_MaxPeripheralNumber, FH_CAN_SSD8_C(), FH_CAN_SSD8_H(), FH_CAN_SSD8_S(), FH_ERROR_OK, FH_ResetErrorInfo(), and fh_RFCommunication_Message.
Referenced by FH_CAN_RFCommunication().
| FH_ErrorInfo FH_CAN_RFCommunication | ( | FH_RFCommunication_Message * | fh_RFCommunication_Message | ) |
This function is the basic function of handling RFCommunication (RobotFramework Communication) for all the Commands related to the Function CAN
This function is called from FH_RFCommunication().
| fh_RFCommunication_Message | The message frame set by RobotFramework |
Definition at line 88 of file FH_CAN.c.
References FH_ErrorInfo::error_code, FH_CAN_Commands_GSD16, FH_CAN_Commands_GSD32, FH_CAN_Commands_GSD8, FH_CAN_Commands_Init, FH_CAN_Commands_Receive, FH_CAN_Commands_ReceiveW, FH_CAN_Commands_ResetRB, FH_CAN_Commands_Send, FH_CAN_Commands_SSD16, FH_CAN_Commands_SSD32, FH_CAN_Commands_SSD8, FH_CAN_ProcessCommand_GSD16(), FH_CAN_ProcessCommand_GSD32(), FH_CAN_ProcessCommand_GSD8(), FH_CAN_ProcessCommand_Init(), FH_CAN_ProcessCommand_Receive(), FH_CAN_ProcessCommand_ReceiveW(), FH_CAN_ProcessCommand_ResetRB(), FH_CAN_ProcessCommand_Send(), FH_CAN_ProcessCommand_SSD16(), FH_CAN_ProcessCommand_SSD32(), FH_CAN_ProcessCommand_SSD8(), FH_ResetErrorInfo(), FH_RFCommunication_DeviceAddress, fh_RFCommunication_Message, FH_RFCommunication_Send(), FH_RFCommunication_SendBuf, and FH_RFCommunication_SendBufLength.
Referenced by FH_RFCommunication().