...
int16 mst_GetGadgetID(uint16 uiPortNo, uchar08 *ucpGadgetID, char08 *cpErrMsg);
DescriptionTo
disconnect iqInterface (free OS resources) call mst_Disconnect with a previously connected port number.Function return Gadget ID for a connected device
Input Parameters
- uchar08 uiPortNo – (virtual) comport number to disconnect obtained previously from mst_Connect or mst_EthernetConnect functions
Output parameters
- char08 uchar08 *cpErrMsgucpGadgetID – pointer to one unsigned byte master id
Possible values: 0x01 - iqInterface, 0x02 - iqLink
- char08 *cpErrMsg – pointer to buffer to return error message (minimum 256 bytes)
Return value
ERR_NONE or negative error number.
Example
uchar08 id;
mst_GetGadgetID(iPortNo, &id, cpErrMsg);
mst_GetConfig and mst_SetConfig (get/set master mode configuration)
Function
int16 mst_GetConfig(uint16 uiPortNo, mst_ConfigT *pConfig, char08 *cpErrMsg);
int16 mst_SetConfig(uint16 uiPortNo, mst_ConfigT *pConfig, char08 *cpErrMsg);
Description
You can load the master configuration in a variable of type mst_ConfigT, manipulate it and save it again to iqInterface before starting an IO-Link communication using mst_GetConfig and mst_SetConfig functions.
Input Parameters
- uchar08 uiPortNo – (virtual) comport number to disconnect obtained previously from mst_Connect or mst_EthernetConnect functions
- mst_ConfigT *pConfig – pointer to variable of type mst_ConfigT to set configuration from or get to
Output parameters
- char08 *cpErrMsg – pointer to buffer to return error message (minimum 256 bytes)
Return value
ERR_NONE or negative error number.
Example
mst_ConfigT config;
mst_GetConfig(iPortNo, &config, cpErrMsg);
// manipulate config …
mst_SetConfig(iPortNo, &config, cpErrMsg);
...