lgo_RpcGetHardwareId()
Retrieve the hardware identifier of a given driver on a particular server.
#include "laygo.h" LResult lgo_RpcGetHardwareId ( LServerId serverId, LDriverId driver );
serverId | server to request id from |
driver | index of driver |
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.
If successful, lgo_RpcGetHardwareId() returns the driver id. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
LServerId serverId; if ((serverId = lgo_RpcConnectServer(0)) >= 0) { LHardwareId hwId = lgo_RpcGetHardwareId(serverId, 0); lgo_RpcDisconnectServer(serverId); return (hwId); } else { return (FAILURE); }