Download Summit Software Developer`s Kit

Transcript
Programmers Guide
Summit SDK
QueryOID Sample Code
ULONG size = sizeof(NDIS_STATISTICS_VALUE)+512;
UCHAR QueryBuffer[sizeof(NDIS_STATISTICS_VALUE)+512];
int err;
//OID_GEN_XMIT_OK OID specifies the number of frames that are transmitted
without errors
err = QueryOID(OID_GEN_XMIT_OK,QueryBuffer,size);
NDIS_STATISTICS_VALUE* queryOID = (PNDIS_STATISTICS_VALUE) &QueryBuffer[0];
unsigned long value = *(unsigned long*)&queryOID->Data[0];
char temp[100] = {0};
_itoa(value, temp, 10);
CString str = "";
str += temp;
str = str ;
if ( err > 0 )
AfxMessageBox(str);
Else
AfxMessageBox("Query failed");
Function: QueryOID
RadioEnable Sample Code
SDCGlobalConfig globalConfig;
SDCERR sdcErr;
memset(&globalConfig, 0, sizeof(SDCGlobalConfig));
sdcErr = GetGlobalSettings(&globalConfig);
//check to see if radio is enabled/disabled
if (globalConfig.radioState == 0)
sdcErr = RadioEnable();
if ( sdcErr == SDCERR_SUCCESS )
AfxMessageBox("Enabled");
else
AfxMessageBox("Failed");
Function: RadioEnable
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wireless
99
Laird Technologies
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610