VCLib Documentation  6.12.2

Library and Licence Validation

Library and Licence Validation

Macros

#define vc_libvclib_check_header_ver()   vc_libvclib_check_header_ver_func(VCLIB_MAINVERSION,VCLIB_VERSION,VCLIB_SUBVERSION)
 Version Compatibility Check between Header and Linked Library. More...
 

Functions

I32 init_licence (char *code)
 Initialize Licence Code for TI-Based Cameras. More...
 
I32 vc_license_init_file (char *licenseId, char *keyFile)
 Initialize Licence for Linux Cameras. More...
 
I32 fread_license (char *file_name, char *library, char *code, char *serialnumber)
 
void GetLibVer_VCLIB (I32 *MainVersion, I32 *Version, I32 *SubVersion)
 Version Information of the VCLib as Numbers. More...
 
char * GetLibVerString_VCLIB (void)
 Version Information of the VCLib as String. More...
 

Detailed Description

Functions for initializing and identifying the used lib versions.

Macro Definition Documentation

◆ vc_libvclib_check_header_ver

#define vc_libvclib_check_header_ver ( )    vc_libvclib_check_header_ver_func(VCLIB_MAINVERSION,VCLIB_VERSION,VCLIB_SUBVERSION)

This macro compares the version information at the header used at compile time with the version of the library linked at compile time. If the header used is incompatible with the library linked against, this macro returns an error.

Return values
-1if Main Version of Library differs from the Header's Main Version (General Incompatibility).
+1if Version of Library is smaller than the Header's Version (Features may be missing).
0else.

Function Documentation

◆ init_licence()

I32 init_licence ( char *  code)

This function initializes the VCLıb and other special VC Libraries at our platform using VC/RT as operating system. This function must be called prior to using any VCLıb functions or other special library functions.

Vision Components continues to offer special libraries to their customers. For simpler handling and ensured compatibility all libraries are now included in one setup package – for instance: TI-VCRT523_VCLIB300_Setup.exe. In order to use any VCLIB, ColorLIB or other special VC Library functions, each library requires initialization prior to using its functions. The VCLIB Licence code is displayed on the delivery docket and user CD shipped with the delivery of the VC SDK-T, the 'Vision Components Software Development Kit for Smart Cameras with Texas Instrument DSP', containing the TI C-cross compiler and VCRT and VCIB Libraries from Vision Components.

Licence codes for other special libraries as the ColorLib are also issued on delivery notes or emailed. Please contact sales.nosp@m.@vis.nosp@m.ion-c.nosp@m.omp..nosp@m.com for a quote on development software and special libraries from Vision Components.

The following licence types are currently available / under preparation:

  • T: Full Licence for programming all VC cameras with TI DSP.
  • M: Full Licence of the M200 Data Matrix Code Reader Library.
  • C: Full Licence of the ColorLib.
  • E: Full Licence of the Extension Lib.
  • L: Loan Licence valid for 3 month only (in combination with T,L,C or E).
  • P: Licence restricted to VC4018 smart cameras (in c. .with T,L,C or E).
  • Q: Licence restricted to VC4038 smart cameras (in c. .with T,L,C or E).
Note
Additionally to documented return values any library function may return the Error Code ERR_LICENCE.
Parameters
codeLicence Code Obtained from Vision Components.
Return values
ERR_NONEOn Proper Initialization.
ERR_LICENCEIf a Licence is Required.
ERR_MODELIf the Camera Model does not fit the Licence provided.
Memory Consumption
None.

Example:

init_licence(”T1122334455”); // Initializing a full
// VCRT/ VCLIB Licence for VC cameras
// with Texas Instrument DSP.
init_licence(”C1122334455”); // Initializing a full
// ColorLib Licence for VC cameras
// with Texas Instrument DSP.

◆ vc_license_init_file()

I32 vc_license_init_file ( char *  licenseId,
char *  keyFile 
)

This function initializes the VCLıb and other special VC Libraries at our platform using Linux as operating system. This function must be called prior to using any VCLıb functions or other special library functions.

The following libraries are currently available:

  • vclib: This library now includes the previously named extlib and colorlib.

For convenience a macro called vc_license_init(licenseId) is provided.

Note
Additionally to documented return values any library function may return the Error Code ERR_LICENCE.
Parameters
licenseIdlibrary to initialize.
keyFilepath to key file, for the moment use "/dev/mtd3".
Return values
ERR_NONEOn Proper Initialization.

Example:

rc = vc_license_init_file("vclib", "/dev/mtd3");
or
rc = vc_license_init("vclib");
Return values
ERR_NONEon Success.
ERR_NONEon Success.

◆ fread_license()

I32 fread_license ( char *  file_name,
char *  library,
char *  code,
char *  serialnumber 
)
Return values
ERR_OPENif requested file could not be opened for reading.
ERR_OPENif requested file could not be opened for reading.

◆ GetLibVer_VCLIB()

void GetLibVer_VCLIB ( I32 MainVersion,
I32 Version,
I32 SubVersion 
)
Parameters
VersionMain Version Number.
SubVersionSubversion Number.

◆ GetLibVerString_VCLIB()

char* GetLibVerString_VCLIB ( void  )
Return values
Pointerto the Output String.