vscphlp_getVSCPMeasurementAsDouble

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

Parameters

pEvent

The event that contain the measurement data.

pvalue

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

Return Value

VSCP_ERROR_SUCCESS is returned on success.

Description

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

Example

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
Wed Jul 04 2018 19:49:59 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 ""