|
FreeHIL
|
File Map:
FH_Setup, Section FH_RFCommunication
This file is header file of the main source file of the communication between RobotFramework and the micro-controller on which FH source code is ported
The micro-controller on which FH source code is ported, could be simply utilized in a RS485 network
In other word, multiple devices or multiple cards could be simply utilized where every device or every card has its own address
Address of the device (or card) for every device (or card) is set by FH user in FH_DeviceAddress.h
An interested UART (called Communication Dedicated UART) by the FH user for the communication between RobotFramework and the micro-controller on which FH source code is ported, shall be dedicated
More...
Go to the source code of this file.
Functions | |
| FH_ErrorInfo | FH_RFCommunication () |
| This function verifies if a complete message from RobotFramework is received or not and if yes, calls the related function The micro-controller on which FH source code is ported, could be simply utilized in a RS485 network In other word, multiple devices or multiple cards could be simply utilized where every device or every card has its own address Address of the device (or card) for every device (or card) is set by FH user in FH_DeviceAddress.h An interested UART (called Communication Dedicated UART) by the FH user for the communication between RobotFramework and the micro-controller on which FH source code is ported, shall be dedicated . | |
| FH_ErrorInfo | FH_RFCommunication_Init () |
| This function initializes the Communication Dedicated UART The Communication Dedicated UART could be any interested UART of the micro-controller on which FH source code is ported FH user should call the initialization function of the interested UART here. | |
| FH_ErrorInfo | FH_RFCommunication_Send (char *DataString) |
| This function sends data through the Communication Dedicated UART The Communication Dedicated UART could be any interested UART of the micro-controller on which FH source code is ported FH user should call the send function of the interested UART here. | |
| FH_ErrorInfo | FH_RFCommunication_Receive () |
| This function is the main source of receiving a complete message from RobotFramework The micro-controller on which FH source code is ported, could be simply utilized in a RS485 network In other word, multiple devices or multiple cards could be simply utilized where every device or every card has its own address Address of the device (or card) for every device (or card) is set by FH user in FH_DeviceAddress.h An interested UART (called Communication Dedicated UART) by the FH user for the communication between RobotFramework and the micro-controller on which FH source code is ported, shall be dedicated . | |
File Map:
FH_Setup, Section FH_RFCommunication
This file is header file of the main source file of the communication between RobotFramework and the micro-controller on which FH source code is ported
The micro-controller on which FH source code is ported, could be simply utilized in a RS485 network
In other word, multiple devices or multiple cards could be simply utilized where every device or every card has its own address
Address of the device (or card) for every device (or card) is set by FH user in FH_DeviceAddress.h
An interested UART (called Communication Dedicated UART) by the FH user for the communication between RobotFramework and the micro-controller on which FH source code is ported, shall be dedicated
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_RFCommunication.h.
| FH_ErrorInfo FH_RFCommunication | ( | ) |
This function verifies if a complete message from RobotFramework is received or not and if yes, calls the related function
The micro-controller on which FH source code is ported, could be simply utilized in a RS485 network
In other word, multiple devices or multiple cards could be simply utilized where every device or every card has its own address
Address of the device (or card) for every device (or card) is set by FH user in FH_DeviceAddress.h
An interested UART (called Communication Dedicated UART) by the FH user for the communication between RobotFramework and the micro-controller on which FH source code is ported, shall be dedicated
.
| None |
==============================================================================
##### RobotFramework Example #####
==============================================================================
@{MessageData} = Create List ${DO01} ${DO_Set}
&{Message} = Create Dictionary DeviceAddress=${DeviceAddress_01} Function=${Function_DO} Command=${DO_Commands_SetStatus} Data=@{MessageData}
${Result} SendMessage &{Message}
Comments:
DO01 => It indicates the Digital Output 01
DO_Set => It indicates the Digital Output 01 shall be Set (DO_Reset indicates the Digital Output 01 shall be Reset)
DeviceAddress_01 => It shall be equal to the address of the device: FH_RFCommunication_DeviceAddress
Function_DO => It is the function in the message frame
DO_Commands_SetStatus => It is the command of the function in the message frame
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 at line 511 of file FH_RFCommunication.c.
References FH_ErrorInfo::error_code, FH_AI_RFCommunication(), FH_AO_RFCommunication(), FH_CAN_RFCommunication(), FH_DI_RFCommunication(), FH_DO_RFCommunication(), FH_ERROR_OK, FH_PWMI_RFCommunication(), FH_PWMO_RFCommunication(), FH_ResetErrorInfo(), fh_RFCommunication_Message, FH_RFCommunication_Receive(), FH_UART_RFCommunication(), RFCommunication_Function_AI, RFCommunication_Function_AO, RFCommunication_Function_CAN, RFCommunication_Function_DI, RFCommunication_Function_DO, RFCommunication_Function_PWMI, RFCommunication_Function_PWMO, and RFCommunication_Function_UART.
| FH_ErrorInfo FH_RFCommunication_Init | ( | ) |
This function initializes the Communication Dedicated UART
The Communication Dedicated UART could be any interested UART of the micro-controller on which FH source code is ported
FH user should call the initialization function of the interested UART here.
| None |
Definition at line 168 of file FH_RFCommunication.c.
References FH_ResetErrorInfo(), and FH_RFCommunication_ReceiveBufIndex.
| FH_ErrorInfo FH_RFCommunication_Receive | ( | ) |
This function is the main source of receiving a complete message from RobotFramework
The micro-controller on which FH source code is ported, could be simply utilized in a RS485 network
In other word, multiple devices or multiple cards could be simply utilized where every device or every card has its own address
Address of the device (or card) for every device (or card) is set by FH user in FH_DeviceAddress.h
An interested UART (called Communication Dedicated UART) by the FH user for the communication between RobotFramework and the micro-controller on which FH source code is ported, shall be dedicated
.
| None |
==============================================================================
##### RobotFramework Example #####
==============================================================================
@{MessageData} = Create List ${DO01} ${DO_Set}
&{Message} = Create Dictionary DeviceAddress=${DeviceAddress_01} Function=${Function_DO} Command=${DO_Commands_SetStatus} Data=@{MessageData}
${Result} SendMessage &{Message}
Comments:
DO01 => It indicates the Digital Output 01
DO_Set => It indicates the Digital Output 01 shall be Set (DO_Reset indicates the Digital Output 01 shall be Reset)
DeviceAddress_01 => It shall be equal to the address of the device: FH_RFCommunication_DeviceAddress
Function_DO => It is the function in the message frame
DO_Commands_SetStatus => It is the command of the function in the message frame
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 at line 312 of file FH_RFCommunication.c.
References FH_ErrorInfo::error_code, FH_ERROR_MessageFrame, FH_ERROR_NoInfo, FH_ERROR_OK, FH_ERROR_Timeout, FH_GlobalTimeCounter, FH_ResetErrorInfo(), FH_RFCommunication_DeviceAddress, fh_RFCommunication_Message, FH_RFCommunication_Message_DataIndex, FH_RFCommunication_MinCommandSize, FH_RFCommunication_ReceiveBuf, FH_RFCommunication_ReceiveBufIndex, FH_RFCommunication_ReceiveBufMaxTimeout, FH_RFCommunication_ReceiveBufReadIndex, fh_RFCommunication_State, RFCommunication_Command, RFCommunication_DataLength, RFCommunication_DeviceAddress, RFCommunication_Function, RFCommunication_STATE_Checksum, RFCommunication_STATE_Command, RFCommunication_STATE_Data, RFCommunication_STATE_DataLength, RFCommunication_STATE_DeviceAddress, RFCommunication_STATE_Function, RFCommunication_STATE_IDLE, and RFCommunication_STATE_MessageReceived.
Referenced by FH_RFCommunication().
| FH_ErrorInfo FH_RFCommunication_Send | ( | char * | DataString | ) |
This function sends data through the Communication Dedicated UART
The Communication Dedicated UART could be any interested UART of the micro-controller on which FH source code is ported
FH user should call the send function of the interested UART here.
| DataString | a null terminated string of data to be sent |
Definition at line 203 of file FH_RFCommunication.c.
References FH_ResetErrorInfo().
Referenced by FH_AI_RFCommunication(), FH_AO_RFCommunication(), FH_CAN_RFCommunication(), FH_DI_RFCommunication(), FH_DO_RFCommunication(), FH_PWMI_RFCommunication(), FH_PWMO_RFCommunication(), and FH_UART_RFCommunication().