Harlequin RIP SDK
Standard integer and Bool types

Macros

#define HQN_INT64   __int64
 
#define MAXUINT8   ((uint8)255)
 Maximum value of 8-bit unsigned integer.
 
#define MAXINT8   ((int8)127)
 Maximum value of 8-bit signed integer.
 
#define MININT8   ((int8)-128)
 Minimum value of 8-bit signed integer.
 
#define MAXUINT16   ((uint16)65535)
 Maximum value of 16-bit unsigned integer.
 
#define MAXINT16   ((int16)32767)
 Maximum value of 16-bit signed integer.
 
#define MININT16   ((int16)-32768)
 Minimum value of 16-bit signed integer.
 
#define MAXUINT32   0xffffffffU
 Maximum value of 32-bit unsigned integer.
 
#define MAXINT32   ((int32)0x7fffffff)
 Maximum value of 32-bit signed integer.
 
#define MININT32   ((int32)0x80000000)
 Minimum value of 32-bit signed integer.
 
#define MAXINT   MAXINT32
 Maximum value of signed integer. More...
 
#define MININT   MININT32
 Minimum value of signed integer. More...
 
#define MAXUINT   MAXUINT32
 Minimum value of unsigned integer. More...
 
#define SIZE_MAX   MAXUINT64
 Maximum value of size_t.
 
#define UINTPTR_MAX   MAXUINT64
 Maximum value of uintptr_t.
 
#define TRUE   1
 HqBool boolean true value. More...
 
#define FALSE   0
 HqBool boolean false value. More...
 
#define BOOL_IS_VALID(bool_)   ((bool_) == TRUE || (bool_) == FALSE)
 Validate boolean values. More...
 
#define HQNIDENT_MAX   MAXINT32
 Maximum value of an HqnIdent before wrap-around.
 
#define HQNIDENT_MIN   MININT32
 Minimum value of an HqnIdent after wrap-around.
 

Typedefs

typedef signed char int8
 8-bit signed integer
 
typedef signed short int16
 16-bit signed integer
 
typedef signed int int32
 32-bit signed integer
 
typedef unsigned char uint8
 8-bit unsigned integer
 
typedef unsigned short uint16
 16-bit unsigned integer
 
typedef unsigned int uint32
 32-bit unsigned integer
 
typedef signed int64
 64-bit signed integer
 
typedef unsigned uint64
 64-bit unsigned integer
 
typedef int HqBool
 Harlequin standard boolean type. More...
 
typedef intptr_t HqnFileDescriptor
 The type of a file descriptor on a device. More...
 
typedef int32 HqnIdent
 HqnIdent identifiers. More...
 
typedef int32 HqnResult
 HqnResult return types. More...
 

Enumerations

enum  { HQN_RESULT_SUCCESS = 0 }
 

Detailed Description

Integer and Bool types for specific sizes.

These types were created before C99, and so use Harlequin-specific names rather than those from <stdint.h>.

Macro Definition Documentation

◆ BOOL_IS_VALID

#define BOOL_IS_VALID (   bool_)    ((bool_) == TRUE || (bool_) == FALSE)

Validate boolean values.

Check a boolean value to make sure it is true or false. This should only be used for Bool variables. C language conventions are normally used, so non-zero values are true and zero values are false.

◆ FALSE

#define FALSE   0

HqBool boolean false value.

C boolean conventions are used. Zero values are false.

◆ HQN_INT64

#define HQN_INT64   __int64

The macro HQN_INT64 will be defined by platform.h if the platform supports native 64-bit integers. In this case, the int64 and uint64 typedefs will be made available.

◆ MAXINT

#define MAXINT   MAXINT32

Maximum value of signed integer.

This is a compatibility definition. Please use the explicitly-sized maximum/minimum values instead of this define.

◆ MAXUINT

#define MAXUINT   MAXUINT32

Minimum value of unsigned integer.

This is a compatibility definition. Please use the explicitly-sized maximum/minimum values instead of this define.

◆ MININT

#define MININT   MININT32

Minimum value of signed integer.

This is a compatibility definition. Please use the explicitly-sized maximum/minimum values instead of this define.

◆ TRUE

#define TRUE   1

HqBool boolean true value.

C boolean conventions are used. Any non-zero value is true.

Typedef Documentation

◆ HqBool

typedef int HqBool

Harlequin standard boolean type.

Note that we do not use the C++ or C99 definitions of boolean types, because we want the type to have the same size in function prototypes and structures linked between the different languages. We use the native machine integer rather than give it an explicit size for efficiency.

◆ HqnFileDescriptor

The type of a file descriptor on a device.

Device file descriptors on 64 bit platforms are 64 bits wide.

◆ HqnIdent

typedef int32 HqnIdent

HqnIdent identifiers.

HqnIdent is a superclass of identifiers used by the RDR, Event and Timeline APIs and are defined to be interworkable. It is therefore possible to use a Timeline reference as an RDR ID within some Class and Type, for example. HqnIdent is also typedeffed for monitor and error UIDs (as sw_mon_type).

◆ HqnResult

typedef int32 HqnResult

HqnResult return types.

HqnResult is used as a return type for some API functions in the core and Harlequin SDK. Declaring HqnResult as a return type or out parameter for a function indicates that the function follows these semantics:

  • The value 0 (aka HQN_RESULT_SUCCESS) indicates a successful operation;
  • Any value greater than or equal to MON_CLASS_ERROR is a well-formed error code, according to the rules for sw_mon_type. In particular, it should have a valid PS error number in the MON_MASK_ERRORNUM bits. It should preferably have a unique ID for that error class and number in the MON_MASK_UNIQUE bits.
  • Small magnitude negative or positive values may be used to indicate other success or return codes, but these should be filtered out by clients or converted to HQN_RESULT_SUCCESS or an error code if the result is to be passed to the core's error handler. Small negative values are recommended, so that positive values less than MON_CLASS_ERROR can be used for sw_mon_type messages, if appropriate, and so that the MON_PSERROR() macro will return that value.
  • If an API function returning or setting an HqnResult does not declare any extra result values, and does not document that it explicitly supports other sw_mon_type classes, clients may test the HqnResult as a boolean to determine if the operation succeeded or failed.

HqnResult is assignment-compatible with the monitor UID type (sw_mon_type).

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Standard values for HqnResult type.

Enumerator
HQN_RESULT_SUCCESS 

Operation succeeded.