lgo_LoadConfiguration()
Load configuration data for a protocol from file.
#include "laygo.h" LResult lgo_LoadConfiguration ( LFileName fileName, LProtocol protocol, LCtlBuffer buffer, LBufferSize size );
fileName | name of file containing the configuration |
protocol | protocol to get a configuration for |
buffer | buffer to hold the configuration |
size | size of buffer in bytes |
lgo_LoadConfiguration() reads configuration data for a specific protocol from a file. lgo_SetConfiguration() is then used to perform the actual configuration. The structure of the configuration data is defined by the protocol.
If successful, lgo_LoadConfiguration() returns a non-negative value indicating the number of bytes of configuration data read from the file. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
result = lgo_LoadConfiguration("PHYSICAL.CFG", lgo_PROTOCOL_X21_BIS, buffer, bufferSize); if (result > 0) { lgo_SetConfiguration(cid, buffer, result); }