FreeHIL
Loading...
Searching...
No Matches
FH_DeviceAddress.h
Go to the documentation of this file.
1/**
2 * @file
3 * @brief
4 * <b>File Map:</b>\n
5 * <b>FH_Setup</b>, Section <b>FH_DeviceAddress</b> \n
6 * <b>FH</b> user should set the device (or card) address here\n
7 *
8 * @attention There are a total number of <b>1 attention</b> (Attention 1) (<b>FH</b> user defined data) in this file where <b>FH</b> user shall insert some data\n
9 * Other parts could be left intact
10 *
11 *******************************************************************************
12 * SPDX-License-Identifier: Apache-2.0
13 *
14 * Copyright 2026 Vahid Hasirchi
15 *
16 * Licensed under the Apache License, Version 2.0 (the "License");
17 * you may not use this file except in compliance with the License.
18 * You may obtain a copy of the License at
19 *
20 * http://www.apache.org/licenses/LICENSE-2.0
21 *
22 * Unless required by applicable law or agreed to in writing, software
23 * distributed under the License is distributed on an "AS IS" BASIS,
24 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 * See the License for the specific language governing permissions and
26 * limitations under the License.
27 ********************************************************************************
28
29 *
30 * <b>For more information refer to FreeHIL.com</b>
31 *
32*/
33/* Define to prevent recursive inclusion -------------------------------------*/
34#ifndef FH_DeviceAddress_H
35#define FH_DeviceAddress_H
36
37/*!
38 The micro-controller on which <b>FH</b> source code is ported, could be simply utilized in a <b>RS485 network</b>\n
39 In other word, multiple devices or multiple cards could be simply utilized where every device or every card has its own address\n
40 Address of the device (or card) for every device (or card) is set here\n
41
42 @attention
43 FH_RFCommunication_Message is the structure for receiving the message frame from <b>RobotFramework</b>\n
44 The first data in this structure is the <b>DeviceAddress</b>\n
45 If a message (from <b>RobotFramework</b>) with a different <b>DeviceAddress</b> than the one set here is received, it will be ignored and not processed
46
47 @note
48 If there is just one device (or card), there is no need for the <b>FH</b> user to change the default address which is already <b>0x01</b>\n
49 In this case, the address of the message in the message frame (in <b>RobotFramework</b>) shall be set to <b>01</b>
50
51 @verbatim
52 ==============================================================================
53 ##### RobotFramework Example #####
54 ==============================================================================
55 @{MessageData} = Create List ${DO01} ${DO_Set}
56 &{Message} = Create Dictionary DeviceAddress=${DeviceAddress_01} Function=${Function_DO} Command=${DO_Commands_SetStatus} Data=@{MessageData}
57 ${Result} SendMessage &{Message}
58
59 Comments:
60
61 DO01 => It indicates the Digital Output 01
62 DO_Set => It indicates the Digital Output 01 shall be Set (DO_Reset indicates the Digital Output 01 shall be Reset)
63 DeviceAddress_01 => It shall be equal to the address of the device: FH_RFCommunication_DeviceAddress
64 Function_DO => It is the function in the message frame
65 DO_Commands_SetStatus => It is the command of the function in the message frame
66 @endverbatim
67*/
68
69// Attention 1: FH user defined data (set the device or card address here: Maximum Possible Value is 0xFF)
70
71#define FH_RFCommunication_DeviceAddress 0x01
72
73//
74
75#endif // FH_DeviceAddress_H