vscphlp_convertCanalToEvent

int vscphlp_convertCanalToEvent( vscpEvent *pvscpEvent,
                                    const canalMsg *pcanalMsg,
                                    unsigned char *pGUID )

Parameters

pvscpEvent

VSCP event that will hold the conversion result.

pcanalMsg

CANAL message that should be converted.

pGUID

GUID for event.

Return Value

VSCP_ERROR_SUCCESS on success.

Description

Convert CANAL message to VSCP event.

Example

canalMsg canalMsg;
canalMsg.id = 0x0c0a0601;
canalMsg.sizeData = 3;
canalMsg.data[0] = 138;
canalMsg.data[1] = 0;
canalMsg.data[2] = 30;
if ( VSCP_ERROR_SUCCESS == vscphlp_convertCanalToEvent( pEvent,
                                                          &canalMsg,
                                                          GUID2 ) ) {
    printf( "OK vscphlp_convertCanalToEvent VSCP class=%d Type=%d\n", 
                   pEvent->vscp_class, pEvent->vscp_type );
}
else {
    printf( "\aError: vscphlp_convertCanalToEvent\n");
}

See Also

vscphlp_convertCanalToEventEx vscphlp_convertEventToCanal vscphlp_convertEventExToCanal


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 ""