LinuxSDK  V1.4.0.5
Macros | Typedefs
SwiDataTypes.h File Reference

SWI data types. More...

Go to the source code of this file.

Macros

#define SWI_API
 
#define ALIGN4   (sizeof(swi_uint32) -1)
 
#define ALIGN2   (sizeof(swi_uint16) -1)
 
#define local   static
 
#define package
 
#define global
 
#define UTF8_MAX_CHAR_SIZE   4
 
#define YES   1
 
#define NO   0
 
#define TRUE   1
 
#define FALSE   0
 
#define EOS   '\0'
 
#define NULL   ((void *)0)
 

Typedefs

typedef unsigned char swi_uint8
 
typedef unsigned short swi_uint16
 
typedef unsigned long swi_uint32
 
typedef unsigned long long swi_uint64
 
typedef signed char swi_int8
 
typedef signed short swi_int16
 
typedef signed long swi_int32
 
typedef signed long long swi_int64
 
typedef int swi_bool
 
typedef char swi_char
 
typedef char * swi_charp
 
typedef unsigned long swi_size_t
 
typedef long swi_ssize_t
 
typedef unsigned short swi_UCS2
 
typedef swi_UCS2swi_UCS2p
 

Detailed Description

SWI data types.

Copyright (c) 2011 Sierra Wireless, Inc. All rights reserved

Macro Definition Documentation

#define ALIGN2   (sizeof(swi_uint16) -1)
#define ALIGN4   (sizeof(swi_uint32) -1)
#define EOS   '\0'
#define FALSE   0
#define global

function accessed globally, used for functions only

#define local   static

function/variable accessed within local file only

#define NO   0
#define NULL   ((void *)0)
#define package

accessable within package only, used for fns only

#define SWI_API
#define TRUE   1
#define UTF8_MAX_CHAR_SIZE   4
#define YES   1

Typedef Documentation

typedef int swi_bool
     boolean type, used for true/false. should 

only be tested for 0 or non-zero

typedef char swi_char
typedef char * swi_charp

char type

typedef signed short swi_int16

16 bit integer signed

typedef signed long swi_int32

32 bit integer signed

typedef signed long long swi_int64

64 bit integer signed

typedef signed char swi_int8

8 bit integer signed

typedef unsigned long swi_size_t

Standard C defines a size_t type to be used for passing around length variables between functions, etc. The SDK needs a unversally-defined size_t that can be modified according to the architecture it will be running on. This definition is suitable for 32-bit architectures

typedef long swi_ssize_t

The swi_ssize_t type is a return value from Linux calls in some of the OS wrapper functions. Defined for the same reason swi_size_t is. According to online documentation this is similar to size_t except that it must represent a signed quantity

typedef unsigned short swi_UCS2

The modem returns some strings in UCS2 format. UCS2 is 16-bits max. The definition here is to aid in copying UCS2 data from the modem

typedef swi_UCS2* swi_UCS2p
typedef unsigned short swi_uint16

16 bit integer unsigned

typedef unsigned long swi_uint32

32 bit integer unsigned

typedef unsigned long long swi_uint64

64 bit integer unsigned

typedef unsigned char swi_uint8

8 bit integer unsigned


Linux SDK V1.4.0.5
Copyright (c) 2011 Sierra Wireless, Inc. All rights reserved