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

File Map:
FH_Root, Section FH_Perif, FH_CAN
Functions in this file, handle RFCommunication (RobotFramework Communication) for all commands related to CAN More...

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.

Detailed Description

File Map:
FH_Root, Section FH_Perif, FH_CAN
Functions in this file, handle RFCommunication (RobotFramework Communication) for all commands related to CAN

Attention
FH user could left this file 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_CAN.h.

Function Documentation

◆ FH_CAN_ProcessCommand_GSD16()

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.

Parameters
fh_RFCommunication_MessageThe 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
Returns
FH_ErrorInfo is returned

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_CAN_ProcessCommand_GSD32()

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.

Parameters
fh_RFCommunication_MessageThe 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
Returns
FH_ErrorInfo is returned

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_CAN_ProcessCommand_GSD8()

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.

Parameters
fh_RFCommunication_MessageThe 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
Returns
FH_ErrorInfo is returned

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_CAN_ProcessCommand_Init()

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.

Parameters
fh_RFCommunication_MessageThe 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
Returns
FH_ErrorInfo is returned

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_CAN_ProcessCommand_Receive()

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.

Parameters
fh_RFCommunication_MessageThe 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
Returns
FH_ErrorInfo is returned

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_CAN_ProcessCommand_ReceiveW()

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).

Parameters
fh_RFCommunication_MessageThe 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
Returns
FH_ErrorInfo is returned

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_CAN_ProcessCommand_ResetRB()

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.

Parameters
fh_RFCommunication_MessageThe 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
Returns
FH_ErrorInfo is returned

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_CAN_ProcessCommand_Send()

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).

Parameters
fh_RFCommunication_MessageThe 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
Returns
FH_ErrorInfo is returned

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_CAN_ProcessCommand_SSD16()

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).

Parameters
fh_RFCommunication_MessageThe 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
Returns
FH_ErrorInfo is returned

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_CAN_ProcessCommand_SSD32()

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).

Parameters
fh_RFCommunication_MessageThe 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
Returns
FH_ErrorInfo is returned

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_CAN_ProcessCommand_SSD8()

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).

Parameters
fh_RFCommunication_MessageThe 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
Returns
FH_ErrorInfo is returned

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_CAN_RFCommunication()