vscphlp_checkReply

int vscphlp_checkReply( long handle, int bclear )
int pyvscphlp_checkReply( handle, bclear )

Parameters

handle

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

bclear

If TRUE (not zero) the input buffer will be cleared before starting to wait for a +OK/-OK in the incoming data.

Return Value

VSCP_ERROR_SUCCESS if the VSCP daemon respond with “+OK” after it has received the command and VSCP_ERROR_ERROR if not or no response before the timeout expires.

Description

Check reply data for “+OK”/“-OK” on server.

Example

if ( VSCP_ERROR_SUCCESS == vscphlp_checkReply( handle1, TRUE ) ) {
    printf("+OK was received from VSCP daemon.\n");   
}
print "command: vscphlp_checkReply"
rv = lib.vscphlp_checkReply( h1, command, 1)
if VSCP_ERROR_SUCCESS != rv :
    pyvscphlp_closeSession(h1)
    raise ValueError('Command error: ''vscphlp_checkReply''  Error code=%d' % rv )

See Also

vscphlp_doCommand


Very Simple Control Protocol
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 ""