int vscphlp_getVSCPMeasurementAsDouble( const vscpEvent *pEvent, 
                                        double *pvalue)



The event that contain the measurement data.


A pointer to a double that will get the measurement result.

Return Value

VSCP_ERROR_SUCCESS is returned on success.


This method returns a double representing the measurement data. It recognize all data coding forms and give sensible output back.


pEventMeasurement->pdata[0] = VSCP_DATACODING_INTEGER;
pEventMeasurement->pdata[1] = 0xFF;
pEventMeasurement->pdata[2] = 0xFF;
pEventMeasurement->pdata[3] = 0xFF;

if ( VSCP_ERROR_SUCCESS == vscphlp_getVSCPMeasurementAsDouble( pEventMeasurement, &value ) ) {
    printf("OK - vscphlp_getVSCPMeasurementAsDouble value = %lf\n", value );
else {
    printf("Error - vscphlp_getVSCPMeasurementAsDouble value = %slf \n", value );

Very Simple Control Protocol
Fri Jan 11 2019 17:30:44 GMT+0000 (UTC)
This document is licensed under Creative Commons BY 4.0 and can be freely copied, redistributed, remixed, transformed, built upon as long as you give credits to the author((s).

results matching ""

    No results matching ""