Slave.Init (METH)ΒΆ
METHOD Init : SAFEBOOL
Function for initialization of the FSoE communication. The communication parameters, the own configured FSoE address, a buffer for the expected application parameters, as well as the length of the send and receive FSoE PDUs are passed as parameters and checked for plausibility. 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
InitBOOLInput
S_uiFSoEAddrUINTOwn FSoE device slave address
S_uiSendFrameLenUINTSend FSoE frame telegram length
S_uiRecvFrameLenUINTReceive FSoE frame telegram length
S_pbyAppParamPOINTER TO SAFEBYTE
0
Pointer to the optional application parameter buffer, default no application parameter buffer
S_uiAppParamSizeUINT0
Size of the optional application parameter buffer