SENA Rhio10 User Manual

Page 91

Advertising
background image

91

RHIO_SndCmd_SetADC

Description : Used to send the command to set the Level of all the ADC ports from 1 to 4.

Function Prototype :

extern "C" __declspec(dllexport) bool RHIO_SndCmd_SetADC

(SRHIOSetting sSetData);

Parameter :

SRHIOSetting sSetData : Data to set

SRHIOSetting.sADC.sADCData[index].cADC

:

ADC

Level

string

in

4

bytes

between "0000" and "1023"

Return : TRUE if successful, False if failed.

Parameter when reaction event is received :

WPARAM

: Commnad transfer status flag (ESF_SET_ADC)

LPARAM

: Control status flag of the command (False if Time Out Error)

(0x30:Normal operation, 0x39:Abnormal operation, 0x31:Not the Set Mode)

eg. :

SRHIOSetting sSetData;

for(int index = 0; index < 4; index++)

{

memset(sSetData.sADC.sADCData[index].cADC,'\0',

sizeof(sSetData.sADC.sADCData[index].cADC));

memcpy(sSetData.sADC.sADCData[index].cADC, "0512", 4);

}

RHIO_SndCmd_SetADC(sSetData);

RHIO_SndCmd_GetADC

Description : Used to send the command to check whether it is possible to get the Level of all

the ADC ports.

Function Prototype :

extern "C" __declspec(dllexport) bool RHIO_SndCmd_GetADC();

Parameter : None

Return : TRUE if successful, False if failed.

Parameter when reaction event is received :

WPARAM

: Commnad transfer status flag (ESF_MON_ADC)

LPARAM

: Control status flag of the command (False if Time Out Error)

Advertising