vscphlp_setVscpPriority

void vscphlp_setVscpPriority( vscpEvent *pEvent, 
                                unsigned char priority )

Parameters

handle

Handle for the communication channel obtained from a call to vscphlp_newsession.

Return Value

None

Description

Set Event priority. Priority is defined as a value between 0-7 where 0 is the highest priority.

Example

pEvent = new vscpEvent;
pEvent->head = 0;
pEvent->vscp_class = 10;
pEvent->vscp_type = 6;
pEvent->obid = 0;
pEvent->year = 2017;
pEvent->month = 1;  // January
pEvent->day = 2;
pEvent->hour = 13;
pEvent->minute = 10;
pEvent->second = 43;
pEvent->timestamp = 0;
memset( pEvent->GUID, 0, 16 );
pEvent->sizeData = 3;
pEvent->pdata = new unsigned char[3];
pEvent->pdata[ 0 ] = 138;
pEvent->pdata[ 1 ] = 0;
pEvent->pdata[ 2 ] = 30;

unsigned char eventPriority;
vscphlp_setVscpPriority( pEvent, VSCP_PRIORITY_NORMAL );
if ( VSCP_PRIORITY_NORMAL == ( eventPriority = vscphlp_getVscpPriority( pEvent ) ) ) {
    printf("Event priority = %d\n", eventPriority );
}
else {
    printf("\aError: Set Event priority = %d\n", eventPriority );
}

// Free the event
vscphlp_deleteVSCPevent( pEvent );

See Also

vscphlp_setVscpPriorityEx


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