vscphlp_getVendorString

int vscphlp_getVendorString( long handle, 
                                char *pVendor, 
                                size_t len )
(rv,strversion) pyvscphlp_getVendorString( handle )

Parameters

handle

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

pVendor (c/c++)

Pointer to a string that will receive vendor information.

len (c/c++)

Size of supplied buffer.

Return Value

c/c++

Return VSCP_ERROR_SUCCESS on success, VSCP_ERROR_ERROR on failure. If the connection is closed VSCP_ERROR_CONNECTION is returned. VSCP_ERROR_PARAMETER is returned if called while in a receive loop.

Python

A tuple that consist of the return value (see c/c++ version) and the vendorstirng is returned.

Description

Fetch the vendor string from the driver.

Example

// Get vendor string
char buf[120];
if ( VSCP_ERROR_SUCCESS == (rv = vscphlp_getVendorString( handle2, buf, sizeof(buf) ) ) ) {
    printf( "Command success: vscphlp_getVendorString on channel 2\n" );
    printf( "Vendorstring = \"%s\"\n", buf );
}
else {
    printf("\aCommand error: vscphlp_getVendorString on channel 2  Error code=%d\n", rv);
}
print "Get vendor string"
(rv,strvendor) = pyvscphlp_getVendorString( h1 )
if VSCP_ERROR_SUCCESS != rv :
    pyvscphlp_closeSession(h1)
    raise ValueError('Command error: pyvscphlp_getVendorString  Error code=%d' % rv )
print "Vendor string = %s" % strvendor

See Also

xxx


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