Master.Init (METH)ΒΆ
METHOD Init : SAFEBOOL
Function to initialize the FSoE communication. The communication parameters such as the ConnectionID, the FSoE address and the watchdog time, as well as the length of the send and receive FSoE PDUs are passed as parameters and checked for plausibility. The buffer with the optional application parameters for the FSoE slave is passed as parameter. If no application parameters are defined for the FSoE slave, then this buffer shall be passed as an empty buffer. Otherwise in the case of application parameters of the FSoE slave, the buffer with the bytes (set by the configuration) for the FSoE slave shall be passed. On the part of the FSoE master no further check shall be made regarding the consistency of the configuration. If a plausibilty check fails, the error code is stored in the instance variable S_byLocalError, the FSoE state changes to FSOESTATE.ERROR and the function returns with FALSE. If all plausibility checks are successful, the function returns with TRUE and all input values are stored in the corresponding instance variables. The minimum of the user data is calculated from the lengths of the FSoE PDUS and assigned to the instance variable _uiMinFrameDataSize. This function must be called once at the start of the application.
- InOut:
Scope
Name
Type
Initial
Comment
Return
Init
BOOL
Input
S_uiFSoEAddr
UINT
FSoE slave device address, error code FSOEDIAG_INVALID_COMMPARA
S_uiConnId
UINT
Unique FSoE connection id, errorcode FSOEDIAG_INVALID_CONNID
S_uiFWDT
UINT
FSoE watchdog time for given FSoE connection in millseconds
S_uiSendFrameLen
UINT
Send FSoE frame telegram length
S_uiRecvFrameLen
UINT
Receive FSoE frame telegram length
S_pbyAppParam
POINTER TO SAFEBYTE
0
Pointer to the optional application parameter buffer, default no application parameter buffer
S_uiAppParamSize
UINT
0
Size of the optional application parameter buffer