RPC Server Support

RPC Get Hardware Id

lgo_RpcGetHardwareId()

Retrieve the hardware identifier of a given driver on a particular server.

Syntax
#include "laygo.h"

LResult lgo_RpcGetHardwareId
    (
        LServerId    serverId,
        LDriverId    driver
    );
serverIdserver to request id from
driverindex of driver
Description

lgo_RpcGetHardwareId() retrieves the hardware identifier of a given driver on a particular server. This enables an application to determine if a driver controls an intelligent board which requires downloading a driver module. This function should be called with a LDriverId parameter in the range 0 to N-1 where N is the number of drivers for which the stack is configured.

Return Values

If successful, lgo_RpcGetHardwareId() returns the driver id. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:

See Also

lgo_GetHardwareId()

Example
LServerId    serverId;

if ((serverId = lgo_RpcConnectServer(0)) >= 0)
{
    LHardwareId  hwId = lgo_RpcGetHardwareId(serverId, 0);

    lgo_RpcDisconnectServer(serverId);

    return (hwId);
}
else
{
    return (FAILURE);
}