Products Support Documentation Download
psptypes.h File Reference

Header for the Platform Support Package - Platform dependent types. More...

#include "pspplat.h"
#include "psptypes-doxygen.h"
Include dependency graph for psptypes.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RDM_UNREF(a)   ((void) a)
 
#define RDM_UNSET(a)   = a
 
#define EXTERNAL_FCN_PTR   EXTERNAL_FCN *
 
#define RDM_STARTUP_HOOK
 
#define RDM_SHUTDOWN_HOOK
 
#define RDM_CHAR_T   RDM_CHAR_T
 
#define RDM_T(text)   text
 
#define RDM_TCHAR_T   RDM_TCHAR_T
 
#define RDM_TSTR_FMT   "%s"
 
#define RDM_STARTUP_EXAMPLE(name)
 
#define RDM_STARTUP_EXAMPLE_CR(name)   RDM_STARTUP_EXAMPLE(name)
 
#define RDM_LEN(x)   (sizeof(x) / sizeof(x[0]))
 
#define RDM_ASSERT(x)
 
#define RDM_EVAL_ASSERT(x, y)   x
 
#define RDM_MIN(a, b)   ((a) < (b) ? (a) : (b))
 
#define RDM_MAX(a, b)   ((a) > (b) ? (a) : (b))
 
#define RDM_INT8_MIN   ((int8_t) 0x80U)
 
#define RDM_INT8_MAX   ((int8_t) 0x7FU)
 
#define RDM_UINT8_MAX   ((uint8_t) 0xFFU)
 
#define RDM_INT16_MIN   ((int16_t) 0x8000U)
 
#define RDM_INT16_MAX   ((int16_t) 0x7FFFU)
 
#define RDM_UINT16_MAX   ((uint16_t) 0xFFFFU)
 
#define RDM_INT32_MIN   ((int32_t) 0x80000000U)
 
#define RDM_INT32_MAX   ((int32_t) 0x7FFFFFFFU)
 
#define RDM_UINT32_MAX   ((uint32_t) 0xFFFFFFFFU)
 
#define RDM_INT64_MIN   (-9223372036854775807LL - 1)
 
#define RDM_INT64_MAX   (9223372036854775807LL)
 
#define RDM_UINT64_MAX   ( 18446744073709551615ULL)
 
#define RDM_INT64_FMT   RDM_T("%") RDM_64BIT_CODE RDM_T("d")
 
#define RDM_UINT64_FMT   RDM_T("%") RDM_64BIT_CODE RDM_T("u")
 
#define RDM_INT64_FMT_HEX   RDM_T("%") RDM_64BIT_CODE RDM_T("X")
 
#define RDM_UINT64_FMT_HEX   RDM_T("%") RDM_64BIT_CODE RDM_T("X")
 
#define RDM_INT64_FMT_SIZE(size)   RDM_T("%") #size RDM_64BIT_CODE RDM_T("d")
 
#define RDM_UINT64_FMT_SIZE(size)   RDM_T("%") #size RDM_64BIT_CODE RDM_T("u")
 
#define RDM_INT64_FMT_SIZE_HEX(size)   RDM_T("%") #size RDM_64BIT_CODE RDM_T("X")
 
#define RDM_UINT64_FMT_SIZE_HEX(size)   RDM_T("%") #size RDM_64BIT_CODE RDM_T("X")
 

Typedefs

typedef struct RDM_ENCRYPT_S * RDM_ENCRYPT
 

Enumerations

enum  RDM_BOOL_T { RDM_FALSE = 0, RDM_TRUE = 1 }
 
enum  RDM_COMPARE { RDM_LT = -1, RDM_EQ = 0, RDM_GT = 1 }
 
enum  RDM_ENC_TYPE {
  RDM_ENC_NONE, RDM_ENC_XOR, RDM_ENC_AES128, RDM_ENC_AES192,
  RDM_ENC_AES256, RDM_ENC_DEFAULT
}
 

Detailed Description

Header for the Platform Support Package - Platform dependent types.

Definition in file psptypes.h.

Macro Definition Documentation

◆ EXTERNAL_FCN_PTR

#define EXTERNAL_FCN_PTR   EXTERNAL_FCN *

Definition at line 96 of file psptypes.h.

◆ RDM_ASSERT

#define RDM_ASSERT (   x)

Macro for doing assertions. Will be turned off if NDEBUG is defined

Definition at line 204 of file psptypes.h.

◆ RDM_CHAR_T

#define RDM_CHAR_T   RDM_CHAR_T

RDM character

RDM_CHAR_T are always expanded to char. On Windows extra overloaded methods are provided with parameter types wchar_t instead of char

Definition at line 119 of file psptypes.h.

Referenced by RDM_CPP::TFS::_ValidateITFS().

◆ RDM_EVAL_ASSERT

#define RDM_EVAL_ASSERT (   x,
 
)    x

Macro for doing assertions on x == y. Will always evaluate x, even when NDEBUG (or not RDM_ASSERT_ENABLED) is defined

Definition at line 211 of file psptypes.h.

◆ RDM_INT16_MAX

#define RDM_INT16_MAX   ((int16_t) 0x7FFFU)

Maximum value for int64_t

Definition at line 228 of file psptypes.h.

◆ RDM_INT16_MIN

#define RDM_INT16_MIN   ((int16_t) 0x8000U)

Minimum value for int16_t

Definition at line 226 of file psptypes.h.

◆ RDM_INT32_MAX

#define RDM_INT32_MAX   ((int32_t) 0x7FFFFFFFU)

Maximum value for int64_t

Definition at line 234 of file psptypes.h.

◆ RDM_INT32_MIN

#define RDM_INT32_MIN   ((int32_t) 0x80000000U)

Minimum value for int32_t

Definition at line 232 of file psptypes.h.

◆ RDM_INT64_FMT

#define RDM_INT64_FMT   RDM_T("%") RDM_64BIT_CODE RDM_T("d")

Format string for 64 bit integer

Definition at line 245 of file psptypes.h.

◆ RDM_INT64_FMT_HEX

#define RDM_INT64_FMT_HEX   RDM_T("%") RDM_64BIT_CODE RDM_T("X")

Format string for 64 bit integer in hexadecimal

Definition at line 249 of file psptypes.h.

◆ RDM_INT64_FMT_SIZE

#define RDM_INT64_FMT_SIZE (   size)    RDM_T("%") #size RDM_64BIT_CODE RDM_T("d")

Format string for 64 bit integer where size is specified

Definition at line 253 of file psptypes.h.

◆ RDM_INT64_FMT_SIZE_HEX

#define RDM_INT64_FMT_SIZE_HEX (   size)    RDM_T("%") #size RDM_64BIT_CODE RDM_T("X")

Format string for 64 bit integer in hexadecimal where size is specified

Definition at line 257 of file psptypes.h.

◆ RDM_INT64_MAX

#define RDM_INT64_MAX   (9223372036854775807LL)

Maximum value for int64_t

Definition at line 240 of file psptypes.h.

◆ RDM_INT64_MIN

#define RDM_INT64_MIN   (-9223372036854775807LL - 1)

Minimum value for int64_t

Definition at line 238 of file psptypes.h.

◆ RDM_INT8_MAX

#define RDM_INT8_MAX   ((int8_t) 0x7FU)

Maximum value for int64_t

Definition at line 222 of file psptypes.h.

◆ RDM_INT8_MIN

#define RDM_INT8_MIN   ((int8_t) 0x80U)

Minimum value for int_t

Definition at line 220 of file psptypes.h.

◆ RDM_LEN

#define RDM_LEN (   x)    (sizeof(x) / sizeof(x[0]))

Macro to get the number of elements in an array of any type

Examples:
tutorials/HelloWorld/hello_worldTutorial_main.c, and tutorials/HelloWorldCPP/hello_worldCPPTutorial_main.cpp.

Definition at line 200 of file psptypes.h.

◆ RDM_MAX

#define RDM_MAX (   a,
 
)    ((a) > (b) ? (a) : (b))

Macro fo taking the max of two arguments of any type

Definition at line 217 of file psptypes.h.

◆ RDM_MIN

#define RDM_MIN (   a,
 
)    ((a) < (b) ? (a) : (b))

Macro fo taking the min of two arguments of any type

Definition at line 215 of file psptypes.h.

◆ RDM_SHUTDOWN_HOOK

#define RDM_SHUTDOWN_HOOK

Shutdown hook

Shutdown hook for tools, examples, and tests that are using any of the RDM_STARTUP macros

Definition at line 110 of file psptypes.h.

◆ RDM_STARTUP_EXAMPLE

#define RDM_STARTUP_EXAMPLE (   name)
Value:
int32_t name##_main(int32_t argc, const RDM_TCHAR_T *const *argv); \
int main(int argc, const RDM_TCHAR_T *const *argv) { \
int32_t status; \
\
RDM_STARTUP_HOOK \
status = name##_main(argc, argv); \
RDM_SHUTDOWN_HOOK \
return status; \
}
#define RDM_TCHAR_T
Definition: psptypes.h:134

Startup for examples

This sets up a main function, with a startup hook, a call to a named main function, and a shutdown hook.

This is used for examples.

Definition at line 159 of file psptypes.h.

◆ RDM_STARTUP_EXAMPLE_CR

#define RDM_STARTUP_EXAMPLE_CR (   name)    RDM_STARTUP_EXAMPLE(name)

Startup for examples with CR

This sets up a main function, with a startup hook, a call to a named main function, and a shutdown hook.

This is used for examples where we want to prompt the user upon termination on some platforms.

Examples:
tutorials/HelloWorld/hello_worldTutorial_main.c, and tutorials/HelloWorldCPP/hello_worldCPPTutorial_main.cpp.

Definition at line 195 of file psptypes.h.

◆ RDM_STARTUP_HOOK

#define RDM_STARTUP_HOOK

Startup hook

Startup hook for tools, examples, and tests that are using any of the RDM_STARTUP macros

Definition at line 103 of file psptypes.h.

◆ RDM_T

#define RDM_T (   text)    text

Macro for an RDM string

Definition at line 130 of file psptypes.h.

◆ RDM_TCHAR_T

#define RDM_TCHAR_T   RDM_TCHAR_T

RDM_TCHAR_T is expanded to wchar_t on Windows when _UNICODE is defined. Otherwise it is expanded to char.

Examples:
examples/hello_world_cat.c, and examples/hello_world_cat.h.

Definition at line 134 of file psptypes.h.

◆ RDM_TSTR_FMT

#define RDM_TSTR_FMT   "%s"

Definition at line 138 of file psptypes.h.

◆ RDM_UINT16_MAX

#define RDM_UINT16_MAX   ((uint16_t) 0xFFFFU)

Maximum value for uint64_t

Definition at line 230 of file psptypes.h.

◆ RDM_UINT32_MAX

#define RDM_UINT32_MAX   ((uint32_t) 0xFFFFFFFFU)

Maximum value for uint64_t

Definition at line 236 of file psptypes.h.

◆ RDM_UINT64_FMT

#define RDM_UINT64_FMT   RDM_T("%") RDM_64BIT_CODE RDM_T("u")

Format string for 64 bit unsigned integer

Definition at line 247 of file psptypes.h.

◆ RDM_UINT64_FMT_HEX

#define RDM_UINT64_FMT_HEX   RDM_T("%") RDM_64BIT_CODE RDM_T("X")

Format string for 64 bit unsigned integer in hexadecimal

Definition at line 251 of file psptypes.h.

◆ RDM_UINT64_FMT_SIZE

#define RDM_UINT64_FMT_SIZE (   size)    RDM_T("%") #size RDM_64BIT_CODE RDM_T("u")

Format string for 64 bit unsigned integer where size is specified

Definition at line 255 of file psptypes.h.

◆ RDM_UINT64_FMT_SIZE_HEX

#define RDM_UINT64_FMT_SIZE_HEX (   size)    RDM_T("%") #size RDM_64BIT_CODE RDM_T("X")

Format string for 64 bit unsigned integer in hexadecimal where size is specified

Definition at line 259 of file psptypes.h.

◆ RDM_UINT64_MAX

#define RDM_UINT64_MAX   ( 18446744073709551615ULL)

Maximum value for uint64_t

Definition at line 242 of file psptypes.h.

◆ RDM_UINT8_MAX

#define RDM_UINT8_MAX   ((uint8_t) 0xFFU)

Maximum value for uint64_t

Definition at line 224 of file psptypes.h.

◆ RDM_UNREF

#define RDM_UNREF (   a)    ((void) a)

◆ RDM_UNSET

#define RDM_UNSET (   a)    = a

Definition at line 54 of file psptypes.h.

Typedef Documentation

◆ RDM_ENCRYPT

typedef struct RDM_ENCRYPT_S* RDM_ENCRYPT

RDM encryption handle

Definition at line 77 of file psptypes.h.

Enumeration Type Documentation

◆ RDM_BOOL_T

enum RDM_BOOL_T

Enumeration for RDM boolen values

This enumeration adds support for a platform/language agnostic BOOLEAN value in the RDM library

Enumerator
RDM_FALSE 

enum value for FALSE

RDM_TRUE 

enum value for TRUE

Definition at line 62 of file psptypes.h.

63 {
64  RDM_FALSE = 0,
65  RDM_TRUE = 1
66 } RDM_BOOL_T;
RDM_BOOL_T
Definition: psptypes.h:62

◆ RDM_COMPARE

Enumeration for RDM comparison values

Enumerator
RDM_LT 

The first argument is lesser than the second argument

RDM_EQ 

The arguments are equal

RDM_GT 

The first argument is greater than the second argument

Definition at line 70 of file psptypes.h.

71 {
72  RDM_LT = -1,
73  RDM_EQ = 0,
74  RDM_GT = 1
75 } RDM_COMPARE;
RDM_COMPARE
Definition: psptypes.h:70

◆ RDM_ENC_TYPE

Enumeration for RDM encryption algorithms

The enumeration identifies the supported encryption algorithms.

RDM_ENC_XOR is the only type of encryption that is included in packages without export restrictions.

Enumerator
RDM_ENC_NONE 

No encryption

RDM_ENC_XOR 

XOR encryption

RDM_ENC_AES128 

AES-128 encryption

RDM_ENC_AES192 

AES-192 encryption

RDM_ENC_AES256 

AES-256 encryption

RDM_ENC_DEFAULT 

Default encryption

Definition at line 86 of file psptypes.h.