All Files Functions Typedefs Enumerations Enumerator Macros Pages
Macros
BconAdapterDefines.h File Reference

BCON adapter interface constants. More...

Macros

#define BCON_ADAPTER_API   __attribute__((visibility("default")))
 Marks a BCON ADAPTER API function.
 
#define BCON_UNUSED(v)   ((void) (v))
 Explicitly state that variable v is not used.
 
#define EXTERN_C_BEGIN   extern "C" {
 Begin of code region with C linkage.
 
#define EXTERN_C_END   }
 End of code region with C linkage.
 
#define BCON_SEVERITY(_s_)   (((_s_) >> 30) & 0x3)
 
#define BCON_FACILITY(_s_)   (((_s_) >> 16) & 0xfff)
 
#define BCON_ERRORCODE(_s_)   ((uint16_t)((_s_) & 0xffff))
 
#define BCON_SUCCESS(_s_)   (BCON_SEVERITY(_s_) == BCON_STATUS_SEVERITY_SUCCESS || BCON_SEVERITY(_s_)==BCON_STATUS_SEVERITY_INFORMATIONAL)
 
#define BCON_INFORMATION(_s_)   (BCON_SEVERITY(_s_) == BCON_STATUS_SEVERITY_INFORMATIONAL)
 
#define BCON_WARNING(_s_)   (BCON_SEVERITY(_s_) == BCON_STATUS_SEVERITY_WARNING)
 
#define BCON_ERROR(_s_)   (BCON_SEVERITY(_s_) == BCON_STATUS_SEVERITY_ERROR)
 
#define BCON_OK   (BCONSTATUS)0
 Operation was successful.
 
#define BCON_E_NOT_FOUND   ((BCONSTATUS)0xE2200001L)
 The specified item does not exist.
 
#define BCON_S_ALREADY_CREATED   ((BCONSTATUS)0x62200002L)
 The specified item has already been created.
 
#define BCON_E_OPERATION_ABORTED   ((BCONSTATUS)0xE2200004L)
 The operation was aborted.
 
#define BCON_E_OPERATION_FAILED   ((BCONSTATUS)0xE2200005L)
 The operation failed.
 
#define BCON_E_NOT_IMPLEMENTED   ((BCONSTATUS)0xE2200006L)
 Function not implemented.
 
#define BCON_E_TIMEOUT   ((BCONSTATUS)0xE2200007L)
 The requested operation timed out.
 
#define BCON_E_INVALID_PARAMETER   ((BCONSTATUS)0xE2200008L)
 An invalid parameter has been passed.
 
#define BCON_E_INSUFFICIENT_BUFFER   ((BCONSTATUS)0xE2200009L)
 The provided buffer is too small.
 
#define BCON_E_INVALID_HANDLE   ((BCONSTATUS)0xE220000AL)
 The handle is invalid.
 
#define BCON_E_WRITE_FAILED   ((BCONSTATUS)0xE220000BL)
 Write operation failed.
 
#define BCON_E_READ_FAILED   ((BCONSTATUS)0xE220000CL)
 Read operation failed.
 
#define BCON_E_NOT_INITIALIZED   ((BCONSTATUS)0xE220000DL)
 Library or object is not initialized. Call the appropriate initialization function first.
 
#define BCON_E_UNEXPECTED_EXCEPTION   ((BCONSTATUS)0xE220000EL)
 An unexpected exception has been caught.
 
#define BCON_E_CUSTOM   ((BCONSTATUS)0xE2208000L)
 

Detailed Description

BCON adapter interface constants.

Macro Definition Documentation

#define BCON_E_CUSTOM   ((BCONSTATUS)0xE2208000L)

Custom status codes can use the 16-bit "Code" field in a range from 0x8000 to 0xFFFF, combined with the appropriate severity level code.

#define BCON_ERROR (   _s_)    (BCON_SEVERITY(_s_) == BCON_STATUS_SEVERITY_ERROR)

BCON Error. Checks whether the BCON status indicates an error.

#define BCON_ERRORCODE (   _s_)    ((uint16_t)((_s_) & 0xffff))

BCON Error Code. Extracts the facility status code from a given BCONSTATUS value.

#define BCON_FACILITY (   _s_)    (((_s_) >> 16) & 0xfff)

BCON Facility. Extracts the facility code from a given BCONSTATUS value.

#define BCON_INFORMATION (   _s_)    (BCON_SEVERITY(_s_) == BCON_STATUS_SEVERITY_INFORMATIONAL)

BCON Information. Checks whether the BCON status indicates a successful operation with severity level 'Informational'.

#define BCON_SEVERITY (   _s_)    (((_s_) >> 30) & 0x3)

BCON Severity. Extracts the severity level code from a given BCONSTATUS value.

#define BCON_SUCCESS (   _s_)    (BCON_SEVERITY(_s_) == BCON_STATUS_SEVERITY_SUCCESS || BCON_SEVERITY(_s_)==BCON_STATUS_SEVERITY_INFORMATIONAL)

BCON Success. Checks whether the BCON status indicates a successful operation.

#define BCON_WARNING (   _s_)    (BCON_SEVERITY(_s_) == BCON_STATUS_SEVERITY_WARNING)

BCON Warning. Checks whether the BCON status indicates a warning.


BCONAdapterAPI 1.0
© 2016 Basler AG (Thu Aug 11 2016 18:01:25)