FreeHIL
Loading...
Searching...
No Matches
FH_DeviceAddress.h File Reference

File Map:
FH_Setup, Section FH_DeviceAddress
FH user should set the device (or card) address here
More...

Go to the source code of this file.

Macros

#define FH_RFCommunication_DeviceAddress   0x01

Detailed Description

File Map:
FH_Setup, Section FH_DeviceAddress
FH user should set the device (or card) address here

Attention
There are a total number of 1 attention (Attention 1) (FH user defined data) in this file where FH user shall insert some data
Other parts could be left intact

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_DeviceAddress.h.

Macro Definition Documentation

◆ FH_RFCommunication_DeviceAddress

#define FH_RFCommunication_DeviceAddress   0x01

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 here

Attention
FH_RFCommunication_Message is the structure for receiving the message frame from RobotFramework
The first data in this structure is the DeviceAddress
If a message (from RobotFramework) with a different DeviceAddress than the one set here is received, it will be ignored and not processed
Note
If there is just one device (or card), there is no need for the FH user to change the default address which is already 0x01
In this case, the address of the message in the message frame (in RobotFramework) shall be set to 01
==============================================================================
                      ##### 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

Definition at line 71 of file FH_DeviceAddress.h.

Referenced by FH_AI_RFCommunication(), FH_AO_RFCommunication(), FH_CAN_RFCommunication(), FH_DI_RFCommunication(), FH_DO_RFCommunication(), FH_PWMI_RFCommunication(), FH_PWMO_RFCommunication(), FH_RFCommunication_Receive(), and FH_UART_RFCommunication().