Managing Protocol Services

Load Configuration

lgo_LoadConfiguration()

Load configuration data for a protocol from file.

Syntax
#include "laygo.h"

LResult lgo_LoadConfiguration
    (
        LFileName      fileName,
        LProtocol      protocol,
        LCtlBuffer     buffer,
        LBufferSize    size
    );
fileNamename of file containing the configuration
protocolprotocol to get a configuration for
bufferbuffer to hold the configuration
sizesize of buffer in bytes
Description

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.

Return Values

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:

See Also

lgo_SetConfiguration()
lgo_GetConfiguration()

Example
result = lgo_LoadConfiguration("PHYSICAL.CFG",
                               lgo_PROTOCOL_X21_BIS, buffer, bufferSize);

if (result > 0)
{
    lgo_SetConfiguration(cid, buffer, result);
}