/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (https://www.swig.org).
 * Version 4.4.1
 *
 * Do not make changes to this file unless you know what you are doing - modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */


#define SWIG_VERSION 0x040401
#define SWIGLUA
#define SWIG_LUA_TARGET SWIG_LUA_FLAVOR_LUA
#define SWIG_LUA_MODULE_GLOBAL

/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
#  define SWIGTEMPLATEDISAMBIGUATOR template
# elif defined(__HP_aCC)
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
#  define SWIGTEMPLATEDISAMBIGUATOR template
# else
#  define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define SWIGUNUSED __attribute__ ((__unused__))
#   else
#     define SWIGUNUSED
#   endif
# elif defined(__ICC)
#   define SWIGUNUSED __attribute__ ((__unused__))
# else
#   define SWIGUNUSED
# endif
#endif

#ifndef SWIG_MSC_UNSUPPRESS_4505
# if defined(_MSC_VER)
#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
# endif
#endif

#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
#   define SWIGUNUSEDPARM(p)
# else
#   define SWIGUNUSEDPARM(p) p SWIGUNUSED
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods */
#if defined(__GNUC__)
#  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#    ifndef GCC_HASCLASSVISIBILITY
#      define GCC_HASCLASSVISIBILITY
#    endif
#  endif
#endif

#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#     define SWIGEXPORT __attribute__ ((visibility("default")))
#   else
#     define SWIGEXPORT
#   endif
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif

/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
# define _SCL_SECURE_NO_DEPRECATE
#endif

/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
#endif

/* Intel's compiler complains if a variable which was never initialised is
 * cast to void, which is a common idiom which we use to indicate that we
 * are aware a variable isn't used.  So we just silence that warning.
 * See: https://github.com/swig/swig/issues/192 for more discussion.
 */
#ifdef __INTEL_COMPILER
# pragma warning disable 592
#endif

#if defined(__cplusplus) && __cplusplus >=201103L
# define SWIG_NOEXCEPT noexcept
#else
# define SWIG_NOEXCEPT throw()
#endif 

/* -----------------------------------------------------------------------------
 * swigcompat.swg
 *
 * Macros to provide support compatibility with older C and C++ standards.
 *
 * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard.
 * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option.
 * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus.
 * ----------------------------------------------------------------------------- */

/* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF
 * if you're missing it.
 */
#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \
     (defined __cplusplus && __cplusplus >= 201103L) || \
     defined SWIG_HAVE_SNPRINTF) && \
    !defined SWIG_NO_SNPRINTF
# define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A)
# define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B)
#else
/* Fallback versions ignore the buffer size, but most of our uses either have a
 * fixed maximum possible size or dynamically allocate a buffer that's large
 * enough.
 */
# define SWIG_snprintf(O,S,F,A) sprintf(O,F,A)
# define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B)
#endif

/* -----------------------------------------------------------------------------
 * swigrun.swg
 *
 * This file contains generic C API SWIG runtime support for pointer
 * type checking.
 * ----------------------------------------------------------------------------- */

/* This should only be incremented when either the layout of swig_type_info changes,
   or for whatever reason, the runtime changes incompatibly */
#define SWIG_RUNTIME_VERSION "5"

/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
# define SWIG_QUOTE_STRING(x) #x
# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
#else
# define SWIG_TYPE_TABLE_NAME
#endif

/*
  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  creating a static or dynamic library from the SWIG runtime code.
  In 99.9% of the cases, SWIG just needs to declare them as 'static'.

  But only do this if strictly necessary, ie, if you have problems
  with your compiler or suchlike.
*/

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

/*  Generic buffer size */
#ifndef SWIG_BUFFER_SIZE
# define SWIG_BUFFER_SIZE 1024
#endif

/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN        0x1
#define SWIG_CAST_NEW_MEMORY       0x2
#define SWIG_POINTER_NO_NULL       0x4
#define SWIG_POINTER_CLEAR         0x8
#define SWIG_POINTER_RELEASE       (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)

/* Flags for new pointer objects */
#define SWIG_POINTER_OWN           0x1


/*
   Flags/methods for returning states.

   The SWIG conversion methods, as ConvertPtr, return an integer
   that tells if the conversion was successful or not. And if not,
   an error code can be returned (see swigerrors.swg for the codes).

   Use the following macros/flags to set or process the returning
   states.

   In old versions of SWIG, code such as the following was usually written:

     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
       // success code
     } else {
       //fail code
     }

   Now you can be more explicit:

    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
    } else {
      // fail code
    }

   which is the same really, but now you can also do

    Type *ptr;
    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
      if (SWIG_IsNewObj(res) {
        ...
	delete *ptr;
      } else {
        ...
      }
    } else {
      // fail code
    }

   I.e., now SWIG_ConvertPtr can return new objects and you can
   identify the case and take care of the deallocation. Of course that
   also requires SWIG_ConvertPtr to return new result values, such as

      int SWIG_ConvertPtr(obj, ptr,...) {
        if (<obj is ok>) {
          if (<need new object>) {
            *ptr = <ptr to new allocated object>;
            return SWIG_NEWOBJ;
          } else {
            *ptr = <ptr to old object>;
            return SWIG_OLDOBJ;
          }
        } else {
          return SWIG_BADOBJ;
        }
      }

   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
   SWIG errors code.

   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
   allows returning the 'cast rank', for example, if you have this

       int food(double)
       int fooi(int);

   and you call

      food(1)   // cast rank '1'  (1 -> 1.0)
      fooi(1)   // cast rank '0'

   just use the SWIG_AddCast()/SWIG_CheckState()
*/

#define SWIG_OK                    (0)
/* Runtime errors are < 0 */
#define SWIG_ERROR                 (-1)
/* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
/* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
/* Errors < -200 are generic runtime specific errors */
#define SWIG_ERROR_RELEASE_NOT_OWNED (-200)

#define SWIG_IsOK(r)               (r >= 0)
#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)

/* The CastRankLimit says how many bits are used for the cast rank */
#define SWIG_CASTRANKLIMIT         (1 << 8)
/* The NewMask denotes the object was created (using new/malloc) */
#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
/* The TmpMask is for in/out typemaps that use temporary objects */
#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
/* Simple returning values */
#define SWIG_BADOBJ                (SWIG_ERROR)
#define SWIG_OLDOBJ                (SWIG_OK)
#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
/* Check, add and del object mask methods */
#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))

/* Cast-Rank Mode */
#if defined(SWIG_CASTRANK_MODE)
#  ifndef SWIG_TypeRank
#    define SWIG_TypeRank             unsigned long
#  endif
#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
#    define SWIG_MAXCASTRANK          (2)
#  endif
#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
SWIGINTERNINLINE int SWIG_AddCast(int r) {
  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
}
SWIGINTERNINLINE int SWIG_CheckState(int r) {
  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
}
#else /* no cast-rank mode */
#  define SWIG_AddCast(r) (r)
#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif


#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef void *(*swig_converter_func)(void *, int *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);

/* Structure to store information on one type */
typedef struct swig_type_info {
  const char             *name;			/* mangled name of this type */
  const char             *str;			/* human readable name of this type */
  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
  void                   *clientdata;		/* language specific type data */
  int                    owndata;		/* flag if the structure owns the clientdata */
} swig_type_info;

/* Structure to store a type and conversion function used for casting */
typedef struct swig_cast_info {
  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
  swig_converter_func     converter;		/* function to cast the void pointers */
  struct swig_cast_info  *next;			/* pointer to next array of casts | pointer to cast hashed by value */
  unsigned int            value;		/* index of the last valid element in the array | typename hash value */
} swig_cast_info;

/* Structure used to store module information
 * Each module generates one structure like this, and the runtime collects
 * all of these structures and stores them in a circularly linked list.*/
typedef struct swig_module_info {
  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
  size_t                 size;		        /* Number of types in this module */
  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
  swig_type_info         **type_initial;	/* Array of initially generated type structures */
  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
  void                    *clientdata;		/* Language specific module data */
} swig_module_info;

/*
  Compare two type names skipping the space characters, therefore
  "char*" == "char *" and "Class<int>" == "Class<int >", etc.

  Return 0 when the two name types are equivalent, as in
  strncmp, but skipping ' '.
*/
SWIGRUNTIME int
SWIG_TypeNameComp(const char *f1, const char *l1,
		  const char *f2, const char *l2) {
  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
    while ((*f1 == ' ') && (f1 != l1)) ++f1;
    while ((*f2 == ' ') && (f2 != l2)) ++f2;
    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
  }
  return (int)((l1 - f1) - (l2 - f2));
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
*/
SWIGRUNTIME int
SWIG_TypeCmp(const char *nb, const char *tb) {
  int equiv = 1;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (equiv != 0 && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = SWIG_TypeNameComp(nb, ne, tb, te);
    if (*ne) ++ne;
  }
  return equiv;
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if not equal, 1 if equal
*/
SWIGRUNTIME int
SWIG_TypeEquiv(const char *nb, const char *tb) {
  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
}

/*
 * Hash function for type name strings, based on maRushPrime1Hash (http://amsoftware.narod.ru/algo2.html)
 */
SWIGRUNTIME unsigned int SWIG_Hash(const char *str, unsigned int len) {
  const unsigned char *data = (const unsigned char *)str;
  unsigned int hash = len, i = 0, k;
  int rem = (int)len;

  while (rem >= (int)sizeof(unsigned int)) {
    memcpy(&k, data, sizeof(unsigned int));
    k += i++;
    hash ^= k;
    hash *= 171717;
    data += sizeof(unsigned int);
    rem -= sizeof(unsigned int);
  }

  switch (rem) {
    case 3: k = (unsigned int)(data[2]) << 16;
            k |= (unsigned int)(data[1]) << 8;
            k |= (unsigned int)(data[0]);
            k += i++;
            hash ^= k;
            hash *= 171717;
            break;
    case 2: k = (unsigned int)(data[1]) << 8;
            k |= (unsigned int)(data[0]);
            k += i++;
            hash ^= k;
            hash *= 171717;
            break;
    case 1: k = (unsigned int)(data[0]);
            k += i++;
            hash ^= k;
            hash *= 171717;
            break;
  }
  return hash;
}

/*
  Check the typename
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  static const unsigned int scan_threshold = 4;
  if (ty) {
    swig_cast_info *head = ty->cast;
    unsigned int hash_value = 0;
    int hashed = 0;

    while (head) {

      if (strcmp(head->type->name, c) == 0) {
        return head;
      }

      if (head->value) {
        swig_cast_info *iter;
        swig_cast_info *last = head + head->value;
        swig_cast_info *first = head + 1;
        int search = 1;

        if (!hashed) {
          if (head->value < scan_threshold) {
            for (iter = first; iter <= last; iter++) {
              if (strcmp(iter->type->name, c) == 0) {
                return iter;
              }
            }
            search = 0;
          } else {
            hashed = 1;
            hash_value = SWIG_Hash(c, (unsigned int)strlen(c));
          }
        }

        if (search) {
          /* Binary search over sorted <'next'|'value'> pairs */
          do {
            iter = first + ((last - first) >> 1);
            if (iter->value < hash_value) {
              first = iter + 1;
            } else if (iter->value == hash_value) {

              if (strcmp(iter->next->type->name, c) == 0) {
                return iter->next;
              }

              /* Hash collision check */
              for (last = iter + 1; last->next && last->value == hash_value; last++) {
                if (strcmp(last->next->type->name, c) == 0) {
                  return last->next;
                }
              }
              for (first = iter - 1; first != head && first->value == hash_value; first--) {
                if (strcmp(first->next->type->name, c) == 0) {
                  return first->next;
                }
              }
              break;
            } else
              last = iter - 1;
          } while (first <= last);
        }
      }
      head = head->next;
    }
  }
  return 0;
}

/*
  Check the type by type address
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *head = ty->cast;
    while (head) {
      if (head->type == from) {
        return head;
      }

      if (head->value) {
        swig_cast_info *iter;
        swig_cast_info *last = head + head->value;
        swig_cast_info *first = head + 1;

        /* Binary search over sorted array of casts */
        do {
          iter = first + ((last - first) >> 1);
          if (iter->type < from) {
            first = iter + 1;
          } else if (iter->type == from) {
            return iter;
          } else
            last = iter - 1;
        } while (first <= last);
      }
      head = head->next;
    }
  }
  return 0;
}

/*
  Cast a pointer up an inheritance hierarchy
*/
SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
}

/*
   Dynamic pointer casting. Down an inheritance hierarchy
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  swig_type_info *lastty = ty;
  if (!ty || !ty->dcast) return ty;
  while (ty && (ty->dcast)) {
    ty = (*ty->dcast)(ptr);
    if (ty) lastty = ty;
  }
  return lastty;
}

/*
  Return the name associated with this type
*/
SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info *ty) {
  return ty->name;
}

/*
  Return the pretty name associated with this type,
  that is an unmangled type name in a form presentable to the user.
*/
SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info *type) {
  /* The "str" field contains the equivalent pretty names of the
     type, separated by vertical-bar characters.  Choose the last
     name. It should be the most specific; a fully resolved name
     but not necessarily with default template parameters expanded. */
  if (!type) return NULL;
  if (type->str != NULL) {
    const char *last_name = type->str;
    const char *s;
    for (s = type->str; *s; s++)
      if (*s == '|') last_name = s+1;
    return last_name;
  }
  else
    return type->name;
}

/*
   Set the clientdata field for a type
*/
SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  swig_cast_info *head = ti->cast;
  /* if (ti->clientdata == clientdata) return; */
  ti->clientdata = clientdata;

  while (head) {
    swig_cast_info *cast;
    for (cast = head; (cast - head) <= head->value; cast++) {
      if (!cast->converter) {
        swig_type_info *tc = cast->type;
        if (!tc->clientdata) {
          SWIG_TypeClientData(tc, clientdata);
        }
      }
    }
    head = head->next;
  }
}

SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  SWIG_TypeClientData(ti, clientdata);
  ti->owndata = 1;
}

/*
  Search for a swig_type_info structure only by mangled name
  Search is a O(log #types)

  We start searching at module start, and finish searching when start == end.
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info *start,
                            swig_module_info *end,
		            const char *name) {
  swig_module_info *iter = start;
  do {
    if (iter->size) {
      size_t l = 0;
      size_t r = iter->size - 1;
      do {
	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
	size_t i = (l + r) >> 1;
	const char *iname = iter->types[i]->name;
	if (iname) {
	  int compare = strcmp(name, iname);
	  if (compare == 0) {
	    return iter->types[i];
	  } else if (compare < 0) {
	    if (i) {
	      r = i - 1;
	    } else {
	      break;
	    }
	  } else if (compare > 0) {
	    l = i + 1;
	  }
	} else {
	  break; /* should never happen */
	}
      } while (l <= r);
    }
    iter = iter->next;
  } while (iter != end);
  return 0;
}

/*
  Search for a swig_type_info structure for either a mangled name or a human readable name.
  It first searches the mangled names of the types, which is a O(log #types)
  If a type is not found it then searches the human readable names, which is O(#types).

  We start searching at module start, and finish searching when start == end.
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info *start,
                     swig_module_info *end,
		     const char *name) {
  /* STEP 1: Search the name field using binary search */
  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
  if (ret) {
    return ret;
  } else {
    /* STEP 2: If the type hasn't been found, do a complete search
       of the str field (the human readable name) */
    swig_module_info *iter = start;
    do {
      size_t i = 0;
      for (; i < iter->size; ++i) {
	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
	  return iter->types[i];
      }
      iter = iter->next;
    } while (iter != end);
  }

  /* neither found a match */
  return 0;
}

/*
   Pack binary data into a string
*/
SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) {
  static const char hex[17] = "0123456789abcdef";
  const unsigned char *u = (unsigned char *) ptr;
  const unsigned char *eu =  u + sz;
  for (; u != eu; ++u) {
    unsigned char uu = *u;
    *(c++) = hex[(uu & 0xf0) >> 4];
    *(c++) = hex[uu & 0xf];
  }
  return c;
}

/*
   Unpack binary data from a string
*/
SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  unsigned char *u = (unsigned char *) ptr;
  const unsigned char *eu = u + sz;
  for (; u != eu; ++u) {
    char d = *(c++);
    unsigned char uu;
    if ((d >= '0') && (d <= '9'))
      uu = (unsigned char)((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = (unsigned char)((d - ('a'-10)) << 4);
    else
      return (char *) 0;
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (unsigned char)(d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (unsigned char)(d - ('a'-10));
    else
      return (char *) 0;
    *u = uu;
  }
  return c;
}

/*
   Pack 'void *' into a string buffer.
*/
SWIGRUNTIME char *
SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  char *r = buff;
  if ((2*sizeof(void *) + 2) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,&ptr,sizeof(void *));
  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  strcpy(r,name);
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      *ptr = (void *) 0;
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sizeof(void *));
}

SWIGRUNTIME char *
SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  char *r = buff;
  size_t lname = (name ? strlen(name) : 0);
  if ((2*sz + 2 + lname) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,ptr,sz);
  if (lname) {
    strncpy(r,name,lname+1);
  } else {
    *r = 0;
  }
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      memset(ptr,0,sz);
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sz);
}

#ifdef __cplusplus
}
#endif

/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
#define  SWIG_UnknownError    	   -1
#define  SWIG_IOError        	   -2
#define  SWIG_RuntimeError   	   -3
#define  SWIG_IndexError     	   -4
#define  SWIG_TypeError      	   -5
#define  SWIG_DivisionByZero 	   -6
#define  SWIG_OverflowError  	   -7
#define  SWIG_SyntaxError    	   -8
#define  SWIG_ValueError     	   -9
#define  SWIG_SystemError    	   -10
#define  SWIG_AttributeError 	   -11
#define  SWIG_MemoryError    	   -12
#define  SWIG_NullReferenceError   -13


/* -----------------------------------------------------------------------------
 * luarun.swg
 *
 * This file contains the runtime support for Lua modules
 * and includes code for managing global variables and pointer
 * type checking.
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#endif

#include "lua.h"
#include "lauxlib.h"
#include <stdlib.h>  /* for malloc */
#include <assert.h>  /* for a few sanity tests */

/* -----------------------------------------------------------------------------
 * Lua flavors
 * ----------------------------------------------------------------------------- */

#define SWIG_LUA_FLAVOR_LUA 1
#define SWIG_LUA_FLAVOR_ELUA 2
#define SWIG_LUA_FLAVOR_ELUAC 3

#if !defined(SWIG_LUA_TARGET)
# error SWIG_LUA_TARGET not defined
#endif

#if defined(SWIG_LUA_ELUA_EMULATE)

struct swig_elua_entry;

typedef struct swig_elua_key {
  int type;
  union {
    const char* strkey;
    lua_Number numkey;
  } key;
} swig_elua_key;

typedef struct swig_elua_val {
  int type;
  union {
    lua_Number number;
    const struct swig_elua_entry *table;
    const char *string;
    lua_CFunction function;
    struct {
      char member;
      long lvalue;
      void *pvalue;
      swig_type_info **ptype;
    } userdata;
  } value;
} swig_elua_val;

typedef struct swig_elua_entry {
  swig_elua_key key;
  swig_elua_val value;
} swig_elua_entry;

#define LSTRKEY(x) {LUA_TSTRING, {.strkey = x} }
#define LNUMKEY(x) {LUA_TNUMBER, {.numkey = x} }
#define LNILKEY {LUA_TNIL, {.strkey = 0} }

#define LNUMVAL(x) {LUA_TNUMBER, {.number = x} }
#define LFUNCVAL(x) {LUA_TFUNCTION, {.function = x} }
#define LROVAL(x) {LUA_TTABLE, {.table = x} }
#define LNILVAL {LUA_TNIL, {.string = 0} }
#define LSTRVAL(x) {LUA_TSTRING, {.string = x} }

#define LUA_REG_TYPE swig_elua_entry

#define SWIG_LUA_ELUA_EMUL_METATABLE_KEY "__metatable"

#define lua_pushrotable(L,p)\
  lua_newtable(L);\
  assert(p);\
  SWIG_Lua_elua_emulate_register(L,(swig_elua_entry*)(p));

#define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\
  LSTRKEY(B), {LUA_TUSERDATA, { .userdata={0,0,(void*)(C),&D} } }

#define SWIG_LUA_CONSTTAB_BINARY(B,S,C,D)\
  LSTRKEY(B), {LUA_TUSERDATA, { .userdata={1,S,(void*)(C),&D} } }
#endif

#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
#  define SWIG_LUA_CONSTTAB_INT(B, C) LSTRKEY(B), LNUMVAL(C)
#  define SWIG_LUA_CONSTTAB_FLOAT(B, C) LSTRKEY(B), LNUMVAL(C)
#  define SWIG_LUA_CONSTTAB_STRING(B, C) LSTRKEY(B), LSTRVAL(C)
#  define SWIG_LUA_CONSTTAB_CHAR(B, C) LSTRKEY(B), LNUMVAL(C)
    /* Those two types of constants are not supported in elua */

#ifndef SWIG_LUA_CONSTTAB_POINTER
#warning eLua does not support pointers as constants. By default, nil will be used as value
#define SWIG_LUA_CONSTTAB_POINTER(B,C,D) LSTRKEY(B), LNILVAL
#endif

#ifndef SWIG_LUA_CONSTTAB_BINARY
#warning eLua does not support pointers to member as constants. By default, nil will be used as value
#define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D) LSTRKEY(B), LNILVAL
#endif
#else /* SWIG_LUA_FLAVOR_LUA */
#  define SWIG_LUA_CONSTTAB_INT(B, C) SWIG_LUA_INT, (char *)B, (long)C, 0, 0, 0
#  define SWIG_LUA_CONSTTAB_FLOAT(B, C) SWIG_LUA_FLOAT, (char *)B, 0, (double)C, 0, 0
#  define SWIG_LUA_CONSTTAB_STRING(B, C) SWIG_LUA_STRING, (char *)B, 0, 0, (void *)C, 0
#  define SWIG_LUA_CONSTTAB_CHAR(B, C) SWIG_LUA_CHAR, (char *)B, (long)C, 0, 0, 0
#  define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\
       SWIG_LUA_POINTER, (char *)B, 0, 0, (void *)C, &D
#  define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D)\
       SWIG_LUA_BINARY,  (char *)B, S, 0, (void *)C, &D
#endif

#ifndef SWIG_LUA_ELUA_EMULATE
#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
#  define LRO_STRVAL(v) {{.p = (char *) v}, LUA_TSTRING}
#  define LSTRVAL LRO_STRVAL
#endif
#endif /* SWIG_LUA_ELUA_EMULATE*/

#ifndef SWIG_LUA_ELUA_EMULATE
#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)

#ifndef MIN_OPT_LEVEL
#define MIN_OPT_LEVEL 2
#endif

#include "lrodefs.h"
#include "lrotable.h"
#endif
#endif /* SWIG_LUA_ELUA_EMULATE*/
/* -----------------------------------------------------------------------------
 * compatibility defines
 * ----------------------------------------------------------------------------- */

/* History of Lua C API length functions:  In Lua 5.0 (and before?)
   there was "lua_strlen".  In Lua 5.1, this was renamed "lua_objlen",
   but a compatibility define of "lua_strlen" was added.  In Lua 5.2,
   this function was again renamed, to "lua_rawlen" (to emphasize that
   it doesn't call the "__len" metamethod), and the compatibility
   define of lua_strlen was removed.  All SWIG uses have been updated
   to "lua_rawlen", and we add our own defines of that here for older
   versions of Lua.  */
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
# define lua_rawlen lua_strlen
#elif LUA_VERSION_NUM == 501
# define lua_rawlen lua_objlen
#endif

/* lua_tolstring() was added in Lua 5.1.  It should be a little more
   efficient than making two separate calls and it avoids problems with order
   of evaluation so SWIG calls lua_tolstring() when it wants the length and
   we provide a compatibility implementation for Lua 5.0.  */
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
static const char *(lua_tolstring)(lua_State *L, int idx, size_t *len) {
  /* Call lua_tostring() first as it may convert the value from number to
     string. */
  const char *result = lua_tostring(L, idx);
  if (len) *len = lua_strlen(L, idx);
  return result;
}
#endif


/* lua_pushglobaltable is the recommended "future-proof" way to get
   the global table for Lua 5.2 and later.  Here we define
   lua_pushglobaltable ourselves for Lua versions before 5.2.  */
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
# define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
#endif

/* lua_absindex was introduced in Lua 5.2 */
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
# define lua_absindex(L,i) ((i)>0 || (i) <= LUA_REGISTRYINDEX ? (i) : lua_gettop(L) + (i) + 1)
#endif

/* lua_rawsetp was introduced in Lua 5.2 */
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
#define lua_rawsetp(L,index,ptr)\
  lua_pushlightuserdata(L,(void*)(ptr));\
  lua_insert(L,-2);\
  lua_rawset(L,index);

#define lua_rawgetp(L,index,ptr)\
  lua_pushlightuserdata(L,(void*)(ptr));\
  lua_rawget(L,index);

#endif

/* --------------------------------------------------------------------------
 * Helper functions for error handling
 * -------------------------------------------------------------------------- */

/* Push the string STR on the Lua stack, like lua_pushstring, but
   prefixed with the location of the innermost Lua call-point
   (as formatted by luaL_where).  */
SWIGRUNTIME void
SWIG_Lua_pusherrstring (lua_State *L, const char *str)
{
  luaL_where (L, 1);
  lua_pushstring (L, str);
  lua_concat (L, 2);
}

/* Push a formatted string generated from FMT and following args on
   the Lua stack, like lua_pushfstring, but prefixed with the
   location of the innermost Lua call-point (as formatted by luaL_where).  */
SWIGRUNTIME void
SWIG_Lua_pushferrstring (lua_State *L, const char *fmt, ...)
{
  va_list argp;
  va_start(argp, fmt);
  luaL_where(L, 1);
  lua_pushvfstring(L, fmt, argp);
  va_end(argp);
  lua_concat(L, 2);
}


/* -----------------------------------------------------------------------------
 * global swig types
 * ----------------------------------------------------------------------------- */
/* Constant table */
#define SWIG_LUA_INT     1
#define SWIG_LUA_FLOAT   2
#define SWIG_LUA_STRING  3
#define SWIG_LUA_POINTER 4
#define SWIG_LUA_BINARY  5
#define SWIG_LUA_CHAR    6

/* Structure for variable linking table */
typedef struct {
  const char *name;
  lua_CFunction get;
  lua_CFunction set;
} swig_lua_var_info;

#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
typedef const LUA_REG_TYPE swig_lua_method;
typedef const LUA_REG_TYPE swig_lua_const_info;
#else /* Normal lua */
typedef luaL_Reg swig_lua_method;

/* Constant information structure */
typedef struct {
    int type;
    char *name;
    long lvalue;
    double dvalue;
    void   *pvalue;
    swig_type_info **ptype;
} swig_lua_const_info;

#endif

typedef struct {
  const char     *name;
  lua_CFunction   getmethod;
  lua_CFunction   setmethod;
} swig_lua_attribute;


struct swig_lua_class;
/* Can be used to create namespaces. Currently used to wrap class static methods/variables/constants */
typedef struct swig_lua_namespace {
  const char            *name;
  swig_lua_method       *ns_methods;
  swig_lua_attribute    *ns_attributes;
  swig_lua_const_info   *ns_constants;
  struct swig_lua_class        **ns_classes;
  struct swig_lua_namespace    **ns_namespaces;
} swig_lua_namespace;

typedef struct swig_lua_class {
  const char    *name; /* Name that this class has in Lua */
  const char    *fqname; /* Fully qualified name - Scope + class name */
  swig_type_info   **type;
  lua_CFunction  constructor;
  void    (*destructor)(void *);
  swig_lua_method   *methods;
  swig_lua_attribute     *attributes;
  swig_lua_namespace    *cls_static;
  swig_lua_method   *metatable; /* 0 for -eluac */
  struct swig_lua_class **bases;
  const char **base_names;
} swig_lua_class;

/* this is the struct for wrapping all pointers in SwigLua
*/
typedef struct {
  swig_type_info   *type;
  int     own;  /* 1 if owned & must be destroyed */
  void        *ptr;
} swig_lua_userdata;

/* this is the struct for wrapping arbitrary packed binary data
(currently it is only used for member function pointers)
the data ordering is similar to swig_lua_userdata, but it is currently not possible
to tell the two structures apart within SWIG, other than by looking at the type
*/
typedef struct {
  swig_type_info   *type;
  int     own;  /* 1 if owned & must be destroyed */
  char data[1];       /* arbitrary amount of data */
} swig_lua_rawdata;

/* Common SWIG API */
#define SWIG_NewPointerObj(L, ptr, type, owner)       SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner)
#define SWIG_ConvertPtr(L,idx, ptr, type, flags)    SWIG_Lua_ConvertPtr(L,idx,ptr,type,flags)
#define SWIG_MustGetPtr(L,idx, type,flags, argnum,fnname)  SWIG_Lua_MustGetPtr(L,idx, type,flags, argnum,fnname)
/* for C++ member pointers, ie, member methods */
#define SWIG_ConvertMember(L, idx, ptr, sz, ty)       SWIG_Lua_ConvertPacked(L, idx, ptr, sz, ty)
#define SWIG_NewMemberObj(L, ptr, sz, type)      SWIG_Lua_NewPackedObj(L, ptr, sz, type)

/* Runtime API */
#define SWIG_GetModule(clientdata) SWIG_Lua_GetModule((lua_State*)(clientdata))
#define SWIG_SetModule(clientdata, pointer) SWIG_Lua_SetModule((lua_State*) (clientdata), pointer)
#define SWIG_MODULE_CLIENTDATA_TYPE lua_State*

/* Contract support */
#define SWIG_contract_assert(expr, msg)  \
  do { if (!(expr)) { SWIG_Lua_pusherrstring(L, (char *) msg); goto fail; } } while (0)


/* helper #defines */
#define SWIG_fail {goto fail;}
#define SWIG_fail_arg(func_name,argnum,type) \
  {SWIG_Lua_pushferrstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\
  func_name,argnum,type,SWIG_Lua_typename(L,argnum));\
  goto fail;}
#define SWIG_fail_ptr(func_name,argnum,type) \
  SWIG_fail_arg(func_name,argnum,(type && type->str)?type->str:"void*")
#define SWIG_check_num_args(func_name,a,b) \
  if (lua_gettop(L)<a || lua_gettop(L)>b) \
  {SWIG_Lua_pushferrstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\
  goto fail;}


#define SWIG_Lua_get_table(L,n) \
  (lua_pushstring(L, n), lua_rawget(L,-2))

#define SWIG_Lua_add_function(L,n,f) \
  (lua_pushstring(L, n), \
      lua_pushcfunction(L, f), \
      lua_rawset(L,-3))

#define SWIG_Lua_add_boolean(L,n,b) \
  (lua_pushstring(L, n), \
      lua_pushboolean(L, b), \
      lua_rawset(L,-3))

/* special helper for allowing 'nil' for usertypes */
#define SWIG_isptrtype(L,I) (lua_isuserdata(L,I) || lua_isnil(L,I))

#ifdef __cplusplus
/* Special helper for member function pointers
it gets the address, casts it, then dereferences it */
/*#define SWIG_mem_fn_as_voidptr(a)  (*((char**)&(a))) */
#endif

/* storing/access of swig_module_info */
SWIGRUNTIME swig_module_info *
SWIG_Lua_GetModule(lua_State *L) {
  swig_module_info *ret = 0;
  lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
  lua_rawget(L,LUA_REGISTRYINDEX);
  if (lua_islightuserdata(L,-1))
    ret=(swig_module_info*)lua_touserdata(L,-1);
  lua_pop(L,1);  /* tidy */
  return ret;
}

SWIGRUNTIME void
SWIG_Lua_SetModule(lua_State *L, swig_module_info *module) {
  /* add this all into the Lua registry: */
  lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
  lua_pushlightuserdata(L,(void*)module);
  lua_rawset(L,LUA_REGISTRYINDEX);
}

/* -----------------------------------------------------------------------------
 * global variable support code: modules
 * ----------------------------------------------------------------------------- */

/* this function is called when trying to set an immutable.
default action is to print an error.
This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */
SWIGINTERN int SWIG_Lua_set_immutable(lua_State *L)
{
/*  there should be 1 param passed in: the new value */
#ifndef SWIGLUA_IGNORE_SET_IMMUTABLE
  lua_pop(L,1);  /* remove it */
  luaL_error(L,"This variable is immutable");
#endif
    return 0;   /* should not return anything */
}

#ifdef SWIG_LUA_ELUA_EMULATE

SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *type, int own);
SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_type_info *type);
static int swig_lua_elua_emulate_unique_key;

/* This function emulates eLua rotables behaviour. It loads a rotable definition into the usual lua table. */
SWIGINTERN void SWIG_Lua_elua_emulate_register(lua_State *L, const swig_elua_entry *table)
{
  int i, table_parsed, parsed_tables_array, target_table;
  assert(lua_istable(L,-1));
  target_table = lua_gettop(L);
  /* Get the registry where we put all parsed tables to avoid loops */
  lua_rawgetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key);
  if(lua_isnil(L,-1)) {
    lua_pop(L,1);
    lua_newtable(L);
    lua_pushvalue(L,-1);
    lua_rawsetp(L,LUA_REGISTRYINDEX,(void*)(&swig_lua_elua_emulate_unique_key));
  }
  parsed_tables_array = lua_gettop(L);
  lua_pushvalue(L,target_table);
  lua_rawsetp(L, parsed_tables_array, table);
  table_parsed = 0;
  const int SWIGUNUSED pairs_start = lua_gettop(L);
  for(i = 0;table[i].key.type != LUA_TNIL || table[i].value.type != LUA_TNIL;i++)
  {
    const swig_elua_entry *entry = table + i;
    int is_metatable = 0;
    switch(entry->key.type) {
      case LUA_TSTRING:
        lua_pushstring(L,entry->key.key.strkey);
        if(strcmp(entry->key.key.strkey, SWIG_LUA_ELUA_EMUL_METATABLE_KEY) == 0)
          is_metatable = 1;
        break;
      case  LUA_TNUMBER:
        lua_pushnumber(L,entry->key.key.numkey);
        break;
      case LUA_TNIL:
        lua_pushnil(L);
        break;
      default:
        assert(0);
    }
    switch(entry->value.type) {
      case LUA_TSTRING:
        lua_pushstring(L,entry->value.value.string);
        break;
      case  LUA_TNUMBER:
        lua_pushnumber(L,entry->value.value.number);
        break;
      case LUA_TFUNCTION:
        lua_pushcfunction(L,entry->value.value.function);
        break;
      case LUA_TTABLE:
        lua_rawgetp(L,parsed_tables_array, entry->value.value.table);
        table_parsed = !lua_isnil(L,-1);
        if(!table_parsed) {
          lua_pop(L,1); /*remove nil */
          lua_newtable(L);
          SWIG_Lua_elua_emulate_register(L,entry->value.value.table);
        }
        if(is_metatable) {
          assert(lua_istable(L,-1));
          lua_pushvalue(L,-1);
          lua_setmetatable(L,target_table);
        }

        break;
      case LUA_TUSERDATA:
        if(entry->value.value.userdata.member)
          SWIG_NewMemberObj(L,entry->value.value.userdata.pvalue,
              entry->value.value.userdata.lvalue,
              *(entry->value.value.userdata.ptype));
        else
          SWIG_NewPointerObj(L,entry->value.value.userdata.pvalue,
              *(entry->value.value.userdata.ptype),0);
        break;
      case LUA_TNIL:
        lua_pushnil(L);
        break;
      default:
        assert(0);
    }
    assert(lua_gettop(L) == pairs_start + 2);
    lua_rawset(L,target_table);
  }
  lua_pop(L,1); /* Removing parsed tables storage */
  assert(lua_gettop(L) == target_table);
}

SWIGINTERN void SWIG_Lua_elua_emulate_register_clear(lua_State *L)
{
  lua_pushnil(L);
  lua_rawsetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key);
}

SWIGINTERN void SWIG_Lua_get_class_registry(lua_State *L);

SWIGINTERN int SWIG_Lua_emulate_elua_getmetatable(lua_State *L)
{
  SWIG_check_num_args("getmetatable(SWIG eLua emulation)", 1, 1);
  SWIG_Lua_get_class_registry(L);
  lua_getfield(L,-1,"lua_getmetatable");
  lua_remove(L,-2); /* remove the registry*/
  assert(!lua_isnil(L,-1));
  lua_pushvalue(L,1);
  assert(lua_gettop(L) == 3); /* object | function | object again */
  lua_call(L,1,1);
  if(!lua_isnil(L,-1)) /*There is an ordinary metatable */
    return 1;
  /*if it is a table, then emulate elua behaviour - check for __metatable attribute of a table*/
  assert(lua_gettop(L) == 2);
  if(lua_istable(L,-2)) {
    lua_pop(L,1); /*remove the nil*/
    lua_getfield(L,-1, SWIG_LUA_ELUA_EMUL_METATABLE_KEY);
  }
  assert(lua_gettop(L) == 2);
  return 1;

fail:
  lua_error(L);
  return 0;
}

SWIGINTERN void SWIG_Lua_emulate_elua_swap_getmetatable(lua_State *L)
{
  SWIG_Lua_get_class_registry(L);
  lua_pushglobaltable(L);
  lua_pushstring(L,"lua_getmetatable");
  lua_getfield(L,-2,"getmetatable");
  assert(!lua_isnil(L,-1));
  lua_rawset(L,-4);
  lua_pushstring(L, "getmetatable");
  lua_pushcfunction(L, SWIG_Lua_emulate_elua_getmetatable);
  lua_rawset(L,-3);
  lua_pop(L,2);

}
/* END OF REMOVE */

#endif
/* -----------------------------------------------------------------------------
 * global variable support code: namespaces and modules (which are the same thing)
 * ----------------------------------------------------------------------------- */

SWIGINTERN int SWIG_Lua_namespace_get(lua_State *L)
{
/*  there should be 2 params passed in
  (1) table (not the meta table)
  (2) string name of the attribute
*/
  assert(lua_istable(L,-2));  /* just in case */
  lua_getmetatable(L,-2);
  assert(lua_istable(L,-1));
  SWIG_Lua_get_table(L,".get"); /* find the .get table */
  assert(lua_istable(L,-1));
  /* look for the key in the .get table */
  lua_pushvalue(L,2);  /* key */
  lua_rawget(L,-2);
  lua_remove(L,-2); /* stack tidy, remove .get table */
  if (lua_iscfunction(L,-1))
  {  /* found it so call the fn & return its value */
    lua_call(L,0,1);  /* 1 value in (userdata),1 out (result) */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    return 1;
  }
  lua_pop(L,1);  /* remove whatever was there */
  /* ok, so try the .fn table */
  SWIG_Lua_get_table(L,".fn"); /* find the .get table */
  assert(lua_istable(L,-1));  /* just in case */
  lua_pushvalue(L,2);  /* key */
  lua_rawget(L,-2);  /* look for the fn */
  lua_remove(L,-2); /* stack tidy, remove .fn table */
  if (lua_isfunction(L,-1)) /* note: whether it's a C function or lua function */
  {  /* found it so return the fn & let lua call it */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    return 1;
  }
  lua_pop(L,1);  /* remove whatever was there */
  return 0;
}

SWIGINTERN int SWIG_Lua_namespace_set(lua_State *L)
{
/*  there should be 3 params passed in
  (1) table (not the meta table)
  (2) string name of the attribute
  (3) any for the new value
*/

  assert(lua_istable(L,1));
  lua_getmetatable(L,1);    /* get the meta table */
  assert(lua_istable(L,-1));

  SWIG_Lua_get_table(L,".set"); /* find the .set table */
  if (lua_istable(L,-1))
  {
    /* look for the key in the .set table */
    lua_pushvalue(L,2);  /* key */
    lua_rawget(L,-2);
    if (lua_iscfunction(L,-1))
    {  /* found it so call the fn & return its value */
      lua_pushvalue(L,3);  /* value */
      lua_call(L,1,0);
      return 0;
    }
    lua_pop(L,1);  /* remove the value */
  }
  lua_pop(L,1);  /* remove the value .set table */
  lua_pop(L,1); /* remote metatable */
  lua_rawset(L,-3);
  return 0;
}

#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) /* In elua this is useless */
SWIGINTERN void SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[]); /* forward declaration */
SWIGINTERN void  SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFunction getFn,lua_CFunction setFn); /* forward declaration */
SWIGINTERN void  SWIG_Lua_class_register(lua_State *L,swig_lua_class *clss);

/* helper function - register namespace methods and attributes into namespace */
SWIGINTERN int SWIG_Lua_add_namespace_details(lua_State *L, swig_lua_namespace *ns)
{
  int i;
  /* There must be namespace table (not metatable) at the top of the stack */
  assert(lua_istable(L,-1));
  SWIG_Lua_InstallConstants(L, ns->ns_constants);

  /* add methods to the namespace/module table */
  for(i=0;ns->ns_methods[i].name;i++){
    SWIG_Lua_add_function(L,ns->ns_methods[i].name,ns->ns_methods[i].func);
  }
  lua_getmetatable(L,-1);

  /* add fns */
  for(i=0;ns->ns_attributes[i].name;i++){
    SWIG_Lua_add_variable(L,ns->ns_attributes[i].name,ns->ns_attributes[i].getmethod,ns->ns_attributes[i].setmethod);
  }

  /* clear stack - remove metatble */
  lua_pop(L,1);
  return 0;
}

/* Register all classes in the namespace */
SWIGINTERN void SWIG_Lua_add_namespace_classes(lua_State *L, swig_lua_namespace *ns)
{
  swig_lua_class **classes;

  /* There must be a module/namespace table at the top of the stack */
  assert(lua_istable(L,-1));

  classes = ns->ns_classes;

  if( classes != 0 ) {
    while(*classes != 0) {
      SWIG_Lua_class_register(L, *classes);
      classes++;
    }
  }
}

/* Helper function. Creates namespace table and adds it to module table
   if 'reg' is true, then will register namespace table to parent one (must be on top of the stack
   when function is called).
   Function always returns newly registered table on top of the stack.
*/
SWIGINTERN void SWIG_Lua_namespace_register(lua_State *L, swig_lua_namespace *ns, int reg)
{
  swig_lua_namespace **sub_namespace;
  /* 1 argument - table on the top of the stack */
  const int SWIGUNUSED begin = lua_gettop(L);
  assert(lua_istable(L,-1)); /* just in case. This is supposed to be module table or parent namespace table */
  lua_checkstack(L,5);
  lua_newtable(L); /* namespace itself */
  lua_newtable(L); /* metatable for namespace */

  /* add a table called ".get" */
  lua_pushstring(L,".get");
  lua_newtable(L);
  lua_rawset(L,-3);
  /* add a table called ".set" */
  lua_pushstring(L,".set");
  lua_newtable(L);
  lua_rawset(L,-3);
  /* add a table called ".fn" */
  lua_pushstring(L,".fn");
  lua_newtable(L);
  lua_rawset(L,-3);

  /* add accessor fns for using the .get,.set&.fn */
  SWIG_Lua_add_function(L,"__index",SWIG_Lua_namespace_get);
  SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_namespace_set);

  lua_setmetatable(L,-2); /* set metatable */

  /* Register all functions, variables etc */
  SWIG_Lua_add_namespace_details(L,ns);
  /* Register classes */
  SWIG_Lua_add_namespace_classes(L,ns);

  sub_namespace = ns->ns_namespaces;
  if( sub_namespace != 0) {
    while(*sub_namespace != 0) {
      SWIG_Lua_namespace_register(L, *sub_namespace, 1);
      lua_pop(L,1); /* removing sub-namespace table */
      sub_namespace++;
    }
  }

  if (reg) {
    lua_pushstring(L,ns->name);
    lua_pushvalue(L,-2);
    lua_rawset(L,-4); /* add namespace to module table */
  }
  assert(lua_gettop(L) == begin+1);
}
#endif /* SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA */

/* -----------------------------------------------------------------------------
 * global variable support code: classes
 * ----------------------------------------------------------------------------- */

SWIGINTERN void  SWIG_Lua_get_class_metatable(lua_State *L,const char *cname);

typedef int (*swig_lua_base_iterator_func)(lua_State*,swig_type_info*, int, int *ret);

SWIGINTERN int SWIG_Lua_iterate_bases(lua_State *L, swig_type_info * SWIGUNUSED swig_type,
  int first_arg, swig_lua_base_iterator_func func, int  *const ret)
{
    /* first_arg - position of the object in stack. Everything that is above are arguments
     * and is passed to every evocation of the func */
    int last_arg = lua_gettop(L);/* position of last argument */
    int original_metatable = last_arg + 1;
    size_t bases_count;
    int result = SWIG_ERROR;
    int bases_table;
    (void)swig_type;
    lua_getmetatable(L,first_arg);

    /* initialise base search */
#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
    SWIG_Lua_get_table(L,".bases");
    assert(lua_istable(L,-1));
    bases_count = lua_rawlen(L,-1);
    bases_table = lua_gettop(L);
#else
    /* In elua .bases table doesn't exist. Use table from swig_lua_class */
    (void)bases_table;
    assert(swig_type!=0);
    swig_module_info *module=SWIG_GetModule(L);
    swig_lua_class **bases= ((swig_lua_class*)(swig_type->clientdata))->bases;
    const char **base_names= ((swig_lua_class*)(swig_type->clientdata))->base_names;
    bases_count = 0;
    for(;base_names[bases_count];
      bases_count++);/* get length of bases */
#endif

    if(ret)
      *ret = 0;
    if(bases_count>0)
    {
      int to_remove;
      size_t i;
      int j;
      int subcall_last_arg;
      int subcall_first_arg = lua_gettop(L) + 1;/* Here a copy of first_arg and arguments begin */
      int valid = 1;
      swig_type_info *base_swig_type = 0;
      for(j=first_arg;j<=last_arg;j++)
        lua_pushvalue(L,j);
      subcall_last_arg = lua_gettop(L);

      /* Trick: temporarily replacing original metatable with metatable for base class and call getter */
      for(i=0;i<bases_count;i++) {
        /* Iteration through class bases */
#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
        lua_rawgeti(L,bases_table,i+1);
        base_swig_type = 0;
        if(lua_isnil(L,-1)) {
          valid = 0;
          lua_pop(L,1);
        } else {
          valid = 1;
        }
#else /* In elua .bases table doesn't exist. Use table from swig_lua_class */
        swig_lua_class *base_class = bases[i];
        if(!base_class) {
          valid = 0;
        } else {
          valid = 1;
          SWIG_Lua_get_class_metatable(L,base_class->fqname);
          base_swig_type = SWIG_TypeQueryModule(module,module,base_names[i]);
          assert(base_swig_type != 0);
        }
#endif

        if(!valid)
          continue;
        assert(lua_isuserdata(L, subcall_first_arg));
        assert(lua_istable(L,-1));
        lua_setmetatable(L,subcall_first_arg); /* Set new metatable */
        assert(lua_gettop(L) == subcall_last_arg);
        result = func(L, base_swig_type,subcall_first_arg, ret); /* Forward call */
        if(result != SWIG_ERROR) {
          break;
        }
      }
      /* Restore original metatable */
      lua_pushvalue(L,original_metatable);
      lua_setmetatable(L,first_arg);
      /* Clear - remove everything between last_arg and subcall_last_arg including */
      to_remove = subcall_last_arg - last_arg;
      for(j=0;j<to_remove;j++)
        lua_remove(L,last_arg+1);
    } else {
      /* Remove everything after last_arg */
      lua_pop(L, lua_gettop(L) - last_arg);
    }
    if(ret) assert(lua_gettop(L) == last_arg + *ret);
    return result;
}

/* The class.get method helper, performs the lookup of class attributes.
 * It returns an error code. Number of function return values is passed inside 'ret'.
 * first_arg is not used in this function because function always has 2 arguments.
 */
SWIGINTERN int  SWIG_Lua_class_do_get_item(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
{
/*  there should be 2 params passed in
  (1) userdata (not the meta table)
  (2) string name of the attribute
*/
  int bases_search_result;
  int substack_start = lua_gettop(L)-2;
  assert(first_arg == substack_start+1);
  (void)first_arg;
  lua_checkstack(L,5);
  assert(lua_isuserdata(L,-2));  /* just in case */
  lua_getmetatable(L,-2);    /* get the meta table */
  assert(lua_istable(L,-1));  /* just in case */
  /* NEW: looks for the __getitem() fn
  this is a user provided get fn */
  SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */
  if (lua_iscfunction(L,-1))  /* if it's there */
  {  /* found it so call the fn & return its value */
    lua_pushvalue(L,substack_start+1);  /* the userdata */
    lua_pushvalue(L,substack_start+2);  /* the parameter */
    lua_call(L,2,1);  /* 2 value in (userdata),1 out (result) */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    if(ret) *ret = 1;
    return SWIG_OK;
  }
  lua_pop(L,1);
  /* Remove the metatable */
  lua_pop(L,1);
  /* Search in base classes */
  bases_search_result = SWIG_Lua_iterate_bases(L,type,substack_start+1,SWIG_Lua_class_do_get_item,ret);
  return bases_search_result;  /* sorry not known */
}


/* The class.get method helper, performs the lookup of class attributes.
 * It returns an error code. Number of function return values is passed inside 'ret'.
 * first_arg is not used in this function because function always has 2 arguments.
 */
SWIGINTERN int  SWIG_Lua_class_do_get(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
{
/*  there should be 2 params passed in
  (1) userdata (not the meta table)
  (2) string name of the attribute
*/
  int bases_search_result;
  int substack_start = lua_gettop(L)-2;
  assert(first_arg == substack_start+1);
  (void)first_arg;
  lua_checkstack(L,5);
  assert(lua_isuserdata(L,-2));  /* just in case */
  lua_getmetatable(L,-2);    /* get the meta table */
  assert(lua_istable(L,-1));  /* just in case */
  SWIG_Lua_get_table(L,".get"); /* find the .get table */
  assert(lua_istable(L,-1));  /* just in case */
  /* look for the key in the .get table */
  lua_pushvalue(L,substack_start+2);  /* key */
  lua_rawget(L,-2);
  lua_remove(L,-2); /* stack tidy, remove .get table */
  if (lua_iscfunction(L,-1))
  {  /* found it so call the fn & return its value */
    lua_pushvalue(L,substack_start+1);  /* the userdata */
    lua_call(L,1,1);  /* 1 value in (userdata),1 out (result) */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    if(ret)
      *ret = 1;
    return SWIG_OK;
  }
  lua_pop(L,1);  /* remove whatever was there */
  /* ok, so try the .fn table */
  SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
  assert(lua_istable(L,-1));  /* just in case */
  lua_pushvalue(L,substack_start+2);  /* key */
  lua_rawget(L,-2);  /* look for the fn */
  lua_remove(L,-2); /* stack tidy, remove .fn table */
  if (lua_isfunction(L,-1)) /* note: if it's a C function or lua function */
  {  /* found it so return the fn & let lua call it */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    if(ret)
      *ret = 1;
    return SWIG_OK;
  }
  lua_pop(L,1);  /* remove whatever was there */
  /* Remove the metatable */
  lua_pop(L,1);
  /* Search in base classes */
  bases_search_result = SWIG_Lua_iterate_bases(L,type,substack_start+1,SWIG_Lua_class_do_get,ret);
  return bases_search_result;  /* sorry not known */
}

/* the class.get method, performs the lookup of class attributes
 */
SWIGINTERN int  SWIG_Lua_class_get(lua_State *L)
{
/*  there should be 2 params passed in
  (1) userdata (not the meta table)
  (2) string name of the attribute
*/
  int result;
  swig_lua_userdata *usr;
  swig_type_info *type;
  int ret = 0;
  assert(lua_isuserdata(L,1));
  usr=(swig_lua_userdata*)lua_touserdata(L,1);  /* get data */
  type = usr->type;
  result = SWIG_Lua_class_do_get(L,type,1,&ret);
  if(result == SWIG_OK)
    return ret;

  result = SWIG_Lua_class_do_get_item(L,type,1,&ret);
  if(result == SWIG_OK)
    return ret;

  return 0;
}

/* helper for the class.set method, performs the lookup of class attributes
 * It returns error code. Number of function return values is passed inside 'ret'
 */
SWIGINTERN int  SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int first_arg, int *ret)
{
/*  there should be 3 params passed in
  (1) table (not the meta table)
  (2) string name of the attribute
  (3) any for the new value
  */

  int bases_search_result;
  int substack_start = lua_gettop(L) - 3;
  lua_checkstack(L,5);
  assert(lua_isuserdata(L,substack_start+1));  /* just in case */
  lua_getmetatable(L,substack_start+1);    /* get the meta table */
  assert(lua_istable(L,-1));  /* just in case */
  if(ret)
    *ret = 0; /* it is setter - number of return values is always 0 */

  SWIG_Lua_get_table(L,".set"); /* find the .set table */
  if (lua_istable(L,-1))
  {
    /* look for the key in the .set table */
    lua_pushvalue(L,substack_start+2);  /* key */
    lua_rawget(L,-2);
    lua_remove(L,-2); /* tidy stack, remove .set table */
    if (lua_iscfunction(L,-1))
    {  /* found it so call the fn & return its value */
      lua_pushvalue(L,substack_start+1);  /* userdata */
      lua_pushvalue(L,substack_start+3);  /* value */
      lua_call(L,2,0);
      lua_remove(L,substack_start+4); /*remove metatable*/
      return SWIG_OK;
    }
    lua_pop(L,1);  /* remove the value */
  } else {
    lua_pop(L,1);  /* remove the answer for .set table request*/
  }
  /* NEW: looks for the __setitem() fn
  this is a user provided set fn */
  SWIG_Lua_get_table(L,"__setitem"); /* find the fn */
  if (lua_iscfunction(L,-1))  /* if it's there */
  {  /* found it so call the fn & return its value */
    lua_pushvalue(L,substack_start+1);  /* the userdata */
    lua_pushvalue(L,substack_start+2);  /* the parameter */
    lua_pushvalue(L,substack_start+3);  /* the value */
    lua_call(L,3,0);  /* 3 values in ,0 out */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    return SWIG_OK;
  }
  lua_pop(L,1); /* remove value */

  lua_pop(L,1); /* remove metatable */
  /* Search among bases */
  bases_search_result = SWIG_Lua_iterate_bases(L,type,first_arg,SWIG_Lua_class_do_set,ret);
  if(ret)
    assert(*ret == 0);
  assert(lua_gettop(L) == substack_start + 3);
  return bases_search_result;
}

/* This is the actual method exported to Lua. It calls SWIG_Lua_class_do_set and correctly
 * handles return values.
 */
SWIGINTERN int  SWIG_Lua_class_set(lua_State *L)
{
/*  There should be 3 params passed in
  (1) table (not the meta table)
  (2) string name of the attribute
  (3) any for the new value
  */
  int ret = 0;
  int result;
  swig_lua_userdata *usr;
  swig_type_info *type;
  assert(lua_isuserdata(L,1));
  usr=(swig_lua_userdata*)lua_touserdata(L,1);  /* get data */
  type = usr->type;
  result = SWIG_Lua_class_do_set(L,type,1,&ret);
  if(result != SWIG_OK) {
   SWIG_Lua_pushferrstring(L,"Assignment not possible. No setter/member with this name. For custom assignments implement __setitem method.");
   lua_error(L);
  } else {
    assert(ret==0);
  }
  return 0;
}

/* the class.destruct method called by the interpreter */
SWIGINTERN int  SWIG_Lua_class_destruct(lua_State *L)
{
/*  there should be 1 params passed in
  (1) userdata (not the meta table) */
  swig_lua_userdata *usr;
  swig_lua_class *clss;
  assert(lua_isuserdata(L,-1));  /* just in case */
  usr=(swig_lua_userdata*)lua_touserdata(L,-1);  /* get it */
  /* if must be destroyed & has a destructor */
  if (usr->own) /* if must be destroyed */
  {
    clss=(swig_lua_class*)usr->type->clientdata;  /* get the class */
    if (clss && clss->destructor)  /* there is a destroy fn */
    {
      clss->destructor(usr->ptr);  /* bye bye */
    }
  }
  return 0;
}

/* the class.__tostring method called by the interpreter and print */
SWIGINTERN int  SWIG_Lua_class_tostring(lua_State *L)
{
/*  there should be 1 param passed in
  (1) userdata (not the metatable) */
  swig_lua_userdata* userData;
  assert(lua_isuserdata(L,1));  /* just in case */
  userData = (swig_lua_userdata*)lua_touserdata(L,1); /* get the userdata address */

  lua_pushfstring(L, "<userdata of type '%s' at %p>", userData->type->str, userData->ptr);
  return 1;
}

/* to manually disown some userdata */
SWIGINTERN int  SWIG_Lua_class_disown(lua_State *L)
{
/*  there should be 1 params passed in
  (1) userdata (not the meta table) */
  swig_lua_userdata *usr;
  assert(lua_isuserdata(L,-1));  /* just in case */
  usr=(swig_lua_userdata*)lua_touserdata(L,-1);  /* get it */

  usr->own = 0; /* clear our ownership */
  return 0;
}

/* lua callable function to compare userdata's value
the issue is that two userdata may point to the same thing
but to lua, they are different objects */
SWIGRUNTIME int SWIG_Lua_class_equal(lua_State *L)
{
  int result;
  swig_lua_userdata *usr1,*usr2;
  if (!lua_isuserdata(L,1) || !lua_isuserdata(L,2))  /* just in case */
    return 0;  /* nil reply */
  usr1=(swig_lua_userdata*)lua_touserdata(L,1);  /* get data */
  usr2=(swig_lua_userdata*)lua_touserdata(L,2);  /* get data */
  /*result=(usr1->ptr==usr2->ptr && usr1->type==usr2->type); only works if type is the same*/
  result=(usr1->ptr==usr2->ptr);
   lua_pushboolean(L,result);
  return 1;
}

/* populate table at the top of the stack with metamethods that ought to be inherited */
SWIGINTERN void SWIG_Lua_populate_inheritable_metamethods(lua_State *L)
{
  SWIG_Lua_add_boolean(L, "__add", 1);
  SWIG_Lua_add_boolean(L, "__sub", 1);
  SWIG_Lua_add_boolean(L, "__mul", 1);
  SWIG_Lua_add_boolean(L, "__div", 1);
  SWIG_Lua_add_boolean(L, "__mod", 1);
  SWIG_Lua_add_boolean(L, "__pow", 1);
  SWIG_Lua_add_boolean(L, "__unm", 1);
  SWIG_Lua_add_boolean(L, "__len", 1 );
  SWIG_Lua_add_boolean(L, "__concat", 1 );
  SWIG_Lua_add_boolean(L, "__eq", 1);
  SWIG_Lua_add_boolean(L, "__lt", 1);
  SWIG_Lua_add_boolean(L, "__le", 1);
  SWIG_Lua_add_boolean(L, "__call", 1);
  SWIG_Lua_add_boolean(L, "__tostring", 1);
  SWIG_Lua_add_boolean(L, "__gc", 0);
}

/* creates the swig registry */
SWIGINTERN void SWIG_Lua_create_class_registry(lua_State *L)
{
  /* create main SWIG registry table */
  lua_pushstring(L,"SWIG");
  lua_newtable(L);
  /* populate it with some predefined data */

  /* .library table. Placeholder */
  lua_pushstring(L,".library");
  lua_newtable(L);
  {
    /* list of metamethods that class inherits from its bases */
    lua_pushstring(L,"inheritable_metamethods");
    lua_newtable(L);
    /* populate with list of metamethods */
    SWIG_Lua_populate_inheritable_metamethods(L);
    lua_rawset(L,-3);
  }
  lua_rawset(L,-3);

  lua_rawset(L,LUA_REGISTRYINDEX);
}

/* gets the swig registry (or creates it) */
SWIGINTERN void  SWIG_Lua_get_class_registry(lua_State *L)
{
  /* add this all into the swig registry: */
  lua_pushstring(L,"SWIG");
  lua_rawget(L,LUA_REGISTRYINDEX);  /* get the registry */
  if (!lua_istable(L,-1))  /* not there */
  {  /* must be first time, so add it */
    lua_pop(L,1);  /* remove the result */
    SWIG_Lua_create_class_registry(L);
    /* then get it */
    lua_pushstring(L,"SWIG");
    lua_rawget(L,LUA_REGISTRYINDEX);
  }
}

SWIGINTERN void SWIG_Lua_get_inheritable_metamethods(lua_State *L)
{
  SWIG_Lua_get_class_registry(L);
  lua_pushstring(L, ".library");
  lua_rawget(L,-2);
  assert( !lua_isnil(L,-1) );
  lua_pushstring(L, "inheritable_metamethods");
  lua_rawget(L,-2);

  /* Remove class registry and library table */
  lua_remove(L,-2);
  lua_remove(L,-2);
}

/* Helper function to get the classes metatable from the register */
SWIGINTERN void  SWIG_Lua_get_class_metatable(lua_State *L,const char *cname)
{
  SWIG_Lua_get_class_registry(L);  /* get the registry */
  lua_pushstring(L,cname);  /* get the name */
  lua_rawget(L,-2);    /* get it */
  lua_remove(L,-2);    /* tidy up (remove registry) */
}

/* Set up the base classes pointers.
Each class structure has a list of pointers to the base class structures.
This function fills them.
It cannot be done at compile time, as this will not work with hireachies
spread over more than one swig file.
Therefore it must be done at runtime, querying the SWIG type system.
*/
SWIGINTERN void SWIG_Lua_init_base_class(lua_State *L,swig_lua_class *clss)
{
  int i=0;
  swig_module_info *module=SWIG_GetModule(L);
  for(i=0;clss->base_names[i];i++)
  {
    if (clss->bases[i]==0) /* not found yet */
    {
      /* lookup and cache the base class */
      swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]);
      if (info) clss->bases[i] = (swig_lua_class *) info->clientdata;
    }
  }
}

#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
/* Merges two tables  */
SWIGINTERN void SWIG_Lua_merge_tables_by_index(lua_State *L, int target, int source)
{
  /* iterating */
  lua_pushnil(L);
  while (lua_next(L,source) != 0) {
    /* -1 - value, -2 - index */
    /* have to copy to assign */
    lua_pushvalue(L,-2); /* copy of index */
    lua_pushvalue(L,-2); /* copy of value */
    lua_rawset(L, target);
    lua_pop(L,1);
    /* only key is left */
  }
}

/* Merges two tables with given name. original - index of target metatable, base - index of source metatable */
SWIGINTERN void SWIG_Lua_merge_tables(lua_State *L, const char* name, int original, int base)
{
  /* push original[name], then base[name] */
  lua_pushstring(L,name);
  lua_rawget(L,original);
  int original_table = lua_gettop(L);
  lua_pushstring(L,name);
  lua_rawget(L,base);
  int base_table = lua_gettop(L);
  SWIG_Lua_merge_tables_by_index(L, original_table, base_table);
  /* clearing stack */
  lua_pop(L,2);
}

/* Function takes all symbols from base and adds it to derived class. It's just a helper. */
SWIGINTERN void SWIG_Lua_class_squash_base(lua_State *L, swig_lua_class *base_cls)
{
  /* There is one parameter - original, i.e. 'derived' class metatable */
  assert(lua_istable(L,-1));
  int original = lua_gettop(L);
  SWIG_Lua_get_class_metatable(L,base_cls->fqname);
  int base = lua_gettop(L);
  SWIG_Lua_merge_tables(L, ".fn", original, base );
  SWIG_Lua_merge_tables(L, ".set", original, base );
  SWIG_Lua_merge_tables(L, ".get", original, base );
  lua_pop(L,1);
}

/* Function squashes all symbols from 'clss' bases into itself */
SWIGINTERN void  SWIG_Lua_class_squash_bases(lua_State *L, swig_lua_class *clss)
{
  int i;
  SWIG_Lua_get_class_metatable(L,clss->fqname);
  for(i=0;clss->base_names[i];i++)
  {
    if (clss->bases[i]==0) /* Somehow it's not found. Skip it */
      continue;
    /* Thing is: all bases are already registered. Thus they have already executed
     * this function. So we just need to squash them into us, because their bases
     * are already squashed into them. No need for recursion here!
     */
    SWIG_Lua_class_squash_base(L, clss->bases[i]);
  }
  lua_pop(L,1); /*tidy stack*/
}
#endif

#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) /* In elua this is useless */
/* helper add a variable to a registered class */
SWIGINTERN void  SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFunction getFn,lua_CFunction setFn)
{
  assert(lua_istable(L,-1));  /* just in case */
  SWIG_Lua_get_table(L,".get"); /* find the .get table */
  assert(lua_istable(L,-1));  /* just in case */
  SWIG_Lua_add_function(L,name,getFn);
  lua_pop(L,1);       /* tidy stack (remove table) */
  if (setFn)
  {
    SWIG_Lua_get_table(L,".set"); /* find the .set table */
    assert(lua_istable(L,-1));  /* just in case */
    SWIG_Lua_add_function(L,name,setFn);
    lua_pop(L,1);       /* tidy stack (remove table) */
  }
}

/* helper to recursively add class static details (static attributes, operations and constants) */
SWIGINTERN void SWIG_Lua_add_class_static_details(lua_State *L, swig_lua_class *clss)
{
  int i = 0;
  /* The class namespace table must be on the top of the stack */
  assert(lua_istable(L,-1));
  /* call all the base classes first: we can then override these later: */
  for(i=0;clss->bases[i];i++)
  {
    SWIG_Lua_add_class_static_details(L,clss->bases[i]);
  }

  SWIG_Lua_add_namespace_details(L, clss->cls_static);
}

SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss); /* forward declaration */

/* helper to recursively add class details (attributes & operations) */
SWIGINTERN void  SWIG_Lua_add_class_instance_details(lua_State *L, swig_lua_class *clss)
{
  int i;
  size_t bases_count = 0;
  /* Add bases to .bases table */
  SWIG_Lua_get_table(L,".bases");
  assert(lua_istable(L,-1));  /* just in case */
  for(i=0;clss->bases[i];i++)
  {
    SWIG_Lua_get_class_metatable(L,clss->bases[i]->fqname);
    /* Base class must be already registered */
    assert(lua_istable(L,-1));
    lua_rawseti(L,-2,i+1); /* In lua indexing starts from 1 */
    bases_count++;
  }
  assert(lua_rawlen(L,-1) == bases_count);
  lua_pop(L,1); /* remove .bases table */
  /* add attributes */
  for(i=0;clss->attributes[i].name;i++){
    SWIG_Lua_add_variable(L,clss->attributes[i].name,clss->attributes[i].getmethod,clss->attributes[i].setmethod);
  }
  /* add methods to the metatable */
  SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
  assert(lua_istable(L,-1));  /* just in case */
  for(i=0;clss->methods[i].name;i++){
    SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].func);
  }
  lua_pop(L,1);       /* tidy stack (remove table) */
  /* add operator overloads
    This adds methods from metatable array to metatable. Can mess up garbage
    collectind if someone defines __gc method
    */
  if(clss->metatable) {
    for(i=0;clss->metatable[i].name;i++) {
      SWIG_Lua_add_function(L,clss->metatable[i].name,clss->metatable[i].func);
    }
  }

#if !defined(SWIG_LUA_SQUASH_BASES)
  /* Adding metamethods that are defined in base classes. If bases were squashed
   * then it is obviously unnecessary
   */
  SWIG_Lua_add_class_user_metamethods(L, clss);
#endif
}

/* Helpers to add user defined class metamedhods - __add, __sub etc. The helpers are needed
   for the following issue: Lua runtime checks for metamethod existence with rawget function
   ignoring our SWIG-provided __index and __newindex functions. Thus our inheritance-aware method
   search algorithm doesn't work in such case. (Not to say that Lua runtime queries metamethod directly
   in metatable and not in object).
   Current solution is this: if somewhere in hierarchy metamethod __x is defined, then all descendants
   are automatically given a special proxy __x that calls the real __x method.
   Obvious idea - to copy __x instead of creating __x-proxy is wrong because if someone changes __x in runtime,
   those changes must be reflected in all descendants.
*/

SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L); /*forward declaration*/

/* The real function that resolves a metamethod.
 * Function searches given class and all its bases (recursively) for first instance of something that is
 * not equal to SWIG_Lua_resolve_metamethod. (Almost always this 'something' is actual metamethod implementation
 * and it is a SWIG-generated C function.). It returns value on the top of the L and there is no garbage below the
 * answer.
 * Returns 1 if found, 0 otherwise.
 * clss is class which metatable we will search for method
 * metamethod_name_idx is index in L where metamethod name (as string) lies
 * skip_check allows skipping searching metamethod in the given class and immediately going to searching in bases. skip_check
 * is not carried to subsequent recursive calls - false is always passed. It is set to true only at first call from
 * SWIG_Lua_resolve_metamethod
 * */
SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class *clss, int metamethod_name_idx,
    int skip_check)
{
  /* This function is called recursively */
  int result = 0;
  int i = 0;

  if (!skip_check) {
    SWIG_Lua_get_class_metatable(L, clss->fqname);
    lua_pushvalue(L, metamethod_name_idx);
    lua_rawget(L,-2);
    /* If this is cfunction and it is equal to SWIG_Lua_resolve_metamethod then
     * this isn't the function we are looking for :)
     * lua_tocfunction will return NULL if not cfunction
     */
    if (!lua_isnil(L,-1) && lua_tocfunction(L,-1) != SWIG_Lua_resolve_metamethod ) {
      lua_remove(L,-2); /* removing class metatable */
      return 1;
    }
    lua_pop(L,2); /* remove class metatable and query result */
  }

  /* Forwarding calls to bases */
  for(i=0;clss->bases[i];i++)
  {
    result = SWIG_Lua_do_resolve_metamethod(L, clss->bases[i], metamethod_name_idx, 0);
    if (result)
      break;
  }

  return result;
}

/* The proxy function for metamethod. All parameters are passed as cclosure. Searches for actual method
 * and calls it */
SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L)
{
  int numargs;
  int metamethod_name_idx;
  const swig_lua_class* clss;
  int result;

  lua_checkstack(L,5);
  numargs = lua_gettop(L); /* number of arguments to pass to actual metamethod */

  /* Get upvalues from closure */
  lua_pushvalue(L, lua_upvalueindex(1)); /*Get function name*/
  metamethod_name_idx = lua_gettop(L);

  lua_pushvalue(L, lua_upvalueindex(2));
  clss = (const swig_lua_class*)(lua_touserdata(L,-1));
  lua_pop(L,1); /* remove lightuserdata with clss from stack */

  /* Actual work */
  result = SWIG_Lua_do_resolve_metamethod(L, clss, metamethod_name_idx, 1);
  if (!result) {
   SWIG_Lua_pushferrstring(L,"The metamethod proxy is set, but it failed to find actual metamethod. Memory corruption is most likely explanation.");
   lua_error(L);
   return 0;
  }

  lua_remove(L,-2); /* remove metamethod key */
  lua_insert(L,1); /* move function to correct position */
  lua_call(L, numargs, LUA_MULTRET);
  return lua_gettop(L); /* return all results */
}


/* If given metamethod must be present in given class, then creates appropriate proxy
 * Returns 1 if successfully added, 0 if not added because no base class has it, -1
 * if method is defined in the class metatable itself
 */
SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *clss, const int metatable_index)
{
  int key_index;
  int success = 0;
  int i = 0;

  /* metamethod name - on the top of the stack */
  assert(lua_isstring(L,-1));

  key_index = lua_gettop(L);

  /* Check whether method is already defined in metatable */
  lua_pushvalue(L,key_index); /* copy of the key */
  lua_gettable(L,metatable_index);
  if( !lua_isnil(L,-1) ) {
    lua_pop(L,1);
    return -1;
  }
  lua_pop(L,1);

  /* Iterating over immediate bases */
  for(i=0;clss->bases[i];i++)
  {
    const swig_lua_class *base = clss->bases[i];
    SWIG_Lua_get_class_metatable(L, base->fqname);
    lua_pushvalue(L, key_index);
    lua_rawget(L, -2);
    if( !lua_isnil(L,-1) ) {
      lua_pushvalue(L, key_index);

      /* Add proxy function */
      lua_pushvalue(L, key_index); /* first closure value is function name */
      lua_pushlightuserdata(L, clss); /* second closure value is swig_lua_class structure */
      lua_pushcclosure(L, SWIG_Lua_resolve_metamethod, 2);

      lua_rawset(L, metatable_index);
      success = 1;
    }
    lua_pop(L,1); /* remove function or nil */
    lua_pop(L,1); /* remove base class metatable */

    if( success )
      break;
  }

  return success;
}

SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss)
{
  int metatable_index;
  int metamethods_info_index;
  int tostring_undefined;
  int eq_undefined = 0;

  SWIG_Lua_get_class_metatable(L, clss->fqname);
  metatable_index = lua_gettop(L);
  SWIG_Lua_get_inheritable_metamethods(L);
  assert(lua_istable(L,-1));
  metamethods_info_index = lua_gettop(L);
  lua_pushnil(L); /* first key */
  while(lua_next(L, metamethods_info_index) != 0 ) {
    /* key at index -2, value at index -1 */
    const int is_inheritable = lua_toboolean(L,-2);
    lua_pop(L,1); /* remove value - we don't need it anymore */

    if(is_inheritable) { /* if metamethod is inheritable */
      SWIG_Lua_add_class_user_metamethod(L,clss,metatable_index);
    }
  }

  lua_pop(L,1); /* remove inheritable metamethods table */

  /* Special handling for __tostring method */
  lua_pushstring(L, "__tostring");
  lua_pushvalue(L,-1);
  lua_rawget(L,metatable_index);
  tostring_undefined = lua_isnil(L,-1);
  lua_pop(L,1);
  if( tostring_undefined ) {
    lua_pushcfunction(L, SWIG_Lua_class_tostring);
    lua_rawset(L, metatable_index);
  } else {
    lua_pop(L,1); /* remove copy of the key */
  }

  /* Special handling for __eq method */
  lua_pushstring(L, "__eq");
  lua_pushvalue(L,-1);
  lua_rawget(L,metatable_index);
  eq_undefined = lua_isnil(L,-1);
  lua_pop(L,1);
  if( eq_undefined ) {
    lua_pushcfunction(L, SWIG_Lua_class_equal);
    lua_rawset(L, metatable_index);
  } else {
    lua_pop(L,1); /* remove copy of the key */
  }
  /* Warning: __index and __newindex are SWIG-defined. For user-defined operator[]
   * a __getitem/__setitem method should be defined
   */
  lua_pop(L,1); /* pop class metatable */
}

/* Register class static methods,attributes etc as well as constructor proxy */
SWIGINTERN void SWIG_Lua_class_register_static(lua_State *L, swig_lua_class *clss)
{
  const int SWIGUNUSED begin = lua_gettop(L);
  lua_checkstack(L,5); /* just in case */
  assert(lua_istable(L,-1));  /* just in case */
  assert(strcmp(clss->name, clss->cls_static->name) == 0); /* in class those 2 must be equal */

  SWIG_Lua_namespace_register(L,clss->cls_static, 1);

  assert(lua_istable(L,-1)); /* just in case */

  /*  add its constructor to module with the name of the class
  so you can do MyClass(...) as well as new_MyClass(...)
  BUT only if a constructor is defined
  (this overcomes the problem of pure virtual classes without constructors)*/
  if (clss->constructor)
  {
    lua_getmetatable(L,-1);
    assert(lua_istable(L,-1)); /* just in case */
    SWIG_Lua_add_function(L,"__call", clss->constructor);
    lua_pop(L,1);
  }

  assert(lua_istable(L,-1)); /* just in case */
  SWIG_Lua_add_class_static_details(L, clss);

  /* clear stack */
  lua_pop(L,1);
  assert( lua_gettop(L) == begin );
}

/* Performs the instance (non-static) class registration process. Metatable for class is created
 * and added to the class registry.
 */
SWIGINTERN void  SWIG_Lua_class_register_instance(lua_State *L,swig_lua_class *clss)
{
  const int SWIGUNUSED begin = lua_gettop(L);
  int i;
  /* if name already there (class is already registered) then do nothing */
  SWIG_Lua_get_class_registry(L);  /* get the registry */
  lua_pushstring(L,clss->fqname);  /* get the name */
  lua_rawget(L,-2);
  if(!lua_isnil(L,-1)) {
    lua_pop(L,2);
    assert(lua_gettop(L)==begin);
    return;
  }
  lua_pop(L,2); /* tidy stack */
  /* Recursively initialize all bases */
  for(i=0;clss->bases[i];i++)
  {
    SWIG_Lua_class_register_instance(L,clss->bases[i]);
  }
  /* Again, get registry and push name */
  SWIG_Lua_get_class_registry(L);  /* get the registry */
  lua_pushstring(L,clss->fqname);  /* get the name */
  lua_newtable(L);    /* create the metatable */
#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
  /* If squashing is requested, then merges all bases metatable into this one.
   * It would get us all special methods: __getitem, __add etc.
   * This would set .fn, .type, and other .xxx incorrectly, but we will overwrite it right away
   */
  {
    int new_metatable_index = lua_absindex(L,-1);
    for(i=0;clss->bases[i];i++)
    {
      int base_metatable;
      SWIG_Lua_get_class_metatable(L,clss->bases[i]->fqname);
      base_metatable = lua_absindex(L,-1);
      SWIG_Lua_merge_tables_by_index(L,new_metatable_index, base_metatable);
      lua_pop(L,1);
    }
  }
  /* And now we will overwrite all incorrectly set data */
#endif
  /* add string of class name called ".type" */
  lua_pushstring(L,".type");
  lua_pushstring(L,clss->fqname);
  lua_rawset(L,-3);
  /* add a table called bases */
  lua_pushstring(L,".bases");
  lua_newtable(L);
  lua_rawset(L,-3);
  /* add a table called ".get" */
  lua_pushstring(L,".get");
  lua_newtable(L);
  lua_rawset(L,-3);
  /* add a table called ".set" */
  lua_pushstring(L,".set");
  lua_newtable(L);
  lua_rawset(L,-3);
  /* add a table called ".fn" */
  lua_pushstring(L,".fn");
  lua_newtable(L);
  /* add manual disown method */
  SWIG_Lua_add_function(L,"__disown",SWIG_Lua_class_disown);
  lua_rawset(L,-3);
  /* add accessor fns for using the .get,.set&.fn */
  SWIG_Lua_add_function(L,"__index",SWIG_Lua_class_get);
  SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_class_set);
  SWIG_Lua_add_function(L,"__gc",SWIG_Lua_class_destruct);
  /* add it */
  lua_rawset(L,-3);  /* metatable into registry */
  lua_pop(L,1);      /* tidy stack (remove registry) */
  assert(lua_gettop(L) == begin);

#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
  /* Now merge all symbols from .fn, .set, .get etc from bases to our tables */
  SWIG_Lua_class_squash_bases(L,clss);
#endif
  SWIG_Lua_get_class_metatable(L,clss->fqname);
  SWIG_Lua_add_class_instance_details(L,clss);  /* recursive adding of details (atts & ops) */
  lua_pop(L,1);      /* tidy stack (remove class metatable) */
  assert( lua_gettop(L) == begin );
}

SWIGINTERN void  SWIG_Lua_class_register(lua_State *L,swig_lua_class *clss)
{
  int SWIGUNUSED begin;
  assert(lua_istable(L,-1)); /* This is a table (module or namespace) where classes will be added */
  SWIG_Lua_class_register_instance(L,clss);
  SWIG_Lua_class_register_static(L,clss);

  /* Add links from static part to instance part and vice versa */
  /* [SWIG registry]                                   [Module]
   *    "MyClass" ----> [MyClass metatable] <=====     "MyClass" -+> [static part]
   *                     ".get" ----> ...        |                |     getmetatable()----|
   *                     ".set" ----> ...        |                |                       |
   *                     ".static" --------------)----------------/           [static part metatable]
   *                                             |                                ".get" --> ...
   *                                             |                                ".set" --> ....
   *                                             |=============================== ".instance"
   */
  begin = lua_gettop(L);
  lua_pushstring(L,clss->cls_static->name);
  lua_rawget(L,-2); /* get class static table */
  assert(lua_istable(L,-1));
  lua_getmetatable(L,-1);
  assert(lua_istable(L,-1)); /* get class static metatable */
  lua_pushstring(L,".instance"); /* prepare key */

  SWIG_Lua_get_class_metatable(L,clss->fqname); /* get class metatable */
  assert(lua_istable(L,-1));
  lua_pushstring(L,".static"); /* prepare key */
  lua_pushvalue(L, -4); /* push static class TABLE */
  assert(lua_istable(L,-1));
  lua_rawset(L,-3); /* assign static class table(!NOT metatable) as ".static" member of class metatable */
  lua_rawset(L,-3); /* assign class metatable as ".instance" member of class static METATABLE */
  lua_pop(L,2);
  assert(lua_gettop(L) == begin);
}
#endif /* SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA */

#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
SWIGINTERN void SWIG_Lua_elua_class_register_instance(lua_State *L, swig_lua_class *clss)
{
  const int SWIGUNUSED begin = lua_gettop(L);
  int i;
  /* if name already there (class is already registered) then do nothing */
  SWIG_Lua_get_class_registry(L);  /* get the registry */
  lua_pushstring(L,clss->fqname);  /* get the name */
  lua_rawget(L,-2);
  if(!lua_isnil(L,-1)) {
    lua_pop(L,2);
    assert(lua_gettop(L)==begin);
    return;
  }
  lua_pop(L,2); /* tidy stack */
  /* Recursively initialize all bases */
  for(i=0;clss->bases[i];i++)
  {
    SWIG_Lua_elua_class_register_instance(L,clss->bases[i]);
  }
  /* Again, get registry and push name */
  SWIG_Lua_get_class_registry(L);  /* get the registry */
  lua_pushstring(L,clss->fqname);  /* get the name */
  assert(clss->metatable);
  lua_pushrotable(L, (void*)(clss->metatable));    /* create the metatable */
  lua_rawset(L,-3);
  lua_pop(L,1);
  assert(lua_gettop(L) == begin);
}
#endif /* elua && eluac */

/* -----------------------------------------------------------------------------
 * Class/structure conversion fns
 * ----------------------------------------------------------------------------- */

/* helper to add metatable to new lua object */
SWIGINTERN void SWIG_Lua_AddMetatable(lua_State *L,swig_type_info *type)
{
  if (type->clientdata)  /* there is clientdata: so add the metatable */
  {
    SWIG_Lua_get_class_metatable(L,((swig_lua_class*)(type->clientdata))->fqname);
    if (lua_istable(L,-1))
    {
      lua_setmetatable(L,-2);
    }
    else
    {
      lua_pop(L,1);
    }
  }
}

/* pushes a new object into the lua stack */
SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *type, int own)
{
  swig_lua_userdata *usr;
  if (!ptr){
    lua_pushnil(L);
    return;
  }
  usr=(swig_lua_userdata*)lua_newuserdata(L,sizeof(swig_lua_userdata));  /* get data */
  usr->ptr=ptr;  /* set the ptr */
  usr->type=type;
  usr->own=own;
#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
  SWIG_Lua_AddMetatable(L,type); /* add metatable */
#endif
}

/* takes a object from the lua stack & converts it into an object of the correct type
 (if possible) */
SWIGRUNTIME int  SWIG_Lua_ConvertPtr(lua_State *L,int index,void **ptr,swig_type_info *type,int flags)
{
  int ret = SWIG_ERROR;
  swig_lua_userdata *usr;
  swig_cast_info *cast;
  /* special case: lua nil => NULL pointer */
  if (lua_isnil(L,index))
  {
    *ptr=0;
    return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
  }
  if (lua_islightuserdata(L,index))
  {
    *ptr=lua_touserdata(L,index);
    return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
  }
  usr=(swig_lua_userdata*)lua_touserdata(L,index);  /* get data */
  if (usr)
  {
    if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE) && !usr->own)
    {
      return SWIG_ERROR_RELEASE_NOT_OWNED;
    }
    if (flags & SWIG_POINTER_DISOWN) /* must disown the object */
    {
      usr->own = 0;
    }
    if (!type)            /* special cast void*, no casting fn */
    {
      *ptr=usr->ptr;
      ret = SWIG_OK;
    }
    else
    {
      cast=SWIG_TypeCheck(usr->type->name,type); /* performs normal type checking */
      if (cast)
      {
        int newmemory = 0;
        *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory);
        assert(!newmemory); /* newmemory handling not yet implemented */
        ret = SWIG_OK;
      }
    }
    if ((ret == SWIG_OK) && (flags & SWIG_POINTER_CLEAR))
    {
      usr->ptr = 0;
    }
  }
  return ret;
}

SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State *L,int index,swig_type_info *type,int flags,
       int argnum,const char *func_name){
  void *result = 0;
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){
    luaL_error (L,"Error in %s, expected a %s at argument number %d\n",
		func_name,(type && type->str)?type->str:"void*",argnum);
  }
  return result;
}

/* pushes a packed userdata. user for member fn pointers only */
SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_type_info *type)
{
  swig_lua_rawdata *raw;
  assert(ptr); /* not acceptable to pass in a NULL value */
  raw=(swig_lua_rawdata*)lua_newuserdata(L,sizeof(swig_lua_rawdata)-1+size);  /* alloc data */
  raw->type=type;
  raw->own=0;
  memcpy(raw->data,ptr,size); /* copy the data */
  SWIG_Lua_AddMetatable(L,type); /* add metatable */
}

/* converts a packed userdata. user for member fn pointers only */
SWIGRUNTIME int  SWIG_Lua_ConvertPacked(lua_State *L,int index,void *ptr,size_t size,swig_type_info *type)
{
  swig_lua_rawdata *raw;
  raw=(swig_lua_rawdata*)lua_touserdata(L,index);  /* get data */
  if (!raw) return SWIG_ERROR;  /* error */
  if (type==0 || type==raw->type) /* void* or identical type */
  {
    memcpy(ptr,raw->data,size); /* copy it */
    return SWIG_OK; /* ok */
  }
  return SWIG_ERROR;  /* error */
}

/* a function to get the typestring of a piece of data */
SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp)
{
  swig_lua_userdata *usr;
  if (lua_isuserdata(L,tp))
  {
    usr=(swig_lua_userdata*)lua_touserdata(L,tp);  /* get data */
    if (usr && usr->type && usr->type->str)
      return usr->type->str;
    return "userdata (unknown type)";
  }
  return lua_typename(L,lua_type(L,tp));
}

/* lua callable function to get the userdata's type */
SWIGRUNTIME int SWIG_Lua_type(lua_State *L)
{
  lua_pushstring(L,SWIG_Lua_typename(L,1));
  return 1;
}

/* -----------------------------------------------------------------------------
 * global variable support code: class/struct typemap functions
 * ----------------------------------------------------------------------------- */

#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
/* Install Constants */
SWIGINTERN void
SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[]) {
  int i;
  for (i = 0; constants[i].type; i++) {
    switch(constants[i].type) {
    case SWIG_LUA_INT:
      lua_pushstring(L,constants[i].name);
      lua_pushinteger(L,(lua_Integer)constants[i].lvalue);
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_FLOAT:
      lua_pushstring(L,constants[i].name);
      lua_pushnumber(L,(lua_Number)constants[i].dvalue);
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_CHAR:
      lua_pushstring(L,constants[i].name);
      {
        char c = (char)constants[i].lvalue;
        lua_pushlstring(L,&c,1);
      }
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_STRING:
      lua_pushstring(L,constants[i].name);
      lua_pushstring(L,(char *) constants[i].pvalue);
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_POINTER:
      lua_pushstring(L,constants[i].name);
      SWIG_NewPointerObj(L,constants[i].pvalue, *(constants[i]).ptype,0);
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_BINARY:
      lua_pushstring(L,constants[i].name);
      SWIG_NewMemberObj(L,constants[i].pvalue,constants[i].lvalue,*(constants[i]).ptype);
      lua_rawset(L,-3);
      break;
    default:
      break;
    }
  }
}
#endif

/* -----------------------------------------------------------------------------
 * executing lua code from within the wrapper
 * ----------------------------------------------------------------------------- */

#ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */
#define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S)
#endif
/* Executes a C string in Lua which is a really simple way of calling lua from C
Unfortunately lua keeps changing its APIs, so we need a conditional compile
In lua 5.0.X it's lua_dostring()
In lua 5.1.X it's luaL_dostring()
*/
SWIGINTERN int
SWIG_Lua_dostring(lua_State *L, const char *str) {
  int ok,top;
  if (str==0 || str[0]==0) return 0; /* nothing to do */
  top=lua_gettop(L); /* save stack */
#if (defined(LUA_VERSION_NUM) && (LUA_VERSION_NUM>=501))
  ok=luaL_dostring(L,str);	/* looks like this is lua 5.1.X or later, good */
#else
  ok=lua_dostring(L,str);	/* might be lua 5.0.x, using lua_dostring */
#endif
  if (ok!=0) {
    SWIG_DOSTRING_FAIL(lua_tostring(L,-1));
  }
  lua_settop(L,top); /* restore the stack */
  return ok;
}

#ifdef __cplusplus
}
#endif

/* ------------------------------ end luarun.swg  ------------------------------ */

/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
#define  SWIG_UnknownError    	   -1
#define  SWIG_IOError        	   -2
#define  SWIG_RuntimeError   	   -3
#define  SWIG_IndexError     	   -4
#define  SWIG_TypeError      	   -5
#define  SWIG_DivisionByZero 	   -6
#define  SWIG_OverflowError  	   -7
#define  SWIG_SyntaxError    	   -8
#define  SWIG_ValueError     	   -9
#define  SWIG_SystemError    	   -10
#define  SWIG_AttributeError 	   -11
#define  SWIG_MemoryError    	   -12
#define  SWIG_NullReferenceError   -13



/* -------- TYPES TABLE (BEGIN) -------- */

#define SWIGTYPE_p_Amp swig_types[0]
#define SWIGTYPE_p_FIFO_RIG_s swig_types[1]
#define SWIGTYPE_p_Rig swig_types[2]
#define SWIGTYPE_p_Rot swig_types[3]
#define SWIGTYPE_p_agc_level_e swig_types[4]
#define SWIGTYPE_p_amp swig_types[5]
#define SWIGTYPE_p_amp_caps swig_types[6]
#define SWIGTYPE_p_amp_reset_e swig_types[7]
#define SWIGTYPE_p_amp_state swig_types[8]
#define SWIGTYPE_p_amp_type_e swig_types[9]
#define SWIGTYPE_p_ann_t swig_types[10]
#define SWIGTYPE_p_cal_table swig_types[11]
#define SWIGTYPE_p_cal_table_float swig_types[12]
#define SWIGTYPE_p_cal_table_float_table swig_types[13]
#define SWIGTYPE_p_cal_table_table swig_types[14]
#define SWIGTYPE_p_chan_list swig_types[15]
#define SWIGTYPE_p_chan_type_t swig_types[16]
#define SWIGTYPE_p_channel swig_types[17]
#define SWIGTYPE_p_channelArray swig_types[18]
#define SWIGTYPE_p_channel_cap swig_types[19]
#define SWIGTYPE_p_char swig_types[20]
#define SWIGTYPE_p_client_e swig_types[21]
#define SWIGTYPE_p_confparams swig_types[22]
#define SWIGTYPE_p_confparams_u swig_types[23]
#define SWIGTYPE_p_confparams_u_c swig_types[24]
#define SWIGTYPE_p_confparams_u_n swig_types[25]
#define SWIGTYPE_p_dcd_e swig_types[26]
#define SWIGTYPE_p_dcd_type_e swig_types[27]
#define SWIGTYPE_p_deferred_config_header swig_types[28]
#define SWIGTYPE_p_deferred_config_item swig_types[29]
#define SWIGTYPE_p_double swig_types[30]
#define SWIGTYPE_p_ext_list swig_types[31]
#define SWIGTYPE_p_f_p_struct_amp__int swig_types[32]
#define SWIGTYPE_p_f_p_struct_amp__p_char swig_types[33]
#define SWIGTYPE_p_f_p_struct_amp_double__int swig_types[34]
#define SWIGTYPE_p_f_p_struct_amp_enum_amp_reset_e__int swig_types[35]
#define SWIGTYPE_p_f_p_struct_amp_enum_powerstat_t__int swig_types[36]
#define SWIGTYPE_p_f_p_struct_amp_long_p_char__int swig_types[37]
#define SWIGTYPE_p_f_p_struct_amp_long_p_char_int__int swig_types[38]
#define SWIGTYPE_p_f_p_struct_amp_long_p_q_const__char__int swig_types[39]
#define SWIGTYPE_p_f_p_struct_amp_long_p_value_t__int swig_types[40]
#define SWIGTYPE_p_f_p_struct_amp_long_value_t__int swig_types[41]
#define SWIGTYPE_p_f_p_struct_amp_p_double__int swig_types[42]
#define SWIGTYPE_p_f_p_struct_amp_p_enum_powerstat_t__int swig_types[43]
#define SWIGTYPE_p_f_p_struct_amp_unsigned_long_long_p_value_t__int swig_types[44]
#define SWIGTYPE_p_f_p_struct_amp_unsigned_long_long_value_t__int swig_types[45]
#define SWIGTYPE_p_f_p_struct_s_rig__int swig_types[46]
#define SWIGTYPE_p_f_p_struct_s_rig__p_char swig_types[47]
#define SWIGTYPE_p_f_p_struct_s_rig_enum_powerstat_t__int swig_types[48]
#define SWIGTYPE_p_f_p_struct_s_rig_enum_reset_t__int swig_types[49]
#define SWIGTYPE_p_f_p_struct_s_rig_int__int swig_types[50]
#define SWIGTYPE_p_f_p_struct_s_rig_int_int_int_int_int_int_double_int__int swig_types[51]
#define SWIGTYPE_p_f_p_struct_s_rig_long_p_char__int swig_types[52]
#define SWIGTYPE_p_f_p_struct_s_rig_long_p_char_int__int swig_types[53]
#define SWIGTYPE_p_f_p_struct_s_rig_long_p_q_const__char__int swig_types[54]
#define SWIGTYPE_p_f_p_struct_s_rig_long_p_value_t__int swig_types[55]
#define SWIGTYPE_p_f_p_struct_s_rig_long_value_t__int swig_types[56]
#define SWIGTYPE_p_f_p_struct_s_rig_p_enum_powerstat_t__int swig_types[57]
#define SWIGTYPE_p_f_p_struct_s_rig_p_float_unsigned_int_double_unsigned_long_long__int swig_types[58]
#define SWIGTYPE_p_f_p_struct_s_rig_p_int__int swig_types[59]
#define SWIGTYPE_p_f_p_struct_s_rig_p_int_p_int_p_int_p_int_p_int_p_int_p_double_p_int__int swig_types[60]
#define SWIGTYPE_p_f_p_struct_s_rig_p_q_const__char__int swig_types[61]
#define SWIGTYPE_p_f_p_struct_s_rig_p_struct_rig_spectrum_line_p_void__int swig_types[62]
#define SWIGTYPE_p_f_p_struct_s_rig_p_unsigned_int__int swig_types[63]
#define SWIGTYPE_p_f_p_struct_s_rig_p_unsigned_int_float_double_unsigned_long_long__int swig_types[64]
#define SWIGTYPE_p_f_p_struct_s_rig_size_t_p_q_const__unsigned_char__int swig_types[65]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int__int swig_types[66]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_double__int swig_types[67]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_double_p_void__int swig_types[68]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_double_unsigned_long_long_long__int swig_types[69]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_dcd_e_p_void__int swig_types[70]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_ptt_t__int swig_types[71]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_ptt_t_p_void__int swig_types[72]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_rptr_shift_t__int swig_types[73]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_scan_t_int__int swig_types[74]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_split_t_unsigned_int__int swig_types[75]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_vfo_op_t__int swig_types[76]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_int__int swig_types[77]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long__int swig_types[78]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long_int__int swig_types[79]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long_p_int__int swig_types[80]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long_p_value_t__int swig_types[81]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long_value_t__int swig_types[82]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_char_p_int__int swig_types[83]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_double__int swig_types[84]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long__int swig_types[85]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_enum_split_t__int swig_types[86]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_void__int swig_types[87]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_enum_dcd_e__int swig_types[88]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_enum_ptt_t__int swig_types[89]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_enum_rptr_shift_t__int swig_types[90]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_enum_split_t_p_unsigned_int__int swig_types[91]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_f_p_struct_s_rig_p_q_const__struct_confparams_p_value_t_p_void__int_p_void__int swig_types[92]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_void__int swig_types[93]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_int__int swig_types[94]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_long__int swig_types[95]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_q_const__char__int swig_types[96]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_q_const__struct_channel__int swig_types[97]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_struct_channel_int__int swig_types[98]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int swig_types[99]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_long_long_p_long__int swig_types[100]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_void__int swig_types[101]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int swig_types[102]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int_p_value_t_p_unsigned_int_p_unsigned_int_p_unsigned_int__int swig_types[103]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int_value_t__int swig_types[104]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_int__int swig_types[105]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long__int swig_types[106]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long_p_void__int swig_types[107]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_int__int swig_types[108]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_value_t__int swig_types[109]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_value_t__int swig_types[110]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_long_long_p_value_t__int swig_types[111]
#define SWIGTYPE_p_f_p_struct_s_rig_unsigned_long_long_value_t__int swig_types[112]
#define SWIGTYPE_p_f_p_struct_s_rot__int swig_types[113]
#define SWIGTYPE_p_f_p_struct_s_rot__p_char swig_types[114]
#define SWIGTYPE_p_f_p_struct_s_rot_float_float__int swig_types[115]
#define SWIGTYPE_p_f_p_struct_s_rot_int__int swig_types[116]
#define SWIGTYPE_p_f_p_struct_s_rot_int_int__int swig_types[117]
#define SWIGTYPE_p_f_p_struct_s_rot_long_int__int swig_types[118]
#define SWIGTYPE_p_f_p_struct_s_rot_long_p_char__int swig_types[119]
#define SWIGTYPE_p_f_p_struct_s_rot_long_p_char_int__int swig_types[120]
#define SWIGTYPE_p_f_p_struct_s_rot_long_p_int__int swig_types[121]
#define SWIGTYPE_p_f_p_struct_s_rot_long_p_q_const__char__int swig_types[122]
#define SWIGTYPE_p_f_p_struct_s_rot_long_p_value_t__int swig_types[123]
#define SWIGTYPE_p_f_p_struct_s_rot_long_value_t__int swig_types[124]
#define SWIGTYPE_p_f_p_struct_s_rot_p_enum_rot_status_t__int swig_types[125]
#define SWIGTYPE_p_f_p_struct_s_rot_p_float_p_float__int swig_types[126]
#define SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_int__int swig_types[127]
#define SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_p_int__int swig_types[128]
#define SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_p_value_t__int swig_types[129]
#define SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_value_t__int swig_types[130]
#define SWIGTYPE_p_filter_list swig_types[131]
#define SWIGTYPE_p_float swig_types[132]
#define SWIGTYPE_p_freq_range_list swig_types[133]
#define SWIGTYPE_p_gran swig_types[134]
#define SWIGTYPE_p_hamlib_async_pipe swig_types[135]
#define SWIGTYPE_p_hamlib_band_t swig_types[136]
#define SWIGTYPE_p_hamlib_bandselect_t swig_types[137]
#define SWIGTYPE_p_hamlib_cache_t swig_types[138]
#define SWIGTYPE_p_hamlib_port swig_types[139]
#define SWIGTYPE_p_int swig_types[140]
#define SWIGTYPE_p_long swig_types[141]
#define SWIGTYPE_p_long_long swig_types[142]
#define SWIGTYPE_p_multicast_s swig_types[143]
#define SWIGTYPE_p_p_char swig_types[144]
#define SWIGTYPE_p_p_void swig_types[145]
#define SWIGTYPE_p_powerstat_t swig_types[146]
#define SWIGTYPE_p_pthread_mutex_t swig_types[147]
#define SWIGTYPE_p_pthread_t swig_types[148]
#define SWIGTYPE_p_ptt_t swig_types[149]
#define SWIGTYPE_p_ptt_type_e swig_types[150]
#define SWIGTYPE_p_reset_t swig_types[151]
#define SWIGTYPE_p_rig_callbacks swig_types[152]
#define SWIGTYPE_p_rig_caps swig_types[153]
#define SWIGTYPE_p_rig_debug_level_e swig_types[154]
#define SWIGTYPE_p_rig_port_e swig_types[155]
#define SWIGTYPE_p_rig_ptrx_t swig_types[156]
#define SWIGTYPE_p_rig_spectrum_avg_mode swig_types[157]
#define SWIGTYPE_p_rig_spectrum_line swig_types[158]
#define SWIGTYPE_p_rig_spectrum_mode_e swig_types[159]
#define SWIGTYPE_p_rig_spectrum_scope swig_types[160]
#define SWIGTYPE_p_rig_state swig_types[161]
#define SWIGTYPE_p_rig_type_t swig_types[162]
#define SWIGTYPE_p_rot_caps swig_types[163]
#define SWIGTYPE_p_rot_state swig_types[164]
#define SWIGTYPE_p_rot_status_t swig_types[165]
#define SWIGTYPE_p_rot_type_t swig_types[166]
#define SWIGTYPE_p_rptr_shift_t swig_types[167]
#define SWIGTYPE_p_s_rig swig_types[168]
#define SWIGTYPE_p_s_rot swig_types[169]
#define SWIGTYPE_p_scan_t swig_types[170]
#define SWIGTYPE_p_short swig_types[171]
#define SWIGTYPE_p_signed_char swig_types[172]
#define SWIGTYPE_p_sockaddr_in swig_types[173]
#define SWIGTYPE_p_split_t swig_types[174]
#define SWIGTYPE_p_time_t swig_types[175]
#define SWIGTYPE_p_timespec swig_types[176]
#define SWIGTYPE_p_toneArray swig_types[177]
#define SWIGTYPE_p_tuning_step_list swig_types[178]
#define SWIGTYPE_p_twiddle_state_t swig_types[179]
#define SWIGTYPE_p_unsigned_char swig_types[180]
#define SWIGTYPE_p_unsigned_int swig_types[181]
#define SWIGTYPE_p_unsigned_long swig_types[182]
#define SWIGTYPE_p_unsigned_long_long swig_types[183]
#define SWIGTYPE_p_unsigned_short swig_types[184]
#define SWIGTYPE_p_value_t swig_types[185]
#define SWIGTYPE_p_value_t_b swig_types[186]
#define SWIGTYPE_p_vfo_op_t swig_types[187]
#define SWIGTYPE_p_void swig_types[188]
static swig_type_info *swig_types[190];
static swig_module_info swig_module = {swig_types, 189, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)

/* -------- TYPES TABLE (END) -------- */

#define SWIG_name      "Hamliblua"
#define SWIG_init      luaopen_Hamliblua
#define SWIG_init_user luaopen_Hamliblua_user

#define SWIG_LUACODE   luaopen_Hamliblua_luacode

/*
 *  Hamlib bindings - swig interface file
 *  Copyright (c) 2001-2008 by Stephane Fillod
 *
 *
 *   This library is free software; you can redistribute it and/or
 *   modify it under the terms of the GNU Lesser General Public
 *   License as published by the Free Software Foundation; either
 *   version 2.1 of the License, or (at your option) any later version.
 *
 *   This library is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *   Lesser General Public License for more details.
 *
 *   You should have received a copy of the GNU Lesser General Public
 *   License along with this library; if not, write to the Free Software
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */

#include <hamlib/config.h>

//mdblack98 -- Commented this out -- is anybody using the functions in misc.h?
//If so, then those functions should be moved to rig.h
//#include "misc.h"

#include <limits.h>



#ifdef __cplusplus	/* generic alloc/dealloc fns*/
#define SWIG_ALLOC_ARRAY(TYPE,LEN) 	new TYPE[LEN]
#define SWIG_FREE_ARRAY(PTR)		delete[] PTR
#else
#define SWIG_ALLOC_ARRAY(TYPE,LEN) 	(TYPE *)malloc(LEN*sizeof(TYPE))
#define SWIG_FREE_ARRAY(PTR)		free(PTR)
#endif
/* counting the size of arrays:*/
SWIGINTERN int SWIG_itable_size(lua_State* L, int index)
{
	int n=0;
	while(1){
		lua_rawgeti(L,index,n+1);
		if (lua_isnil(L,-1))break;
		++n;
		lua_pop(L,1);
	}
	lua_pop(L,1);
	return n;
}

SWIGINTERN int SWIG_table_size(lua_State* L, int index)
{
	int n=0;
	lua_pushnil(L);  /* first key*/
	while (lua_next(L, index) != 0) {
		++n;
		lua_pop(L, 1);  /* removes `value'; keeps `key' for next iteration*/
	}
	return n;
}

/* super macro to declare array typemap helper fns */
#define SWIG_DECLARE_TYPEMAP_ARR_FN(NAME,TYPE)\
	SWIGINTERN int SWIG_read_##NAME##_num_array(lua_State* L,int index,TYPE *array,int size){\
		int i;\
		for (i = 0; i < size; i++) {\
			lua_rawgeti(L,index,i+1);\
			if (lua_isnumber(L,-1)){\
				array[i] = (TYPE)lua_tonumber(L,-1);\
			} else {\
				lua_pop(L,1);\
				return 0;\
			}\
			lua_pop(L,1);\
		}\
		return 1;\
	}\
	SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_fixed(lua_State* L, int index, int size){\
		TYPE *array;\
		if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {\
			SWIG_Lua_pushferrstring(L,"expected a table of size %d",size);\
			return 0;\
		}\
		array=SWIG_ALLOC_ARRAY(TYPE,size);\
		if (!SWIG_read_##NAME##_num_array(L,index,array,size)){\
			SWIG_Lua_pusherrstring(L,"table must contain numbers");\
			SWIG_FREE_ARRAY(array);\
			return 0;\
		}\
		return array;\
	}\
	SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_var(lua_State* L, int index, int* size)\
	{\
		TYPE *array;\
		if (!lua_istable(L,index)) {\
			SWIG_Lua_pusherrstring(L,"expected a table");\
			return 0;\
		}\
		*size=SWIG_itable_size(L,index);\
		if (*size<1){\
			SWIG_Lua_pusherrstring(L,"table appears to be empty");\
			return 0;\
		}\
		array=SWIG_ALLOC_ARRAY(TYPE,*size);\
		if (!SWIG_read_##NAME##_num_array(L,index,array,*size)){\
			SWIG_Lua_pusherrstring(L,"table must contain numbers");\
			SWIG_FREE_ARRAY(array);\
			return 0;\
		}\
		return array;\
	}\
	SWIGINTERN void SWIG_write_##NAME##_num_array(lua_State* L,TYPE *array,int size){\
		int i;\
		lua_newtable(L);\
		for (i = 0; i < size; i++){\
			lua_pushnumber(L,(lua_Number)array[i]);\
			lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/ \
		}\
	}

SWIG_DECLARE_TYPEMAP_ARR_FN(schar,signed char)
SWIG_DECLARE_TYPEMAP_ARR_FN(uchar,unsigned char)
SWIG_DECLARE_TYPEMAP_ARR_FN(int,int)
SWIG_DECLARE_TYPEMAP_ARR_FN(uint,unsigned int)
SWIG_DECLARE_TYPEMAP_ARR_FN(short,short)
SWIG_DECLARE_TYPEMAP_ARR_FN(ushort,unsigned short)
SWIG_DECLARE_TYPEMAP_ARR_FN(long,long)
SWIG_DECLARE_TYPEMAP_ARR_FN(ulong,unsigned long)
SWIG_DECLARE_TYPEMAP_ARR_FN(float,float)
SWIG_DECLARE_TYPEMAP_ARR_FN(double,double)

SWIGINTERN int SWIG_read_ptr_array(lua_State* L,int index,void **array,int size,swig_type_info *type){
	int i;
	for (i = 0; i < size; i++) {
		lua_rawgeti(L,index,i+1);
		if (!lua_isuserdata(L,-1) || SWIG_ConvertPtr(L,-1,&array[i],type,0)==-1){
			lua_pop(L,1);
			return 0;
		}
		lua_pop(L,1);
	}
	return 1;
}
SWIGINTERN void** SWIG_get_ptr_array_fixed(lua_State* L, int index, int size,swig_type_info *type){
	void **array;
	if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {
		SWIG_Lua_pushferrstring(L,"expected a table of size %d",size);
		return 0;
	}
	array=SWIG_ALLOC_ARRAY(void*,size);
	if (!SWIG_read_ptr_array(L,index,array,size,type)){
		SWIG_Lua_pushferrstring(L,"table must contain pointers of type %s",type->name);
		SWIG_FREE_ARRAY(array);
		return 0;
	}
	return array;
}
SWIGINTERN void** SWIG_get_ptr_array_var(lua_State* L, int index, int* size,swig_type_info *type){
	void **array;
	if (!lua_istable(L,index)) {
		SWIG_Lua_pusherrstring(L,"expected a table");
		return 0;
	}
	*size=SWIG_itable_size(L,index);
	if (*size<1){
		SWIG_Lua_pusherrstring(L,"table appears to be empty");
		return 0;
	}
	array=SWIG_ALLOC_ARRAY(void*,*size);
	if (!SWIG_read_ptr_array(L,index,array,*size,type)){
		SWIG_Lua_pushferrstring(L,"table must contain pointers of type %s",type->name);
		SWIG_FREE_ARRAY(array);
		return 0;
	}
	return array;
}
SWIGINTERN void SWIG_write_ptr_array(lua_State* L,void **array,int size,swig_type_info *type,int own){
	int i;
	lua_newtable(L);
	for (i = 0; i < size; i++){
		SWIG_NewPointerObj(L,array[i],type,own);
		lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/
	}
}


#include <stdint.h>		// Use the C99 official header


#define SWIG_exception(a,b)\
{ lua_pushfstring(L,"%s:%s",#a,b);SWIG_fail; }


typedef const char * const_char_string;


#include <hamlib/rig.h>

typedef union {
  struct {
    float min;                           
    float max;                           
    float step;                 
  } n;                                    
  struct {
    const char *combostr[16];                      
  } c;                                  
} confparams_u;

typedef struct {
  float min;                           
  float max;                           
  float step;                 
} confparams_u_n;

typedef struct {
  const char *combostr[16];                      
} confparams_u_c;


#include <string.h>


SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx) {
  int ret = lua_isstring(L, idx);
  if (!ret)
   ret = lua_isnil(L, idx);
  return ret;
}

typedef struct {
  int l;                                
  unsigned char *d;                             
} value_t_b;

SWIGINTERN struct channel *new_channel(vfo_t vfo,int ch){
		channel_t *chan;

		chan = (channel_t*)malloc(sizeof(channel_t));
		if (!chan)
			return NULL;
		memset(chan, 0, sizeof(channel_t));
		chan->vfo = vfo;
		chan->channel_num = ch;
		return chan;
	}
SWIGINTERN void delete_channel(struct channel *self){
		/* TODO: free ext_levels */
		free(self);
	}
typedef struct {
  int raw;                                                                           
  int val;                                                                         
} cal_table_table;

typedef struct {
  int raw;                                         
  float val;                                        
} cal_table_float_table;



#pragma SWIG nowarn=451

#ifdef SWIGPYTHON
	// This mirrors "struct rig_callbacks" from rig.h using Python types
	typedef struct {
		PyObject *freq_event;     /*!< Frequency change event */
		PyObject *freq_arg;       /*!< Frequency change argument */
		PyObject *mode_event;     /*!< Mode change event */
		PyObject *mode_arg;       /*!< Mode change argument */
		PyObject *vfo_event;      /*!< VFO change event */
		PyObject *vfo_arg;        /*!< VFO change argument */
		PyObject *ptt_event;      /*!< PTT change event */
		PyObject *ptt_arg;        /*!< PTT change argument */
		PyObject *dcd_event;      /*!< DCD change event */
		PyObject *dcd_arg;        /*!< DCD change argument */
		PyObject *pltune_event;   /*!< Pipeline tuning module freq/mode/width callback NOTE: the C struct doesn't have the _event suffix*/
		PyObject *pltune_arg;     /*!< Pipeline tuning argument */
		PyObject *spectrum_event; /*!< Spectrum line reception event */
		PyObject *spectrum_arg;   /*!< Spectrum line reception argument */
		/* etc.. */
	} python_callbacks_t;
#endif

typedef struct Rig {
	RIG *rig;
	struct rig_caps *caps;		/* shortcut to RIG->caps */
	struct rig_state *state;	/* shortcut to RIG->state */
	int error_status;
	int do_exception;
#ifdef SWIGPYTHON
	python_callbacks_t *python_callbacks;
#endif
} Rig;

typedef char * char_string;
typedef channel_t * channel_t_p;
typedef channel_t * const_channel_t_p;

#ifdef SWIGPYTHON
int rig_freq_cb_python(RIG *rig, vfo_t vfo, freq_t freq, rig_ptr_t arg)
{
    Rig *self = arg;
    PyObject *python_arguments;

    python_arguments = PyTuple_Pack(3,
                                    PyLong_FromLong(vfo),
                                    PyFloat_FromDouble(freq),
                                    self->python_callbacks->freq_arg
                                    );

    PyObject_CallObject(self->python_callbacks->freq_event, python_arguments);
    Py_XDECREF(python_arguments);

    return RIG_OK;
}

int rig_mode_cb_python(RIG *rig, vfo_t vfo, rmode_t rmode, pbwidth_t pbwidth, rig_ptr_t arg)
{
    Rig *self = arg;
    PyObject *python_arguments;

    python_arguments = PyTuple_Pack(4,
                                    PyLong_FromLong(vfo),
                                    PyLong_FromLong(rmode),
                                    PyLong_FromLong(pbwidth),
                                    self->python_callbacks->mode_arg
                                    );

    PyObject_CallObject(self->python_callbacks->mode_event, python_arguments);

    Py_XDECREF(python_arguments);

    return RIG_OK;
}

int rig_vfo_cb_python(RIG *rig, vfo_t vfo, rig_ptr_t arg)
{
    Rig *self = arg;
    PyObject *python_arguments;

    python_arguments = PyTuple_Pack(2,
                                    PyLong_FromLong(vfo),
                                    self->python_callbacks->vfo_arg
                                    );

    PyObject_CallObject(self->python_callbacks->vfo_event, python_arguments);

    Py_XDECREF(python_arguments);

    return RIG_OK;
}

int rig_ptt_cb_python(RIG *rig, vfo_t vfo, ptt_t ptt, rig_ptr_t arg)
{
    Rig *self = arg;
    PyObject *python_arguments;

    python_arguments = PyTuple_Pack(3,
                                    PyLong_FromLong(vfo),
                                    PyLong_FromLong(ptt),
                                    self->python_callbacks->ptt_arg
                                    );

    PyObject_CallObject(self->python_callbacks->ptt_event, python_arguments);

    Py_XDECREF(python_arguments);

    return RIG_OK;
}

int rig_dcd_cb_python(RIG *rig, vfo_t vfo, dcd_t dcd, rig_ptr_t arg)
{
    Rig *self = arg;
    PyObject *python_arguments;

    python_arguments = PyTuple_Pack(3,
                                    PyLong_FromLong(vfo),
                                    PyLong_FromLong(dcd),
                                    self->python_callbacks->dcd_arg
                                    );

    PyObject_CallObject(self->python_callbacks->dcd_event, python_arguments);

    Py_XDECREF(python_arguments);

    return RIG_OK;
}

int rig_pltune_cb_python(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *rmode, pbwidth_t *pbwidth, rig_ptr_t arg)
{
    Rig *self = arg;
    PyObject *python_arguments;

    python_arguments = PyTuple_Pack(1,
                                    self->python_callbacks->pltune_arg
                                    );

    PyObject_CallObject(self->python_callbacks->pltune_event, python_arguments);

    Py_XDECREF(python_arguments);

    return RIG_OK;
}

int rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_line, rig_ptr_t arg)
{
    Rig *self = arg;
    PyObject *python_arguments;

    python_arguments = PyTuple_Pack(1,
                                    self->python_callbacks->spectrum_arg
                                    );

    PyObject_CallObject(self->python_callbacks->spectrum_event, python_arguments);

    Py_XDECREF(python_arguments);

    return RIG_OK;
}
#endif

SWIGINTERN struct Rig *new_Rig(int rig_model){
		Rig *r;

		r = (Rig*)malloc(sizeof(Rig));
		if (!r)
			return NULL;
		r->rig = rig_init(rig_model);
		if (!r->rig) {
			free(r);
			return NULL;
		}







		/* install shortcuts */
		r->caps = r->rig->caps;
		r->state = rig_data_pointer(r->rig, RIG_PTRX_STATE);
		r->do_exception = 0;	/* default is disabled */
		r->error_status = RIG_OK;

		return r;
	}
SWIGINTERN void delete_Rig(struct Rig *self){
		rig_cleanup(self->rig);



		free(self);
	}
SWIGINTERN void Rig_open(struct Rig *self){
		self->error_status = rig_open(self->rig);
	}
SWIGINTERN void Rig_close(struct Rig *self){
		self->error_status = rig_close(self->rig);
	}
SWIGINTERN void Rig_set_freq(struct Rig *self,vfo_t vfo,freq_t _freq_t){ self->error_status = rig_set_freq(self->rig  ,vfo, _freq_t); }
SWIGINTERN void Rig_set_mode(struct Rig *self,rmode_t _rmode_t_1,pbwidth_t _pbwidth_t_2,vfo_t vfo){ self->error_status = rig_set_mode(self->rig  ,vfo, _rmode_t_1, _pbwidth_t_2); }
SWIGINTERN void Rig_set_ptt(struct Rig *self,vfo_t vfo,ptt_t _ptt_t){ self->error_status = rig_set_ptt(self->rig  ,vfo, _ptt_t); }
SWIGINTERN void Rig_set_rptr_shift(struct Rig *self,vfo_t vfo,rptr_shift_t _rptr_shift_t){ self->error_status = rig_set_rptr_shift(self->rig  ,vfo, _rptr_shift_t); }
SWIGINTERN void Rig_set_rptr_offs(struct Rig *self,vfo_t vfo,shortfreq_t _shortfreq_t){ self->error_status = rig_set_rptr_offs(self->rig  ,vfo, _shortfreq_t); }
SWIGINTERN void Rig_set_ctcss_tone(struct Rig *self,vfo_t vfo,tone_t _tone_t){ self->error_status = rig_set_ctcss_tone(self->rig  ,vfo, _tone_t); }
SWIGINTERN void Rig_set_dcs_code(struct Rig *self,vfo_t vfo,tone_t _tone_t){ self->error_status = rig_set_dcs_code(self->rig  ,vfo, _tone_t); }
SWIGINTERN void Rig_set_ctcss_sql(struct Rig *self,vfo_t vfo,tone_t _tone_t){ self->error_status = rig_set_ctcss_sql(self->rig  ,vfo, _tone_t); }
SWIGINTERN void Rig_set_dcs_sql(struct Rig *self,vfo_t vfo,tone_t _tone_t){ self->error_status = rig_set_dcs_sql(self->rig  ,vfo, _tone_t); }
SWIGINTERN void Rig_set_split_freq(struct Rig *self,vfo_t vfo,freq_t _freq_t){ self->error_status = rig_set_split_freq(self->rig  ,vfo, _freq_t); }
SWIGINTERN void Rig_set_split_mode(struct Rig *self,rmode_t _rmode_t_1,pbwidth_t _pbwidth_t_2,vfo_t vfo){ self->error_status = rig_set_split_mode(self->rig  ,vfo, _rmode_t_1, _pbwidth_t_2); }
SWIGINTERN void Rig_set_split_freq_mode(struct Rig *self,freq_t _freq_t_1,rmode_t _rmode_t_2,pbwidth_t _pbwidth_t_3,vfo_t vfo){ self->error_status = rig_set_split_freq_mode(self->rig  ,vfo, _freq_t_1, _rmode_t_2, _pbwidth_t_3); }
SWIGINTERN void Rig_set_split_vfo(struct Rig *self,split_t _split_t_1,vfo_t _vfo_t_2,vfo_t vfo){ self->error_status = rig_set_split_vfo(self->rig  ,vfo, _split_t_1, _vfo_t_2); }
SWIGINTERN void Rig_set_rit(struct Rig *self,vfo_t vfo,shortfreq_t _shortfreq_t){ self->error_status = rig_set_rit(self->rig  ,vfo, _shortfreq_t); }
SWIGINTERN void Rig_set_xit(struct Rig *self,vfo_t vfo,shortfreq_t _shortfreq_t){ self->error_status = rig_set_xit(self->rig  ,vfo, _shortfreq_t); }
SWIGINTERN void Rig_set_ts(struct Rig *self,vfo_t vfo,shortfreq_t _shortfreq_t){ self->error_status = rig_set_ts(self->rig  ,vfo, _shortfreq_t); }
SWIGINTERN void Rig_set_ant(struct Rig *self,ant_t _ant_t_1,value_t _value_t_2,vfo_t vfo){ self->error_status = rig_set_ant(self->rig  ,vfo, _ant_t_1, _value_t_2); }
SWIGINTERN void Rig_set_func(struct Rig *self,setting_t _setting_t_1,int _int_2,vfo_t vfo){ self->error_status = rig_set_func(self->rig  ,vfo, _setting_t_1, _int_2); }
SWIGINTERN void Rig_set_ext_func(struct Rig *self,hamlib_token_t _hamlib_token_t_1,int _int_2,vfo_t vfo){ self->error_status = rig_set_ext_func(self->rig  ,vfo, _hamlib_token_t_1, _int_2); }
SWIGINTERN void Rig_set_bank(struct Rig *self,vfo_t vfo,int _int){ self->error_status = rig_set_bank(self->rig  ,vfo, _int); }
SWIGINTERN void Rig_set_mem(struct Rig *self,vfo_t vfo,int _int){ self->error_status = rig_set_mem(self->rig  ,vfo, _int); }
SWIGINTERN void Rig_send_dtmf(struct Rig *self,vfo_t vfo,const_char_string _const_char_string){ self->error_status = rig_send_dtmf(self->rig  ,vfo, _const_char_string); }
SWIGINTERN void Rig_send_morse(struct Rig *self,vfo_t vfo,const_char_string _const_char_string){ self->error_status = rig_send_morse(self->rig  ,vfo, _const_char_string); }
SWIGINTERN void Rig_vfo_op(struct Rig *self,vfo_t vfo,vfo_op_t _vfo_op_t){ self->error_status = rig_vfo_op(self->rig  ,vfo, _vfo_op_t); }
SWIGINTERN void Rig_scan(struct Rig *self,scan_t _scan_t_1,int _int_2,vfo_t vfo){ self->error_status = rig_scan(self->rig  ,vfo, _scan_t_1, _int_2); }
SWIGINTERN void Rig_set_level__SWIG_0(struct Rig *self,setting_t stg,float f,vfo_t vfo){ value_t val = {0}; 	 		if (!((stg)&((1ul << (3))|(1ul << (4))|(1ul << (5))|(1ul << (7))|(1ul << (8))|(1ul << (9))|(1ul << (10))|(1ul << (12))|(1ul << (13))|(1ul << (16))|(1ul << (19))|(1ul << (28))|(1ul << (29))|(1ul << (21))|(1ul << (22))|(1ul << (32))|(1ul << (39))|(1ul << (33))|(1ul << (34))|(1ul << (35))|(1ul << (36))|(1ul << (37))|(1ul << (38))|(1ul << (45))|(1ul << (48))|(1ul << (50))|(1ul << (51))|(1ul << (52))))) {	 			int ival = (int)f;	 			val.i = f;	 		}	 		else {	 		    val.f = f;	 		}	 		self->error_status = rig_set_level(self->rig  ,vfo , stg, val);	 	}
SWIGINTERN void Rig_set_level__SWIG_1(struct Rig *self,char const *name,float f,vfo_t vfo){ setting_t stg; value_t val = {0}; 	 		stg = rig_parse_level(name);	 		if (!rig_has_set_level(self->rig, stg)) {	 			const struct confparams *cfp;	 			cfp = rig_ext_lookup(self->rig, name);	 			if (!cfp) {	 				self->error_status = -RIG_EINVAL;	  				return;	 			}  			switch (cfp->type) {	 			case RIG_CONF_NUMERIC:	 				val.f = f;	 				break;	 			case RIG_CONF_CHECKBUTTON:	 			case RIG_CONF_COMBO:		 				val.i = (int)f;	 				break;	 			case RIG_CONF_STRING:		 				self->error_status = -RIG_EINVAL;		 				return;	 			default:	 				self->error_status = -RIG_ECONF;	 				return;	 			}	 			self->error_status = rig_set_ext_level(self->rig  ,vfo, cfp->token, val);	 			return;	 		}	 		if (!((stg)&((1ul << (3))|(1ul << (4))|(1ul << (5))|(1ul << (7))|(1ul << (8))|(1ul << (9))|(1ul << (10))|(1ul << (12))|(1ul << (13))|(1ul << (16))|(1ul << (19))|(1ul << (28))|(1ul << (29))|(1ul << (21))|(1ul << (22))|(1ul << (32))|(1ul << (39))|(1ul << (33))|(1ul << (34))|(1ul << (35))|(1ul << (36))|(1ul << (37))|(1ul << (38))|(1ul << (45))|(1ul << (48))|(1ul << (50))|(1ul << (51))|(1ul << (52))))) {	 		    int ival = (int)f;	 		    val.i = ival;	 		}	 		else	{  		    val.f = f;	 		}	 		self->error_status = rig_set_level(self->rig  ,vfo , stg, val);	 	}
SWIGINTERN void Rig_set_level__SWIG_2(struct Rig *self,char const *name,char const *s,vfo_t vfo){ value_t val = {0};    		const struct confparams *cfp;  		cfp = rig_ext_lookup(self->rig, name);  		if (!cfp) {	 			self->error_status = -RIG_EINVAL;	  			return;  		}  		if (cfp->type != RIG_CONF_STRING) {  			self->error_status = -RIG_EINVAL;	  			return;  		}  		val.cs = s;  		self->error_status = rig_set_ext_level(self->rig ,vfo, cfp->token, val);  	}
SWIGINTERN void Rig_set_ext_level(struct Rig *self,hamlib_token_t _hamlib_token_t_1,value_t _value_t_2,vfo_t vfo){ self->error_status = rig_set_ext_level(self->rig  ,vfo, _hamlib_token_t_1, _value_t_2); }
SWIGINTERN int Rig_get_level_i__SWIG_0(struct Rig *self,setting_t stg,vfo_t vfo){ value_t val = {0}; 	if (((stg)&((1ul << (3))|(1ul << (4))|(1ul << (5))|(1ul << (7))|(1ul << (8))|(1ul << (9))|(1ul << (10))|(1ul << (12))|(1ul << (13))|(1ul << (16))|(1ul << (19))|(1ul << (28))|(1ul << (29))|(1ul << (21))|(1ul << (22))|(1ul << (32))|(1ul << (39))|(1ul << (33))|(1ul << (34))|(1ul << (35))|(1ul << (36))|(1ul << (37))|(1ul << (38))|(1ul << (45))|(1ul << (48))|(1ul << (50))|(1ul << (51))|(1ul << (52))))) {	 			self->error_status = -RIG_EINVAL;		 			return val.i;			 		}	 		self->error_status = rig_get_level(self->rig  ,vfo , stg, &val);	 		return val.i;	 	}
SWIGINTERN float Rig_get_level_f__SWIG_0(struct Rig *self,setting_t stg,vfo_t vfo){ value_t val = {0}; 	if (!((stg)&((1ul << (3))|(1ul << (4))|(1ul << (5))|(1ul << (7))|(1ul << (8))|(1ul << (9))|(1ul << (10))|(1ul << (12))|(1ul << (13))|(1ul << (16))|(1ul << (19))|(1ul << (28))|(1ul << (29))|(1ul << (21))|(1ul << (22))|(1ul << (32))|(1ul << (39))|(1ul << (33))|(1ul << (34))|(1ul << (35))|(1ul << (36))|(1ul << (37))|(1ul << (38))|(1ul << (45))|(1ul << (48))|(1ul << (50))|(1ul << (51))|(1ul << (52))))) {	 			self->error_status = -RIG_EINVAL;		 			return val.f;			 		}	 		self->error_status = rig_get_level(self->rig  ,vfo , stg, &val);	 		return val.f;	 	}
SWIGINTERN int Rig_get_level_i__SWIG_1(struct Rig *self,char const *name,vfo_t vfo){ setting_t stg; value_t val = {0}; 	 		stg = rig_parse_level(name);	 		if (!rig_has_get_level(self->rig, stg)) {	 			const struct confparams *cfp;	 			cfp = rig_ext_lookup(self->rig, name);	 			if (!cfp) {	 				self->error_status = -RIG_EINVAL;	  				return val.i;		  			}  			if (cfp->type == RIG_CONF_STRING) {  				self->error_status = -RIG_EINVAL;	 				return val.i;	  			}	 			self->error_status = rig_get_ext_level(self->rig  ,vfo, cfp->token, &val);	 			switch (cfp->type) {	 			case RIG_CONF_NUMERIC:	 				return (int)val.f;	 			case RIG_CONF_CHECKBUTTON:	 			case RIG_CONF_COMBO:		 				return (int)val.i;	 			default:	 				self->error_status = -RIG_ECONF;	 				return val.i;	  			}	 		}	 		if (((stg)&((1ul << (3))|(1ul << (4))|(1ul << (5))|(1ul << (7))|(1ul << (8))|(1ul << (9))|(1ul << (10))|(1ul << (12))|(1ul << (13))|(1ul << (16))|(1ul << (19))|(1ul << (28))|(1ul << (29))|(1ul << (21))|(1ul << (22))|(1ul << (32))|(1ul << (39))|(1ul << (33))|(1ul << (34))|(1ul << (35))|(1ul << (36))|(1ul << (37))|(1ul << (38))|(1ul << (45))|(1ul << (48))|(1ul << (50))|(1ul << (51))|(1ul << (52))))) {	 			self->error_status = -RIG_EINVAL;		 			return val.i;	  		}	 		self->error_status = rig_get_level(self->rig  ,vfo , stg, &val);	 		return val.i;	 	}
SWIGINTERN float Rig_get_level_f__SWIG_1(struct Rig *self,char const *name,vfo_t vfo){ setting_t stg; value_t val = {0}; 	 		stg = rig_parse_level(name);	 		if (!rig_has_get_level(self->rig, stg)) {	 			const struct confparams *cfp;	 			cfp = rig_ext_lookup(self->rig, name);	 			if (!cfp) {	 				self->error_status = -RIG_EINVAL;	  				return val.f;		  			}  			if (cfp->type == RIG_CONF_STRING) {  				self->error_status = -RIG_EINVAL;	 				return val.f;	  			}	 			self->error_status = rig_get_ext_level(self->rig  ,vfo, cfp->token, &val);	 			switch (cfp->type) {	 			case RIG_CONF_NUMERIC:	 				return (float)val.f;	 			case RIG_CONF_CHECKBUTTON:	 			case RIG_CONF_COMBO:		 				return (float)val.i;	 			default:	 				self->error_status = -RIG_ECONF;	 				return val.f;	  			}	 		}	 		if (!((stg)&((1ul << (3))|(1ul << (4))|(1ul << (5))|(1ul << (7))|(1ul << (8))|(1ul << (9))|(1ul << (10))|(1ul << (12))|(1ul << (13))|(1ul << (16))|(1ul << (19))|(1ul << (28))|(1ul << (29))|(1ul << (21))|(1ul << (22))|(1ul << (32))|(1ul << (39))|(1ul << (33))|(1ul << (34))|(1ul << (35))|(1ul << (36))|(1ul << (37))|(1ul << (38))|(1ul << (45))|(1ul << (48))|(1ul << (50))|(1ul << (51))|(1ul << (52))))) {	 			self->error_status = -RIG_EINVAL;		 			return val.f;	  		}	 		self->error_status = rig_get_level(self->rig  ,vfo , stg, &val);	 		return val.f;	 	}
SWIGINTERN void Rig_get_level__SWIG_0(struct Rig *self,char const *name,char *returnstr,vfo_t vfo){ value_t val = {0};   		const struct confparams *cfp;  		returnstr[0] = '\0';  		cfp = rig_ext_lookup(self->rig, name);  		if (!cfp || cfp->type != RIG_CONF_STRING) {	 			self->error_status = -RIG_EINVAL;	  			return;  		}  		val.s = returnstr;  		self->error_status = rig_get_ext_level(self->rig ,vfo, cfp->token, &val);  	}
SWIGINTERN void Rig_set_vfo(struct Rig *self,vfo_t _vfo_t){ self->error_status = rig_set_vfo(self->rig  , _vfo_t); }
SWIGINTERN void Rig_set_powerstat(struct Rig *self,powerstat_t _powerstat_t){ self->error_status = rig_set_powerstat(self->rig  , _powerstat_t); }
SWIGINTERN void Rig_has_get_level(struct Rig *self,setting_t _setting_t){ self->error_status = rig_has_get_level(self->rig  , _setting_t); }
SWIGINTERN void Rig_has_get_parm(struct Rig *self,setting_t _setting_t){ self->error_status = rig_has_get_parm(self->rig  , _setting_t); }
SWIGINTERN void Rig_has_set_parm(struct Rig *self,setting_t _setting_t){ self->error_status = rig_has_set_parm(self->rig  , _setting_t); }
SWIGINTERN void Rig_has_get_func(struct Rig *self,setting_t _setting_t){ self->error_status = rig_has_get_func(self->rig  , _setting_t); }
SWIGINTERN void Rig_has_set_func(struct Rig *self,setting_t _setting_t){ self->error_status = rig_has_set_func(self->rig  , _setting_t); }
SWIGINTERN void Rig_reset(struct Rig *self,reset_t _reset_t){ self->error_status = rig_reset(self->rig  , _reset_t); }
SWIGINTERN void Rig_has_scan(struct Rig *self,scan_t _scan_t){ self->error_status = rig_has_scan(self->rig  , _scan_t); }
SWIGINTERN void Rig_has_vfo_op(struct Rig *self,vfo_op_t _vfo_op_t){ self->error_status = rig_has_vfo_op(self->rig  , _vfo_op_t); }
SWIGINTERN void Rig_passband_normal(struct Rig *self,rmode_t _rmode_t){ self->error_status = rig_passband_normal(self->rig  , _rmode_t); }
SWIGINTERN void Rig_passband_narrow(struct Rig *self,rmode_t _rmode_t){ self->error_status = rig_passband_narrow(self->rig  , _rmode_t); }
SWIGINTERN void Rig_passband_wide(struct Rig *self,rmode_t _rmode_t){ self->error_status = rig_passband_wide(self->rig  , _rmode_t); }
SWIGINTERN void Rig_set_vfo_opt(struct Rig *self,int _int){ self->error_status = rig_set_vfo_opt(self->rig  , _int); }
SWIGINTERN void Rig_ext_token_lookup(struct Rig *self,const_char_string _const_char_string){ self->error_status = rig_ext_token_lookup(self->rig  , _const_char_string); }
SWIGINTERN void Rig_token_lookup(struct Rig *self,const_char_string _const_char_string){ self->error_status = rig_token_lookup(self->rig  , _const_char_string); }
SWIGINTERN void Rig_set_conf__SWIG_0(struct Rig *self,hamlib_token_t _hamlib_token_t_1,const_char_string _const_char_string_2){ self->error_status = rig_set_conf(self->rig  , _hamlib_token_t_1, _const_char_string_2); }
SWIGINTERN void Rig_set_ext_parm(struct Rig *self,hamlib_token_t _hamlib_token_t_1,value_t _value_t_2){ self->error_status = rig_set_ext_parm(self->rig  , _hamlib_token_t_1, _value_t_2); }
SWIGINTERN void Rig_set_parm__SWIG_0(struct Rig *self,setting_t stg,float f){ value_t val = {0}; 	 		if (!((stg)&(RIG_PARM_BACKLIGHT|RIG_PARM_BAT|RIG_PARM_KEYLIGHT|RIG_PARM_BACKLIGHT))) {	 			int ival = (int)f;	 			val.i = f;	 		}	 		else {	 		    val.f = f;	 		}	 		self->error_status = rig_set_parm(self->rig   , stg, val);	 	}
SWIGINTERN void Rig_set_parm__SWIG_1(struct Rig *self,char const *name,float f){ setting_t stg; value_t val = {0}; 	 		stg = rig_parse_parm(name);	 		if (!rig_has_set_parm(self->rig, stg)) {	 			const struct confparams *cfp;	 			cfp = rig_ext_lookup(self->rig, name);	 			if (!cfp) {	 				self->error_status = -RIG_EINVAL;	  				return;	 			}  			switch (cfp->type) {	 			case RIG_CONF_NUMERIC:	 				val.f = f;	 				break;	 			case RIG_CONF_CHECKBUTTON:	 			case RIG_CONF_COMBO:		 				val.i = (int)f;	 				break;	 			case RIG_CONF_STRING:		 				self->error_status = -RIG_EINVAL;		 				return;	 			default:	 				self->error_status = -RIG_ECONF;	 				return;	 			}	 			self->error_status = rig_set_ext_parm(self->rig  , cfp->token, val);	 			return;	 		}	 		if (!((stg)&(RIG_PARM_BACKLIGHT|RIG_PARM_BAT|RIG_PARM_KEYLIGHT|RIG_PARM_BACKLIGHT))) {	 		    int ival = (int)f;	 		    val.i = ival;	 		}	 		else	{  		    val.f = f;	 		}	 		self->error_status = rig_set_parm(self->rig   , stg, val);	 	}
SWIGINTERN void Rig_set_parm__SWIG_2(struct Rig *self,char const *name,char const *s){ value_t val = {0};    		const struct confparams *cfp;  		cfp = rig_ext_lookup(self->rig, name);  		if (!cfp) {	 			self->error_status = -RIG_EINVAL;	  			return;  		}  		if (cfp->type != RIG_CONF_STRING) {  			self->error_status = -RIG_EINVAL;	  			return;  		}  		val.cs = s;  		self->error_status = rig_set_ext_parm(self->rig , cfp->token, val);  	}
SWIGINTERN int Rig_get_parm_i__SWIG_0(struct Rig *self,setting_t stg){ value_t val = {0}; 	if (((stg)&(RIG_PARM_BACKLIGHT|RIG_PARM_BAT|RIG_PARM_KEYLIGHT|RIG_PARM_BACKLIGHT))) {	 			self->error_status = -RIG_EINVAL;		 			return val.i;			 		}	 		self->error_status = rig_get_parm(self->rig   , stg, &val);	 		return val.i;	 	}
SWIGINTERN float Rig_get_parm_f__SWIG_0(struct Rig *self,setting_t stg){ value_t val = {0}; 	if (!((stg)&(RIG_PARM_BACKLIGHT|RIG_PARM_BAT|RIG_PARM_KEYLIGHT|RIG_PARM_BACKLIGHT))) {	 			self->error_status = -RIG_EINVAL;		 			return val.f;			 		}	 		self->error_status = rig_get_parm(self->rig   , stg, &val);	 		return val.f;	 	}
SWIGINTERN int Rig_get_parm_i__SWIG_1(struct Rig *self,char const *name){ setting_t stg; value_t val = {0}; 	 		stg = rig_parse_parm(name);	 		if (!rig_has_get_parm(self->rig, stg)) {	 			const struct confparams *cfp;	 			cfp = rig_ext_lookup(self->rig, name);	 			if (!cfp) {	 				self->error_status = -RIG_EINVAL;	  				return val.i;		  			}  			if (cfp->type == RIG_CONF_STRING) {  				self->error_status = -RIG_EINVAL;	 				return val.i;	  			}	 			self->error_status = rig_get_ext_parm(self->rig  , cfp->token, &val);	 			switch (cfp->type) {	 			case RIG_CONF_NUMERIC:	 				return (int)val.f;	 			case RIG_CONF_CHECKBUTTON:	 			case RIG_CONF_COMBO:		 				return (int)val.i;	 			default:	 				self->error_status = -RIG_ECONF;	 				return val.i;	  			}	 		}	 		if (((stg)&(RIG_PARM_BACKLIGHT|RIG_PARM_BAT|RIG_PARM_KEYLIGHT|RIG_PARM_BACKLIGHT))) {	 			self->error_status = -RIG_EINVAL;		 			return val.i;	  		}	 		self->error_status = rig_get_parm(self->rig   , stg, &val);	 		return val.i;	 	}
SWIGINTERN float Rig_get_parm_f__SWIG_1(struct Rig *self,char const *name){ setting_t stg; value_t val = {0}; 	 		stg = rig_parse_parm(name);	 		if (!rig_has_get_parm(self->rig, stg)) {	 			const struct confparams *cfp;	 			cfp = rig_ext_lookup(self->rig, name);	 			if (!cfp) {	 				self->error_status = -RIG_EINVAL;	  				return val.f;		  			}  			if (cfp->type == RIG_CONF_STRING) {  				self->error_status = -RIG_EINVAL;	 				return val.f;	  			}	 			self->error_status = rig_get_ext_parm(self->rig  , cfp->token, &val);	 			switch (cfp->type) {	 			case RIG_CONF_NUMERIC:	 				return (float)val.f;	 			case RIG_CONF_CHECKBUTTON:	 			case RIG_CONF_COMBO:		 				return (float)val.i;	 			default:	 				self->error_status = -RIG_ECONF;	 				return val.f;	  			}	 		}	 		if (!((stg)&(RIG_PARM_BACKLIGHT|RIG_PARM_BAT|RIG_PARM_KEYLIGHT|RIG_PARM_BACKLIGHT))) {	 			self->error_status = -RIG_EINVAL;		 			return val.f;	  		}	 		self->error_status = rig_get_parm(self->rig   , stg, &val);	 		return val.f;	 	}
SWIGINTERN void Rig_get_parm__SWIG_0(struct Rig *self,char const *name,char *returnstr){ value_t val = {0};   		const struct confparams *cfp;  		returnstr[0] = '\0';  		cfp = rig_ext_lookup(self->rig, name);  		if (!cfp || cfp->type != RIG_CONF_STRING) {	 			self->error_status = -RIG_EINVAL;	  			return;  		}  		val.s = returnstr;  		self->error_status = rig_get_ext_parm(self->rig , cfp->token, &val);  	}
SWIGINTERN void Rig_set_conf__SWIG_1(struct Rig *self,char const *name,char const *val){
		hamlib_token_t tok = rig_token_lookup(self->rig, name);
		if (tok == 0)
			self->error_status = -RIG_EINVAL;
		else
			self->error_status = rig_set_conf(self->rig, tok, val);
	}
SWIGINTERN freq_t Rig_get_freq(struct Rig *self,vfo_t vfo){ freq_t _freq_t; self->error_status = rig_get_freq(self->rig, vfo, &_freq_t); return _freq_t; }
SWIGINTERN vfo_t Rig_get_vfo(struct Rig *self){ vfo_t _vfo_t; self->error_status = rig_get_vfo(self->rig, &_vfo_t); return _vfo_t; }
SWIGINTERN ptt_t Rig_get_ptt(struct Rig *self,vfo_t vfo){ ptt_t _ptt_t; self->error_status = rig_get_ptt(self->rig, vfo, &_ptt_t); return _ptt_t; }
SWIGINTERN rptr_shift_t Rig_get_rptr_shift(struct Rig *self,vfo_t vfo){ rptr_shift_t _rptr_shift_t; self->error_status = rig_get_rptr_shift(self->rig, vfo, &_rptr_shift_t); return _rptr_shift_t; }
SWIGINTERN shortfreq_t Rig_get_rptr_offs(struct Rig *self,vfo_t vfo){ shortfreq_t _shortfreq_t; self->error_status = rig_get_rptr_offs(self->rig, vfo, &_shortfreq_t); return _shortfreq_t; }
SWIGINTERN tone_t Rig_get_ctcss_tone(struct Rig *self,vfo_t vfo){ tone_t _tone_t; self->error_status = rig_get_ctcss_tone(self->rig, vfo, &_tone_t); return _tone_t; }
SWIGINTERN tone_t Rig_get_dcs_code(struct Rig *self,vfo_t vfo){ tone_t _tone_t; self->error_status = rig_get_dcs_code(self->rig, vfo, &_tone_t); return _tone_t; }
SWIGINTERN tone_t Rig_get_ctcss_sql(struct Rig *self,vfo_t vfo){ tone_t _tone_t; self->error_status = rig_get_ctcss_sql(self->rig, vfo, &_tone_t); return _tone_t; }
SWIGINTERN tone_t Rig_get_dcs_sql(struct Rig *self,vfo_t vfo){ tone_t _tone_t; self->error_status = rig_get_dcs_sql(self->rig, vfo, &_tone_t); return _tone_t; }
SWIGINTERN freq_t Rig_get_split_freq(struct Rig *self,vfo_t vfo){ freq_t _freq_t; self->error_status = rig_get_split_freq(self->rig, vfo, &_freq_t); return _freq_t; }
SWIGINTERN void Rig_get_split_vfo(struct Rig *self,split_t *split,vfo_t *tx_vfo,vfo_t vfo){ self->error_status = rig_get_split_vfo(self->rig, vfo, split, tx_vfo); }
SWIGINTERN shortfreq_t Rig_get_rit(struct Rig *self,vfo_t vfo){ shortfreq_t _shortfreq_t; self->error_status = rig_get_rit(self->rig, vfo, &_shortfreq_t); return _shortfreq_t; }
SWIGINTERN shortfreq_t Rig_get_xit(struct Rig *self,vfo_t vfo){ shortfreq_t _shortfreq_t; self->error_status = rig_get_xit(self->rig, vfo, &_shortfreq_t); return _shortfreq_t; }
SWIGINTERN shortfreq_t Rig_get_ts(struct Rig *self,vfo_t vfo){ shortfreq_t _shortfreq_t; self->error_status = rig_get_ts(self->rig, vfo, &_shortfreq_t); return _shortfreq_t; }
SWIGINTERN void Rig_get_vfo_info(struct Rig *self,int *satmode,split_t *split,pbwidth_t *width,rmode_t *mode,freq_t *freq,vfo_t vfo){ self->error_status = rig_get_vfo_info(self->rig, vfo, freq, mode, width, split, satmode); }
SWIGINTERN int Rig_get_mem(struct Rig *self,vfo_t vfo){ int _int; self->error_status = rig_get_mem(self->rig, vfo, &_int); return _int; }
SWIGINTERN powerstat_t Rig_get_powerstat(struct Rig *self){ powerstat_t _powerstat_t; self->error_status = rig_get_powerstat(self->rig, &_powerstat_t); return _powerstat_t; }
SWIGINTERN dcd_t Rig_get_dcd(struct Rig *self,vfo_t vfo){ dcd_t _dcd_t; self->error_status = rig_get_dcd(self->rig, vfo, &_dcd_t); return _dcd_t; }
SWIGINTERN int Rig_mem_count(struct Rig *self){
		return rig_mem_count(self->rig);
	}
SWIGINTERN chan_t const *Rig_lookup_mem_caps(struct Rig *self,int channel_num){
		return rig_lookup_mem_caps(self->rig, channel_num);
	}
SWIGINTERN void Rig_set_channel(struct Rig *self,struct channel const *chan){
		self->error_status = rig_set_channel(self->rig, 0, chan);
	}
SWIGINTERN void Rig_get_channel__SWIG_0(struct Rig *self,struct channel *chan,int read_only){
		self->error_status = rig_get_channel(self->rig, 0, chan, read_only);
		/* TODO: handle ext_level's */
	}
SWIGINTERN void Rig_get_chan_all__SWIG_0(struct Rig *self,struct channel *chans){
		self->error_status = rig_get_chan_all(self->rig, 0, chans);
		/* TODO: handle ext_level's */
	}
SWIGINTERN struct channel *Rig_get_channel__SWIG_1(struct Rig *self,int read_only,int channel_num,vfo_t vfo){
		struct channel *chan;
		chan = new_channel(channel_num != INT_MAX ? vfo : (1u<<(29)), channel_num);
		if (!chan)
		{
			self->error_status = -RIG_ENOMEM;
			return NULL;
		}
		self->error_status = rig_get_channel(self->rig, 0, chan, read_only);
		/* TODO: copy ext_level's */
		return chan;
	}
SWIGINTERN void Rig_get_conf__SWIG_0(struct Rig *self,hamlib_token_t tok,char *returnstr){
		returnstr[0] = '\0';
		self->error_status = rig_get_conf2(self->rig, tok, returnstr, 256);
	}
SWIGINTERN void Rig_get_conf__SWIG_1(struct Rig *self,char const *name,char *returnstr){
		returnstr[0] = '\0';
		hamlib_token_t tok = rig_token_lookup(self->rig, name);
		if (tok == 0)
			self->error_status = -RIG_EINVAL;
		else
			self->error_status = rig_get_conf2(self->rig, tok, returnstr, 256);
	}
SWIGINTERN void Rig_recv_dtmf(struct Rig *self,char *returnstr,vfo_t vfo){
		int len = 256;
		self->error_status = rig_recv_dtmf(self->rig, vfo, returnstr, &len);
		returnstr[len] = '\0';
	}
SWIGINTERN char const *Rig_get_info(struct Rig *self){
		const char *s;
		s = rig_get_info(self->rig);
		self->error_status = s ? RIG_OK : -RIG_EINVAL;
		return s;
	}
SWIGINTERN int Rig_get_func(struct Rig *self,setting_t func,vfo_t vfo){
		int status;
		self->error_status = rig_get_func(self->rig, vfo, func, &status);
		return status;
	}
SWIGINTERN int Rig_get_ext_func(struct Rig *self,hamlib_token_t func,vfo_t vfo){
		int status;
		self->error_status = rig_get_ext_func(self->rig, vfo, func, &status);
		return status;
	}
SWIGINTERN void Rig_get_level__SWIG_1(struct Rig *self,setting_t level,vfo_t vfo){ value_t val = {0}; self->error_status = rig_get_level(self->rig, vfo, level, &val);
			//if (RIG_LEVEL_IS_FLOAT(level))
			/* TODO: dynamic casting */
		}
SWIGINTERN void Rig_get_ext_level(struct Rig *self,hamlib_token_t token,vfo_t vfo){ value_t val = {0}; self->error_status = rig_get_level(self->rig, vfo, token, &val);
			//if (RIG_LEVEL_IS_FLOAT(level))
			/* TODO: dynamic casting */
		}
SWIGINTERN void Rig_get_parm__SWIG_1(struct Rig *self,setting_t parm){ value_t val = {0}; self->error_status = rig_get_parm(self->rig, parm, &val);
			//if (RIG_LEVEL_IS_FLOAT(parm))
			/* TODO: dynamic casting */
		}
SWIGINTERN void Rig_get_ext_parm(struct Rig *self,hamlib_token_t parm){ value_t val = {0}; self->error_status = rig_get_parm(self->rig, parm, &val);
			//if (RIG_LEVEL_IS_FLOAT(parm))
			/* TODO: dynamic casting */
		}

#include <stdlib.h>
#ifdef _MSC_VER
# ifndef strtoull
#  define strtoull _strtoui64
# endif
# ifndef strtoll
#  define strtoll _strtoi64
# endif
#endif


typedef struct channel channelArray;

SWIGINTERN channelArray *new_channelArray(size_t nelements){
  return (struct channel *) calloc(nelements,sizeof(struct channel));
}
SWIGINTERN void delete_channelArray(channelArray *self){
  free(self);
}
SWIGINTERN struct channel channelArray_getitem(channelArray *self,size_t index){
  return self[index];
}
SWIGINTERN void channelArray_setitem(channelArray *self,size_t index,struct channel value){
  self[index] = value;
}
SWIGINTERN struct channel *channelArray_cast(channelArray *self){
  return self;
}
SWIGINTERN channelArray *channelArray_frompointer(struct channel *t){
  return (channelArray *) t;
}

typedef tone_t toneArray;

SWIGINTERN toneArray *new_toneArray(size_t nelements){
  return (tone_t *) calloc(nelements,sizeof(tone_t));
}
SWIGINTERN void delete_toneArray(toneArray *self){
  free(self);
}
SWIGINTERN tone_t toneArray_getitem(toneArray *self,size_t index){
  return self[index];
}
SWIGINTERN void toneArray_setitem(toneArray *self,size_t index,tone_t value){
  self[index] = value;
}
SWIGINTERN tone_t *toneArray_cast(toneArray *self){
  return self;
}
SWIGINTERN toneArray *toneArray_frompointer(tone_t *t){
  return (toneArray *) t;
}


/*
 * these ones return 2 values, here is a perl example:
 * 	($mode, $width) = $rig->get_mode();
 */
void Rig_get_mode(Rig *self, rmode_t *mode, pbwidth_t *width, vfo_t vfo)
{
	self->error_status = rig_get_mode(self->rig, vfo, mode, width);
}

void Rig_get_split_mode(Rig *self, rmode_t *mode, pbwidth_t *width, vfo_t vfo)
{
	self->error_status = rig_get_split_mode(self->rig, vfo, mode, width);
}

/*
 * these ones return 3 values
 */
void Rig_get_split_freq_mode(Rig *self, vfo_t vfo, freq_t *tx_freq, rmode_t *tx_mode, pbwidth_t *tx_width)
{
	self->error_status = rig_get_split_freq_mode(self->rig, vfo, tx_freq, tx_mode, tx_width);
}


/*
 * these ones return 4 values
 */
void Rig_get_ant(Rig *self, ant_t *ant_rx, ant_t *ant_tx, ant_t *ant_curr, signed int *option, ant_t ant, vfo_t vfo)
{
	value_t value;
	self->error_status = rig_get_ant(self->rig, vfo, ant, &value, ant_curr, ant_tx, ant_rx);
	*option = value.i;
}

struct channel *Rig_get_chan_all(Rig *self)
{
	struct channel *chans;
	int nb_chans = rig_mem_count(self->rig);

	/* TODO: memleak: typemap to release that memory */
	chans = calloc(sizeof (struct channel), nb_chans);
	if (!chans)
	{
		self->error_status = -RIG_ENOMEM;
		return NULL;
	}
	self->error_status = rig_get_chan_all(self->rig, RIG_VFO_NONE, chans);
	/* TODO: copy ext_level's */
	return chans;
}



#include <hamlib/rotator.h>



typedef struct Rot {
	ROT *rot;
	struct rot_caps *caps;		/* shortcut to ROT->caps */
	struct rot_state *state;	/* shortcut to ROT->state */
	int error_status;
	int do_exception;
} Rot;


SWIGINTERN struct Rot *new_Rot(rot_model_t rot_model){
		Rot *r;

		r = (Rot*)malloc(sizeof(Rot));
		if (!r)
			return NULL;
		r->rot = rot_init(rot_model);
		if (!r->rot) {
			free(r);
			return NULL;
		}
		/* install shortcuts */
		r->caps = r->rot->caps;
		r->state = &r->rot->state; rot_data_pointer(r->rot, RIG_PTRX_ROTSTATE);
		r->do_exception = 0;    /* default is disabled */
		r->error_status = RIG_OK;
		return r;
	}
SWIGINTERN void delete_Rot(struct Rot *self){
		rot_cleanup(self->rot);
		free(self);
	}
SWIGINTERN void Rot_open(struct Rot *self){ self->error_status = rot_open(self->rot); }
SWIGINTERN void Rot_close(struct Rot *self){ self->error_status = rot_close(self->rot); }
SWIGINTERN void Rot_set_ext_func(struct Rot *self,hamlib_token_t _hamlib_token_t_1,int _int_2){ self->error_status = rot_set_ext_func(self->rot, _hamlib_token_t_1, _int_2); }
SWIGINTERN void Rot_set_ext_level(struct Rot *self,hamlib_token_t _hamlib_token_t_1,value_t _value_t_2){ self->error_status = rot_set_ext_level(self->rot, _hamlib_token_t_1, _value_t_2); }
SWIGINTERN void Rot_set_ext_parm(struct Rot *self,hamlib_token_t _hamlib_token_t_1,value_t _value_t_2){ self->error_status = rot_set_ext_parm(self->rot, _hamlib_token_t_1, _value_t_2); }
SWIGINTERN void Rot_set_func(struct Rot *self,setting_t _setting_t_1,int _int_2){ self->error_status = rot_set_func(self->rot, _setting_t_1, _int_2); }
SWIGINTERN void Rot_set_level(struct Rot *self,setting_t _setting_t_1,value_t _value_t_2){ self->error_status = rot_set_level(self->rot, _setting_t_1, _value_t_2); }
SWIGINTERN void Rot_set_parm(struct Rot *self,setting_t _setting_t_1,value_t _value_t_2){ self->error_status = rot_set_parm(self->rot, _setting_t_1, _value_t_2); }
SWIGINTERN void Rot_set_position(struct Rot *self,azimuth_t _azimuth_t_1,elevation_t _elevation_t_2){ self->error_status = rot_set_position(self->rot, _azimuth_t_1, _elevation_t_2); }
SWIGINTERN void Rot_stop(struct Rot *self){ self->error_status = rot_stop(self->rot); }
SWIGINTERN void Rot_park(struct Rot *self){ self->error_status = rot_park(self->rot); }
SWIGINTERN void Rot_reset(struct Rot *self,rot_reset_t _rot_reset_t){ self->error_status = rot_reset(self->rot, _rot_reset_t); }
SWIGINTERN void Rot_move(struct Rot *self,int _int_1,int _int_2){ self->error_status = rot_move(self->rot, _int_1, _int_2); }
SWIGINTERN void Rot_token_lookup(struct Rot *self,const_char_string _const_char_string){ self->error_status = rot_token_lookup(self->rot, _const_char_string); }
SWIGINTERN void Rot_set_conf__SWIG_0(struct Rot *self,char const *name,char const *val){
		hamlib_token_t tok = rot_token_lookup(self->rot, name);
		if (tok == 0)
			self->error_status = -RIG_EINVAL;
		else
			self->error_status = rot_set_conf(self->rot, tok, val);
	}
SWIGINTERN void Rot_set_conf__SWIG_1(struct Rot *self,hamlib_token_t _hamlib_token_t_1,const_char_string _const_char_string_2){ self->error_status = rot_set_conf(self->rot, _hamlib_token_t_1, _const_char_string_2); }
SWIGINTERN setting_t Rot_has_get_func(struct Rot *self,setting_t func){
		return rot_has_get_func(self->rot, func);
	}
SWIGINTERN setting_t Rot_has_set_func(struct Rot *self,setting_t func){
		return rot_has_set_func(self->rot, func);
	}
SWIGINTERN setting_t Rot_has_get_level(struct Rot *self,setting_t level){
		return rot_has_get_level(self->rot, level);
	}
SWIGINTERN setting_t Rot_has_set_level(struct Rot *self,setting_t level){
		return rot_has_set_level(self->rot, level);
	}
SWIGINTERN setting_t Rot_has_get_parm(struct Rot *self,setting_t parm){
		return rot_has_get_parm(self->rot, parm);
	}
SWIGINTERN setting_t Rot_has_set_parm(struct Rot *self,setting_t parm){
		return rot_has_set_parm(self->rot, parm);
	}
SWIGINTERN char const *Rot_get_conf__SWIG_0(struct Rot *self,hamlib_token_t tok){
                static char s[128] = "";
                self->error_status = rot_get_conf2(self->rot, tok, s, sizeof s);
                return s;
        }
SWIGINTERN char const *Rot_get_conf__SWIG_1(struct Rot *self,char const *name){
                hamlib_token_t tok = rot_token_lookup(self->rot, name);
                static char s[128] = "";
                if (tok == 0)
                        self->error_status = -RIG_EINVAL;
                else
                        self->error_status = rot_get_conf2(self->rot, tok, s, sizeof s);
                return s;
        }
SWIGINTERN char const *Rot_get_info(struct Rot *self){
                const char *s;
                s = rot_get_info(self->rot);
                self->error_status = s ? RIG_OK : -RIG_EINVAL;
                return s;
        }


/*
 * this one returns 2 values, here is a perl example:
 *      ($az, $elevation) = $rig->get_position();
 */
void Rot_get_position(Rot *self, azimuth_t *azimuth, elevation_t *elevation)
{
        self->error_status = rot_get_position(self->rot, azimuth, elevation);
}



#include <hamlib/amplifier.h>



typedef struct Amp {
	AMP *amp;
	struct amp_caps *caps;		/* shortcut to AMP->caps */
	struct amp_state *state;	/* shortcut to AMP->state */
	int error_status;
	int do_exception;
} Amp;


SWIGINTERN struct Amp *new_Amp(amp_model_t amp_model){
		Amp *r;

		r = (Amp*)malloc(sizeof(Amp));
		if (!r)
			return NULL;
		r->amp = amp_init(amp_model);
		if (!r->amp) {
			free(r);
			return NULL;
		}
		/* install shortcuts */
		r->caps = r->amp->caps;
		r->state = amp_data_pointer(r->amp, RIG_PTRX_AMPSTATE);
		r->do_exception = 0;    /* default is disabled */
		r->error_status = RIG_OK;
		return r;
	}
SWIGINTERN void delete_Amp(struct Amp *self){
		amp_cleanup(self->amp);
		free(self);
	}
SWIGINTERN void Amp_open(struct Amp *self){ self->error_status = amp_open(self->amp); }
SWIGINTERN void Amp_close(struct Amp *self){ self->error_status = amp_close(self->amp); }
SWIGINTERN void Amp_reset(struct Amp *self,amp_reset_t _amp_reset_t){ self->error_status = amp_reset(self->amp, _amp_reset_t); }
SWIGINTERN void Amp_token_lookup(struct Amp *self,const_char_string _const_char_string){ self->error_status = amp_token_lookup(self->amp, _const_char_string); }
SWIGINTERN setting_t Amp_has_get_level(struct Amp *self,setting_t level){
		return amp_has_get_level(self->amp, level);
	}
SWIGINTERN setting_t Amp_has_set_level(struct Amp *self,setting_t level){
		return amp_has_set_level(self->amp, level);
	}
SWIGINTERN void Amp_set_freq(struct Amp *self,freq_t _freq_t){ self->error_status = amp_set_freq(self->amp, _freq_t); }
SWIGINTERN void Amp_set_powerstat(struct Amp *self,powerstat_t _powerstat_t){ self->error_status = amp_set_powerstat(self->amp, _powerstat_t); }
SWIGINTERN void Amp_set_level(struct Amp *self,setting_t _setting_t_1,value_t _value_t_2){ self->error_status = amp_set_level(self->amp, _setting_t_1, _value_t_2); }
SWIGINTERN void Amp_set_ext_level(struct Amp *self,hamlib_token_t _hamlib_token_t_1,value_t _value_t_2){ self->error_status = amp_set_ext_level(self->amp, _hamlib_token_t_1, _value_t_2); }
SWIGINTERN void Amp_set_conf__SWIG_0(struct Amp *self,char const *name,char const *val){
		hamlib_token_t tok = amp_token_lookup(self->amp, name);
		if (tok == 0)
			self->error_status = -RIG_EINVAL;
		else
			self->error_status = amp_set_conf(self->amp, tok, val);
	}
SWIGINTERN void Amp_set_conf__SWIG_1(struct Amp *self,hamlib_token_t _hamlib_token_t_1,const_char_string _const_char_string_2){ self->error_status = amp_set_conf(self->amp, _hamlib_token_t_1, _const_char_string_2); }
SWIGINTERN char const *Amp_get_conf__SWIG_0(struct Amp *self,hamlib_token_t tok){
          static char s[128] = "";
          self->error_status = amp_get_conf2(self->amp, tok, s, sizeof s);
          return s;
  }
SWIGINTERN char const *Amp_get_conf__SWIG_1(struct Amp *self,char const *name){
          hamlib_token_t tok = amp_token_lookup(self->amp, name);
          static char s[128] = "";
          if (tok == 0)
                  self->error_status = -RIG_EINVAL;
          else
                  self->error_status = amp_get_conf2(self->amp, tok, s, sizeof s);
          return s;
  }
SWIGINTERN freq_t Amp_get_freq(struct Amp *self){ freq_t _freq_t; self->error_status = amp_get_freq(self->amp, &_freq_t); return _freq_t; }
SWIGINTERN char const *Amp_get_info(struct Amp *self){
          const char *s;
          s = amp_get_info(self->amp);
          self->error_status = s ? RIG_OK : -RIG_EINVAL;
          return s;
  }
SWIGINTERN powerstat_t Amp_get_powerstat(struct Amp *self){ powerstat_t _powerstat_t; self->error_status = amp_get_powerstat(self->amp, &_powerstat_t); return _powerstat_t; }
#ifdef __cplusplus
extern "C" {
#endif
static int _wrap_cookie_use_set(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  
  SWIG_check_num_args("cookie_use",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("cookie_use",1,"int");
  arg1 = (int)lua_tonumber(L, 1);
  cookie_use = arg1;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_cookie_use_get(lua_State* L) {
  int SWIG_arg = 0;
  int result;
  
  SWIG_check_num_args("cookie_use",0,0)
  result = (int)cookie_use;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_skip_init_set(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  
  SWIG_check_num_args("skip_init",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("skip_init",1,"int");
  arg1 = (int)lua_tonumber(L, 1);
  skip_init = arg1;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_skip_init_get(lua_State* L) {
  int SWIG_arg = 0;
  int result;
  
  SWIG_check_num_args("skip_init",0,0)
  result = (int)skip_init;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_hamlib_version_get(lua_State* L) {
  int SWIG_arg = 0;
  char *result = 0 ;
  
  SWIG_check_num_args("hamlib_version",0,0)
  result = (char *)(char *)hamlib_version;
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_hamlib_copyright_get(lua_State* L) {
  int SWIG_arg = 0;
  char *result = 0 ;
  
  SWIG_check_num_args("hamlib_copyright",0,0)
  result = (char *)(char *)hamlib_copyright;
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_confparams_token_set(lua_State* L) {
  int SWIG_arg = 0;
  struct confparams *arg1 = 0 ;
  hamlib_token_t arg2 ;
  
  SWIG_check_num_args("confparams::token",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("confparams::token",1,"struct confparams *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("confparams::token",2,"hamlib_token_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_confparams,0))){
    SWIG_fail_ptr("confparams_token_set",1,SWIGTYPE_p_confparams);
  }
  
  arg2 = (hamlib_token_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->token = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_confparams_token_get(lua_State* L) {
  int SWIG_arg = 0;
  struct confparams *arg1 = 0 ;
  hamlib_token_t result;
  
  SWIG_check_num_args("confparams::token",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("confparams::token",1,"struct confparams *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_confparams,0))){
    SWIG_fail_ptr("confparams_token_get",1,SWIGTYPE_p_confparams);
  }
  
  result = (hamlib_token_t) ((arg1)->token);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_confparams_name_get(lua_State* L) {
  int SWIG_arg = 0;
  struct confparams *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("confparams::name",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("confparams::name",1,"struct confparams *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_confparams,0))){
    SWIG_fail_ptr("confparams_name_get",1,SWIGTYPE_p_confparams);
  }
  
  result = (char *) ((arg1)->name);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_confparams_label_get(lua_State* L) {
  int SWIG_arg = 0;
  struct confparams *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("confparams::label",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("confparams::label",1,"struct confparams *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_confparams,0))){
    SWIG_fail_ptr("confparams_label_get",1,SWIGTYPE_p_confparams);
  }
  
  result = (char *) ((arg1)->label);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_confparams_tooltip_get(lua_State* L) {
  int SWIG_arg = 0;
  struct confparams *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("confparams::tooltip",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("confparams::tooltip",1,"struct confparams *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_confparams,0))){
    SWIG_fail_ptr("confparams_tooltip_get",1,SWIGTYPE_p_confparams);
  }
  
  result = (char *) ((arg1)->tooltip);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_confparams_dflt_get(lua_State* L) {
  int SWIG_arg = 0;
  struct confparams *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("confparams::dflt",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("confparams::dflt",1,"struct confparams *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_confparams,0))){
    SWIG_fail_ptr("confparams_dflt_get",1,SWIGTYPE_p_confparams);
  }
  
  result = (char *) ((arg1)->dflt);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_confparams_type_set(lua_State* L) {
  int SWIG_arg = 0;
  struct confparams *arg1 = 0 ;
  enum rig_conf_e arg2 ;
  
  SWIG_check_num_args("confparams::type",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("confparams::type",1,"struct confparams *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("confparams::type",2,"enum rig_conf_e");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_confparams,0))){
    SWIG_fail_ptr("confparams_type_set",1,SWIGTYPE_p_confparams);
  }
  
  arg2 = (enum rig_conf_e)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->type = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_confparams_type_get(lua_State* L) {
  int SWIG_arg = 0;
  struct confparams *arg1 = 0 ;
  enum rig_conf_e result;
  
  SWIG_check_num_args("confparams::type",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("confparams::type",1,"struct confparams *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_confparams,0))){
    SWIG_fail_ptr("confparams_type_get",1,SWIGTYPE_p_confparams);
  }
  
  result = (enum rig_conf_e) ((arg1)->type);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_confparams_u_get(lua_State* L) {
  int SWIG_arg = 0;
  struct confparams *arg1 = 0 ;
  confparams_u *result = 0 ;
  
  SWIG_check_num_args("confparams::u",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("confparams::u",1,"struct confparams *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_confparams,0))){
    SWIG_fail_ptr("confparams_u_get",1,SWIGTYPE_p_confparams);
  }
  
  result = (confparams_u *)& ((arg1)->u);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_confparams_u,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_confparams(lua_State* L) {
  int SWIG_arg = 0;
  struct confparams *result = 0 ;
  
  SWIG_check_num_args("confparams::confparams",0,0)
  result = (struct confparams *)calloc(1, sizeof(struct confparams));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_confparams,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_confparams(void *obj) {
struct confparams *arg1 = (struct confparams *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_confparams(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_confparams);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_confparams_attributes[] = {
    { "token", _wrap_confparams_token_get, _wrap_confparams_token_set },
    { "name", _wrap_confparams_name_get, SWIG_Lua_set_immutable },
    { "label", _wrap_confparams_label_get, SWIG_Lua_set_immutable },
    { "tooltip", _wrap_confparams_tooltip_get, SWIG_Lua_set_immutable },
    { "dflt", _wrap_confparams_dflt_get, SWIG_Lua_set_immutable },
    { "type", _wrap_confparams_type_get, _wrap_confparams_type_set },
    { "u", _wrap_confparams_u_get, SWIG_Lua_set_immutable },
    {0,0,0}
};
static swig_lua_method swig_confparams_methods[]= {
    {0,0}
};
static swig_lua_method swig_confparams_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_confparams_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_confparams_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_confparams_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_confparams_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_confparams_Sf_SwigStatic = {
    "confparams",
    swig_confparams_Sf_SwigStatic_methods,
    swig_confparams_Sf_SwigStatic_attributes,
    swig_confparams_Sf_SwigStatic_constants,
    swig_confparams_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_confparams_bases[] = {0};
static const char *swig_confparams_base_names[] = {0};
static swig_lua_class _wrap_class_confparams = { "confparams", "confparams", &SWIGTYPE_p_confparams,_proxy__wrap_new_confparams, swig_delete_confparams, swig_confparams_methods, swig_confparams_attributes, &swig_confparams_Sf_SwigStatic, swig_confparams_meta, swig_confparams_bases, swig_confparams_base_names };

static int _wrap_confparams_u_n_get(lua_State* L) {
  int SWIG_arg = 0;
  confparams_u *arg1 = 0 ;
  confparams_u_n *result = 0 ;
  
  SWIG_check_num_args("confparams::confparams_u::n",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("confparams::confparams_u::n",1,"confparams_u *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_confparams_u,0))){
    SWIG_fail_ptr("confparams_u_n_get",1,SWIGTYPE_p_confparams_u);
  }
  
  result = (confparams_u_n *)& ((arg1)->n);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_confparams_u_n,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_confparams_u_c_get(lua_State* L) {
  int SWIG_arg = 0;
  confparams_u *arg1 = 0 ;
  confparams_u_c *result = 0 ;
  
  SWIG_check_num_args("confparams::confparams_u::c",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("confparams::confparams_u::c",1,"confparams_u *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_confparams_u,0))){
    SWIG_fail_ptr("confparams_u_c_get",1,SWIGTYPE_p_confparams_u);
  }
  
  result = (confparams_u_c *)& ((arg1)->c);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_confparams_u_c,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_confparams_u(lua_State* L) {
  int SWIG_arg = 0;
  confparams_u *result = 0 ;
  
  SWIG_check_num_args("confparams::confparams_u::confparams_u",0,0)
  result = (confparams_u *)calloc(1, sizeof(confparams_u));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_confparams_u,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_confparams_u(void *obj) {
confparams_u *arg1 = (confparams_u *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_confparams_u(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_confparams_u);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_confparams_u_attributes[] = {
    { "n", _wrap_confparams_u_n_get, SWIG_Lua_set_immutable },
    { "c", _wrap_confparams_u_c_get, SWIG_Lua_set_immutable },
    {0,0,0}
};
static swig_lua_method swig_confparams_u_methods[]= {
    {0,0}
};
static swig_lua_method swig_confparams_u_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_confparams_u_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_confparams_u_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_confparams_u_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_confparams_u_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_confparams_u_Sf_SwigStatic = {
    "confparams_u",
    swig_confparams_u_Sf_SwigStatic_methods,
    swig_confparams_u_Sf_SwigStatic_attributes,
    swig_confparams_u_Sf_SwigStatic_constants,
    swig_confparams_u_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_confparams_u_bases[] = {0};
static const char *swig_confparams_u_base_names[] = {0};
static swig_lua_class _wrap_class_confparams_u = { "confparams_u", "confparams_u", &SWIGTYPE_p_confparams_u,_proxy__wrap_new_confparams_u, swig_delete_confparams_u, swig_confparams_u_methods, swig_confparams_u_attributes, &swig_confparams_u_Sf_SwigStatic, swig_confparams_u_meta, swig_confparams_u_bases, swig_confparams_u_base_names };

static int _wrap_confparams_u_c_combostr_set(lua_State* L) {
  int SWIG_arg = 0;
  confparams_u_c *arg1 = 0 ;
  char **arg2 = (char **)0 ;
  
  SWIG_check_num_args("confparams::confparams_u::confparams_u_c::combostr",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("confparams::confparams_u::confparams_u_c::combostr",1,"confparams_u_c *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("confparams::confparams_u::confparams_u_c::combostr",2,"char const *[16]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_confparams_u_c,0))){
    SWIG_fail_ptr("confparams_u_c_combostr_set",1,SWIGTYPE_p_confparams_u_c);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_p_char,0))){
    SWIG_fail_ptr("confparams_u_c_combostr_set",2,SWIGTYPE_p_p_char);
  }
  
  {
    size_t ii;
    char const * *b = (char const * *) arg1->combostr;
    for (ii = 0; ii < (size_t)16; ii++) b[ii] = *((char const * *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_confparams_u_c_combostr_get(lua_State* L) {
  int SWIG_arg = 0;
  confparams_u_c *arg1 = 0 ;
  char **result = 0 ;
  
  SWIG_check_num_args("confparams::confparams_u::confparams_u_c::combostr",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("confparams::confparams_u::confparams_u_c::combostr",1,"confparams_u_c *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_confparams_u_c,0))){
    SWIG_fail_ptr("confparams_u_c_combostr_get",1,SWIGTYPE_p_confparams_u_c);
  }
  
  result = (char **)(char **) ((arg1)->combostr);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_p_char,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_confparams_u_c(lua_State* L) {
  int SWIG_arg = 0;
  confparams_u_c *result = 0 ;
  
  SWIG_check_num_args("confparams::confparams_u::confparams_u_c::confparams_u_c",0,0)
  result = (confparams_u_c *)calloc(1, sizeof(confparams_u_c));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_confparams_u_c,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_confparams_u_c(void *obj) {
confparams_u_c *arg1 = (confparams_u_c *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_confparams_u_c(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_confparams_u_c);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_confparams_u_c_attributes[] = {
    { "combostr", _wrap_confparams_u_c_combostr_get, _wrap_confparams_u_c_combostr_set },
    {0,0,0}
};
static swig_lua_method swig_confparams_u_c_methods[]= {
    {0,0}
};
static swig_lua_method swig_confparams_u_c_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_confparams_u_c_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_confparams_u_c_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_confparams_u_c_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_confparams_u_c_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_confparams_u_c_Sf_SwigStatic = {
    "confparams_u_c",
    swig_confparams_u_c_Sf_SwigStatic_methods,
    swig_confparams_u_c_Sf_SwigStatic_attributes,
    swig_confparams_u_c_Sf_SwigStatic_constants,
    swig_confparams_u_c_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_confparams_u_c_bases[] = {0};
static const char *swig_confparams_u_c_base_names[] = {0};
static swig_lua_class _wrap_class_confparams_u_c = { "confparams_u_c", "confparams_u_c", &SWIGTYPE_p_confparams_u_c,_proxy__wrap_new_confparams_u_c, swig_delete_confparams_u_c, swig_confparams_u_c_methods, swig_confparams_u_c_attributes, &swig_confparams_u_c_Sf_SwigStatic, swig_confparams_u_c_meta, swig_confparams_u_c_bases, swig_confparams_u_c_base_names };

static int _wrap_confparams_u_n_min_set(lua_State* L) {
  int SWIG_arg = 0;
  confparams_u_n *arg1 = 0 ;
  float arg2 ;
  
  SWIG_check_num_args("confparams::confparams_u::confparams_u_n::min",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("confparams::confparams_u::confparams_u_n::min",1,"confparams_u_n *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("confparams::confparams_u::confparams_u_n::min",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_confparams_u_n,0))){
    SWIG_fail_ptr("confparams_u_n_min_set",1,SWIGTYPE_p_confparams_u_n);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->min = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_confparams_u_n_min_get(lua_State* L) {
  int SWIG_arg = 0;
  confparams_u_n *arg1 = 0 ;
  float result;
  
  SWIG_check_num_args("confparams::confparams_u::confparams_u_n::min",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("confparams::confparams_u::confparams_u_n::min",1,"confparams_u_n *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_confparams_u_n,0))){
    SWIG_fail_ptr("confparams_u_n_min_get",1,SWIGTYPE_p_confparams_u_n);
  }
  
  result = (float) ((arg1)->min);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_confparams_u_n_max_set(lua_State* L) {
  int SWIG_arg = 0;
  confparams_u_n *arg1 = 0 ;
  float arg2 ;
  
  SWIG_check_num_args("confparams::confparams_u::confparams_u_n::max",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("confparams::confparams_u::confparams_u_n::max",1,"confparams_u_n *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("confparams::confparams_u::confparams_u_n::max",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_confparams_u_n,0))){
    SWIG_fail_ptr("confparams_u_n_max_set",1,SWIGTYPE_p_confparams_u_n);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->max = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_confparams_u_n_max_get(lua_State* L) {
  int SWIG_arg = 0;
  confparams_u_n *arg1 = 0 ;
  float result;
  
  SWIG_check_num_args("confparams::confparams_u::confparams_u_n::max",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("confparams::confparams_u::confparams_u_n::max",1,"confparams_u_n *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_confparams_u_n,0))){
    SWIG_fail_ptr("confparams_u_n_max_get",1,SWIGTYPE_p_confparams_u_n);
  }
  
  result = (float) ((arg1)->max);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_confparams_u_n_step_set(lua_State* L) {
  int SWIG_arg = 0;
  confparams_u_n *arg1 = 0 ;
  float arg2 ;
  
  SWIG_check_num_args("confparams::confparams_u::confparams_u_n::step",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("confparams::confparams_u::confparams_u_n::step",1,"confparams_u_n *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("confparams::confparams_u::confparams_u_n::step",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_confparams_u_n,0))){
    SWIG_fail_ptr("confparams_u_n_step_set",1,SWIGTYPE_p_confparams_u_n);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->step = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_confparams_u_n_step_get(lua_State* L) {
  int SWIG_arg = 0;
  confparams_u_n *arg1 = 0 ;
  float result;
  
  SWIG_check_num_args("confparams::confparams_u::confparams_u_n::step",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("confparams::confparams_u::confparams_u_n::step",1,"confparams_u_n *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_confparams_u_n,0))){
    SWIG_fail_ptr("confparams_u_n_step_get",1,SWIGTYPE_p_confparams_u_n);
  }
  
  result = (float) ((arg1)->step);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_confparams_u_n(lua_State* L) {
  int SWIG_arg = 0;
  confparams_u_n *result = 0 ;
  
  SWIG_check_num_args("confparams::confparams_u::confparams_u_n::confparams_u_n",0,0)
  result = (confparams_u_n *)calloc(1, sizeof(confparams_u_n));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_confparams_u_n,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_confparams_u_n(void *obj) {
confparams_u_n *arg1 = (confparams_u_n *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_confparams_u_n(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_confparams_u_n);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_confparams_u_n_attributes[] = {
    { "min", _wrap_confparams_u_n_min_get, _wrap_confparams_u_n_min_set },
    { "max", _wrap_confparams_u_n_max_get, _wrap_confparams_u_n_max_set },
    { "step", _wrap_confparams_u_n_step_get, _wrap_confparams_u_n_step_set },
    {0,0,0}
};
static swig_lua_method swig_confparams_u_n_methods[]= {
    {0,0}
};
static swig_lua_method swig_confparams_u_n_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_confparams_u_n_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_confparams_u_n_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_confparams_u_n_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_confparams_u_n_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_confparams_u_n_Sf_SwigStatic = {
    "confparams_u_n",
    swig_confparams_u_n_Sf_SwigStatic_methods,
    swig_confparams_u_n_Sf_SwigStatic_attributes,
    swig_confparams_u_n_Sf_SwigStatic_constants,
    swig_confparams_u_n_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_confparams_u_n_bases[] = {0};
static const char *swig_confparams_u_n_base_names[] = {0};
static swig_lua_class _wrap_class_confparams_u_n = { "confparams_u_n", "confparams_u_n", &SWIGTYPE_p_confparams_u_n,_proxy__wrap_new_confparams_u_n, swig_delete_confparams_u_n, swig_confparams_u_n_methods, swig_confparams_u_n_attributes, &swig_confparams_u_n_Sf_SwigStatic, swig_confparams_u_n_meta, swig_confparams_u_n_bases, swig_confparams_u_n_base_names };

static int _wrap_value_t_i_set(lua_State* L) {
  int SWIG_arg = 0;
  value_t *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("value_t::i",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("value_t::i",1,"value_t *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("value_t::i",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("value_t_i_set",1,SWIGTYPE_p_value_t);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->i = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_value_t_i_get(lua_State* L) {
  int SWIG_arg = 0;
  value_t *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("value_t::i",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("value_t::i",1,"value_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("value_t_i_get",1,SWIGTYPE_p_value_t);
  }
  
  result = (int) ((arg1)->i);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_value_t_u_set(lua_State* L) {
  int SWIG_arg = 0;
  value_t *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("value_t::u",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("value_t::u",1,"value_t *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("value_t::u",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("value_t_u_set",1,SWIGTYPE_p_value_t);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->u = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_value_t_u_get(lua_State* L) {
  int SWIG_arg = 0;
  value_t *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("value_t::u",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("value_t::u",1,"value_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("value_t_u_get",1,SWIGTYPE_p_value_t);
  }
  
  result = (unsigned int) ((arg1)->u);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_value_t_f_set(lua_State* L) {
  int SWIG_arg = 0;
  value_t *arg1 = 0 ;
  float arg2 ;
  
  SWIG_check_num_args("value_t::f",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("value_t::f",1,"value_t *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("value_t::f",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("value_t_f_set",1,SWIGTYPE_p_value_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->f = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_value_t_f_get(lua_State* L) {
  int SWIG_arg = 0;
  value_t *arg1 = 0 ;
  float result;
  
  SWIG_check_num_args("value_t::f",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("value_t::f",1,"value_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("value_t_f_get",1,SWIGTYPE_p_value_t);
  }
  
  result = (float) ((arg1)->f);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_value_t_s_set(lua_State* L) {
  int SWIG_arg = 0;
  value_t *arg1 = 0 ;
  char *arg2 = 0 ;
  
  SWIG_check_num_args("value_t::s",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("value_t::s",1,"value_t *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("value_t::s",2,"char *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("value_t_s_set",1,SWIGTYPE_p_value_t);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    free(arg1->s);
    if (arg2) {
      arg1->s = (char *) malloc(strlen((const char *)arg2)+1);
      strcpy((char *)arg1->s, (const char *)arg2);
    } else {
      arg1->s = 0;
    }
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_value_t_s_get(lua_State* L) {
  int SWIG_arg = 0;
  value_t *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("value_t::s",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("value_t::s",1,"value_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("value_t_s_get",1,SWIGTYPE_p_value_t);
  }
  
  result = (char *) ((arg1)->s);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_value_t_cs_get(lua_State* L) {
  int SWIG_arg = 0;
  value_t *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("value_t::cs",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("value_t::cs",1,"value_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("value_t_cs_get",1,SWIGTYPE_p_value_t);
  }
  
  result = (char *) ((arg1)->cs);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_value_t_b_get(lua_State* L) {
  int SWIG_arg = 0;
  value_t *arg1 = 0 ;
  value_t_b *result = 0 ;
  
  SWIG_check_num_args("value_t::b",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("value_t::b",1,"value_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("value_t_b_get",1,SWIGTYPE_p_value_t);
  }
  
  result = (value_t_b *)& ((arg1)->b);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_value_t_b,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_value_t(lua_State* L) {
  int SWIG_arg = 0;
  value_t *result = 0 ;
  
  SWIG_check_num_args("value_t::value_t",0,0)
  result = (value_t *)calloc(1, sizeof(value_t));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_value_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_value_t(void *obj) {
value_t *arg1 = (value_t *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_value_t(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_value_t);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_value_t_attributes[] = {
    { "i", _wrap_value_t_i_get, _wrap_value_t_i_set },
    { "u", _wrap_value_t_u_get, _wrap_value_t_u_set },
    { "f", _wrap_value_t_f_get, _wrap_value_t_f_set },
    { "s", _wrap_value_t_s_get, _wrap_value_t_s_set },
    { "cs", _wrap_value_t_cs_get, SWIG_Lua_set_immutable },
    { "b", _wrap_value_t_b_get, SWIG_Lua_set_immutable },
    {0,0,0}
};
static swig_lua_method swig_value_t_methods[]= {
    {0,0}
};
static swig_lua_method swig_value_t_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_value_t_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_value_t_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_value_t_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_value_t_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_value_t_Sf_SwigStatic = {
    "value_t",
    swig_value_t_Sf_SwigStatic_methods,
    swig_value_t_Sf_SwigStatic_attributes,
    swig_value_t_Sf_SwigStatic_constants,
    swig_value_t_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_value_t_bases[] = {0};
static const char *swig_value_t_base_names[] = {0};
static swig_lua_class _wrap_class_value_t = { "value_t", "value_t", &SWIGTYPE_p_value_t,_proxy__wrap_new_value_t, swig_delete_value_t, swig_value_t_methods, swig_value_t_attributes, &swig_value_t_Sf_SwigStatic, swig_value_t_meta, swig_value_t_bases, swig_value_t_base_names };

static int _wrap_value_t_b_l_set(lua_State* L) {
  int SWIG_arg = 0;
  value_t_b *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("value_t::value_t_b::l",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("value_t::value_t_b::l",1,"value_t_b *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("value_t::value_t_b::l",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_value_t_b,0))){
    SWIG_fail_ptr("value_t_b_l_set",1,SWIGTYPE_p_value_t_b);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->l = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_value_t_b_l_get(lua_State* L) {
  int SWIG_arg = 0;
  value_t_b *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("value_t::value_t_b::l",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("value_t::value_t_b::l",1,"value_t_b *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_value_t_b,0))){
    SWIG_fail_ptr("value_t_b_l_get",1,SWIGTYPE_p_value_t_b);
  }
  
  result = (int) ((arg1)->l);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_value_t_b_d_set(lua_State* L) {
  int SWIG_arg = 0;
  value_t_b *arg1 = 0 ;
  unsigned char *arg2 = 0 ;
  
  SWIG_check_num_args("value_t::value_t_b::d",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("value_t::value_t_b::d",1,"value_t_b *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("value_t::value_t_b::d",2,"unsigned char *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_value_t_b,0))){
    SWIG_fail_ptr("value_t_b_d_set",1,SWIGTYPE_p_value_t_b);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_unsigned_char,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("value_t_b_d_set",2,SWIGTYPE_p_unsigned_char);
  }
  
  if (arg1) (arg1)->d = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_value_t_b_d_get(lua_State* L) {
  int SWIG_arg = 0;
  value_t_b *arg1 = 0 ;
  unsigned char *result = 0 ;
  
  SWIG_check_num_args("value_t::value_t_b::d",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("value_t::value_t_b::d",1,"value_t_b *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_value_t_b,0))){
    SWIG_fail_ptr("value_t_b_d_get",1,SWIGTYPE_p_value_t_b);
  }
  
  result = (unsigned char *) ((arg1)->d);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_unsigned_char,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_value_t_b(lua_State* L) {
  int SWIG_arg = 0;
  value_t_b *result = 0 ;
  
  SWIG_check_num_args("value_t::value_t_b::value_t_b",0,0)
  result = (value_t_b *)calloc(1, sizeof(value_t_b));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_value_t_b,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_value_t_b(void *obj) {
value_t_b *arg1 = (value_t_b *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_value_t_b(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_value_t_b);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_value_t_b_attributes[] = {
    { "l", _wrap_value_t_b_l_get, _wrap_value_t_b_l_set },
    { "d", _wrap_value_t_b_d_get, _wrap_value_t_b_d_set },
    {0,0,0}
};
static swig_lua_method swig_value_t_b_methods[]= {
    {0,0}
};
static swig_lua_method swig_value_t_b_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_value_t_b_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_value_t_b_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_value_t_b_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_value_t_b_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_value_t_b_Sf_SwigStatic = {
    "value_t_b",
    swig_value_t_b_Sf_SwigStatic_methods,
    swig_value_t_b_Sf_SwigStatic_attributes,
    swig_value_t_b_Sf_SwigStatic_constants,
    swig_value_t_b_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_value_t_b_bases[] = {0};
static const char *swig_value_t_b_base_names[] = {0};
static swig_lua_class _wrap_class_value_t_b = { "value_t_b", "value_t_b", &SWIGTYPE_p_value_t_b,_proxy__wrap_new_value_t_b, swig_delete_value_t_b, swig_value_t_b_methods, swig_value_t_b_attributes, &swig_value_t_b_Sf_SwigStatic, swig_value_t_b_meta, swig_value_t_b_bases, swig_value_t_b_base_names };

static int _wrap_freq_range_t_startf_set(lua_State* L) {
  int SWIG_arg = 0;
  struct freq_range_list *arg1 = 0 ;
  freq_t arg2 ;
  
  SWIG_check_num_args("freq_range_list::startf",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("freq_range_list::startf",1,"struct freq_range_list *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("freq_range_list::startf",2,"freq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("freq_range_t_startf_set",1,SWIGTYPE_p_freq_range_list);
  }
  
  arg2 = (freq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->startf = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_freq_range_t_startf_get(lua_State* L) {
  int SWIG_arg = 0;
  struct freq_range_list *arg1 = 0 ;
  freq_t result;
  
  SWIG_check_num_args("freq_range_list::startf",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("freq_range_list::startf",1,"struct freq_range_list *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("freq_range_t_startf_get",1,SWIGTYPE_p_freq_range_list);
  }
  
  result = (freq_t) ((arg1)->startf);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_freq_range_t_endf_set(lua_State* L) {
  int SWIG_arg = 0;
  struct freq_range_list *arg1 = 0 ;
  freq_t arg2 ;
  
  SWIG_check_num_args("freq_range_list::endf",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("freq_range_list::endf",1,"struct freq_range_list *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("freq_range_list::endf",2,"freq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("freq_range_t_endf_set",1,SWIGTYPE_p_freq_range_list);
  }
  
  arg2 = (freq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->endf = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_freq_range_t_endf_get(lua_State* L) {
  int SWIG_arg = 0;
  struct freq_range_list *arg1 = 0 ;
  freq_t result;
  
  SWIG_check_num_args("freq_range_list::endf",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("freq_range_list::endf",1,"struct freq_range_list *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("freq_range_t_endf_get",1,SWIGTYPE_p_freq_range_list);
  }
  
  result = (freq_t) ((arg1)->endf);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_freq_range_t_modes_set(lua_State* L) {
  int SWIG_arg = 0;
  struct freq_range_list *arg1 = 0 ;
  rmode_t arg2 ;
  
  SWIG_check_num_args("freq_range_list::modes",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("freq_range_list::modes",1,"struct freq_range_list *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("freq_range_list::modes",2,"rmode_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("freq_range_t_modes_set",1,SWIGTYPE_p_freq_range_list);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (rmode_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->modes = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_freq_range_t_modes_get(lua_State* L) {
  int SWIG_arg = 0;
  struct freq_range_list *arg1 = 0 ;
  rmode_t result;
  
  SWIG_check_num_args("freq_range_list::modes",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("freq_range_list::modes",1,"struct freq_range_list *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("freq_range_t_modes_get",1,SWIGTYPE_p_freq_range_list);
  }
  
  result = (rmode_t) ((arg1)->modes);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_freq_range_t_low_power_set(lua_State* L) {
  int SWIG_arg = 0;
  struct freq_range_list *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("freq_range_list::low_power",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("freq_range_list::low_power",1,"struct freq_range_list *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("freq_range_list::low_power",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("freq_range_t_low_power_set",1,SWIGTYPE_p_freq_range_list);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->low_power = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_freq_range_t_low_power_get(lua_State* L) {
  int SWIG_arg = 0;
  struct freq_range_list *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("freq_range_list::low_power",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("freq_range_list::low_power",1,"struct freq_range_list *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("freq_range_t_low_power_get",1,SWIGTYPE_p_freq_range_list);
  }
  
  result = (int) ((arg1)->low_power);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_freq_range_t_high_power_set(lua_State* L) {
  int SWIG_arg = 0;
  struct freq_range_list *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("freq_range_list::high_power",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("freq_range_list::high_power",1,"struct freq_range_list *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("freq_range_list::high_power",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("freq_range_t_high_power_set",1,SWIGTYPE_p_freq_range_list);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->high_power = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_freq_range_t_high_power_get(lua_State* L) {
  int SWIG_arg = 0;
  struct freq_range_list *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("freq_range_list::high_power",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("freq_range_list::high_power",1,"struct freq_range_list *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("freq_range_t_high_power_get",1,SWIGTYPE_p_freq_range_list);
  }
  
  result = (int) ((arg1)->high_power);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_freq_range_t_vfo_set(lua_State* L) {
  int SWIG_arg = 0;
  struct freq_range_list *arg1 = 0 ;
  vfo_t arg2 ;
  
  SWIG_check_num_args("freq_range_list::vfo",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("freq_range_list::vfo",1,"struct freq_range_list *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("freq_range_list::vfo",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("freq_range_t_vfo_set",1,SWIGTYPE_p_freq_range_list);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->vfo = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_freq_range_t_vfo_get(lua_State* L) {
  int SWIG_arg = 0;
  struct freq_range_list *arg1 = 0 ;
  vfo_t result;
  
  SWIG_check_num_args("freq_range_list::vfo",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("freq_range_list::vfo",1,"struct freq_range_list *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("freq_range_t_vfo_get",1,SWIGTYPE_p_freq_range_list);
  }
  
  result = (vfo_t) ((arg1)->vfo);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_freq_range_t_ant_set(lua_State* L) {
  int SWIG_arg = 0;
  struct freq_range_list *arg1 = 0 ;
  ant_t arg2 ;
  
  SWIG_check_num_args("freq_range_list::ant",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("freq_range_list::ant",1,"struct freq_range_list *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("freq_range_list::ant",2,"ant_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("freq_range_t_ant_set",1,SWIGTYPE_p_freq_range_list);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (ant_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->ant = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_freq_range_t_ant_get(lua_State* L) {
  int SWIG_arg = 0;
  struct freq_range_list *arg1 = 0 ;
  ant_t result;
  
  SWIG_check_num_args("freq_range_list::ant",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("freq_range_list::ant",1,"struct freq_range_list *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("freq_range_t_ant_get",1,SWIGTYPE_p_freq_range_list);
  }
  
  result = (ant_t) ((arg1)->ant);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_freq_range_t_label_set(lua_State* L) {
  int SWIG_arg = 0;
  struct freq_range_list *arg1 = 0 ;
  char *arg2 = 0 ;
  
  SWIG_check_num_args("freq_range_list::label",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("freq_range_list::label",1,"struct freq_range_list *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("freq_range_list::label",2,"char *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("freq_range_t_label_set",1,SWIGTYPE_p_freq_range_list);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    free(arg1->label);
    if (arg2) {
      arg1->label = (char *) malloc(strlen((const char *)arg2)+1);
      strcpy((char *)arg1->label, (const char *)arg2);
    } else {
      arg1->label = 0;
    }
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_freq_range_t_label_get(lua_State* L) {
  int SWIG_arg = 0;
  struct freq_range_list *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("freq_range_list::label",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("freq_range_list::label",1,"struct freq_range_list *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("freq_range_t_label_get",1,SWIGTYPE_p_freq_range_list);
  }
  
  result = (char *) ((arg1)->label);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_freq_range_t(lua_State* L) {
  int SWIG_arg = 0;
  struct freq_range_list *result = 0 ;
  
  SWIG_check_num_args("freq_range_list::freq_range_list",0,0)
  result = (struct freq_range_list *)calloc(1, sizeof(struct freq_range_list));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_freq_range_t(void *obj) {
struct freq_range_list *arg1 = (struct freq_range_list *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_freq_range_t(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_freq_range_t);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_freq_range_t_attributes[] = {
    { "startf", _wrap_freq_range_t_startf_get, _wrap_freq_range_t_startf_set },
    { "endf", _wrap_freq_range_t_endf_get, _wrap_freq_range_t_endf_set },
    { "modes", _wrap_freq_range_t_modes_get, _wrap_freq_range_t_modes_set },
    { "low_power", _wrap_freq_range_t_low_power_get, _wrap_freq_range_t_low_power_set },
    { "high_power", _wrap_freq_range_t_high_power_get, _wrap_freq_range_t_high_power_set },
    { "vfo", _wrap_freq_range_t_vfo_get, _wrap_freq_range_t_vfo_set },
    { "ant", _wrap_freq_range_t_ant_get, _wrap_freq_range_t_ant_set },
    { "label", _wrap_freq_range_t_label_get, _wrap_freq_range_t_label_set },
    {0,0,0}
};
static swig_lua_method swig_freq_range_t_methods[]= {
    {0,0}
};
static swig_lua_method swig_freq_range_t_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_freq_range_t_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_freq_range_t_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_freq_range_t_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_freq_range_t_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_freq_range_t_Sf_SwigStatic = {
    "freq_range_t",
    swig_freq_range_t_Sf_SwigStatic_methods,
    swig_freq_range_t_Sf_SwigStatic_attributes,
    swig_freq_range_t_Sf_SwigStatic_constants,
    swig_freq_range_t_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_freq_range_t_bases[] = {0};
static const char *swig_freq_range_t_base_names[] = {0};
static swig_lua_class _wrap_class_freq_range_t = { "freq_range_t", "freq_range_t", &SWIGTYPE_p_freq_range_list,_proxy__wrap_new_freq_range_t, swig_delete_freq_range_t, swig_freq_range_t_methods, swig_freq_range_t_attributes, &swig_freq_range_t_Sf_SwigStatic, swig_freq_range_t_meta, swig_freq_range_t_bases, swig_freq_range_t_base_names };

static int _wrap_tuning_step_list_modes_set(lua_State* L) {
  int SWIG_arg = 0;
  struct tuning_step_list *arg1 = 0 ;
  rmode_t arg2 ;
  
  SWIG_check_num_args("tuning_step_list::modes",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("tuning_step_list::modes",1,"struct tuning_step_list *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("tuning_step_list::modes",2,"rmode_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_tuning_step_list,0))){
    SWIG_fail_ptr("tuning_step_list_modes_set",1,SWIGTYPE_p_tuning_step_list);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (rmode_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->modes = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_tuning_step_list_modes_get(lua_State* L) {
  int SWIG_arg = 0;
  struct tuning_step_list *arg1 = 0 ;
  rmode_t result;
  
  SWIG_check_num_args("tuning_step_list::modes",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("tuning_step_list::modes",1,"struct tuning_step_list *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_tuning_step_list,0))){
    SWIG_fail_ptr("tuning_step_list_modes_get",1,SWIGTYPE_p_tuning_step_list);
  }
  
  result = (rmode_t) ((arg1)->modes);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_tuning_step_list_ts_set(lua_State* L) {
  int SWIG_arg = 0;
  struct tuning_step_list *arg1 = 0 ;
  shortfreq_t arg2 ;
  
  SWIG_check_num_args("tuning_step_list::ts",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("tuning_step_list::ts",1,"struct tuning_step_list *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("tuning_step_list::ts",2,"shortfreq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_tuning_step_list,0))){
    SWIG_fail_ptr("tuning_step_list_ts_set",1,SWIGTYPE_p_tuning_step_list);
  }
  
  arg2 = (shortfreq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->ts = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_tuning_step_list_ts_get(lua_State* L) {
  int SWIG_arg = 0;
  struct tuning_step_list *arg1 = 0 ;
  shortfreq_t result;
  
  SWIG_check_num_args("tuning_step_list::ts",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("tuning_step_list::ts",1,"struct tuning_step_list *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_tuning_step_list,0))){
    SWIG_fail_ptr("tuning_step_list_ts_get",1,SWIGTYPE_p_tuning_step_list);
  }
  
  result = (shortfreq_t) ((arg1)->ts);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_tuning_step_list(lua_State* L) {
  int SWIG_arg = 0;
  struct tuning_step_list *result = 0 ;
  
  SWIG_check_num_args("tuning_step_list::tuning_step_list",0,0)
  result = (struct tuning_step_list *)calloc(1, sizeof(struct tuning_step_list));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_tuning_step_list,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_tuning_step_list(void *obj) {
struct tuning_step_list *arg1 = (struct tuning_step_list *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_tuning_step_list(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_tuning_step_list);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_tuning_step_list_attributes[] = {
    { "modes", _wrap_tuning_step_list_modes_get, _wrap_tuning_step_list_modes_set },
    { "ts", _wrap_tuning_step_list_ts_get, _wrap_tuning_step_list_ts_set },
    {0,0,0}
};
static swig_lua_method swig_tuning_step_list_methods[]= {
    {0,0}
};
static swig_lua_method swig_tuning_step_list_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_tuning_step_list_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_tuning_step_list_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_tuning_step_list_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_tuning_step_list_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_tuning_step_list_Sf_SwigStatic = {
    "tuning_step_list",
    swig_tuning_step_list_Sf_SwigStatic_methods,
    swig_tuning_step_list_Sf_SwigStatic_attributes,
    swig_tuning_step_list_Sf_SwigStatic_constants,
    swig_tuning_step_list_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_tuning_step_list_bases[] = {0};
static const char *swig_tuning_step_list_base_names[] = {0};
static swig_lua_class _wrap_class_tuning_step_list = { "tuning_step_list", "tuning_step_list", &SWIGTYPE_p_tuning_step_list,_proxy__wrap_new_tuning_step_list, swig_delete_tuning_step_list, swig_tuning_step_list_methods, swig_tuning_step_list_attributes, &swig_tuning_step_list_Sf_SwigStatic, swig_tuning_step_list_meta, swig_tuning_step_list_bases, swig_tuning_step_list_base_names };

static int _wrap_filter_list_modes_set(lua_State* L) {
  int SWIG_arg = 0;
  struct filter_list *arg1 = 0 ;
  rmode_t arg2 ;
  
  SWIG_check_num_args("filter_list::modes",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("filter_list::modes",1,"struct filter_list *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("filter_list::modes",2,"rmode_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_filter_list,0))){
    SWIG_fail_ptr("filter_list_modes_set",1,SWIGTYPE_p_filter_list);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (rmode_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->modes = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_filter_list_modes_get(lua_State* L) {
  int SWIG_arg = 0;
  struct filter_list *arg1 = 0 ;
  rmode_t result;
  
  SWIG_check_num_args("filter_list::modes",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("filter_list::modes",1,"struct filter_list *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_filter_list,0))){
    SWIG_fail_ptr("filter_list_modes_get",1,SWIGTYPE_p_filter_list);
  }
  
  result = (rmode_t) ((arg1)->modes);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_filter_list_width_set(lua_State* L) {
  int SWIG_arg = 0;
  struct filter_list *arg1 = 0 ;
  pbwidth_t arg2 ;
  
  SWIG_check_num_args("filter_list::width",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("filter_list::width",1,"struct filter_list *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("filter_list::width",2,"pbwidth_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_filter_list,0))){
    SWIG_fail_ptr("filter_list_width_set",1,SWIGTYPE_p_filter_list);
  }
  
  arg2 = (pbwidth_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->width = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_filter_list_width_get(lua_State* L) {
  int SWIG_arg = 0;
  struct filter_list *arg1 = 0 ;
  pbwidth_t result;
  
  SWIG_check_num_args("filter_list::width",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("filter_list::width",1,"struct filter_list *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_filter_list,0))){
    SWIG_fail_ptr("filter_list_width_get",1,SWIGTYPE_p_filter_list);
  }
  
  result = (pbwidth_t) ((arg1)->width);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_filter_list(lua_State* L) {
  int SWIG_arg = 0;
  struct filter_list *result = 0 ;
  
  SWIG_check_num_args("filter_list::filter_list",0,0)
  result = (struct filter_list *)calloc(1, sizeof(struct filter_list));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_filter_list,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_filter_list(void *obj) {
struct filter_list *arg1 = (struct filter_list *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_filter_list(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_filter_list);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_filter_list_attributes[] = {
    { "modes", _wrap_filter_list_modes_get, _wrap_filter_list_modes_set },
    { "width", _wrap_filter_list_width_get, _wrap_filter_list_width_set },
    {0,0,0}
};
static swig_lua_method swig_filter_list_methods[]= {
    {0,0}
};
static swig_lua_method swig_filter_list_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_filter_list_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_filter_list_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_filter_list_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_filter_list_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_filter_list_Sf_SwigStatic = {
    "filter_list",
    swig_filter_list_Sf_SwigStatic_methods,
    swig_filter_list_Sf_SwigStatic_attributes,
    swig_filter_list_Sf_SwigStatic_constants,
    swig_filter_list_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_filter_list_bases[] = {0};
static const char *swig_filter_list_base_names[] = {0};
static swig_lua_class _wrap_class_filter_list = { "filter_list", "filter_list", &SWIGTYPE_p_filter_list,_proxy__wrap_new_filter_list, swig_delete_filter_list, swig_filter_list_methods, swig_filter_list_attributes, &swig_filter_list_Sf_SwigStatic, swig_filter_list_meta, swig_filter_list_bases, swig_filter_list_base_names };

static int _wrap_ext_list_token_set(lua_State* L) {
  int SWIG_arg = 0;
  struct ext_list *arg1 = 0 ;
  hamlib_token_t arg2 ;
  
  SWIG_check_num_args("ext_list::token",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ext_list::token",1,"struct ext_list *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("ext_list::token",2,"hamlib_token_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ext_list,0))){
    SWIG_fail_ptr("ext_list_token_set",1,SWIGTYPE_p_ext_list);
  }
  
  arg2 = (hamlib_token_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->token = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_ext_list_token_get(lua_State* L) {
  int SWIG_arg = 0;
  struct ext_list *arg1 = 0 ;
  hamlib_token_t result;
  
  SWIG_check_num_args("ext_list::token",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ext_list::token",1,"struct ext_list *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ext_list,0))){
    SWIG_fail_ptr("ext_list_token_get",1,SWIGTYPE_p_ext_list);
  }
  
  result = (hamlib_token_t) ((arg1)->token);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_ext_list_val_set(lua_State* L) {
  int SWIG_arg = 0;
  struct ext_list *arg1 = 0 ;
  value_t *arg2 = 0 ;
  
  SWIG_check_num_args("ext_list::val",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ext_list::val",1,"struct ext_list *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("ext_list::val",2,"value_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ext_list,0))){
    SWIG_fail_ptr("ext_list_val_set",1,SWIGTYPE_p_ext_list);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("ext_list_val_set",2,SWIGTYPE_p_value_t);
  }
  
  if (arg1) (arg1)->val = *arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_ext_list_val_get(lua_State* L) {
  int SWIG_arg = 0;
  struct ext_list *arg1 = 0 ;
  value_t *result = 0 ;
  
  SWIG_check_num_args("ext_list::val",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ext_list::val",1,"struct ext_list *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ext_list,0))){
    SWIG_fail_ptr("ext_list_val_get",1,SWIGTYPE_p_ext_list);
  }
  
  result = (value_t *)& ((arg1)->val);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_value_t,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_ext_list(lua_State* L) {
  int SWIG_arg = 0;
  struct ext_list *result = 0 ;
  
  SWIG_check_num_args("ext_list::ext_list",0,0)
  result = (struct ext_list *)calloc(1, sizeof(struct ext_list));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ext_list,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_ext_list(void *obj) {
struct ext_list *arg1 = (struct ext_list *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_ext_list(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_ext_list);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_ext_list_attributes[] = {
    { "token", _wrap_ext_list_token_get, _wrap_ext_list_token_set },
    { "val", _wrap_ext_list_val_get, _wrap_ext_list_val_set },
    {0,0,0}
};
static swig_lua_method swig_ext_list_methods[]= {
    {0,0}
};
static swig_lua_method swig_ext_list_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_ext_list_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_ext_list_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_ext_list_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_ext_list_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_ext_list_Sf_SwigStatic = {
    "ext_list",
    swig_ext_list_Sf_SwigStatic_methods,
    swig_ext_list_Sf_SwigStatic_attributes,
    swig_ext_list_Sf_SwigStatic_constants,
    swig_ext_list_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_ext_list_bases[] = {0};
static const char *swig_ext_list_base_names[] = {0};
static swig_lua_class _wrap_class_ext_list = { "ext_list", "ext_list", &SWIGTYPE_p_ext_list,_proxy__wrap_new_ext_list, swig_delete_ext_list, swig_ext_list_methods, swig_ext_list_attributes, &swig_ext_list_Sf_SwigStatic, swig_ext_list_meta, swig_ext_list_bases, swig_ext_list_base_names };

static int _wrap_channel_channel_num_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("channel::channel_num",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::channel_num",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::channel_num",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_channel_num_set",1,SWIGTYPE_p_channel);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->channel_num = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_channel_num_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("channel::channel_num",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::channel_num",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_channel_num_get",1,SWIGTYPE_p_channel);
  }
  
  result = (int) ((arg1)->channel_num);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_bank_num_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("channel::bank_num",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::bank_num",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::bank_num",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_bank_num_set",1,SWIGTYPE_p_channel);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->bank_num = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_bank_num_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("channel::bank_num",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::bank_num",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_bank_num_get",1,SWIGTYPE_p_channel);
  }
  
  result = (int) ((arg1)->bank_num);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_vfo_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  vfo_t arg2 ;
  
  SWIG_check_num_args("channel::vfo",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::vfo",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::vfo",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_vfo_set",1,SWIGTYPE_p_channel);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->vfo = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_vfo_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  vfo_t result;
  
  SWIG_check_num_args("channel::vfo",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::vfo",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_vfo_get",1,SWIGTYPE_p_channel);
  }
  
  result = (vfo_t) ((arg1)->vfo);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_ant_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  ant_t arg2 ;
  
  SWIG_check_num_args("channel::ant",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::ant",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::ant",2,"ant_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_ant_set",1,SWIGTYPE_p_channel);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (ant_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->ant = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_ant_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  ant_t result;
  
  SWIG_check_num_args("channel::ant",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::ant",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_ant_get",1,SWIGTYPE_p_channel);
  }
  
  result = (ant_t) ((arg1)->ant);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_freq_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  freq_t arg2 ;
  
  SWIG_check_num_args("channel::freq",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::freq",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::freq",2,"freq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_freq_set",1,SWIGTYPE_p_channel);
  }
  
  arg2 = (freq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->freq = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_freq_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  freq_t result;
  
  SWIG_check_num_args("channel::freq",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::freq",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_freq_get",1,SWIGTYPE_p_channel);
  }
  
  result = (freq_t) ((arg1)->freq);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_mode_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  rmode_t arg2 ;
  
  SWIG_check_num_args("channel::mode",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::mode",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::mode",2,"rmode_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_mode_set",1,SWIGTYPE_p_channel);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (rmode_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->mode = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_mode_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  rmode_t result;
  
  SWIG_check_num_args("channel::mode",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::mode",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_mode_get",1,SWIGTYPE_p_channel);
  }
  
  result = (rmode_t) ((arg1)->mode);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_width_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  pbwidth_t arg2 ;
  
  SWIG_check_num_args("channel::width",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::width",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::width",2,"pbwidth_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_width_set",1,SWIGTYPE_p_channel);
  }
  
  arg2 = (pbwidth_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->width = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_width_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  pbwidth_t result;
  
  SWIG_check_num_args("channel::width",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::width",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_width_get",1,SWIGTYPE_p_channel);
  }
  
  result = (pbwidth_t) ((arg1)->width);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_tx_freq_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  freq_t arg2 ;
  
  SWIG_check_num_args("channel::tx_freq",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::tx_freq",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::tx_freq",2,"freq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_tx_freq_set",1,SWIGTYPE_p_channel);
  }
  
  arg2 = (freq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->tx_freq = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_tx_freq_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  freq_t result;
  
  SWIG_check_num_args("channel::tx_freq",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::tx_freq",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_tx_freq_get",1,SWIGTYPE_p_channel);
  }
  
  result = (freq_t) ((arg1)->tx_freq);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_tx_mode_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  rmode_t arg2 ;
  
  SWIG_check_num_args("channel::tx_mode",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::tx_mode",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::tx_mode",2,"rmode_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_tx_mode_set",1,SWIGTYPE_p_channel);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (rmode_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->tx_mode = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_tx_mode_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  rmode_t result;
  
  SWIG_check_num_args("channel::tx_mode",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::tx_mode",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_tx_mode_get",1,SWIGTYPE_p_channel);
  }
  
  result = (rmode_t) ((arg1)->tx_mode);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_tx_width_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  pbwidth_t arg2 ;
  
  SWIG_check_num_args("channel::tx_width",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::tx_width",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::tx_width",2,"pbwidth_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_tx_width_set",1,SWIGTYPE_p_channel);
  }
  
  arg2 = (pbwidth_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->tx_width = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_tx_width_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  pbwidth_t result;
  
  SWIG_check_num_args("channel::tx_width",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::tx_width",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_tx_width_get",1,SWIGTYPE_p_channel);
  }
  
  result = (pbwidth_t) ((arg1)->tx_width);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_split_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  split_t arg2 ;
  
  SWIG_check_num_args("channel::split",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::split",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::split",2,"split_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_split_set",1,SWIGTYPE_p_channel);
  }
  
  arg2 = (split_t)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->split = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_split_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  split_t result;
  
  SWIG_check_num_args("channel::split",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::split",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_split_get",1,SWIGTYPE_p_channel);
  }
  
  result = (split_t) ((arg1)->split);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_tx_vfo_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  vfo_t arg2 ;
  
  SWIG_check_num_args("channel::tx_vfo",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::tx_vfo",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::tx_vfo",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_tx_vfo_set",1,SWIGTYPE_p_channel);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->tx_vfo = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_tx_vfo_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  vfo_t result;
  
  SWIG_check_num_args("channel::tx_vfo",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::tx_vfo",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_tx_vfo_get",1,SWIGTYPE_p_channel);
  }
  
  result = (vfo_t) ((arg1)->tx_vfo);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_rptr_shift_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  rptr_shift_t arg2 ;
  
  SWIG_check_num_args("channel::rptr_shift",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::rptr_shift",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::rptr_shift",2,"rptr_shift_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_rptr_shift_set",1,SWIGTYPE_p_channel);
  }
  
  arg2 = (rptr_shift_t)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->rptr_shift = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_rptr_shift_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  rptr_shift_t result;
  
  SWIG_check_num_args("channel::rptr_shift",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::rptr_shift",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_rptr_shift_get",1,SWIGTYPE_p_channel);
  }
  
  result = (rptr_shift_t) ((arg1)->rptr_shift);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_rptr_offs_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  shortfreq_t arg2 ;
  
  SWIG_check_num_args("channel::rptr_offs",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::rptr_offs",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::rptr_offs",2,"shortfreq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_rptr_offs_set",1,SWIGTYPE_p_channel);
  }
  
  arg2 = (shortfreq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->rptr_offs = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_rptr_offs_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  shortfreq_t result;
  
  SWIG_check_num_args("channel::rptr_offs",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::rptr_offs",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_rptr_offs_get",1,SWIGTYPE_p_channel);
  }
  
  result = (shortfreq_t) ((arg1)->rptr_offs);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_tuning_step_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  shortfreq_t arg2 ;
  
  SWIG_check_num_args("channel::tuning_step",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::tuning_step",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::tuning_step",2,"shortfreq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_tuning_step_set",1,SWIGTYPE_p_channel);
  }
  
  arg2 = (shortfreq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->tuning_step = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_tuning_step_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  shortfreq_t result;
  
  SWIG_check_num_args("channel::tuning_step",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::tuning_step",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_tuning_step_get",1,SWIGTYPE_p_channel);
  }
  
  result = (shortfreq_t) ((arg1)->tuning_step);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_rit_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  shortfreq_t arg2 ;
  
  SWIG_check_num_args("channel::rit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::rit",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::rit",2,"shortfreq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_rit_set",1,SWIGTYPE_p_channel);
  }
  
  arg2 = (shortfreq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->rit = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_rit_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  shortfreq_t result;
  
  SWIG_check_num_args("channel::rit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::rit",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_rit_get",1,SWIGTYPE_p_channel);
  }
  
  result = (shortfreq_t) ((arg1)->rit);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_xit_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  shortfreq_t arg2 ;
  
  SWIG_check_num_args("channel::xit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::xit",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::xit",2,"shortfreq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_xit_set",1,SWIGTYPE_p_channel);
  }
  
  arg2 = (shortfreq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->xit = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_xit_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  shortfreq_t result;
  
  SWIG_check_num_args("channel::xit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::xit",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_xit_get",1,SWIGTYPE_p_channel);
  }
  
  result = (shortfreq_t) ((arg1)->xit);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_funcs_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("channel::funcs",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::funcs",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::funcs",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_funcs_set",1,SWIGTYPE_p_channel);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->funcs = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_funcs_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("channel::funcs",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::funcs",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_funcs_get",1,SWIGTYPE_p_channel);
  }
  
  result = (setting_t) ((arg1)->funcs);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_levels_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  value_t *arg2 = (value_t *)0 ;
  
  SWIG_check_num_args("channel::levels",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::levels",1,"struct channel *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("channel::levels",2,"value_t [64]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_levels_set",1,SWIGTYPE_p_channel);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("channel_levels_set",2,SWIGTYPE_p_value_t);
  }
  
  {
    size_t ii;
    value_t *b = (value_t *) arg1->levels;
    for (ii = 0; ii < (size_t)64; ii++) b[ii] = *((value_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_levels_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  value_t *result = 0 ;
  
  SWIG_check_num_args("channel::levels",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::levels",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_levels_get",1,SWIGTYPE_p_channel);
  }
  
  result = (value_t *)(value_t *) ((arg1)->levels);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_value_t,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_ctcss_tone_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  tone_t arg2 ;
  
  SWIG_check_num_args("channel::ctcss_tone",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::ctcss_tone",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::ctcss_tone",2,"tone_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_ctcss_tone_set",1,SWIGTYPE_p_channel);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (tone_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->ctcss_tone = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_ctcss_tone_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  tone_t result;
  
  SWIG_check_num_args("channel::ctcss_tone",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::ctcss_tone",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_ctcss_tone_get",1,SWIGTYPE_p_channel);
  }
  
  result = (tone_t) ((arg1)->ctcss_tone);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_ctcss_sql_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  tone_t arg2 ;
  
  SWIG_check_num_args("channel::ctcss_sql",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::ctcss_sql",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::ctcss_sql",2,"tone_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_ctcss_sql_set",1,SWIGTYPE_p_channel);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (tone_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->ctcss_sql = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_ctcss_sql_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  tone_t result;
  
  SWIG_check_num_args("channel::ctcss_sql",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::ctcss_sql",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_ctcss_sql_get",1,SWIGTYPE_p_channel);
  }
  
  result = (tone_t) ((arg1)->ctcss_sql);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_dcs_code_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  tone_t arg2 ;
  
  SWIG_check_num_args("channel::dcs_code",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::dcs_code",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::dcs_code",2,"tone_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_dcs_code_set",1,SWIGTYPE_p_channel);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (tone_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->dcs_code = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_dcs_code_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  tone_t result;
  
  SWIG_check_num_args("channel::dcs_code",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::dcs_code",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_dcs_code_get",1,SWIGTYPE_p_channel);
  }
  
  result = (tone_t) ((arg1)->dcs_code);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_dcs_sql_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  tone_t arg2 ;
  
  SWIG_check_num_args("channel::dcs_sql",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::dcs_sql",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::dcs_sql",2,"tone_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_dcs_sql_set",1,SWIGTYPE_p_channel);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (tone_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->dcs_sql = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_dcs_sql_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  tone_t result;
  
  SWIG_check_num_args("channel::dcs_sql",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::dcs_sql",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_dcs_sql_get",1,SWIGTYPE_p_channel);
  }
  
  result = (tone_t) ((arg1)->dcs_sql);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_scan_group_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("channel::scan_group",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::scan_group",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::scan_group",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_scan_group_set",1,SWIGTYPE_p_channel);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->scan_group = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_scan_group_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("channel::scan_group",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::scan_group",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_scan_group_get",1,SWIGTYPE_p_channel);
  }
  
  result = (int) ((arg1)->scan_group);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_flags_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel::flags",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::flags",1,"struct channel *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel::flags",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_flags_set",1,SWIGTYPE_p_channel);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->flags = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_flags_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel::flags",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::flags",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_flags_get",1,SWIGTYPE_p_channel);
  }
  
  result = (unsigned int) ((arg1)->flags);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_channel_desc_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  char *arg2 = (char *)0 ;
  
  SWIG_check_num_args("channel::channel_desc",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::channel_desc",1,"struct channel *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("channel::channel_desc",2,"char [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_channel_desc_set",1,SWIGTYPE_p_channel);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    if(arg2) {
      strncpy((char*)arg1->channel_desc, (const char *)arg2, 30-1);
      arg1->channel_desc[30-1] = 0;
    } else {
      arg1->channel_desc[0] = 0;
    }
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_channel_desc_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("channel::channel_desc",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::channel_desc",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_channel_desc_get",1,SWIGTYPE_p_channel);
  }
  
  result = (char *)(char *) ((arg1)->channel_desc);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_ext_levels_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  struct ext_list *arg2 = 0 ;
  
  SWIG_check_num_args("channel::ext_levels",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::ext_levels",1,"struct channel *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("channel::ext_levels",2,"struct ext_list *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_ext_levels_set",1,SWIGTYPE_p_channel);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_ext_list,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("channel_ext_levels_set",2,SWIGTYPE_p_ext_list);
  }
  
  if (arg1) (arg1)->ext_levels = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_ext_levels_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  struct ext_list *result = 0 ;
  
  SWIG_check_num_args("channel::ext_levels",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::ext_levels",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_ext_levels_get",1,SWIGTYPE_p_channel);
  }
  
  result = (struct ext_list *) ((arg1)->ext_levels);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ext_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_tag_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  char *arg2 = (char *)0 ;
  
  SWIG_check_num_args("channel::tag",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::tag",1,"struct channel *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("channel::tag",2,"char [32]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_tag_set",1,SWIGTYPE_p_channel);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    if(arg2) {
      strncpy((char*)arg1->tag, (const char *)arg2, 32-1);
      arg1->tag[32-1] = 0;
    } else {
      arg1->tag[0] = 0;
    }
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_tag_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("channel::tag",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel::tag",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channel_tag_get",1,SWIGTYPE_p_channel);
  }
  
  result = (char *)(char *) ((arg1)->tag);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_channel(lua_State* L) {
  int SWIG_arg = 0;
  vfo_t arg1 = (1u << (29)) ;
  int arg2 = 0 ;
  struct channel *result = 0 ;
  
  SWIG_check_num_args("channel::channel",0,2)
  if(lua_gettop(L)>=1 && !lua_isnumber(L,1)) SWIG_fail_arg("channel::channel",1,"vfo_t");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("channel::channel",2,"int");
  if(lua_gettop(L)>=1){
    SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative");
    arg1 = (vfo_t)lua_tonumber(L, 1);
  }
  if(lua_gettop(L)>=2){
    arg2 = (int)lua_tonumber(L, 2);
  }
  result = (struct channel *)new_channel(arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_channel,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_channel(void *obj) {
struct channel *arg1 = (struct channel *) obj;
delete_channel(arg1);
}
static int _proxy__wrap_new_channel(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_channel);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_channel_attributes[] = {
    { "channel_num", _wrap_channel_channel_num_get, _wrap_channel_channel_num_set },
    { "bank_num", _wrap_channel_bank_num_get, _wrap_channel_bank_num_set },
    { "vfo", _wrap_channel_vfo_get, _wrap_channel_vfo_set },
    { "ant", _wrap_channel_ant_get, _wrap_channel_ant_set },
    { "freq", _wrap_channel_freq_get, _wrap_channel_freq_set },
    { "mode", _wrap_channel_mode_get, _wrap_channel_mode_set },
    { "width", _wrap_channel_width_get, _wrap_channel_width_set },
    { "tx_freq", _wrap_channel_tx_freq_get, _wrap_channel_tx_freq_set },
    { "tx_mode", _wrap_channel_tx_mode_get, _wrap_channel_tx_mode_set },
    { "tx_width", _wrap_channel_tx_width_get, _wrap_channel_tx_width_set },
    { "split", _wrap_channel_split_get, _wrap_channel_split_set },
    { "tx_vfo", _wrap_channel_tx_vfo_get, _wrap_channel_tx_vfo_set },
    { "rptr_shift", _wrap_channel_rptr_shift_get, _wrap_channel_rptr_shift_set },
    { "rptr_offs", _wrap_channel_rptr_offs_get, _wrap_channel_rptr_offs_set },
    { "tuning_step", _wrap_channel_tuning_step_get, _wrap_channel_tuning_step_set },
    { "rit", _wrap_channel_rit_get, _wrap_channel_rit_set },
    { "xit", _wrap_channel_xit_get, _wrap_channel_xit_set },
    { "funcs", _wrap_channel_funcs_get, _wrap_channel_funcs_set },
    { "levels", _wrap_channel_levels_get, _wrap_channel_levels_set },
    { "ctcss_tone", _wrap_channel_ctcss_tone_get, _wrap_channel_ctcss_tone_set },
    { "ctcss_sql", _wrap_channel_ctcss_sql_get, _wrap_channel_ctcss_sql_set },
    { "dcs_code", _wrap_channel_dcs_code_get, _wrap_channel_dcs_code_set },
    { "dcs_sql", _wrap_channel_dcs_sql_get, _wrap_channel_dcs_sql_set },
    { "scan_group", _wrap_channel_scan_group_get, _wrap_channel_scan_group_set },
    { "flags", _wrap_channel_flags_get, _wrap_channel_flags_set },
    { "channel_desc", _wrap_channel_channel_desc_get, _wrap_channel_channel_desc_set },
    { "ext_levels", _wrap_channel_ext_levels_get, _wrap_channel_ext_levels_set },
    { "tag", _wrap_channel_tag_get, _wrap_channel_tag_set },
    {0,0,0}
};
static swig_lua_method swig_channel_methods[]= {
    {0,0}
};
static swig_lua_method swig_channel_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_channel_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_channel_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_channel_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_channel_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_channel_Sf_SwigStatic = {
    "channel",
    swig_channel_Sf_SwigStatic_methods,
    swig_channel_Sf_SwigStatic_attributes,
    swig_channel_Sf_SwigStatic_constants,
    swig_channel_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_channel_bases[] = {0};
static const char *swig_channel_base_names[] = {0};
static swig_lua_class _wrap_class_channel = { "channel", "channel", &SWIGTYPE_p_channel,_proxy__wrap_new_channel, swig_delete_channel, swig_channel_methods, swig_channel_attributes, &swig_channel_Sf_SwigStatic, swig_channel_meta, swig_channel_bases, swig_channel_base_names };

static int _wrap_channel_cap_bank_num_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::bank_num",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::bank_num",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::bank_num",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_bank_num_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->bank_num = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_bank_num_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::bank_num",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::bank_num",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_bank_num_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->bank_num);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_vfo_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::vfo",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::vfo",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::vfo",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_vfo_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->vfo = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_vfo_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::vfo",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::vfo",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_vfo_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->vfo);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_ant_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::ant",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::ant",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::ant",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_ant_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->ant = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_ant_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::ant",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::ant",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_ant_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->ant);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_freq_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::freq",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::freq",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::freq",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_freq_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->freq = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_freq_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::freq",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::freq",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_freq_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->freq);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_mode_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::mode",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::mode",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::mode",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_mode_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->mode = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_mode_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::mode",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::mode",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_mode_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->mode);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_width_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::width",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::width",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::width",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_width_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->width = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_width_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::width",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::width",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_width_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->width);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_tx_freq_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::tx_freq",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::tx_freq",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::tx_freq",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_tx_freq_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->tx_freq = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_tx_freq_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::tx_freq",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::tx_freq",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_tx_freq_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->tx_freq);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_tx_mode_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::tx_mode",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::tx_mode",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::tx_mode",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_tx_mode_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->tx_mode = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_tx_mode_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::tx_mode",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::tx_mode",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_tx_mode_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->tx_mode);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_tx_width_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::tx_width",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::tx_width",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::tx_width",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_tx_width_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->tx_width = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_tx_width_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::tx_width",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::tx_width",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_tx_width_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->tx_width);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_split_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::split",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::split",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::split",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_split_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->split = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_split_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::split",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::split",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_split_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->split);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_tx_vfo_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::tx_vfo",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::tx_vfo",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::tx_vfo",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_tx_vfo_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->tx_vfo = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_tx_vfo_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::tx_vfo",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::tx_vfo",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_tx_vfo_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->tx_vfo);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_rptr_shift_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::rptr_shift",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::rptr_shift",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::rptr_shift",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_rptr_shift_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->rptr_shift = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_rptr_shift_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::rptr_shift",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::rptr_shift",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_rptr_shift_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->rptr_shift);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_rptr_offs_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::rptr_offs",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::rptr_offs",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::rptr_offs",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_rptr_offs_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->rptr_offs = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_rptr_offs_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::rptr_offs",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::rptr_offs",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_rptr_offs_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->rptr_offs);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_tuning_step_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::tuning_step",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::tuning_step",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::tuning_step",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_tuning_step_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->tuning_step = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_tuning_step_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::tuning_step",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::tuning_step",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_tuning_step_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->tuning_step);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_rit_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::rit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::rit",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::rit",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_rit_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->rit = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_rit_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::rit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::rit",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_rit_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->rit);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_xit_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::xit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::xit",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::xit",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_xit_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->xit = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_xit_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::xit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::xit",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_xit_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->xit);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_funcs_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("channel_cap::funcs",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::funcs",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::funcs",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_funcs_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->funcs = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_funcs_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("channel_cap::funcs",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::funcs",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_funcs_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (setting_t) ((arg1)->funcs);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_levels_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("channel_cap::levels",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::levels",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::levels",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_levels_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->levels = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_levels_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("channel_cap::levels",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::levels",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_levels_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (setting_t) ((arg1)->levels);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_ctcss_tone_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::ctcss_tone",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::ctcss_tone",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::ctcss_tone",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_ctcss_tone_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->ctcss_tone = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_ctcss_tone_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::ctcss_tone",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::ctcss_tone",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_ctcss_tone_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->ctcss_tone);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_ctcss_sql_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::ctcss_sql",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::ctcss_sql",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::ctcss_sql",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_ctcss_sql_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->ctcss_sql = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_ctcss_sql_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::ctcss_sql",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::ctcss_sql",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_ctcss_sql_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->ctcss_sql);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_dcs_code_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::dcs_code",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::dcs_code",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::dcs_code",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_dcs_code_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->dcs_code = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_dcs_code_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::dcs_code",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::dcs_code",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_dcs_code_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->dcs_code);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_dcs_sql_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::dcs_sql",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::dcs_sql",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::dcs_sql",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_dcs_sql_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->dcs_sql = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_dcs_sql_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::dcs_sql",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::dcs_sql",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_dcs_sql_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->dcs_sql);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_scan_group_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::scan_group",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::scan_group",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::scan_group",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_scan_group_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->scan_group = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_scan_group_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::scan_group",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::scan_group",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_scan_group_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->scan_group);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_flags_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::flags",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::flags",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::flags",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_flags_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->flags = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_flags_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::flags",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::flags",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_flags_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->flags);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_channel_desc_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::channel_desc",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::channel_desc",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::channel_desc",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_channel_desc_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->channel_desc = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_channel_desc_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::channel_desc",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::channel_desc",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_channel_desc_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->channel_desc);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_ext_levels_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::ext_levels",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::ext_levels",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::ext_levels",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_ext_levels_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->ext_levels = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_ext_levels_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::ext_levels",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::ext_levels",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_ext_levels_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->ext_levels);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_tag_set(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("channel_cap::tag",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::tag",1,"struct channel_cap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channel_cap::tag",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_tag_set",1,SWIGTYPE_p_channel_cap);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->tag = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channel_cap_tag_get(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("channel_cap::tag",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel_cap::tag",1,"struct channel_cap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("channel_cap_tag_get",1,SWIGTYPE_p_channel_cap);
  }
  
  result = (unsigned int) ((arg1)->tag);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_channel_cap(lua_State* L) {
  int SWIG_arg = 0;
  struct channel_cap *result = 0 ;
  
  SWIG_check_num_args("channel_cap::channel_cap",0,0)
  result = (struct channel_cap *)calloc(1, sizeof(struct channel_cap));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_channel_cap,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_channel_cap(void *obj) {
struct channel_cap *arg1 = (struct channel_cap *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_channel_cap(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_channel_cap);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_channel_cap_attributes[] = {
    { "bank_num", _wrap_channel_cap_bank_num_get, _wrap_channel_cap_bank_num_set },
    { "vfo", _wrap_channel_cap_vfo_get, _wrap_channel_cap_vfo_set },
    { "ant", _wrap_channel_cap_ant_get, _wrap_channel_cap_ant_set },
    { "freq", _wrap_channel_cap_freq_get, _wrap_channel_cap_freq_set },
    { "mode", _wrap_channel_cap_mode_get, _wrap_channel_cap_mode_set },
    { "width", _wrap_channel_cap_width_get, _wrap_channel_cap_width_set },
    { "tx_freq", _wrap_channel_cap_tx_freq_get, _wrap_channel_cap_tx_freq_set },
    { "tx_mode", _wrap_channel_cap_tx_mode_get, _wrap_channel_cap_tx_mode_set },
    { "tx_width", _wrap_channel_cap_tx_width_get, _wrap_channel_cap_tx_width_set },
    { "split", _wrap_channel_cap_split_get, _wrap_channel_cap_split_set },
    { "tx_vfo", _wrap_channel_cap_tx_vfo_get, _wrap_channel_cap_tx_vfo_set },
    { "rptr_shift", _wrap_channel_cap_rptr_shift_get, _wrap_channel_cap_rptr_shift_set },
    { "rptr_offs", _wrap_channel_cap_rptr_offs_get, _wrap_channel_cap_rptr_offs_set },
    { "tuning_step", _wrap_channel_cap_tuning_step_get, _wrap_channel_cap_tuning_step_set },
    { "rit", _wrap_channel_cap_rit_get, _wrap_channel_cap_rit_set },
    { "xit", _wrap_channel_cap_xit_get, _wrap_channel_cap_xit_set },
    { "funcs", _wrap_channel_cap_funcs_get, _wrap_channel_cap_funcs_set },
    { "levels", _wrap_channel_cap_levels_get, _wrap_channel_cap_levels_set },
    { "ctcss_tone", _wrap_channel_cap_ctcss_tone_get, _wrap_channel_cap_ctcss_tone_set },
    { "ctcss_sql", _wrap_channel_cap_ctcss_sql_get, _wrap_channel_cap_ctcss_sql_set },
    { "dcs_code", _wrap_channel_cap_dcs_code_get, _wrap_channel_cap_dcs_code_set },
    { "dcs_sql", _wrap_channel_cap_dcs_sql_get, _wrap_channel_cap_dcs_sql_set },
    { "scan_group", _wrap_channel_cap_scan_group_get, _wrap_channel_cap_scan_group_set },
    { "flags", _wrap_channel_cap_flags_get, _wrap_channel_cap_flags_set },
    { "channel_desc", _wrap_channel_cap_channel_desc_get, _wrap_channel_cap_channel_desc_set },
    { "ext_levels", _wrap_channel_cap_ext_levels_get, _wrap_channel_cap_ext_levels_set },
    { "tag", _wrap_channel_cap_tag_get, _wrap_channel_cap_tag_set },
    {0,0,0}
};
static swig_lua_method swig_channel_cap_methods[]= {
    {0,0}
};
static swig_lua_method swig_channel_cap_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_channel_cap_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_channel_cap_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_channel_cap_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_channel_cap_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_channel_cap_SwigStatic = {
    "channel_cap",
    swig_channel_cap_SwigStatic_methods,
    swig_channel_cap_SwigStatic_attributes,
    swig_channel_cap_SwigStatic_constants,
    swig_channel_cap_SwigStatic_classes,
    0
};
static swig_lua_class *swig_channel_cap_bases[] = {0};
static const char *swig_channel_cap_base_names[] = {0};
static swig_lua_class _wrap_class_channel_cap = { "channel_cap", "channel_cap", &SWIGTYPE_p_channel_cap,_proxy__wrap_new_channel_cap, swig_delete_channel_cap, swig_channel_cap_methods, swig_channel_cap_attributes, &swig_channel_cap_SwigStatic, swig_channel_cap_meta, swig_channel_cap_bases, swig_channel_cap_base_names };

static int _wrap_chan_list_startc_set(lua_State* L) {
  int SWIG_arg = 0;
  struct chan_list *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("chan_list::startc",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("chan_list::startc",1,"struct chan_list *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("chan_list::startc",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_chan_list,0))){
    SWIG_fail_ptr("chan_list_startc_set",1,SWIGTYPE_p_chan_list);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->startc = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_chan_list_startc_get(lua_State* L) {
  int SWIG_arg = 0;
  struct chan_list *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("chan_list::startc",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("chan_list::startc",1,"struct chan_list *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_chan_list,0))){
    SWIG_fail_ptr("chan_list_startc_get",1,SWIGTYPE_p_chan_list);
  }
  
  result = (int) ((arg1)->startc);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_chan_list_endc_set(lua_State* L) {
  int SWIG_arg = 0;
  struct chan_list *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("chan_list::endc",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("chan_list::endc",1,"struct chan_list *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("chan_list::endc",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_chan_list,0))){
    SWIG_fail_ptr("chan_list_endc_set",1,SWIGTYPE_p_chan_list);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->endc = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_chan_list_endc_get(lua_State* L) {
  int SWIG_arg = 0;
  struct chan_list *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("chan_list::endc",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("chan_list::endc",1,"struct chan_list *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_chan_list,0))){
    SWIG_fail_ptr("chan_list_endc_get",1,SWIGTYPE_p_chan_list);
  }
  
  result = (int) ((arg1)->endc);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_chan_list_type_set(lua_State* L) {
  int SWIG_arg = 0;
  struct chan_list *arg1 = 0 ;
  chan_type_t arg2 ;
  
  SWIG_check_num_args("chan_list::type",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("chan_list::type",1,"struct chan_list *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("chan_list::type",2,"chan_type_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_chan_list,0))){
    SWIG_fail_ptr("chan_list_type_set",1,SWIGTYPE_p_chan_list);
  }
  
  arg2 = (chan_type_t)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->type = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_chan_list_type_get(lua_State* L) {
  int SWIG_arg = 0;
  struct chan_list *arg1 = 0 ;
  chan_type_t result;
  
  SWIG_check_num_args("chan_list::type",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("chan_list::type",1,"struct chan_list *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_chan_list,0))){
    SWIG_fail_ptr("chan_list_type_get",1,SWIGTYPE_p_chan_list);
  }
  
  result = (chan_type_t) ((arg1)->type);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_chan_list_mem_caps_set(lua_State* L) {
  int SWIG_arg = 0;
  struct chan_list *arg1 = 0 ;
  channel_cap_t *arg2 = 0 ;
  
  SWIG_check_num_args("chan_list::mem_caps",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("chan_list::mem_caps",1,"struct chan_list *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("chan_list::mem_caps",2,"channel_cap_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_chan_list,0))){
    SWIG_fail_ptr("chan_list_mem_caps_set",1,SWIGTYPE_p_chan_list);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_channel_cap,0))){
    SWIG_fail_ptr("chan_list_mem_caps_set",2,SWIGTYPE_p_channel_cap);
  }
  
  if (arg1) (arg1)->mem_caps = *arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_chan_list_mem_caps_get(lua_State* L) {
  int SWIG_arg = 0;
  struct chan_list *arg1 = 0 ;
  channel_cap_t *result = 0 ;
  
  SWIG_check_num_args("chan_list::mem_caps",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("chan_list::mem_caps",1,"struct chan_list *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_chan_list,0))){
    SWIG_fail_ptr("chan_list_mem_caps_get",1,SWIGTYPE_p_chan_list);
  }
  
  result = (channel_cap_t *)& ((arg1)->mem_caps);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_channel_cap,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_chan_list(lua_State* L) {
  int SWIG_arg = 0;
  struct chan_list *result = 0 ;
  
  SWIG_check_num_args("chan_list::chan_list",0,0)
  result = (struct chan_list *)calloc(1, sizeof(struct chan_list));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_chan_list,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_chan_list(void *obj) {
struct chan_list *arg1 = (struct chan_list *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_chan_list(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_chan_list);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_chan_list_attributes[] = {
    { "startc", _wrap_chan_list_startc_get, _wrap_chan_list_startc_set },
    { "endc", _wrap_chan_list_endc_get, _wrap_chan_list_endc_set },
    { "type", _wrap_chan_list_type_get, _wrap_chan_list_type_set },
    { "mem_caps", _wrap_chan_list_mem_caps_get, _wrap_chan_list_mem_caps_set },
    {0,0,0}
};
static swig_lua_method swig_chan_list_methods[]= {
    {0,0}
};
static swig_lua_method swig_chan_list_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_chan_list_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_chan_list_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_chan_list_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_chan_list_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_chan_list_Sf_SwigStatic = {
    "chan_list",
    swig_chan_list_Sf_SwigStatic_methods,
    swig_chan_list_Sf_SwigStatic_attributes,
    swig_chan_list_Sf_SwigStatic_constants,
    swig_chan_list_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_chan_list_bases[] = {0};
static const char *swig_chan_list_base_names[] = {0};
static swig_lua_class _wrap_class_chan_list = { "chan_list", "chan_list", &SWIGTYPE_p_chan_list,_proxy__wrap_new_chan_list, swig_delete_chan_list, swig_chan_list_methods, swig_chan_list_attributes, &swig_chan_list_Sf_SwigStatic, swig_chan_list_meta, swig_chan_list_bases, swig_chan_list_base_names };

static int _wrap_gran_min_set(lua_State* L) {
  int SWIG_arg = 0;
  struct gran *arg1 = 0 ;
  value_t *arg2 = 0 ;
  
  SWIG_check_num_args("gran::min",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("gran::min",1,"struct gran *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("gran::min",2,"value_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_gran,0))){
    SWIG_fail_ptr("gran_min_set",1,SWIGTYPE_p_gran);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("gran_min_set",2,SWIGTYPE_p_value_t);
  }
  
  if (arg1) (arg1)->min = *arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_gran_min_get(lua_State* L) {
  int SWIG_arg = 0;
  struct gran *arg1 = 0 ;
  value_t *result = 0 ;
  
  SWIG_check_num_args("gran::min",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("gran::min",1,"struct gran *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_gran,0))){
    SWIG_fail_ptr("gran_min_get",1,SWIGTYPE_p_gran);
  }
  
  result = (value_t *)& ((arg1)->min);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_value_t,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_gran_max_set(lua_State* L) {
  int SWIG_arg = 0;
  struct gran *arg1 = 0 ;
  value_t *arg2 = 0 ;
  
  SWIG_check_num_args("gran::max",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("gran::max",1,"struct gran *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("gran::max",2,"value_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_gran,0))){
    SWIG_fail_ptr("gran_max_set",1,SWIGTYPE_p_gran);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("gran_max_set",2,SWIGTYPE_p_value_t);
  }
  
  if (arg1) (arg1)->max = *arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_gran_max_get(lua_State* L) {
  int SWIG_arg = 0;
  struct gran *arg1 = 0 ;
  value_t *result = 0 ;
  
  SWIG_check_num_args("gran::max",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("gran::max",1,"struct gran *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_gran,0))){
    SWIG_fail_ptr("gran_max_get",1,SWIGTYPE_p_gran);
  }
  
  result = (value_t *)& ((arg1)->max);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_value_t,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_gran_step_set(lua_State* L) {
  int SWIG_arg = 0;
  struct gran *arg1 = 0 ;
  value_t *arg2 = 0 ;
  
  SWIG_check_num_args("gran::step",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("gran::step",1,"struct gran *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("gran::step",2,"value_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_gran,0))){
    SWIG_fail_ptr("gran_step_set",1,SWIGTYPE_p_gran);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("gran_step_set",2,SWIGTYPE_p_value_t);
  }
  
  if (arg1) (arg1)->step = *arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_gran_step_get(lua_State* L) {
  int SWIG_arg = 0;
  struct gran *arg1 = 0 ;
  value_t *result = 0 ;
  
  SWIG_check_num_args("gran::step",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("gran::step",1,"struct gran *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_gran,0))){
    SWIG_fail_ptr("gran_step_get",1,SWIGTYPE_p_gran);
  }
  
  result = (value_t *)& ((arg1)->step);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_value_t,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_gran(lua_State* L) {
  int SWIG_arg = 0;
  struct gran *result = 0 ;
  
  SWIG_check_num_args("gran::gran",0,0)
  result = (struct gran *)calloc(1, sizeof(struct gran));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_gran,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_gran(void *obj) {
struct gran *arg1 = (struct gran *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_gran(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_gran);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_gran_attributes[] = {
    { "min", _wrap_gran_min_get, _wrap_gran_min_set },
    { "max", _wrap_gran_max_get, _wrap_gran_max_set },
    { "step", _wrap_gran_step_get, _wrap_gran_step_set },
    {0,0,0}
};
static swig_lua_method swig_gran_methods[]= {
    {0,0}
};
static swig_lua_method swig_gran_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_gran_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_gran_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_gran_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_gran_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_gran_Sf_SwigStatic = {
    "gran",
    swig_gran_Sf_SwigStatic_methods,
    swig_gran_Sf_SwigStatic_attributes,
    swig_gran_Sf_SwigStatic_constants,
    swig_gran_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_gran_bases[] = {0};
static const char *swig_gran_base_names[] = {0};
static swig_lua_class _wrap_class_gran = { "gran", "gran", &SWIGTYPE_p_gran,_proxy__wrap_new_gran, swig_delete_gran, swig_gran_methods, swig_gran_attributes, &swig_gran_Sf_SwigStatic, swig_gran_meta, swig_gran_bases, swig_gran_base_names };

static int _wrap_cal_table_size_set(lua_State* L) {
  int SWIG_arg = 0;
  struct cal_table *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("cal_table::size",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cal_table::size",1,"struct cal_table *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("cal_table::size",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_cal_table,0))){
    SWIG_fail_ptr("cal_table_size_set",1,SWIGTYPE_p_cal_table);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->size = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_cal_table_size_get(lua_State* L) {
  int SWIG_arg = 0;
  struct cal_table *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("cal_table::size",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cal_table::size",1,"struct cal_table *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_cal_table,0))){
    SWIG_fail_ptr("cal_table_size_get",1,SWIGTYPE_p_cal_table);
  }
  
  result = (int) ((arg1)->size);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_cal_table_table_get(lua_State* L) {
  int SWIG_arg = 0;
  struct cal_table *arg1 = 0 ;
  cal_table_table *result = 0 ;
  
  SWIG_check_num_args("cal_table::table",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cal_table::table",1,"struct cal_table *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_cal_table,0))){
    SWIG_fail_ptr("cal_table_table_get",1,SWIGTYPE_p_cal_table);
  }
  
  result = (cal_table_table *)(cal_table_table *) ((arg1)->table);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_cal_table_table,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_cal_table(lua_State* L) {
  int SWIG_arg = 0;
  struct cal_table *result = 0 ;
  
  SWIG_check_num_args("cal_table::cal_table",0,0)
  result = (struct cal_table *)calloc(1, sizeof(struct cal_table));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_cal_table,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_cal_table(void *obj) {
struct cal_table *arg1 = (struct cal_table *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_cal_table(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_cal_table);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_cal_table_attributes[] = {
    { "size", _wrap_cal_table_size_get, _wrap_cal_table_size_set },
    { "table", _wrap_cal_table_table_get, SWIG_Lua_set_immutable },
    {0,0,0}
};
static swig_lua_method swig_cal_table_methods[]= {
    {0,0}
};
static swig_lua_method swig_cal_table_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_cal_table_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_cal_table_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_cal_table_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_cal_table_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_cal_table_Sf_SwigStatic = {
    "cal_table",
    swig_cal_table_Sf_SwigStatic_methods,
    swig_cal_table_Sf_SwigStatic_attributes,
    swig_cal_table_Sf_SwigStatic_constants,
    swig_cal_table_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_cal_table_bases[] = {0};
static const char *swig_cal_table_base_names[] = {0};
static swig_lua_class _wrap_class_cal_table = { "cal_table", "cal_table", &SWIGTYPE_p_cal_table,_proxy__wrap_new_cal_table, swig_delete_cal_table, swig_cal_table_methods, swig_cal_table_attributes, &swig_cal_table_Sf_SwigStatic, swig_cal_table_meta, swig_cal_table_bases, swig_cal_table_base_names };

static int _wrap_cal_table_table_raw_set(lua_State* L) {
  int SWIG_arg = 0;
  cal_table_table *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("cal_table::cal_table_table::raw",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cal_table::cal_table_table::raw",1,"cal_table_table *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("cal_table::cal_table_table::raw",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_cal_table_table,0))){
    SWIG_fail_ptr("cal_table_table_raw_set",1,SWIGTYPE_p_cal_table_table);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->raw = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_cal_table_table_raw_get(lua_State* L) {
  int SWIG_arg = 0;
  cal_table_table *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("cal_table::cal_table_table::raw",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cal_table::cal_table_table::raw",1,"cal_table_table *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_cal_table_table,0))){
    SWIG_fail_ptr("cal_table_table_raw_get",1,SWIGTYPE_p_cal_table_table);
  }
  
  result = (int) ((arg1)->raw);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_cal_table_table_val_set(lua_State* L) {
  int SWIG_arg = 0;
  cal_table_table *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("cal_table::cal_table_table::val",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cal_table::cal_table_table::val",1,"cal_table_table *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("cal_table::cal_table_table::val",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_cal_table_table,0))){
    SWIG_fail_ptr("cal_table_table_val_set",1,SWIGTYPE_p_cal_table_table);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->val = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_cal_table_table_val_get(lua_State* L) {
  int SWIG_arg = 0;
  cal_table_table *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("cal_table::cal_table_table::val",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cal_table::cal_table_table::val",1,"cal_table_table *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_cal_table_table,0))){
    SWIG_fail_ptr("cal_table_table_val_get",1,SWIGTYPE_p_cal_table_table);
  }
  
  result = (int) ((arg1)->val);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_cal_table_table(lua_State* L) {
  int SWIG_arg = 0;
  cal_table_table *result = 0 ;
  
  SWIG_check_num_args("cal_table::cal_table_table::cal_table_table",0,0)
  result = (cal_table_table *)calloc(1, sizeof(cal_table_table));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_cal_table_table,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_cal_table_table(void *obj) {
cal_table_table *arg1 = (cal_table_table *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_cal_table_table(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_cal_table_table);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_cal_table_table_attributes[] = {
    { "raw", _wrap_cal_table_table_raw_get, _wrap_cal_table_table_raw_set },
    { "val", _wrap_cal_table_table_val_get, _wrap_cal_table_table_val_set },
    {0,0,0}
};
static swig_lua_method swig_cal_table_table_methods[]= {
    {0,0}
};
static swig_lua_method swig_cal_table_table_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_cal_table_table_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_cal_table_table_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_cal_table_table_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_cal_table_table_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_cal_table_table_Sf_SwigStatic = {
    "cal_table_table",
    swig_cal_table_table_Sf_SwigStatic_methods,
    swig_cal_table_table_Sf_SwigStatic_attributes,
    swig_cal_table_table_Sf_SwigStatic_constants,
    swig_cal_table_table_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_cal_table_table_bases[] = {0};
static const char *swig_cal_table_table_base_names[] = {0};
static swig_lua_class _wrap_class_cal_table_table = { "cal_table_table", "cal_table_table", &SWIGTYPE_p_cal_table_table,_proxy__wrap_new_cal_table_table, swig_delete_cal_table_table, swig_cal_table_table_methods, swig_cal_table_table_attributes, &swig_cal_table_table_Sf_SwigStatic, swig_cal_table_table_meta, swig_cal_table_table_bases, swig_cal_table_table_base_names };

static int _wrap_cal_table_float_size_set(lua_State* L) {
  int SWIG_arg = 0;
  struct cal_table_float *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("cal_table_float::size",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cal_table_float::size",1,"struct cal_table_float *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("cal_table_float::size",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_cal_table_float,0))){
    SWIG_fail_ptr("cal_table_float_size_set",1,SWIGTYPE_p_cal_table_float);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->size = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_cal_table_float_size_get(lua_State* L) {
  int SWIG_arg = 0;
  struct cal_table_float *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("cal_table_float::size",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cal_table_float::size",1,"struct cal_table_float *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_cal_table_float,0))){
    SWIG_fail_ptr("cal_table_float_size_get",1,SWIGTYPE_p_cal_table_float);
  }
  
  result = (int) ((arg1)->size);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_cal_table_float_table_get(lua_State* L) {
  int SWIG_arg = 0;
  struct cal_table_float *arg1 = 0 ;
  cal_table_float_table *result = 0 ;
  
  SWIG_check_num_args("cal_table_float::table",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cal_table_float::table",1,"struct cal_table_float *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_cal_table_float,0))){
    SWIG_fail_ptr("cal_table_float_table_get",1,SWIGTYPE_p_cal_table_float);
  }
  
  result = (cal_table_float_table *)(cal_table_float_table *) ((arg1)->table);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_cal_table_float_table,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_cal_table_float(lua_State* L) {
  int SWIG_arg = 0;
  struct cal_table_float *result = 0 ;
  
  SWIG_check_num_args("cal_table_float::cal_table_float",0,0)
  result = (struct cal_table_float *)calloc(1, sizeof(struct cal_table_float));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_cal_table_float,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_cal_table_float(void *obj) {
struct cal_table_float *arg1 = (struct cal_table_float *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_cal_table_float(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_cal_table_float);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_cal_table_float_attributes[] = {
    { "size", _wrap_cal_table_float_size_get, _wrap_cal_table_float_size_set },
    { "table", _wrap_cal_table_float_table_get, SWIG_Lua_set_immutable },
    {0,0,0}
};
static swig_lua_method swig_cal_table_float_methods[]= {
    {0,0}
};
static swig_lua_method swig_cal_table_float_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_cal_table_float_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_cal_table_float_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_cal_table_float_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_cal_table_float_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_cal_table_float_Sf_SwigStatic = {
    "cal_table_float",
    swig_cal_table_float_Sf_SwigStatic_methods,
    swig_cal_table_float_Sf_SwigStatic_attributes,
    swig_cal_table_float_Sf_SwigStatic_constants,
    swig_cal_table_float_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_cal_table_float_bases[] = {0};
static const char *swig_cal_table_float_base_names[] = {0};
static swig_lua_class _wrap_class_cal_table_float = { "cal_table_float", "cal_table_float", &SWIGTYPE_p_cal_table_float,_proxy__wrap_new_cal_table_float, swig_delete_cal_table_float, swig_cal_table_float_methods, swig_cal_table_float_attributes, &swig_cal_table_float_Sf_SwigStatic, swig_cal_table_float_meta, swig_cal_table_float_bases, swig_cal_table_float_base_names };

static int _wrap_cal_table_float_table_raw_set(lua_State* L) {
  int SWIG_arg = 0;
  cal_table_float_table *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("cal_table_float::cal_table_float_table::raw",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cal_table_float::cal_table_float_table::raw",1,"cal_table_float_table *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("cal_table_float::cal_table_float_table::raw",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_cal_table_float_table,0))){
    SWIG_fail_ptr("cal_table_float_table_raw_set",1,SWIGTYPE_p_cal_table_float_table);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->raw = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_cal_table_float_table_raw_get(lua_State* L) {
  int SWIG_arg = 0;
  cal_table_float_table *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("cal_table_float::cal_table_float_table::raw",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cal_table_float::cal_table_float_table::raw",1,"cal_table_float_table *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_cal_table_float_table,0))){
    SWIG_fail_ptr("cal_table_float_table_raw_get",1,SWIGTYPE_p_cal_table_float_table);
  }
  
  result = (int) ((arg1)->raw);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_cal_table_float_table_val_set(lua_State* L) {
  int SWIG_arg = 0;
  cal_table_float_table *arg1 = 0 ;
  float arg2 ;
  
  SWIG_check_num_args("cal_table_float::cal_table_float_table::val",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cal_table_float::cal_table_float_table::val",1,"cal_table_float_table *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("cal_table_float::cal_table_float_table::val",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_cal_table_float_table,0))){
    SWIG_fail_ptr("cal_table_float_table_val_set",1,SWIGTYPE_p_cal_table_float_table);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->val = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_cal_table_float_table_val_get(lua_State* L) {
  int SWIG_arg = 0;
  cal_table_float_table *arg1 = 0 ;
  float result;
  
  SWIG_check_num_args("cal_table_float::cal_table_float_table::val",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cal_table_float::cal_table_float_table::val",1,"cal_table_float_table *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_cal_table_float_table,0))){
    SWIG_fail_ptr("cal_table_float_table_val_get",1,SWIGTYPE_p_cal_table_float_table);
  }
  
  result = (float) ((arg1)->val);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_cal_table_float_table(lua_State* L) {
  int SWIG_arg = 0;
  cal_table_float_table *result = 0 ;
  
  SWIG_check_num_args("cal_table_float::cal_table_float_table::cal_table_float_table",0,0)
  result = (cal_table_float_table *)calloc(1, sizeof(cal_table_float_table));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_cal_table_float_table,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_cal_table_float_table(void *obj) {
cal_table_float_table *arg1 = (cal_table_float_table *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_cal_table_float_table(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_cal_table_float_table);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_cal_table_float_table_attributes[] = {
    { "raw", _wrap_cal_table_float_table_raw_get, _wrap_cal_table_float_table_raw_set },
    { "val", _wrap_cal_table_float_table_val_get, _wrap_cal_table_float_table_val_set },
    {0,0,0}
};
static swig_lua_method swig_cal_table_float_table_methods[]= {
    {0,0}
};
static swig_lua_method swig_cal_table_float_table_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_cal_table_float_table_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_cal_table_float_table_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_cal_table_float_table_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_cal_table_float_table_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_cal_table_float_table_Sf_SwigStatic = {
    "cal_table_float_table",
    swig_cal_table_float_table_Sf_SwigStatic_methods,
    swig_cal_table_float_table_Sf_SwigStatic_attributes,
    swig_cal_table_float_table_Sf_SwigStatic_constants,
    swig_cal_table_float_table_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_cal_table_float_table_bases[] = {0};
static const char *swig_cal_table_float_table_base_names[] = {0};
static swig_lua_class _wrap_class_cal_table_float_table = { "cal_table_float_table", "cal_table_float_table", &SWIGTYPE_p_cal_table_float_table,_proxy__wrap_new_cal_table_float_table, swig_delete_cal_table_float_table, swig_cal_table_float_table_methods, swig_cal_table_float_table_attributes, &swig_cal_table_float_table_Sf_SwigStatic, swig_cal_table_float_table_meta, swig_cal_table_float_table_bases, swig_cal_table_float_table_base_names };

static int _wrap_rig_spectrum_scope_id_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_scope *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_spectrum_scope::id",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_scope::id",1,"struct rig_spectrum_scope *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_spectrum_scope::id",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_scope,0))){
    SWIG_fail_ptr("rig_spectrum_scope_id_set",1,SWIGTYPE_p_rig_spectrum_scope);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->id = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_scope_id_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_scope *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_spectrum_scope::id",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_scope::id",1,"struct rig_spectrum_scope *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_scope,0))){
    SWIG_fail_ptr("rig_spectrum_scope_id_get",1,SWIGTYPE_p_rig_spectrum_scope);
  }
  
  result = (int) ((arg1)->id);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_scope_name_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_scope *arg1 = 0 ;
  char *arg2 = 0 ;
  
  SWIG_check_num_args("rig_spectrum_scope::name",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_scope::name",1,"struct rig_spectrum_scope *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("rig_spectrum_scope::name",2,"char *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_scope,0))){
    SWIG_fail_ptr("rig_spectrum_scope_name_set",1,SWIGTYPE_p_rig_spectrum_scope);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    free(arg1->name);
    if (arg2) {
      arg1->name = (char *) malloc(strlen((const char *)arg2)+1);
      strcpy((char *)arg1->name, (const char *)arg2);
    } else {
      arg1->name = 0;
    }
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_scope_name_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_scope *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_spectrum_scope::name",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_scope::name",1,"struct rig_spectrum_scope *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_scope,0))){
    SWIG_fail_ptr("rig_spectrum_scope_name_get",1,SWIGTYPE_p_rig_spectrum_scope);
  }
  
  result = (char *) ((arg1)->name);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_rig_spectrum_scope(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_scope *result = 0 ;
  
  SWIG_check_num_args("rig_spectrum_scope::rig_spectrum_scope",0,0)
  result = (struct rig_spectrum_scope *)calloc(1, sizeof(struct rig_spectrum_scope));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_rig_spectrum_scope,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_rig_spectrum_scope(void *obj) {
struct rig_spectrum_scope *arg1 = (struct rig_spectrum_scope *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_rig_spectrum_scope(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_rig_spectrum_scope);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_rig_spectrum_scope_attributes[] = {
    { "id", _wrap_rig_spectrum_scope_id_get, _wrap_rig_spectrum_scope_id_set },
    { "name", _wrap_rig_spectrum_scope_name_get, _wrap_rig_spectrum_scope_name_set },
    {0,0,0}
};
static swig_lua_method swig_rig_spectrum_scope_methods[]= {
    {0,0}
};
static swig_lua_method swig_rig_spectrum_scope_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_rig_spectrum_scope_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_rig_spectrum_scope_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_rig_spectrum_scope_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_rig_spectrum_scope_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_rig_spectrum_scope_Sf_SwigStatic = {
    "rig_spectrum_scope",
    swig_rig_spectrum_scope_Sf_SwigStatic_methods,
    swig_rig_spectrum_scope_Sf_SwigStatic_attributes,
    swig_rig_spectrum_scope_Sf_SwigStatic_constants,
    swig_rig_spectrum_scope_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_rig_spectrum_scope_bases[] = {0};
static const char *swig_rig_spectrum_scope_base_names[] = {0};
static swig_lua_class _wrap_class_rig_spectrum_scope = { "rig_spectrum_scope", "rig_spectrum_scope", &SWIGTYPE_p_rig_spectrum_scope,_proxy__wrap_new_rig_spectrum_scope, swig_delete_rig_spectrum_scope, swig_rig_spectrum_scope_methods, swig_rig_spectrum_scope_attributes, &swig_rig_spectrum_scope_Sf_SwigStatic, swig_rig_spectrum_scope_meta, swig_rig_spectrum_scope_bases, swig_rig_spectrum_scope_base_names };

static int _wrap_rig_spectrum_avg_mode_id_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_avg_mode *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_spectrum_avg_mode::id",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_avg_mode::id",1,"struct rig_spectrum_avg_mode *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_spectrum_avg_mode::id",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_avg_mode,0))){
    SWIG_fail_ptr("rig_spectrum_avg_mode_id_set",1,SWIGTYPE_p_rig_spectrum_avg_mode);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->id = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_avg_mode_id_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_avg_mode *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_spectrum_avg_mode::id",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_avg_mode::id",1,"struct rig_spectrum_avg_mode *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_avg_mode,0))){
    SWIG_fail_ptr("rig_spectrum_avg_mode_id_get",1,SWIGTYPE_p_rig_spectrum_avg_mode);
  }
  
  result = (int) ((arg1)->id);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_avg_mode_name_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_avg_mode *arg1 = 0 ;
  char *arg2 = 0 ;
  
  SWIG_check_num_args("rig_spectrum_avg_mode::name",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_avg_mode::name",1,"struct rig_spectrum_avg_mode *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("rig_spectrum_avg_mode::name",2,"char *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_avg_mode,0))){
    SWIG_fail_ptr("rig_spectrum_avg_mode_name_set",1,SWIGTYPE_p_rig_spectrum_avg_mode);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    free(arg1->name);
    if (arg2) {
      arg1->name = (char *) malloc(strlen((const char *)arg2)+1);
      strcpy((char *)arg1->name, (const char *)arg2);
    } else {
      arg1->name = 0;
    }
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_avg_mode_name_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_avg_mode *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_spectrum_avg_mode::name",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_avg_mode::name",1,"struct rig_spectrum_avg_mode *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_avg_mode,0))){
    SWIG_fail_ptr("rig_spectrum_avg_mode_name_get",1,SWIGTYPE_p_rig_spectrum_avg_mode);
  }
  
  result = (char *) ((arg1)->name);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_rig_spectrum_avg_mode(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_avg_mode *result = 0 ;
  
  SWIG_check_num_args("rig_spectrum_avg_mode::rig_spectrum_avg_mode",0,0)
  result = (struct rig_spectrum_avg_mode *)calloc(1, sizeof(struct rig_spectrum_avg_mode));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_rig_spectrum_avg_mode,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_rig_spectrum_avg_mode(void *obj) {
struct rig_spectrum_avg_mode *arg1 = (struct rig_spectrum_avg_mode *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_rig_spectrum_avg_mode(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_rig_spectrum_avg_mode);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_rig_spectrum_avg_mode_attributes[] = {
    { "id", _wrap_rig_spectrum_avg_mode_id_get, _wrap_rig_spectrum_avg_mode_id_set },
    { "name", _wrap_rig_spectrum_avg_mode_name_get, _wrap_rig_spectrum_avg_mode_name_set },
    {0,0,0}
};
static swig_lua_method swig_rig_spectrum_avg_mode_methods[]= {
    {0,0}
};
static swig_lua_method swig_rig_spectrum_avg_mode_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_rig_spectrum_avg_mode_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_rig_spectrum_avg_mode_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_rig_spectrum_avg_mode_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_rig_spectrum_avg_mode_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_rig_spectrum_avg_mode_Sf_SwigStatic = {
    "rig_spectrum_avg_mode",
    swig_rig_spectrum_avg_mode_Sf_SwigStatic_methods,
    swig_rig_spectrum_avg_mode_Sf_SwigStatic_attributes,
    swig_rig_spectrum_avg_mode_Sf_SwigStatic_constants,
    swig_rig_spectrum_avg_mode_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_rig_spectrum_avg_mode_bases[] = {0};
static const char *swig_rig_spectrum_avg_mode_base_names[] = {0};
static swig_lua_class _wrap_class_rig_spectrum_avg_mode = { "rig_spectrum_avg_mode", "rig_spectrum_avg_mode", &SWIGTYPE_p_rig_spectrum_avg_mode,_proxy__wrap_new_rig_spectrum_avg_mode, swig_delete_rig_spectrum_avg_mode, swig_rig_spectrum_avg_mode_methods, swig_rig_spectrum_avg_mode_attributes, &swig_rig_spectrum_avg_mode_Sf_SwigStatic, swig_rig_spectrum_avg_mode_meta, swig_rig_spectrum_avg_mode_bases, swig_rig_spectrum_avg_mode_base_names };

static int _wrap_rig_spectrum_line_id_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_spectrum_line::id",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::id",1,"struct rig_spectrum_line *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_spectrum_line::id",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_id_set",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->id = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_id_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_spectrum_line::id",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::id",1,"struct rig_spectrum_line *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_id_get",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  result = (int) ((arg1)->id);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_data_level_min_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_spectrum_line::data_level_min",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::data_level_min",1,"struct rig_spectrum_line *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_spectrum_line::data_level_min",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_data_level_min_set",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->data_level_min = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_data_level_min_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_spectrum_line::data_level_min",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::data_level_min",1,"struct rig_spectrum_line *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_data_level_min_get",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  result = (int) ((arg1)->data_level_min);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_data_level_max_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_spectrum_line::data_level_max",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::data_level_max",1,"struct rig_spectrum_line *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_spectrum_line::data_level_max",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_data_level_max_set",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->data_level_max = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_data_level_max_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_spectrum_line::data_level_max",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::data_level_max",1,"struct rig_spectrum_line *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_data_level_max_get",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  result = (int) ((arg1)->data_level_max);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_signal_strength_min_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  double arg2 ;
  
  SWIG_check_num_args("rig_spectrum_line::signal_strength_min",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::signal_strength_min",1,"struct rig_spectrum_line *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_spectrum_line::signal_strength_min",2,"double");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_signal_strength_min_set",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  arg2 = (double)lua_tonumber(L, 2);
  if (arg1) (arg1)->signal_strength_min = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_signal_strength_min_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  double result;
  
  SWIG_check_num_args("rig_spectrum_line::signal_strength_min",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::signal_strength_min",1,"struct rig_spectrum_line *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_signal_strength_min_get",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  result = (double) ((arg1)->signal_strength_min);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_signal_strength_max_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  double arg2 ;
  
  SWIG_check_num_args("rig_spectrum_line::signal_strength_max",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::signal_strength_max",1,"struct rig_spectrum_line *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_spectrum_line::signal_strength_max",2,"double");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_signal_strength_max_set",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  arg2 = (double)lua_tonumber(L, 2);
  if (arg1) (arg1)->signal_strength_max = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_signal_strength_max_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  double result;
  
  SWIG_check_num_args("rig_spectrum_line::signal_strength_max",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::signal_strength_max",1,"struct rig_spectrum_line *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_signal_strength_max_get",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  result = (double) ((arg1)->signal_strength_max);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_spectrum_mode_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  enum rig_spectrum_mode_e arg2 ;
  
  SWIG_check_num_args("rig_spectrum_line::spectrum_mode",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::spectrum_mode",1,"struct rig_spectrum_line *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_spectrum_line::spectrum_mode",2,"enum rig_spectrum_mode_e");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_spectrum_mode_set",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  arg2 = (enum rig_spectrum_mode_e)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->spectrum_mode = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_spectrum_mode_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  enum rig_spectrum_mode_e result;
  
  SWIG_check_num_args("rig_spectrum_line::spectrum_mode",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::spectrum_mode",1,"struct rig_spectrum_line *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_spectrum_mode_get",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  result = (enum rig_spectrum_mode_e) ((arg1)->spectrum_mode);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_center_freq_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  freq_t arg2 ;
  
  SWIG_check_num_args("rig_spectrum_line::center_freq",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::center_freq",1,"struct rig_spectrum_line *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_spectrum_line::center_freq",2,"freq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_center_freq_set",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  arg2 = (freq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->center_freq = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_center_freq_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  freq_t result;
  
  SWIG_check_num_args("rig_spectrum_line::center_freq",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::center_freq",1,"struct rig_spectrum_line *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_center_freq_get",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  result = (freq_t) ((arg1)->center_freq);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_span_freq_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  freq_t arg2 ;
  
  SWIG_check_num_args("rig_spectrum_line::span_freq",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::span_freq",1,"struct rig_spectrum_line *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_spectrum_line::span_freq",2,"freq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_span_freq_set",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  arg2 = (freq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->span_freq = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_span_freq_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  freq_t result;
  
  SWIG_check_num_args("rig_spectrum_line::span_freq",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::span_freq",1,"struct rig_spectrum_line *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_span_freq_get",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  result = (freq_t) ((arg1)->span_freq);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_low_edge_freq_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  freq_t arg2 ;
  
  SWIG_check_num_args("rig_spectrum_line::low_edge_freq",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::low_edge_freq",1,"struct rig_spectrum_line *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_spectrum_line::low_edge_freq",2,"freq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_low_edge_freq_set",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  arg2 = (freq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->low_edge_freq = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_low_edge_freq_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  freq_t result;
  
  SWIG_check_num_args("rig_spectrum_line::low_edge_freq",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::low_edge_freq",1,"struct rig_spectrum_line *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_low_edge_freq_get",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  result = (freq_t) ((arg1)->low_edge_freq);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_high_edge_freq_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  freq_t arg2 ;
  
  SWIG_check_num_args("rig_spectrum_line::high_edge_freq",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::high_edge_freq",1,"struct rig_spectrum_line *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_spectrum_line::high_edge_freq",2,"freq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_high_edge_freq_set",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  arg2 = (freq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->high_edge_freq = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_high_edge_freq_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  freq_t result;
  
  SWIG_check_num_args("rig_spectrum_line::high_edge_freq",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::high_edge_freq",1,"struct rig_spectrum_line *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_high_edge_freq_get",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  result = (freq_t) ((arg1)->high_edge_freq);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_spectrum_data_length_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  size_t arg2 ;
  
  SWIG_check_num_args("rig_spectrum_line::spectrum_data_length",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::spectrum_data_length",1,"struct rig_spectrum_line *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_spectrum_line::spectrum_data_length",2,"size_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_spectrum_data_length_set",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (size_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->spectrum_data_length = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_spectrum_data_length_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  size_t result;
  
  SWIG_check_num_args("rig_spectrum_line::spectrum_data_length",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::spectrum_data_length",1,"struct rig_spectrum_line *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_spectrum_data_length_get",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  result =  ((arg1)->spectrum_data_length);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_spectrum_data_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  unsigned char *arg2 = 0 ;
  
  SWIG_check_num_args("rig_spectrum_line::spectrum_data",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::spectrum_data",1,"struct rig_spectrum_line *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_spectrum_line::spectrum_data",2,"unsigned char *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_spectrum_data_set",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_unsigned_char,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("rig_spectrum_line_spectrum_data_set",2,SWIGTYPE_p_unsigned_char);
  }
  
  if (arg1) (arg1)->spectrum_data = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_spectrum_line_spectrum_data_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *arg1 = 0 ;
  unsigned char *result = 0 ;
  
  SWIG_check_num_args("rig_spectrum_line::spectrum_data",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_spectrum_line::spectrum_data",1,"struct rig_spectrum_line *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_spectrum_line,0))){
    SWIG_fail_ptr("rig_spectrum_line_spectrum_data_get",1,SWIGTYPE_p_rig_spectrum_line);
  }
  
  result = (unsigned char *) ((arg1)->spectrum_data);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_unsigned_char,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_rig_spectrum_line(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_spectrum_line *result = 0 ;
  
  SWIG_check_num_args("rig_spectrum_line::rig_spectrum_line",0,0)
  result = (struct rig_spectrum_line *)calloc(1, sizeof(struct rig_spectrum_line));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_rig_spectrum_line,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_rig_spectrum_line(void *obj) {
struct rig_spectrum_line *arg1 = (struct rig_spectrum_line *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_rig_spectrum_line(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_rig_spectrum_line);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_rig_spectrum_line_attributes[] = {
    { "id", _wrap_rig_spectrum_line_id_get, _wrap_rig_spectrum_line_id_set },
    { "data_level_min", _wrap_rig_spectrum_line_data_level_min_get, _wrap_rig_spectrum_line_data_level_min_set },
    { "data_level_max", _wrap_rig_spectrum_line_data_level_max_get, _wrap_rig_spectrum_line_data_level_max_set },
    { "signal_strength_min", _wrap_rig_spectrum_line_signal_strength_min_get, _wrap_rig_spectrum_line_signal_strength_min_set },
    { "signal_strength_max", _wrap_rig_spectrum_line_signal_strength_max_get, _wrap_rig_spectrum_line_signal_strength_max_set },
    { "spectrum_mode", _wrap_rig_spectrum_line_spectrum_mode_get, _wrap_rig_spectrum_line_spectrum_mode_set },
    { "center_freq", _wrap_rig_spectrum_line_center_freq_get, _wrap_rig_spectrum_line_center_freq_set },
    { "span_freq", _wrap_rig_spectrum_line_span_freq_get, _wrap_rig_spectrum_line_span_freq_set },
    { "low_edge_freq", _wrap_rig_spectrum_line_low_edge_freq_get, _wrap_rig_spectrum_line_low_edge_freq_set },
    { "high_edge_freq", _wrap_rig_spectrum_line_high_edge_freq_get, _wrap_rig_spectrum_line_high_edge_freq_set },
    { "spectrum_data_length", _wrap_rig_spectrum_line_spectrum_data_length_get, _wrap_rig_spectrum_line_spectrum_data_length_set },
    { "spectrum_data", _wrap_rig_spectrum_line_spectrum_data_get, _wrap_rig_spectrum_line_spectrum_data_set },
    {0,0,0}
};
static swig_lua_method swig_rig_spectrum_line_methods[]= {
    {0,0}
};
static swig_lua_method swig_rig_spectrum_line_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_rig_spectrum_line_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_rig_spectrum_line_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_rig_spectrum_line_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_rig_spectrum_line_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_rig_spectrum_line_Sf_SwigStatic = {
    "rig_spectrum_line",
    swig_rig_spectrum_line_Sf_SwigStatic_methods,
    swig_rig_spectrum_line_Sf_SwigStatic_attributes,
    swig_rig_spectrum_line_Sf_SwigStatic_constants,
    swig_rig_spectrum_line_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_rig_spectrum_line_bases[] = {0};
static const char *swig_rig_spectrum_line_base_names[] = {0};
static swig_lua_class _wrap_class_rig_spectrum_line = { "rig_spectrum_line", "rig_spectrum_line", &SWIGTYPE_p_rig_spectrum_line,_proxy__wrap_new_rig_spectrum_line, swig_delete_rig_spectrum_line, swig_rig_spectrum_line_methods, swig_rig_spectrum_line_attributes, &swig_rig_spectrum_line_Sf_SwigStatic, swig_rig_spectrum_line_meta, swig_rig_spectrum_line_bases, swig_rig_spectrum_line_base_names };

static int _wrap_deferred_config_item_nextt_set(lua_State* L) {
  int SWIG_arg = 0;
  struct deferred_config_item *arg1 = 0 ;
  struct deferred_config_item *arg2 = 0 ;
  
  SWIG_check_num_args("deferred_config_item::nextt",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("deferred_config_item::nextt",1,"struct deferred_config_item *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("deferred_config_item::nextt",2,"struct deferred_config_item *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_deferred_config_item,0))){
    SWIG_fail_ptr("deferred_config_item_nextt_set",1,SWIGTYPE_p_deferred_config_item);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_deferred_config_item,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("deferred_config_item_nextt_set",2,SWIGTYPE_p_deferred_config_item);
  }
  
  if (arg1) (arg1)->nextt = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_deferred_config_item_nextt_get(lua_State* L) {
  int SWIG_arg = 0;
  struct deferred_config_item *arg1 = 0 ;
  struct deferred_config_item *result = 0 ;
  
  SWIG_check_num_args("deferred_config_item::nextt",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("deferred_config_item::nextt",1,"struct deferred_config_item *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_deferred_config_item,0))){
    SWIG_fail_ptr("deferred_config_item_nextt_get",1,SWIGTYPE_p_deferred_config_item);
  }
  
  result = (struct deferred_config_item *) ((arg1)->nextt);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_deferred_config_item,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_deferred_config_item_token_set(lua_State* L) {
  int SWIG_arg = 0;
  struct deferred_config_item *arg1 = 0 ;
  hamlib_token_t arg2 ;
  
  SWIG_check_num_args("deferred_config_item::token",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("deferred_config_item::token",1,"struct deferred_config_item *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("deferred_config_item::token",2,"hamlib_token_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_deferred_config_item,0))){
    SWIG_fail_ptr("deferred_config_item_token_set",1,SWIGTYPE_p_deferred_config_item);
  }
  
  arg2 = (hamlib_token_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->token = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_deferred_config_item_token_get(lua_State* L) {
  int SWIG_arg = 0;
  struct deferred_config_item *arg1 = 0 ;
  hamlib_token_t result;
  
  SWIG_check_num_args("deferred_config_item::token",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("deferred_config_item::token",1,"struct deferred_config_item *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_deferred_config_item,0))){
    SWIG_fail_ptr("deferred_config_item_token_get",1,SWIGTYPE_p_deferred_config_item);
  }
  
  result = (hamlib_token_t) ((arg1)->token);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_deferred_config_item_value_set(lua_State* L) {
  int SWIG_arg = 0;
  struct deferred_config_item *arg1 = 0 ;
  char *arg2 = 0 ;
  
  SWIG_check_num_args("deferred_config_item::value",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("deferred_config_item::value",1,"struct deferred_config_item *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("deferred_config_item::value",2,"char *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_deferred_config_item,0))){
    SWIG_fail_ptr("deferred_config_item_value_set",1,SWIGTYPE_p_deferred_config_item);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    free(arg1->value);
    if (arg2) {
      arg1->value = (char *) malloc(strlen((const char *)arg2)+1);
      strcpy((char *)arg1->value, (const char *)arg2);
    } else {
      arg1->value = 0;
    }
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_deferred_config_item_value_get(lua_State* L) {
  int SWIG_arg = 0;
  struct deferred_config_item *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("deferred_config_item::value",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("deferred_config_item::value",1,"struct deferred_config_item *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_deferred_config_item,0))){
    SWIG_fail_ptr("deferred_config_item_value_get",1,SWIGTYPE_p_deferred_config_item);
  }
  
  result = (char *) ((arg1)->value);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_deferred_config_item(lua_State* L) {
  int SWIG_arg = 0;
  struct deferred_config_item *result = 0 ;
  
  SWIG_check_num_args("deferred_config_item::deferred_config_item",0,0)
  result = (struct deferred_config_item *)calloc(1, sizeof(struct deferred_config_item));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_deferred_config_item,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_deferred_config_item(void *obj) {
struct deferred_config_item *arg1 = (struct deferred_config_item *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_deferred_config_item(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_deferred_config_item);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_deferred_config_item_attributes[] = {
    { "nextt", _wrap_deferred_config_item_nextt_get, _wrap_deferred_config_item_nextt_set },
    { "token", _wrap_deferred_config_item_token_get, _wrap_deferred_config_item_token_set },
    { "value", _wrap_deferred_config_item_value_get, _wrap_deferred_config_item_value_set },
    {0,0,0}
};
static swig_lua_method swig_deferred_config_item_methods[]= {
    {0,0}
};
static swig_lua_method swig_deferred_config_item_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_deferred_config_item_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_deferred_config_item_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_deferred_config_item_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_deferred_config_item_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_deferred_config_item_Sf_SwigStatic = {
    "deferred_config_item",
    swig_deferred_config_item_Sf_SwigStatic_methods,
    swig_deferred_config_item_Sf_SwigStatic_attributes,
    swig_deferred_config_item_Sf_SwigStatic_constants,
    swig_deferred_config_item_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_deferred_config_item_bases[] = {0};
static const char *swig_deferred_config_item_base_names[] = {0};
static swig_lua_class _wrap_class_deferred_config_item = { "deferred_config_item", "deferred_config_item", &SWIGTYPE_p_deferred_config_item,_proxy__wrap_new_deferred_config_item, swig_delete_deferred_config_item, swig_deferred_config_item_methods, swig_deferred_config_item_attributes, &swig_deferred_config_item_Sf_SwigStatic, swig_deferred_config_item_meta, swig_deferred_config_item_bases, swig_deferred_config_item_base_names };

static int _wrap_deferred_config_header_firstt_set(lua_State* L) {
  int SWIG_arg = 0;
  struct deferred_config_header *arg1 = 0 ;
  struct deferred_config_item *arg2 = 0 ;
  
  SWIG_check_num_args("deferred_config_header::firstt",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("deferred_config_header::firstt",1,"struct deferred_config_header *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("deferred_config_header::firstt",2,"struct deferred_config_item *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_deferred_config_header,0))){
    SWIG_fail_ptr("deferred_config_header_firstt_set",1,SWIGTYPE_p_deferred_config_header);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_deferred_config_item,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("deferred_config_header_firstt_set",2,SWIGTYPE_p_deferred_config_item);
  }
  
  if (arg1) (arg1)->firstt = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_deferred_config_header_firstt_get(lua_State* L) {
  int SWIG_arg = 0;
  struct deferred_config_header *arg1 = 0 ;
  struct deferred_config_item *result = 0 ;
  
  SWIG_check_num_args("deferred_config_header::firstt",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("deferred_config_header::firstt",1,"struct deferred_config_header *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_deferred_config_header,0))){
    SWIG_fail_ptr("deferred_config_header_firstt_get",1,SWIGTYPE_p_deferred_config_header);
  }
  
  result = (struct deferred_config_item *) ((arg1)->firstt);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_deferred_config_item,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_deferred_config_header_lastt_set(lua_State* L) {
  int SWIG_arg = 0;
  struct deferred_config_header *arg1 = 0 ;
  struct deferred_config_item *arg2 = 0 ;
  
  SWIG_check_num_args("deferred_config_header::lastt",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("deferred_config_header::lastt",1,"struct deferred_config_header *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("deferred_config_header::lastt",2,"struct deferred_config_item *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_deferred_config_header,0))){
    SWIG_fail_ptr("deferred_config_header_lastt_set",1,SWIGTYPE_p_deferred_config_header);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_deferred_config_item,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("deferred_config_header_lastt_set",2,SWIGTYPE_p_deferred_config_item);
  }
  
  if (arg1) (arg1)->lastt = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_deferred_config_header_lastt_get(lua_State* L) {
  int SWIG_arg = 0;
  struct deferred_config_header *arg1 = 0 ;
  struct deferred_config_item *result = 0 ;
  
  SWIG_check_num_args("deferred_config_header::lastt",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("deferred_config_header::lastt",1,"struct deferred_config_header *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_deferred_config_header,0))){
    SWIG_fail_ptr("deferred_config_header_lastt_get",1,SWIGTYPE_p_deferred_config_header);
  }
  
  result = (struct deferred_config_item *) ((arg1)->lastt);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_deferred_config_item,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_deferred_config_header(lua_State* L) {
  int SWIG_arg = 0;
  struct deferred_config_header *result = 0 ;
  
  SWIG_check_num_args("deferred_config_header::deferred_config_header",0,0)
  result = (struct deferred_config_header *)calloc(1, sizeof(struct deferred_config_header));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_deferred_config_header,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_deferred_config_header(void *obj) {
struct deferred_config_header *arg1 = (struct deferred_config_header *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_deferred_config_header(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_deferred_config_header);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_deferred_config_header_attributes[] = {
    { "firstt", _wrap_deferred_config_header_firstt_get, _wrap_deferred_config_header_firstt_set },
    { "lastt", _wrap_deferred_config_header_lastt_get, _wrap_deferred_config_header_lastt_set },
    {0,0,0}
};
static swig_lua_method swig_deferred_config_header_methods[]= {
    {0,0}
};
static swig_lua_method swig_deferred_config_header_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_deferred_config_header_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_deferred_config_header_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_deferred_config_header_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_deferred_config_header_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_deferred_config_header_Sf_SwigStatic = {
    "deferred_config_header",
    swig_deferred_config_header_Sf_SwigStatic_methods,
    swig_deferred_config_header_Sf_SwigStatic_attributes,
    swig_deferred_config_header_Sf_SwigStatic_constants,
    swig_deferred_config_header_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_deferred_config_header_bases[] = {0};
static const char *swig_deferred_config_header_base_names[] = {0};
static swig_lua_class _wrap_class_deferred_config_header = { "deferred_config_header", "deferred_config_header", &SWIGTYPE_p_deferred_config_header,_proxy__wrap_new_deferred_config_header, swig_delete_deferred_config_header, swig_deferred_config_header_methods, swig_deferred_config_header_attributes, &swig_deferred_config_header_Sf_SwigStatic, swig_deferred_config_header_meta, swig_deferred_config_header_bases, swig_deferred_config_header_base_names };

static int _wrap_rig_caps_rig_model_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  rig_model_t arg2 ;
  
  SWIG_check_num_args("rig_caps::rig_model",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rig_model",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::rig_model",2,"rig_model_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rig_model_set",1,SWIGTYPE_p_rig_caps);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (rig_model_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->rig_model = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rig_model_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  rig_model_t result;
  
  SWIG_check_num_args("rig_caps::rig_model",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rig_model",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rig_model_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (rig_model_t) ((arg1)->rig_model);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_model_name_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_caps::model_name",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::model_name",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_model_name_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (char *) ((arg1)->model_name);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_mfg_name_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_caps::mfg_name",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::mfg_name",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_mfg_name_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (char *) ((arg1)->mfg_name);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_version_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_caps::version",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::version",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_version_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (char *) ((arg1)->version);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_copyright_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_caps::copyright",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::copyright",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_copyright_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (char *) ((arg1)->copyright);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_status_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  enum rig_status_e arg2 ;
  
  SWIG_check_num_args("rig_caps::status",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::status",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::status",2,"enum rig_status_e");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_status_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (enum rig_status_e)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->status = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_status_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  enum rig_status_e result;
  
  SWIG_check_num_args("rig_caps::status",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::status",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_status_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (enum rig_status_e) ((arg1)->status);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rig_type_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_caps::rig_type",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rig_type",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::rig_type",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rig_type_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->rig_type = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rig_type_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_caps::rig_type",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rig_type",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rig_type_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int) ((arg1)->rig_type);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_ptt_type_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  ptt_type_t arg2 ;
  
  SWIG_check_num_args("rig_caps::ptt_type",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::ptt_type",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::ptt_type",2,"ptt_type_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_ptt_type_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (ptt_type_t)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->ptt_type = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_ptt_type_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  ptt_type_t result;
  
  SWIG_check_num_args("rig_caps::ptt_type",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::ptt_type",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_ptt_type_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (ptt_type_t) ((arg1)->ptt_type);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_dcd_type_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  dcd_type_t arg2 ;
  
  SWIG_check_num_args("rig_caps::dcd_type",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::dcd_type",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::dcd_type",2,"dcd_type_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_dcd_type_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (dcd_type_t)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->dcd_type = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_dcd_type_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  dcd_type_t result;
  
  SWIG_check_num_args("rig_caps::dcd_type",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::dcd_type",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_dcd_type_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (dcd_type_t) ((arg1)->dcd_type);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_port_type_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  rig_port_t arg2 ;
  
  SWIG_check_num_args("rig_caps::port_type",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::port_type",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::port_type",2,"rig_port_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_port_type_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (rig_port_t)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->port_type = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_port_type_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  rig_port_t result;
  
  SWIG_check_num_args("rig_caps::port_type",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::port_type",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_port_type_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (rig_port_t) ((arg1)->port_type);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_serial_rate_min_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_caps::serial_rate_min",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::serial_rate_min",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::serial_rate_min",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_serial_rate_min_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_rate_min = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_serial_rate_min_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_caps::serial_rate_min",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::serial_rate_min",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_serial_rate_min_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int) ((arg1)->serial_rate_min);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_serial_rate_max_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_caps::serial_rate_max",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::serial_rate_max",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::serial_rate_max",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_serial_rate_max_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_rate_max = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_serial_rate_max_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_caps::serial_rate_max",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::serial_rate_max",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_serial_rate_max_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int) ((arg1)->serial_rate_max);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_serial_data_bits_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_caps::serial_data_bits",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::serial_data_bits",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::serial_data_bits",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_serial_data_bits_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_data_bits = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_serial_data_bits_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_caps::serial_data_bits",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::serial_data_bits",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_serial_data_bits_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int) ((arg1)->serial_data_bits);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_serial_stop_bits_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_caps::serial_stop_bits",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::serial_stop_bits",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::serial_stop_bits",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_serial_stop_bits_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_stop_bits = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_serial_stop_bits_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_caps::serial_stop_bits",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::serial_stop_bits",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_serial_stop_bits_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int) ((arg1)->serial_stop_bits);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_serial_parity_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  enum serial_parity_e arg2 ;
  
  SWIG_check_num_args("rig_caps::serial_parity",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::serial_parity",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::serial_parity",2,"enum serial_parity_e");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_serial_parity_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (enum serial_parity_e)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_parity = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_serial_parity_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  enum serial_parity_e result;
  
  SWIG_check_num_args("rig_caps::serial_parity",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::serial_parity",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_serial_parity_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (enum serial_parity_e) ((arg1)->serial_parity);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_serial_handshake_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  enum serial_handshake_e arg2 ;
  
  SWIG_check_num_args("rig_caps::serial_handshake",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::serial_handshake",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::serial_handshake",2,"enum serial_handshake_e");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_serial_handshake_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (enum serial_handshake_e)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_handshake = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_serial_handshake_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  enum serial_handshake_e result;
  
  SWIG_check_num_args("rig_caps::serial_handshake",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::serial_handshake",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_serial_handshake_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (enum serial_handshake_e) ((arg1)->serial_handshake);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_write_delay_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_caps::write_delay",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::write_delay",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::write_delay",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_write_delay_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->write_delay = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_write_delay_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_caps::write_delay",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::write_delay",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_write_delay_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int) ((arg1)->write_delay);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_post_write_delay_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_caps::post_write_delay",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::post_write_delay",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::post_write_delay",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_post_write_delay_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->post_write_delay = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_post_write_delay_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_caps::post_write_delay",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::post_write_delay",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_post_write_delay_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int) ((arg1)->post_write_delay);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_timeout_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_caps::timeout",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::timeout",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::timeout",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_timeout_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->timeout = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_timeout_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_caps::timeout",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::timeout",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_timeout_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int) ((arg1)->timeout);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_retry_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_caps::retry",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::retry",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::retry",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_retry_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->retry = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_retry_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_caps::retry",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::retry",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_retry_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int) ((arg1)->retry);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_has_get_func_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rig_caps::has_get_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::has_get_func",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::has_get_func",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_has_get_func_set",1,SWIGTYPE_p_rig_caps);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_get_func = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_has_get_func_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rig_caps::has_get_func",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::has_get_func",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_has_get_func_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (setting_t) ((arg1)->has_get_func);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_has_set_func_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rig_caps::has_set_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::has_set_func",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::has_set_func",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_has_set_func_set",1,SWIGTYPE_p_rig_caps);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_set_func = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_has_set_func_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rig_caps::has_set_func",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::has_set_func",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_has_set_func_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (setting_t) ((arg1)->has_set_func);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_has_get_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rig_caps::has_get_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::has_get_level",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::has_get_level",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_has_get_level_set",1,SWIGTYPE_p_rig_caps);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_get_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_has_get_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rig_caps::has_get_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::has_get_level",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_has_get_level_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (setting_t) ((arg1)->has_get_level);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_has_set_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rig_caps::has_set_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::has_set_level",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::has_set_level",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_has_set_level_set",1,SWIGTYPE_p_rig_caps);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_set_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_has_set_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rig_caps::has_set_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::has_set_level",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_has_set_level_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (setting_t) ((arg1)->has_set_level);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_has_get_parm_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rig_caps::has_get_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::has_get_parm",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::has_get_parm",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_has_get_parm_set",1,SWIGTYPE_p_rig_caps);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_get_parm = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_has_get_parm_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rig_caps::has_get_parm",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::has_get_parm",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_has_get_parm_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (setting_t) ((arg1)->has_get_parm);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_has_set_parm_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rig_caps::has_set_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::has_set_parm",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::has_set_parm",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_has_set_parm_set",1,SWIGTYPE_p_rig_caps);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_set_parm = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_has_set_parm_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rig_caps::has_set_parm",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::has_set_parm",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_has_set_parm_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (setting_t) ((arg1)->has_set_parm);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_level_gran_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  gran_t *arg2 = (gran_t *)0 ;
  
  SWIG_check_num_args("rig_caps::level_gran",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::level_gran",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::level_gran",2,"gran_t [64]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_level_gran_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_gran,0))){
    SWIG_fail_ptr("rig_caps_level_gran_set",2,SWIGTYPE_p_gran);
  }
  
  {
    size_t ii;
    gran_t *b = (gran_t *) arg1->level_gran;
    for (ii = 0; ii < (size_t)64; ii++) b[ii] = *((gran_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_level_gran_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  gran_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::level_gran",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::level_gran",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_level_gran_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (gran_t *)(gran_t *) ((arg1)->level_gran);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_gran,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_parm_gran_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  gran_t *arg2 = (gran_t *)0 ;
  
  SWIG_check_num_args("rig_caps::parm_gran",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::parm_gran",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::parm_gran",2,"gran_t [64]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_parm_gran_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_gran,0))){
    SWIG_fail_ptr("rig_caps_parm_gran_set",2,SWIGTYPE_p_gran);
  }
  
  {
    size_t ii;
    gran_t *b = (gran_t *) arg1->parm_gran;
    for (ii = 0; ii < (size_t)64; ii++) b[ii] = *((gran_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_parm_gran_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  gran_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::parm_gran",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::parm_gran",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_parm_gran_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (gran_t *)(gran_t *) ((arg1)->parm_gran);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_gran,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_extparms_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  struct confparams *arg2 = 0 ;
  
  SWIG_check_num_args("rig_caps::extparms",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::extparms",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::extparms",2,"struct confparams const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_extparms_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_confparams,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("rig_caps_extparms_set",2,SWIGTYPE_p_confparams);
  }
  
  if (arg1) (arg1)->extparms = (struct confparams const *)arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_extparms_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  struct confparams *result = 0 ;
  
  SWIG_check_num_args("rig_caps::extparms",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::extparms",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_extparms_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (struct confparams *) ((arg1)->extparms);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_confparams,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_extlevels_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  struct confparams *arg2 = 0 ;
  
  SWIG_check_num_args("rig_caps::extlevels",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::extlevels",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::extlevels",2,"struct confparams const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_extlevels_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_confparams,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("rig_caps_extlevels_set",2,SWIGTYPE_p_confparams);
  }
  
  if (arg1) (arg1)->extlevels = (struct confparams const *)arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_extlevels_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  struct confparams *result = 0 ;
  
  SWIG_check_num_args("rig_caps::extlevels",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::extlevels",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_extlevels_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (struct confparams *) ((arg1)->extlevels);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_confparams,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_extfuncs_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  struct confparams *arg2 = 0 ;
  
  SWIG_check_num_args("rig_caps::extfuncs",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::extfuncs",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::extfuncs",2,"struct confparams const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_extfuncs_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_confparams,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("rig_caps_extfuncs_set",2,SWIGTYPE_p_confparams);
  }
  
  if (arg1) (arg1)->extfuncs = (struct confparams const *)arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_extfuncs_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  struct confparams *result = 0 ;
  
  SWIG_check_num_args("rig_caps::extfuncs",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::extfuncs",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_extfuncs_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (struct confparams *) ((arg1)->extfuncs);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_confparams,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_ext_tokens_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int *arg2 = 0 ;
  
  SWIG_check_num_args("rig_caps::ext_tokens",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::ext_tokens",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::ext_tokens",2,"int *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_ext_tokens_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_int,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("rig_caps_ext_tokens_set",2,SWIGTYPE_p_int);
  }
  
  if (arg1) (arg1)->ext_tokens = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_ext_tokens_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int *result = 0 ;
  
  SWIG_check_num_args("rig_caps::ext_tokens",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::ext_tokens",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_ext_tokens_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int *) ((arg1)->ext_tokens);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_ctcss_list_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  tone_t *arg2 = 0 ;
  
  SWIG_check_num_args("rig_caps::ctcss_list",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::ctcss_list",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::ctcss_list",2,"tone_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_ctcss_list_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_unsigned_int,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("rig_caps_ctcss_list_set",2,SWIGTYPE_p_unsigned_int);
  }
  
  if (arg1) (arg1)->ctcss_list = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_ctcss_list_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  tone_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::ctcss_list",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::ctcss_list",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_ctcss_list_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (tone_t *) ((arg1)->ctcss_list);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_unsigned_int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_dcs_list_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  tone_t *arg2 = 0 ;
  
  SWIG_check_num_args("rig_caps::dcs_list",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::dcs_list",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::dcs_list",2,"tone_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_dcs_list_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_unsigned_int,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("rig_caps_dcs_list_set",2,SWIGTYPE_p_unsigned_int);
  }
  
  if (arg1) (arg1)->dcs_list = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_dcs_list_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  tone_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::dcs_list",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::dcs_list",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_dcs_list_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (tone_t *) ((arg1)->dcs_list);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_unsigned_int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_preamp_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int *arg2 = (int *)0 ;
  
  SWIG_check_num_args("rig_caps::preamp",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::preamp",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::preamp",2,"int [8]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_preamp_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_int,0))){
    SWIG_fail_ptr("rig_caps_preamp_set",2,SWIGTYPE_p_int);
  }
  
  {
    size_t ii;
    int *b = (int *) arg1->preamp;
    for (ii = 0; ii < (size_t)8; ii++) b[ii] = *((int *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_preamp_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int *result = 0 ;
  
  SWIG_check_num_args("rig_caps::preamp",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::preamp",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_preamp_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int *)(int *) ((arg1)->preamp);
  {
    int len,i;
    len = 8;
    lua_createtable (L, len, 0);
    for(i=0; i<len; i++) {
      lua_pushinteger(L, (i+1)); // Lua starts list index with 1
      lua_pushinteger(L, (lua_Integer)result[i]);
      lua_rawset(L, -3);
    }
    SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_attenuator_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int *arg2 = (int *)0 ;
  
  SWIG_check_num_args("rig_caps::attenuator",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::attenuator",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::attenuator",2,"int [8]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_attenuator_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_int,0))){
    SWIG_fail_ptr("rig_caps_attenuator_set",2,SWIGTYPE_p_int);
  }
  
  {
    size_t ii;
    int *b = (int *) arg1->attenuator;
    for (ii = 0; ii < (size_t)8; ii++) b[ii] = *((int *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_attenuator_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int *result = 0 ;
  
  SWIG_check_num_args("rig_caps::attenuator",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::attenuator",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_attenuator_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int *)(int *) ((arg1)->attenuator);
  {
    int len,i;
    len = 8;
    lua_createtable (L, len, 0);
    for(i=0; i<len; i++) {
      lua_pushinteger(L, (i+1)); // Lua starts list index with 1
      lua_pushinteger(L, (lua_Integer)result[i]);
      lua_rawset(L, -3);
    }
    SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_max_rit_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  shortfreq_t arg2 ;
  
  SWIG_check_num_args("rig_caps::max_rit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::max_rit",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::max_rit",2,"shortfreq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_max_rit_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (shortfreq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->max_rit = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_max_rit_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  shortfreq_t result;
  
  SWIG_check_num_args("rig_caps::max_rit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::max_rit",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_max_rit_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (shortfreq_t) ((arg1)->max_rit);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_max_xit_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  shortfreq_t arg2 ;
  
  SWIG_check_num_args("rig_caps::max_xit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::max_xit",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::max_xit",2,"shortfreq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_max_xit_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (shortfreq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->max_xit = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_max_xit_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  shortfreq_t result;
  
  SWIG_check_num_args("rig_caps::max_xit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::max_xit",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_max_xit_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (shortfreq_t) ((arg1)->max_xit);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_max_ifshift_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  shortfreq_t arg2 ;
  
  SWIG_check_num_args("rig_caps::max_ifshift",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::max_ifshift",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::max_ifshift",2,"shortfreq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_max_ifshift_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (shortfreq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->max_ifshift = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_max_ifshift_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  shortfreq_t result;
  
  SWIG_check_num_args("rig_caps::max_ifshift",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::max_ifshift",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_max_ifshift_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (shortfreq_t) ((arg1)->max_ifshift);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_agc_level_count_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_caps::agc_level_count",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::agc_level_count",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::agc_level_count",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_agc_level_count_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->agc_level_count = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_agc_level_count_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_caps::agc_level_count",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::agc_level_count",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_agc_level_count_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int) ((arg1)->agc_level_count);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_agc_levels_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  enum agc_level_e *arg2 = (enum agc_level_e *)0 ;
  
  SWIG_check_num_args("rig_caps::agc_levels",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::agc_levels",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::agc_levels",2,"enum agc_level_e [8]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_agc_levels_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_agc_level_e,0))){
    SWIG_fail_ptr("rig_caps_agc_levels_set",2,SWIGTYPE_p_agc_level_e);
  }
  
  {
    size_t ii;
    enum agc_level_e *b = (enum agc_level_e *) arg1->agc_levels;
    for (ii = 0; ii < (size_t)8; ii++) b[ii] = *((enum agc_level_e *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_agc_levels_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  enum agc_level_e *result = 0 ;
  
  SWIG_check_num_args("rig_caps::agc_levels",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::agc_levels",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_agc_levels_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (enum agc_level_e *)(enum agc_level_e *) ((arg1)->agc_levels);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_agc_level_e,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_announces_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  ann_t arg2 ;
  
  SWIG_check_num_args("rig_caps::announces",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::announces",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::announces",2,"ann_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_announces_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (ann_t)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->announces = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_announces_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  ann_t result;
  
  SWIG_check_num_args("rig_caps::announces",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::announces",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_announces_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (ann_t) ((arg1)->announces);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_vfo_ops_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  vfo_op_t arg2 ;
  
  SWIG_check_num_args("rig_caps::vfo_ops",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::vfo_ops",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::vfo_ops",2,"vfo_op_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_vfo_ops_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (vfo_op_t)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->vfo_ops = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_vfo_ops_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  vfo_op_t result;
  
  SWIG_check_num_args("rig_caps::vfo_ops",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::vfo_ops",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_vfo_ops_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (vfo_op_t) ((arg1)->vfo_ops);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_scan_ops_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  scan_t arg2 ;
  
  SWIG_check_num_args("rig_caps::scan_ops",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::scan_ops",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::scan_ops",2,"scan_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_scan_ops_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (scan_t)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->scan_ops = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_scan_ops_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  scan_t result;
  
  SWIG_check_num_args("rig_caps::scan_ops",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::scan_ops",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_scan_ops_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (scan_t) ((arg1)->scan_ops);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_targetable_vfo_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_caps::targetable_vfo",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::targetable_vfo",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::targetable_vfo",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_targetable_vfo_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->targetable_vfo = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_targetable_vfo_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_caps::targetable_vfo",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::targetable_vfo",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_targetable_vfo_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int) ((arg1)->targetable_vfo);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_transceive_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_caps::transceive",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::transceive",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::transceive",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_transceive_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->transceive = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_transceive_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_caps::transceive",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::transceive",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_transceive_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int) ((arg1)->transceive);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_bank_qty_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_caps::bank_qty",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::bank_qty",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::bank_qty",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_bank_qty_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->bank_qty = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_bank_qty_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_caps::bank_qty",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::bank_qty",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_bank_qty_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int) ((arg1)->bank_qty);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_chan_desc_sz_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_caps::chan_desc_sz",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::chan_desc_sz",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::chan_desc_sz",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_chan_desc_sz_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->chan_desc_sz = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_chan_desc_sz_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_caps::chan_desc_sz",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::chan_desc_sz",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_chan_desc_sz_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int) ((arg1)->chan_desc_sz);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_chan_list_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  chan_t *arg2 = (chan_t *)0 ;
  
  SWIG_check_num_args("rig_caps::chan_list",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::chan_list",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::chan_list",2,"chan_t [16]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_chan_list_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_chan_list,0))){
    SWIG_fail_ptr("rig_caps_chan_list_set",2,SWIGTYPE_p_chan_list);
  }
  
  {
    size_t ii;
    chan_t *b = (chan_t *) arg1->chan_list;
    for (ii = 0; ii < (size_t)16; ii++) b[ii] = *((chan_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_chan_list_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  chan_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::chan_list",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::chan_list",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_chan_list_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (chan_t *)(chan_t *) ((arg1)->chan_list);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_chan_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rx_range_list1_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_caps::rx_range_list1",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rx_range_list1",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::rx_range_list1",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rx_range_list1_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_caps_rx_range_list1_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->rx_range_list1;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rx_range_list1_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::rx_range_list1",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rx_range_list1",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rx_range_list1_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->rx_range_list1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_tx_range_list1_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_caps::tx_range_list1",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::tx_range_list1",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::tx_range_list1",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_tx_range_list1_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_caps_tx_range_list1_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->tx_range_list1;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_tx_range_list1_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::tx_range_list1",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::tx_range_list1",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_tx_range_list1_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->tx_range_list1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rx_range_list2_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_caps::rx_range_list2",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rx_range_list2",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::rx_range_list2",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rx_range_list2_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_caps_rx_range_list2_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->rx_range_list2;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rx_range_list2_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::rx_range_list2",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rx_range_list2",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rx_range_list2_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->rx_range_list2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_tx_range_list2_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_caps::tx_range_list2",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::tx_range_list2",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::tx_range_list2",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_tx_range_list2_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_caps_tx_range_list2_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->tx_range_list2;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_tx_range_list2_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::tx_range_list2",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::tx_range_list2",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_tx_range_list2_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->tx_range_list2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rx_range_list3_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_caps::rx_range_list3",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rx_range_list3",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::rx_range_list3",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rx_range_list3_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_caps_rx_range_list3_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->rx_range_list3;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rx_range_list3_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::rx_range_list3",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rx_range_list3",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rx_range_list3_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->rx_range_list3);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_tx_range_list3_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_caps::tx_range_list3",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::tx_range_list3",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::tx_range_list3",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_tx_range_list3_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_caps_tx_range_list3_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->tx_range_list3;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_tx_range_list3_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::tx_range_list3",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::tx_range_list3",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_tx_range_list3_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->tx_range_list3);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rx_range_list4_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_caps::rx_range_list4",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rx_range_list4",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::rx_range_list4",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rx_range_list4_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_caps_rx_range_list4_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->rx_range_list4;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rx_range_list4_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::rx_range_list4",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rx_range_list4",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rx_range_list4_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->rx_range_list4);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_tx_range_list4_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_caps::tx_range_list4",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::tx_range_list4",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::tx_range_list4",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_tx_range_list4_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_caps_tx_range_list4_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->tx_range_list4;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_tx_range_list4_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::tx_range_list4",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::tx_range_list4",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_tx_range_list4_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->tx_range_list4);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rx_range_list5_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_caps::rx_range_list5",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rx_range_list5",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::rx_range_list5",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rx_range_list5_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_caps_rx_range_list5_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->rx_range_list5;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rx_range_list5_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::rx_range_list5",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rx_range_list5",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rx_range_list5_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->rx_range_list5);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_tx_range_list5_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_caps::tx_range_list5",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::tx_range_list5",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::tx_range_list5",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_tx_range_list5_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_caps_tx_range_list5_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->tx_range_list5;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_tx_range_list5_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::tx_range_list5",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::tx_range_list5",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_tx_range_list5_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->tx_range_list5);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_tuning_steps_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  struct tuning_step_list *arg2 = (struct tuning_step_list *)0 ;
  
  SWIG_check_num_args("rig_caps::tuning_steps",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::tuning_steps",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::tuning_steps",2,"struct tuning_step_list [20]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_tuning_steps_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_tuning_step_list,0))){
    SWIG_fail_ptr("rig_caps_tuning_steps_set",2,SWIGTYPE_p_tuning_step_list);
  }
  
  {
    size_t ii;
    struct tuning_step_list *b = (struct tuning_step_list *) arg1->tuning_steps;
    for (ii = 0; ii < (size_t)20; ii++) b[ii] = *((struct tuning_step_list *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_tuning_steps_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  struct tuning_step_list *result = 0 ;
  
  SWIG_check_num_args("rig_caps::tuning_steps",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::tuning_steps",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_tuning_steps_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (struct tuning_step_list *)(struct tuning_step_list *) ((arg1)->tuning_steps);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_tuning_step_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_filters_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  struct filter_list *arg2 = (struct filter_list *)0 ;
  
  SWIG_check_num_args("rig_caps::filters",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::filters",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::filters",2,"struct filter_list [60]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_filters_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_filter_list,0))){
    SWIG_fail_ptr("rig_caps_filters_set",2,SWIGTYPE_p_filter_list);
  }
  
  {
    size_t ii;
    struct filter_list *b = (struct filter_list *) arg1->filters;
    for (ii = 0; ii < (size_t)60; ii++) b[ii] = *((struct filter_list *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_filters_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  struct filter_list *result = 0 ;
  
  SWIG_check_num_args("rig_caps::filters",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::filters",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_filters_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (struct filter_list *)(struct filter_list *) ((arg1)->filters);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_filter_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_str_cal_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  cal_table_t *arg2 = 0 ;
  
  SWIG_check_num_args("rig_caps::str_cal",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::str_cal",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::str_cal",2,"cal_table_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_str_cal_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_cal_table,0))){
    SWIG_fail_ptr("rig_caps_str_cal_set",2,SWIGTYPE_p_cal_table);
  }
  
  if (arg1) (arg1)->str_cal = *arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_str_cal_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  cal_table_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::str_cal",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::str_cal",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_str_cal_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (cal_table_t *)& ((arg1)->str_cal);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_cal_table,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_swr_cal_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  cal_table_float_t *arg2 = 0 ;
  
  SWIG_check_num_args("rig_caps::swr_cal",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::swr_cal",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::swr_cal",2,"cal_table_float_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_swr_cal_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_cal_table_float,0))){
    SWIG_fail_ptr("rig_caps_swr_cal_set",2,SWIGTYPE_p_cal_table_float);
  }
  
  if (arg1) (arg1)->swr_cal = *arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_swr_cal_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  cal_table_float_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::swr_cal",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::swr_cal",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_swr_cal_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (cal_table_float_t *)& ((arg1)->swr_cal);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_cal_table_float,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_alc_cal_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  cal_table_float_t *arg2 = 0 ;
  
  SWIG_check_num_args("rig_caps::alc_cal",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::alc_cal",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::alc_cal",2,"cal_table_float_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_alc_cal_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_cal_table_float,0))){
    SWIG_fail_ptr("rig_caps_alc_cal_set",2,SWIGTYPE_p_cal_table_float);
  }
  
  if (arg1) (arg1)->alc_cal = *arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_alc_cal_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  cal_table_float_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::alc_cal",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::alc_cal",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_alc_cal_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (cal_table_float_t *)& ((arg1)->alc_cal);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_cal_table_float,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rfpower_meter_cal_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  cal_table_float_t *arg2 = 0 ;
  
  SWIG_check_num_args("rig_caps::rfpower_meter_cal",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rfpower_meter_cal",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::rfpower_meter_cal",2,"cal_table_float_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rfpower_meter_cal_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_cal_table_float,0))){
    SWIG_fail_ptr("rig_caps_rfpower_meter_cal_set",2,SWIGTYPE_p_cal_table_float);
  }
  
  if (arg1) (arg1)->rfpower_meter_cal = *arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rfpower_meter_cal_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  cal_table_float_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::rfpower_meter_cal",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rfpower_meter_cal",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rfpower_meter_cal_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (cal_table_float_t *)& ((arg1)->rfpower_meter_cal);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_cal_table_float,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_comp_meter_cal_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  cal_table_float_t *arg2 = 0 ;
  
  SWIG_check_num_args("rig_caps::comp_meter_cal",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::comp_meter_cal",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::comp_meter_cal",2,"cal_table_float_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_comp_meter_cal_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_cal_table_float,0))){
    SWIG_fail_ptr("rig_caps_comp_meter_cal_set",2,SWIGTYPE_p_cal_table_float);
  }
  
  if (arg1) (arg1)->comp_meter_cal = *arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_comp_meter_cal_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  cal_table_float_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::comp_meter_cal",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::comp_meter_cal",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_comp_meter_cal_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (cal_table_float_t *)& ((arg1)->comp_meter_cal);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_cal_table_float,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_vd_meter_cal_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  cal_table_float_t *arg2 = 0 ;
  
  SWIG_check_num_args("rig_caps::vd_meter_cal",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::vd_meter_cal",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::vd_meter_cal",2,"cal_table_float_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_vd_meter_cal_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_cal_table_float,0))){
    SWIG_fail_ptr("rig_caps_vd_meter_cal_set",2,SWIGTYPE_p_cal_table_float);
  }
  
  if (arg1) (arg1)->vd_meter_cal = *arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_vd_meter_cal_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  cal_table_float_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::vd_meter_cal",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::vd_meter_cal",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_vd_meter_cal_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (cal_table_float_t *)& ((arg1)->vd_meter_cal);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_cal_table_float,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_id_meter_cal_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  cal_table_float_t *arg2 = 0 ;
  
  SWIG_check_num_args("rig_caps::id_meter_cal",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::id_meter_cal",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::id_meter_cal",2,"cal_table_float_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_id_meter_cal_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_cal_table_float,0))){
    SWIG_fail_ptr("rig_caps_id_meter_cal_set",2,SWIGTYPE_p_cal_table_float);
  }
  
  if (arg1) (arg1)->id_meter_cal = *arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_id_meter_cal_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  cal_table_float_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::id_meter_cal",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::id_meter_cal",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_id_meter_cal_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (cal_table_float_t *)& ((arg1)->id_meter_cal);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_cal_table_float,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_spectrum_scopes_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  struct rig_spectrum_scope *arg2 = (struct rig_spectrum_scope *)0 ;
  
  SWIG_check_num_args("rig_caps::spectrum_scopes",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::spectrum_scopes",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::spectrum_scopes",2,"struct rig_spectrum_scope [4]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_spectrum_scopes_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_rig_spectrum_scope,0))){
    SWIG_fail_ptr("rig_caps_spectrum_scopes_set",2,SWIGTYPE_p_rig_spectrum_scope);
  }
  
  {
    size_t ii;
    struct rig_spectrum_scope *b = (struct rig_spectrum_scope *) arg1->spectrum_scopes;
    for (ii = 0; ii < (size_t)4; ii++) b[ii] = *((struct rig_spectrum_scope *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_spectrum_scopes_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  struct rig_spectrum_scope *result = 0 ;
  
  SWIG_check_num_args("rig_caps::spectrum_scopes",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::spectrum_scopes",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_spectrum_scopes_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (struct rig_spectrum_scope *)(struct rig_spectrum_scope *) ((arg1)->spectrum_scopes);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_rig_spectrum_scope,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_spectrum_modes_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  enum rig_spectrum_mode_e *arg2 = (enum rig_spectrum_mode_e *)0 ;
  
  SWIG_check_num_args("rig_caps::spectrum_modes",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::spectrum_modes",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::spectrum_modes",2,"enum rig_spectrum_mode_e [5]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_spectrum_modes_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_rig_spectrum_mode_e,0))){
    SWIG_fail_ptr("rig_caps_spectrum_modes_set",2,SWIGTYPE_p_rig_spectrum_mode_e);
  }
  
  {
    size_t ii;
    enum rig_spectrum_mode_e *b = (enum rig_spectrum_mode_e *) arg1->spectrum_modes;
    for (ii = 0; ii < (size_t)5; ii++) b[ii] = *((enum rig_spectrum_mode_e *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_spectrum_modes_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  enum rig_spectrum_mode_e *result = 0 ;
  
  SWIG_check_num_args("rig_caps::spectrum_modes",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::spectrum_modes",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_spectrum_modes_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (enum rig_spectrum_mode_e *)(enum rig_spectrum_mode_e *) ((arg1)->spectrum_modes);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_rig_spectrum_mode_e,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_spectrum_spans_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_t *arg2 = (freq_t *)0 ;
  
  SWIG_check_num_args("rig_caps::spectrum_spans",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::spectrum_spans",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::spectrum_spans",2,"freq_t [20]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_spectrum_spans_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_double,0))){
    SWIG_fail_ptr("rig_caps_spectrum_spans_set",2,SWIGTYPE_p_double);
  }
  
  {
    size_t ii;
    freq_t *b = (freq_t *) arg1->spectrum_spans;
    for (ii = 0; ii < (size_t)20; ii++) b[ii] = *((freq_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_spectrum_spans_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  freq_t *result = 0 ;
  
  SWIG_check_num_args("rig_caps::spectrum_spans",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::spectrum_spans",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_spectrum_spans_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (freq_t *)(freq_t *) ((arg1)->spectrum_spans);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_double,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_spectrum_avg_modes_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  struct rig_spectrum_avg_mode *arg2 = (struct rig_spectrum_avg_mode *)0 ;
  
  SWIG_check_num_args("rig_caps::spectrum_avg_modes",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::spectrum_avg_modes",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::spectrum_avg_modes",2,"struct rig_spectrum_avg_mode [12]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_spectrum_avg_modes_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_rig_spectrum_avg_mode,0))){
    SWIG_fail_ptr("rig_caps_spectrum_avg_modes_set",2,SWIGTYPE_p_rig_spectrum_avg_mode);
  }
  
  {
    size_t ii;
    struct rig_spectrum_avg_mode *b = (struct rig_spectrum_avg_mode *) arg1->spectrum_avg_modes;
    for (ii = 0; ii < (size_t)12; ii++) b[ii] = *((struct rig_spectrum_avg_mode *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_spectrum_avg_modes_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  struct rig_spectrum_avg_mode *result = 0 ;
  
  SWIG_check_num_args("rig_caps::spectrum_avg_modes",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::spectrum_avg_modes",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_spectrum_avg_modes_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (struct rig_spectrum_avg_mode *)(struct rig_spectrum_avg_mode *) ((arg1)->spectrum_avg_modes);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_rig_spectrum_avg_mode,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_spectrum_attenuator_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int *arg2 = (int *)0 ;
  
  SWIG_check_num_args("rig_caps::spectrum_attenuator",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::spectrum_attenuator",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::spectrum_attenuator",2,"int [8]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_spectrum_attenuator_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_int,0))){
    SWIG_fail_ptr("rig_caps_spectrum_attenuator_set",2,SWIGTYPE_p_int);
  }
  
  {
    size_t ii;
    int *b = (int *) arg1->spectrum_attenuator;
    for (ii = 0; ii < (size_t)8; ii++) b[ii] = *((int *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_spectrum_attenuator_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int *result = 0 ;
  
  SWIG_check_num_args("rig_caps::spectrum_attenuator",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::spectrum_attenuator",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_spectrum_attenuator_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int *)(int *) ((arg1)->spectrum_attenuator);
  {
    int len,i;
    len = 8;
    lua_createtable (L, len, 0);
    for(i=0; i<len; i++) {
      lua_pushinteger(L, (i+1)); // Lua starts list index with 1
      lua_pushinteger(L, (lua_Integer)result[i]);
      lua_rawset(L, -3);
    }
    SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_cfgparams_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  struct confparams *arg2 = 0 ;
  
  SWIG_check_num_args("rig_caps::cfgparams",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::cfgparams",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::cfgparams",2,"struct confparams const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_cfgparams_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_confparams,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("rig_caps_cfgparams_set",2,SWIGTYPE_p_confparams);
  }
  
  if (arg1) (arg1)->cfgparams = (struct confparams const *)arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_cfgparams_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  struct confparams *result = 0 ;
  
  SWIG_check_num_args("rig_caps::cfgparams",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::cfgparams",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_cfgparams_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (struct confparams *) ((arg1)->cfgparams);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_confparams,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_priv_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("rig_caps::priv",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::priv",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::priv",2,"void const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_priv_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"rig_caps_priv_set");
  if (arg1) (arg1)->priv = (void const *)arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_priv_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("rig_caps::priv",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::priv",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_priv_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (void *) ((arg1)->priv);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rig_init_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *) = 0 ;
  
  SWIG_check_num_args("rig_caps::rig_init",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rig_init",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::rig_init",2,"int (*)(RIG *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rig_init_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig__int,0))){
    SWIG_fail_ptr("rig_caps_rig_init_set",2,SWIGTYPE_p_f_p_struct_s_rig__int);
  }
  
  if (arg1) (arg1)->rig_init = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rig_init_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *) = 0 ;
  
  SWIG_check_num_args("rig_caps::rig_init",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rig_init",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rig_init_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *)) ((arg1)->rig_init);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rig_cleanup_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *) = 0 ;
  
  SWIG_check_num_args("rig_caps::rig_cleanup",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rig_cleanup",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::rig_cleanup",2,"int (*)(RIG *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rig_cleanup_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig__int,0))){
    SWIG_fail_ptr("rig_caps_rig_cleanup_set",2,SWIGTYPE_p_f_p_struct_s_rig__int);
  }
  
  if (arg1) (arg1)->rig_cleanup = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rig_cleanup_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *) = 0 ;
  
  SWIG_check_num_args("rig_caps::rig_cleanup",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rig_cleanup",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rig_cleanup_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *)) ((arg1)->rig_cleanup);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rig_open_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *) = 0 ;
  
  SWIG_check_num_args("rig_caps::rig_open",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rig_open",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::rig_open",2,"int (*)(RIG *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rig_open_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig__int,0))){
    SWIG_fail_ptr("rig_caps_rig_open_set",2,SWIGTYPE_p_f_p_struct_s_rig__int);
  }
  
  if (arg1) (arg1)->rig_open = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rig_open_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *) = 0 ;
  
  SWIG_check_num_args("rig_caps::rig_open",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rig_open",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rig_open_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *)) ((arg1)->rig_open);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rig_close_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *) = 0 ;
  
  SWIG_check_num_args("rig_caps::rig_close",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rig_close",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::rig_close",2,"int (*)(RIG *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rig_close_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig__int,0))){
    SWIG_fail_ptr("rig_caps_rig_close_set",2,SWIGTYPE_p_f_p_struct_s_rig__int);
  }
  
  if (arg1) (arg1)->rig_close = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rig_close_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *) = 0 ;
  
  SWIG_check_num_args("rig_caps::rig_close",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rig_close",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rig_close_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *)) ((arg1)->rig_close);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_freq_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,freq_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_freq",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_freq",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_freq",2,"int (*)(RIG *,vfo_t,freq_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_freq_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_double__int,0))){
    SWIG_fail_ptr("rig_caps_set_freq_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_double__int);
  }
  
  if (arg1) (arg1)->set_freq = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_freq_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,freq_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_freq",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_freq",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_freq_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,freq_t)) ((arg1)->set_freq);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_double__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_freq_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,freq_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_freq",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_freq",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_freq",2,"int (*)(RIG *,vfo_t,freq_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_freq_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_double__int,0))){
    SWIG_fail_ptr("rig_caps_get_freq_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_double__int);
  }
  
  if (arg1) (arg1)->get_freq = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_freq_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,freq_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_freq",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_freq",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_freq_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,freq_t *)) ((arg1)->get_freq);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_double__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_mode_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,rmode_t,pbwidth_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_mode",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_mode",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_mode",2,"int (*)(RIG *,vfo_t,rmode_t,pbwidth_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_mode_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long__int,0))){
    SWIG_fail_ptr("rig_caps_set_mode_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long__int);
  }
  
  if (arg1) (arg1)->set_mode = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_mode_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,rmode_t,pbwidth_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_mode",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_mode",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_mode_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,rmode_t,pbwidth_t)) ((arg1)->set_mode);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_mode_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,rmode_t *,pbwidth_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_mode",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_mode",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_mode",2,"int (*)(RIG *,vfo_t,rmode_t *,pbwidth_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_mode_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_long_long_p_long__int,0))){
    SWIG_fail_ptr("rig_caps_get_mode_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_long_long_p_long__int);
  }
  
  if (arg1) (arg1)->get_mode = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_mode_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,rmode_t *,pbwidth_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_mode",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_mode",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_mode_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,rmode_t *,pbwidth_t *)) ((arg1)->get_mode);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_long_long_p_long__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_vfo_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_vfo",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_vfo",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_vfo",2,"int (*)(RIG *,vfo_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_vfo_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_set_vfo_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int__int);
  }
  
  if (arg1) (arg1)->set_vfo = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_vfo_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_vfo",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_vfo",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_vfo_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t)) ((arg1)->set_vfo);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_vfo_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_vfo",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_vfo",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_vfo",2,"int (*)(RIG *,vfo_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_vfo_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_p_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_get_vfo_set",2,SWIGTYPE_p_f_p_struct_s_rig_p_unsigned_int__int);
  }
  
  if (arg1) (arg1)->get_vfo = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_vfo_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_vfo",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_vfo",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_vfo_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t *)) ((arg1)->get_vfo);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_p_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_ptt_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,ptt_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_ptt",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_ptt",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_ptt",2,"int (*)(RIG *,vfo_t,ptt_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_ptt_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_ptt_t__int,0))){
    SWIG_fail_ptr("rig_caps_set_ptt_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_ptt_t__int);
  }
  
  if (arg1) (arg1)->set_ptt = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_ptt_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,ptt_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_ptt",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_ptt",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_ptt_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,ptt_t)) ((arg1)->set_ptt);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_ptt_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_ptt_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,ptt_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_ptt",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_ptt",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_ptt",2,"int (*)(RIG *,vfo_t,ptt_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_ptt_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_enum_ptt_t__int,0))){
    SWIG_fail_ptr("rig_caps_get_ptt_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_enum_ptt_t__int);
  }
  
  if (arg1) (arg1)->get_ptt = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_ptt_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,ptt_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_ptt",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_ptt",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_ptt_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,ptt_t *)) ((arg1)->get_ptt);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_enum_ptt_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_dcd_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,dcd_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_dcd",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_dcd",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_dcd",2,"int (*)(RIG *,vfo_t,dcd_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_dcd_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_enum_dcd_e__int,0))){
    SWIG_fail_ptr("rig_caps_get_dcd_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_enum_dcd_e__int);
  }
  
  if (arg1) (arg1)->get_dcd = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_dcd_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,dcd_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_dcd",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_dcd",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_dcd_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,dcd_t *)) ((arg1)->get_dcd);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_enum_dcd_e__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_rptr_shift_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,rptr_shift_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_rptr_shift",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_rptr_shift",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_rptr_shift",2,"int (*)(RIG *,vfo_t,rptr_shift_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_rptr_shift_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_rptr_shift_t__int,0))){
    SWIG_fail_ptr("rig_caps_set_rptr_shift_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_rptr_shift_t__int);
  }
  
  if (arg1) (arg1)->set_rptr_shift = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_rptr_shift_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,rptr_shift_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_rptr_shift",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_rptr_shift",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_rptr_shift_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,rptr_shift_t)) ((arg1)->set_rptr_shift);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_rptr_shift_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_rptr_shift_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,rptr_shift_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_rptr_shift",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_rptr_shift",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_rptr_shift",2,"int (*)(RIG *,vfo_t,rptr_shift_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_rptr_shift_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_enum_rptr_shift_t__int,0))){
    SWIG_fail_ptr("rig_caps_get_rptr_shift_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_enum_rptr_shift_t__int);
  }
  
  if (arg1) (arg1)->get_rptr_shift = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_rptr_shift_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,rptr_shift_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_rptr_shift",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_rptr_shift",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_rptr_shift_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,rptr_shift_t *)) ((arg1)->get_rptr_shift);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_enum_rptr_shift_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_rptr_offs_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,shortfreq_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_rptr_offs",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_rptr_offs",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_rptr_offs",2,"int (*)(RIG *,vfo_t,shortfreq_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_rptr_offs_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long__int,0))){
    SWIG_fail_ptr("rig_caps_set_rptr_offs_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long__int);
  }
  
  if (arg1) (arg1)->set_rptr_offs = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_rptr_offs_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,shortfreq_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_rptr_offs",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_rptr_offs",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_rptr_offs_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,shortfreq_t)) ((arg1)->set_rptr_offs);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_rptr_offs_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,shortfreq_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_rptr_offs",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_rptr_offs",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_rptr_offs",2,"int (*)(RIG *,vfo_t,shortfreq_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_rptr_offs_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_long__int,0))){
    SWIG_fail_ptr("rig_caps_get_rptr_offs_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_long__int);
  }
  
  if (arg1) (arg1)->get_rptr_offs = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_rptr_offs_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,shortfreq_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_rptr_offs",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_rptr_offs",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_rptr_offs_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,shortfreq_t *)) ((arg1)->get_rptr_offs);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_long__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_split_freq_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,freq_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_split_freq",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_split_freq",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_split_freq",2,"int (*)(RIG *,vfo_t,freq_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_split_freq_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_double__int,0))){
    SWIG_fail_ptr("rig_caps_set_split_freq_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_double__int);
  }
  
  if (arg1) (arg1)->set_split_freq = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_split_freq_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,freq_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_split_freq",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_split_freq",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_split_freq_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,freq_t)) ((arg1)->set_split_freq);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_double__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_split_freq_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,freq_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_split_freq",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_split_freq",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_split_freq",2,"int (*)(RIG *,vfo_t,freq_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_split_freq_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_double__int,0))){
    SWIG_fail_ptr("rig_caps_get_split_freq_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_double__int);
  }
  
  if (arg1) (arg1)->get_split_freq = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_split_freq_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,freq_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_split_freq",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_split_freq",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_split_freq_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,freq_t *)) ((arg1)->get_split_freq);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_double__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_split_mode_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,rmode_t,pbwidth_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_split_mode",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_split_mode",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_split_mode",2,"int (*)(RIG *,vfo_t,rmode_t,pbwidth_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_split_mode_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long__int,0))){
    SWIG_fail_ptr("rig_caps_set_split_mode_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long__int);
  }
  
  if (arg1) (arg1)->set_split_mode = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_split_mode_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,rmode_t,pbwidth_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_split_mode",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_split_mode",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_split_mode_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,rmode_t,pbwidth_t)) ((arg1)->set_split_mode);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_split_mode_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,rmode_t *,pbwidth_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_split_mode",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_split_mode",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_split_mode",2,"int (*)(RIG *,vfo_t,rmode_t *,pbwidth_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_split_mode_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_long_long_p_long__int,0))){
    SWIG_fail_ptr("rig_caps_get_split_mode_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_long_long_p_long__int);
  }
  
  if (arg1) (arg1)->get_split_mode = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_split_mode_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,rmode_t *,pbwidth_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_split_mode",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_split_mode",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_split_mode_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,rmode_t *,pbwidth_t *)) ((arg1)->get_split_mode);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_long_long_p_long__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_split_freq_mode_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,freq_t,rmode_t,pbwidth_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_split_freq_mode",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_split_freq_mode",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_split_freq_mode",2,"int (*)(RIG *,vfo_t,freq_t,rmode_t,pbwidth_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_split_freq_mode_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_double_unsigned_long_long_long__int,0))){
    SWIG_fail_ptr("rig_caps_set_split_freq_mode_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_double_unsigned_long_long_long__int);
  }
  
  if (arg1) (arg1)->set_split_freq_mode = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_split_freq_mode_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,freq_t,rmode_t,pbwidth_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_split_freq_mode",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_split_freq_mode",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_split_freq_mode_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,freq_t,rmode_t,pbwidth_t)) ((arg1)->set_split_freq_mode);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_double_unsigned_long_long_long__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_split_freq_mode_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,freq_t *,rmode_t *,pbwidth_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_split_freq_mode",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_split_freq_mode",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_split_freq_mode",2,"int (*)(RIG *,vfo_t,freq_t *,rmode_t *,pbwidth_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_split_freq_mode_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long__int,0))){
    SWIG_fail_ptr("rig_caps_get_split_freq_mode_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long__int);
  }
  
  if (arg1) (arg1)->get_split_freq_mode = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_split_freq_mode_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,freq_t *,rmode_t *,pbwidth_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_split_freq_mode",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_split_freq_mode",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_split_freq_mode_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,freq_t *,rmode_t *,pbwidth_t *)) ((arg1)->get_split_freq_mode);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_split_vfo_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,split_t,vfo_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_split_vfo",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_split_vfo",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_split_vfo",2,"int (*)(RIG *,vfo_t,split_t,vfo_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_split_vfo_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_split_t_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_set_split_vfo_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_split_t_unsigned_int__int);
  }
  
  if (arg1) (arg1)->set_split_vfo = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_split_vfo_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,split_t,vfo_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_split_vfo",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_split_vfo",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_split_vfo_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,split_t,vfo_t)) ((arg1)->set_split_vfo);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_split_t_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_split_vfo_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,split_t *,vfo_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_split_vfo",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_split_vfo",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_split_vfo",2,"int (*)(RIG *,vfo_t,split_t *,vfo_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_split_vfo_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_enum_split_t_p_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_get_split_vfo_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_enum_split_t_p_unsigned_int__int);
  }
  
  if (arg1) (arg1)->get_split_vfo = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_split_vfo_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,split_t *,vfo_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_split_vfo",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_split_vfo",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_split_vfo_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,split_t *,vfo_t *)) ((arg1)->get_split_vfo);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_enum_split_t_p_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_rit_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,shortfreq_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_rit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_rit",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_rit",2,"int (*)(RIG *,vfo_t,shortfreq_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_rit_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long__int,0))){
    SWIG_fail_ptr("rig_caps_set_rit_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long__int);
  }
  
  if (arg1) (arg1)->set_rit = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_rit_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,shortfreq_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_rit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_rit",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_rit_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,shortfreq_t)) ((arg1)->set_rit);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_rit_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,shortfreq_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_rit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_rit",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_rit",2,"int (*)(RIG *,vfo_t,shortfreq_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_rit_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_long__int,0))){
    SWIG_fail_ptr("rig_caps_get_rit_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_long__int);
  }
  
  if (arg1) (arg1)->get_rit = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_rit_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,shortfreq_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_rit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_rit",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_rit_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,shortfreq_t *)) ((arg1)->get_rit);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_long__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_xit_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,shortfreq_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_xit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_xit",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_xit",2,"int (*)(RIG *,vfo_t,shortfreq_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_xit_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long__int,0))){
    SWIG_fail_ptr("rig_caps_set_xit_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long__int);
  }
  
  if (arg1) (arg1)->set_xit = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_xit_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,shortfreq_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_xit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_xit",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_xit_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,shortfreq_t)) ((arg1)->set_xit);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_xit_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,shortfreq_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_xit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_xit",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_xit",2,"int (*)(RIG *,vfo_t,shortfreq_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_xit_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_long__int,0))){
    SWIG_fail_ptr("rig_caps_get_xit_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_long__int);
  }
  
  if (arg1) (arg1)->get_xit = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_xit_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,shortfreq_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_xit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_xit",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_xit_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,shortfreq_t *)) ((arg1)->get_xit);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_long__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_ts_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,shortfreq_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_ts",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_ts",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_ts",2,"int (*)(RIG *,vfo_t,shortfreq_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_ts_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long__int,0))){
    SWIG_fail_ptr("rig_caps_set_ts_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long__int);
  }
  
  if (arg1) (arg1)->set_ts = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_ts_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,shortfreq_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_ts",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_ts",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_ts_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,shortfreq_t)) ((arg1)->set_ts);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_ts_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,shortfreq_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_ts",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_ts",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_ts",2,"int (*)(RIG *,vfo_t,shortfreq_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_ts_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_long__int,0))){
    SWIG_fail_ptr("rig_caps_get_ts_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_long__int);
  }
  
  if (arg1) (arg1)->get_ts = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_ts_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,shortfreq_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_ts",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_ts",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_ts_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,shortfreq_t *)) ((arg1)->get_ts);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_long__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_dcs_code_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,tone_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_dcs_code",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_dcs_code",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_dcs_code",2,"int (*)(RIG *,vfo_t,tone_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_dcs_code_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_set_dcs_code_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int);
  }
  
  if (arg1) (arg1)->set_dcs_code = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_dcs_code_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,tone_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_dcs_code",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_dcs_code",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_dcs_code_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,tone_t)) ((arg1)->set_dcs_code);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_dcs_code_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,tone_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_dcs_code",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_dcs_code",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_dcs_code",2,"int (*)(RIG *,vfo_t,tone_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_dcs_code_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_get_dcs_code_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int);
  }
  
  if (arg1) (arg1)->get_dcs_code = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_dcs_code_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,tone_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_dcs_code",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_dcs_code",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_dcs_code_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,tone_t *)) ((arg1)->get_dcs_code);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_tone_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,tone_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_tone",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_tone",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_tone",2,"int (*)(RIG *,vfo_t,tone_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_tone_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_set_tone_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int);
  }
  
  if (arg1) (arg1)->set_tone = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_tone_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,tone_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_tone",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_tone",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_tone_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,tone_t)) ((arg1)->set_tone);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_tone_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,tone_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_tone",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_tone",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_tone",2,"int (*)(RIG *,vfo_t,tone_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_tone_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_get_tone_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int);
  }
  
  if (arg1) (arg1)->get_tone = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_tone_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,tone_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_tone",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_tone",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_tone_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,tone_t *)) ((arg1)->get_tone);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_ctcss_tone_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,tone_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_ctcss_tone",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_ctcss_tone",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_ctcss_tone",2,"int (*)(RIG *,vfo_t,tone_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_ctcss_tone_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_set_ctcss_tone_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int);
  }
  
  if (arg1) (arg1)->set_ctcss_tone = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_ctcss_tone_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,tone_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_ctcss_tone",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_ctcss_tone",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_ctcss_tone_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,tone_t)) ((arg1)->set_ctcss_tone);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_ctcss_tone_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,tone_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_ctcss_tone",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_ctcss_tone",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_ctcss_tone",2,"int (*)(RIG *,vfo_t,tone_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_ctcss_tone_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_get_ctcss_tone_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int);
  }
  
  if (arg1) (arg1)->get_ctcss_tone = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_ctcss_tone_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,tone_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_ctcss_tone",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_ctcss_tone",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_ctcss_tone_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,tone_t *)) ((arg1)->get_ctcss_tone);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_dcs_sql_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,tone_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_dcs_sql",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_dcs_sql",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_dcs_sql",2,"int (*)(RIG *,vfo_t,tone_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_dcs_sql_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_set_dcs_sql_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int);
  }
  
  if (arg1) (arg1)->set_dcs_sql = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_dcs_sql_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,tone_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_dcs_sql",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_dcs_sql",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_dcs_sql_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,tone_t)) ((arg1)->set_dcs_sql);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_dcs_sql_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,tone_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_dcs_sql",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_dcs_sql",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_dcs_sql",2,"int (*)(RIG *,vfo_t,tone_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_dcs_sql_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_get_dcs_sql_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int);
  }
  
  if (arg1) (arg1)->get_dcs_sql = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_dcs_sql_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,tone_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_dcs_sql",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_dcs_sql",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_dcs_sql_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,tone_t *)) ((arg1)->get_dcs_sql);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_tone_sql_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,tone_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_tone_sql",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_tone_sql",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_tone_sql",2,"int (*)(RIG *,vfo_t,tone_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_tone_sql_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_set_tone_sql_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int);
  }
  
  if (arg1) (arg1)->set_tone_sql = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_tone_sql_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,tone_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_tone_sql",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_tone_sql",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_tone_sql_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,tone_t)) ((arg1)->set_tone_sql);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_tone_sql_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,tone_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_tone_sql",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_tone_sql",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_tone_sql",2,"int (*)(RIG *,vfo_t,tone_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_tone_sql_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_get_tone_sql_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int);
  }
  
  if (arg1) (arg1)->get_tone_sql = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_tone_sql_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,tone_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_tone_sql",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_tone_sql",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_tone_sql_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,tone_t *)) ((arg1)->get_tone_sql);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_ctcss_sql_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,tone_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_ctcss_sql",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_ctcss_sql",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_ctcss_sql",2,"int (*)(RIG *,vfo_t,tone_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_ctcss_sql_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_set_ctcss_sql_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int);
  }
  
  if (arg1) (arg1)->set_ctcss_sql = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_ctcss_sql_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,tone_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_ctcss_sql",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_ctcss_sql",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_ctcss_sql_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,tone_t)) ((arg1)->set_ctcss_sql);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_ctcss_sql_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,tone_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_ctcss_sql",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_ctcss_sql",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_ctcss_sql",2,"int (*)(RIG *,vfo_t,tone_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_ctcss_sql_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_get_ctcss_sql_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int);
  }
  
  if (arg1) (arg1)->get_ctcss_sql = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_ctcss_sql_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,tone_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_ctcss_sql",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_ctcss_sql",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_ctcss_sql_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,tone_t *)) ((arg1)->get_ctcss_sql);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_power2mW_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,unsigned int *,float,freq_t,rmode_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::power2mW",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::power2mW",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::power2mW",2,"int (*)(RIG *,unsigned int *,float,freq_t,rmode_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_power2mW_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_p_unsigned_int_float_double_unsigned_long_long__int,0))){
    SWIG_fail_ptr("rig_caps_power2mW_set",2,SWIGTYPE_p_f_p_struct_s_rig_p_unsigned_int_float_double_unsigned_long_long__int);
  }
  
  if (arg1) (arg1)->power2mW = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_power2mW_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,unsigned int *,float,freq_t,rmode_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::power2mW",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::power2mW",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_power2mW_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,unsigned int *,float,freq_t,rmode_t)) ((arg1)->power2mW);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_p_unsigned_int_float_double_unsigned_long_long__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_mW2power_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,float *,unsigned int,freq_t,rmode_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::mW2power",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::mW2power",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::mW2power",2,"int (*)(RIG *,float *,unsigned int,freq_t,rmode_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_mW2power_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_p_float_unsigned_int_double_unsigned_long_long__int,0))){
    SWIG_fail_ptr("rig_caps_mW2power_set",2,SWIGTYPE_p_f_p_struct_s_rig_p_float_unsigned_int_double_unsigned_long_long__int);
  }
  
  if (arg1) (arg1)->mW2power = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_mW2power_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,float *,unsigned int,freq_t,rmode_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::mW2power",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::mW2power",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_mW2power_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,float *,unsigned int,freq_t,rmode_t)) ((arg1)->mW2power);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_p_float_unsigned_int_double_unsigned_long_long__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_powerstat_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,powerstat_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_powerstat",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_powerstat",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_powerstat",2,"int (*)(RIG *,powerstat_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_powerstat_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_enum_powerstat_t__int,0))){
    SWIG_fail_ptr("rig_caps_set_powerstat_set",2,SWIGTYPE_p_f_p_struct_s_rig_enum_powerstat_t__int);
  }
  
  if (arg1) (arg1)->set_powerstat = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_powerstat_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,powerstat_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_powerstat",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_powerstat",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_powerstat_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,powerstat_t)) ((arg1)->set_powerstat);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_enum_powerstat_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_powerstat_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,powerstat_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_powerstat",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_powerstat",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_powerstat",2,"int (*)(RIG *,powerstat_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_powerstat_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_p_enum_powerstat_t__int,0))){
    SWIG_fail_ptr("rig_caps_get_powerstat_set",2,SWIGTYPE_p_f_p_struct_s_rig_p_enum_powerstat_t__int);
  }
  
  if (arg1) (arg1)->get_powerstat = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_powerstat_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,powerstat_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_powerstat",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_powerstat",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_powerstat_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,powerstat_t *)) ((arg1)->get_powerstat);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_p_enum_powerstat_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_reset_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,reset_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::reset",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::reset",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::reset",2,"int (*)(RIG *,reset_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_reset_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_enum_reset_t__int,0))){
    SWIG_fail_ptr("rig_caps_reset_set",2,SWIGTYPE_p_f_p_struct_s_rig_enum_reset_t__int);
  }
  
  if (arg1) (arg1)->reset = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_reset_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,reset_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::reset",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::reset",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_reset_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,reset_t)) ((arg1)->reset);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_enum_reset_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_ant_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,ant_t,value_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_ant",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_ant",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_ant",2,"int (*)(RIG *,vfo_t,ant_t,value_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_ant_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int_value_t__int,0))){
    SWIG_fail_ptr("rig_caps_set_ant_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int_value_t__int);
  }
  
  if (arg1) (arg1)->set_ant = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_ant_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,ant_t,value_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_ant",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_ant",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_ant_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,ant_t,value_t)) ((arg1)->set_ant);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_ant_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,ant_t,value_t *,ant_t *,ant_t *,ant_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_ant",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_ant",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_ant",2,"int (*)(RIG *,vfo_t,ant_t,value_t *,ant_t *,ant_t *,ant_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_ant_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int_p_value_t_p_unsigned_int_p_unsigned_int_p_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_get_ant_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int_p_value_t_p_unsigned_int_p_unsigned_int_p_unsigned_int__int);
  }
  
  if (arg1) (arg1)->get_ant = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_ant_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,ant_t,value_t *,ant_t *,ant_t *,ant_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_ant",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_ant",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_ant_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,ant_t,value_t *,ant_t *,ant_t *,ant_t *)) ((arg1)->get_ant);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_int_p_value_t_p_unsigned_int_p_unsigned_int_p_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,setting_t,value_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_level",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_level",2,"int (*)(RIG *,vfo_t,setting_t,value_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_level_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_value_t__int,0))){
    SWIG_fail_ptr("rig_caps_set_level_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_value_t__int);
  }
  
  if (arg1) (arg1)->set_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,setting_t,value_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_level",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_level_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,setting_t,value_t)) ((arg1)->set_level);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,setting_t,value_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_level",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_level",2,"int (*)(RIG *,vfo_t,setting_t,value_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_level_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_value_t__int,0))){
    SWIG_fail_ptr("rig_caps_get_level_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_value_t__int);
  }
  
  if (arg1) (arg1)->get_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,setting_t,value_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_level",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_level_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,setting_t,value_t *)) ((arg1)->get_level);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_func_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,setting_t,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_func",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_func",2,"int (*)(RIG *,vfo_t,setting_t,int)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_func_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_int__int,0))){
    SWIG_fail_ptr("rig_caps_set_func_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_int__int);
  }
  
  if (arg1) (arg1)->set_func = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_func_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,setting_t,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_func",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_func",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_func_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,setting_t,int)) ((arg1)->set_func);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_func_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,setting_t,int *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_func",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_func",2,"int (*)(RIG *,vfo_t,setting_t,int *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_func_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_int__int,0))){
    SWIG_fail_ptr("rig_caps_get_func_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_int__int);
  }
  
  if (arg1) (arg1)->get_func = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_func_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,setting_t,int *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_func",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_func",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_func_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,setting_t,int *)) ((arg1)->get_func);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_parm_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,setting_t,value_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_parm",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_parm",2,"int (*)(RIG *,setting_t,value_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_parm_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_long_long_value_t__int,0))){
    SWIG_fail_ptr("rig_caps_set_parm_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_long_long_value_t__int);
  }
  
  if (arg1) (arg1)->set_parm = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_parm_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,setting_t,value_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_parm",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_parm",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_parm_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,setting_t,value_t)) ((arg1)->set_parm);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_long_long_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_parm_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,setting_t,value_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_parm",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_parm",2,"int (*)(RIG *,setting_t,value_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_parm_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_long_long_p_value_t__int,0))){
    SWIG_fail_ptr("rig_caps_get_parm_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_long_long_p_value_t__int);
  }
  
  if (arg1) (arg1)->get_parm = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_parm_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,setting_t,value_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_parm",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_parm",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_parm_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,setting_t,value_t *)) ((arg1)->get_parm);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_long_long_p_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_ext_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,hamlib_token_t,value_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_ext_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_ext_level",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_ext_level",2,"int (*)(RIG *,vfo_t,hamlib_token_t,value_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_ext_level_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long_value_t__int,0))){
    SWIG_fail_ptr("rig_caps_set_ext_level_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long_value_t__int);
  }
  
  if (arg1) (arg1)->set_ext_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_ext_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,hamlib_token_t,value_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_ext_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_ext_level",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_ext_level_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,hamlib_token_t,value_t)) ((arg1)->set_ext_level);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_ext_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,hamlib_token_t,value_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_ext_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_ext_level",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_ext_level",2,"int (*)(RIG *,vfo_t,hamlib_token_t,value_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_ext_level_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long_p_value_t__int,0))){
    SWIG_fail_ptr("rig_caps_get_ext_level_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long_p_value_t__int);
  }
  
  if (arg1) (arg1)->get_ext_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_ext_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,hamlib_token_t,value_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_ext_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_ext_level",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_ext_level_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,hamlib_token_t,value_t *)) ((arg1)->get_ext_level);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long_p_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_ext_func_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,hamlib_token_t,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_ext_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_ext_func",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_ext_func",2,"int (*)(RIG *,vfo_t,hamlib_token_t,int)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_ext_func_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long_int__int,0))){
    SWIG_fail_ptr("rig_caps_set_ext_func_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long_int__int);
  }
  
  if (arg1) (arg1)->set_ext_func = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_ext_func_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,hamlib_token_t,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_ext_func",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_ext_func",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_ext_func_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,hamlib_token_t,int)) ((arg1)->set_ext_func);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_ext_func_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,hamlib_token_t,int *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_ext_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_ext_func",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_ext_func",2,"int (*)(RIG *,vfo_t,hamlib_token_t,int *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_ext_func_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long_p_int__int,0))){
    SWIG_fail_ptr("rig_caps_get_ext_func_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long_p_int__int);
  }
  
  if (arg1) (arg1)->get_ext_func = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_ext_func_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,hamlib_token_t,int *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_ext_func",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_ext_func",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_ext_func_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,hamlib_token_t,int *)) ((arg1)->get_ext_func);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_long_p_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_ext_parm_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,hamlib_token_t,value_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_ext_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_ext_parm",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_ext_parm",2,"int (*)(RIG *,hamlib_token_t,value_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_ext_parm_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_long_value_t__int,0))){
    SWIG_fail_ptr("rig_caps_set_ext_parm_set",2,SWIGTYPE_p_f_p_struct_s_rig_long_value_t__int);
  }
  
  if (arg1) (arg1)->set_ext_parm = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_ext_parm_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,hamlib_token_t,value_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_ext_parm",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_ext_parm",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_ext_parm_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,hamlib_token_t,value_t)) ((arg1)->set_ext_parm);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_long_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_ext_parm_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,hamlib_token_t,value_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_ext_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_ext_parm",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_ext_parm",2,"int (*)(RIG *,hamlib_token_t,value_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_ext_parm_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_long_p_value_t__int,0))){
    SWIG_fail_ptr("rig_caps_get_ext_parm_set",2,SWIGTYPE_p_f_p_struct_s_rig_long_p_value_t__int);
  }
  
  if (arg1) (arg1)->get_ext_parm = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_ext_parm_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,hamlib_token_t,value_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_ext_parm",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_ext_parm",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_ext_parm_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,hamlib_token_t,value_t *)) ((arg1)->get_ext_parm);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_long_p_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_conf_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,hamlib_token_t,char const *) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_conf",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_conf",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_conf",2,"int (*)(RIG *,hamlib_token_t,char const *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_conf_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_long_p_q_const__char__int,0))){
    SWIG_fail_ptr("rig_caps_set_conf_set",2,SWIGTYPE_p_f_p_struct_s_rig_long_p_q_const__char__int);
  }
  
  if (arg1) (arg1)->set_conf = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_conf_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,hamlib_token_t,char const *) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_conf",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_conf",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_conf_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,hamlib_token_t,char const *)) ((arg1)->set_conf);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_long_p_q_const__char__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_conf_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,hamlib_token_t,char *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_conf",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_conf",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_conf",2,"int (*)(RIG *,hamlib_token_t,char *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_conf_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_long_p_char__int,0))){
    SWIG_fail_ptr("rig_caps_get_conf_set",2,SWIGTYPE_p_f_p_struct_s_rig_long_p_char__int);
  }
  
  if (arg1) (arg1)->get_conf = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_conf_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,hamlib_token_t,char *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_conf",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_conf",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_conf_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,hamlib_token_t,char *)) ((arg1)->get_conf);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_long_p_char__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_send_dtmf_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,char const *) = 0 ;
  
  SWIG_check_num_args("rig_caps::send_dtmf",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::send_dtmf",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::send_dtmf",2,"int (*)(RIG *,vfo_t,char const *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_send_dtmf_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_q_const__char__int,0))){
    SWIG_fail_ptr("rig_caps_send_dtmf_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_q_const__char__int);
  }
  
  if (arg1) (arg1)->send_dtmf = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_send_dtmf_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,char const *) = 0 ;
  
  SWIG_check_num_args("rig_caps::send_dtmf",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::send_dtmf",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_send_dtmf_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,char const *)) ((arg1)->send_dtmf);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_q_const__char__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_recv_dtmf_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,char *,int *) = 0 ;
  
  SWIG_check_num_args("rig_caps::recv_dtmf",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::recv_dtmf",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::recv_dtmf",2,"int (*)(RIG *,vfo_t,char *,int *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_recv_dtmf_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_char_p_int__int,0))){
    SWIG_fail_ptr("rig_caps_recv_dtmf_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_char_p_int__int);
  }
  
  if (arg1) (arg1)->recv_dtmf = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_recv_dtmf_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,char *,int *) = 0 ;
  
  SWIG_check_num_args("rig_caps::recv_dtmf",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::recv_dtmf",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_recv_dtmf_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,char *,int *)) ((arg1)->recv_dtmf);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_char_p_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_send_morse_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,char const *) = 0 ;
  
  SWIG_check_num_args("rig_caps::send_morse",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::send_morse",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::send_morse",2,"int (*)(RIG *,vfo_t,char const *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_send_morse_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_q_const__char__int,0))){
    SWIG_fail_ptr("rig_caps_send_morse_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_q_const__char__int);
  }
  
  if (arg1) (arg1)->send_morse = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_send_morse_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,char const *) = 0 ;
  
  SWIG_check_num_args("rig_caps::send_morse",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::send_morse",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_send_morse_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,char const *)) ((arg1)->send_morse);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_q_const__char__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_stop_morse_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::stop_morse",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::stop_morse",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::stop_morse",2,"int (*)(RIG *,vfo_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_stop_morse_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_stop_morse_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int__int);
  }
  
  if (arg1) (arg1)->stop_morse = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_stop_morse_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::stop_morse",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::stop_morse",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_stop_morse_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t)) ((arg1)->stop_morse);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_wait_morse_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::wait_morse",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::wait_morse",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::wait_morse",2,"int (*)(RIG *,vfo_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_wait_morse_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_wait_morse_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int__int);
  }
  
  if (arg1) (arg1)->wait_morse = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_wait_morse_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::wait_morse",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::wait_morse",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_wait_morse_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t)) ((arg1)->wait_morse);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_send_voice_mem_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::send_voice_mem",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::send_voice_mem",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::send_voice_mem",2,"int (*)(RIG *,vfo_t,int)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_send_voice_mem_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_int__int,0))){
    SWIG_fail_ptr("rig_caps_send_voice_mem_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_int__int);
  }
  
  if (arg1) (arg1)->send_voice_mem = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_send_voice_mem_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::send_voice_mem",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::send_voice_mem",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_send_voice_mem_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,int)) ((arg1)->send_voice_mem);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_stop_voice_mem_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::stop_voice_mem",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::stop_voice_mem",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::stop_voice_mem",2,"int (*)(RIG *,vfo_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_stop_voice_mem_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int__int,0))){
    SWIG_fail_ptr("rig_caps_stop_voice_mem_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int__int);
  }
  
  if (arg1) (arg1)->stop_voice_mem = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_stop_voice_mem_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::stop_voice_mem",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::stop_voice_mem",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_stop_voice_mem_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t)) ((arg1)->stop_voice_mem);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_bank_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_bank",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_bank",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_bank",2,"int (*)(RIG *,vfo_t,int)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_bank_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_int__int,0))){
    SWIG_fail_ptr("rig_caps_set_bank_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_int__int);
  }
  
  if (arg1) (arg1)->set_bank = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_bank_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_bank",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_bank",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_bank_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,int)) ((arg1)->set_bank);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_mem_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_mem",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_mem",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_mem",2,"int (*)(RIG *,vfo_t,int)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_mem_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_int__int,0))){
    SWIG_fail_ptr("rig_caps_set_mem_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_int__int);
  }
  
  if (arg1) (arg1)->set_mem = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_mem_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_mem",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_mem",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_mem_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,int)) ((arg1)->set_mem);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_mem_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,int *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_mem",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_mem",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_mem",2,"int (*)(RIG *,vfo_t,int *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_mem_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_int__int,0))){
    SWIG_fail_ptr("rig_caps_get_mem_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_int__int);
  }
  
  if (arg1) (arg1)->get_mem = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_mem_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,int *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_mem",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_mem",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_mem_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,int *)) ((arg1)->get_mem);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_vfo_op_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,vfo_op_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::vfo_op",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::vfo_op",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::vfo_op",2,"int (*)(RIG *,vfo_t,vfo_op_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_vfo_op_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_vfo_op_t__int,0))){
    SWIG_fail_ptr("rig_caps_vfo_op_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_vfo_op_t__int);
  }
  
  if (arg1) (arg1)->vfo_op = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_vfo_op_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,vfo_op_t) = 0 ;
  
  SWIG_check_num_args("rig_caps::vfo_op",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::vfo_op",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_vfo_op_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,vfo_op_t)) ((arg1)->vfo_op);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_vfo_op_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_scan_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,scan_t,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::scan",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::scan",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::scan",2,"int (*)(RIG *,vfo_t,scan_t,int)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_scan_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_scan_t_int__int,0))){
    SWIG_fail_ptr("rig_caps_scan_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_scan_t_int__int);
  }
  
  if (arg1) (arg1)->scan = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_scan_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,scan_t,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::scan",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::scan",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_scan_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,scan_t,int)) ((arg1)->scan);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_scan_t_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_trn_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_trn",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_trn",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_trn",2,"int (*)(RIG *,int)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_trn_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_int__int,0))){
    SWIG_fail_ptr("rig_caps_set_trn_set",2,SWIGTYPE_p_f_p_struct_s_rig_int__int);
  }
  
  if (arg1) (arg1)->set_trn = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_trn_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_trn",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_trn",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_trn_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,int)) ((arg1)->set_trn);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_trn_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,int *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_trn",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_trn",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_trn",2,"int (*)(RIG *,int *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_trn_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_p_int__int,0))){
    SWIG_fail_ptr("rig_caps_get_trn_set",2,SWIGTYPE_p_f_p_struct_s_rig_p_int__int);
  }
  
  if (arg1) (arg1)->get_trn = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_trn_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,int *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_trn",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_trn",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_trn_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,int *)) ((arg1)->get_trn);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_p_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_decode_event_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *) = 0 ;
  
  SWIG_check_num_args("rig_caps::decode_event",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::decode_event",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::decode_event",2,"int (*)(RIG *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_decode_event_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig__int,0))){
    SWIG_fail_ptr("rig_caps_decode_event_set",2,SWIGTYPE_p_f_p_struct_s_rig__int);
  }
  
  if (arg1) (arg1)->decode_event = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_decode_event_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *) = 0 ;
  
  SWIG_check_num_args("rig_caps::decode_event",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::decode_event",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_decode_event_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *)) ((arg1)->decode_event);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_channel_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,channel_t const *) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_channel",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_channel",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_channel",2,"int (*)(RIG *,vfo_t,channel_t const *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_channel_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_q_const__struct_channel__int,0))){
    SWIG_fail_ptr("rig_caps_set_channel_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_q_const__struct_channel__int);
  }
  
  if (arg1) (arg1)->set_channel = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_channel_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,channel_t const *) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_channel",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_channel",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_channel_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,channel_t const *)) ((arg1)->set_channel);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_q_const__struct_channel__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_channel_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,channel_t *,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_channel",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_channel",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_channel",2,"int (*)(RIG *,vfo_t,channel_t *,int)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_channel_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_struct_channel_int__int,0))){
    SWIG_fail_ptr("rig_caps_get_channel_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_struct_channel_int__int);
  }
  
  if (arg1) (arg1)->get_channel = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_channel_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,channel_t *,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_channel",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_channel",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_channel_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,channel_t *,int)) ((arg1)->get_channel);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_struct_channel_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_info_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  char *(*arg2)(RIG *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_info",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_info",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_info",2,"char const *(*)(RIG *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_info_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig__p_char,0))){
    SWIG_fail_ptr("rig_caps_get_info_set",2,SWIGTYPE_p_f_p_struct_s_rig__p_char);
  }
  
  if (arg1) (arg1)->get_info = (char const *(*)(RIG *))arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_info_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  char *(*result)(RIG *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_info",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_info",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_info_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (char *(*)(RIG *)) ((arg1)->get_info);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig__p_char,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_chan_all_cb_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,chan_cb_t,void *) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_chan_all_cb",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_chan_all_cb",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_chan_all_cb",2,"int (*)(RIG *,vfo_t,chan_cb_t,void *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_chan_all_cb_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_void__int,0))){
    SWIG_fail_ptr("rig_caps_set_chan_all_cb_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_void__int);
  }
  
  if (arg1) (arg1)->set_chan_all_cb = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_chan_all_cb_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,chan_cb_t,void *) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_chan_all_cb",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_chan_all_cb",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_chan_all_cb_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,chan_cb_t,void *)) ((arg1)->set_chan_all_cb);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_void__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_chan_all_cb_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,chan_cb_t,void *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_chan_all_cb",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_chan_all_cb",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_chan_all_cb",2,"int (*)(RIG *,vfo_t,chan_cb_t,void *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_chan_all_cb_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_void__int,0))){
    SWIG_fail_ptr("rig_caps_get_chan_all_cb_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_void__int);
  }
  
  if (arg1) (arg1)->get_chan_all_cb = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_chan_all_cb_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,chan_cb_t,void *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_chan_all_cb",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_chan_all_cb",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_chan_all_cb_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,chan_cb_t,void *)) ((arg1)->get_chan_all_cb);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_void__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_mem_all_cb_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,chan_cb_t,confval_cb_t,void *) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_mem_all_cb",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_mem_all_cb",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_mem_all_cb",2,"int (*)(RIG *,vfo_t,chan_cb_t,confval_cb_t,void *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_mem_all_cb_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_f_p_struct_s_rig_p_q_const__struct_confparams_p_value_t_p_void__int_p_void__int,0))){
    SWIG_fail_ptr("rig_caps_set_mem_all_cb_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_f_p_struct_s_rig_p_q_const__struct_confparams_p_value_t_p_void__int_p_void__int);
  }
  
  if (arg1) (arg1)->set_mem_all_cb = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_mem_all_cb_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,chan_cb_t,confval_cb_t,void *) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_mem_all_cb",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_mem_all_cb",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_mem_all_cb_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,chan_cb_t,confval_cb_t,void *)) ((arg1)->set_mem_all_cb);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_f_p_struct_s_rig_p_q_const__struct_confparams_p_value_t_p_void__int_p_void__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_mem_all_cb_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,chan_cb_t,confval_cb_t,void *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_mem_all_cb",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_mem_all_cb",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_mem_all_cb",2,"int (*)(RIG *,vfo_t,chan_cb_t,confval_cb_t,void *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_mem_all_cb_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_f_p_struct_s_rig_p_q_const__struct_confparams_p_value_t_p_void__int_p_void__int,0))){
    SWIG_fail_ptr("rig_caps_get_mem_all_cb_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_f_p_struct_s_rig_p_q_const__struct_confparams_p_value_t_p_void__int_p_void__int);
  }
  
  if (arg1) (arg1)->get_mem_all_cb = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_mem_all_cb_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,chan_cb_t,confval_cb_t,void *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_mem_all_cb",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_mem_all_cb",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_mem_all_cb_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,chan_cb_t,confval_cb_t,void *)) ((arg1)->get_mem_all_cb);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_f_p_struct_s_rig_p_q_const__struct_confparams_p_value_t_p_void__int_p_void__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_vfo_opt_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_vfo_opt",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_vfo_opt",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_vfo_opt",2,"int (*)(RIG *,int)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_vfo_opt_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_int__int,0))){
    SWIG_fail_ptr("rig_caps_set_vfo_opt_set",2,SWIGTYPE_p_f_p_struct_s_rig_int__int);
  }
  
  if (arg1) (arg1)->set_vfo_opt = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_vfo_opt_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_vfo_opt",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_vfo_opt",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_vfo_opt_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,int)) ((arg1)->set_vfo_opt);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rig_get_vfo_info_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,vfo_t,freq_t *,rmode_t *,pbwidth_t *,split_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::rig_get_vfo_info",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rig_get_vfo_info",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::rig_get_vfo_info",2,"int (*)(RIG *,vfo_t,freq_t *,rmode_t *,pbwidth_t *,split_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rig_get_vfo_info_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_enum_split_t__int,0))){
    SWIG_fail_ptr("rig_caps_rig_get_vfo_info_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_enum_split_t__int);
  }
  
  if (arg1) (arg1)->rig_get_vfo_info = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_rig_get_vfo_info_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,vfo_t,freq_t *,rmode_t *,pbwidth_t *,split_t *) = 0 ;
  
  SWIG_check_num_args("rig_caps::rig_get_vfo_info",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::rig_get_vfo_info",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_rig_get_vfo_info_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,vfo_t,freq_t *,rmode_t *,pbwidth_t *,split_t *)) ((arg1)->rig_get_vfo_info);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_enum_split_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_clock_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,int,int,int,int,int,int,double,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_clock",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_clock",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_clock",2,"int (*)(RIG *,int,int,int,int,int,int,double,int)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_clock_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_int_int_int_int_int_int_double_int__int,0))){
    SWIG_fail_ptr("rig_caps_set_clock_set",2,SWIGTYPE_p_f_p_struct_s_rig_int_int_int_int_int_int_double_int__int);
  }
  
  if (arg1) (arg1)->set_clock = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_clock_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,int,int,int,int,int,int,double,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_clock",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_clock",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_clock_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,int,int,int,int,int,int,double,int)) ((arg1)->set_clock);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_int_int_int_int_int_int_double_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_clock_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,int *,int *,int *,int *,int *,int *,double *,int *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_clock",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_clock",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_clock",2,"int (*)(RIG *,int *,int *,int *,int *,int *,int *,double *,int *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_clock_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_p_int_p_int_p_int_p_int_p_int_p_int_p_double_p_int__int,0))){
    SWIG_fail_ptr("rig_caps_get_clock_set",2,SWIGTYPE_p_f_p_struct_s_rig_p_int_p_int_p_int_p_int_p_int_p_int_p_double_p_int__int);
  }
  
  if (arg1) (arg1)->get_clock = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_clock_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,int *,int *,int *,int *,int *,int *,double *,int *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_clock",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_clock",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_clock_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,int *,int *,int *,int *,int *,int *,double *,int *)) ((arg1)->get_clock);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_p_int_p_int_p_int_p_int_p_int_p_int_p_double_p_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_clone_combo_set_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_caps::clone_combo_set",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::clone_combo_set",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_clone_combo_set_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (char *) ((arg1)->clone_combo_set);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_clone_combo_get_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_caps::clone_combo_get",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::clone_combo_get",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_clone_combo_get_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (char *) ((arg1)->clone_combo_get);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_async_data_supported_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_caps::async_data_supported",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::async_data_supported",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::async_data_supported",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_async_data_supported_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->async_data_supported = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_async_data_supported_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_caps::async_data_supported",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::async_data_supported",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_async_data_supported_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int) ((arg1)->async_data_supported);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_read_frame_direct_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,size_t,unsigned char const *) = 0 ;
  
  SWIG_check_num_args("rig_caps::read_frame_direct",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::read_frame_direct",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::read_frame_direct",2,"int (*)(RIG *,size_t,unsigned char const *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_read_frame_direct_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_size_t_p_q_const__unsigned_char__int,0))){
    SWIG_fail_ptr("rig_caps_read_frame_direct_set",2,SWIGTYPE_p_f_p_struct_s_rig_size_t_p_q_const__unsigned_char__int);
  }
  
  if (arg1) (arg1)->read_frame_direct = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_read_frame_direct_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,size_t,unsigned char const *) = 0 ;
  
  SWIG_check_num_args("rig_caps::read_frame_direct",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::read_frame_direct",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_read_frame_direct_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,size_t,unsigned char const *)) ((arg1)->read_frame_direct);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_size_t_p_q_const__unsigned_char__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_is_async_frame_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,size_t,unsigned char const *) = 0 ;
  
  SWIG_check_num_args("rig_caps::is_async_frame",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::is_async_frame",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::is_async_frame",2,"int (*)(RIG *,size_t,unsigned char const *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_is_async_frame_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_size_t_p_q_const__unsigned_char__int,0))){
    SWIG_fail_ptr("rig_caps_is_async_frame_set",2,SWIGTYPE_p_f_p_struct_s_rig_size_t_p_q_const__unsigned_char__int);
  }
  
  if (arg1) (arg1)->is_async_frame = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_is_async_frame_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,size_t,unsigned char const *) = 0 ;
  
  SWIG_check_num_args("rig_caps::is_async_frame",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::is_async_frame",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_is_async_frame_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,size_t,unsigned char const *)) ((arg1)->is_async_frame);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_size_t_p_q_const__unsigned_char__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_process_async_frame_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,size_t,unsigned char const *) = 0 ;
  
  SWIG_check_num_args("rig_caps::process_async_frame",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::process_async_frame",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::process_async_frame",2,"int (*)(RIG *,size_t,unsigned char const *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_process_async_frame_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_size_t_p_q_const__unsigned_char__int,0))){
    SWIG_fail_ptr("rig_caps_process_async_frame_set",2,SWIGTYPE_p_f_p_struct_s_rig_size_t_p_q_const__unsigned_char__int);
  }
  
  if (arg1) (arg1)->process_async_frame = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_process_async_frame_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,size_t,unsigned char const *) = 0 ;
  
  SWIG_check_num_args("rig_caps::process_async_frame",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::process_async_frame",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_process_async_frame_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,size_t,unsigned char const *)) ((arg1)->process_async_frame);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_size_t_p_q_const__unsigned_char__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_hamlib_check_rig_caps_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  char *arg2 = 0 ;
  
  SWIG_check_num_args("rig_caps::hamlib_check_rig_caps",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::hamlib_check_rig_caps",1,"struct rig_caps *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("rig_caps::hamlib_check_rig_caps",2,"char *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_hamlib_check_rig_caps_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    free(arg1->hamlib_check_rig_caps);
    if (arg2) {
      arg1->hamlib_check_rig_caps = (char *) malloc(strlen((const char *)arg2)+1);
      strcpy((char *)arg1->hamlib_check_rig_caps, (const char *)arg2);
    } else {
      arg1->hamlib_check_rig_caps = 0;
    }
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_hamlib_check_rig_caps_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_caps::hamlib_check_rig_caps",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::hamlib_check_rig_caps",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_hamlib_check_rig_caps_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (char *) ((arg1)->hamlib_check_rig_caps);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_conf2_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,hamlib_token_t,char *,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_conf2",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_conf2",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_conf2",2,"int (*)(RIG *,hamlib_token_t,char *,int)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_conf2_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_long_p_char_int__int,0))){
    SWIG_fail_ptr("rig_caps_get_conf2_set",2,SWIGTYPE_p_f_p_struct_s_rig_long_p_char_int__int);
  }
  
  if (arg1) (arg1)->get_conf2 = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_conf2_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,hamlib_token_t,char *,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_conf2",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_conf2",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_conf2_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,hamlib_token_t,char *,int)) ((arg1)->get_conf2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_long_p_char_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_password_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,char const *) = 0 ;
  
  SWIG_check_num_args("rig_caps::password",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::password",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::password",2,"int (*)(RIG *,char const *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_password_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_p_q_const__char__int,0))){
    SWIG_fail_ptr("rig_caps_password_set",2,SWIGTYPE_p_f_p_struct_s_rig_p_q_const__char__int);
  }
  
  if (arg1) (arg1)->password = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_password_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,char const *) = 0 ;
  
  SWIG_check_num_args("rig_caps::password",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::password",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_password_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,char const *)) ((arg1)->password);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_p_q_const__char__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_lock_mode_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_lock_mode",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_lock_mode",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::set_lock_mode",2,"int (*)(RIG *,int)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_lock_mode_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_int__int,0))){
    SWIG_fail_ptr("rig_caps_set_lock_mode_set",2,SWIGTYPE_p_f_p_struct_s_rig_int__int);
  }
  
  if (arg1) (arg1)->set_lock_mode = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_set_lock_mode_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,int) = 0 ;
  
  SWIG_check_num_args("rig_caps::set_lock_mode",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::set_lock_mode",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_set_lock_mode_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,int)) ((arg1)->set_lock_mode);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_lock_mode_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*arg2)(RIG *,int *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_lock_mode",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_lock_mode",1,"struct rig_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_caps::get_lock_mode",2,"int (*)(RIG *,int *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_lock_mode_set",1,SWIGTYPE_p_rig_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_p_int__int,0))){
    SWIG_fail_ptr("rig_caps_get_lock_mode_set",2,SWIGTYPE_p_f_p_struct_s_rig_p_int__int);
  }
  
  if (arg1) (arg1)->get_lock_mode = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_get_lock_mode_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  int (*result)(RIG *,int *) = 0 ;
  
  SWIG_check_num_args("rig_caps::get_lock_mode",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::get_lock_mode",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_get_lock_mode_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (int (*)(RIG *,int *)) ((arg1)->get_lock_mode);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_p_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_timeout_retry_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  short arg2 ;
  
  SWIG_check_num_args("rig_caps::timeout_retry",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::timeout_retry",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::timeout_retry",2,"short");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_timeout_retry_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (short)lua_tonumber(L, 2);
  if (arg1) (arg1)->timeout_retry = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_timeout_retry_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  short result;
  
  SWIG_check_num_args("rig_caps::timeout_retry",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::timeout_retry",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_timeout_retry_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (short) ((arg1)->timeout_retry);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_morse_qsize_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  short arg2 ;
  
  SWIG_check_num_args("rig_caps::morse_qsize",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::morse_qsize",1,"struct rig_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_caps::morse_qsize",2,"short");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_morse_qsize_set",1,SWIGTYPE_p_rig_caps);
  }
  
  arg2 = (short)lua_tonumber(L, 2);
  if (arg1) (arg1)->morse_qsize = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_caps_morse_qsize_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *arg1 = 0 ;
  short result;
  
  SWIG_check_num_args("rig_caps::morse_qsize",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_caps::morse_qsize",1,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_caps,0))){
    SWIG_fail_ptr("rig_caps_morse_qsize_get",1,SWIGTYPE_p_rig_caps);
  }
  
  result = (short) ((arg1)->morse_qsize);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_rig_caps(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_caps *result = 0 ;
  
  SWIG_check_num_args("rig_caps::rig_caps",0,0)
  result = (struct rig_caps *)calloc(1, sizeof(struct rig_caps));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_rig_caps,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_rig_caps(void *obj) {
struct rig_caps *arg1 = (struct rig_caps *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_rig_caps(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_rig_caps);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_rig_caps_attributes[] = {
    { "rig_model", _wrap_rig_caps_rig_model_get, _wrap_rig_caps_rig_model_set },
    { "model_name", _wrap_rig_caps_model_name_get, SWIG_Lua_set_immutable },
    { "mfg_name", _wrap_rig_caps_mfg_name_get, SWIG_Lua_set_immutable },
    { "version", _wrap_rig_caps_version_get, SWIG_Lua_set_immutable },
    { "copyright", _wrap_rig_caps_copyright_get, SWIG_Lua_set_immutable },
    { "status", _wrap_rig_caps_status_get, _wrap_rig_caps_status_set },
    { "rig_type", _wrap_rig_caps_rig_type_get, _wrap_rig_caps_rig_type_set },
    { "ptt_type", _wrap_rig_caps_ptt_type_get, _wrap_rig_caps_ptt_type_set },
    { "dcd_type", _wrap_rig_caps_dcd_type_get, _wrap_rig_caps_dcd_type_set },
    { "port_type", _wrap_rig_caps_port_type_get, _wrap_rig_caps_port_type_set },
    { "serial_rate_min", _wrap_rig_caps_serial_rate_min_get, _wrap_rig_caps_serial_rate_min_set },
    { "serial_rate_max", _wrap_rig_caps_serial_rate_max_get, _wrap_rig_caps_serial_rate_max_set },
    { "serial_data_bits", _wrap_rig_caps_serial_data_bits_get, _wrap_rig_caps_serial_data_bits_set },
    { "serial_stop_bits", _wrap_rig_caps_serial_stop_bits_get, _wrap_rig_caps_serial_stop_bits_set },
    { "serial_parity", _wrap_rig_caps_serial_parity_get, _wrap_rig_caps_serial_parity_set },
    { "serial_handshake", _wrap_rig_caps_serial_handshake_get, _wrap_rig_caps_serial_handshake_set },
    { "write_delay", _wrap_rig_caps_write_delay_get, _wrap_rig_caps_write_delay_set },
    { "post_write_delay", _wrap_rig_caps_post_write_delay_get, _wrap_rig_caps_post_write_delay_set },
    { "timeout", _wrap_rig_caps_timeout_get, _wrap_rig_caps_timeout_set },
    { "retry", _wrap_rig_caps_retry_get, _wrap_rig_caps_retry_set },
    { "has_get_func", _wrap_rig_caps_has_get_func_get, _wrap_rig_caps_has_get_func_set },
    { "has_set_func", _wrap_rig_caps_has_set_func_get, _wrap_rig_caps_has_set_func_set },
    { "has_get_level", _wrap_rig_caps_has_get_level_get, _wrap_rig_caps_has_get_level_set },
    { "has_set_level", _wrap_rig_caps_has_set_level_get, _wrap_rig_caps_has_set_level_set },
    { "has_get_parm", _wrap_rig_caps_has_get_parm_get, _wrap_rig_caps_has_get_parm_set },
    { "has_set_parm", _wrap_rig_caps_has_set_parm_get, _wrap_rig_caps_has_set_parm_set },
    { "level_gran", _wrap_rig_caps_level_gran_get, _wrap_rig_caps_level_gran_set },
    { "parm_gran", _wrap_rig_caps_parm_gran_get, _wrap_rig_caps_parm_gran_set },
    { "extparms", _wrap_rig_caps_extparms_get, _wrap_rig_caps_extparms_set },
    { "extlevels", _wrap_rig_caps_extlevels_get, _wrap_rig_caps_extlevels_set },
    { "extfuncs", _wrap_rig_caps_extfuncs_get, _wrap_rig_caps_extfuncs_set },
    { "ext_tokens", _wrap_rig_caps_ext_tokens_get, _wrap_rig_caps_ext_tokens_set },
    { "ctcss_list", _wrap_rig_caps_ctcss_list_get, _wrap_rig_caps_ctcss_list_set },
    { "dcs_list", _wrap_rig_caps_dcs_list_get, _wrap_rig_caps_dcs_list_set },
    { "preamp", _wrap_rig_caps_preamp_get, _wrap_rig_caps_preamp_set },
    { "attenuator", _wrap_rig_caps_attenuator_get, _wrap_rig_caps_attenuator_set },
    { "max_rit", _wrap_rig_caps_max_rit_get, _wrap_rig_caps_max_rit_set },
    { "max_xit", _wrap_rig_caps_max_xit_get, _wrap_rig_caps_max_xit_set },
    { "max_ifshift", _wrap_rig_caps_max_ifshift_get, _wrap_rig_caps_max_ifshift_set },
    { "agc_level_count", _wrap_rig_caps_agc_level_count_get, _wrap_rig_caps_agc_level_count_set },
    { "agc_levels", _wrap_rig_caps_agc_levels_get, _wrap_rig_caps_agc_levels_set },
    { "announces", _wrap_rig_caps_announces_get, _wrap_rig_caps_announces_set },
    { "vfo_ops", _wrap_rig_caps_vfo_ops_get, _wrap_rig_caps_vfo_ops_set },
    { "scan_ops", _wrap_rig_caps_scan_ops_get, _wrap_rig_caps_scan_ops_set },
    { "targetable_vfo", _wrap_rig_caps_targetable_vfo_get, _wrap_rig_caps_targetable_vfo_set },
    { "transceive", _wrap_rig_caps_transceive_get, _wrap_rig_caps_transceive_set },
    { "bank_qty", _wrap_rig_caps_bank_qty_get, _wrap_rig_caps_bank_qty_set },
    { "chan_desc_sz", _wrap_rig_caps_chan_desc_sz_get, _wrap_rig_caps_chan_desc_sz_set },
    { "chan_list", _wrap_rig_caps_chan_list_get, _wrap_rig_caps_chan_list_set },
    { "rx_range_list1", _wrap_rig_caps_rx_range_list1_get, _wrap_rig_caps_rx_range_list1_set },
    { "tx_range_list1", _wrap_rig_caps_tx_range_list1_get, _wrap_rig_caps_tx_range_list1_set },
    { "rx_range_list2", _wrap_rig_caps_rx_range_list2_get, _wrap_rig_caps_rx_range_list2_set },
    { "tx_range_list2", _wrap_rig_caps_tx_range_list2_get, _wrap_rig_caps_tx_range_list2_set },
    { "rx_range_list3", _wrap_rig_caps_rx_range_list3_get, _wrap_rig_caps_rx_range_list3_set },
    { "tx_range_list3", _wrap_rig_caps_tx_range_list3_get, _wrap_rig_caps_tx_range_list3_set },
    { "rx_range_list4", _wrap_rig_caps_rx_range_list4_get, _wrap_rig_caps_rx_range_list4_set },
    { "tx_range_list4", _wrap_rig_caps_tx_range_list4_get, _wrap_rig_caps_tx_range_list4_set },
    { "rx_range_list5", _wrap_rig_caps_rx_range_list5_get, _wrap_rig_caps_rx_range_list5_set },
    { "tx_range_list5", _wrap_rig_caps_tx_range_list5_get, _wrap_rig_caps_tx_range_list5_set },
    { "tuning_steps", _wrap_rig_caps_tuning_steps_get, _wrap_rig_caps_tuning_steps_set },
    { "filters", _wrap_rig_caps_filters_get, _wrap_rig_caps_filters_set },
    { "str_cal", _wrap_rig_caps_str_cal_get, _wrap_rig_caps_str_cal_set },
    { "swr_cal", _wrap_rig_caps_swr_cal_get, _wrap_rig_caps_swr_cal_set },
    { "alc_cal", _wrap_rig_caps_alc_cal_get, _wrap_rig_caps_alc_cal_set },
    { "rfpower_meter_cal", _wrap_rig_caps_rfpower_meter_cal_get, _wrap_rig_caps_rfpower_meter_cal_set },
    { "comp_meter_cal", _wrap_rig_caps_comp_meter_cal_get, _wrap_rig_caps_comp_meter_cal_set },
    { "vd_meter_cal", _wrap_rig_caps_vd_meter_cal_get, _wrap_rig_caps_vd_meter_cal_set },
    { "id_meter_cal", _wrap_rig_caps_id_meter_cal_get, _wrap_rig_caps_id_meter_cal_set },
    { "spectrum_scopes", _wrap_rig_caps_spectrum_scopes_get, _wrap_rig_caps_spectrum_scopes_set },
    { "spectrum_modes", _wrap_rig_caps_spectrum_modes_get, _wrap_rig_caps_spectrum_modes_set },
    { "spectrum_spans", _wrap_rig_caps_spectrum_spans_get, _wrap_rig_caps_spectrum_spans_set },
    { "spectrum_avg_modes", _wrap_rig_caps_spectrum_avg_modes_get, _wrap_rig_caps_spectrum_avg_modes_set },
    { "spectrum_attenuator", _wrap_rig_caps_spectrum_attenuator_get, _wrap_rig_caps_spectrum_attenuator_set },
    { "cfgparams", _wrap_rig_caps_cfgparams_get, _wrap_rig_caps_cfgparams_set },
    { "priv", _wrap_rig_caps_priv_get, _wrap_rig_caps_priv_set },
    { "rig_init", _wrap_rig_caps_rig_init_get, _wrap_rig_caps_rig_init_set },
    { "rig_cleanup", _wrap_rig_caps_rig_cleanup_get, _wrap_rig_caps_rig_cleanup_set },
    { "rig_open", _wrap_rig_caps_rig_open_get, _wrap_rig_caps_rig_open_set },
    { "rig_close", _wrap_rig_caps_rig_close_get, _wrap_rig_caps_rig_close_set },
    { "set_freq", _wrap_rig_caps_set_freq_get, _wrap_rig_caps_set_freq_set },
    { "get_freq", _wrap_rig_caps_get_freq_get, _wrap_rig_caps_get_freq_set },
    { "set_mode", _wrap_rig_caps_set_mode_get, _wrap_rig_caps_set_mode_set },
    { "get_mode", _wrap_rig_caps_get_mode_get, _wrap_rig_caps_get_mode_set },
    { "set_vfo", _wrap_rig_caps_set_vfo_get, _wrap_rig_caps_set_vfo_set },
    { "get_vfo", _wrap_rig_caps_get_vfo_get, _wrap_rig_caps_get_vfo_set },
    { "set_ptt", _wrap_rig_caps_set_ptt_get, _wrap_rig_caps_set_ptt_set },
    { "get_ptt", _wrap_rig_caps_get_ptt_get, _wrap_rig_caps_get_ptt_set },
    { "get_dcd", _wrap_rig_caps_get_dcd_get, _wrap_rig_caps_get_dcd_set },
    { "set_rptr_shift", _wrap_rig_caps_set_rptr_shift_get, _wrap_rig_caps_set_rptr_shift_set },
    { "get_rptr_shift", _wrap_rig_caps_get_rptr_shift_get, _wrap_rig_caps_get_rptr_shift_set },
    { "set_rptr_offs", _wrap_rig_caps_set_rptr_offs_get, _wrap_rig_caps_set_rptr_offs_set },
    { "get_rptr_offs", _wrap_rig_caps_get_rptr_offs_get, _wrap_rig_caps_get_rptr_offs_set },
    { "set_split_freq", _wrap_rig_caps_set_split_freq_get, _wrap_rig_caps_set_split_freq_set },
    { "get_split_freq", _wrap_rig_caps_get_split_freq_get, _wrap_rig_caps_get_split_freq_set },
    { "set_split_mode", _wrap_rig_caps_set_split_mode_get, _wrap_rig_caps_set_split_mode_set },
    { "get_split_mode", _wrap_rig_caps_get_split_mode_get, _wrap_rig_caps_get_split_mode_set },
    { "set_split_freq_mode", _wrap_rig_caps_set_split_freq_mode_get, _wrap_rig_caps_set_split_freq_mode_set },
    { "get_split_freq_mode", _wrap_rig_caps_get_split_freq_mode_get, _wrap_rig_caps_get_split_freq_mode_set },
    { "set_split_vfo", _wrap_rig_caps_set_split_vfo_get, _wrap_rig_caps_set_split_vfo_set },
    { "get_split_vfo", _wrap_rig_caps_get_split_vfo_get, _wrap_rig_caps_get_split_vfo_set },
    { "set_rit", _wrap_rig_caps_set_rit_get, _wrap_rig_caps_set_rit_set },
    { "get_rit", _wrap_rig_caps_get_rit_get, _wrap_rig_caps_get_rit_set },
    { "set_xit", _wrap_rig_caps_set_xit_get, _wrap_rig_caps_set_xit_set },
    { "get_xit", _wrap_rig_caps_get_xit_get, _wrap_rig_caps_get_xit_set },
    { "set_ts", _wrap_rig_caps_set_ts_get, _wrap_rig_caps_set_ts_set },
    { "get_ts", _wrap_rig_caps_get_ts_get, _wrap_rig_caps_get_ts_set },
    { "set_dcs_code", _wrap_rig_caps_set_dcs_code_get, _wrap_rig_caps_set_dcs_code_set },
    { "get_dcs_code", _wrap_rig_caps_get_dcs_code_get, _wrap_rig_caps_get_dcs_code_set },
    { "set_tone", _wrap_rig_caps_set_tone_get, _wrap_rig_caps_set_tone_set },
    { "get_tone", _wrap_rig_caps_get_tone_get, _wrap_rig_caps_get_tone_set },
    { "set_ctcss_tone", _wrap_rig_caps_set_ctcss_tone_get, _wrap_rig_caps_set_ctcss_tone_set },
    { "get_ctcss_tone", _wrap_rig_caps_get_ctcss_tone_get, _wrap_rig_caps_get_ctcss_tone_set },
    { "set_dcs_sql", _wrap_rig_caps_set_dcs_sql_get, _wrap_rig_caps_set_dcs_sql_set },
    { "get_dcs_sql", _wrap_rig_caps_get_dcs_sql_get, _wrap_rig_caps_get_dcs_sql_set },
    { "set_tone_sql", _wrap_rig_caps_set_tone_sql_get, _wrap_rig_caps_set_tone_sql_set },
    { "get_tone_sql", _wrap_rig_caps_get_tone_sql_get, _wrap_rig_caps_get_tone_sql_set },
    { "set_ctcss_sql", _wrap_rig_caps_set_ctcss_sql_get, _wrap_rig_caps_set_ctcss_sql_set },
    { "get_ctcss_sql", _wrap_rig_caps_get_ctcss_sql_get, _wrap_rig_caps_get_ctcss_sql_set },
    { "power2mW", _wrap_rig_caps_power2mW_get, _wrap_rig_caps_power2mW_set },
    { "mW2power", _wrap_rig_caps_mW2power_get, _wrap_rig_caps_mW2power_set },
    { "set_powerstat", _wrap_rig_caps_set_powerstat_get, _wrap_rig_caps_set_powerstat_set },
    { "get_powerstat", _wrap_rig_caps_get_powerstat_get, _wrap_rig_caps_get_powerstat_set },
    { "reset", _wrap_rig_caps_reset_get, _wrap_rig_caps_reset_set },
    { "set_ant", _wrap_rig_caps_set_ant_get, _wrap_rig_caps_set_ant_set },
    { "get_ant", _wrap_rig_caps_get_ant_get, _wrap_rig_caps_get_ant_set },
    { "set_level", _wrap_rig_caps_set_level_get, _wrap_rig_caps_set_level_set },
    { "get_level", _wrap_rig_caps_get_level_get, _wrap_rig_caps_get_level_set },
    { "set_func", _wrap_rig_caps_set_func_get, _wrap_rig_caps_set_func_set },
    { "get_func", _wrap_rig_caps_get_func_get, _wrap_rig_caps_get_func_set },
    { "set_parm", _wrap_rig_caps_set_parm_get, _wrap_rig_caps_set_parm_set },
    { "get_parm", _wrap_rig_caps_get_parm_get, _wrap_rig_caps_get_parm_set },
    { "set_ext_level", _wrap_rig_caps_set_ext_level_get, _wrap_rig_caps_set_ext_level_set },
    { "get_ext_level", _wrap_rig_caps_get_ext_level_get, _wrap_rig_caps_get_ext_level_set },
    { "set_ext_func", _wrap_rig_caps_set_ext_func_get, _wrap_rig_caps_set_ext_func_set },
    { "get_ext_func", _wrap_rig_caps_get_ext_func_get, _wrap_rig_caps_get_ext_func_set },
    { "set_ext_parm", _wrap_rig_caps_set_ext_parm_get, _wrap_rig_caps_set_ext_parm_set },
    { "get_ext_parm", _wrap_rig_caps_get_ext_parm_get, _wrap_rig_caps_get_ext_parm_set },
    { "set_conf", _wrap_rig_caps_set_conf_get, _wrap_rig_caps_set_conf_set },
    { "get_conf", _wrap_rig_caps_get_conf_get, _wrap_rig_caps_get_conf_set },
    { "send_dtmf", _wrap_rig_caps_send_dtmf_get, _wrap_rig_caps_send_dtmf_set },
    { "recv_dtmf", _wrap_rig_caps_recv_dtmf_get, _wrap_rig_caps_recv_dtmf_set },
    { "send_morse", _wrap_rig_caps_send_morse_get, _wrap_rig_caps_send_morse_set },
    { "stop_morse", _wrap_rig_caps_stop_morse_get, _wrap_rig_caps_stop_morse_set },
    { "wait_morse", _wrap_rig_caps_wait_morse_get, _wrap_rig_caps_wait_morse_set },
    { "send_voice_mem", _wrap_rig_caps_send_voice_mem_get, _wrap_rig_caps_send_voice_mem_set },
    { "stop_voice_mem", _wrap_rig_caps_stop_voice_mem_get, _wrap_rig_caps_stop_voice_mem_set },
    { "set_bank", _wrap_rig_caps_set_bank_get, _wrap_rig_caps_set_bank_set },
    { "set_mem", _wrap_rig_caps_set_mem_get, _wrap_rig_caps_set_mem_set },
    { "get_mem", _wrap_rig_caps_get_mem_get, _wrap_rig_caps_get_mem_set },
    { "vfo_op", _wrap_rig_caps_vfo_op_get, _wrap_rig_caps_vfo_op_set },
    { "scan", _wrap_rig_caps_scan_get, _wrap_rig_caps_scan_set },
    { "set_trn", _wrap_rig_caps_set_trn_get, _wrap_rig_caps_set_trn_set },
    { "get_trn", _wrap_rig_caps_get_trn_get, _wrap_rig_caps_get_trn_set },
    { "decode_event", _wrap_rig_caps_decode_event_get, _wrap_rig_caps_decode_event_set },
    { "set_channel", _wrap_rig_caps_set_channel_get, _wrap_rig_caps_set_channel_set },
    { "get_channel", _wrap_rig_caps_get_channel_get, _wrap_rig_caps_get_channel_set },
    { "get_info", _wrap_rig_caps_get_info_get, _wrap_rig_caps_get_info_set },
    { "set_chan_all_cb", _wrap_rig_caps_set_chan_all_cb_get, _wrap_rig_caps_set_chan_all_cb_set },
    { "get_chan_all_cb", _wrap_rig_caps_get_chan_all_cb_get, _wrap_rig_caps_get_chan_all_cb_set },
    { "set_mem_all_cb", _wrap_rig_caps_set_mem_all_cb_get, _wrap_rig_caps_set_mem_all_cb_set },
    { "get_mem_all_cb", _wrap_rig_caps_get_mem_all_cb_get, _wrap_rig_caps_get_mem_all_cb_set },
    { "set_vfo_opt", _wrap_rig_caps_set_vfo_opt_get, _wrap_rig_caps_set_vfo_opt_set },
    { "rig_get_vfo_info", _wrap_rig_caps_rig_get_vfo_info_get, _wrap_rig_caps_rig_get_vfo_info_set },
    { "set_clock", _wrap_rig_caps_set_clock_get, _wrap_rig_caps_set_clock_set },
    { "get_clock", _wrap_rig_caps_get_clock_get, _wrap_rig_caps_get_clock_set },
    { "clone_combo_set", _wrap_rig_caps_clone_combo_set_get, SWIG_Lua_set_immutable },
    { "clone_combo_get", _wrap_rig_caps_clone_combo_get_get, SWIG_Lua_set_immutable },
    { "async_data_supported", _wrap_rig_caps_async_data_supported_get, _wrap_rig_caps_async_data_supported_set },
    { "read_frame_direct", _wrap_rig_caps_read_frame_direct_get, _wrap_rig_caps_read_frame_direct_set },
    { "is_async_frame", _wrap_rig_caps_is_async_frame_get, _wrap_rig_caps_is_async_frame_set },
    { "process_async_frame", _wrap_rig_caps_process_async_frame_get, _wrap_rig_caps_process_async_frame_set },
    { "hamlib_check_rig_caps", _wrap_rig_caps_hamlib_check_rig_caps_get, _wrap_rig_caps_hamlib_check_rig_caps_set },
    { "get_conf2", _wrap_rig_caps_get_conf2_get, _wrap_rig_caps_get_conf2_set },
    { "password", _wrap_rig_caps_password_get, _wrap_rig_caps_password_set },
    { "set_lock_mode", _wrap_rig_caps_set_lock_mode_get, _wrap_rig_caps_set_lock_mode_set },
    { "get_lock_mode", _wrap_rig_caps_get_lock_mode_get, _wrap_rig_caps_get_lock_mode_set },
    { "timeout_retry", _wrap_rig_caps_timeout_retry_get, _wrap_rig_caps_timeout_retry_set },
    { "morse_qsize", _wrap_rig_caps_morse_qsize_get, _wrap_rig_caps_morse_qsize_set },
    {0,0,0}
};
static swig_lua_method swig_rig_caps_methods[]= {
    {0,0}
};
static swig_lua_method swig_rig_caps_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_rig_caps_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_rig_caps_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_rig_caps_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_rig_caps_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_rig_caps_Sf_SwigStatic = {
    "rig_caps",
    swig_rig_caps_Sf_SwigStatic_methods,
    swig_rig_caps_Sf_SwigStatic_attributes,
    swig_rig_caps_Sf_SwigStatic_constants,
    swig_rig_caps_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_rig_caps_bases[] = {0};
static const char *swig_rig_caps_base_names[] = {0};
static swig_lua_class _wrap_class_rig_caps = { "rig_caps", "rig_caps", &SWIGTYPE_p_rig_caps,_proxy__wrap_new_rig_caps, swig_delete_rig_caps, swig_rig_caps_methods, swig_rig_caps_attributes, &swig_rig_caps_Sf_SwigStatic, swig_rig_caps_meta, swig_rig_caps_bases, swig_rig_caps_base_names };

static int _wrap_multicast_s_multicast_running_set(lua_State* L) {
  int SWIG_arg = 0;
  struct multicast_s *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("multicast_s::multicast_running",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("multicast_s::multicast_running",1,"struct multicast_s *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("multicast_s::multicast_running",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_multicast_s,0))){
    SWIG_fail_ptr("multicast_s_multicast_running_set",1,SWIGTYPE_p_multicast_s);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->multicast_running = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_multicast_s_multicast_running_get(lua_State* L) {
  int SWIG_arg = 0;
  struct multicast_s *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("multicast_s::multicast_running",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("multicast_s::multicast_running",1,"struct multicast_s *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_multicast_s,0))){
    SWIG_fail_ptr("multicast_s_multicast_running_get",1,SWIGTYPE_p_multicast_s);
  }
  
  result = (int) ((arg1)->multicast_running);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_multicast_s_sock_set(lua_State* L) {
  int SWIG_arg = 0;
  struct multicast_s *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("multicast_s::sock",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("multicast_s::sock",1,"struct multicast_s *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("multicast_s::sock",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_multicast_s,0))){
    SWIG_fail_ptr("multicast_s_sock_set",1,SWIGTYPE_p_multicast_s);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->sock = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_multicast_s_sock_get(lua_State* L) {
  int SWIG_arg = 0;
  struct multicast_s *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("multicast_s::sock",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("multicast_s::sock",1,"struct multicast_s *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_multicast_s,0))){
    SWIG_fail_ptr("multicast_s_sock_get",1,SWIGTYPE_p_multicast_s);
  }
  
  result = (int) ((arg1)->sock);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_multicast_s_seqnumber_set(lua_State* L) {
  int SWIG_arg = 0;
  struct multicast_s *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("multicast_s::seqnumber",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("multicast_s::seqnumber",1,"struct multicast_s *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("multicast_s::seqnumber",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_multicast_s,0))){
    SWIG_fail_ptr("multicast_s_seqnumber_set",1,SWIGTYPE_p_multicast_s);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->seqnumber = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_multicast_s_seqnumber_get(lua_State* L) {
  int SWIG_arg = 0;
  struct multicast_s *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("multicast_s::seqnumber",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("multicast_s::seqnumber",1,"struct multicast_s *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_multicast_s,0))){
    SWIG_fail_ptr("multicast_s_seqnumber_get",1,SWIGTYPE_p_multicast_s);
  }
  
  result = (int) ((arg1)->seqnumber);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_multicast_s_runflag_set(lua_State* L) {
  int SWIG_arg = 0;
  struct multicast_s *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("multicast_s::runflag",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("multicast_s::runflag",1,"struct multicast_s *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("multicast_s::runflag",2,"int volatile");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_multicast_s,0))){
    SWIG_fail_ptr("multicast_s_runflag_set",1,SWIGTYPE_p_multicast_s);
  }
  
  arg2 = (int volatile)lua_tonumber(L, 2);
  if (arg1) (arg1)->runflag = (int volatile )arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_multicast_s_runflag_get(lua_State* L) {
  int SWIG_arg = 0;
  struct multicast_s *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("multicast_s::runflag",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("multicast_s::runflag",1,"struct multicast_s *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_multicast_s,0))){
    SWIG_fail_ptr("multicast_s_runflag_get",1,SWIGTYPE_p_multicast_s);
  }
  
  result = (int)(int) ((arg1)->runflag);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_multicast_s_threadid_set(lua_State* L) {
  int SWIG_arg = 0;
  struct multicast_s *arg1 = 0 ;
  pthread_t arg2 ;
  pthread_t *argp2 ;
  
  SWIG_check_num_args("multicast_s::threadid",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("multicast_s::threadid",1,"struct multicast_s *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("multicast_s::threadid",2,"pthread_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_multicast_s,0))){
    SWIG_fail_ptr("multicast_s_threadid_set",1,SWIGTYPE_p_multicast_s);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_pthread_t,0))){
    SWIG_fail_ptr("multicast_s_threadid_set",2,SWIGTYPE_p_pthread_t);
  }
  arg2 = *argp2;
  
  if (arg1) (arg1)->threadid = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_multicast_s_threadid_get(lua_State* L) {
  int SWIG_arg = 0;
  struct multicast_s *arg1 = 0 ;
  pthread_t result;
  
  SWIG_check_num_args("multicast_s::threadid",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("multicast_s::threadid",1,"struct multicast_s *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_multicast_s,0))){
    SWIG_fail_ptr("multicast_s_threadid_get",1,SWIGTYPE_p_multicast_s);
  }
  
  result =  ((arg1)->threadid);
  {
    pthread_t * resultptr;
    resultptr = (pthread_t *) malloc(sizeof(pthread_t));
    memmove(resultptr, &result, sizeof(pthread_t));
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_pthread_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_multicast_s_mutex_set(lua_State* L) {
  int SWIG_arg = 0;
  struct multicast_s *arg1 = 0 ;
  pthread_mutex_t arg2 ;
  pthread_mutex_t *argp2 ;
  
  SWIG_check_num_args("multicast_s::mutex",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("multicast_s::mutex",1,"struct multicast_s *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("multicast_s::mutex",2,"pthread_mutex_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_multicast_s,0))){
    SWIG_fail_ptr("multicast_s_mutex_set",1,SWIGTYPE_p_multicast_s);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_pthread_mutex_t,0))){
    SWIG_fail_ptr("multicast_s_mutex_set",2,SWIGTYPE_p_pthread_mutex_t);
  }
  arg2 = *argp2;
  
  if (arg1) (arg1)->mutex = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_multicast_s_mutex_get(lua_State* L) {
  int SWIG_arg = 0;
  struct multicast_s *arg1 = 0 ;
  pthread_mutex_t result;
  
  SWIG_check_num_args("multicast_s::mutex",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("multicast_s::mutex",1,"struct multicast_s *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_multicast_s,0))){
    SWIG_fail_ptr("multicast_s_mutex_get",1,SWIGTYPE_p_multicast_s);
  }
  
  result =  ((arg1)->mutex);
  {
    pthread_mutex_t * resultptr;
    resultptr = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t));
    memmove(resultptr, &result, sizeof(pthread_mutex_t));
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_pthread_mutex_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_multicast_s_mutex_initialized_set(lua_State* L) {
  int SWIG_arg = 0;
  struct multicast_s *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("multicast_s::mutex_initialized",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("multicast_s::mutex_initialized",1,"struct multicast_s *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("multicast_s::mutex_initialized",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_multicast_s,0))){
    SWIG_fail_ptr("multicast_s_mutex_initialized_set",1,SWIGTYPE_p_multicast_s);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->mutex_initialized = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_multicast_s_mutex_initialized_get(lua_State* L) {
  int SWIG_arg = 0;
  struct multicast_s *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("multicast_s::mutex_initialized",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("multicast_s::mutex_initialized",1,"struct multicast_s *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_multicast_s,0))){
    SWIG_fail_ptr("multicast_s_mutex_initialized_get",1,SWIGTYPE_p_multicast_s);
  }
  
  result = (int) ((arg1)->mutex_initialized);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_multicast_s_dest_addr_set(lua_State* L) {
  int SWIG_arg = 0;
  struct multicast_s *arg1 = 0 ;
  struct sockaddr_in arg2 ;
  struct sockaddr_in *argp2 ;
  
  SWIG_check_num_args("multicast_s::dest_addr",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("multicast_s::dest_addr",1,"struct multicast_s *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("multicast_s::dest_addr",2,"struct sockaddr_in");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_multicast_s,0))){
    SWIG_fail_ptr("multicast_s_dest_addr_set",1,SWIGTYPE_p_multicast_s);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_sockaddr_in,0))){
    SWIG_fail_ptr("multicast_s_dest_addr_set",2,SWIGTYPE_p_sockaddr_in);
  }
  arg2 = *argp2;
  
  if (arg1) (arg1)->dest_addr = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_multicast_s_dest_addr_get(lua_State* L) {
  int SWIG_arg = 0;
  struct multicast_s *arg1 = 0 ;
  struct sockaddr_in result;
  
  SWIG_check_num_args("multicast_s::dest_addr",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("multicast_s::dest_addr",1,"struct multicast_s *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_multicast_s,0))){
    SWIG_fail_ptr("multicast_s_dest_addr_get",1,SWIGTYPE_p_multicast_s);
  }
  
  result =  ((arg1)->dest_addr);
  {
    struct sockaddr_in * resultptr;
    resultptr = (struct sockaddr_in *) malloc(sizeof(struct sockaddr_in));
    memmove(resultptr, &result, sizeof(struct sockaddr_in));
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_sockaddr_in,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_multicast_s_port_set(lua_State* L) {
  int SWIG_arg = 0;
  struct multicast_s *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("multicast_s::port",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("multicast_s::port",1,"struct multicast_s *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("multicast_s::port",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_multicast_s,0))){
    SWIG_fail_ptr("multicast_s_port_set",1,SWIGTYPE_p_multicast_s);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->port = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_multicast_s_port_get(lua_State* L) {
  int SWIG_arg = 0;
  struct multicast_s *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("multicast_s::port",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("multicast_s::port",1,"struct multicast_s *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_multicast_s,0))){
    SWIG_fail_ptr("multicast_s_port_get",1,SWIGTYPE_p_multicast_s);
  }
  
  result = (int) ((arg1)->port);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_multicast_s(lua_State* L) {
  int SWIG_arg = 0;
  struct multicast_s *result = 0 ;
  
  SWIG_check_num_args("multicast_s::multicast_s",0,0)
  result = (struct multicast_s *)calloc(1, sizeof(struct multicast_s));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_multicast_s,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_multicast_s(void *obj) {
struct multicast_s *arg1 = (struct multicast_s *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_multicast_s(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_multicast_s);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_multicast_s_attributes[] = {
    { "multicast_running", _wrap_multicast_s_multicast_running_get, _wrap_multicast_s_multicast_running_set },
    { "sock", _wrap_multicast_s_sock_get, _wrap_multicast_s_sock_set },
    { "seqnumber", _wrap_multicast_s_seqnumber_get, _wrap_multicast_s_seqnumber_set },
    { "runflag", _wrap_multicast_s_runflag_get, _wrap_multicast_s_runflag_set },
    { "threadid", _wrap_multicast_s_threadid_get, _wrap_multicast_s_threadid_set },
    { "mutex", _wrap_multicast_s_mutex_get, _wrap_multicast_s_mutex_set },
    { "mutex_initialized", _wrap_multicast_s_mutex_initialized_get, _wrap_multicast_s_mutex_initialized_set },
    { "dest_addr", _wrap_multicast_s_dest_addr_get, _wrap_multicast_s_dest_addr_set },
    { "port", _wrap_multicast_s_port_get, _wrap_multicast_s_port_set },
    {0,0,0}
};
static swig_lua_method swig_multicast_s_methods[]= {
    {0,0}
};
static swig_lua_method swig_multicast_s_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_multicast_s_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_multicast_s_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_multicast_s_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_multicast_s_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_multicast_s_Sf_SwigStatic = {
    "multicast_s",
    swig_multicast_s_Sf_SwigStatic_methods,
    swig_multicast_s_Sf_SwigStatic_attributes,
    swig_multicast_s_Sf_SwigStatic_constants,
    swig_multicast_s_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_multicast_s_bases[] = {0};
static const char *swig_multicast_s_base_names[] = {0};
static swig_lua_class _wrap_class_multicast_s = { "multicast_s", "multicast_s", &SWIGTYPE_p_multicast_s,_proxy__wrap_new_multicast_s, swig_delete_multicast_s, swig_multicast_s_methods, swig_multicast_s_attributes, &swig_multicast_s_Sf_SwigStatic, swig_multicast_s_meta, swig_multicast_s_bases, swig_multicast_s_base_names };

static int _wrap_rig_callbacks_freq_event_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  freq_cb_t arg2 = 0 ;
  
  SWIG_check_num_args("rig_callbacks::freq_event",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::freq_event",1,"struct rig_callbacks *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_callbacks::freq_event",2,"freq_cb_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_freq_event_set",1,SWIGTYPE_p_rig_callbacks);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_double_p_void__int,0))){
    SWIG_fail_ptr("rig_callbacks_freq_event_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_double_p_void__int);
  }
  
  if (arg1) (arg1)->freq_event = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_freq_event_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  freq_cb_t result;
  
  SWIG_check_num_args("rig_callbacks::freq_event",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::freq_event",1,"struct rig_callbacks *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_freq_event_get",1,SWIGTYPE_p_rig_callbacks);
  }
  
  result = (freq_cb_t) ((arg1)->freq_event);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_double_p_void__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_freq_arg_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("rig_callbacks::freq_arg",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::freq_arg",1,"struct rig_callbacks *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_callbacks::freq_arg",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_freq_arg_set",1,SWIGTYPE_p_rig_callbacks);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"rig_callbacks_freq_arg_set");
  if (arg1) (arg1)->freq_arg = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_freq_arg_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("rig_callbacks::freq_arg",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::freq_arg",1,"struct rig_callbacks *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_freq_arg_get",1,SWIGTYPE_p_rig_callbacks);
  }
  
  result = (void *) ((arg1)->freq_arg);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_mode_event_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  mode_cb_t arg2 = 0 ;
  
  SWIG_check_num_args("rig_callbacks::mode_event",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::mode_event",1,"struct rig_callbacks *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_callbacks::mode_event",2,"mode_cb_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_mode_event_set",1,SWIGTYPE_p_rig_callbacks);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long_p_void__int,0))){
    SWIG_fail_ptr("rig_callbacks_mode_event_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long_p_void__int);
  }
  
  if (arg1) (arg1)->mode_event = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_mode_event_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  mode_cb_t result;
  
  SWIG_check_num_args("rig_callbacks::mode_event",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::mode_event",1,"struct rig_callbacks *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_mode_event_get",1,SWIGTYPE_p_rig_callbacks);
  }
  
  result = (mode_cb_t) ((arg1)->mode_event);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long_p_void__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_mode_arg_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("rig_callbacks::mode_arg",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::mode_arg",1,"struct rig_callbacks *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_callbacks::mode_arg",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_mode_arg_set",1,SWIGTYPE_p_rig_callbacks);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"rig_callbacks_mode_arg_set");
  if (arg1) (arg1)->mode_arg = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_mode_arg_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("rig_callbacks::mode_arg",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::mode_arg",1,"struct rig_callbacks *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_mode_arg_get",1,SWIGTYPE_p_rig_callbacks);
  }
  
  result = (void *) ((arg1)->mode_arg);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_vfo_event_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  vfo_cb_t arg2 = 0 ;
  
  SWIG_check_num_args("rig_callbacks::vfo_event",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::vfo_event",1,"struct rig_callbacks *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_callbacks::vfo_event",2,"vfo_cb_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_vfo_event_set",1,SWIGTYPE_p_rig_callbacks);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_void__int,0))){
    SWIG_fail_ptr("rig_callbacks_vfo_event_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_void__int);
  }
  
  if (arg1) (arg1)->vfo_event = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_vfo_event_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  vfo_cb_t result;
  
  SWIG_check_num_args("rig_callbacks::vfo_event",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::vfo_event",1,"struct rig_callbacks *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_vfo_event_get",1,SWIGTYPE_p_rig_callbacks);
  }
  
  result = (vfo_cb_t) ((arg1)->vfo_event);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_void__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_vfo_arg_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("rig_callbacks::vfo_arg",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::vfo_arg",1,"struct rig_callbacks *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_callbacks::vfo_arg",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_vfo_arg_set",1,SWIGTYPE_p_rig_callbacks);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"rig_callbacks_vfo_arg_set");
  if (arg1) (arg1)->vfo_arg = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_vfo_arg_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("rig_callbacks::vfo_arg",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::vfo_arg",1,"struct rig_callbacks *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_vfo_arg_get",1,SWIGTYPE_p_rig_callbacks);
  }
  
  result = (void *) ((arg1)->vfo_arg);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_ptt_event_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  ptt_cb_t arg2 = 0 ;
  
  SWIG_check_num_args("rig_callbacks::ptt_event",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::ptt_event",1,"struct rig_callbacks *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_callbacks::ptt_event",2,"ptt_cb_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_ptt_event_set",1,SWIGTYPE_p_rig_callbacks);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_ptt_t_p_void__int,0))){
    SWIG_fail_ptr("rig_callbacks_ptt_event_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_ptt_t_p_void__int);
  }
  
  if (arg1) (arg1)->ptt_event = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_ptt_event_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  ptt_cb_t result;
  
  SWIG_check_num_args("rig_callbacks::ptt_event",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::ptt_event",1,"struct rig_callbacks *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_ptt_event_get",1,SWIGTYPE_p_rig_callbacks);
  }
  
  result = (ptt_cb_t) ((arg1)->ptt_event);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_ptt_t_p_void__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_ptt_arg_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("rig_callbacks::ptt_arg",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::ptt_arg",1,"struct rig_callbacks *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_callbacks::ptt_arg",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_ptt_arg_set",1,SWIGTYPE_p_rig_callbacks);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"rig_callbacks_ptt_arg_set");
  if (arg1) (arg1)->ptt_arg = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_ptt_arg_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("rig_callbacks::ptt_arg",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::ptt_arg",1,"struct rig_callbacks *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_ptt_arg_get",1,SWIGTYPE_p_rig_callbacks);
  }
  
  result = (void *) ((arg1)->ptt_arg);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_dcd_event_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  dcd_cb_t arg2 = 0 ;
  
  SWIG_check_num_args("rig_callbacks::dcd_event",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::dcd_event",1,"struct rig_callbacks *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_callbacks::dcd_event",2,"dcd_cb_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_dcd_event_set",1,SWIGTYPE_p_rig_callbacks);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_dcd_e_p_void__int,0))){
    SWIG_fail_ptr("rig_callbacks_dcd_event_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_dcd_e_p_void__int);
  }
  
  if (arg1) (arg1)->dcd_event = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_dcd_event_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  dcd_cb_t result;
  
  SWIG_check_num_args("rig_callbacks::dcd_event",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::dcd_event",1,"struct rig_callbacks *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_dcd_event_get",1,SWIGTYPE_p_rig_callbacks);
  }
  
  result = (dcd_cb_t) ((arg1)->dcd_event);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_enum_dcd_e_p_void__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_dcd_arg_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("rig_callbacks::dcd_arg",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::dcd_arg",1,"struct rig_callbacks *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_callbacks::dcd_arg",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_dcd_arg_set",1,SWIGTYPE_p_rig_callbacks);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"rig_callbacks_dcd_arg_set");
  if (arg1) (arg1)->dcd_arg = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_dcd_arg_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("rig_callbacks::dcd_arg",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::dcd_arg",1,"struct rig_callbacks *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_dcd_arg_get",1,SWIGTYPE_p_rig_callbacks);
  }
  
  result = (void *) ((arg1)->dcd_arg);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_pltune_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  pltune_cb_t arg2 = 0 ;
  
  SWIG_check_num_args("rig_callbacks::pltune",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::pltune",1,"struct rig_callbacks *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_callbacks::pltune",2,"pltune_cb_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_pltune_set",1,SWIGTYPE_p_rig_callbacks);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_void__int,0))){
    SWIG_fail_ptr("rig_callbacks_pltune_set",2,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_void__int);
  }
  
  if (arg1) (arg1)->pltune = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_pltune_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  pltune_cb_t result;
  
  SWIG_check_num_args("rig_callbacks::pltune",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::pltune",1,"struct rig_callbacks *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_pltune_get",1,SWIGTYPE_p_rig_callbacks);
  }
  
  result = (pltune_cb_t) ((arg1)->pltune);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_void__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_pltune_arg_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("rig_callbacks::pltune_arg",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::pltune_arg",1,"struct rig_callbacks *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_callbacks::pltune_arg",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_pltune_arg_set",1,SWIGTYPE_p_rig_callbacks);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"rig_callbacks_pltune_arg_set");
  if (arg1) (arg1)->pltune_arg = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_pltune_arg_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("rig_callbacks::pltune_arg",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::pltune_arg",1,"struct rig_callbacks *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_pltune_arg_get",1,SWIGTYPE_p_rig_callbacks);
  }
  
  result = (void *) ((arg1)->pltune_arg);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_spectrum_event_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  spectrum_cb_t arg2 = 0 ;
  
  SWIG_check_num_args("rig_callbacks::spectrum_event",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::spectrum_event",1,"struct rig_callbacks *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_callbacks::spectrum_event",2,"spectrum_cb_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_spectrum_event_set",1,SWIGTYPE_p_rig_callbacks);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rig_p_struct_rig_spectrum_line_p_void__int,0))){
    SWIG_fail_ptr("rig_callbacks_spectrum_event_set",2,SWIGTYPE_p_f_p_struct_s_rig_p_struct_rig_spectrum_line_p_void__int);
  }
  
  if (arg1) (arg1)->spectrum_event = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_spectrum_event_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  spectrum_cb_t result;
  
  SWIG_check_num_args("rig_callbacks::spectrum_event",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::spectrum_event",1,"struct rig_callbacks *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_spectrum_event_get",1,SWIGTYPE_p_rig_callbacks);
  }
  
  result = (spectrum_cb_t) ((arg1)->spectrum_event);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rig_p_struct_rig_spectrum_line_p_void__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_spectrum_arg_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("rig_callbacks::spectrum_arg",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::spectrum_arg",1,"struct rig_callbacks *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_callbacks::spectrum_arg",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_spectrum_arg_set",1,SWIGTYPE_p_rig_callbacks);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"rig_callbacks_spectrum_arg_set");
  if (arg1) (arg1)->spectrum_arg = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_callbacks_spectrum_arg_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("rig_callbacks::spectrum_arg",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_callbacks::spectrum_arg",1,"struct rig_callbacks *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_callbacks,0))){
    SWIG_fail_ptr("rig_callbacks_spectrum_arg_get",1,SWIGTYPE_p_rig_callbacks);
  }
  
  result = (void *) ((arg1)->spectrum_arg);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_rig_callbacks(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_callbacks *result = 0 ;
  
  SWIG_check_num_args("rig_callbacks::rig_callbacks",0,0)
  result = (struct rig_callbacks *)calloc(1, sizeof(struct rig_callbacks));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_rig_callbacks,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_rig_callbacks(void *obj) {
struct rig_callbacks *arg1 = (struct rig_callbacks *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_rig_callbacks(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_rig_callbacks);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_rig_callbacks_attributes[] = {
    { "freq_event", _wrap_rig_callbacks_freq_event_get, _wrap_rig_callbacks_freq_event_set },
    { "freq_arg", _wrap_rig_callbacks_freq_arg_get, _wrap_rig_callbacks_freq_arg_set },
    { "mode_event", _wrap_rig_callbacks_mode_event_get, _wrap_rig_callbacks_mode_event_set },
    { "mode_arg", _wrap_rig_callbacks_mode_arg_get, _wrap_rig_callbacks_mode_arg_set },
    { "vfo_event", _wrap_rig_callbacks_vfo_event_get, _wrap_rig_callbacks_vfo_event_set },
    { "vfo_arg", _wrap_rig_callbacks_vfo_arg_get, _wrap_rig_callbacks_vfo_arg_set },
    { "ptt_event", _wrap_rig_callbacks_ptt_event_get, _wrap_rig_callbacks_ptt_event_set },
    { "ptt_arg", _wrap_rig_callbacks_ptt_arg_get, _wrap_rig_callbacks_ptt_arg_set },
    { "dcd_event", _wrap_rig_callbacks_dcd_event_get, _wrap_rig_callbacks_dcd_event_set },
    { "dcd_arg", _wrap_rig_callbacks_dcd_arg_get, _wrap_rig_callbacks_dcd_arg_set },
    { "pltune", _wrap_rig_callbacks_pltune_get, _wrap_rig_callbacks_pltune_set },
    { "pltune_arg", _wrap_rig_callbacks_pltune_arg_get, _wrap_rig_callbacks_pltune_arg_set },
    { "spectrum_event", _wrap_rig_callbacks_spectrum_event_get, _wrap_rig_callbacks_spectrum_event_set },
    { "spectrum_arg", _wrap_rig_callbacks_spectrum_arg_get, _wrap_rig_callbacks_spectrum_arg_set },
    {0,0,0}
};
static swig_lua_method swig_rig_callbacks_methods[]= {
    {0,0}
};
static swig_lua_method swig_rig_callbacks_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_rig_callbacks_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_rig_callbacks_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_rig_callbacks_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_rig_callbacks_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_rig_callbacks_Sf_SwigStatic = {
    "rig_callbacks",
    swig_rig_callbacks_Sf_SwigStatic_methods,
    swig_rig_callbacks_Sf_SwigStatic_attributes,
    swig_rig_callbacks_Sf_SwigStatic_constants,
    swig_rig_callbacks_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_rig_callbacks_bases[] = {0};
static const char *swig_rig_callbacks_base_names[] = {0};
static swig_lua_class _wrap_class_rig_callbacks = { "rig_callbacks", "rig_callbacks", &SWIGTYPE_p_rig_callbacks,_proxy__wrap_new_rig_callbacks, swig_delete_rig_callbacks, swig_rig_callbacks_methods, swig_rig_callbacks_attributes, &swig_rig_callbacks_Sf_SwigStatic, swig_rig_callbacks_meta, swig_rig_callbacks_bases, swig_rig_callbacks_base_names };

static int _wrap_netrigctl_get_vfo_mode(lua_State* L) {
  int SWIG_arg = 0;
  RIG *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("netrigctl_get_vfo_mode",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("netrigctl_get_vfo_mode",1,"RIG *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_s_rig,0))){
    SWIG_fail_ptr("netrigctl_get_vfo_mode",1,SWIGTYPE_p_s_rig);
  }
  
  result = (int)netrigctl_get_vfo_mode(arg1);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rigerror(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rigerror",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("rigerror",1,"int");
  arg1 = (int)lua_tonumber(L, 1);
  result = (char *)rigerror(arg1);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rigerror2(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rigerror2",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("rigerror2",1,"int");
  arg1 = (int)lua_tonumber(L, 1);
  result = (char *)rigerror2(arg1);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_set_debug(lua_State* L) {
  int SWIG_arg = 0;
  enum rig_debug_level_e arg1 ;
  
  SWIG_check_num_args("rig_set_debug",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("rig_set_debug",1,"enum rig_debug_level_e");
  arg1 = (enum rig_debug_level_e)(int)lua_tonumber(L, 1);
  rig_set_debug(arg1);
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_get_debug(lua_State* L) {
  int SWIG_arg = 0;
  enum rig_debug_level_e *arg1 = 0 ;
  enum rig_debug_level_e temp1 ;
  
  arg1 = &temp1; 
  SWIG_check_num_args("rig_get_debug",0,0)
  rig_get_debug(arg1);
  
  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_set_debug_time_stamp(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  
  SWIG_check_num_args("rig_set_debug_time_stamp",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("rig_set_debug_time_stamp",1,"int");
  arg1 = (int)lua_tonumber(L, 1);
  rig_set_debug_time_stamp(arg1);
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_add2debugmsgsave(lua_State* L) {
  int SWIG_arg = 0;
  char *arg1 = 0 ;
  
  SWIG_check_num_args("add2debugmsgsave",1,1)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("add2debugmsgsave",1,"char const *");
  arg1 = (char *)lua_tostring(L, 1);
  add2debugmsgsave((char const *)arg1);
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_strrmode(lua_State* L) {
  int SWIG_arg = 0;
  rmode_t arg1 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_strrmode",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("rig_strrmode",1,"rmode_t");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative");
  arg1 = (rmode_t)lua_tonumber(L, 1);
  result = (char *)rig_strrmode(arg1);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_strrmodes(lua_State* L) {
  int SWIG_arg = 0;
  rmode_t arg1 ;
  char *arg2 = 0 ;
  int arg3 ;
  int result;
  
  SWIG_check_num_args("rig_strrmodes",3,3)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("rig_strrmodes",1,"rmode_t");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("rig_strrmodes",2,"char *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("rig_strrmodes",3,"int");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative");
  arg1 = (rmode_t)lua_tonumber(L, 1);
  arg2 = (char *)lua_tostring(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  result = (int)rig_strrmodes(arg1,arg2,arg3);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_strvfo(lua_State* L) {
  int SWIG_arg = 0;
  vfo_t arg1 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_strvfo",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("rig_strvfo",1,"vfo_t");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative");
  arg1 = (vfo_t)lua_tonumber(L, 1);
  result = (char *)rig_strvfo(arg1);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_strfunc(lua_State* L) {
  int SWIG_arg = 0;
  setting_t arg1 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_strfunc",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("rig_strfunc",1,"setting_t");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative");
  arg1 = (setting_t)lua_tonumber(L, 1);
  result = (char *)rig_strfunc(arg1);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_strlevel(lua_State* L) {
  int SWIG_arg = 0;
  setting_t arg1 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_strlevel",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("rig_strlevel",1,"setting_t");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative");
  arg1 = (setting_t)lua_tonumber(L, 1);
  result = (char *)rig_strlevel(arg1);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_strparm(lua_State* L) {
  int SWIG_arg = 0;
  setting_t arg1 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_strparm",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("rig_strparm",1,"setting_t");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative");
  arg1 = (setting_t)lua_tonumber(L, 1);
  result = (char *)rig_strparm(arg1);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_stragclevel(lua_State* L) {
  int SWIG_arg = 0;
  enum agc_level_e arg1 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_stragclevel",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("rig_stragclevel",1,"enum agc_level_e");
  arg1 = (enum agc_level_e)(int)lua_tonumber(L, 1);
  result = (char *)rig_stragclevel(arg1);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_strptrshift(lua_State* L) {
  int SWIG_arg = 0;
  rptr_shift_t arg1 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_strptrshift",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("rig_strptrshift",1,"rptr_shift_t");
  arg1 = (rptr_shift_t)(int)lua_tonumber(L, 1);
  result = (char *)rig_strptrshift(arg1);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_strvfop(lua_State* L) {
  int SWIG_arg = 0;
  vfo_op_t arg1 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_strvfop",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("rig_strvfop",1,"vfo_op_t");
  arg1 = (vfo_op_t)(int)lua_tonumber(L, 1);
  result = (char *)rig_strvfop(arg1);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_strscan(lua_State* L) {
  int SWIG_arg = 0;
  scan_t arg1 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_strscan",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("rig_strscan",1,"scan_t");
  arg1 = (scan_t)(int)lua_tonumber(L, 1);
  result = (char *)rig_strscan(arg1);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_strstatus(lua_State* L) {
  int SWIG_arg = 0;
  enum rig_status_e arg1 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_strstatus",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("rig_strstatus",1,"enum rig_status_e");
  arg1 = (enum rig_status_e)(int)lua_tonumber(L, 1);
  result = (char *)rig_strstatus(arg1);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_strmtype(lua_State* L) {
  int SWIG_arg = 0;
  chan_type_t arg1 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_strmtype",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("rig_strmtype",1,"chan_type_t");
  arg1 = (chan_type_t)(int)lua_tonumber(L, 1);
  result = (char *)rig_strmtype(arg1);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_strspectrummode(lua_State* L) {
  int SWIG_arg = 0;
  enum rig_spectrum_mode_e arg1 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_strspectrummode",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("rig_strspectrummode",1,"enum rig_spectrum_mode_e");
  arg1 = (enum rig_spectrum_mode_e)(int)lua_tonumber(L, 1);
  result = (char *)rig_strspectrummode(arg1);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_strcommstatus(lua_State* L) {
  int SWIG_arg = 0;
  rig_comm_status_t arg1 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_strcommstatus",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("rig_strcommstatus",1,"rig_comm_status_t");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative");
  arg1 = (rig_comm_status_t)lua_tonumber(L, 1);
  result = (char *)rig_strcommstatus(arg1);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_hl_usleep(lua_State* L) {
  int SWIG_arg = 0;
  rig_useconds_t arg1 ;
  int result;
  
  SWIG_check_num_args("hl_usleep",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("hl_usleep",1,"rig_useconds_t");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative");
  arg1 = (rig_useconds_t)lua_tonumber(L, 1);
  result = (int)hl_usleep(arg1);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_longlat2locator(lua_State* L) {
  int SWIG_arg = 0;
  double arg1 ;
  double arg2 ;
  char *arg3 = 0 ;
  int arg4 ;
  char *returnstr3 ;
  int result;
  
  {
    char returnstr3[1024];
    arg3 = returnstr3;
  }
  SWIG_check_num_args("longlat2locator",3,3)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("longlat2locator",1,"double");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("longlat2locator",2,"double");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("longlat2locator",3,"int");
  arg1 = (double)lua_tonumber(L, 1);
  arg2 = (double)lua_tonumber(L, 2);
  arg4 = (int)lua_tonumber(L, 3);
  result = (int)longlat2locator(arg1,arg2,arg3,arg4);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  {
    lua_pushstring(L,(char *)arg3); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_locator2longlat(lua_State* L) {
  int SWIG_arg = 0;
  double *arg1 = 0 ;
  double *arg2 = 0 ;
  char *arg3 = 0 ;
  double temp1 ;
  double temp2 ;
  int result;
  
  arg1 = &temp1; 
  arg2 = &temp2; 
  SWIG_check_num_args("locator2longlat",1,1)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("locator2longlat",1,"char const *");
  arg3 = (char *)lua_tostring(L, 1);
  result = (int)locator2longlat(arg1,arg2,(char const *)arg3);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_vfo_comp_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  double arg2 ;
  
  SWIG_check_num_args("rig_state::vfo_comp",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::vfo_comp",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::vfo_comp",2,"double");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_vfo_comp_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (double)lua_tonumber(L, 2);
  if (arg1) (arg1)->vfo_comp = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_vfo_comp_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  double result;
  
  SWIG_check_num_args("rig_state::vfo_comp",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::vfo_comp",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_vfo_comp_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (double) ((arg1)->vfo_comp);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rx_range_list_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_state::rx_range_list",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rx_range_list",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::rx_range_list",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rx_range_list_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_state_rx_range_list_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->rx_range_list;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rx_range_list_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_state::rx_range_list",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rx_range_list",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rx_range_list_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->rx_range_list);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_tx_range_list_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_state::tx_range_list",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::tx_range_list",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::tx_range_list",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_tx_range_list_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_state_tx_range_list_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->tx_range_list;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_tx_range_list_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_state::tx_range_list",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::tx_range_list",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_tx_range_list_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->tx_range_list);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_tuning_steps_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  struct tuning_step_list *arg2 = (struct tuning_step_list *)0 ;
  
  SWIG_check_num_args("rig_state::tuning_steps",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::tuning_steps",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::tuning_steps",2,"struct tuning_step_list [20]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_tuning_steps_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_tuning_step_list,0))){
    SWIG_fail_ptr("rig_state_tuning_steps_set",2,SWIGTYPE_p_tuning_step_list);
  }
  
  {
    size_t ii;
    struct tuning_step_list *b = (struct tuning_step_list *) arg1->tuning_steps;
    for (ii = 0; ii < (size_t)20; ii++) b[ii] = *((struct tuning_step_list *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_tuning_steps_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  struct tuning_step_list *result = 0 ;
  
  SWIG_check_num_args("rig_state::tuning_steps",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::tuning_steps",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_tuning_steps_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (struct tuning_step_list *)(struct tuning_step_list *) ((arg1)->tuning_steps);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_tuning_step_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_filters_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  struct filter_list *arg2 = (struct filter_list *)0 ;
  
  SWIG_check_num_args("rig_state::filters",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::filters",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::filters",2,"struct filter_list [60]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_filters_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_filter_list,0))){
    SWIG_fail_ptr("rig_state_filters_set",2,SWIGTYPE_p_filter_list);
  }
  
  {
    size_t ii;
    struct filter_list *b = (struct filter_list *) arg1->filters;
    for (ii = 0; ii < (size_t)60; ii++) b[ii] = *((struct filter_list *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_filters_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  struct filter_list *result = 0 ;
  
  SWIG_check_num_args("rig_state::filters",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::filters",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_filters_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (struct filter_list *)(struct filter_list *) ((arg1)->filters);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_filter_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_str_cal_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  cal_table_t *arg2 = 0 ;
  
  SWIG_check_num_args("rig_state::str_cal",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::str_cal",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::str_cal",2,"cal_table_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_str_cal_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_cal_table,0))){
    SWIG_fail_ptr("rig_state_str_cal_set",2,SWIGTYPE_p_cal_table);
  }
  
  if (arg1) (arg1)->str_cal = *arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_str_cal_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  cal_table_t *result = 0 ;
  
  SWIG_check_num_args("rig_state::str_cal",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::str_cal",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_str_cal_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (cal_table_t *)& ((arg1)->str_cal);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_cal_table,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_chan_list_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  chan_t *arg2 = (chan_t *)0 ;
  
  SWIG_check_num_args("rig_state::chan_list",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::chan_list",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::chan_list",2,"chan_t [16]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_chan_list_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_chan_list,0))){
    SWIG_fail_ptr("rig_state_chan_list_set",2,SWIGTYPE_p_chan_list);
  }
  
  {
    size_t ii;
    chan_t *b = (chan_t *) arg1->chan_list;
    for (ii = 0; ii < (size_t)16; ii++) b[ii] = *((chan_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_chan_list_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  chan_t *result = 0 ;
  
  SWIG_check_num_args("rig_state::chan_list",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::chan_list",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_chan_list_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (chan_t *)(chan_t *) ((arg1)->chan_list);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_chan_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_max_rit_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  shortfreq_t arg2 ;
  
  SWIG_check_num_args("rig_state::max_rit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::max_rit",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::max_rit",2,"shortfreq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_max_rit_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (shortfreq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->max_rit = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_max_rit_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  shortfreq_t result;
  
  SWIG_check_num_args("rig_state::max_rit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::max_rit",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_max_rit_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (shortfreq_t) ((arg1)->max_rit);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_max_xit_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  shortfreq_t arg2 ;
  
  SWIG_check_num_args("rig_state::max_xit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::max_xit",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::max_xit",2,"shortfreq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_max_xit_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (shortfreq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->max_xit = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_max_xit_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  shortfreq_t result;
  
  SWIG_check_num_args("rig_state::max_xit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::max_xit",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_max_xit_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (shortfreq_t) ((arg1)->max_xit);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_max_ifshift_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  shortfreq_t arg2 ;
  
  SWIG_check_num_args("rig_state::max_ifshift",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::max_ifshift",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::max_ifshift",2,"shortfreq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_max_ifshift_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (shortfreq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->max_ifshift = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_max_ifshift_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  shortfreq_t result;
  
  SWIG_check_num_args("rig_state::max_ifshift",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::max_ifshift",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_max_ifshift_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (shortfreq_t) ((arg1)->max_ifshift);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_announces_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  ann_t arg2 ;
  
  SWIG_check_num_args("rig_state::announces",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::announces",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::announces",2,"ann_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_announces_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (ann_t)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->announces = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_announces_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  ann_t result;
  
  SWIG_check_num_args("rig_state::announces",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::announces",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_announces_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (ann_t) ((arg1)->announces);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_preamp_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int *arg2 = (int *)0 ;
  
  SWIG_check_num_args("rig_state::preamp",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::preamp",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::preamp",2,"int [8]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_preamp_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_int,0))){
    SWIG_fail_ptr("rig_state_preamp_set",2,SWIGTYPE_p_int);
  }
  
  {
    size_t ii;
    int *b = (int *) arg1->preamp;
    for (ii = 0; ii < (size_t)8; ii++) b[ii] = *((int *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_preamp_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int *result = 0 ;
  
  SWIG_check_num_args("rig_state::preamp",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::preamp",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_preamp_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int *)(int *) ((arg1)->preamp);
  {
    int len,i;
    len = 8;
    lua_createtable (L, len, 0);
    for(i=0; i<len; i++) {
      lua_pushinteger(L, (i+1)); // Lua starts list index with 1
      lua_pushinteger(L, (lua_Integer)result[i]);
      lua_rawset(L, -3);
    }
    SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_attenuator_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int *arg2 = (int *)0 ;
  
  SWIG_check_num_args("rig_state::attenuator",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::attenuator",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::attenuator",2,"int [8]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_attenuator_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_int,0))){
    SWIG_fail_ptr("rig_state_attenuator_set",2,SWIGTYPE_p_int);
  }
  
  {
    size_t ii;
    int *b = (int *) arg1->attenuator;
    for (ii = 0; ii < (size_t)8; ii++) b[ii] = *((int *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_attenuator_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int *result = 0 ;
  
  SWIG_check_num_args("rig_state::attenuator",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::attenuator",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_attenuator_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int *)(int *) ((arg1)->attenuator);
  {
    int len,i;
    len = 8;
    lua_createtable (L, len, 0);
    for(i=0; i<len; i++) {
      lua_pushinteger(L, (i+1)); // Lua starts list index with 1
      lua_pushinteger(L, (lua_Integer)result[i]);
      lua_rawset(L, -3);
    }
    SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_has_get_func_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rig_state::has_get_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::has_get_func",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::has_get_func",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_has_get_func_set",1,SWIGTYPE_p_rig_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_get_func = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_has_get_func_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rig_state::has_get_func",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::has_get_func",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_has_get_func_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (setting_t) ((arg1)->has_get_func);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_has_set_func_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rig_state::has_set_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::has_set_func",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::has_set_func",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_has_set_func_set",1,SWIGTYPE_p_rig_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_set_func = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_has_set_func_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rig_state::has_set_func",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::has_set_func",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_has_set_func_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (setting_t) ((arg1)->has_set_func);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_has_get_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rig_state::has_get_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::has_get_level",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::has_get_level",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_has_get_level_set",1,SWIGTYPE_p_rig_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_get_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_has_get_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rig_state::has_get_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::has_get_level",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_has_get_level_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (setting_t) ((arg1)->has_get_level);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_has_set_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rig_state::has_set_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::has_set_level",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::has_set_level",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_has_set_level_set",1,SWIGTYPE_p_rig_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_set_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_has_set_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rig_state::has_set_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::has_set_level",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_has_set_level_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (setting_t) ((arg1)->has_set_level);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_has_get_parm_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rig_state::has_get_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::has_get_parm",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::has_get_parm",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_has_get_parm_set",1,SWIGTYPE_p_rig_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_get_parm = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_has_get_parm_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rig_state::has_get_parm",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::has_get_parm",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_has_get_parm_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (setting_t) ((arg1)->has_get_parm);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_has_set_parm_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rig_state::has_set_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::has_set_parm",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::has_set_parm",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_has_set_parm_set",1,SWIGTYPE_p_rig_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_set_parm = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_has_set_parm_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rig_state::has_set_parm",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::has_set_parm",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_has_set_parm_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (setting_t) ((arg1)->has_set_parm);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_level_gran_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  gran_t *arg2 = (gran_t *)0 ;
  
  SWIG_check_num_args("rig_state::level_gran",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::level_gran",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::level_gran",2,"gran_t [64]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_level_gran_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_gran,0))){
    SWIG_fail_ptr("rig_state_level_gran_set",2,SWIGTYPE_p_gran);
  }
  
  {
    size_t ii;
    gran_t *b = (gran_t *) arg1->level_gran;
    for (ii = 0; ii < (size_t)64; ii++) b[ii] = *((gran_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_level_gran_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  gran_t *result = 0 ;
  
  SWIG_check_num_args("rig_state::level_gran",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::level_gran",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_level_gran_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (gran_t *)(gran_t *) ((arg1)->level_gran);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_gran,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_parm_gran_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  gran_t *arg2 = (gran_t *)0 ;
  
  SWIG_check_num_args("rig_state::parm_gran",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::parm_gran",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::parm_gran",2,"gran_t [64]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_parm_gran_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_gran,0))){
    SWIG_fail_ptr("rig_state_parm_gran_set",2,SWIGTYPE_p_gran);
  }
  
  {
    size_t ii;
    gran_t *b = (gran_t *) arg1->parm_gran;
    for (ii = 0; ii < (size_t)64; ii++) b[ii] = *((gran_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_parm_gran_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  gran_t *result = 0 ;
  
  SWIG_check_num_args("rig_state::parm_gran",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::parm_gran",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_parm_gran_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (gran_t *)(gran_t *) ((arg1)->parm_gran);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_gran,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_transaction_active_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::transaction_active",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::transaction_active",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::transaction_active",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_transaction_active_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->transaction_active = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_transaction_active_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::transaction_active",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::transaction_active",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_transaction_active_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->transaction_active);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_current_vfo_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  vfo_t arg2 ;
  
  SWIG_check_num_args("rig_state::current_vfo",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::current_vfo",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::current_vfo",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_current_vfo_set",1,SWIGTYPE_p_rig_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->current_vfo = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_current_vfo_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  vfo_t result;
  
  SWIG_check_num_args("rig_state::current_vfo",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::current_vfo",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_current_vfo_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (vfo_t) ((arg1)->current_vfo);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_vfo_list_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::vfo_list",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::vfo_list",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::vfo_list",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_vfo_list_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->vfo_list = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_vfo_list_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::vfo_list",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::vfo_list",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_vfo_list_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->vfo_list);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_comm_state_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::comm_state",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::comm_state",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::comm_state",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_comm_state_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->comm_state = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_comm_state_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::comm_state",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::comm_state",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_comm_state_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->comm_state);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_priv_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("rig_state::priv",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::priv",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::priv",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_priv_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"rig_state_priv_set");
  if (arg1) (arg1)->priv = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_priv_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("rig_state::priv",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::priv",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_priv_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (void *) ((arg1)->priv);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_obj_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("rig_state::obj",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::obj",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::obj",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_obj_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"rig_state_obj_set");
  if (arg1) (arg1)->obj = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_obj_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("rig_state::obj",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::obj",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_obj_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (void *) ((arg1)->obj);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_async_data_enabled_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::async_data_enabled",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::async_data_enabled",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::async_data_enabled",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_async_data_enabled_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->async_data_enabled = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_async_data_enabled_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::async_data_enabled",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::async_data_enabled",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_async_data_enabled_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->async_data_enabled);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_poll_interval_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::poll_interval",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::poll_interval",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::poll_interval",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_poll_interval_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->poll_interval = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_poll_interval_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::poll_interval",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::poll_interval",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_poll_interval_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->poll_interval);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_current_freq_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_t arg2 ;
  
  SWIG_check_num_args("rig_state::current_freq",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::current_freq",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::current_freq",2,"freq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_current_freq_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (freq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->current_freq = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_current_freq_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_t result;
  
  SWIG_check_num_args("rig_state::current_freq",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::current_freq",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_current_freq_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (freq_t) ((arg1)->current_freq);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_current_mode_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  rmode_t arg2 ;
  
  SWIG_check_num_args("rig_state::current_mode",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::current_mode",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::current_mode",2,"rmode_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_current_mode_set",1,SWIGTYPE_p_rig_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (rmode_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->current_mode = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_current_mode_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  rmode_t result;
  
  SWIG_check_num_args("rig_state::current_mode",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::current_mode",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_current_mode_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (rmode_t) ((arg1)->current_mode);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_current_width_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  pbwidth_t arg2 ;
  
  SWIG_check_num_args("rig_state::current_width",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::current_width",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::current_width",2,"pbwidth_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_current_width_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (pbwidth_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->current_width = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_current_width_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  pbwidth_t result;
  
  SWIG_check_num_args("rig_state::current_width",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::current_width",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_current_width_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (pbwidth_t) ((arg1)->current_width);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_tx_vfo_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  vfo_t arg2 ;
  
  SWIG_check_num_args("rig_state::tx_vfo",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::tx_vfo",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::tx_vfo",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_tx_vfo_set",1,SWIGTYPE_p_rig_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->tx_vfo = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_tx_vfo_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  vfo_t result;
  
  SWIG_check_num_args("rig_state::tx_vfo",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::tx_vfo",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_tx_vfo_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (vfo_t) ((arg1)->tx_vfo);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_mode_list_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  rmode_t arg2 ;
  
  SWIG_check_num_args("rig_state::mode_list",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::mode_list",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::mode_list",2,"rmode_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_mode_list_set",1,SWIGTYPE_p_rig_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (rmode_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->mode_list = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_mode_list_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  rmode_t result;
  
  SWIG_check_num_args("rig_state::mode_list",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::mode_list",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_mode_list_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (rmode_t) ((arg1)->mode_list);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_transmit_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::transmit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::transmit",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::transmit",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_transmit_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->transmit = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_transmit_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::transmit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::transmit",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_transmit_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->transmit);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_lo_freq_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_t arg2 ;
  
  SWIG_check_num_args("rig_state::lo_freq",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::lo_freq",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::lo_freq",2,"freq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_lo_freq_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (freq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->lo_freq = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_lo_freq_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_t result;
  
  SWIG_check_num_args("rig_state::lo_freq",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::lo_freq",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_lo_freq_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (freq_t) ((arg1)->lo_freq);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_twiddle_time_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  time_t arg2 ;
  time_t *argp2 ;
  
  SWIG_check_num_args("rig_state::twiddle_time",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::twiddle_time",1,"struct rig_state *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("rig_state::twiddle_time",2,"time_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_twiddle_time_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_time_t,0))){
    SWIG_fail_ptr("rig_state_twiddle_time_set",2,SWIGTYPE_p_time_t);
  }
  arg2 = *argp2;
  
  if (arg1) (arg1)->twiddle_time = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_twiddle_time_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  time_t result;
  
  SWIG_check_num_args("rig_state::twiddle_time",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::twiddle_time",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_twiddle_time_get",1,SWIGTYPE_p_rig_state);
  }
  
  result =  ((arg1)->twiddle_time);
  {
    time_t * resultptr;
    resultptr = (time_t *) malloc(sizeof(time_t));
    memmove(resultptr, &result, sizeof(time_t));
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_time_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_twiddle_timeout_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::twiddle_timeout",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::twiddle_timeout",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::twiddle_timeout",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_twiddle_timeout_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->twiddle_timeout = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_twiddle_timeout_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::twiddle_timeout",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::twiddle_timeout",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_twiddle_timeout_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->twiddle_timeout);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_uplink_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::uplink",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::uplink",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::uplink",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_uplink_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->uplink = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_uplink_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::uplink",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::uplink",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_uplink_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->uplink);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_vfo_opt_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::vfo_opt",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::vfo_opt",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::vfo_opt",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_vfo_opt_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->vfo_opt = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_vfo_opt_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::vfo_opt",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::vfo_opt",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_vfo_opt_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->vfo_opt);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_auto_power_on_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::auto_power_on",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::auto_power_on",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::auto_power_on",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_auto_power_on_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->auto_power_on = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_auto_power_on_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::auto_power_on",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::auto_power_on",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_auto_power_on_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->auto_power_on);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_auto_power_off_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::auto_power_off",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::auto_power_off",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::auto_power_off",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_auto_power_off_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->auto_power_off = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_auto_power_off_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::auto_power_off",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::auto_power_off",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_auto_power_off_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->auto_power_off);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_auto_disable_screensaver_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::auto_disable_screensaver",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::auto_disable_screensaver",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::auto_disable_screensaver",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_auto_disable_screensaver_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->auto_disable_screensaver = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_auto_disable_screensaver_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::auto_disable_screensaver",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::auto_disable_screensaver",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_auto_disable_screensaver_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->auto_disable_screensaver);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_ptt_share_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::ptt_share",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::ptt_share",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::ptt_share",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_ptt_share_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->ptt_share = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_ptt_share_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::ptt_share",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::ptt_share",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_ptt_share_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->ptt_share);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_power_now_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::power_now",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::power_now",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::power_now",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_power_now_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->power_now = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_power_now_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::power_now",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::power_now",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_power_now_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->power_now);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_power_min_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::power_min",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::power_min",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::power_min",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_power_min_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->power_min = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_power_min_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::power_min",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::power_min",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_power_min_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->power_min);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_power_max_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::power_max",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::power_max",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::power_max",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_power_max_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->power_max = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_power_max_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::power_max",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::power_max",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_power_max_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->power_max);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_disable_yaesu_bandselect_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  unsigned char arg2 ;
  
  SWIG_check_num_args("rig_state::disable_yaesu_bandselect",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::disable_yaesu_bandselect",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::disable_yaesu_bandselect",2,"unsigned char");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_disable_yaesu_bandselect_set",1,SWIGTYPE_p_rig_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned char)lua_tonumber(L, 2);
  if (arg1) (arg1)->disable_yaesu_bandselect = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_disable_yaesu_bandselect_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  unsigned char result;
  
  SWIG_check_num_args("rig_state::disable_yaesu_bandselect",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::disable_yaesu_bandselect",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_disable_yaesu_bandselect_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (unsigned char) ((arg1)->disable_yaesu_bandselect);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_twiddle_rit_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::twiddle_rit",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::twiddle_rit",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::twiddle_rit",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_twiddle_rit_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->twiddle_rit = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_twiddle_rit_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::twiddle_rit",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::twiddle_rit",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_twiddle_rit_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->twiddle_rit);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_twiddle_state_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::twiddle_state",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::twiddle_state",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::twiddle_state",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_twiddle_state_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->twiddle_state = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_twiddle_state_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::twiddle_state",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::twiddle_state",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_twiddle_state_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->twiddle_state);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rx_vfo_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  vfo_t arg2 ;
  
  SWIG_check_num_args("rig_state::rx_vfo",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rx_vfo",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::rx_vfo",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rx_vfo_set",1,SWIGTYPE_p_rig_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->rx_vfo = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rx_vfo_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  vfo_t result;
  
  SWIG_check_num_args("rig_state::rx_vfo",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rx_vfo",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rx_vfo_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (vfo_t) ((arg1)->rx_vfo);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_snapshot_packet_sequence_number_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("rig_state::snapshot_packet_sequence_number",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::snapshot_packet_sequence_number",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::snapshot_packet_sequence_number",2,"unsigned int volatile");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_snapshot_packet_sequence_number_set",1,SWIGTYPE_p_rig_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int volatile)lua_tonumber(L, 2);
  if (arg1) (arg1)->snapshot_packet_sequence_number = (unsigned int volatile )arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_snapshot_packet_sequence_number_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("rig_state::snapshot_packet_sequence_number",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::snapshot_packet_sequence_number",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_snapshot_packet_sequence_number_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (unsigned int)(unsigned int) ((arg1)->snapshot_packet_sequence_number);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_multicast_publisher_run_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::multicast_publisher_run",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::multicast_publisher_run",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::multicast_publisher_run",2,"int volatile");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_multicast_publisher_run_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int volatile)lua_tonumber(L, 2);
  if (arg1) (arg1)->multicast_publisher_run = (int volatile )arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_multicast_publisher_run_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::multicast_publisher_run",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::multicast_publisher_run",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_multicast_publisher_run_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int)(int) ((arg1)->multicast_publisher_run);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_multicast_publisher_priv_data_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("rig_state::multicast_publisher_priv_data",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::multicast_publisher_priv_data",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::multicast_publisher_priv_data",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_multicast_publisher_priv_data_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"rig_state_multicast_publisher_priv_data_set");
  if (arg1) (arg1)->multicast_publisher_priv_data = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_multicast_publisher_priv_data_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("rig_state::multicast_publisher_priv_data",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::multicast_publisher_priv_data",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_multicast_publisher_priv_data_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (void *) ((arg1)->multicast_publisher_priv_data);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_async_data_handler_thread_run_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::async_data_handler_thread_run",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::async_data_handler_thread_run",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::async_data_handler_thread_run",2,"int volatile");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_async_data_handler_thread_run_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int volatile)lua_tonumber(L, 2);
  if (arg1) (arg1)->async_data_handler_thread_run = (int volatile )arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_async_data_handler_thread_run_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::async_data_handler_thread_run",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::async_data_handler_thread_run",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_async_data_handler_thread_run_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int)(int) ((arg1)->async_data_handler_thread_run);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_async_data_handler_priv_data_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("rig_state::async_data_handler_priv_data",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::async_data_handler_priv_data",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::async_data_handler_priv_data",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_async_data_handler_priv_data_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"rig_state_async_data_handler_priv_data_set");
  if (arg1) (arg1)->async_data_handler_priv_data = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_async_data_handler_priv_data_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("rig_state::async_data_handler_priv_data",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::async_data_handler_priv_data",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_async_data_handler_priv_data_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (void *) ((arg1)->async_data_handler_priv_data);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_poll_routine_thread_run_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::poll_routine_thread_run",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::poll_routine_thread_run",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::poll_routine_thread_run",2,"int volatile");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_poll_routine_thread_run_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int volatile)lua_tonumber(L, 2);
  if (arg1) (arg1)->poll_routine_thread_run = (int volatile )arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_poll_routine_thread_run_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::poll_routine_thread_run",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::poll_routine_thread_run",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_poll_routine_thread_run_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int)(int) ((arg1)->poll_routine_thread_run);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_poll_routine_priv_data_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("rig_state::poll_routine_priv_data",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::poll_routine_priv_data",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::poll_routine_priv_data",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_poll_routine_priv_data_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"rig_state_poll_routine_priv_data_set");
  if (arg1) (arg1)->poll_routine_priv_data = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_poll_routine_priv_data_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("rig_state::poll_routine_priv_data",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::poll_routine_priv_data",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_poll_routine_priv_data_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (void *) ((arg1)->poll_routine_priv_data);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_mutex_set_transaction_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  pthread_mutex_t arg2 ;
  pthread_mutex_t *argp2 ;
  
  SWIG_check_num_args("rig_state::mutex_set_transaction",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::mutex_set_transaction",1,"struct rig_state *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("rig_state::mutex_set_transaction",2,"pthread_mutex_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_mutex_set_transaction_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_pthread_mutex_t,0))){
    SWIG_fail_ptr("rig_state_mutex_set_transaction_set",2,SWIGTYPE_p_pthread_mutex_t);
  }
  arg2 = *argp2;
  
  if (arg1) (arg1)->mutex_set_transaction = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_mutex_set_transaction_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  pthread_mutex_t result;
  
  SWIG_check_num_args("rig_state::mutex_set_transaction",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::mutex_set_transaction",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_mutex_set_transaction_get",1,SWIGTYPE_p_rig_state);
  }
  
  result =  ((arg1)->mutex_set_transaction);
  {
    pthread_mutex_t * resultptr;
    resultptr = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t));
    memmove(resultptr, &result, sizeof(pthread_mutex_t));
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_pthread_mutex_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rigport_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  hamlib_port_t arg2 ;
  hamlib_port_t *argp2 ;
  
  SWIG_check_num_args("rig_state::rigport",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rigport",1,"struct rig_state *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("rig_state::rigport",2,"hamlib_port_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rigport_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_hamlib_port,0))){
    SWIG_fail_ptr("rig_state_rigport_set",2,SWIGTYPE_p_hamlib_port);
  }
  arg2 = *argp2;
  
  if (arg1) (arg1)->rigport = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rigport_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  hamlib_port_t result;
  
  SWIG_check_num_args("rig_state::rigport",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rigport",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rigport_get",1,SWIGTYPE_p_rig_state);
  }
  
  result =  ((arg1)->rigport);
  {
    hamlib_port_t * resultptr;
    resultptr = (hamlib_port_t *) malloc(sizeof(hamlib_port_t));
    memmove(resultptr, &result, sizeof(hamlib_port_t));
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_hamlib_port,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_pttport_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  hamlib_port_t arg2 ;
  hamlib_port_t *argp2 ;
  
  SWIG_check_num_args("rig_state::pttport",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::pttport",1,"struct rig_state *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("rig_state::pttport",2,"hamlib_port_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_pttport_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_hamlib_port,0))){
    SWIG_fail_ptr("rig_state_pttport_set",2,SWIGTYPE_p_hamlib_port);
  }
  arg2 = *argp2;
  
  if (arg1) (arg1)->pttport = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_pttport_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  hamlib_port_t result;
  
  SWIG_check_num_args("rig_state::pttport",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::pttport",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_pttport_get",1,SWIGTYPE_p_rig_state);
  }
  
  result =  ((arg1)->pttport);
  {
    hamlib_port_t * resultptr;
    resultptr = (hamlib_port_t *) malloc(sizeof(hamlib_port_t));
    memmove(resultptr, &result, sizeof(hamlib_port_t));
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_hamlib_port,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_dcdport_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  hamlib_port_t arg2 ;
  hamlib_port_t *argp2 ;
  
  SWIG_check_num_args("rig_state::dcdport",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::dcdport",1,"struct rig_state *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("rig_state::dcdport",2,"hamlib_port_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_dcdport_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_hamlib_port,0))){
    SWIG_fail_ptr("rig_state_dcdport_set",2,SWIGTYPE_p_hamlib_port);
  }
  arg2 = *argp2;
  
  if (arg1) (arg1)->dcdport = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_dcdport_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  hamlib_port_t result;
  
  SWIG_check_num_args("rig_state::dcdport",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::dcdport",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_dcdport_get",1,SWIGTYPE_p_rig_state);
  }
  
  result =  ((arg1)->dcdport);
  {
    hamlib_port_t * resultptr;
    resultptr = (hamlib_port_t *) malloc(sizeof(hamlib_port_t));
    memmove(resultptr, &result, sizeof(hamlib_port_t));
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_hamlib_port,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_use_cached_freq_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::use_cached_freq",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::use_cached_freq",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::use_cached_freq",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_use_cached_freq_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->use_cached_freq = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_use_cached_freq_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::use_cached_freq",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::use_cached_freq",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_use_cached_freq_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->use_cached_freq);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_use_cached_mode_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::use_cached_mode",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::use_cached_mode",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::use_cached_mode",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_use_cached_mode_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->use_cached_mode = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_use_cached_mode_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::use_cached_mode",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::use_cached_mode",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_use_cached_mode_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->use_cached_mode);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_use_cached_ptt_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::use_cached_ptt",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::use_cached_ptt",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::use_cached_ptt",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_use_cached_ptt_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->use_cached_ptt = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_use_cached_ptt_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::use_cached_ptt",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::use_cached_ptt",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_use_cached_ptt_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->use_cached_ptt);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_depth_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::depth",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::depth",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::depth",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_depth_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->depth = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_depth_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::depth",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::depth",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_depth_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->depth);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_lock_mode_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::lock_mode",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::lock_mode",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::lock_mode",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_lock_mode_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->lock_mode = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_lock_mode_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::lock_mode",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::lock_mode",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_lock_mode_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->lock_mode);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_powerstat_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  powerstat_t arg2 ;
  
  SWIG_check_num_args("rig_state::powerstat",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::powerstat",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::powerstat",2,"powerstat_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_powerstat_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (powerstat_t)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->powerstat = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_powerstat_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  powerstat_t result;
  
  SWIG_check_num_args("rig_state::powerstat",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::powerstat",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_powerstat_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (powerstat_t) ((arg1)->powerstat);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_tuner_control_pathname_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  char *arg2 = 0 ;
  
  SWIG_check_num_args("rig_state::tuner_control_pathname",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::tuner_control_pathname",1,"struct rig_state *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("rig_state::tuner_control_pathname",2,"char *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_tuner_control_pathname_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    free(arg1->tuner_control_pathname);
    if (arg2) {
      arg1->tuner_control_pathname = (char *) malloc(strlen((const char *)arg2)+1);
      strcpy((char *)arg1->tuner_control_pathname, (const char *)arg2);
    } else {
      arg1->tuner_control_pathname = 0;
    }
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_tuner_control_pathname_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_state::tuner_control_pathname",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::tuner_control_pathname",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_tuner_control_pathname_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (char *) ((arg1)->tuner_control_pathname);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_client_version_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  char *arg2 = (char *)0 ;
  
  SWIG_check_num_args("rig_state::client_version",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::client_version",1,"struct rig_state *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("rig_state::client_version",2,"char [32]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_client_version_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    if(arg2) {
      strncpy((char*)arg1->client_version, (const char *)arg2, 32-1);
      arg1->client_version[32-1] = 0;
    } else {
      arg1->client_version[0] = 0;
    }
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_client_version_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_state::client_version",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::client_version",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_client_version_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (char *)(char *) ((arg1)->client_version);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_offset_vfoa_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_t arg2 ;
  
  SWIG_check_num_args("rig_state::offset_vfoa",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::offset_vfoa",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::offset_vfoa",2,"freq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_offset_vfoa_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (freq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->offset_vfoa = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_offset_vfoa_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_t result;
  
  SWIG_check_num_args("rig_state::offset_vfoa",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::offset_vfoa",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_offset_vfoa_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (freq_t) ((arg1)->offset_vfoa);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_offset_vfob_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_t arg2 ;
  
  SWIG_check_num_args("rig_state::offset_vfob",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::offset_vfob",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::offset_vfob",2,"freq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_offset_vfob_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (freq_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->offset_vfob = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_offset_vfob_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_t result;
  
  SWIG_check_num_args("rig_state::offset_vfob",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::offset_vfob",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_offset_vfob_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (freq_t) ((arg1)->offset_vfob);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_multicast_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  struct multicast_s *arg2 = 0 ;
  
  SWIG_check_num_args("rig_state::multicast",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::multicast",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::multicast",2,"struct multicast_s *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_multicast_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_multicast_s,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("rig_state_multicast_set",2,SWIGTYPE_p_multicast_s);
  }
  
  if (arg1) (arg1)->multicast = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_multicast_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  struct multicast_s *result = 0 ;
  
  SWIG_check_num_args("rig_state::multicast",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::multicast",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_multicast_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (struct multicast_s *) ((arg1)->multicast);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_multicast_s,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rig_model_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  rig_model_t arg2 ;
  
  SWIG_check_num_args("rig_state::rig_model",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rig_model",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::rig_model",2,"rig_model_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rig_model_set",1,SWIGTYPE_p_rig_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (rig_model_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->rig_model = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rig_model_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  rig_model_t result;
  
  SWIG_check_num_args("rig_state::rig_model",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rig_model",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rig_model_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (rig_model_t) ((arg1)->rig_model);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_model_name_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  char *arg2 = 0 ;
  
  SWIG_check_num_args("rig_state::model_name",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::model_name",1,"struct rig_state *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("rig_state::model_name",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_model_name_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    if (arg2) {
      arg1->model_name = (char const *) malloc(strlen((const char *)arg2)+1);
      strcpy((char *)arg1->model_name, (const char *)arg2);
    } else {
      arg1->model_name = 0;
    }
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_model_name_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_state::model_name",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::model_name",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_model_name_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (char *) ((arg1)->model_name);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_mfg_name_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  char *arg2 = 0 ;
  
  SWIG_check_num_args("rig_state::mfg_name",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::mfg_name",1,"struct rig_state *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("rig_state::mfg_name",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_mfg_name_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    if (arg2) {
      arg1->mfg_name = (char const *) malloc(strlen((const char *)arg2)+1);
      strcpy((char *)arg1->mfg_name, (const char *)arg2);
    } else {
      arg1->mfg_name = 0;
    }
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_mfg_name_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_state::mfg_name",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::mfg_name",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_mfg_name_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (char *) ((arg1)->mfg_name);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_version_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  char *arg2 = 0 ;
  
  SWIG_check_num_args("rig_state::version",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::version",1,"struct rig_state *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("rig_state::version",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_version_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    if (arg2) {
      arg1->version = (char const *) malloc(strlen((const char *)arg2)+1);
      strcpy((char *)arg1->version, (const char *)arg2);
    } else {
      arg1->version = 0;
    }
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_version_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_state::version",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::version",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_version_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (char *) ((arg1)->version);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_copyright_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  char *arg2 = 0 ;
  
  SWIG_check_num_args("rig_state::copyright",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::copyright",1,"struct rig_state *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("rig_state::copyright",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_copyright_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    if (arg2) {
      arg1->copyright = (char const *) malloc(strlen((const char *)arg2)+1);
      strcpy((char *)arg1->copyright, (const char *)arg2);
    } else {
      arg1->copyright = 0;
    }
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_copyright_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_state::copyright",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::copyright",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_copyright_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (char *) ((arg1)->copyright);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_status_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  enum rig_status_e arg2 ;
  
  SWIG_check_num_args("rig_state::status",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::status",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::status",2,"enum rig_status_e");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_status_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (enum rig_status_e)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->status = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_status_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  enum rig_status_e result;
  
  SWIG_check_num_args("rig_state::status",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::status",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_status_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (enum rig_status_e) ((arg1)->status);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rig_type_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::rig_type",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rig_type",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::rig_type",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rig_type_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->rig_type = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rig_type_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::rig_type",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rig_type",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rig_type_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->rig_type);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_ptt_type_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  ptt_type_t arg2 ;
  
  SWIG_check_num_args("rig_state::ptt_type",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::ptt_type",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::ptt_type",2,"ptt_type_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_ptt_type_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (ptt_type_t)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->ptt_type = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_ptt_type_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  ptt_type_t result;
  
  SWIG_check_num_args("rig_state::ptt_type",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::ptt_type",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_ptt_type_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (ptt_type_t) ((arg1)->ptt_type);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_dcd_type_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  dcd_type_t arg2 ;
  
  SWIG_check_num_args("rig_state::dcd_type",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::dcd_type",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::dcd_type",2,"dcd_type_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_dcd_type_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (dcd_type_t)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->dcd_type = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_dcd_type_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  dcd_type_t result;
  
  SWIG_check_num_args("rig_state::dcd_type",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::dcd_type",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_dcd_type_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (dcd_type_t) ((arg1)->dcd_type);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_port_type_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  rig_port_t arg2 ;
  
  SWIG_check_num_args("rig_state::port_type",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::port_type",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::port_type",2,"rig_port_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_port_type_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (rig_port_t)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->port_type = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_port_type_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  rig_port_t result;
  
  SWIG_check_num_args("rig_state::port_type",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::port_type",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_port_type_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (rig_port_t) ((arg1)->port_type);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_serial_rate_min_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::serial_rate_min",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::serial_rate_min",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::serial_rate_min",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_serial_rate_min_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_rate_min = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_serial_rate_min_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::serial_rate_min",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::serial_rate_min",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_serial_rate_min_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->serial_rate_min);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_serial_rate_max_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::serial_rate_max",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::serial_rate_max",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::serial_rate_max",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_serial_rate_max_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_rate_max = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_serial_rate_max_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::serial_rate_max",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::serial_rate_max",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_serial_rate_max_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->serial_rate_max);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_serial_data_bits_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::serial_data_bits",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::serial_data_bits",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::serial_data_bits",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_serial_data_bits_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_data_bits = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_serial_data_bits_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::serial_data_bits",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::serial_data_bits",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_serial_data_bits_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->serial_data_bits);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_serial_stop_bits_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::serial_stop_bits",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::serial_stop_bits",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::serial_stop_bits",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_serial_stop_bits_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_stop_bits = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_serial_stop_bits_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::serial_stop_bits",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::serial_stop_bits",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_serial_stop_bits_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->serial_stop_bits);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_serial_parity_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  enum serial_parity_e arg2 ;
  
  SWIG_check_num_args("rig_state::serial_parity",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::serial_parity",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::serial_parity",2,"enum serial_parity_e");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_serial_parity_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (enum serial_parity_e)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_parity = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_serial_parity_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  enum serial_parity_e result;
  
  SWIG_check_num_args("rig_state::serial_parity",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::serial_parity",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_serial_parity_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (enum serial_parity_e) ((arg1)->serial_parity);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_serial_handshake_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  enum serial_handshake_e arg2 ;
  
  SWIG_check_num_args("rig_state::serial_handshake",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::serial_handshake",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::serial_handshake",2,"enum serial_handshake_e");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_serial_handshake_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (enum serial_handshake_e)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_handshake = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_serial_handshake_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  enum serial_handshake_e result;
  
  SWIG_check_num_args("rig_state::serial_handshake",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::serial_handshake",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_serial_handshake_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (enum serial_handshake_e) ((arg1)->serial_handshake);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_write_delay_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::write_delay",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::write_delay",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::write_delay",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_write_delay_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->write_delay = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_write_delay_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::write_delay",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::write_delay",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_write_delay_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->write_delay);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_post_write_delay_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::post_write_delay",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::post_write_delay",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::post_write_delay",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_post_write_delay_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->post_write_delay = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_post_write_delay_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::post_write_delay",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::post_write_delay",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_post_write_delay_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->post_write_delay);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_timeout_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::timeout",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::timeout",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::timeout",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_timeout_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->timeout = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_timeout_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::timeout",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::timeout",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_timeout_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->timeout);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_retry_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::retry",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::retry",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::retry",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_retry_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->retry = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_retry_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::retry",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::retry",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_retry_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->retry);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_targetable_vfo_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::targetable_vfo",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::targetable_vfo",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::targetable_vfo",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_targetable_vfo_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->targetable_vfo = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_targetable_vfo_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::targetable_vfo",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::targetable_vfo",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_targetable_vfo_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->targetable_vfo);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_async_data_supported_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::async_data_supported",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::async_data_supported",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::async_data_supported",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_async_data_supported_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->async_data_supported = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_async_data_supported_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::async_data_supported",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::async_data_supported",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_async_data_supported_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->async_data_supported);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_agc_level_count_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::agc_level_count",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::agc_level_count",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::agc_level_count",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_agc_level_count_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->agc_level_count = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_agc_level_count_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::agc_level_count",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::agc_level_count",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_agc_level_count_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->agc_level_count);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_agc_levels_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  enum agc_level_e *arg2 = (enum agc_level_e *)0 ;
  
  SWIG_check_num_args("rig_state::agc_levels",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::agc_levels",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::agc_levels",2,"enum agc_level_e [8]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_agc_levels_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_agc_level_e,0))){
    SWIG_fail_ptr("rig_state_agc_levels_set",2,SWIGTYPE_p_agc_level_e);
  }
  
  {
    size_t ii;
    enum agc_level_e *b = (enum agc_level_e *) arg1->agc_levels;
    for (ii = 0; ii < (size_t)8; ii++) b[ii] = *((enum agc_level_e *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_agc_levels_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  enum agc_level_e *result = 0 ;
  
  SWIG_check_num_args("rig_state::agc_levels",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::agc_levels",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_agc_levels_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (enum agc_level_e *)(enum agc_level_e *) ((arg1)->agc_levels);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_agc_level_e,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_ctcss_list_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  tone_t *arg2 = 0 ;
  
  SWIG_check_num_args("rig_state::ctcss_list",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::ctcss_list",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::ctcss_list",2,"tone_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_ctcss_list_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_unsigned_int,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("rig_state_ctcss_list_set",2,SWIGTYPE_p_unsigned_int);
  }
  
  if (arg1) (arg1)->ctcss_list = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_ctcss_list_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  tone_t *result = 0 ;
  
  SWIG_check_num_args("rig_state::ctcss_list",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::ctcss_list",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_ctcss_list_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (tone_t *) ((arg1)->ctcss_list);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_unsigned_int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_dcs_list_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  tone_t *arg2 = 0 ;
  
  SWIG_check_num_args("rig_state::dcs_list",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::dcs_list",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::dcs_list",2,"tone_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_dcs_list_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_unsigned_int,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("rig_state_dcs_list_set",2,SWIGTYPE_p_unsigned_int);
  }
  
  if (arg1) (arg1)->dcs_list = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_dcs_list_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  tone_t *result = 0 ;
  
  SWIG_check_num_args("rig_state::dcs_list",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::dcs_list",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_dcs_list_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (tone_t *) ((arg1)->dcs_list);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_unsigned_int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_vfo_ops_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  vfo_op_t arg2 ;
  
  SWIG_check_num_args("rig_state::vfo_ops",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::vfo_ops",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::vfo_ops",2,"vfo_op_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_vfo_ops_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (vfo_op_t)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->vfo_ops = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_vfo_ops_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  vfo_op_t result;
  
  SWIG_check_num_args("rig_state::vfo_ops",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::vfo_ops",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_vfo_ops_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (vfo_op_t) ((arg1)->vfo_ops);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_scan_ops_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  scan_t arg2 ;
  
  SWIG_check_num_args("rig_state::scan_ops",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::scan_ops",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::scan_ops",2,"scan_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_scan_ops_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (scan_t)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->scan_ops = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_scan_ops_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  scan_t result;
  
  SWIG_check_num_args("rig_state::scan_ops",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::scan_ops",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_scan_ops_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (scan_t) ((arg1)->scan_ops);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_transceive_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::transceive",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::transceive",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::transceive",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_transceive_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->transceive = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_transceive_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::transceive",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::transceive",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_transceive_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->transceive);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_bank_qty_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::bank_qty",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::bank_qty",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::bank_qty",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_bank_qty_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->bank_qty = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_bank_qty_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::bank_qty",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::bank_qty",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_bank_qty_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->bank_qty);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_chan_desc_sz_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::chan_desc_sz",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::chan_desc_sz",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::chan_desc_sz",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_chan_desc_sz_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->chan_desc_sz = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_chan_desc_sz_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::chan_desc_sz",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::chan_desc_sz",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_chan_desc_sz_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->chan_desc_sz);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rx_range_list1_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_state::rx_range_list1",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rx_range_list1",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::rx_range_list1",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rx_range_list1_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_state_rx_range_list1_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->rx_range_list1;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rx_range_list1_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_state::rx_range_list1",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rx_range_list1",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rx_range_list1_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->rx_range_list1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_tx_range_list1_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_state::tx_range_list1",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::tx_range_list1",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::tx_range_list1",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_tx_range_list1_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_state_tx_range_list1_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->tx_range_list1;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_tx_range_list1_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_state::tx_range_list1",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::tx_range_list1",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_tx_range_list1_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->tx_range_list1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rx_range_list2_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_state::rx_range_list2",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rx_range_list2",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::rx_range_list2",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rx_range_list2_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_state_rx_range_list2_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->rx_range_list2;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rx_range_list2_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_state::rx_range_list2",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rx_range_list2",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rx_range_list2_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->rx_range_list2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_tx_range_list2_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_state::tx_range_list2",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::tx_range_list2",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::tx_range_list2",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_tx_range_list2_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_state_tx_range_list2_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->tx_range_list2;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_tx_range_list2_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_state::tx_range_list2",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::tx_range_list2",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_tx_range_list2_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->tx_range_list2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rx_range_list3_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_state::rx_range_list3",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rx_range_list3",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::rx_range_list3",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rx_range_list3_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_state_rx_range_list3_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->rx_range_list3;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rx_range_list3_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_state::rx_range_list3",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rx_range_list3",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rx_range_list3_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->rx_range_list3);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_tx_range_list3_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_state::tx_range_list3",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::tx_range_list3",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::tx_range_list3",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_tx_range_list3_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_state_tx_range_list3_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->tx_range_list3;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_tx_range_list3_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_state::tx_range_list3",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::tx_range_list3",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_tx_range_list3_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->tx_range_list3);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rx_range_list4_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_state::rx_range_list4",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rx_range_list4",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::rx_range_list4",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rx_range_list4_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_state_rx_range_list4_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->rx_range_list4;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rx_range_list4_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_state::rx_range_list4",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rx_range_list4",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rx_range_list4_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->rx_range_list4);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_tx_range_list4_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_state::tx_range_list4",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::tx_range_list4",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::tx_range_list4",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_tx_range_list4_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_state_tx_range_list4_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->tx_range_list4;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_tx_range_list4_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_state::tx_range_list4",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::tx_range_list4",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_tx_range_list4_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->tx_range_list4);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rx_range_list5_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_state::rx_range_list5",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rx_range_list5",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::rx_range_list5",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rx_range_list5_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_state_rx_range_list5_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->rx_range_list5;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_rx_range_list5_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_state::rx_range_list5",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::rx_range_list5",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_rx_range_list5_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->rx_range_list5);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_tx_range_list5_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *arg2 = (freq_range_t *)0 ;
  
  SWIG_check_num_args("rig_state::tx_range_list5",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::tx_range_list5",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::tx_range_list5",2,"freq_range_t [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_tx_range_list5_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_freq_range_list,0))){
    SWIG_fail_ptr("rig_state_tx_range_list5_set",2,SWIGTYPE_p_freq_range_list);
  }
  
  {
    size_t ii;
    freq_range_t *b = (freq_range_t *) arg1->tx_range_list5;
    for (ii = 0; ii < (size_t)30; ii++) b[ii] = *((freq_range_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_tx_range_list5_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_range_t *result = 0 ;
  
  SWIG_check_num_args("rig_state::tx_range_list5",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::tx_range_list5",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_tx_range_list5_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (freq_range_t *)(freq_range_t *) ((arg1)->tx_range_list5);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_freq_range_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_spectrum_scopes_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  struct rig_spectrum_scope *arg2 = (struct rig_spectrum_scope *)0 ;
  
  SWIG_check_num_args("rig_state::spectrum_scopes",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::spectrum_scopes",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::spectrum_scopes",2,"struct rig_spectrum_scope [4]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_spectrum_scopes_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_rig_spectrum_scope,0))){
    SWIG_fail_ptr("rig_state_spectrum_scopes_set",2,SWIGTYPE_p_rig_spectrum_scope);
  }
  
  {
    size_t ii;
    struct rig_spectrum_scope *b = (struct rig_spectrum_scope *) arg1->spectrum_scopes;
    for (ii = 0; ii < (size_t)4; ii++) b[ii] = *((struct rig_spectrum_scope *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_spectrum_scopes_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  struct rig_spectrum_scope *result = 0 ;
  
  SWIG_check_num_args("rig_state::spectrum_scopes",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::spectrum_scopes",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_spectrum_scopes_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (struct rig_spectrum_scope *)(struct rig_spectrum_scope *) ((arg1)->spectrum_scopes);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_rig_spectrum_scope,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_spectrum_modes_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  enum rig_spectrum_mode_e *arg2 = (enum rig_spectrum_mode_e *)0 ;
  
  SWIG_check_num_args("rig_state::spectrum_modes",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::spectrum_modes",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::spectrum_modes",2,"enum rig_spectrum_mode_e [5]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_spectrum_modes_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_rig_spectrum_mode_e,0))){
    SWIG_fail_ptr("rig_state_spectrum_modes_set",2,SWIGTYPE_p_rig_spectrum_mode_e);
  }
  
  {
    size_t ii;
    enum rig_spectrum_mode_e *b = (enum rig_spectrum_mode_e *) arg1->spectrum_modes;
    for (ii = 0; ii < (size_t)5; ii++) b[ii] = *((enum rig_spectrum_mode_e *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_spectrum_modes_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  enum rig_spectrum_mode_e *result = 0 ;
  
  SWIG_check_num_args("rig_state::spectrum_modes",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::spectrum_modes",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_spectrum_modes_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (enum rig_spectrum_mode_e *)(enum rig_spectrum_mode_e *) ((arg1)->spectrum_modes);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_rig_spectrum_mode_e,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_spectrum_spans_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_t *arg2 = (freq_t *)0 ;
  
  SWIG_check_num_args("rig_state::spectrum_spans",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::spectrum_spans",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::spectrum_spans",2,"freq_t [20]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_spectrum_spans_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_double,0))){
    SWIG_fail_ptr("rig_state_spectrum_spans_set",2,SWIGTYPE_p_double);
  }
  
  {
    size_t ii;
    freq_t *b = (freq_t *) arg1->spectrum_spans;
    for (ii = 0; ii < (size_t)20; ii++) b[ii] = *((freq_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_spectrum_spans_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  freq_t *result = 0 ;
  
  SWIG_check_num_args("rig_state::spectrum_spans",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::spectrum_spans",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_spectrum_spans_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (freq_t *)(freq_t *) ((arg1)->spectrum_spans);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_double,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_spectrum_avg_modes_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  struct rig_spectrum_avg_mode *arg2 = (struct rig_spectrum_avg_mode *)0 ;
  
  SWIG_check_num_args("rig_state::spectrum_avg_modes",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::spectrum_avg_modes",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::spectrum_avg_modes",2,"struct rig_spectrum_avg_mode [12]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_spectrum_avg_modes_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_rig_spectrum_avg_mode,0))){
    SWIG_fail_ptr("rig_state_spectrum_avg_modes_set",2,SWIGTYPE_p_rig_spectrum_avg_mode);
  }
  
  {
    size_t ii;
    struct rig_spectrum_avg_mode *b = (struct rig_spectrum_avg_mode *) arg1->spectrum_avg_modes;
    for (ii = 0; ii < (size_t)12; ii++) b[ii] = *((struct rig_spectrum_avg_mode *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_spectrum_avg_modes_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  struct rig_spectrum_avg_mode *result = 0 ;
  
  SWIG_check_num_args("rig_state::spectrum_avg_modes",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::spectrum_avg_modes",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_spectrum_avg_modes_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (struct rig_spectrum_avg_mode *)(struct rig_spectrum_avg_mode *) ((arg1)->spectrum_avg_modes);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_rig_spectrum_avg_mode,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_spectrum_attenuator_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int *arg2 = (int *)0 ;
  
  SWIG_check_num_args("rig_state::spectrum_attenuator",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::spectrum_attenuator",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::spectrum_attenuator",2,"int [8]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_spectrum_attenuator_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_int,0))){
    SWIG_fail_ptr("rig_state_spectrum_attenuator_set",2,SWIGTYPE_p_int);
  }
  
  {
    size_t ii;
    int *b = (int *) arg1->spectrum_attenuator;
    for (ii = 0; ii < (size_t)8; ii++) b[ii] = *((int *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_spectrum_attenuator_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int *result = 0 ;
  
  SWIG_check_num_args("rig_state::spectrum_attenuator",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::spectrum_attenuator",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_spectrum_attenuator_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int *)(int *) ((arg1)->spectrum_attenuator);
  {
    int len,i;
    len = 8;
    lua_createtable (L, len, 0);
    for(i=0; i<len; i++) {
      lua_pushinteger(L, (i+1)); // Lua starts list index with 1
      lua_pushinteger(L, (lua_Integer)result[i]);
      lua_rawset(L, -3);
    }
    SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_morse_data_handler_thread_run_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::morse_data_handler_thread_run",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::morse_data_handler_thread_run",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::morse_data_handler_thread_run",2,"int volatile");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_morse_data_handler_thread_run_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int volatile)lua_tonumber(L, 2);
  if (arg1) (arg1)->morse_data_handler_thread_run = (int volatile )arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_morse_data_handler_thread_run_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::morse_data_handler_thread_run",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::morse_data_handler_thread_run",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_morse_data_handler_thread_run_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int)(int) ((arg1)->morse_data_handler_thread_run);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_morse_data_handler_priv_data_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("rig_state::morse_data_handler_priv_data",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::morse_data_handler_priv_data",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::morse_data_handler_priv_data",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_morse_data_handler_priv_data_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"rig_state_morse_data_handler_priv_data_set");
  if (arg1) (arg1)->morse_data_handler_priv_data = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_morse_data_handler_priv_data_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("rig_state::morse_data_handler_priv_data",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::morse_data_handler_priv_data",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_morse_data_handler_priv_data_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (void *) ((arg1)->morse_data_handler_priv_data);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_fifo_morse_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  struct FIFO_RIG_s *arg2 = 0 ;
  
  SWIG_check_num_args("rig_state::fifo_morse",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::fifo_morse",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::fifo_morse",2,"struct FIFO_RIG_s *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_fifo_morse_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_FIFO_RIG_s,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("rig_state_fifo_morse_set",2,SWIGTYPE_p_FIFO_RIG_s);
  }
  
  if (arg1) (arg1)->fifo_morse = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_fifo_morse_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  struct FIFO_RIG_s *result = 0 ;
  
  SWIG_check_num_args("rig_state::fifo_morse",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::fifo_morse",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_fifo_morse_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (struct FIFO_RIG_s *) ((arg1)->fifo_morse);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_FIFO_RIG_s,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_doppler_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::doppler",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::doppler",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::doppler",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_doppler_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->doppler = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_doppler_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::doppler",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::doppler",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_doppler_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->doppler);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_multicast_data_addr_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  char *arg2 = 0 ;
  
  SWIG_check_num_args("rig_state::multicast_data_addr",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::multicast_data_addr",1,"struct rig_state *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("rig_state::multicast_data_addr",2,"char *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_multicast_data_addr_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    free(arg1->multicast_data_addr);
    if (arg2) {
      arg1->multicast_data_addr = (char *) malloc(strlen((const char *)arg2)+1);
      strcpy((char *)arg1->multicast_data_addr, (const char *)arg2);
    } else {
      arg1->multicast_data_addr = 0;
    }
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_multicast_data_addr_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_state::multicast_data_addr",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::multicast_data_addr",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_multicast_data_addr_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (char *) ((arg1)->multicast_data_addr);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_multicast_data_port_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::multicast_data_port",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::multicast_data_port",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::multicast_data_port",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_multicast_data_port_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->multicast_data_port = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_multicast_data_port_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::multicast_data_port",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::multicast_data_port",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_multicast_data_port_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->multicast_data_port);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_multicast_cmd_addr_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  char *arg2 = 0 ;
  
  SWIG_check_num_args("rig_state::multicast_cmd_addr",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::multicast_cmd_addr",1,"struct rig_state *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("rig_state::multicast_cmd_addr",2,"char *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_multicast_cmd_addr_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    free(arg1->multicast_cmd_addr);
    if (arg2) {
      arg1->multicast_cmd_addr = (char *) malloc(strlen((const char *)arg2)+1);
      strcpy((char *)arg1->multicast_cmd_addr, (const char *)arg2);
    } else {
      arg1->multicast_cmd_addr = 0;
    }
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_multicast_cmd_addr_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_state::multicast_cmd_addr",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::multicast_cmd_addr",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_multicast_cmd_addr_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (char *) ((arg1)->multicast_cmd_addr);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_multicast_cmd_port_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::multicast_cmd_port",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::multicast_cmd_port",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::multicast_cmd_port",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_multicast_cmd_port_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->multicast_cmd_port = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_multicast_cmd_port_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::multicast_cmd_port",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::multicast_cmd_port",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_multicast_cmd_port_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->multicast_cmd_port);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_multicast_receiver_run_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::multicast_receiver_run",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::multicast_receiver_run",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::multicast_receiver_run",2,"int volatile");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_multicast_receiver_run_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int volatile)lua_tonumber(L, 2);
  if (arg1) (arg1)->multicast_receiver_run = (int volatile )arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_multicast_receiver_run_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::multicast_receiver_run",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::multicast_receiver_run",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_multicast_receiver_run_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int)(int) ((arg1)->multicast_receiver_run);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_multicast_receiver_priv_data_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("rig_state::multicast_receiver_priv_data",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::multicast_receiver_priv_data",1,"struct rig_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rig_state::multicast_receiver_priv_data",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_multicast_receiver_priv_data_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"rig_state_multicast_receiver_priv_data_set");
  if (arg1) (arg1)->multicast_receiver_priv_data = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_multicast_receiver_priv_data_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("rig_state::multicast_receiver_priv_data",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::multicast_receiver_priv_data",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_multicast_receiver_priv_data_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (void *) ((arg1)->multicast_receiver_priv_data);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_comm_status_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  rig_comm_status_t arg2 ;
  
  SWIG_check_num_args("rig_state::comm_status",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::comm_status",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::comm_status",2,"rig_comm_status_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_comm_status_set",1,SWIGTYPE_p_rig_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (rig_comm_status_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->comm_status = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_comm_status_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  rig_comm_status_t result;
  
  SWIG_check_num_args("rig_state::comm_status",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::comm_status",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_comm_status_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (rig_comm_status_t) ((arg1)->comm_status);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_device_id_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  char *arg2 = (char *)0 ;
  
  SWIG_check_num_args("rig_state::device_id",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::device_id",1,"struct rig_state *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("rig_state::device_id",2,"char [30]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_device_id_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    if(arg2) {
      strncpy((char*)arg1->device_id, (const char *)arg2, 30-1);
      arg1->device_id[30-1] = 0;
    } else {
      arg1->device_id[0] = 0;
    }
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_device_id_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rig_state::device_id",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::device_id",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_device_id_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (char *)(char *) ((arg1)->device_id);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_dual_watch_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::dual_watch",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::dual_watch",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::dual_watch",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_dual_watch_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->dual_watch = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_dual_watch_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::dual_watch",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::dual_watch",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_dual_watch_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->dual_watch);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_post_ptt_delay_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::post_ptt_delay",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::post_ptt_delay",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::post_ptt_delay",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_post_ptt_delay_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->post_ptt_delay = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_post_ptt_delay_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::post_ptt_delay",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::post_ptt_delay",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_post_ptt_delay_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->post_ptt_delay);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_freq_event_elapsed_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  struct timespec arg2 ;
  struct timespec *argp2 ;
  
  SWIG_check_num_args("rig_state::freq_event_elapsed",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::freq_event_elapsed",1,"struct rig_state *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("rig_state::freq_event_elapsed",2,"struct timespec");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_freq_event_elapsed_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_timespec,0))){
    SWIG_fail_ptr("rig_state_freq_event_elapsed_set",2,SWIGTYPE_p_timespec);
  }
  arg2 = *argp2;
  
  if (arg1) (arg1)->freq_event_elapsed = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_freq_event_elapsed_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  struct timespec result;
  
  SWIG_check_num_args("rig_state::freq_event_elapsed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::freq_event_elapsed",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_freq_event_elapsed_get",1,SWIGTYPE_p_rig_state);
  }
  
  result =  ((arg1)->freq_event_elapsed);
  {
    struct timespec * resultptr;
    resultptr = (struct timespec *) malloc(sizeof(struct timespec));
    memmove(resultptr, &result, sizeof(struct timespec));
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_timespec,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_freq_skip_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rig_state::freq_skip",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::freq_skip",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::freq_skip",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_freq_skip_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->freq_skip = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_freq_skip_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rig_state::freq_skip",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::freq_skip",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_freq_skip_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (int) ((arg1)->freq_skip);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_client_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  client_t arg2 ;
  
  SWIG_check_num_args("rig_state::client",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::client",1,"struct rig_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rig_state::client",2,"client_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_client_set",1,SWIGTYPE_p_rig_state);
  }
  
  arg2 = (client_t)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->client = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_client_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  client_t result;
  
  SWIG_check_num_args("rig_state::client",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::client",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_client_get",1,SWIGTYPE_p_rig_state);
  }
  
  result = (client_t) ((arg1)->client);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_api_mutex_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  pthread_mutex_t arg2 ;
  pthread_mutex_t *argp2 ;
  
  SWIG_check_num_args("rig_state::api_mutex",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::api_mutex",1,"struct rig_state *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("rig_state::api_mutex",2,"pthread_mutex_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_api_mutex_set",1,SWIGTYPE_p_rig_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_pthread_mutex_t,0))){
    SWIG_fail_ptr("rig_state_api_mutex_set",2,SWIGTYPE_p_pthread_mutex_t);
  }
  arg2 = *argp2;
  
  if (arg1) (arg1)->api_mutex = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rig_state_api_mutex_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *arg1 = 0 ;
  pthread_mutex_t result;
  
  SWIG_check_num_args("rig_state::api_mutex",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rig_state::api_mutex",1,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rig_state,0))){
    SWIG_fail_ptr("rig_state_api_mutex_get",1,SWIGTYPE_p_rig_state);
  }
  
  result =  ((arg1)->api_mutex);
  {
    pthread_mutex_t * resultptr;
    resultptr = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t));
    memmove(resultptr, &result, sizeof(pthread_mutex_t));
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_pthread_mutex_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_rig_state(lua_State* L) {
  int SWIG_arg = 0;
  struct rig_state *result = 0 ;
  
  SWIG_check_num_args("rig_state::rig_state",0,0)
  result = (struct rig_state *)calloc(1, sizeof(struct rig_state));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_rig_state,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_rig_state(void *obj) {
struct rig_state *arg1 = (struct rig_state *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_rig_state(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_rig_state);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_rig_state_attributes[] = {
    { "vfo_comp", _wrap_rig_state_vfo_comp_get, _wrap_rig_state_vfo_comp_set },
    { "rx_range_list", _wrap_rig_state_rx_range_list_get, _wrap_rig_state_rx_range_list_set },
    { "tx_range_list", _wrap_rig_state_tx_range_list_get, _wrap_rig_state_tx_range_list_set },
    { "tuning_steps", _wrap_rig_state_tuning_steps_get, _wrap_rig_state_tuning_steps_set },
    { "filters", _wrap_rig_state_filters_get, _wrap_rig_state_filters_set },
    { "str_cal", _wrap_rig_state_str_cal_get, _wrap_rig_state_str_cal_set },
    { "chan_list", _wrap_rig_state_chan_list_get, _wrap_rig_state_chan_list_set },
    { "max_rit", _wrap_rig_state_max_rit_get, _wrap_rig_state_max_rit_set },
    { "max_xit", _wrap_rig_state_max_xit_get, _wrap_rig_state_max_xit_set },
    { "max_ifshift", _wrap_rig_state_max_ifshift_get, _wrap_rig_state_max_ifshift_set },
    { "announces", _wrap_rig_state_announces_get, _wrap_rig_state_announces_set },
    { "preamp", _wrap_rig_state_preamp_get, _wrap_rig_state_preamp_set },
    { "attenuator", _wrap_rig_state_attenuator_get, _wrap_rig_state_attenuator_set },
    { "has_get_func", _wrap_rig_state_has_get_func_get, _wrap_rig_state_has_get_func_set },
    { "has_set_func", _wrap_rig_state_has_set_func_get, _wrap_rig_state_has_set_func_set },
    { "has_get_level", _wrap_rig_state_has_get_level_get, _wrap_rig_state_has_get_level_set },
    { "has_set_level", _wrap_rig_state_has_set_level_get, _wrap_rig_state_has_set_level_set },
    { "has_get_parm", _wrap_rig_state_has_get_parm_get, _wrap_rig_state_has_get_parm_set },
    { "has_set_parm", _wrap_rig_state_has_set_parm_get, _wrap_rig_state_has_set_parm_set },
    { "level_gran", _wrap_rig_state_level_gran_get, _wrap_rig_state_level_gran_set },
    { "parm_gran", _wrap_rig_state_parm_gran_get, _wrap_rig_state_parm_gran_set },
    { "transaction_active", _wrap_rig_state_transaction_active_get, _wrap_rig_state_transaction_active_set },
    { "current_vfo", _wrap_rig_state_current_vfo_get, _wrap_rig_state_current_vfo_set },
    { "vfo_list", _wrap_rig_state_vfo_list_get, _wrap_rig_state_vfo_list_set },
    { "comm_state", _wrap_rig_state_comm_state_get, _wrap_rig_state_comm_state_set },
    { "priv", _wrap_rig_state_priv_get, _wrap_rig_state_priv_set },
    { "obj", _wrap_rig_state_obj_get, _wrap_rig_state_obj_set },
    { "async_data_enabled", _wrap_rig_state_async_data_enabled_get, _wrap_rig_state_async_data_enabled_set },
    { "poll_interval", _wrap_rig_state_poll_interval_get, _wrap_rig_state_poll_interval_set },
    { "current_freq", _wrap_rig_state_current_freq_get, _wrap_rig_state_current_freq_set },
    { "current_mode", _wrap_rig_state_current_mode_get, _wrap_rig_state_current_mode_set },
    { "current_width", _wrap_rig_state_current_width_get, _wrap_rig_state_current_width_set },
    { "tx_vfo", _wrap_rig_state_tx_vfo_get, _wrap_rig_state_tx_vfo_set },
    { "mode_list", _wrap_rig_state_mode_list_get, _wrap_rig_state_mode_list_set },
    { "transmit", _wrap_rig_state_transmit_get, _wrap_rig_state_transmit_set },
    { "lo_freq", _wrap_rig_state_lo_freq_get, _wrap_rig_state_lo_freq_set },
    { "twiddle_time", _wrap_rig_state_twiddle_time_get, _wrap_rig_state_twiddle_time_set },
    { "twiddle_timeout", _wrap_rig_state_twiddle_timeout_get, _wrap_rig_state_twiddle_timeout_set },
    { "uplink", _wrap_rig_state_uplink_get, _wrap_rig_state_uplink_set },
    { "vfo_opt", _wrap_rig_state_vfo_opt_get, _wrap_rig_state_vfo_opt_set },
    { "auto_power_on", _wrap_rig_state_auto_power_on_get, _wrap_rig_state_auto_power_on_set },
    { "auto_power_off", _wrap_rig_state_auto_power_off_get, _wrap_rig_state_auto_power_off_set },
    { "auto_disable_screensaver", _wrap_rig_state_auto_disable_screensaver_get, _wrap_rig_state_auto_disable_screensaver_set },
    { "ptt_share", _wrap_rig_state_ptt_share_get, _wrap_rig_state_ptt_share_set },
    { "power_now", _wrap_rig_state_power_now_get, _wrap_rig_state_power_now_set },
    { "power_min", _wrap_rig_state_power_min_get, _wrap_rig_state_power_min_set },
    { "power_max", _wrap_rig_state_power_max_get, _wrap_rig_state_power_max_set },
    { "disable_yaesu_bandselect", _wrap_rig_state_disable_yaesu_bandselect_get, _wrap_rig_state_disable_yaesu_bandselect_set },
    { "twiddle_rit", _wrap_rig_state_twiddle_rit_get, _wrap_rig_state_twiddle_rit_set },
    { "twiddle_state", _wrap_rig_state_twiddle_state_get, _wrap_rig_state_twiddle_state_set },
    { "rx_vfo", _wrap_rig_state_rx_vfo_get, _wrap_rig_state_rx_vfo_set },
    { "snapshot_packet_sequence_number", _wrap_rig_state_snapshot_packet_sequence_number_get, _wrap_rig_state_snapshot_packet_sequence_number_set },
    { "multicast_publisher_run", _wrap_rig_state_multicast_publisher_run_get, _wrap_rig_state_multicast_publisher_run_set },
    { "multicast_publisher_priv_data", _wrap_rig_state_multicast_publisher_priv_data_get, _wrap_rig_state_multicast_publisher_priv_data_set },
    { "async_data_handler_thread_run", _wrap_rig_state_async_data_handler_thread_run_get, _wrap_rig_state_async_data_handler_thread_run_set },
    { "async_data_handler_priv_data", _wrap_rig_state_async_data_handler_priv_data_get, _wrap_rig_state_async_data_handler_priv_data_set },
    { "poll_routine_thread_run", _wrap_rig_state_poll_routine_thread_run_get, _wrap_rig_state_poll_routine_thread_run_set },
    { "poll_routine_priv_data", _wrap_rig_state_poll_routine_priv_data_get, _wrap_rig_state_poll_routine_priv_data_set },
    { "mutex_set_transaction", _wrap_rig_state_mutex_set_transaction_get, _wrap_rig_state_mutex_set_transaction_set },
    { "rigport", _wrap_rig_state_rigport_get, _wrap_rig_state_rigport_set },
    { "pttport", _wrap_rig_state_pttport_get, _wrap_rig_state_pttport_set },
    { "dcdport", _wrap_rig_state_dcdport_get, _wrap_rig_state_dcdport_set },
    { "use_cached_freq", _wrap_rig_state_use_cached_freq_get, _wrap_rig_state_use_cached_freq_set },
    { "use_cached_mode", _wrap_rig_state_use_cached_mode_get, _wrap_rig_state_use_cached_mode_set },
    { "use_cached_ptt", _wrap_rig_state_use_cached_ptt_get, _wrap_rig_state_use_cached_ptt_set },
    { "depth", _wrap_rig_state_depth_get, _wrap_rig_state_depth_set },
    { "lock_mode", _wrap_rig_state_lock_mode_get, _wrap_rig_state_lock_mode_set },
    { "powerstat", _wrap_rig_state_powerstat_get, _wrap_rig_state_powerstat_set },
    { "tuner_control_pathname", _wrap_rig_state_tuner_control_pathname_get, _wrap_rig_state_tuner_control_pathname_set },
    { "client_version", _wrap_rig_state_client_version_get, _wrap_rig_state_client_version_set },
    { "offset_vfoa", _wrap_rig_state_offset_vfoa_get, _wrap_rig_state_offset_vfoa_set },
    { "offset_vfob", _wrap_rig_state_offset_vfob_get, _wrap_rig_state_offset_vfob_set },
    { "multicast", _wrap_rig_state_multicast_get, _wrap_rig_state_multicast_set },
    { "rig_model", _wrap_rig_state_rig_model_get, _wrap_rig_state_rig_model_set },
    { "model_name", _wrap_rig_state_model_name_get, _wrap_rig_state_model_name_set },
    { "mfg_name", _wrap_rig_state_mfg_name_get, _wrap_rig_state_mfg_name_set },
    { "version", _wrap_rig_state_version_get, _wrap_rig_state_version_set },
    { "copyright", _wrap_rig_state_copyright_get, _wrap_rig_state_copyright_set },
    { "status", _wrap_rig_state_status_get, _wrap_rig_state_status_set },
    { "rig_type", _wrap_rig_state_rig_type_get, _wrap_rig_state_rig_type_set },
    { "ptt_type", _wrap_rig_state_ptt_type_get, _wrap_rig_state_ptt_type_set },
    { "dcd_type", _wrap_rig_state_dcd_type_get, _wrap_rig_state_dcd_type_set },
    { "port_type", _wrap_rig_state_port_type_get, _wrap_rig_state_port_type_set },
    { "serial_rate_min", _wrap_rig_state_serial_rate_min_get, _wrap_rig_state_serial_rate_min_set },
    { "serial_rate_max", _wrap_rig_state_serial_rate_max_get, _wrap_rig_state_serial_rate_max_set },
    { "serial_data_bits", _wrap_rig_state_serial_data_bits_get, _wrap_rig_state_serial_data_bits_set },
    { "serial_stop_bits", _wrap_rig_state_serial_stop_bits_get, _wrap_rig_state_serial_stop_bits_set },
    { "serial_parity", _wrap_rig_state_serial_parity_get, _wrap_rig_state_serial_parity_set },
    { "serial_handshake", _wrap_rig_state_serial_handshake_get, _wrap_rig_state_serial_handshake_set },
    { "write_delay", _wrap_rig_state_write_delay_get, _wrap_rig_state_write_delay_set },
    { "post_write_delay", _wrap_rig_state_post_write_delay_get, _wrap_rig_state_post_write_delay_set },
    { "timeout", _wrap_rig_state_timeout_get, _wrap_rig_state_timeout_set },
    { "retry", _wrap_rig_state_retry_get, _wrap_rig_state_retry_set },
    { "targetable_vfo", _wrap_rig_state_targetable_vfo_get, _wrap_rig_state_targetable_vfo_set },
    { "async_data_supported", _wrap_rig_state_async_data_supported_get, _wrap_rig_state_async_data_supported_set },
    { "agc_level_count", _wrap_rig_state_agc_level_count_get, _wrap_rig_state_agc_level_count_set },
    { "agc_levels", _wrap_rig_state_agc_levels_get, _wrap_rig_state_agc_levels_set },
    { "ctcss_list", _wrap_rig_state_ctcss_list_get, _wrap_rig_state_ctcss_list_set },
    { "dcs_list", _wrap_rig_state_dcs_list_get, _wrap_rig_state_dcs_list_set },
    { "vfo_ops", _wrap_rig_state_vfo_ops_get, _wrap_rig_state_vfo_ops_set },
    { "scan_ops", _wrap_rig_state_scan_ops_get, _wrap_rig_state_scan_ops_set },
    { "transceive", _wrap_rig_state_transceive_get, _wrap_rig_state_transceive_set },
    { "bank_qty", _wrap_rig_state_bank_qty_get, _wrap_rig_state_bank_qty_set },
    { "chan_desc_sz", _wrap_rig_state_chan_desc_sz_get, _wrap_rig_state_chan_desc_sz_set },
    { "rx_range_list1", _wrap_rig_state_rx_range_list1_get, _wrap_rig_state_rx_range_list1_set },
    { "tx_range_list1", _wrap_rig_state_tx_range_list1_get, _wrap_rig_state_tx_range_list1_set },
    { "rx_range_list2", _wrap_rig_state_rx_range_list2_get, _wrap_rig_state_rx_range_list2_set },
    { "tx_range_list2", _wrap_rig_state_tx_range_list2_get, _wrap_rig_state_tx_range_list2_set },
    { "rx_range_list3", _wrap_rig_state_rx_range_list3_get, _wrap_rig_state_rx_range_list3_set },
    { "tx_range_list3", _wrap_rig_state_tx_range_list3_get, _wrap_rig_state_tx_range_list3_set },
    { "rx_range_list4", _wrap_rig_state_rx_range_list4_get, _wrap_rig_state_rx_range_list4_set },
    { "tx_range_list4", _wrap_rig_state_tx_range_list4_get, _wrap_rig_state_tx_range_list4_set },
    { "rx_range_list5", _wrap_rig_state_rx_range_list5_get, _wrap_rig_state_rx_range_list5_set },
    { "tx_range_list5", _wrap_rig_state_tx_range_list5_get, _wrap_rig_state_tx_range_list5_set },
    { "spectrum_scopes", _wrap_rig_state_spectrum_scopes_get, _wrap_rig_state_spectrum_scopes_set },
    { "spectrum_modes", _wrap_rig_state_spectrum_modes_get, _wrap_rig_state_spectrum_modes_set },
    { "spectrum_spans", _wrap_rig_state_spectrum_spans_get, _wrap_rig_state_spectrum_spans_set },
    { "spectrum_avg_modes", _wrap_rig_state_spectrum_avg_modes_get, _wrap_rig_state_spectrum_avg_modes_set },
    { "spectrum_attenuator", _wrap_rig_state_spectrum_attenuator_get, _wrap_rig_state_spectrum_attenuator_set },
    { "morse_data_handler_thread_run", _wrap_rig_state_morse_data_handler_thread_run_get, _wrap_rig_state_morse_data_handler_thread_run_set },
    { "morse_data_handler_priv_data", _wrap_rig_state_morse_data_handler_priv_data_get, _wrap_rig_state_morse_data_handler_priv_data_set },
    { "fifo_morse", _wrap_rig_state_fifo_morse_get, _wrap_rig_state_fifo_morse_set },
    { "doppler", _wrap_rig_state_doppler_get, _wrap_rig_state_doppler_set },
    { "multicast_data_addr", _wrap_rig_state_multicast_data_addr_get, _wrap_rig_state_multicast_data_addr_set },
    { "multicast_data_port", _wrap_rig_state_multicast_data_port_get, _wrap_rig_state_multicast_data_port_set },
    { "multicast_cmd_addr", _wrap_rig_state_multicast_cmd_addr_get, _wrap_rig_state_multicast_cmd_addr_set },
    { "multicast_cmd_port", _wrap_rig_state_multicast_cmd_port_get, _wrap_rig_state_multicast_cmd_port_set },
    { "multicast_receiver_run", _wrap_rig_state_multicast_receiver_run_get, _wrap_rig_state_multicast_receiver_run_set },
    { "multicast_receiver_priv_data", _wrap_rig_state_multicast_receiver_priv_data_get, _wrap_rig_state_multicast_receiver_priv_data_set },
    { "comm_status", _wrap_rig_state_comm_status_get, _wrap_rig_state_comm_status_set },
    { "device_id", _wrap_rig_state_device_id_get, _wrap_rig_state_device_id_set },
    { "dual_watch", _wrap_rig_state_dual_watch_get, _wrap_rig_state_dual_watch_set },
    { "post_ptt_delay", _wrap_rig_state_post_ptt_delay_get, _wrap_rig_state_post_ptt_delay_set },
    { "freq_event_elapsed", _wrap_rig_state_freq_event_elapsed_get, _wrap_rig_state_freq_event_elapsed_set },
    { "freq_skip", _wrap_rig_state_freq_skip_get, _wrap_rig_state_freq_skip_set },
    { "client", _wrap_rig_state_client_get, _wrap_rig_state_client_set },
    { "api_mutex", _wrap_rig_state_api_mutex_get, _wrap_rig_state_api_mutex_set },
    {0,0,0}
};
static swig_lua_method swig_rig_state_methods[]= {
    {0,0}
};
static swig_lua_method swig_rig_state_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_rig_state_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_rig_state_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_rig_state_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_rig_state_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_rig_state_Sf_SwigStatic = {
    "rig_state",
    swig_rig_state_Sf_SwigStatic_methods,
    swig_rig_state_Sf_SwigStatic_attributes,
    swig_rig_state_Sf_SwigStatic_constants,
    swig_rig_state_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_rig_state_bases[] = {0};
static const char *swig_rig_state_base_names[] = {0};
static swig_lua_class _wrap_class_rig_state = { "rig_state", "rig_state", &SWIGTYPE_p_rig_state,_proxy__wrap_new_rig_state, swig_delete_rig_state, swig_rig_state_methods, swig_rig_state_attributes, &swig_rig_state_Sf_SwigStatic, swig_rig_state_meta, swig_rig_state_bases, swig_rig_state_base_names };

static int _wrap_Rig_rig_set(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  RIG *arg2 = 0 ;
  
  SWIG_check_num_args("Rig::rig",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::rig",1,"struct Rig *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Rig::rig",2,"RIG *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_rig_set",1,SWIGTYPE_p_Rig);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_s_rig,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("Rig_rig_set",2,SWIGTYPE_p_s_rig);
  }
  
  if (arg1) (arg1)->rig = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_rig_get(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  RIG *result = 0 ;
  
  SWIG_check_num_args("Rig::rig",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::rig",1,"struct Rig *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_rig_get",1,SWIGTYPE_p_Rig);
  }
  
  result = (RIG *) ((arg1)->rig);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_s_rig,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_caps_set(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  struct rig_caps *arg2 = 0 ;
  
  SWIG_check_num_args("Rig::caps",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::caps",1,"struct Rig *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Rig::caps",2,"struct rig_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_caps_set",1,SWIGTYPE_p_Rig);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_rig_caps,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("Rig_caps_set",2,SWIGTYPE_p_rig_caps);
  }
  
  if (arg1) (arg1)->caps = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_caps_get(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  struct rig_caps *result = 0 ;
  
  SWIG_check_num_args("Rig::caps",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::caps",1,"struct Rig *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_caps_get",1,SWIGTYPE_p_Rig);
  }
  
  result = (struct rig_caps *) ((arg1)->caps);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_rig_caps,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_state_set(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  struct rig_state *arg2 = 0 ;
  
  SWIG_check_num_args("Rig::state",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::state",1,"struct Rig *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Rig::state",2,"struct rig_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_state_set",1,SWIGTYPE_p_Rig);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_rig_state,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("Rig_state_set",2,SWIGTYPE_p_rig_state);
  }
  
  if (arg1) (arg1)->state = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_state_get(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  struct rig_state *result = 0 ;
  
  SWIG_check_num_args("Rig::state",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::state",1,"struct Rig *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_state_get",1,SWIGTYPE_p_Rig);
  }
  
  result = (struct rig_state *) ((arg1)->state);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_rig_state,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_error_status_set(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("Rig::error_status",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::error_status",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::error_status",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_error_status_set",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->error_status = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_error_status_get(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("Rig::error_status",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::error_status",1,"struct Rig *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_error_status_get",1,SWIGTYPE_p_Rig);
  }
  
  result = (int) ((arg1)->error_status);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_do_exception_set(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("Rig::do_exception",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::do_exception",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::do_exception",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_do_exception_set",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->do_exception = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_do_exception_get(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("Rig::do_exception",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::do_exception",1,"struct Rig *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_do_exception_get",1,SWIGTYPE_p_Rig);
  }
  
  result = (int) ((arg1)->do_exception);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_Rig(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  struct Rig *result = 0 ;
  
  SWIG_check_num_args("Rig::Rig",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Rig::Rig",1,"int");
  arg1 = (int)lua_tonumber(L, 1);
  result = (struct Rig *)new_Rig(arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Rig,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_open(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  
  SWIG_check_num_args("Rig::open",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::open",1,"struct Rig *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_open",1,SWIGTYPE_p_Rig);
  }
  
  {
    arg1->error_status = RIG_OK;
    Rig_open(arg1);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_close(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  
  SWIG_check_num_args("Rig::close",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::close",1,"struct Rig *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_close",1,SWIGTYPE_p_Rig);
  }
  
  {
    arg1->error_status = RIG_OK;
    Rig_close(arg1);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_freq(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 ;
  freq_t arg3 ;
  
  SWIG_check_num_args("Rig::set_freq",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_freq",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_freq",2,"vfo_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_freq",3,"freq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_freq",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  arg3 = (freq_t)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_set_freq(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_mode(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  rmode_t arg2 ;
  pbwidth_t arg3 = ((shortfreq_t) (0)) ;
  vfo_t arg4 = (1u << (29)) ;
  
  SWIG_check_num_args("Rig::set_mode",2,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_mode",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_mode",2,"rmode_t");
  if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_mode",3,"pbwidth_t");
  if(lua_gettop(L)>=4 && !lua_isnumber(L,4)) SWIG_fail_arg("Rig::set_mode",4,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_mode",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (rmode_t)lua_tonumber(L, 2);
  if(lua_gettop(L)>=3){
    arg3 = (pbwidth_t)lua_tonumber(L, 3);
  }
  if(lua_gettop(L)>=4){
    SWIG_contract_assert((lua_tonumber(L,4)>=0),"number must not be negative");
    arg4 = (vfo_t)lua_tonumber(L, 4);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_set_mode(arg1,arg2,arg3,arg4);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_ptt(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 ;
  ptt_t arg3 ;
  
  SWIG_check_num_args("Rig::set_ptt",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_ptt",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_ptt",2,"vfo_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_ptt",3,"ptt_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_ptt",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  arg3 = (ptt_t)(int)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_set_ptt(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_rptr_shift(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 ;
  rptr_shift_t arg3 ;
  
  SWIG_check_num_args("Rig::set_rptr_shift",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_rptr_shift",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_rptr_shift",2,"vfo_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_rptr_shift",3,"rptr_shift_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_rptr_shift",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  arg3 = (rptr_shift_t)(int)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_set_rptr_shift(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_rptr_offs(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 ;
  shortfreq_t arg3 ;
  
  SWIG_check_num_args("Rig::set_rptr_offs",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_rptr_offs",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_rptr_offs",2,"vfo_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_rptr_offs",3,"shortfreq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_rptr_offs",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  arg3 = (shortfreq_t)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_set_rptr_offs(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_ctcss_tone(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 ;
  tone_t arg3 ;
  
  SWIG_check_num_args("Rig::set_ctcss_tone",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_ctcss_tone",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_ctcss_tone",2,"vfo_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_ctcss_tone",3,"tone_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_ctcss_tone",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative");
  arg3 = (tone_t)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_set_ctcss_tone(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_dcs_code(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 ;
  tone_t arg3 ;
  
  SWIG_check_num_args("Rig::set_dcs_code",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_dcs_code",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_dcs_code",2,"vfo_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_dcs_code",3,"tone_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_dcs_code",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative");
  arg3 = (tone_t)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_set_dcs_code(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_ctcss_sql(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 ;
  tone_t arg3 ;
  
  SWIG_check_num_args("Rig::set_ctcss_sql",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_ctcss_sql",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_ctcss_sql",2,"vfo_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_ctcss_sql",3,"tone_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_ctcss_sql",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative");
  arg3 = (tone_t)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_set_ctcss_sql(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_dcs_sql(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 ;
  tone_t arg3 ;
  
  SWIG_check_num_args("Rig::set_dcs_sql",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_dcs_sql",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_dcs_sql",2,"vfo_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_dcs_sql",3,"tone_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_dcs_sql",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative");
  arg3 = (tone_t)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_set_dcs_sql(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_split_freq(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 ;
  freq_t arg3 ;
  
  SWIG_check_num_args("Rig::set_split_freq",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_split_freq",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_split_freq",2,"vfo_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_split_freq",3,"freq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_split_freq",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  arg3 = (freq_t)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_set_split_freq(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_split_mode(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  rmode_t arg2 ;
  pbwidth_t arg3 = ((shortfreq_t) (0)) ;
  vfo_t arg4 = (1u << (29)) ;
  
  SWIG_check_num_args("Rig::set_split_mode",2,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_split_mode",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_split_mode",2,"rmode_t");
  if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_split_mode",3,"pbwidth_t");
  if(lua_gettop(L)>=4 && !lua_isnumber(L,4)) SWIG_fail_arg("Rig::set_split_mode",4,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_split_mode",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (rmode_t)lua_tonumber(L, 2);
  if(lua_gettop(L)>=3){
    arg3 = (pbwidth_t)lua_tonumber(L, 3);
  }
  if(lua_gettop(L)>=4){
    SWIG_contract_assert((lua_tonumber(L,4)>=0),"number must not be negative");
    arg4 = (vfo_t)lua_tonumber(L, 4);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_set_split_mode(arg1,arg2,arg3,arg4);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_split_freq_mode(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  freq_t arg2 ;
  rmode_t arg3 ;
  pbwidth_t arg4 = ((shortfreq_t) (0)) ;
  vfo_t arg5 = (1u << (29)) ;
  
  SWIG_check_num_args("Rig::set_split_freq_mode",3,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_split_freq_mode",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_split_freq_mode",2,"freq_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_split_freq_mode",3,"rmode_t");
  if(lua_gettop(L)>=4 && !lua_isnumber(L,4)) SWIG_fail_arg("Rig::set_split_freq_mode",4,"pbwidth_t");
  if(lua_gettop(L)>=5 && !lua_isnumber(L,5)) SWIG_fail_arg("Rig::set_split_freq_mode",5,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_split_freq_mode",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (freq_t)lua_tonumber(L, 2);
  SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative");
  arg3 = (rmode_t)lua_tonumber(L, 3);
  if(lua_gettop(L)>=4){
    arg4 = (pbwidth_t)lua_tonumber(L, 4);
  }
  if(lua_gettop(L)>=5){
    SWIG_contract_assert((lua_tonumber(L,5)>=0),"number must not be negative");
    arg5 = (vfo_t)lua_tonumber(L, 5);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_set_split_freq_mode(arg1,arg2,arg3,arg4,arg5);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_split_vfo(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  split_t arg2 ;
  vfo_t arg3 ;
  vfo_t arg4 = (1u << (29)) ;
  
  SWIG_check_num_args("Rig::set_split_vfo",3,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_split_vfo",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_split_vfo",2,"split_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_split_vfo",3,"vfo_t");
  if(lua_gettop(L)>=4 && !lua_isnumber(L,4)) SWIG_fail_arg("Rig::set_split_vfo",4,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_split_vfo",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (split_t)(int)lua_tonumber(L, 2);
  SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative");
  arg3 = (vfo_t)lua_tonumber(L, 3);
  if(lua_gettop(L)>=4){
    SWIG_contract_assert((lua_tonumber(L,4)>=0),"number must not be negative");
    arg4 = (vfo_t)lua_tonumber(L, 4);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_set_split_vfo(arg1,arg2,arg3,arg4);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_rit(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 ;
  shortfreq_t arg3 ;
  
  SWIG_check_num_args("Rig::set_rit",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_rit",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_rit",2,"vfo_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_rit",3,"shortfreq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_rit",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  arg3 = (shortfreq_t)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_set_rit(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_xit(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 ;
  shortfreq_t arg3 ;
  
  SWIG_check_num_args("Rig::set_xit",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_xit",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_xit",2,"vfo_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_xit",3,"shortfreq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_xit",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  arg3 = (shortfreq_t)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_set_xit(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_ts(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 ;
  shortfreq_t arg3 ;
  
  SWIG_check_num_args("Rig::set_ts",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_ts",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_ts",2,"vfo_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_ts",3,"shortfreq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_ts",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  arg3 = (shortfreq_t)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_set_ts(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_ant(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  ant_t arg2 ;
  value_t arg3 ;
  vfo_t arg4 = (1u << (29)) ;
  value_t *argp3 ;
  
  SWIG_check_num_args("Rig::set_ant",3,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_ant",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_ant",2,"ant_t");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Rig::set_ant",3,"value_t");
  if(lua_gettop(L)>=4 && !lua_isnumber(L,4)) SWIG_fail_arg("Rig::set_ant",4,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_ant",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (ant_t)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("Rig_set_ant",3,SWIGTYPE_p_value_t);
  }
  arg3 = *argp3;
  
  if(lua_gettop(L)>=4){
    SWIG_contract_assert((lua_tonumber(L,4)>=0),"number must not be negative");
    arg4 = (vfo_t)lua_tonumber(L, 4);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_set_ant(arg1,arg2,arg3,arg4);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_func(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  setting_t arg2 ;
  int arg3 ;
  vfo_t arg4 = (1u << (29)) ;
  
  SWIG_check_num_args("Rig::set_func",3,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_func",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_func",2,"setting_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_func",3,"int");
  if(lua_gettop(L)>=4 && !lua_isnumber(L,4)) SWIG_fail_arg("Rig::set_func",4,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_func",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  if(lua_gettop(L)>=4){
    SWIG_contract_assert((lua_tonumber(L,4)>=0),"number must not be negative");
    arg4 = (vfo_t)lua_tonumber(L, 4);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_set_func(arg1,arg2,arg3,arg4);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_ext_func(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  hamlib_token_t arg2 ;
  int arg3 ;
  vfo_t arg4 = (1u << (29)) ;
  
  SWIG_check_num_args("Rig::set_ext_func",3,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_ext_func",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_ext_func",2,"hamlib_token_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_ext_func",3,"int");
  if(lua_gettop(L)>=4 && !lua_isnumber(L,4)) SWIG_fail_arg("Rig::set_ext_func",4,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_ext_func",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (hamlib_token_t)lua_tonumber(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  if(lua_gettop(L)>=4){
    SWIG_contract_assert((lua_tonumber(L,4)>=0),"number must not be negative");
    arg4 = (vfo_t)lua_tonumber(L, 4);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_set_ext_func(arg1,arg2,arg3,arg4);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_bank(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 ;
  int arg3 ;
  
  SWIG_check_num_args("Rig::set_bank",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_bank",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_bank",2,"vfo_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_bank",3,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_bank",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_set_bank(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_mem(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 ;
  int arg3 ;
  
  SWIG_check_num_args("Rig::set_mem",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_mem",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_mem",2,"vfo_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_mem",3,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_mem",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_set_mem(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_send_dtmf(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 ;
  const_char_string arg3 = 0 ;
  
  SWIG_check_num_args("Rig::send_dtmf",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::send_dtmf",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::send_dtmf",2,"vfo_t");
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("Rig::send_dtmf",3,"const_char_string");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_send_dtmf",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  arg3 = (const_char_string)lua_tostring(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_send_dtmf(arg1,arg2,(char const *)arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_send_morse(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 ;
  const_char_string arg3 = 0 ;
  
  SWIG_check_num_args("Rig::send_morse",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::send_morse",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::send_morse",2,"vfo_t");
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("Rig::send_morse",3,"const_char_string");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_send_morse",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  arg3 = (const_char_string)lua_tostring(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_send_morse(arg1,arg2,(char const *)arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_vfo_op(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 ;
  vfo_op_t arg3 ;
  
  SWIG_check_num_args("Rig::vfo_op",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::vfo_op",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::vfo_op",2,"vfo_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::vfo_op",3,"vfo_op_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_vfo_op",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  arg3 = (vfo_op_t)(int)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_vfo_op(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_scan(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  scan_t arg2 ;
  int arg3 ;
  vfo_t arg4 = (1u << (29)) ;
  
  SWIG_check_num_args("Rig::scan",3,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::scan",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::scan",2,"scan_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::scan",3,"int");
  if(lua_gettop(L)>=4 && !lua_isnumber(L,4)) SWIG_fail_arg("Rig::scan",4,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_scan",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (scan_t)(int)lua_tonumber(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  if(lua_gettop(L)>=4){
    SWIG_contract_assert((lua_tonumber(L,4)>=0),"number must not be negative");
    arg4 = (vfo_t)lua_tonumber(L, 4);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_scan(arg1,arg2,arg3,arg4);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_level__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  setting_t arg2 ;
  float arg3 ;
  vfo_t arg4 = (1u << (29)) ;
  
  SWIG_check_num_args("Rig::set_level",3,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_level",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_level",2,"setting_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_level",3,"float");
  if(lua_gettop(L)>=4 && !lua_isnumber(L,4)) SWIG_fail_arg("Rig::set_level",4,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_level",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  if(lua_gettop(L)>=4){
    SWIG_contract_assert((lua_tonumber(L,4)>=0),"number must not be negative");
    arg4 = (vfo_t)lua_tonumber(L, 4);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_set_level__SWIG_0(arg1,arg2,arg3,arg4);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_level__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  char *arg2 = 0 ;
  float arg3 ;
  vfo_t arg4 = (1u << (29)) ;
  
  SWIG_check_num_args("Rig::set_level",3,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_level",1,"struct Rig *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Rig::set_level",2,"char const *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_level",3,"float");
  if(lua_gettop(L)>=4 && !lua_isnumber(L,4)) SWIG_fail_arg("Rig::set_level",4,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_level",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  if(lua_gettop(L)>=4){
    SWIG_contract_assert((lua_tonumber(L,4)>=0),"number must not be negative");
    arg4 = (vfo_t)lua_tonumber(L, 4);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_set_level__SWIG_1(arg1,(char const *)arg2,arg3,arg4);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_level__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = 0 ;
  vfo_t arg4 = (1u << (29)) ;
  
  SWIG_check_num_args("Rig::set_level",3,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_level",1,"struct Rig *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Rig::set_level",2,"char const *");
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("Rig::set_level",3,"char const *");
  if(lua_gettop(L)>=4 && !lua_isnumber(L,4)) SWIG_fail_arg("Rig::set_level",4,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_level",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  arg3 = (char *)lua_tostring(L, 3);
  if(lua_gettop(L)>=4){
    SWIG_contract_assert((lua_tonumber(L,4)>=0),"number must not be negative");
    arg4 = (vfo_t)lua_tonumber(L, 4);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_set_level__SWIG_2(arg1,(char const *)arg2,(char const *)arg3,arg4);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_level(lua_State* L) {
  int argc;
  int argv[5]={
    1,2,3,4,5
  };
  
  argc = lua_gettop(L);
  if ((argc >= 3) && (argc <= 4)) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          if (argc <= 3) {
            return _wrap_Rig_set_level__SWIG_0(L);
          }
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_Rig_set_level__SWIG_0(L);
          }
        }
      }
    }
  }
  if ((argc >= 3) && (argc <= 4)) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          if (argc <= 3) {
            return _wrap_Rig_set_level__SWIG_1(L);
          }
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_Rig_set_level__SWIG_1(L);
          }
        }
      }
    }
  }
  if ((argc >= 3) && (argc <= 4)) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        {
          _v = SWIG_lua_isnilstring(L,argv[2]);
        }
        if (_v) {
          if (argc <= 3) {
            return _wrap_Rig_set_level__SWIG_2(L);
          }
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_Rig_set_level__SWIG_2(L);
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Rig_set_level'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Rig::set_level(setting_t,float,vfo_t)\n"
    "    Rig::set_level(char const *,float,vfo_t)\n"
    "    Rig::set_level(char const *,char const *,vfo_t)\n");
  lua_error(L);return 0;
}


static int _wrap_Rig_set_ext_level(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  hamlib_token_t arg2 ;
  value_t arg3 ;
  vfo_t arg4 = (1u << (29)) ;
  value_t *argp3 ;
  
  SWIG_check_num_args("Rig::set_ext_level",3,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_ext_level",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_ext_level",2,"hamlib_token_t");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Rig::set_ext_level",3,"value_t");
  if(lua_gettop(L)>=4 && !lua_isnumber(L,4)) SWIG_fail_arg("Rig::set_ext_level",4,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_ext_level",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (hamlib_token_t)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("Rig_set_ext_level",3,SWIGTYPE_p_value_t);
  }
  arg3 = *argp3;
  
  if(lua_gettop(L)>=4){
    SWIG_contract_assert((lua_tonumber(L,4)>=0),"number must not be negative");
    arg4 = (vfo_t)lua_tonumber(L, 4);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_set_ext_level(arg1,arg2,arg3,arg4);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_level_i__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  setting_t arg2 ;
  vfo_t arg3 = (1u << (29)) ;
  int result;
  
  SWIG_check_num_args("Rig::get_level_i",2,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_level_i",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_level_i",2,"setting_t");
  if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("Rig::get_level_i",3,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_level_i",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if(lua_gettop(L)>=3){
    SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative");
    arg3 = (vfo_t)lua_tonumber(L, 3);
  }
  {
    arg1->error_status = RIG_OK;
    result = (int)Rig_get_level_i__SWIG_0(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_level_f__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  setting_t arg2 ;
  vfo_t arg3 = (1u << (29)) ;
  float result;
  
  SWIG_check_num_args("Rig::get_level_f",2,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_level_f",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_level_f",2,"setting_t");
  if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("Rig::get_level_f",3,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_level_f",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if(lua_gettop(L)>=3){
    SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative");
    arg3 = (vfo_t)lua_tonumber(L, 3);
  }
  {
    arg1->error_status = RIG_OK;
    result = (float)Rig_get_level_f__SWIG_0(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_level_i__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  char *arg2 = 0 ;
  vfo_t arg3 = (1u << (29)) ;
  int result;
  
  SWIG_check_num_args("Rig::get_level_i",2,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_level_i",1,"struct Rig *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Rig::get_level_i",2,"char const *");
  if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("Rig::get_level_i",3,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_level_i",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  if(lua_gettop(L)>=3){
    SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative");
    arg3 = (vfo_t)lua_tonumber(L, 3);
  }
  {
    arg1->error_status = RIG_OK;
    result = (int)Rig_get_level_i__SWIG_1(arg1,(char const *)arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_level_i(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if ((argc >= 2) && (argc <= 3)) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        if (argc <= 2) {
          return _wrap_Rig_get_level_i__SWIG_0(L);
        }
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Rig_get_level_i__SWIG_0(L);
        }
      }
    }
  }
  if ((argc >= 2) && (argc <= 3)) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        if (argc <= 2) {
          return _wrap_Rig_get_level_i__SWIG_1(L);
        }
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Rig_get_level_i__SWIG_1(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Rig_get_level_i'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Rig::get_level_i(setting_t,vfo_t)\n"
    "    Rig::get_level_i(char const *,vfo_t)\n");
  lua_error(L);return 0;
}


static int _wrap_Rig_get_level_f__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  char *arg2 = 0 ;
  vfo_t arg3 = (1u << (29)) ;
  float result;
  
  SWIG_check_num_args("Rig::get_level_f",2,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_level_f",1,"struct Rig *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Rig::get_level_f",2,"char const *");
  if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("Rig::get_level_f",3,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_level_f",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  if(lua_gettop(L)>=3){
    SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative");
    arg3 = (vfo_t)lua_tonumber(L, 3);
  }
  {
    arg1->error_status = RIG_OK;
    result = (float)Rig_get_level_f__SWIG_1(arg1,(char const *)arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_level_f(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if ((argc >= 2) && (argc <= 3)) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        if (argc <= 2) {
          return _wrap_Rig_get_level_f__SWIG_0(L);
        }
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Rig_get_level_f__SWIG_0(L);
        }
      }
    }
  }
  if ((argc >= 2) && (argc <= 3)) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        if (argc <= 2) {
          return _wrap_Rig_get_level_f__SWIG_1(L);
        }
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Rig_get_level_f__SWIG_1(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Rig_get_level_f'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Rig::get_level_f(setting_t,vfo_t)\n"
    "    Rig::get_level_f(char const *,vfo_t)\n");
  lua_error(L);return 0;
}


static int _wrap_Rig_get_level__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = 0 ;
  vfo_t arg4 = (1u << (29)) ;
  char *returnstr3 ;
  
  {
    char returnstr3[1024];
    arg3 = returnstr3;
  }
  SWIG_check_num_args("Rig::get_level",2,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_level",1,"struct Rig *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Rig::get_level",2,"char const *");
  if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("Rig::get_level",3,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_level",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  if(lua_gettop(L)>=3){
    SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative");
    arg4 = (vfo_t)lua_tonumber(L, 3);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_get_level__SWIG_0(arg1,(char const *)arg2,arg3,arg4);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  {
    lua_pushstring(L,(char *)arg3); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_vfo(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 ;
  
  SWIG_check_num_args("Rig::set_vfo",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_vfo",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_vfo",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_vfo",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (vfo_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_set_vfo(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_powerstat(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  powerstat_t arg2 ;
  
  SWIG_check_num_args("Rig::set_powerstat",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_powerstat",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_powerstat",2,"powerstat_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_powerstat",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (powerstat_t)(int)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_set_powerstat(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_has_get_level(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("Rig::has_get_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::has_get_level",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::has_get_level",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_has_get_level",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_has_get_level(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_has_get_parm(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("Rig::has_get_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::has_get_parm",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::has_get_parm",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_has_get_parm",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_has_get_parm(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_has_set_parm(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("Rig::has_set_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::has_set_parm",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::has_set_parm",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_has_set_parm",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_has_set_parm(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_has_get_func(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("Rig::has_get_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::has_get_func",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::has_get_func",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_has_get_func",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_has_get_func(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_has_set_func(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("Rig::has_set_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::has_set_func",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::has_set_func",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_has_set_func",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_has_set_func(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_reset(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  reset_t arg2 ;
  
  SWIG_check_num_args("Rig::reset",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::reset",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::reset",2,"reset_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_reset",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (reset_t)(int)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_reset(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_has_scan(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  scan_t arg2 ;
  
  SWIG_check_num_args("Rig::has_scan",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::has_scan",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::has_scan",2,"scan_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_has_scan",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (scan_t)(int)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_has_scan(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_has_vfo_op(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_op_t arg2 ;
  
  SWIG_check_num_args("Rig::has_vfo_op",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::has_vfo_op",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::has_vfo_op",2,"vfo_op_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_has_vfo_op",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (vfo_op_t)(int)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_has_vfo_op(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_passband_normal(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  rmode_t arg2 ;
  
  SWIG_check_num_args("Rig::passband_normal",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::passband_normal",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::passband_normal",2,"rmode_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_passband_normal",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (rmode_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_passband_normal(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_passband_narrow(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  rmode_t arg2 ;
  
  SWIG_check_num_args("Rig::passband_narrow",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::passband_narrow",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::passband_narrow",2,"rmode_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_passband_narrow",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (rmode_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_passband_narrow(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_passband_wide(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  rmode_t arg2 ;
  
  SWIG_check_num_args("Rig::passband_wide",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::passband_wide",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::passband_wide",2,"rmode_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_passband_wide",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (rmode_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_passband_wide(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_vfo_opt(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("Rig::set_vfo_opt",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_vfo_opt",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_vfo_opt",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_vfo_opt",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_set_vfo_opt(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_ext_token_lookup(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  const_char_string arg2 = 0 ;
  
  SWIG_check_num_args("Rig::ext_token_lookup",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::ext_token_lookup",1,"struct Rig *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Rig::ext_token_lookup",2,"const_char_string");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_ext_token_lookup",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (const_char_string)lua_tostring(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_ext_token_lookup(arg1,(char const *)arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_token_lookup(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  const_char_string arg2 = 0 ;
  
  SWIG_check_num_args("Rig::token_lookup",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::token_lookup",1,"struct Rig *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Rig::token_lookup",2,"const_char_string");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_token_lookup",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (const_char_string)lua_tostring(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_token_lookup(arg1,(char const *)arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_conf__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  hamlib_token_t arg2 ;
  const_char_string arg3 = 0 ;
  
  SWIG_check_num_args("Rig::set_conf",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_conf",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_conf",2,"hamlib_token_t");
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("Rig::set_conf",3,"const_char_string");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_conf",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (hamlib_token_t)lua_tonumber(L, 2);
  arg3 = (const_char_string)lua_tostring(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_set_conf__SWIG_0(arg1,arg2,(char const *)arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_ext_parm(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  hamlib_token_t arg2 ;
  value_t arg3 ;
  value_t *argp3 ;
  
  SWIG_check_num_args("Rig::set_ext_parm",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_ext_parm",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_ext_parm",2,"hamlib_token_t");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Rig::set_ext_parm",3,"value_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_ext_parm",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (hamlib_token_t)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("Rig_set_ext_parm",3,SWIGTYPE_p_value_t);
  }
  arg3 = *argp3;
  
  {
    arg1->error_status = RIG_OK;
    Rig_set_ext_parm(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_parm__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  setting_t arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("Rig::set_parm",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_parm",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::set_parm",2,"setting_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_parm",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_parm",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_set_parm__SWIG_0(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_parm__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  char *arg2 = 0 ;
  float arg3 ;
  
  SWIG_check_num_args("Rig::set_parm",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_parm",1,"struct Rig *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Rig::set_parm",2,"char const *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::set_parm",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_parm",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_set_parm__SWIG_1(arg1,(char const *)arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_parm__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = 0 ;
  
  SWIG_check_num_args("Rig::set_parm",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_parm",1,"struct Rig *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Rig::set_parm",2,"char const *");
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("Rig::set_parm",3,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_parm",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  arg3 = (char *)lua_tostring(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_set_parm__SWIG_2(arg1,(char const *)arg2,(char const *)arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_parm(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Rig_set_parm__SWIG_0(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Rig_set_parm__SWIG_1(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        {
          _v = SWIG_lua_isnilstring(L,argv[2]);
        }
        if (_v) {
          return _wrap_Rig_set_parm__SWIG_2(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Rig_set_parm'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Rig::set_parm(setting_t,float)\n"
    "    Rig::set_parm(char const *,float)\n"
    "    Rig::set_parm(char const *,char const *)\n");
  lua_error(L);return 0;
}


static int _wrap_Rig_get_parm_i__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  setting_t arg2 ;
  int result;
  
  SWIG_check_num_args("Rig::get_parm_i",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_parm_i",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_parm_i",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_parm_i",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    result = (int)Rig_get_parm_i__SWIG_0(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_parm_f__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  setting_t arg2 ;
  float result;
  
  SWIG_check_num_args("Rig::get_parm_f",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_parm_f",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_parm_f",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_parm_f",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    result = (float)Rig_get_parm_f__SWIG_0(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_parm_i__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  char *arg2 = 0 ;
  int result;
  
  SWIG_check_num_args("Rig::get_parm_i",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_parm_i",1,"struct Rig *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Rig::get_parm_i",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_parm_i",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    arg1->error_status = RIG_OK;
    result = (int)Rig_get_parm_i__SWIG_1(arg1,(char const *)arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_parm_i(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_Rig_get_parm_i__SWIG_0(L);
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        return _wrap_Rig_get_parm_i__SWIG_1(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Rig_get_parm_i'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Rig::get_parm_i(setting_t)\n"
    "    Rig::get_parm_i(char const *)\n");
  lua_error(L);return 0;
}


static int _wrap_Rig_get_parm_f__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  char *arg2 = 0 ;
  float result;
  
  SWIG_check_num_args("Rig::get_parm_f",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_parm_f",1,"struct Rig *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Rig::get_parm_f",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_parm_f",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    arg1->error_status = RIG_OK;
    result = (float)Rig_get_parm_f__SWIG_1(arg1,(char const *)arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_parm_f(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_Rig_get_parm_f__SWIG_0(L);
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        return _wrap_Rig_get_parm_f__SWIG_1(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Rig_get_parm_f'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Rig::get_parm_f(setting_t)\n"
    "    Rig::get_parm_f(char const *)\n");
  lua_error(L);return 0;
}


static int _wrap_Rig_get_parm__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = 0 ;
  char *returnstr3 ;
  
  {
    char returnstr3[1024];
    arg3 = returnstr3;
  }
  SWIG_check_num_args("Rig::get_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_parm",1,"struct Rig *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Rig::get_parm",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_parm",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_get_parm__SWIG_0(arg1,(char const *)arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  {
    lua_pushstring(L,(char *)arg3); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_conf__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = 0 ;
  
  SWIG_check_num_args("Rig::set_conf",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_conf",1,"struct Rig *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Rig::set_conf",2,"char const *");
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("Rig::set_conf",3,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_conf",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  arg3 = (char *)lua_tostring(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_set_conf__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_conf(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = SWIG_lua_isnilstring(L,argv[2]);
        }
        if (_v) {
          return _wrap_Rig_set_conf__SWIG_0(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        {
          _v = SWIG_lua_isnilstring(L,argv[2]);
        }
        if (_v) {
          return _wrap_Rig_set_conf__SWIG_1(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Rig_set_conf'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Rig::set_conf(hamlib_token_t,const_char_string)\n"
    "    Rig::set_conf(char const *,char const *)\n");
  lua_error(L);return 0;
}


static int _wrap_Rig_get_freq(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 = (1u << (29)) ;
  freq_t result;
  
  SWIG_check_num_args("Rig::get_freq",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_freq",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_freq",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_freq",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
    arg2 = (vfo_t)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    result = (freq_t)Rig_get_freq(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_mode(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  rmode_t *arg2 = 0 ;
  pbwidth_t *arg3 = 0 ;
  vfo_t arg4 = (1u << (29)) ;
  rmode_t temp2 ;
  pbwidth_t temp3 ;
  
  arg2 = &temp2; 
  arg3 = &temp3; 
  SWIG_check_num_args("Rig::get_mode",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_mode",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_mode",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_mode",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
    arg4 = (vfo_t)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_get_mode(arg1,arg2,arg3,arg4);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_split_mode(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  rmode_t *arg2 = 0 ;
  pbwidth_t *arg3 = 0 ;
  vfo_t arg4 = (1u << (29)) ;
  rmode_t temp2 ;
  pbwidth_t temp3 ;
  
  arg2 = &temp2; 
  arg3 = &temp3; 
  SWIG_check_num_args("Rig::get_split_mode",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_split_mode",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_split_mode",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_split_mode",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
    arg4 = (vfo_t)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_get_split_mode(arg1,arg2,arg3,arg4);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_vfo(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t result;
  
  SWIG_check_num_args("Rig::get_vfo",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_vfo",1,"struct Rig *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_vfo",1,SWIGTYPE_p_Rig);
  }
  
  {
    arg1->error_status = RIG_OK;
    result = (vfo_t)Rig_get_vfo(arg1);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_ptt(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 = (1u << (29)) ;
  ptt_t result;
  
  SWIG_check_num_args("Rig::get_ptt",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_ptt",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_ptt",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_ptt",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
    arg2 = (vfo_t)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    result = (ptt_t)Rig_get_ptt(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_rptr_shift(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 = (1u << (29)) ;
  rptr_shift_t result;
  
  SWIG_check_num_args("Rig::get_rptr_shift",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_rptr_shift",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_rptr_shift",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_rptr_shift",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
    arg2 = (vfo_t)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    result = (rptr_shift_t)Rig_get_rptr_shift(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_rptr_offs(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 = (1u << (29)) ;
  shortfreq_t result;
  
  SWIG_check_num_args("Rig::get_rptr_offs",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_rptr_offs",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_rptr_offs",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_rptr_offs",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
    arg2 = (vfo_t)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    result = (shortfreq_t)Rig_get_rptr_offs(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_ctcss_tone(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 = (1u << (29)) ;
  tone_t result;
  
  SWIG_check_num_args("Rig::get_ctcss_tone",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_ctcss_tone",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_ctcss_tone",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_ctcss_tone",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
    arg2 = (vfo_t)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    result = (tone_t)Rig_get_ctcss_tone(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_dcs_code(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 = (1u << (29)) ;
  tone_t result;
  
  SWIG_check_num_args("Rig::get_dcs_code",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_dcs_code",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_dcs_code",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_dcs_code",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
    arg2 = (vfo_t)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    result = (tone_t)Rig_get_dcs_code(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_ctcss_sql(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 = (1u << (29)) ;
  tone_t result;
  
  SWIG_check_num_args("Rig::get_ctcss_sql",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_ctcss_sql",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_ctcss_sql",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_ctcss_sql",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
    arg2 = (vfo_t)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    result = (tone_t)Rig_get_ctcss_sql(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_dcs_sql(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 = (1u << (29)) ;
  tone_t result;
  
  SWIG_check_num_args("Rig::get_dcs_sql",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_dcs_sql",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_dcs_sql",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_dcs_sql",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
    arg2 = (vfo_t)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    result = (tone_t)Rig_get_dcs_sql(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_split_freq(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 = (1u << (29)) ;
  freq_t result;
  
  SWIG_check_num_args("Rig::get_split_freq",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_split_freq",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_split_freq",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_split_freq",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
    arg2 = (vfo_t)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    result = (freq_t)Rig_get_split_freq(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_split_vfo(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  split_t *arg2 = 0 ;
  vfo_t *arg3 = 0 ;
  vfo_t arg4 = (1u << (29)) ;
  split_t temp2 ;
  vfo_t temp3 ;
  
  arg2 = &temp2; 
  arg3 = &temp3; 
  SWIG_check_num_args("Rig::get_split_vfo",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_split_vfo",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_split_vfo",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_split_vfo",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
    arg4 = (vfo_t)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_get_split_vfo(arg1,arg2,arg3,arg4);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_rit(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 = (1u << (29)) ;
  shortfreq_t result;
  
  SWIG_check_num_args("Rig::get_rit",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_rit",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_rit",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_rit",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
    arg2 = (vfo_t)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    result = (shortfreq_t)Rig_get_rit(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_xit(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 = (1u << (29)) ;
  shortfreq_t result;
  
  SWIG_check_num_args("Rig::get_xit",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_xit",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_xit",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_xit",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
    arg2 = (vfo_t)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    result = (shortfreq_t)Rig_get_xit(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_ts(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 = (1u << (29)) ;
  shortfreq_t result;
  
  SWIG_check_num_args("Rig::get_ts",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_ts",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_ts",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_ts",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
    arg2 = (vfo_t)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    result = (shortfreq_t)Rig_get_ts(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_ant(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  ant_t *arg2 = 0 ;
  ant_t *arg3 = 0 ;
  ant_t *arg4 = 0 ;
  int *arg5 = 0 ;
  ant_t arg6 ;
  vfo_t arg7 = (1u << (29)) ;
  ant_t temp2 ;
  ant_t temp3 ;
  ant_t temp4 ;
  int temp5 ;
  
  arg2 = &temp2; 
  arg3 = &temp3; 
  arg4 = &temp4; 
  arg5 = &temp5; 
  SWIG_check_num_args("Rig::get_ant",2,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_ant",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_ant",2,"ant_t");
  if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("Rig::get_ant",3,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_ant",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg6 = (ant_t)lua_tonumber(L, 2);
  if(lua_gettop(L)>=3){
    SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative");
    arg7 = (vfo_t)lua_tonumber(L, 3);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_get_ant(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_vfo_info(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  int *arg2 = 0 ;
  split_t *arg3 = 0 ;
  pbwidth_t *arg4 = 0 ;
  rmode_t *arg5 = 0 ;
  freq_t *arg6 = 0 ;
  vfo_t arg7 = (1u << (29)) ;
  int temp2 ;
  split_t temp3 ;
  pbwidth_t temp4 ;
  rmode_t temp5 ;
  freq_t temp6 ;
  
  arg2 = &temp2; 
  arg3 = &temp3; 
  arg4 = &temp4; 
  arg5 = &temp5; 
  arg6 = &temp6; 
  SWIG_check_num_args("Rig::get_vfo_info",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_vfo_info",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_vfo_info",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_vfo_info",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
    arg7 = (vfo_t)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_get_vfo_info(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_mem(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 = (1u << (29)) ;
  int result;
  
  SWIG_check_num_args("Rig::get_mem",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_mem",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_mem",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_mem",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
    arg2 = (vfo_t)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    result = (int)Rig_get_mem(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_powerstat(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  powerstat_t result;
  
  SWIG_check_num_args("Rig::get_powerstat",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_powerstat",1,"struct Rig *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_powerstat",1,SWIGTYPE_p_Rig);
  }
  
  {
    arg1->error_status = RIG_OK;
    result = (powerstat_t)Rig_get_powerstat(arg1);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_dcd(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  vfo_t arg2 = (1u << (29)) ;
  dcd_t result;
  
  SWIG_check_num_args("Rig::get_dcd",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_dcd",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_dcd",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_dcd",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
    arg2 = (vfo_t)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    result = (dcd_t)Rig_get_dcd(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_mem_count(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("Rig::mem_count",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::mem_count",1,"struct Rig *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_mem_count",1,SWIGTYPE_p_Rig);
  }
  
  {
    arg1->error_status = RIG_OK;
    result = (int)Rig_mem_count(arg1);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_lookup_mem_caps(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  int arg2 = -1 ;
  chan_t *result = 0 ;
  
  SWIG_check_num_args("Rig::lookup_mem_caps",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::lookup_mem_caps",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::lookup_mem_caps",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_lookup_mem_caps",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    arg2 = (int)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    result = (chan_t *)Rig_lookup_mem_caps(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_chan_list,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_set_channel(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  struct channel *arg2 = 0 ;
  
  SWIG_check_num_args("Rig::set_channel",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::set_channel",1,"struct Rig *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Rig::set_channel",2,"struct channel const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_set_channel",1,SWIGTYPE_p_Rig);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("Rig_set_channel",2,SWIGTYPE_p_channel);
  }
  
  {
    arg1->error_status = RIG_OK;
    Rig_set_channel(arg1,(struct channel const *)arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_channel__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  struct channel *arg2 = 0 ;
  int arg3 ;
  
  SWIG_check_num_args("Rig::get_channel",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_channel",1,"struct Rig *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Rig::get_channel",2,"struct channel *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rig::get_channel",3,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_channel",1,SWIGTYPE_p_Rig);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("Rig_get_channel",2,SWIGTYPE_p_channel);
  }
  
  arg3 = (int)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rig_get_channel__SWIG_0(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_chan_all__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  struct channel *arg2 = 0 ;
  
  SWIG_check_num_args("Rig::get_chan_all",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_chan_all",1,"struct Rig *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Rig::get_chan_all",2,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_chan_all",1,SWIGTYPE_p_Rig);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("Rig_get_chan_all",2,SWIGTYPE_p_channel);
  }
  
  {
    arg1->error_status = RIG_OK;
    Rig_get_chan_all__SWIG_0(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_chan_all__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  struct channel *result = 0 ;
  
  SWIG_check_num_args("Rig::get_chan_all",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_chan_all",1,"struct Rig *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_chan_all",1,SWIGTYPE_p_Rig);
  }
  
  {
    arg1->error_status = RIG_OK;
    result = (struct channel *)Rig_get_chan_all(arg1);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_channel,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_chan_all(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 1) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_Rig_get_chan_all__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_channel, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_Rig_get_chan_all__SWIG_0(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Rig_get_chan_all'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Rig::get_chan_all(struct channel *)\n"
    "    Rig::get_chan_all()\n");
  lua_error(L);return 0;
}


static int _wrap_Rig_get_channel__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  int arg2 ;
  int arg3 = INT_MAX ;
  vfo_t arg4 = (1u << (28)) ;
  struct channel *result = 0 ;
  
  SWIG_check_num_args("Rig::get_channel",2,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_channel",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_channel",2,"int");
  if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("Rig::get_channel",3,"int");
  if(lua_gettop(L)>=4 && !lua_isnumber(L,4)) SWIG_fail_arg("Rig::get_channel",4,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_channel",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if(lua_gettop(L)>=3){
    arg3 = (int)lua_tonumber(L, 3);
  }
  if(lua_gettop(L)>=4){
    SWIG_contract_assert((lua_tonumber(L,4)>=0),"number must not be negative");
    arg4 = (vfo_t)lua_tonumber(L, 4);
  }
  {
    arg1->error_status = RIG_OK;
    result = (struct channel *)Rig_get_channel__SWIG_1(arg1,arg2,arg3,arg4);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_channel,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_channel(lua_State* L) {
  int argc;
  int argv[5]={
    1,2,3,4,5
  };
  
  argc = lua_gettop(L);
  if ((argc >= 2) && (argc <= 4)) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        if (argc <= 2) {
          return _wrap_Rig_get_channel__SWIG_1(L);
        }
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          if (argc <= 3) {
            return _wrap_Rig_get_channel__SWIG_1(L);
          }
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_Rig_get_channel__SWIG_1(L);
          }
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_channel, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Rig_get_channel__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Rig_get_channel'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Rig::get_channel(struct channel *,int)\n"
    "    Rig::get_channel(int,int,vfo_t)\n");
  lua_error(L);return 0;
}


static int _wrap_Rig_get_conf__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  hamlib_token_t arg2 ;
  char *arg3 = 0 ;
  char *returnstr3 ;
  
  {
    char returnstr3[1024];
    arg3 = returnstr3;
  }
  SWIG_check_num_args("Rig::get_conf",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_conf",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_conf",2,"hamlib_token_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_conf",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (hamlib_token_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_get_conf__SWIG_0(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  {
    lua_pushstring(L,(char *)arg3); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_conf__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = 0 ;
  char *returnstr3 ;
  
  {
    char returnstr3[1024];
    arg3 = returnstr3;
  }
  SWIG_check_num_args("Rig::get_conf",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_conf",1,"struct Rig *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Rig::get_conf",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_conf",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_get_conf__SWIG_1(arg1,(char const *)arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  {
    lua_pushstring(L,(char *)arg3); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_conf(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_Rig_get_conf__SWIG_0(L);
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        return _wrap_Rig_get_conf__SWIG_1(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Rig_get_conf'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Rig::get_conf(hamlib_token_t,char *)\n"
    "    Rig::get_conf(char const *,char *)\n");
  lua_error(L);return 0;
}


static int _wrap_Rig_recv_dtmf(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  char *arg2 = 0 ;
  vfo_t arg3 = (1u << (29)) ;
  char *returnstr2 ;
  
  {
    char returnstr2[1024];
    arg2 = returnstr2;
  }
  SWIG_check_num_args("Rig::recv_dtmf",1,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::recv_dtmf",1,"struct Rig *");
  if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Rig::recv_dtmf",2,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_recv_dtmf",1,SWIGTYPE_p_Rig);
  }
  
  if(lua_gettop(L)>=2){
    SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
    arg3 = (vfo_t)lua_tonumber(L, 2);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_recv_dtmf(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  {
    lua_pushstring(L,(char *)arg2); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_info(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Rig::get_info",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_info",1,"struct Rig *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_info",1,SWIGTYPE_p_Rig);
  }
  
  {
    arg1->error_status = RIG_OK;
    result = (char *)Rig_get_info(arg1);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_func(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  setting_t arg2 ;
  vfo_t arg3 = (1u << (29)) ;
  int result;
  
  SWIG_check_num_args("Rig::get_func",2,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_func",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_func",2,"setting_t");
  if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("Rig::get_func",3,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_func",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if(lua_gettop(L)>=3){
    SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative");
    arg3 = (vfo_t)lua_tonumber(L, 3);
  }
  {
    arg1->error_status = RIG_OK;
    result = (int)Rig_get_func(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_ext_func(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  hamlib_token_t arg2 ;
  vfo_t arg3 = (1u << (29)) ;
  int result;
  
  SWIG_check_num_args("Rig::get_ext_func",2,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_ext_func",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_ext_func",2,"hamlib_token_t");
  if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("Rig::get_ext_func",3,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_ext_func",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (hamlib_token_t)lua_tonumber(L, 2);
  if(lua_gettop(L)>=3){
    SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative");
    arg3 = (vfo_t)lua_tonumber(L, 3);
  }
  {
    arg1->error_status = RIG_OK;
    result = (int)Rig_get_ext_func(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_level__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  setting_t arg2 ;
  vfo_t arg3 = (1u << (29)) ;
  
  SWIG_check_num_args("Rig::get_level",2,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_level",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_level",2,"setting_t");
  if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("Rig::get_level",3,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_level",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if(lua_gettop(L)>=3){
    SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative");
    arg3 = (vfo_t)lua_tonumber(L, 3);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_get_level__SWIG_1(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_level(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if ((argc >= 2) && (argc <= 3)) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        if (argc <= 2) {
          return _wrap_Rig_get_level__SWIG_1(L);
        }
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Rig_get_level__SWIG_1(L);
        }
      }
    }
  }
  if ((argc >= 2) && (argc <= 3)) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        if (argc <= 2) {
          return _wrap_Rig_get_level__SWIG_0(L);
        }
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Rig_get_level__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Rig_get_level'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Rig::get_level(char const *,char *,vfo_t)\n"
    "    Rig::get_level(setting_t,vfo_t)\n");
  lua_error(L);return 0;
}


static int _wrap_Rig_get_ext_level(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  hamlib_token_t arg2 ;
  vfo_t arg3 = (1u << (29)) ;
  
  SWIG_check_num_args("Rig::get_ext_level",2,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_ext_level",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_ext_level",2,"hamlib_token_t");
  if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("Rig::get_ext_level",3,"vfo_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_ext_level",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (hamlib_token_t)lua_tonumber(L, 2);
  if(lua_gettop(L)>=3){
    SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative");
    arg3 = (vfo_t)lua_tonumber(L, 3);
  }
  {
    arg1->error_status = RIG_OK;
    Rig_get_ext_level(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_parm__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("Rig::get_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_parm",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_parm",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_parm",1,SWIGTYPE_p_Rig);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_get_parm__SWIG_1(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rig_get_parm(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_Rig_get_parm__SWIG_1(L);
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rig, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        return _wrap_Rig_get_parm__SWIG_0(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Rig_get_parm'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Rig::get_parm(char const *,char *)\n"
    "    Rig::get_parm(setting_t)\n");
  lua_error(L);return 0;
}


static int _wrap_Rig_get_ext_parm(lua_State* L) {
  int SWIG_arg = 0;
  struct Rig *arg1 = 0 ;
  hamlib_token_t arg2 ;
  
  SWIG_check_num_args("Rig::get_ext_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rig::get_ext_parm",1,"struct Rig *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rig::get_ext_parm",2,"hamlib_token_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rig,0))){
    SWIG_fail_ptr("Rig_get_ext_parm",1,SWIGTYPE_p_Rig);
  }
  
  arg2 = (hamlib_token_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rig_get_ext_parm(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_Rig(void *obj) {
struct Rig *arg1 = (struct Rig *) obj;
delete_Rig(arg1);
}
static int _proxy__wrap_new_Rig(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_Rig);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_Rig_attributes[] = {
    { "rig", _wrap_Rig_rig_get, _wrap_Rig_rig_set },
    { "caps", _wrap_Rig_caps_get, _wrap_Rig_caps_set },
    { "state", _wrap_Rig_state_get, _wrap_Rig_state_set },
    { "error_status", _wrap_Rig_error_status_get, _wrap_Rig_error_status_set },
    { "do_exception", _wrap_Rig_do_exception_get, _wrap_Rig_do_exception_set },
    {0,0,0}
};
static swig_lua_method swig_Rig_methods[]= {
    { "open", _wrap_Rig_open},
    { "close", _wrap_Rig_close},
    { "set_freq", _wrap_Rig_set_freq},
    { "set_mode", _wrap_Rig_set_mode},
    { "set_ptt", _wrap_Rig_set_ptt},
    { "set_rptr_shift", _wrap_Rig_set_rptr_shift},
    { "set_rptr_offs", _wrap_Rig_set_rptr_offs},
    { "set_ctcss_tone", _wrap_Rig_set_ctcss_tone},
    { "set_dcs_code", _wrap_Rig_set_dcs_code},
    { "set_ctcss_sql", _wrap_Rig_set_ctcss_sql},
    { "set_dcs_sql", _wrap_Rig_set_dcs_sql},
    { "set_split_freq", _wrap_Rig_set_split_freq},
    { "set_split_mode", _wrap_Rig_set_split_mode},
    { "set_split_freq_mode", _wrap_Rig_set_split_freq_mode},
    { "set_split_vfo", _wrap_Rig_set_split_vfo},
    { "set_rit", _wrap_Rig_set_rit},
    { "set_xit", _wrap_Rig_set_xit},
    { "set_ts", _wrap_Rig_set_ts},
    { "set_ant", _wrap_Rig_set_ant},
    { "set_func", _wrap_Rig_set_func},
    { "set_ext_func", _wrap_Rig_set_ext_func},
    { "set_bank", _wrap_Rig_set_bank},
    { "set_mem", _wrap_Rig_set_mem},
    { "send_dtmf", _wrap_Rig_send_dtmf},
    { "send_morse", _wrap_Rig_send_morse},
    { "vfo_op", _wrap_Rig_vfo_op},
    { "scan", _wrap_Rig_scan},
    { "set_level", _wrap_Rig_set_level},
    { "set_ext_level", _wrap_Rig_set_ext_level},
    { "get_level_i", _wrap_Rig_get_level_i},
    { "get_level_f", _wrap_Rig_get_level_f},
    { "set_vfo", _wrap_Rig_set_vfo},
    { "set_powerstat", _wrap_Rig_set_powerstat},
    { "has_get_level", _wrap_Rig_has_get_level},
    { "has_get_parm", _wrap_Rig_has_get_parm},
    { "has_set_parm", _wrap_Rig_has_set_parm},
    { "has_get_func", _wrap_Rig_has_get_func},
    { "has_set_func", _wrap_Rig_has_set_func},
    { "reset", _wrap_Rig_reset},
    { "has_scan", _wrap_Rig_has_scan},
    { "has_vfo_op", _wrap_Rig_has_vfo_op},
    { "passband_normal", _wrap_Rig_passband_normal},
    { "passband_narrow", _wrap_Rig_passband_narrow},
    { "passband_wide", _wrap_Rig_passband_wide},
    { "set_vfo_opt", _wrap_Rig_set_vfo_opt},
    { "ext_token_lookup", _wrap_Rig_ext_token_lookup},
    { "token_lookup", _wrap_Rig_token_lookup},
    { "set_ext_parm", _wrap_Rig_set_ext_parm},
    { "set_parm", _wrap_Rig_set_parm},
    { "get_parm_i", _wrap_Rig_get_parm_i},
    { "get_parm_f", _wrap_Rig_get_parm_f},
    { "set_conf", _wrap_Rig_set_conf},
    { "get_freq", _wrap_Rig_get_freq},
    { "get_mode", _wrap_Rig_get_mode},
    { "get_split_mode", _wrap_Rig_get_split_mode},
    { "get_vfo", _wrap_Rig_get_vfo},
    { "get_ptt", _wrap_Rig_get_ptt},
    { "get_rptr_shift", _wrap_Rig_get_rptr_shift},
    { "get_rptr_offs", _wrap_Rig_get_rptr_offs},
    { "get_ctcss_tone", _wrap_Rig_get_ctcss_tone},
    { "get_dcs_code", _wrap_Rig_get_dcs_code},
    { "get_ctcss_sql", _wrap_Rig_get_ctcss_sql},
    { "get_dcs_sql", _wrap_Rig_get_dcs_sql},
    { "get_split_freq", _wrap_Rig_get_split_freq},
    { "get_split_vfo", _wrap_Rig_get_split_vfo},
    { "get_rit", _wrap_Rig_get_rit},
    { "get_xit", _wrap_Rig_get_xit},
    { "get_ts", _wrap_Rig_get_ts},
    { "get_ant", _wrap_Rig_get_ant},
    { "get_vfo_info", _wrap_Rig_get_vfo_info},
    { "get_mem", _wrap_Rig_get_mem},
    { "get_powerstat", _wrap_Rig_get_powerstat},
    { "get_dcd", _wrap_Rig_get_dcd},
    { "mem_count", _wrap_Rig_mem_count},
    { "lookup_mem_caps", _wrap_Rig_lookup_mem_caps},
    { "set_channel", _wrap_Rig_set_channel},
    { "get_chan_all", _wrap_Rig_get_chan_all},
    { "get_channel", _wrap_Rig_get_channel},
    { "get_conf", _wrap_Rig_get_conf},
    { "recv_dtmf", _wrap_Rig_recv_dtmf},
    { "get_info", _wrap_Rig_get_info},
    { "get_func", _wrap_Rig_get_func},
    { "get_ext_func", _wrap_Rig_get_ext_func},
    { "get_level", _wrap_Rig_get_level},
    { "get_ext_level", _wrap_Rig_get_ext_level},
    { "get_parm", _wrap_Rig_get_parm},
    { "get_ext_parm", _wrap_Rig_get_ext_parm},
    {0,0}
};
static swig_lua_method swig_Rig_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_Rig_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_Rig_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_Rig_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_Rig_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_Rig_Sf_SwigStatic = {
    "Rig",
    swig_Rig_Sf_SwigStatic_methods,
    swig_Rig_Sf_SwigStatic_attributes,
    swig_Rig_Sf_SwigStatic_constants,
    swig_Rig_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_Rig_bases[] = {0};
static const char *swig_Rig_base_names[] = {0};
static swig_lua_class _wrap_class_Rig = { "Rig", "Rig", &SWIGTYPE_p_Rig,_proxy__wrap_new_Rig, swig_delete_Rig, swig_Rig_methods, swig_Rig_attributes, &swig_Rig_Sf_SwigStatic, swig_Rig_meta, swig_Rig_bases, swig_Rig_base_names };

static int _wrap_new_channelArray(lua_State* L) {
  int SWIG_arg = 0;
  size_t arg1 ;
  channelArray *result = 0 ;
  
  SWIG_check_num_args("channelArray::channelArray",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("channelArray::channelArray",1,"size_t");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative");
  arg1 = (size_t)lua_tonumber(L, 1);
  result = (channelArray *)new_channelArray(arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_channelArray,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channelArray___getitem(lua_State* L) {
  int SWIG_arg = 0;
  channelArray *arg1 = 0 ;
  size_t arg2 ;
  struct channel result;
  
  SWIG_check_num_args("channelArray::getitem",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channelArray::getitem",1,"channelArray *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channelArray::getitem",2,"size_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channelArray,0))){
    SWIG_fail_ptr("channelArray___getitem",1,SWIGTYPE_p_channelArray);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (size_t)lua_tonumber(L, 2);
  result = channelArray_getitem(arg1,arg2);
  {
    struct channel * resultptr;
    resultptr = (struct channel *) malloc(sizeof(struct channel));
    memmove(resultptr, &result, sizeof(struct channel));
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_channel,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channelArray___setitem(lua_State* L) {
  int SWIG_arg = 0;
  channelArray *arg1 = 0 ;
  size_t arg2 ;
  struct channel arg3 ;
  struct channel *argp3 ;
  
  SWIG_check_num_args("channelArray::setitem",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channelArray::setitem",1,"channelArray *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("channelArray::setitem",2,"size_t");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("channelArray::setitem",3,"struct channel");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channelArray,0))){
    SWIG_fail_ptr("channelArray___setitem",1,SWIGTYPE_p_channelArray);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (size_t)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channelArray___setitem",3,SWIGTYPE_p_channel);
  }
  arg3 = *argp3;
  
  channelArray_setitem(arg1,arg2,arg3);
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channelArray_cast(lua_State* L) {
  int SWIG_arg = 0;
  channelArray *arg1 = 0 ;
  struct channel *result = 0 ;
  
  SWIG_check_num_args("channelArray::cast",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channelArray::cast",1,"channelArray *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channelArray,0))){
    SWIG_fail_ptr("channelArray_cast",1,SWIGTYPE_p_channelArray);
  }
  
  result = (struct channel *)channelArray_cast(arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_channel,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_channelArray_frompointer(lua_State* L) {
  int SWIG_arg = 0;
  struct channel *arg1 = 0 ;
  channelArray *result = 0 ;
  
  SWIG_check_num_args("channelArray::channelArray_frompointer",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channelArray::channelArray_frompointer",1,"struct channel *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_channel,0))){
    SWIG_fail_ptr("channelArray_frompointer",1,SWIGTYPE_p_channel);
  }
  
  result = (channelArray *)channelArray_frompointer(arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_channelArray,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_channelArray(void *obj) {
channelArray *arg1 = (channelArray *) obj;
delete_channelArray(arg1);
}
static int _proxy__wrap_new_channelArray(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_channelArray);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_channelArray_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_channelArray_methods[]= {
    { "__getitem", _wrap_channelArray___getitem},
    { "__setitem", _wrap_channelArray___setitem},
    { "cast", _wrap_channelArray_cast},
    {0,0}
};
static swig_lua_method swig_channelArray_meta[] = {
    { "__getitem", _wrap_channelArray___getitem},
    { "__setitem", _wrap_channelArray___setitem},
    {0,0}
};

static swig_lua_attribute swig_channelArray_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_channelArray_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_channelArray_Sf_SwigStatic_methods[]= {
    { "frompointer", _wrap_channelArray_frompointer},
    {0,0}
};
static swig_lua_class* swig_channelArray_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_channelArray_Sf_SwigStatic = {
    "channelArray",
    swig_channelArray_Sf_SwigStatic_methods,
    swig_channelArray_Sf_SwigStatic_attributes,
    swig_channelArray_Sf_SwigStatic_constants,
    swig_channelArray_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_channelArray_bases[] = {0};
static const char *swig_channelArray_base_names[] = {0};
static swig_lua_class _wrap_class_channelArray = { "channelArray", "channelArray", &SWIGTYPE_p_channelArray,_proxy__wrap_new_channelArray, swig_delete_channelArray, swig_channelArray_methods, swig_channelArray_attributes, &swig_channelArray_Sf_SwigStatic, swig_channelArray_meta, swig_channelArray_bases, swig_channelArray_base_names };

static int _wrap_new_toneArray(lua_State* L) {
  int SWIG_arg = 0;
  size_t arg1 ;
  toneArray *result = 0 ;
  
  SWIG_check_num_args("toneArray::toneArray",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("toneArray::toneArray",1,"size_t");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative");
  arg1 = (size_t)lua_tonumber(L, 1);
  result = (toneArray *)new_toneArray(arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_toneArray,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_toneArray___getitem(lua_State* L) {
  int SWIG_arg = 0;
  toneArray *arg1 = 0 ;
  size_t arg2 ;
  tone_t result;
  
  SWIG_check_num_args("toneArray::getitem",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("toneArray::getitem",1,"toneArray *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("toneArray::getitem",2,"size_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_toneArray,0))){
    SWIG_fail_ptr("toneArray___getitem",1,SWIGTYPE_p_toneArray);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (size_t)lua_tonumber(L, 2);
  result = (tone_t)toneArray_getitem(arg1,arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_toneArray___setitem(lua_State* L) {
  int SWIG_arg = 0;
  toneArray *arg1 = 0 ;
  size_t arg2 ;
  tone_t arg3 ;
  
  SWIG_check_num_args("toneArray::setitem",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("toneArray::setitem",1,"toneArray *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("toneArray::setitem",2,"size_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("toneArray::setitem",3,"tone_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_toneArray,0))){
    SWIG_fail_ptr("toneArray___setitem",1,SWIGTYPE_p_toneArray);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (size_t)lua_tonumber(L, 2);
  SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative");
  arg3 = (tone_t)lua_tonumber(L, 3);
  toneArray_setitem(arg1,arg2,arg3);
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_toneArray_cast(lua_State* L) {
  int SWIG_arg = 0;
  toneArray *arg1 = 0 ;
  tone_t *result = 0 ;
  
  SWIG_check_num_args("toneArray::cast",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("toneArray::cast",1,"toneArray *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_toneArray,0))){
    SWIG_fail_ptr("toneArray_cast",1,SWIGTYPE_p_toneArray);
  }
  
  result = (tone_t *)toneArray_cast(arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_unsigned_int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_toneArray_frompointer(lua_State* L) {
  int SWIG_arg = 0;
  tone_t *arg1 = 0 ;
  toneArray *result = 0 ;
  
  SWIG_check_num_args("toneArray::toneArray_frompointer",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("toneArray::toneArray_frompointer",1,"tone_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_unsigned_int,0))){
    SWIG_fail_ptr("toneArray_frompointer",1,SWIGTYPE_p_unsigned_int);
  }
  
  result = (toneArray *)toneArray_frompointer(arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_toneArray,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_toneArray(void *obj) {
toneArray *arg1 = (toneArray *) obj;
delete_toneArray(arg1);
}
static int _proxy__wrap_new_toneArray(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_toneArray);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_toneArray_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_toneArray_methods[]= {
    { "__getitem", _wrap_toneArray___getitem},
    { "__setitem", _wrap_toneArray___setitem},
    { "cast", _wrap_toneArray_cast},
    {0,0}
};
static swig_lua_method swig_toneArray_meta[] = {
    { "__getitem", _wrap_toneArray___getitem},
    { "__setitem", _wrap_toneArray___setitem},
    {0,0}
};

static swig_lua_attribute swig_toneArray_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_toneArray_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_toneArray_Sf_SwigStatic_methods[]= {
    { "frompointer", _wrap_toneArray_frompointer},
    {0,0}
};
static swig_lua_class* swig_toneArray_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_toneArray_Sf_SwigStatic = {
    "toneArray",
    swig_toneArray_Sf_SwigStatic_methods,
    swig_toneArray_Sf_SwigStatic_attributes,
    swig_toneArray_Sf_SwigStatic_constants,
    swig_toneArray_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_toneArray_bases[] = {0};
static const char *swig_toneArray_base_names[] = {0};
static swig_lua_class _wrap_class_toneArray = { "toneArray", "toneArray", &SWIGTYPE_p_toneArray,_proxy__wrap_new_toneArray, swig_delete_toneArray, swig_toneArray_methods, swig_toneArray_attributes, &swig_toneArray_Sf_SwigStatic, swig_toneArray_meta, swig_toneArray_bases, swig_toneArray_base_names };

static int _wrap_rot_caps_rot_model_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  rot_model_t arg2 ;
  
  SWIG_check_num_args("rot_caps::rot_model",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::rot_model",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::rot_model",2,"rot_model_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_rot_model_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2 = (rot_model_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->rot_model = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_rot_model_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  rot_model_t result;
  
  SWIG_check_num_args("rot_caps::rot_model",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::rot_model",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_rot_model_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (rot_model_t) ((arg1)->rot_model);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_model_name_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rot_caps::model_name",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::model_name",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_model_name_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (char *) ((arg1)->model_name);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_mfg_name_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rot_caps::mfg_name",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::mfg_name",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_mfg_name_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (char *) ((arg1)->mfg_name);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_version_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rot_caps::version",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::version",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_version_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (char *) ((arg1)->version);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_copyright_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("rot_caps::copyright",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::copyright",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_copyright_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (char *) ((arg1)->copyright);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_status_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  enum rig_status_e arg2 ;
  
  SWIG_check_num_args("rot_caps::status",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::status",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::status",2,"enum rig_status_e");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_status_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2 = (enum rig_status_e)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->status = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_status_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  enum rig_status_e result;
  
  SWIG_check_num_args("rot_caps::status",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::status",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_status_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (enum rig_status_e) ((arg1)->status);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_rot_type_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rot_caps::rot_type",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::rot_type",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::rot_type",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_rot_type_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->rot_type = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_rot_type_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rot_caps::rot_type",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::rot_type",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_rot_type_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int) ((arg1)->rot_type);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_port_type_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  enum rig_port_e arg2 ;
  
  SWIG_check_num_args("rot_caps::port_type",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::port_type",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::port_type",2,"enum rig_port_e");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_port_type_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2 = (enum rig_port_e)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->port_type = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_port_type_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  enum rig_port_e result;
  
  SWIG_check_num_args("rot_caps::port_type",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::port_type",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_port_type_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (enum rig_port_e) ((arg1)->port_type);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_serial_rate_min_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rot_caps::serial_rate_min",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::serial_rate_min",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::serial_rate_min",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_serial_rate_min_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_rate_min = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_serial_rate_min_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rot_caps::serial_rate_min",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::serial_rate_min",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_serial_rate_min_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int) ((arg1)->serial_rate_min);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_serial_rate_max_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rot_caps::serial_rate_max",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::serial_rate_max",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::serial_rate_max",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_serial_rate_max_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_rate_max = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_serial_rate_max_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rot_caps::serial_rate_max",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::serial_rate_max",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_serial_rate_max_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int) ((arg1)->serial_rate_max);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_serial_data_bits_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rot_caps::serial_data_bits",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::serial_data_bits",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::serial_data_bits",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_serial_data_bits_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_data_bits = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_serial_data_bits_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rot_caps::serial_data_bits",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::serial_data_bits",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_serial_data_bits_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int) ((arg1)->serial_data_bits);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_serial_stop_bits_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rot_caps::serial_stop_bits",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::serial_stop_bits",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::serial_stop_bits",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_serial_stop_bits_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_stop_bits = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_serial_stop_bits_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rot_caps::serial_stop_bits",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::serial_stop_bits",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_serial_stop_bits_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int) ((arg1)->serial_stop_bits);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_serial_parity_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  enum serial_parity_e arg2 ;
  
  SWIG_check_num_args("rot_caps::serial_parity",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::serial_parity",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::serial_parity",2,"enum serial_parity_e");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_serial_parity_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2 = (enum serial_parity_e)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_parity = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_serial_parity_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  enum serial_parity_e result;
  
  SWIG_check_num_args("rot_caps::serial_parity",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::serial_parity",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_serial_parity_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (enum serial_parity_e) ((arg1)->serial_parity);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_serial_handshake_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  enum serial_handshake_e arg2 ;
  
  SWIG_check_num_args("rot_caps::serial_handshake",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::serial_handshake",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::serial_handshake",2,"enum serial_handshake_e");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_serial_handshake_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2 = (enum serial_handshake_e)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_handshake = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_serial_handshake_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  enum serial_handshake_e result;
  
  SWIG_check_num_args("rot_caps::serial_handshake",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::serial_handshake",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_serial_handshake_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (enum serial_handshake_e) ((arg1)->serial_handshake);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_write_delay_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rot_caps::write_delay",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::write_delay",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::write_delay",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_write_delay_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->write_delay = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_write_delay_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rot_caps::write_delay",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::write_delay",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_write_delay_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int) ((arg1)->write_delay);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_post_write_delay_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rot_caps::post_write_delay",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::post_write_delay",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::post_write_delay",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_post_write_delay_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->post_write_delay = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_post_write_delay_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rot_caps::post_write_delay",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::post_write_delay",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_post_write_delay_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int) ((arg1)->post_write_delay);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_timeout_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rot_caps::timeout",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::timeout",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::timeout",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_timeout_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->timeout = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_timeout_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rot_caps::timeout",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::timeout",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_timeout_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int) ((arg1)->timeout);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_retry_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rot_caps::retry",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::retry",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::retry",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_retry_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->retry = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_retry_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rot_caps::retry",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::retry",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_retry_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int) ((arg1)->retry);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_has_get_func_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rot_caps::has_get_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::has_get_func",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::has_get_func",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_has_get_func_set",1,SWIGTYPE_p_rot_caps);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_get_func = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_has_get_func_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rot_caps::has_get_func",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::has_get_func",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_has_get_func_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (setting_t) ((arg1)->has_get_func);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_has_set_func_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rot_caps::has_set_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::has_set_func",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::has_set_func",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_has_set_func_set",1,SWIGTYPE_p_rot_caps);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_set_func = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_has_set_func_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rot_caps::has_set_func",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::has_set_func",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_has_set_func_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (setting_t) ((arg1)->has_set_func);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_has_get_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rot_caps::has_get_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::has_get_level",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::has_get_level",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_has_get_level_set",1,SWIGTYPE_p_rot_caps);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_get_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_has_get_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rot_caps::has_get_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::has_get_level",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_has_get_level_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (setting_t) ((arg1)->has_get_level);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_has_set_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rot_caps::has_set_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::has_set_level",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::has_set_level",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_has_set_level_set",1,SWIGTYPE_p_rot_caps);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_set_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_has_set_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rot_caps::has_set_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::has_set_level",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_has_set_level_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (setting_t) ((arg1)->has_set_level);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_has_get_parm_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rot_caps::has_get_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::has_get_parm",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::has_get_parm",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_has_get_parm_set",1,SWIGTYPE_p_rot_caps);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_get_parm = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_has_get_parm_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rot_caps::has_get_parm",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::has_get_parm",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_has_get_parm_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (setting_t) ((arg1)->has_get_parm);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_has_set_parm_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rot_caps::has_set_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::has_set_parm",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::has_set_parm",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_has_set_parm_set",1,SWIGTYPE_p_rot_caps);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_set_parm = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_has_set_parm_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rot_caps::has_set_parm",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::has_set_parm",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_has_set_parm_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (setting_t) ((arg1)->has_set_parm);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_has_status_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  rot_status_t arg2 ;
  
  SWIG_check_num_args("rot_caps::has_status",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::has_status",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::has_status",2,"rot_status_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_has_status_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2 = (rot_status_t)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_status = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_has_status_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  rot_status_t result;
  
  SWIG_check_num_args("rot_caps::has_status",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::has_status",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_has_status_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (rot_status_t) ((arg1)->has_status);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_level_gran_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  gran_t *arg2 = (gran_t *)0 ;
  
  SWIG_check_num_args("rot_caps::level_gran",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::level_gran",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::level_gran",2,"gran_t [64]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_level_gran_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_gran,0))){
    SWIG_fail_ptr("rot_caps_level_gran_set",2,SWIGTYPE_p_gran);
  }
  
  {
    size_t ii;
    gran_t *b = (gran_t *) arg1->level_gran;
    for (ii = 0; ii < (size_t)64; ii++) b[ii] = *((gran_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_level_gran_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  gran_t *result = 0 ;
  
  SWIG_check_num_args("rot_caps::level_gran",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::level_gran",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_level_gran_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (gran_t *)(gran_t *) ((arg1)->level_gran);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_gran,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_parm_gran_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  gran_t *arg2 = (gran_t *)0 ;
  
  SWIG_check_num_args("rot_caps::parm_gran",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::parm_gran",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::parm_gran",2,"gran_t [64]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_parm_gran_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_gran,0))){
    SWIG_fail_ptr("rot_caps_parm_gran_set",2,SWIGTYPE_p_gran);
  }
  
  {
    size_t ii;
    gran_t *b = (gran_t *) arg1->parm_gran;
    for (ii = 0; ii < (size_t)64; ii++) b[ii] = *((gran_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_parm_gran_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  gran_t *result = 0 ;
  
  SWIG_check_num_args("rot_caps::parm_gran",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::parm_gran",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_parm_gran_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (gran_t *)(gran_t *) ((arg1)->parm_gran);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_gran,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_extparms_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  struct confparams *arg2 = 0 ;
  
  SWIG_check_num_args("rot_caps::extparms",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::extparms",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::extparms",2,"struct confparams const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_extparms_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_confparams,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("rot_caps_extparms_set",2,SWIGTYPE_p_confparams);
  }
  
  if (arg1) (arg1)->extparms = (struct confparams const *)arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_extparms_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  struct confparams *result = 0 ;
  
  SWIG_check_num_args("rot_caps::extparms",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::extparms",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_extparms_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (struct confparams *) ((arg1)->extparms);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_confparams,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_extlevels_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  struct confparams *arg2 = 0 ;
  
  SWIG_check_num_args("rot_caps::extlevels",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::extlevels",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::extlevels",2,"struct confparams const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_extlevels_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_confparams,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("rot_caps_extlevels_set",2,SWIGTYPE_p_confparams);
  }
  
  if (arg1) (arg1)->extlevels = (struct confparams const *)arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_extlevels_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  struct confparams *result = 0 ;
  
  SWIG_check_num_args("rot_caps::extlevels",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::extlevels",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_extlevels_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (struct confparams *) ((arg1)->extlevels);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_confparams,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_extfuncs_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  struct confparams *arg2 = 0 ;
  
  SWIG_check_num_args("rot_caps::extfuncs",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::extfuncs",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::extfuncs",2,"struct confparams const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_extfuncs_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_confparams,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("rot_caps_extfuncs_set",2,SWIGTYPE_p_confparams);
  }
  
  if (arg1) (arg1)->extfuncs = (struct confparams const *)arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_extfuncs_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  struct confparams *result = 0 ;
  
  SWIG_check_num_args("rot_caps::extfuncs",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::extfuncs",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_extfuncs_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (struct confparams *) ((arg1)->extfuncs);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_confparams,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_ext_tokens_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int *arg2 = 0 ;
  int temp2 ;
  
  arg2 = &temp2; 
  SWIG_check_num_args("rot_caps::ext_tokens",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::ext_tokens",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_ext_tokens_set",1,SWIGTYPE_p_rot_caps);
  }
  
  if (arg1) (arg1)->ext_tokens = arg2;
  
  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_ext_tokens_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int *result = 0 ;
  
  SWIG_check_num_args("rot_caps::ext_tokens",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::ext_tokens",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_ext_tokens_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int *) ((arg1)->ext_tokens);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_min_az_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  azimuth_t arg2 ;
  
  SWIG_check_num_args("rot_caps::min_az",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::min_az",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::min_az",2,"azimuth_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_min_az_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2 = (azimuth_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->min_az = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_min_az_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  azimuth_t result;
  
  SWIG_check_num_args("rot_caps::min_az",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::min_az",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_min_az_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (azimuth_t) ((arg1)->min_az);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_max_az_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  azimuth_t arg2 ;
  
  SWIG_check_num_args("rot_caps::max_az",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::max_az",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::max_az",2,"azimuth_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_max_az_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2 = (azimuth_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->max_az = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_max_az_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  azimuth_t result;
  
  SWIG_check_num_args("rot_caps::max_az",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::max_az",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_max_az_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (azimuth_t) ((arg1)->max_az);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_min_el_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  elevation_t arg2 ;
  
  SWIG_check_num_args("rot_caps::min_el",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::min_el",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::min_el",2,"elevation_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_min_el_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2 = (elevation_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->min_el = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_min_el_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  elevation_t result;
  
  SWIG_check_num_args("rot_caps::min_el",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::min_el",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_min_el_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (elevation_t) ((arg1)->min_el);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_max_el_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  elevation_t arg2 ;
  
  SWIG_check_num_args("rot_caps::max_el",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::max_el",1,"struct rot_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_caps::max_el",2,"elevation_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_max_el_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2 = (elevation_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->max_el = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_max_el_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  elevation_t result;
  
  SWIG_check_num_args("rot_caps::max_el",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::max_el",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_max_el_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (elevation_t) ((arg1)->max_el);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_cfgparams_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  struct confparams *arg2 = 0 ;
  
  SWIG_check_num_args("rot_caps::cfgparams",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::cfgparams",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::cfgparams",2,"struct confparams const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_cfgparams_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_confparams,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("rot_caps_cfgparams_set",2,SWIGTYPE_p_confparams);
  }
  
  if (arg1) (arg1)->cfgparams = (struct confparams const *)arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_cfgparams_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  struct confparams *result = 0 ;
  
  SWIG_check_num_args("rot_caps::cfgparams",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::cfgparams",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_cfgparams_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (struct confparams *) ((arg1)->cfgparams);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_confparams,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_priv_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("rot_caps::priv",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::priv",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::priv",2,"void const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_priv_set",1,SWIGTYPE_p_rot_caps);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"rot_caps_priv_set");
  if (arg1) (arg1)->priv = (void const *)arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_priv_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("rot_caps::priv",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::priv",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_priv_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (void *) ((arg1)->priv);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_rot_init_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *) = 0 ;
  
  SWIG_check_num_args("rot_caps::rot_init",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::rot_init",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::rot_init",2,"int (*)(ROT *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_rot_init_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot__int,0))){
    SWIG_fail_ptr("rot_caps_rot_init_set",2,SWIGTYPE_p_f_p_struct_s_rot__int);
  }
  
  if (arg1) (arg1)->rot_init = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_rot_init_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *) = 0 ;
  
  SWIG_check_num_args("rot_caps::rot_init",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::rot_init",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_rot_init_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *)) ((arg1)->rot_init);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_rot_cleanup_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *) = 0 ;
  
  SWIG_check_num_args("rot_caps::rot_cleanup",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::rot_cleanup",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::rot_cleanup",2,"int (*)(ROT *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_rot_cleanup_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot__int,0))){
    SWIG_fail_ptr("rot_caps_rot_cleanup_set",2,SWIGTYPE_p_f_p_struct_s_rot__int);
  }
  
  if (arg1) (arg1)->rot_cleanup = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_rot_cleanup_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *) = 0 ;
  
  SWIG_check_num_args("rot_caps::rot_cleanup",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::rot_cleanup",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_rot_cleanup_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *)) ((arg1)->rot_cleanup);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_rot_open_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *) = 0 ;
  
  SWIG_check_num_args("rot_caps::rot_open",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::rot_open",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::rot_open",2,"int (*)(ROT *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_rot_open_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot__int,0))){
    SWIG_fail_ptr("rot_caps_rot_open_set",2,SWIGTYPE_p_f_p_struct_s_rot__int);
  }
  
  if (arg1) (arg1)->rot_open = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_rot_open_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *) = 0 ;
  
  SWIG_check_num_args("rot_caps::rot_open",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::rot_open",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_rot_open_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *)) ((arg1)->rot_open);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_rot_close_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *) = 0 ;
  
  SWIG_check_num_args("rot_caps::rot_close",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::rot_close",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::rot_close",2,"int (*)(ROT *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_rot_close_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot__int,0))){
    SWIG_fail_ptr("rot_caps_rot_close_set",2,SWIGTYPE_p_f_p_struct_s_rot__int);
  }
  
  if (arg1) (arg1)->rot_close = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_rot_close_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *) = 0 ;
  
  SWIG_check_num_args("rot_caps::rot_close",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::rot_close",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_rot_close_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *)) ((arg1)->rot_close);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_set_conf_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,hamlib_token_t,char const *) = 0 ;
  
  SWIG_check_num_args("rot_caps::set_conf",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::set_conf",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::set_conf",2,"int (*)(ROT *,hamlib_token_t,char const *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_set_conf_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_long_p_q_const__char__int,0))){
    SWIG_fail_ptr("rot_caps_set_conf_set",2,SWIGTYPE_p_f_p_struct_s_rot_long_p_q_const__char__int);
  }
  
  if (arg1) (arg1)->set_conf = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_set_conf_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,hamlib_token_t,char const *) = 0 ;
  
  SWIG_check_num_args("rot_caps::set_conf",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::set_conf",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_set_conf_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,hamlib_token_t,char const *)) ((arg1)->set_conf);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_long_p_q_const__char__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_conf_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,hamlib_token_t,char *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_conf",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_conf",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::get_conf",2,"int (*)(ROT *,hamlib_token_t,char *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_conf_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_long_p_char__int,0))){
    SWIG_fail_ptr("rot_caps_get_conf_set",2,SWIGTYPE_p_f_p_struct_s_rot_long_p_char__int);
  }
  
  if (arg1) (arg1)->get_conf = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_conf_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,hamlib_token_t,char *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_conf",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_conf",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_conf_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,hamlib_token_t,char *)) ((arg1)->get_conf);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_long_p_char__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_set_position_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,azimuth_t,elevation_t) = 0 ;
  
  SWIG_check_num_args("rot_caps::set_position",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::set_position",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::set_position",2,"int (*)(ROT *,azimuth_t,elevation_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_set_position_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_float_float__int,0))){
    SWIG_fail_ptr("rot_caps_set_position_set",2,SWIGTYPE_p_f_p_struct_s_rot_float_float__int);
  }
  
  if (arg1) (arg1)->set_position = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_set_position_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,azimuth_t,elevation_t) = 0 ;
  
  SWIG_check_num_args("rot_caps::set_position",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::set_position",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_set_position_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,azimuth_t,elevation_t)) ((arg1)->set_position);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_float_float__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_position_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,azimuth_t *,elevation_t *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_position",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_position",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::get_position",2,"int (*)(ROT *,azimuth_t *,elevation_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_position_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_p_float_p_float__int,0))){
    SWIG_fail_ptr("rot_caps_get_position_set",2,SWIGTYPE_p_f_p_struct_s_rot_p_float_p_float__int);
  }
  
  if (arg1) (arg1)->get_position = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_position_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,azimuth_t *,elevation_t *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_position",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_position",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_position_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,azimuth_t *,elevation_t *)) ((arg1)->get_position);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_p_float_p_float__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_stop_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *) = 0 ;
  
  SWIG_check_num_args("rot_caps::stop",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::stop",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::stop",2,"int (*)(ROT *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_stop_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot__int,0))){
    SWIG_fail_ptr("rot_caps_stop_set",2,SWIGTYPE_p_f_p_struct_s_rot__int);
  }
  
  if (arg1) (arg1)->stop = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_stop_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *) = 0 ;
  
  SWIG_check_num_args("rot_caps::stop",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::stop",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_stop_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *)) ((arg1)->stop);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_park_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *) = 0 ;
  
  SWIG_check_num_args("rot_caps::park",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::park",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::park",2,"int (*)(ROT *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_park_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot__int,0))){
    SWIG_fail_ptr("rot_caps_park_set",2,SWIGTYPE_p_f_p_struct_s_rot__int);
  }
  
  if (arg1) (arg1)->park = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_park_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *) = 0 ;
  
  SWIG_check_num_args("rot_caps::park",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::park",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_park_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *)) ((arg1)->park);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_reset_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,rot_reset_t) = 0 ;
  
  SWIG_check_num_args("rot_caps::reset",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::reset",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::reset",2,"int (*)(ROT *,rot_reset_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_reset_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_int__int,0))){
    SWIG_fail_ptr("rot_caps_reset_set",2,SWIGTYPE_p_f_p_struct_s_rot_int__int);
  }
  
  if (arg1) (arg1)->reset = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_reset_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,rot_reset_t) = 0 ;
  
  SWIG_check_num_args("rot_caps::reset",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::reset",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_reset_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,rot_reset_t)) ((arg1)->reset);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_move_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,int,int) = 0 ;
  
  SWIG_check_num_args("rot_caps::move",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::move",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::move",2,"int (*)(ROT *,int,int)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_move_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_int_int__int,0))){
    SWIG_fail_ptr("rot_caps_move_set",2,SWIGTYPE_p_f_p_struct_s_rot_int_int__int);
  }
  
  if (arg1) (arg1)->move = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_move_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,int,int) = 0 ;
  
  SWIG_check_num_args("rot_caps::move",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::move",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_move_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,int,int)) ((arg1)->move);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_int_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_info_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  char *(*arg2)(ROT *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_info",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_info",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::get_info",2,"char const *(*)(ROT *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_info_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot__p_char,0))){
    SWIG_fail_ptr("rot_caps_get_info_set",2,SWIGTYPE_p_f_p_struct_s_rot__p_char);
  }
  
  if (arg1) (arg1)->get_info = (char const *(*)(ROT *))arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_info_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  char *(*result)(ROT *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_info",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_info",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_info_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (char *(*)(ROT *)) ((arg1)->get_info);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot__p_char,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_set_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,setting_t,value_t) = 0 ;
  
  SWIG_check_num_args("rot_caps::set_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::set_level",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::set_level",2,"int (*)(ROT *,setting_t,value_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_set_level_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_value_t__int,0))){
    SWIG_fail_ptr("rot_caps_set_level_set",2,SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_value_t__int);
  }
  
  if (arg1) (arg1)->set_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_set_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,setting_t,value_t) = 0 ;
  
  SWIG_check_num_args("rot_caps::set_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::set_level",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_set_level_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,setting_t,value_t)) ((arg1)->set_level);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,setting_t,value_t *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_level",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::get_level",2,"int (*)(ROT *,setting_t,value_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_level_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_p_value_t__int,0))){
    SWIG_fail_ptr("rot_caps_get_level_set",2,SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_p_value_t__int);
  }
  
  if (arg1) (arg1)->get_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,setting_t,value_t *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_level",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_level_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,setting_t,value_t *)) ((arg1)->get_level);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_p_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_set_func_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,setting_t,int) = 0 ;
  
  SWIG_check_num_args("rot_caps::set_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::set_func",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::set_func",2,"int (*)(ROT *,setting_t,int)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_set_func_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_int__int,0))){
    SWIG_fail_ptr("rot_caps_set_func_set",2,SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_int__int);
  }
  
  if (arg1) (arg1)->set_func = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_set_func_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,setting_t,int) = 0 ;
  
  SWIG_check_num_args("rot_caps::set_func",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::set_func",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_set_func_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,setting_t,int)) ((arg1)->set_func);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_func_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,setting_t,int *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_func",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::get_func",2,"int (*)(ROT *,setting_t,int *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_func_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_p_int__int,0))){
    SWIG_fail_ptr("rot_caps_get_func_set",2,SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_p_int__int);
  }
  
  if (arg1) (arg1)->get_func = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_func_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,setting_t,int *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_func",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_func",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_func_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,setting_t,int *)) ((arg1)->get_func);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_p_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_set_parm_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,setting_t,value_t) = 0 ;
  
  SWIG_check_num_args("rot_caps::set_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::set_parm",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::set_parm",2,"int (*)(ROT *,setting_t,value_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_set_parm_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_value_t__int,0))){
    SWIG_fail_ptr("rot_caps_set_parm_set",2,SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_value_t__int);
  }
  
  if (arg1) (arg1)->set_parm = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_set_parm_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,setting_t,value_t) = 0 ;
  
  SWIG_check_num_args("rot_caps::set_parm",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::set_parm",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_set_parm_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,setting_t,value_t)) ((arg1)->set_parm);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_parm_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,setting_t,value_t *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_parm",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::get_parm",2,"int (*)(ROT *,setting_t,value_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_parm_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_p_value_t__int,0))){
    SWIG_fail_ptr("rot_caps_get_parm_set",2,SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_p_value_t__int);
  }
  
  if (arg1) (arg1)->get_parm = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_parm_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,setting_t,value_t *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_parm",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_parm",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_parm_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,setting_t,value_t *)) ((arg1)->get_parm);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_unsigned_long_long_p_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_set_ext_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,hamlib_token_t,value_t) = 0 ;
  
  SWIG_check_num_args("rot_caps::set_ext_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::set_ext_level",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::set_ext_level",2,"int (*)(ROT *,hamlib_token_t,value_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_set_ext_level_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_long_value_t__int,0))){
    SWIG_fail_ptr("rot_caps_set_ext_level_set",2,SWIGTYPE_p_f_p_struct_s_rot_long_value_t__int);
  }
  
  if (arg1) (arg1)->set_ext_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_set_ext_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,hamlib_token_t,value_t) = 0 ;
  
  SWIG_check_num_args("rot_caps::set_ext_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::set_ext_level",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_set_ext_level_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,hamlib_token_t,value_t)) ((arg1)->set_ext_level);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_long_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_ext_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,hamlib_token_t,value_t *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_ext_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_ext_level",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::get_ext_level",2,"int (*)(ROT *,hamlib_token_t,value_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_ext_level_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_long_p_value_t__int,0))){
    SWIG_fail_ptr("rot_caps_get_ext_level_set",2,SWIGTYPE_p_f_p_struct_s_rot_long_p_value_t__int);
  }
  
  if (arg1) (arg1)->get_ext_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_ext_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,hamlib_token_t,value_t *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_ext_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_ext_level",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_ext_level_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,hamlib_token_t,value_t *)) ((arg1)->get_ext_level);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_long_p_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_set_ext_func_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,hamlib_token_t,int) = 0 ;
  
  SWIG_check_num_args("rot_caps::set_ext_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::set_ext_func",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::set_ext_func",2,"int (*)(ROT *,hamlib_token_t,int)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_set_ext_func_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_long_int__int,0))){
    SWIG_fail_ptr("rot_caps_set_ext_func_set",2,SWIGTYPE_p_f_p_struct_s_rot_long_int__int);
  }
  
  if (arg1) (arg1)->set_ext_func = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_set_ext_func_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,hamlib_token_t,int) = 0 ;
  
  SWIG_check_num_args("rot_caps::set_ext_func",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::set_ext_func",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_set_ext_func_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,hamlib_token_t,int)) ((arg1)->set_ext_func);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_long_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_ext_func_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,hamlib_token_t,int *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_ext_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_ext_func",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::get_ext_func",2,"int (*)(ROT *,hamlib_token_t,int *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_ext_func_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_long_p_int__int,0))){
    SWIG_fail_ptr("rot_caps_get_ext_func_set",2,SWIGTYPE_p_f_p_struct_s_rot_long_p_int__int);
  }
  
  if (arg1) (arg1)->get_ext_func = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_ext_func_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,hamlib_token_t,int *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_ext_func",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_ext_func",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_ext_func_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,hamlib_token_t,int *)) ((arg1)->get_ext_func);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_long_p_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_set_ext_parm_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,hamlib_token_t,value_t) = 0 ;
  
  SWIG_check_num_args("rot_caps::set_ext_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::set_ext_parm",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::set_ext_parm",2,"int (*)(ROT *,hamlib_token_t,value_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_set_ext_parm_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_long_value_t__int,0))){
    SWIG_fail_ptr("rot_caps_set_ext_parm_set",2,SWIGTYPE_p_f_p_struct_s_rot_long_value_t__int);
  }
  
  if (arg1) (arg1)->set_ext_parm = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_set_ext_parm_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,hamlib_token_t,value_t) = 0 ;
  
  SWIG_check_num_args("rot_caps::set_ext_parm",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::set_ext_parm",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_set_ext_parm_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,hamlib_token_t,value_t)) ((arg1)->set_ext_parm);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_long_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_ext_parm_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,hamlib_token_t,value_t *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_ext_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_ext_parm",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::get_ext_parm",2,"int (*)(ROT *,hamlib_token_t,value_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_ext_parm_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_long_p_value_t__int,0))){
    SWIG_fail_ptr("rot_caps_get_ext_parm_set",2,SWIGTYPE_p_f_p_struct_s_rot_long_p_value_t__int);
  }
  
  if (arg1) (arg1)->get_ext_parm = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_ext_parm_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,hamlib_token_t,value_t *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_ext_parm",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_ext_parm",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_ext_parm_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,hamlib_token_t,value_t *)) ((arg1)->get_ext_parm);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_long_p_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_status_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,rot_status_t *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_status",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_status",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::get_status",2,"int (*)(ROT *,rot_status_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_status_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_p_enum_rot_status_t__int,0))){
    SWIG_fail_ptr("rot_caps_get_status_set",2,SWIGTYPE_p_f_p_struct_s_rot_p_enum_rot_status_t__int);
  }
  
  if (arg1) (arg1)->get_status = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_status_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,rot_status_t *) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_status",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_status",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_status_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,rot_status_t *)) ((arg1)->get_status);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_p_enum_rot_status_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_conf2_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*arg2)(ROT *,hamlib_token_t,char *,int) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_conf2",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_conf2",1,"struct rot_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_caps::get_conf2",2,"int (*)(ROT *,hamlib_token_t,char *,int)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_conf2_set",1,SWIGTYPE_p_rot_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_s_rot_long_p_char_int__int,0))){
    SWIG_fail_ptr("rot_caps_get_conf2_set",2,SWIGTYPE_p_f_p_struct_s_rot_long_p_char_int__int);
  }
  
  if (arg1) (arg1)->get_conf2 = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_caps_get_conf2_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *arg1 = 0 ;
  int (*result)(ROT *,hamlib_token_t,char *,int) = 0 ;
  
  SWIG_check_num_args("rot_caps::get_conf2",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_caps::get_conf2",1,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_caps,0))){
    SWIG_fail_ptr("rot_caps_get_conf2_get",1,SWIGTYPE_p_rot_caps);
  }
  
  result = (int (*)(ROT *,hamlib_token_t,char *,int)) ((arg1)->get_conf2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_s_rot_long_p_char_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_rot_caps(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_caps *result = 0 ;
  
  SWIG_check_num_args("rot_caps::rot_caps",0,0)
  result = (struct rot_caps *)calloc(1, sizeof(struct rot_caps));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_rot_caps,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_rot_caps(void *obj) {
struct rot_caps *arg1 = (struct rot_caps *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_rot_caps(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_rot_caps);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_rot_caps_attributes[] = {
    { "rot_model", _wrap_rot_caps_rot_model_get, _wrap_rot_caps_rot_model_set },
    { "model_name", _wrap_rot_caps_model_name_get, SWIG_Lua_set_immutable },
    { "mfg_name", _wrap_rot_caps_mfg_name_get, SWIG_Lua_set_immutable },
    { "version", _wrap_rot_caps_version_get, SWIG_Lua_set_immutable },
    { "copyright", _wrap_rot_caps_copyright_get, SWIG_Lua_set_immutable },
    { "status", _wrap_rot_caps_status_get, _wrap_rot_caps_status_set },
    { "rot_type", _wrap_rot_caps_rot_type_get, _wrap_rot_caps_rot_type_set },
    { "port_type", _wrap_rot_caps_port_type_get, _wrap_rot_caps_port_type_set },
    { "serial_rate_min", _wrap_rot_caps_serial_rate_min_get, _wrap_rot_caps_serial_rate_min_set },
    { "serial_rate_max", _wrap_rot_caps_serial_rate_max_get, _wrap_rot_caps_serial_rate_max_set },
    { "serial_data_bits", _wrap_rot_caps_serial_data_bits_get, _wrap_rot_caps_serial_data_bits_set },
    { "serial_stop_bits", _wrap_rot_caps_serial_stop_bits_get, _wrap_rot_caps_serial_stop_bits_set },
    { "serial_parity", _wrap_rot_caps_serial_parity_get, _wrap_rot_caps_serial_parity_set },
    { "serial_handshake", _wrap_rot_caps_serial_handshake_get, _wrap_rot_caps_serial_handshake_set },
    { "write_delay", _wrap_rot_caps_write_delay_get, _wrap_rot_caps_write_delay_set },
    { "post_write_delay", _wrap_rot_caps_post_write_delay_get, _wrap_rot_caps_post_write_delay_set },
    { "timeout", _wrap_rot_caps_timeout_get, _wrap_rot_caps_timeout_set },
    { "retry", _wrap_rot_caps_retry_get, _wrap_rot_caps_retry_set },
    { "has_get_func", _wrap_rot_caps_has_get_func_get, _wrap_rot_caps_has_get_func_set },
    { "has_set_func", _wrap_rot_caps_has_set_func_get, _wrap_rot_caps_has_set_func_set },
    { "has_get_level", _wrap_rot_caps_has_get_level_get, _wrap_rot_caps_has_get_level_set },
    { "has_set_level", _wrap_rot_caps_has_set_level_get, _wrap_rot_caps_has_set_level_set },
    { "has_get_parm", _wrap_rot_caps_has_get_parm_get, _wrap_rot_caps_has_get_parm_set },
    { "has_set_parm", _wrap_rot_caps_has_set_parm_get, _wrap_rot_caps_has_set_parm_set },
    { "has_status", _wrap_rot_caps_has_status_get, _wrap_rot_caps_has_status_set },
    { "level_gran", _wrap_rot_caps_level_gran_get, _wrap_rot_caps_level_gran_set },
    { "parm_gran", _wrap_rot_caps_parm_gran_get, _wrap_rot_caps_parm_gran_set },
    { "extparms", _wrap_rot_caps_extparms_get, _wrap_rot_caps_extparms_set },
    { "extlevels", _wrap_rot_caps_extlevels_get, _wrap_rot_caps_extlevels_set },
    { "extfuncs", _wrap_rot_caps_extfuncs_get, _wrap_rot_caps_extfuncs_set },
    { "ext_tokens", _wrap_rot_caps_ext_tokens_get, _wrap_rot_caps_ext_tokens_set },
    { "min_az", _wrap_rot_caps_min_az_get, _wrap_rot_caps_min_az_set },
    { "max_az", _wrap_rot_caps_max_az_get, _wrap_rot_caps_max_az_set },
    { "min_el", _wrap_rot_caps_min_el_get, _wrap_rot_caps_min_el_set },
    { "max_el", _wrap_rot_caps_max_el_get, _wrap_rot_caps_max_el_set },
    { "cfgparams", _wrap_rot_caps_cfgparams_get, _wrap_rot_caps_cfgparams_set },
    { "priv", _wrap_rot_caps_priv_get, _wrap_rot_caps_priv_set },
    { "rot_init", _wrap_rot_caps_rot_init_get, _wrap_rot_caps_rot_init_set },
    { "rot_cleanup", _wrap_rot_caps_rot_cleanup_get, _wrap_rot_caps_rot_cleanup_set },
    { "rot_open", _wrap_rot_caps_rot_open_get, _wrap_rot_caps_rot_open_set },
    { "rot_close", _wrap_rot_caps_rot_close_get, _wrap_rot_caps_rot_close_set },
    { "set_conf", _wrap_rot_caps_set_conf_get, _wrap_rot_caps_set_conf_set },
    { "get_conf", _wrap_rot_caps_get_conf_get, _wrap_rot_caps_get_conf_set },
    { "set_position", _wrap_rot_caps_set_position_get, _wrap_rot_caps_set_position_set },
    { "get_position", _wrap_rot_caps_get_position_get, _wrap_rot_caps_get_position_set },
    { "stop", _wrap_rot_caps_stop_get, _wrap_rot_caps_stop_set },
    { "park", _wrap_rot_caps_park_get, _wrap_rot_caps_park_set },
    { "reset", _wrap_rot_caps_reset_get, _wrap_rot_caps_reset_set },
    { "move", _wrap_rot_caps_move_get, _wrap_rot_caps_move_set },
    { "get_info", _wrap_rot_caps_get_info_get, _wrap_rot_caps_get_info_set },
    { "set_level", _wrap_rot_caps_set_level_get, _wrap_rot_caps_set_level_set },
    { "get_level", _wrap_rot_caps_get_level_get, _wrap_rot_caps_get_level_set },
    { "set_func", _wrap_rot_caps_set_func_get, _wrap_rot_caps_set_func_set },
    { "get_func", _wrap_rot_caps_get_func_get, _wrap_rot_caps_get_func_set },
    { "set_parm", _wrap_rot_caps_set_parm_get, _wrap_rot_caps_set_parm_set },
    { "get_parm", _wrap_rot_caps_get_parm_get, _wrap_rot_caps_get_parm_set },
    { "set_ext_level", _wrap_rot_caps_set_ext_level_get, _wrap_rot_caps_set_ext_level_set },
    { "get_ext_level", _wrap_rot_caps_get_ext_level_get, _wrap_rot_caps_get_ext_level_set },
    { "set_ext_func", _wrap_rot_caps_set_ext_func_get, _wrap_rot_caps_set_ext_func_set },
    { "get_ext_func", _wrap_rot_caps_get_ext_func_get, _wrap_rot_caps_get_ext_func_set },
    { "set_ext_parm", _wrap_rot_caps_set_ext_parm_get, _wrap_rot_caps_set_ext_parm_set },
    { "get_ext_parm", _wrap_rot_caps_get_ext_parm_get, _wrap_rot_caps_get_ext_parm_set },
    { "get_status", _wrap_rot_caps_get_status_get, _wrap_rot_caps_get_status_set },
    { "get_conf2", _wrap_rot_caps_get_conf2_get, _wrap_rot_caps_get_conf2_set },
    {0,0,0}
};
static swig_lua_method swig_rot_caps_methods[]= {
    {0,0}
};
static swig_lua_method swig_rot_caps_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_rot_caps_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_rot_caps_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_rot_caps_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_rot_caps_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_rot_caps_Sf_SwigStatic = {
    "rot_caps",
    swig_rot_caps_Sf_SwigStatic_methods,
    swig_rot_caps_Sf_SwigStatic_attributes,
    swig_rot_caps_Sf_SwigStatic_constants,
    swig_rot_caps_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_rot_caps_bases[] = {0};
static const char *swig_rot_caps_base_names[] = {0};
static swig_lua_class _wrap_class_rot_caps = { "rot_caps", "rot_caps", &SWIGTYPE_p_rot_caps,_proxy__wrap_new_rot_caps, swig_delete_rot_caps, swig_rot_caps_methods, swig_rot_caps_attributes, &swig_rot_caps_Sf_SwigStatic, swig_rot_caps_meta, swig_rot_caps_bases, swig_rot_caps_base_names };

static int _wrap_qrb(lua_State* L) {
  int SWIG_arg = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double *arg5 = 0 ;
  double *arg6 = 0 ;
  double temp5 ;
  double temp6 ;
  int result;
  
  arg5 = &temp5; 
  arg6 = &temp6; 
  SWIG_check_num_args("qrb",4,4)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("qrb",1,"double");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("qrb",2,"double");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("qrb",3,"double");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("qrb",4,"double");
  arg1 = (double)lua_tonumber(L, 1);
  arg2 = (double)lua_tonumber(L, 2);
  arg3 = (double)lua_tonumber(L, 3);
  arg4 = (double)lua_tonumber(L, 4);
  result = (int)qrb(arg1,arg2,arg3,arg4,arg5,arg6);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_distance_long_path(lua_State* L) {
  int SWIG_arg = 0;
  double arg1 ;
  double result;
  
  SWIG_check_num_args("distance_long_path",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("distance_long_path",1,"double");
  arg1 = (double)lua_tonumber(L, 1);
  result = (double)distance_long_path(arg1);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_azimuth_long_path(lua_State* L) {
  int SWIG_arg = 0;
  double arg1 ;
  double result;
  
  SWIG_check_num_args("azimuth_long_path",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("azimuth_long_path",1,"double");
  arg1 = (double)lua_tonumber(L, 1);
  result = (double)azimuth_long_path(arg1);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_dms2dec(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  int arg2 ;
  double arg3 ;
  int arg4 ;
  double result;
  
  SWIG_check_num_args("dms2dec",4,4)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("dms2dec",1,"int");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("dms2dec",2,"int");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("dms2dec",3,"double");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("dms2dec",4,"int");
  arg1 = (int)lua_tonumber(L, 1);
  arg2 = (int)lua_tonumber(L, 2);
  arg3 = (double)lua_tonumber(L, 3);
  arg4 = (int)lua_tonumber(L, 4);
  result = (double)dms2dec(arg1,arg2,arg3,arg4);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_dec2dms(lua_State* L) {
  int SWIG_arg = 0;
  double arg1 ;
  int *arg2 = 0 ;
  int *arg3 = 0 ;
  double *arg4 = 0 ;
  int *arg5 = 0 ;
  int temp2 ;
  int temp3 ;
  double temp4 ;
  int temp5 ;
  int result;
  
  arg2 = &temp2; 
  arg3 = &temp3; 
  arg4 = &temp4; 
  arg5 = &temp5; 
  SWIG_check_num_args("dec2dms",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("dec2dms",1,"double");
  arg1 = (double)lua_tonumber(L, 1);
  result = (int)dec2dms(arg1,arg2,arg3,arg4,arg5);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_dec2dmmm(lua_State* L) {
  int SWIG_arg = 0;
  double arg1 ;
  int *arg2 = 0 ;
  double *arg3 = 0 ;
  int *arg4 = 0 ;
  int temp2 ;
  double temp3 ;
  int temp4 ;
  int result;
  
  arg2 = &temp2; 
  arg3 = &temp3; 
  arg4 = &temp4; 
  SWIG_check_num_args("dec2dmmm",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("dec2dmmm",1,"double");
  arg1 = (double)lua_tonumber(L, 1);
  result = (int)dec2dmmm(arg1,arg2,arg3,arg4);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_dmmm2dec(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  double arg2 ;
  int arg3 ;
  double result;
  
  SWIG_check_num_args("dmmm2dec",3,3)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("dmmm2dec",1,"int");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("dmmm2dec",2,"double");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("dmmm2dec",3,"int");
  arg1 = (int)lua_tonumber(L, 1);
  arg2 = (double)lua_tonumber(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  result = (double)dmmm2dec(arg1,arg2,arg3);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_min_az_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  azimuth_t arg2 ;
  
  SWIG_check_num_args("rot_state::min_az",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::min_az",1,"struct rot_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_state::min_az",2,"azimuth_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_min_az_set",1,SWIGTYPE_p_rot_state);
  }
  
  arg2 = (azimuth_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->min_az = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_min_az_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  azimuth_t result;
  
  SWIG_check_num_args("rot_state::min_az",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::min_az",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_min_az_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (azimuth_t) ((arg1)->min_az);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_max_az_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  azimuth_t arg2 ;
  
  SWIG_check_num_args("rot_state::max_az",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::max_az",1,"struct rot_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_state::max_az",2,"azimuth_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_max_az_set",1,SWIGTYPE_p_rot_state);
  }
  
  arg2 = (azimuth_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->max_az = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_max_az_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  azimuth_t result;
  
  SWIG_check_num_args("rot_state::max_az",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::max_az",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_max_az_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (azimuth_t) ((arg1)->max_az);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_min_el_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  elevation_t arg2 ;
  
  SWIG_check_num_args("rot_state::min_el",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::min_el",1,"struct rot_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_state::min_el",2,"elevation_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_min_el_set",1,SWIGTYPE_p_rot_state);
  }
  
  arg2 = (elevation_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->min_el = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_min_el_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  elevation_t result;
  
  SWIG_check_num_args("rot_state::min_el",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::min_el",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_min_el_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (elevation_t) ((arg1)->min_el);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_max_el_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  elevation_t arg2 ;
  
  SWIG_check_num_args("rot_state::max_el",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::max_el",1,"struct rot_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_state::max_el",2,"elevation_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_max_el_set",1,SWIGTYPE_p_rot_state);
  }
  
  arg2 = (elevation_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->max_el = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_max_el_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  elevation_t result;
  
  SWIG_check_num_args("rot_state::max_el",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::max_el",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_max_el_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (elevation_t) ((arg1)->max_el);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_south_zero_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rot_state::south_zero",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::south_zero",1,"struct rot_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_state::south_zero",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_south_zero_set",1,SWIGTYPE_p_rot_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->south_zero = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_south_zero_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rot_state::south_zero",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::south_zero",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_south_zero_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (int) ((arg1)->south_zero);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_az_offset_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  azimuth_t arg2 ;
  
  SWIG_check_num_args("rot_state::az_offset",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::az_offset",1,"struct rot_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_state::az_offset",2,"azimuth_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_az_offset_set",1,SWIGTYPE_p_rot_state);
  }
  
  arg2 = (azimuth_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->az_offset = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_az_offset_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  azimuth_t result;
  
  SWIG_check_num_args("rot_state::az_offset",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::az_offset",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_az_offset_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (azimuth_t) ((arg1)->az_offset);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_el_offset_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  elevation_t arg2 ;
  
  SWIG_check_num_args("rot_state::el_offset",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::el_offset",1,"struct rot_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_state::el_offset",2,"elevation_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_el_offset_set",1,SWIGTYPE_p_rot_state);
  }
  
  arg2 = (elevation_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->el_offset = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_el_offset_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  elevation_t result;
  
  SWIG_check_num_args("rot_state::el_offset",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::el_offset",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_el_offset_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (elevation_t) ((arg1)->el_offset);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_has_get_func_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rot_state::has_get_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::has_get_func",1,"struct rot_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_state::has_get_func",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_has_get_func_set",1,SWIGTYPE_p_rot_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_get_func = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_has_get_func_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rot_state::has_get_func",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::has_get_func",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_has_get_func_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (setting_t) ((arg1)->has_get_func);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_has_set_func_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rot_state::has_set_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::has_set_func",1,"struct rot_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_state::has_set_func",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_has_set_func_set",1,SWIGTYPE_p_rot_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_set_func = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_has_set_func_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rot_state::has_set_func",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::has_set_func",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_has_set_func_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (setting_t) ((arg1)->has_set_func);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_has_get_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rot_state::has_get_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::has_get_level",1,"struct rot_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_state::has_get_level",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_has_get_level_set",1,SWIGTYPE_p_rot_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_get_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_has_get_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rot_state::has_get_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::has_get_level",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_has_get_level_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (setting_t) ((arg1)->has_get_level);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_has_set_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rot_state::has_set_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::has_set_level",1,"struct rot_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_state::has_set_level",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_has_set_level_set",1,SWIGTYPE_p_rot_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_set_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_has_set_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rot_state::has_set_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::has_set_level",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_has_set_level_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (setting_t) ((arg1)->has_set_level);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_has_get_parm_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rot_state::has_get_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::has_get_parm",1,"struct rot_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_state::has_get_parm",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_has_get_parm_set",1,SWIGTYPE_p_rot_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_get_parm = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_has_get_parm_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rot_state::has_get_parm",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::has_get_parm",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_has_get_parm_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (setting_t) ((arg1)->has_get_parm);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_has_set_parm_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("rot_state::has_set_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::has_set_parm",1,"struct rot_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_state::has_set_parm",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_has_set_parm_set",1,SWIGTYPE_p_rot_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_set_parm = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_has_set_parm_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("rot_state::has_set_parm",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::has_set_parm",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_has_set_parm_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (setting_t) ((arg1)->has_set_parm);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_has_status_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  rot_status_t arg2 ;
  
  SWIG_check_num_args("rot_state::has_status",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::has_status",1,"struct rot_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_state::has_status",2,"rot_status_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_has_status_set",1,SWIGTYPE_p_rot_state);
  }
  
  arg2 = (rot_status_t)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_status = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_has_status_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  rot_status_t result;
  
  SWIG_check_num_args("rot_state::has_status",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::has_status",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_has_status_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (rot_status_t) ((arg1)->has_status);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_level_gran_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  gran_t *arg2 = (gran_t *)0 ;
  
  SWIG_check_num_args("rot_state::level_gran",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::level_gran",1,"struct rot_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_state::level_gran",2,"gran_t [64]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_level_gran_set",1,SWIGTYPE_p_rot_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_gran,0))){
    SWIG_fail_ptr("rot_state_level_gran_set",2,SWIGTYPE_p_gran);
  }
  
  {
    size_t ii;
    gran_t *b = (gran_t *) arg1->level_gran;
    for (ii = 0; ii < (size_t)64; ii++) b[ii] = *((gran_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_level_gran_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  gran_t *result = 0 ;
  
  SWIG_check_num_args("rot_state::level_gran",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::level_gran",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_level_gran_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (gran_t *)(gran_t *) ((arg1)->level_gran);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_gran,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_parm_gran_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  gran_t *arg2 = (gran_t *)0 ;
  
  SWIG_check_num_args("rot_state::parm_gran",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::parm_gran",1,"struct rot_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_state::parm_gran",2,"gran_t [64]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_parm_gran_set",1,SWIGTYPE_p_rot_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_gran,0))){
    SWIG_fail_ptr("rot_state_parm_gran_set",2,SWIGTYPE_p_gran);
  }
  
  {
    size_t ii;
    gran_t *b = (gran_t *) arg1->parm_gran;
    for (ii = 0; ii < (size_t)64; ii++) b[ii] = *((gran_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_parm_gran_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  gran_t *result = 0 ;
  
  SWIG_check_num_args("rot_state::parm_gran",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::parm_gran",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_parm_gran_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (gran_t *)(gran_t *) ((arg1)->parm_gran);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_gran,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_comm_state_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rot_state::comm_state",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::comm_state",1,"struct rot_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_state::comm_state",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_comm_state_set",1,SWIGTYPE_p_rot_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->comm_state = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_comm_state_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rot_state::comm_state",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::comm_state",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_comm_state_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (int) ((arg1)->comm_state);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_priv_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("rot_state::priv",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::priv",1,"struct rot_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_state::priv",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_priv_set",1,SWIGTYPE_p_rot_state);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"rot_state_priv_set");
  if (arg1) (arg1)->priv = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_priv_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("rot_state::priv",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::priv",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_priv_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (void *) ((arg1)->priv);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_obj_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("rot_state::obj",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::obj",1,"struct rot_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_state::obj",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_obj_set",1,SWIGTYPE_p_rot_state);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"rot_state_obj_set");
  if (arg1) (arg1)->obj = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_obj_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("rot_state::obj",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::obj",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_obj_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (void *) ((arg1)->obj);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_current_speed_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("rot_state::current_speed",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::current_speed",1,"struct rot_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("rot_state::current_speed",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_current_speed_set",1,SWIGTYPE_p_rot_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->current_speed = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_current_speed_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("rot_state::current_speed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::current_speed",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_current_speed_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (int) ((arg1)->current_speed);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_rotport_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  hamlib_port_t arg2 ;
  hamlib_port_t *argp2 ;
  
  SWIG_check_num_args("rot_state::rotport",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::rotport",1,"struct rot_state *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("rot_state::rotport",2,"hamlib_port_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_rotport_set",1,SWIGTYPE_p_rot_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_hamlib_port,0))){
    SWIG_fail_ptr("rot_state_rotport_set",2,SWIGTYPE_p_hamlib_port);
  }
  arg2 = *argp2;
  
  if (arg1) (arg1)->rotport = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_rotport_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  hamlib_port_t result;
  
  SWIG_check_num_args("rot_state::rotport",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::rotport",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_rotport_get",1,SWIGTYPE_p_rot_state);
  }
  
  result =  ((arg1)->rotport);
  {
    hamlib_port_t * resultptr;
    resultptr = (hamlib_port_t *) malloc(sizeof(hamlib_port_t));
    memmove(resultptr, &result, sizeof(hamlib_port_t));
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_hamlib_port,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_rotport2_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  hamlib_port_t arg2 ;
  hamlib_port_t *argp2 ;
  
  SWIG_check_num_args("rot_state::rotport2",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::rotport2",1,"struct rot_state *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("rot_state::rotport2",2,"hamlib_port_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_rotport2_set",1,SWIGTYPE_p_rot_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_hamlib_port,0))){
    SWIG_fail_ptr("rot_state_rotport2_set",2,SWIGTYPE_p_hamlib_port);
  }
  arg2 = *argp2;
  
  if (arg1) (arg1)->rotport2 = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_rotport2_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  hamlib_port_t result;
  
  SWIG_check_num_args("rot_state::rotport2",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::rotport2",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_rotport2_get",1,SWIGTYPE_p_rot_state);
  }
  
  result =  ((arg1)->rotport2);
  {
    hamlib_port_t * resultptr;
    resultptr = (hamlib_port_t *) malloc(sizeof(hamlib_port_t));
    memmove(resultptr, &result, sizeof(hamlib_port_t));
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_hamlib_port,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_pstrotator_handler_priv_data_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  void **arg2 = 0 ;
  
  SWIG_check_num_args("rot_state::pstrotator_handler_priv_data",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::pstrotator_handler_priv_data",1,"struct rot_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_state::pstrotator_handler_priv_data",2,"void **");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_pstrotator_handler_priv_data_set",1,SWIGTYPE_p_rot_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_p_void,0))){
    SWIG_fail_ptr("rot_state_pstrotator_handler_priv_data_set",2,SWIGTYPE_p_p_void);
  }
  
  if (arg1) (arg1)->pstrotator_handler_priv_data = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_pstrotator_handler_priv_data_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  void **result = 0 ;
  
  SWIG_check_num_args("rot_state::pstrotator_handler_priv_data",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::pstrotator_handler_priv_data",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_pstrotator_handler_priv_data_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (void **) ((arg1)->pstrotator_handler_priv_data);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_config_queue_set(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  deferred_config_header_t *arg2 = 0 ;
  
  SWIG_check_num_args("rot_state::config_queue",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::config_queue",1,"struct rot_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("rot_state::config_queue",2,"deferred_config_header_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_config_queue_set",1,SWIGTYPE_p_rot_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_deferred_config_header,0))){
    SWIG_fail_ptr("rot_state_config_queue_set",2,SWIGTYPE_p_deferred_config_header);
  }
  
  if (arg1) (arg1)->config_queue = *arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_rot_state_config_queue_get(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *arg1 = 0 ;
  deferred_config_header_t *result = 0 ;
  
  SWIG_check_num_args("rot_state::config_queue",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rot_state::config_queue",1,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_rot_state,0))){
    SWIG_fail_ptr("rot_state_config_queue_get",1,SWIGTYPE_p_rot_state);
  }
  
  result = (deferred_config_header_t *)& ((arg1)->config_queue);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_deferred_config_header,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_rot_state(lua_State* L) {
  int SWIG_arg = 0;
  struct rot_state *result = 0 ;
  
  SWIG_check_num_args("rot_state::rot_state",0,0)
  result = (struct rot_state *)calloc(1, sizeof(struct rot_state));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_rot_state,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_rot_state(void *obj) {
struct rot_state *arg1 = (struct rot_state *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_rot_state(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_rot_state);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_rot_state_attributes[] = {
    { "min_az", _wrap_rot_state_min_az_get, _wrap_rot_state_min_az_set },
    { "max_az", _wrap_rot_state_max_az_get, _wrap_rot_state_max_az_set },
    { "min_el", _wrap_rot_state_min_el_get, _wrap_rot_state_min_el_set },
    { "max_el", _wrap_rot_state_max_el_get, _wrap_rot_state_max_el_set },
    { "south_zero", _wrap_rot_state_south_zero_get, _wrap_rot_state_south_zero_set },
    { "az_offset", _wrap_rot_state_az_offset_get, _wrap_rot_state_az_offset_set },
    { "el_offset", _wrap_rot_state_el_offset_get, _wrap_rot_state_el_offset_set },
    { "has_get_func", _wrap_rot_state_has_get_func_get, _wrap_rot_state_has_get_func_set },
    { "has_set_func", _wrap_rot_state_has_set_func_get, _wrap_rot_state_has_set_func_set },
    { "has_get_level", _wrap_rot_state_has_get_level_get, _wrap_rot_state_has_get_level_set },
    { "has_set_level", _wrap_rot_state_has_set_level_get, _wrap_rot_state_has_set_level_set },
    { "has_get_parm", _wrap_rot_state_has_get_parm_get, _wrap_rot_state_has_get_parm_set },
    { "has_set_parm", _wrap_rot_state_has_set_parm_get, _wrap_rot_state_has_set_parm_set },
    { "has_status", _wrap_rot_state_has_status_get, _wrap_rot_state_has_status_set },
    { "level_gran", _wrap_rot_state_level_gran_get, _wrap_rot_state_level_gran_set },
    { "parm_gran", _wrap_rot_state_parm_gran_get, _wrap_rot_state_parm_gran_set },
    { "comm_state", _wrap_rot_state_comm_state_get, _wrap_rot_state_comm_state_set },
    { "priv", _wrap_rot_state_priv_get, _wrap_rot_state_priv_set },
    { "obj", _wrap_rot_state_obj_get, _wrap_rot_state_obj_set },
    { "current_speed", _wrap_rot_state_current_speed_get, _wrap_rot_state_current_speed_set },
    { "rotport", _wrap_rot_state_rotport_get, _wrap_rot_state_rotport_set },
    { "rotport2", _wrap_rot_state_rotport2_get, _wrap_rot_state_rotport2_set },
    { "pstrotator_handler_priv_data", _wrap_rot_state_pstrotator_handler_priv_data_get, _wrap_rot_state_pstrotator_handler_priv_data_set },
    { "config_queue", _wrap_rot_state_config_queue_get, _wrap_rot_state_config_queue_set },
    {0,0,0}
};
static swig_lua_method swig_rot_state_methods[]= {
    {0,0}
};
static swig_lua_method swig_rot_state_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_rot_state_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_rot_state_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_rot_state_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_rot_state_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_rot_state_Sf_SwigStatic = {
    "rot_state",
    swig_rot_state_Sf_SwigStatic_methods,
    swig_rot_state_Sf_SwigStatic_attributes,
    swig_rot_state_Sf_SwigStatic_constants,
    swig_rot_state_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_rot_state_bases[] = {0};
static const char *swig_rot_state_base_names[] = {0};
static swig_lua_class _wrap_class_rot_state = { "rot_state", "rot_state", &SWIGTYPE_p_rot_state,_proxy__wrap_new_rot_state, swig_delete_rot_state, swig_rot_state_methods, swig_rot_state_attributes, &swig_rot_state_Sf_SwigStatic, swig_rot_state_meta, swig_rot_state_bases, swig_rot_state_base_names };

static int _wrap_Rot_rot_set(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  ROT *arg2 = 0 ;
  
  SWIG_check_num_args("Rot::rot",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::rot",1,"struct Rot *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Rot::rot",2,"ROT *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_rot_set",1,SWIGTYPE_p_Rot);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_s_rot,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("Rot_rot_set",2,SWIGTYPE_p_s_rot);
  }
  
  if (arg1) (arg1)->rot = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_rot_get(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  ROT *result = 0 ;
  
  SWIG_check_num_args("Rot::rot",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::rot",1,"struct Rot *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_rot_get",1,SWIGTYPE_p_Rot);
  }
  
  result = (ROT *) ((arg1)->rot);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_s_rot,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_caps_set(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  struct rot_caps *arg2 = 0 ;
  
  SWIG_check_num_args("Rot::caps",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::caps",1,"struct Rot *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Rot::caps",2,"struct rot_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_caps_set",1,SWIGTYPE_p_Rot);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_rot_caps,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("Rot_caps_set",2,SWIGTYPE_p_rot_caps);
  }
  
  if (arg1) (arg1)->caps = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_caps_get(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  struct rot_caps *result = 0 ;
  
  SWIG_check_num_args("Rot::caps",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::caps",1,"struct Rot *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_caps_get",1,SWIGTYPE_p_Rot);
  }
  
  result = (struct rot_caps *) ((arg1)->caps);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_rot_caps,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_state_set(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  struct rot_state *arg2 = 0 ;
  
  SWIG_check_num_args("Rot::state",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::state",1,"struct Rot *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Rot::state",2,"struct rot_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_state_set",1,SWIGTYPE_p_Rot);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_rot_state,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("Rot_state_set",2,SWIGTYPE_p_rot_state);
  }
  
  if (arg1) (arg1)->state = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_state_get(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  struct rot_state *result = 0 ;
  
  SWIG_check_num_args("Rot::state",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::state",1,"struct Rot *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_state_get",1,SWIGTYPE_p_Rot);
  }
  
  result = (struct rot_state *) ((arg1)->state);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_rot_state,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_error_status_set(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("Rot::error_status",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::error_status",1,"struct Rot *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rot::error_status",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_error_status_set",1,SWIGTYPE_p_Rot);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->error_status = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_error_status_get(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("Rot::error_status",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::error_status",1,"struct Rot *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_error_status_get",1,SWIGTYPE_p_Rot);
  }
  
  result = (int) ((arg1)->error_status);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_do_exception_set(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("Rot::do_exception",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::do_exception",1,"struct Rot *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rot::do_exception",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_do_exception_set",1,SWIGTYPE_p_Rot);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->do_exception = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_do_exception_get(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("Rot::do_exception",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::do_exception",1,"struct Rot *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_do_exception_get",1,SWIGTYPE_p_Rot);
  }
  
  result = (int) ((arg1)->do_exception);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_Rot(lua_State* L) {
  int SWIG_arg = 0;
  rot_model_t arg1 ;
  struct Rot *result = 0 ;
  
  SWIG_check_num_args("Rot::Rot",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Rot::Rot",1,"rot_model_t");
  arg1 = (rot_model_t)lua_tonumber(L, 1);
  result = (struct Rot *)new_Rot(arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Rot,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_open(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  
  SWIG_check_num_args("Rot::open",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::open",1,"struct Rot *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_open",1,SWIGTYPE_p_Rot);
  }
  
  {
    arg1->error_status = RIG_OK;
    Rot_open(arg1);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_close(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  
  SWIG_check_num_args("Rot::close",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::close",1,"struct Rot *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_close",1,SWIGTYPE_p_Rot);
  }
  
  {
    arg1->error_status = RIG_OK;
    Rot_close(arg1);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_set_ext_func(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  hamlib_token_t arg2 ;
  int arg3 ;
  
  SWIG_check_num_args("Rot::set_ext_func",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::set_ext_func",1,"struct Rot *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rot::set_ext_func",2,"hamlib_token_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rot::set_ext_func",3,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_set_ext_func",1,SWIGTYPE_p_Rot);
  }
  
  arg2 = (hamlib_token_t)lua_tonumber(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rot_set_ext_func(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_set_ext_level(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  hamlib_token_t arg2 ;
  value_t arg3 ;
  value_t *argp3 ;
  
  SWIG_check_num_args("Rot::set_ext_level",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::set_ext_level",1,"struct Rot *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rot::set_ext_level",2,"hamlib_token_t");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Rot::set_ext_level",3,"value_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_set_ext_level",1,SWIGTYPE_p_Rot);
  }
  
  arg2 = (hamlib_token_t)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("Rot_set_ext_level",3,SWIGTYPE_p_value_t);
  }
  arg3 = *argp3;
  
  {
    arg1->error_status = RIG_OK;
    Rot_set_ext_level(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_set_ext_parm(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  hamlib_token_t arg2 ;
  value_t arg3 ;
  value_t *argp3 ;
  
  SWIG_check_num_args("Rot::set_ext_parm",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::set_ext_parm",1,"struct Rot *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rot::set_ext_parm",2,"hamlib_token_t");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Rot::set_ext_parm",3,"value_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_set_ext_parm",1,SWIGTYPE_p_Rot);
  }
  
  arg2 = (hamlib_token_t)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("Rot_set_ext_parm",3,SWIGTYPE_p_value_t);
  }
  arg3 = *argp3;
  
  {
    arg1->error_status = RIG_OK;
    Rot_set_ext_parm(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_set_func(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  setting_t arg2 ;
  int arg3 ;
  
  SWIG_check_num_args("Rot::set_func",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::set_func",1,"struct Rot *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rot::set_func",2,"setting_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rot::set_func",3,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_set_func",1,SWIGTYPE_p_Rot);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rot_set_func(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_set_level(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  setting_t arg2 ;
  value_t arg3 ;
  value_t *argp3 ;
  
  SWIG_check_num_args("Rot::set_level",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::set_level",1,"struct Rot *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rot::set_level",2,"setting_t");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Rot::set_level",3,"value_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_set_level",1,SWIGTYPE_p_Rot);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("Rot_set_level",3,SWIGTYPE_p_value_t);
  }
  arg3 = *argp3;
  
  {
    arg1->error_status = RIG_OK;
    Rot_set_level(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_set_parm(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  setting_t arg2 ;
  value_t arg3 ;
  value_t *argp3 ;
  
  SWIG_check_num_args("Rot::set_parm",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::set_parm",1,"struct Rot *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rot::set_parm",2,"setting_t");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Rot::set_parm",3,"value_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_set_parm",1,SWIGTYPE_p_Rot);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("Rot_set_parm",3,SWIGTYPE_p_value_t);
  }
  arg3 = *argp3;
  
  {
    arg1->error_status = RIG_OK;
    Rot_set_parm(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_set_position(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  azimuth_t arg2 ;
  elevation_t arg3 ;
  
  SWIG_check_num_args("Rot::set_position",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::set_position",1,"struct Rot *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rot::set_position",2,"azimuth_t");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rot::set_position",3,"elevation_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_set_position",1,SWIGTYPE_p_Rot);
  }
  
  arg2 = (azimuth_t)lua_tonumber(L, 2);
  arg3 = (elevation_t)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rot_set_position(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_get_position(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  azimuth_t *arg2 = 0 ;
  elevation_t *arg3 = 0 ;
  azimuth_t temp2 ;
  elevation_t temp3 ;
  
  arg2 = &temp2; 
  arg3 = &temp3; 
  SWIG_check_num_args("Rot::get_position",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::get_position",1,"struct Rot *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_get_position",1,SWIGTYPE_p_Rot);
  }
  
  {
    arg1->error_status = RIG_OK;
    Rot_get_position(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_stop(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  
  SWIG_check_num_args("Rot::stop",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::stop",1,"struct Rot *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_stop",1,SWIGTYPE_p_Rot);
  }
  
  {
    arg1->error_status = RIG_OK;
    Rot_stop(arg1);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_park(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  
  SWIG_check_num_args("Rot::park",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::park",1,"struct Rot *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_park",1,SWIGTYPE_p_Rot);
  }
  
  {
    arg1->error_status = RIG_OK;
    Rot_park(arg1);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_reset(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  rot_reset_t arg2 ;
  
  SWIG_check_num_args("Rot::reset",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::reset",1,"struct Rot *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rot::reset",2,"rot_reset_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_reset",1,SWIGTYPE_p_Rot);
  }
  
  arg2 = (rot_reset_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rot_reset(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_move(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  
  SWIG_check_num_args("Rot::move",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::move",1,"struct Rot *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rot::move",2,"int");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Rot::move",3,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_move",1,SWIGTYPE_p_Rot);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rot_move(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_token_lookup(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  const_char_string arg2 = 0 ;
  
  SWIG_check_num_args("Rot::token_lookup",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::token_lookup",1,"struct Rot *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Rot::token_lookup",2,"const_char_string");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_token_lookup",1,SWIGTYPE_p_Rot);
  }
  
  arg2 = (const_char_string)lua_tostring(L, 2);
  {
    arg1->error_status = RIG_OK;
    Rot_token_lookup(arg1,(char const *)arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_set_conf__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = 0 ;
  
  SWIG_check_num_args("Rot::set_conf",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::set_conf",1,"struct Rot *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Rot::set_conf",2,"char const *");
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("Rot::set_conf",3,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_set_conf",1,SWIGTYPE_p_Rot);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  arg3 = (char *)lua_tostring(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rot_set_conf__SWIG_0(arg1,(char const *)arg2,(char const *)arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_set_conf__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  hamlib_token_t arg2 ;
  const_char_string arg3 = 0 ;
  
  SWIG_check_num_args("Rot::set_conf",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::set_conf",1,"struct Rot *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rot::set_conf",2,"hamlib_token_t");
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("Rot::set_conf",3,"const_char_string");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_set_conf",1,SWIGTYPE_p_Rot);
  }
  
  arg2 = (hamlib_token_t)lua_tonumber(L, 2);
  arg3 = (const_char_string)lua_tostring(L, 3);
  {
    arg1->error_status = RIG_OK;
    Rot_set_conf__SWIG_1(arg1,arg2,(char const *)arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_set_conf(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rot, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = SWIG_lua_isnilstring(L,argv[2]);
        }
        if (_v) {
          return _wrap_Rot_set_conf__SWIG_1(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rot, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        {
          _v = SWIG_lua_isnilstring(L,argv[2]);
        }
        if (_v) {
          return _wrap_Rot_set_conf__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Rot_set_conf'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Rot::set_conf(char const *,char const *)\n"
    "    Rot::set_conf(hamlib_token_t,const_char_string)\n");
  lua_error(L);return 0;
}


static int _wrap_Rot_has_get_func(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  setting_t arg2 ;
  setting_t result;
  
  SWIG_check_num_args("Rot::has_get_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::has_get_func",1,"struct Rot *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rot::has_get_func",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_has_get_func",1,SWIGTYPE_p_Rot);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    result = (setting_t)Rot_has_get_func(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_has_set_func(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  setting_t arg2 ;
  setting_t result;
  
  SWIG_check_num_args("Rot::has_set_func",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::has_set_func",1,"struct Rot *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rot::has_set_func",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_has_set_func",1,SWIGTYPE_p_Rot);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    result = (setting_t)Rot_has_set_func(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_has_get_level(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  setting_t arg2 ;
  setting_t result;
  
  SWIG_check_num_args("Rot::has_get_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::has_get_level",1,"struct Rot *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rot::has_get_level",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_has_get_level",1,SWIGTYPE_p_Rot);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    result = (setting_t)Rot_has_get_level(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_has_set_level(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  setting_t arg2 ;
  setting_t result;
  
  SWIG_check_num_args("Rot::has_set_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::has_set_level",1,"struct Rot *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rot::has_set_level",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_has_set_level",1,SWIGTYPE_p_Rot);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    result = (setting_t)Rot_has_set_level(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_has_get_parm(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  setting_t arg2 ;
  setting_t result;
  
  SWIG_check_num_args("Rot::has_get_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::has_get_parm",1,"struct Rot *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rot::has_get_parm",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_has_get_parm",1,SWIGTYPE_p_Rot);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    result = (setting_t)Rot_has_get_parm(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_has_set_parm(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  setting_t arg2 ;
  setting_t result;
  
  SWIG_check_num_args("Rot::has_set_parm",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::has_set_parm",1,"struct Rot *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rot::has_set_parm",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_has_set_parm",1,SWIGTYPE_p_Rot);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    result = (setting_t)Rot_has_set_parm(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_get_conf__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  hamlib_token_t arg2 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Rot::get_conf",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::get_conf",1,"struct Rot *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Rot::get_conf",2,"hamlib_token_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_get_conf",1,SWIGTYPE_p_Rot);
  }
  
  arg2 = (hamlib_token_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    result = (char *)Rot_get_conf__SWIG_0(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_get_conf__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  char *arg2 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Rot::get_conf",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::get_conf",1,"struct Rot *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Rot::get_conf",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_get_conf",1,SWIGTYPE_p_Rot);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    arg1->error_status = RIG_OK;
    result = (char *)Rot_get_conf__SWIG_1(arg1,(char const *)arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Rot_get_conf(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rot, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_Rot_get_conf__SWIG_0(L);
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Rot, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        return _wrap_Rot_get_conf__SWIG_1(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Rot_get_conf'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Rot::get_conf(hamlib_token_t)\n"
    "    Rot::get_conf(char const *)\n");
  lua_error(L);return 0;
}


static int _wrap_Rot_get_info(lua_State* L) {
  int SWIG_arg = 0;
  struct Rot *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Rot::get_info",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Rot::get_info",1,"struct Rot *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Rot,0))){
    SWIG_fail_ptr("Rot_get_info",1,SWIGTYPE_p_Rot);
  }
  
  {
    arg1->error_status = RIG_OK;
    result = (char *)Rot_get_info(arg1);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_Rot(void *obj) {
struct Rot *arg1 = (struct Rot *) obj;
delete_Rot(arg1);
}
static int _proxy__wrap_new_Rot(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_Rot);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_Rot_attributes[] = {
    { "rot", _wrap_Rot_rot_get, _wrap_Rot_rot_set },
    { "caps", _wrap_Rot_caps_get, _wrap_Rot_caps_set },
    { "state", _wrap_Rot_state_get, _wrap_Rot_state_set },
    { "error_status", _wrap_Rot_error_status_get, _wrap_Rot_error_status_set },
    { "do_exception", _wrap_Rot_do_exception_get, _wrap_Rot_do_exception_set },
    {0,0,0}
};
static swig_lua_method swig_Rot_methods[]= {
    { "open", _wrap_Rot_open},
    { "close", _wrap_Rot_close},
    { "set_ext_func", _wrap_Rot_set_ext_func},
    { "set_ext_level", _wrap_Rot_set_ext_level},
    { "set_ext_parm", _wrap_Rot_set_ext_parm},
    { "set_func", _wrap_Rot_set_func},
    { "set_level", _wrap_Rot_set_level},
    { "set_parm", _wrap_Rot_set_parm},
    { "set_position", _wrap_Rot_set_position},
    { "get_position", _wrap_Rot_get_position},
    { "stop", _wrap_Rot_stop},
    { "park", _wrap_Rot_park},
    { "reset", _wrap_Rot_reset},
    { "move", _wrap_Rot_move},
    { "token_lookup", _wrap_Rot_token_lookup},
    { "set_conf", _wrap_Rot_set_conf},
    { "has_get_func", _wrap_Rot_has_get_func},
    { "has_set_func", _wrap_Rot_has_set_func},
    { "has_get_level", _wrap_Rot_has_get_level},
    { "has_set_level", _wrap_Rot_has_set_level},
    { "has_get_parm", _wrap_Rot_has_get_parm},
    { "has_set_parm", _wrap_Rot_has_set_parm},
    { "get_conf", _wrap_Rot_get_conf},
    { "get_info", _wrap_Rot_get_info},
    {0,0}
};
static swig_lua_method swig_Rot_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_Rot_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_Rot_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_Rot_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_Rot_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_Rot_Sf_SwigStatic = {
    "Rot",
    swig_Rot_Sf_SwigStatic_methods,
    swig_Rot_Sf_SwigStatic_attributes,
    swig_Rot_Sf_SwigStatic_constants,
    swig_Rot_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_Rot_bases[] = {0};
static const char *swig_Rot_base_names[] = {0};
static swig_lua_class _wrap_class_Rot = { "Rot", "Rot", &SWIGTYPE_p_Rot,_proxy__wrap_new_Rot, swig_delete_Rot, swig_Rot_methods, swig_Rot_attributes, &swig_Rot_Sf_SwigStatic, swig_Rot_meta, swig_Rot_bases, swig_Rot_base_names };

static int _wrap_amp_caps_amp_model_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  amp_model_t arg2 ;
  
  SWIG_check_num_args("amp_caps::amp_model",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::amp_model",1,"struct amp_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_caps::amp_model",2,"amp_model_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_amp_model_set",1,SWIGTYPE_p_amp_caps);
  }
  
  arg2 = (amp_model_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->amp_model = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_amp_model_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  amp_model_t result;
  
  SWIG_check_num_args("amp_caps::amp_model",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::amp_model",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_amp_model_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (amp_model_t) ((arg1)->amp_model);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_model_name_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("amp_caps::model_name",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::model_name",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_model_name_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (char *) ((arg1)->model_name);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_mfg_name_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("amp_caps::mfg_name",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::mfg_name",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_mfg_name_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (char *) ((arg1)->mfg_name);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_version_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("amp_caps::version",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::version",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_version_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (char *) ((arg1)->version);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_copyright_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("amp_caps::copyright",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::copyright",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_copyright_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (char *) ((arg1)->copyright);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_status_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  enum rig_status_e arg2 ;
  
  SWIG_check_num_args("amp_caps::status",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::status",1,"struct amp_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_caps::status",2,"enum rig_status_e");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_status_set",1,SWIGTYPE_p_amp_caps);
  }
  
  arg2 = (enum rig_status_e)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->status = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_status_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  enum rig_status_e result;
  
  SWIG_check_num_args("amp_caps::status",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::status",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_status_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (enum rig_status_e) ((arg1)->status);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_amp_type_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("amp_caps::amp_type",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::amp_type",1,"struct amp_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_caps::amp_type",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_amp_type_set",1,SWIGTYPE_p_amp_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->amp_type = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_amp_type_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("amp_caps::amp_type",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::amp_type",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_amp_type_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int) ((arg1)->amp_type);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_port_type_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  enum rig_port_e arg2 ;
  
  SWIG_check_num_args("amp_caps::port_type",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::port_type",1,"struct amp_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_caps::port_type",2,"enum rig_port_e");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_port_type_set",1,SWIGTYPE_p_amp_caps);
  }
  
  arg2 = (enum rig_port_e)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->port_type = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_port_type_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  enum rig_port_e result;
  
  SWIG_check_num_args("amp_caps::port_type",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::port_type",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_port_type_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (enum rig_port_e) ((arg1)->port_type);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_serial_rate_min_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("amp_caps::serial_rate_min",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::serial_rate_min",1,"struct amp_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_caps::serial_rate_min",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_serial_rate_min_set",1,SWIGTYPE_p_amp_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_rate_min = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_serial_rate_min_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("amp_caps::serial_rate_min",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::serial_rate_min",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_serial_rate_min_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int) ((arg1)->serial_rate_min);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_serial_rate_max_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("amp_caps::serial_rate_max",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::serial_rate_max",1,"struct amp_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_caps::serial_rate_max",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_serial_rate_max_set",1,SWIGTYPE_p_amp_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_rate_max = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_serial_rate_max_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("amp_caps::serial_rate_max",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::serial_rate_max",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_serial_rate_max_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int) ((arg1)->serial_rate_max);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_serial_data_bits_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("amp_caps::serial_data_bits",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::serial_data_bits",1,"struct amp_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_caps::serial_data_bits",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_serial_data_bits_set",1,SWIGTYPE_p_amp_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_data_bits = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_serial_data_bits_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("amp_caps::serial_data_bits",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::serial_data_bits",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_serial_data_bits_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int) ((arg1)->serial_data_bits);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_serial_stop_bits_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("amp_caps::serial_stop_bits",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::serial_stop_bits",1,"struct amp_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_caps::serial_stop_bits",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_serial_stop_bits_set",1,SWIGTYPE_p_amp_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_stop_bits = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_serial_stop_bits_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("amp_caps::serial_stop_bits",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::serial_stop_bits",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_serial_stop_bits_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int) ((arg1)->serial_stop_bits);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_serial_parity_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  enum serial_parity_e arg2 ;
  
  SWIG_check_num_args("amp_caps::serial_parity",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::serial_parity",1,"struct amp_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_caps::serial_parity",2,"enum serial_parity_e");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_serial_parity_set",1,SWIGTYPE_p_amp_caps);
  }
  
  arg2 = (enum serial_parity_e)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_parity = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_serial_parity_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  enum serial_parity_e result;
  
  SWIG_check_num_args("amp_caps::serial_parity",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::serial_parity",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_serial_parity_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (enum serial_parity_e) ((arg1)->serial_parity);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_serial_handshake_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  enum serial_handshake_e arg2 ;
  
  SWIG_check_num_args("amp_caps::serial_handshake",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::serial_handshake",1,"struct amp_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_caps::serial_handshake",2,"enum serial_handshake_e");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_serial_handshake_set",1,SWIGTYPE_p_amp_caps);
  }
  
  arg2 = (enum serial_handshake_e)(int)lua_tonumber(L, 2);
  if (arg1) (arg1)->serial_handshake = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_serial_handshake_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  enum serial_handshake_e result;
  
  SWIG_check_num_args("amp_caps::serial_handshake",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::serial_handshake",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_serial_handshake_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (enum serial_handshake_e) ((arg1)->serial_handshake);
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_write_delay_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("amp_caps::write_delay",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::write_delay",1,"struct amp_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_caps::write_delay",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_write_delay_set",1,SWIGTYPE_p_amp_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->write_delay = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_write_delay_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("amp_caps::write_delay",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::write_delay",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_write_delay_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int) ((arg1)->write_delay);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_post_write_delay_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("amp_caps::post_write_delay",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::post_write_delay",1,"struct amp_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_caps::post_write_delay",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_post_write_delay_set",1,SWIGTYPE_p_amp_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->post_write_delay = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_post_write_delay_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("amp_caps::post_write_delay",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::post_write_delay",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_post_write_delay_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int) ((arg1)->post_write_delay);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_timeout_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("amp_caps::timeout",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::timeout",1,"struct amp_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_caps::timeout",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_timeout_set",1,SWIGTYPE_p_amp_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->timeout = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_timeout_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("amp_caps::timeout",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::timeout",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_timeout_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int) ((arg1)->timeout);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_retry_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("amp_caps::retry",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::retry",1,"struct amp_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_caps::retry",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_retry_set",1,SWIGTYPE_p_amp_caps);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->retry = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_retry_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("amp_caps::retry",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::retry",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_retry_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int) ((arg1)->retry);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_cfgparams_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  struct confparams *arg2 = 0 ;
  
  SWIG_check_num_args("amp_caps::cfgparams",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::cfgparams",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::cfgparams",2,"struct confparams const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_cfgparams_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_confparams,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("amp_caps_cfgparams_set",2,SWIGTYPE_p_confparams);
  }
  
  if (arg1) (arg1)->cfgparams = (struct confparams const *)arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_cfgparams_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  struct confparams *result = 0 ;
  
  SWIG_check_num_args("amp_caps::cfgparams",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::cfgparams",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_cfgparams_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (struct confparams *) ((arg1)->cfgparams);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_confparams,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_priv_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("amp_caps::priv",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::priv",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::priv",2,"void const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_priv_set",1,SWIGTYPE_p_amp_caps);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"amp_caps_priv_set");
  if (arg1) (arg1)->priv = (void const *)arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_priv_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("amp_caps::priv",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::priv",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_priv_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (void *) ((arg1)->priv);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_amp_model_macro_name_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  char *arg2 = 0 ;
  
  SWIG_check_num_args("amp_caps::amp_model_macro_name",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::amp_model_macro_name",1,"struct amp_caps *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("amp_caps::amp_model_macro_name",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_amp_model_macro_name_set",1,SWIGTYPE_p_amp_caps);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    if (arg2) {
      arg1->amp_model_macro_name = (char const *) malloc(strlen((const char *)arg2)+1);
      strcpy((char *)arg1->amp_model_macro_name, (const char *)arg2);
    } else {
      arg1->amp_model_macro_name = 0;
    }
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_amp_model_macro_name_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("amp_caps::amp_model_macro_name",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::amp_model_macro_name",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_amp_model_macro_name_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (char *) ((arg1)->amp_model_macro_name);
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_has_get_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("amp_caps::has_get_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::has_get_level",1,"struct amp_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_caps::has_get_level",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_has_get_level_set",1,SWIGTYPE_p_amp_caps);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_get_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_has_get_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("amp_caps::has_get_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::has_get_level",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_has_get_level_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (setting_t) ((arg1)->has_get_level);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_has_set_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("amp_caps::has_set_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::has_set_level",1,"struct amp_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_caps::has_set_level",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_has_set_level_set",1,SWIGTYPE_p_amp_caps);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_set_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_has_set_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("amp_caps::has_set_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::has_set_level",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_has_set_level_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (setting_t) ((arg1)->has_set_level);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_level_gran_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  gran_t *arg2 = (gran_t *)0 ;
  
  SWIG_check_num_args("amp_caps::level_gran",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::level_gran",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::level_gran",2,"gran_t [64]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_level_gran_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_gran,0))){
    SWIG_fail_ptr("amp_caps_level_gran_set",2,SWIGTYPE_p_gran);
  }
  
  {
    size_t ii;
    gran_t *b = (gran_t *) arg1->level_gran;
    for (ii = 0; ii < (size_t)64; ii++) b[ii] = *((gran_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_level_gran_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  gran_t *result = 0 ;
  
  SWIG_check_num_args("amp_caps::level_gran",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::level_gran",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_level_gran_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (gran_t *)(gran_t *) ((arg1)->level_gran);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_gran,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_parm_gran_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  gran_t *arg2 = (gran_t *)0 ;
  
  SWIG_check_num_args("amp_caps::parm_gran",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::parm_gran",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::parm_gran",2,"gran_t [64]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_parm_gran_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_gran,0))){
    SWIG_fail_ptr("amp_caps_parm_gran_set",2,SWIGTYPE_p_gran);
  }
  
  {
    size_t ii;
    gran_t *b = (gran_t *) arg1->parm_gran;
    for (ii = 0; ii < (size_t)64; ii++) b[ii] = *((gran_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_parm_gran_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  gran_t *result = 0 ;
  
  SWIG_check_num_args("amp_caps::parm_gran",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::parm_gran",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_parm_gran_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (gran_t *)(gran_t *) ((arg1)->parm_gran);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_gran,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_amp_init_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*arg2)(AMP *) = 0 ;
  
  SWIG_check_num_args("amp_caps::amp_init",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::amp_init",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::amp_init",2,"int (*)(AMP *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_amp_init_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_amp__int,0))){
    SWIG_fail_ptr("amp_caps_amp_init_set",2,SWIGTYPE_p_f_p_struct_amp__int);
  }
  
  if (arg1) (arg1)->amp_init = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_amp_init_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*result)(AMP *) = 0 ;
  
  SWIG_check_num_args("amp_caps::amp_init",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::amp_init",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_amp_init_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int (*)(AMP *)) ((arg1)->amp_init);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_amp__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_amp_cleanup_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*arg2)(AMP *) = 0 ;
  
  SWIG_check_num_args("amp_caps::amp_cleanup",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::amp_cleanup",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::amp_cleanup",2,"int (*)(AMP *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_amp_cleanup_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_amp__int,0))){
    SWIG_fail_ptr("amp_caps_amp_cleanup_set",2,SWIGTYPE_p_f_p_struct_amp__int);
  }
  
  if (arg1) (arg1)->amp_cleanup = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_amp_cleanup_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*result)(AMP *) = 0 ;
  
  SWIG_check_num_args("amp_caps::amp_cleanup",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::amp_cleanup",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_amp_cleanup_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int (*)(AMP *)) ((arg1)->amp_cleanup);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_amp__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_amp_open_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*arg2)(AMP *) = 0 ;
  
  SWIG_check_num_args("amp_caps::amp_open",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::amp_open",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::amp_open",2,"int (*)(AMP *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_amp_open_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_amp__int,0))){
    SWIG_fail_ptr("amp_caps_amp_open_set",2,SWIGTYPE_p_f_p_struct_amp__int);
  }
  
  if (arg1) (arg1)->amp_open = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_amp_open_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*result)(AMP *) = 0 ;
  
  SWIG_check_num_args("amp_caps::amp_open",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::amp_open",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_amp_open_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int (*)(AMP *)) ((arg1)->amp_open);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_amp__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_amp_close_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*arg2)(AMP *) = 0 ;
  
  SWIG_check_num_args("amp_caps::amp_close",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::amp_close",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::amp_close",2,"int (*)(AMP *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_amp_close_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_amp__int,0))){
    SWIG_fail_ptr("amp_caps_amp_close_set",2,SWIGTYPE_p_f_p_struct_amp__int);
  }
  
  if (arg1) (arg1)->amp_close = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_amp_close_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*result)(AMP *) = 0 ;
  
  SWIG_check_num_args("amp_caps::amp_close",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::amp_close",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_amp_close_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int (*)(AMP *)) ((arg1)->amp_close);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_amp__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_set_freq_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*arg2)(AMP *,freq_t) = 0 ;
  
  SWIG_check_num_args("amp_caps::set_freq",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::set_freq",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::set_freq",2,"int (*)(AMP *,freq_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_set_freq_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_amp_double__int,0))){
    SWIG_fail_ptr("amp_caps_set_freq_set",2,SWIGTYPE_p_f_p_struct_amp_double__int);
  }
  
  if (arg1) (arg1)->set_freq = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_set_freq_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*result)(AMP *,freq_t) = 0 ;
  
  SWIG_check_num_args("amp_caps::set_freq",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::set_freq",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_set_freq_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int (*)(AMP *,freq_t)) ((arg1)->set_freq);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_amp_double__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_get_freq_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*arg2)(AMP *,freq_t *) = 0 ;
  
  SWIG_check_num_args("amp_caps::get_freq",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::get_freq",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::get_freq",2,"int (*)(AMP *,freq_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_get_freq_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_amp_p_double__int,0))){
    SWIG_fail_ptr("amp_caps_get_freq_set",2,SWIGTYPE_p_f_p_struct_amp_p_double__int);
  }
  
  if (arg1) (arg1)->get_freq = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_get_freq_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*result)(AMP *,freq_t *) = 0 ;
  
  SWIG_check_num_args("amp_caps::get_freq",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::get_freq",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_get_freq_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int (*)(AMP *,freq_t *)) ((arg1)->get_freq);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_amp_p_double__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_set_conf_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*arg2)(AMP *,hamlib_token_t,char const *) = 0 ;
  
  SWIG_check_num_args("amp_caps::set_conf",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::set_conf",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::set_conf",2,"int (*)(AMP *,hamlib_token_t,char const *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_set_conf_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_amp_long_p_q_const__char__int,0))){
    SWIG_fail_ptr("amp_caps_set_conf_set",2,SWIGTYPE_p_f_p_struct_amp_long_p_q_const__char__int);
  }
  
  if (arg1) (arg1)->set_conf = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_set_conf_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*result)(AMP *,hamlib_token_t,char const *) = 0 ;
  
  SWIG_check_num_args("amp_caps::set_conf",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::set_conf",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_set_conf_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int (*)(AMP *,hamlib_token_t,char const *)) ((arg1)->set_conf);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_amp_long_p_q_const__char__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_get_conf2_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*arg2)(AMP *,hamlib_token_t,char *,int) = 0 ;
  
  SWIG_check_num_args("amp_caps::get_conf2",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::get_conf2",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::get_conf2",2,"int (*)(AMP *,hamlib_token_t,char *,int)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_get_conf2_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_amp_long_p_char_int__int,0))){
    SWIG_fail_ptr("amp_caps_get_conf2_set",2,SWIGTYPE_p_f_p_struct_amp_long_p_char_int__int);
  }
  
  if (arg1) (arg1)->get_conf2 = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_get_conf2_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*result)(AMP *,hamlib_token_t,char *,int) = 0 ;
  
  SWIG_check_num_args("amp_caps::get_conf2",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::get_conf2",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_get_conf2_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int (*)(AMP *,hamlib_token_t,char *,int)) ((arg1)->get_conf2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_amp_long_p_char_int__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_get_conf_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*arg2)(AMP *,hamlib_token_t,char *) = 0 ;
  
  SWIG_check_num_args("amp_caps::get_conf",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::get_conf",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::get_conf",2,"int (*)(AMP *,hamlib_token_t,char *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_get_conf_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_amp_long_p_char__int,0))){
    SWIG_fail_ptr("amp_caps_get_conf_set",2,SWIGTYPE_p_f_p_struct_amp_long_p_char__int);
  }
  
  if (arg1) (arg1)->get_conf = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_get_conf_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*result)(AMP *,hamlib_token_t,char *) = 0 ;
  
  SWIG_check_num_args("amp_caps::get_conf",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::get_conf",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_get_conf_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int (*)(AMP *,hamlib_token_t,char *)) ((arg1)->get_conf);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_amp_long_p_char__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_reset_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*arg2)(AMP *,amp_reset_t) = 0 ;
  
  SWIG_check_num_args("amp_caps::reset",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::reset",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::reset",2,"int (*)(AMP *,amp_reset_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_reset_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_amp_enum_amp_reset_e__int,0))){
    SWIG_fail_ptr("amp_caps_reset_set",2,SWIGTYPE_p_f_p_struct_amp_enum_amp_reset_e__int);
  }
  
  if (arg1) (arg1)->reset = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_reset_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*result)(AMP *,amp_reset_t) = 0 ;
  
  SWIG_check_num_args("amp_caps::reset",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::reset",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_reset_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int (*)(AMP *,amp_reset_t)) ((arg1)->reset);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_amp_enum_amp_reset_e__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_get_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*arg2)(AMP *,setting_t,value_t *) = 0 ;
  
  SWIG_check_num_args("amp_caps::get_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::get_level",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::get_level",2,"int (*)(AMP *,setting_t,value_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_get_level_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_amp_unsigned_long_long_p_value_t__int,0))){
    SWIG_fail_ptr("amp_caps_get_level_set",2,SWIGTYPE_p_f_p_struct_amp_unsigned_long_long_p_value_t__int);
  }
  
  if (arg1) (arg1)->get_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_get_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*result)(AMP *,setting_t,value_t *) = 0 ;
  
  SWIG_check_num_args("amp_caps::get_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::get_level",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_get_level_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int (*)(AMP *,setting_t,value_t *)) ((arg1)->get_level);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_amp_unsigned_long_long_p_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_set_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*arg2)(AMP *,setting_t,value_t) = 0 ;
  
  SWIG_check_num_args("amp_caps::set_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::set_level",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::set_level",2,"int (*)(AMP *,setting_t,value_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_set_level_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_amp_unsigned_long_long_value_t__int,0))){
    SWIG_fail_ptr("amp_caps_set_level_set",2,SWIGTYPE_p_f_p_struct_amp_unsigned_long_long_value_t__int);
  }
  
  if (arg1) (arg1)->set_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_set_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*result)(AMP *,setting_t,value_t) = 0 ;
  
  SWIG_check_num_args("amp_caps::set_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::set_level",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_set_level_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int (*)(AMP *,setting_t,value_t)) ((arg1)->set_level);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_amp_unsigned_long_long_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_get_ext_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*arg2)(AMP *,hamlib_token_t,value_t *) = 0 ;
  
  SWIG_check_num_args("amp_caps::get_ext_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::get_ext_level",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::get_ext_level",2,"int (*)(AMP *,hamlib_token_t,value_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_get_ext_level_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_amp_long_p_value_t__int,0))){
    SWIG_fail_ptr("amp_caps_get_ext_level_set",2,SWIGTYPE_p_f_p_struct_amp_long_p_value_t__int);
  }
  
  if (arg1) (arg1)->get_ext_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_get_ext_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*result)(AMP *,hamlib_token_t,value_t *) = 0 ;
  
  SWIG_check_num_args("amp_caps::get_ext_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::get_ext_level",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_get_ext_level_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int (*)(AMP *,hamlib_token_t,value_t *)) ((arg1)->get_ext_level);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_amp_long_p_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_set_ext_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*arg2)(AMP *,hamlib_token_t,value_t) = 0 ;
  
  SWIG_check_num_args("amp_caps::set_ext_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::set_ext_level",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::set_ext_level",2,"int (*)(AMP *,hamlib_token_t,value_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_set_ext_level_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_amp_long_value_t__int,0))){
    SWIG_fail_ptr("amp_caps_set_ext_level_set",2,SWIGTYPE_p_f_p_struct_amp_long_value_t__int);
  }
  
  if (arg1) (arg1)->set_ext_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_set_ext_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*result)(AMP *,hamlib_token_t,value_t) = 0 ;
  
  SWIG_check_num_args("amp_caps::set_ext_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::set_ext_level",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_set_ext_level_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int (*)(AMP *,hamlib_token_t,value_t)) ((arg1)->set_ext_level);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_amp_long_value_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_set_powerstat_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*arg2)(AMP *,powerstat_t) = 0 ;
  
  SWIG_check_num_args("amp_caps::set_powerstat",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::set_powerstat",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::set_powerstat",2,"int (*)(AMP *,powerstat_t)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_set_powerstat_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_amp_enum_powerstat_t__int,0))){
    SWIG_fail_ptr("amp_caps_set_powerstat_set",2,SWIGTYPE_p_f_p_struct_amp_enum_powerstat_t__int);
  }
  
  if (arg1) (arg1)->set_powerstat = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_set_powerstat_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*result)(AMP *,powerstat_t) = 0 ;
  
  SWIG_check_num_args("amp_caps::set_powerstat",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::set_powerstat",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_set_powerstat_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int (*)(AMP *,powerstat_t)) ((arg1)->set_powerstat);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_amp_enum_powerstat_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_get_powerstat_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*arg2)(AMP *,powerstat_t *) = 0 ;
  
  SWIG_check_num_args("amp_caps::get_powerstat",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::get_powerstat",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::get_powerstat",2,"int (*)(AMP *,powerstat_t *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_get_powerstat_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_amp_p_enum_powerstat_t__int,0))){
    SWIG_fail_ptr("amp_caps_get_powerstat_set",2,SWIGTYPE_p_f_p_struct_amp_p_enum_powerstat_t__int);
  }
  
  if (arg1) (arg1)->get_powerstat = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_get_powerstat_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  int (*result)(AMP *,powerstat_t *) = 0 ;
  
  SWIG_check_num_args("amp_caps::get_powerstat",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::get_powerstat",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_get_powerstat_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (int (*)(AMP *,powerstat_t *)) ((arg1)->get_powerstat);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_amp_p_enum_powerstat_t__int,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_get_info_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  char *(*arg2)(AMP *) = 0 ;
  
  SWIG_check_num_args("amp_caps::get_info",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::get_info",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::get_info",2,"char const *(*)(AMP *)");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_get_info_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_f_p_struct_amp__p_char,0))){
    SWIG_fail_ptr("amp_caps_get_info_set",2,SWIGTYPE_p_f_p_struct_amp__p_char);
  }
  
  if (arg1) (arg1)->get_info = (char const *(*)(AMP *))arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_get_info_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  char *(*result)(AMP *) = 0 ;
  
  SWIG_check_num_args("amp_caps::get_info",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::get_info",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_get_info_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (char *(*)(AMP *)) ((arg1)->get_info);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_f_p_struct_amp__p_char,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_levels_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("amp_caps::levels",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::levels",1,"struct amp_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_caps::levels",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_levels_set",1,SWIGTYPE_p_amp_caps);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->levels = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_levels_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("amp_caps::levels",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::levels",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_levels_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (setting_t) ((arg1)->levels);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_ext_levels_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("amp_caps::ext_levels",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::ext_levels",1,"struct amp_caps *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_caps::ext_levels",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_ext_levels_set",1,SWIGTYPE_p_amp_caps);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->ext_levels = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_ext_levels_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  unsigned int result;
  
  SWIG_check_num_args("amp_caps::ext_levels",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::ext_levels",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_ext_levels_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (unsigned int) ((arg1)->ext_levels);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_extlevels_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  struct confparams *arg2 = 0 ;
  
  SWIG_check_num_args("amp_caps::extlevels",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::extlevels",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::extlevels",2,"struct confparams const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_extlevels_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_confparams,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("amp_caps_extlevels_set",2,SWIGTYPE_p_confparams);
  }
  
  if (arg1) (arg1)->extlevels = (struct confparams const *)arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_extlevels_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  struct confparams *result = 0 ;
  
  SWIG_check_num_args("amp_caps::extlevels",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::extlevels",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_extlevels_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (struct confparams *) ((arg1)->extlevels);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_confparams,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_extparms_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  struct confparams *arg2 = 0 ;
  
  SWIG_check_num_args("amp_caps::extparms",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::extparms",1,"struct amp_caps *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_caps::extparms",2,"struct confparams const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_extparms_set",1,SWIGTYPE_p_amp_caps);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_confparams,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("amp_caps_extparms_set",2,SWIGTYPE_p_confparams);
  }
  
  if (arg1) (arg1)->extparms = (struct confparams const *)arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_caps_extparms_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *arg1 = 0 ;
  struct confparams *result = 0 ;
  
  SWIG_check_num_args("amp_caps::extparms",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_caps::extparms",1,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_caps,0))){
    SWIG_fail_ptr("amp_caps_extparms_get",1,SWIGTYPE_p_amp_caps);
  }
  
  result = (struct confparams *) ((arg1)->extparms);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_confparams,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_amp_caps(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_caps *result = 0 ;
  
  SWIG_check_num_args("amp_caps::amp_caps",0,0)
  result = (struct amp_caps *)calloc(1, sizeof(struct amp_caps));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_amp_caps,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_amp_caps(void *obj) {
struct amp_caps *arg1 = (struct amp_caps *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_amp_caps(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_amp_caps);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_amp_caps_attributes[] = {
    { "amp_model", _wrap_amp_caps_amp_model_get, _wrap_amp_caps_amp_model_set },
    { "model_name", _wrap_amp_caps_model_name_get, SWIG_Lua_set_immutable },
    { "mfg_name", _wrap_amp_caps_mfg_name_get, SWIG_Lua_set_immutable },
    { "version", _wrap_amp_caps_version_get, SWIG_Lua_set_immutable },
    { "copyright", _wrap_amp_caps_copyright_get, SWIG_Lua_set_immutable },
    { "status", _wrap_amp_caps_status_get, _wrap_amp_caps_status_set },
    { "amp_type", _wrap_amp_caps_amp_type_get, _wrap_amp_caps_amp_type_set },
    { "port_type", _wrap_amp_caps_port_type_get, _wrap_amp_caps_port_type_set },
    { "serial_rate_min", _wrap_amp_caps_serial_rate_min_get, _wrap_amp_caps_serial_rate_min_set },
    { "serial_rate_max", _wrap_amp_caps_serial_rate_max_get, _wrap_amp_caps_serial_rate_max_set },
    { "serial_data_bits", _wrap_amp_caps_serial_data_bits_get, _wrap_amp_caps_serial_data_bits_set },
    { "serial_stop_bits", _wrap_amp_caps_serial_stop_bits_get, _wrap_amp_caps_serial_stop_bits_set },
    { "serial_parity", _wrap_amp_caps_serial_parity_get, _wrap_amp_caps_serial_parity_set },
    { "serial_handshake", _wrap_amp_caps_serial_handshake_get, _wrap_amp_caps_serial_handshake_set },
    { "write_delay", _wrap_amp_caps_write_delay_get, _wrap_amp_caps_write_delay_set },
    { "post_write_delay", _wrap_amp_caps_post_write_delay_get, _wrap_amp_caps_post_write_delay_set },
    { "timeout", _wrap_amp_caps_timeout_get, _wrap_amp_caps_timeout_set },
    { "retry", _wrap_amp_caps_retry_get, _wrap_amp_caps_retry_set },
    { "cfgparams", _wrap_amp_caps_cfgparams_get, _wrap_amp_caps_cfgparams_set },
    { "priv", _wrap_amp_caps_priv_get, _wrap_amp_caps_priv_set },
    { "amp_model_macro_name", _wrap_amp_caps_amp_model_macro_name_get, _wrap_amp_caps_amp_model_macro_name_set },
    { "has_get_level", _wrap_amp_caps_has_get_level_get, _wrap_amp_caps_has_get_level_set },
    { "has_set_level", _wrap_amp_caps_has_set_level_get, _wrap_amp_caps_has_set_level_set },
    { "level_gran", _wrap_amp_caps_level_gran_get, _wrap_amp_caps_level_gran_set },
    { "parm_gran", _wrap_amp_caps_parm_gran_get, _wrap_amp_caps_parm_gran_set },
    { "amp_init", _wrap_amp_caps_amp_init_get, _wrap_amp_caps_amp_init_set },
    { "amp_cleanup", _wrap_amp_caps_amp_cleanup_get, _wrap_amp_caps_amp_cleanup_set },
    { "amp_open", _wrap_amp_caps_amp_open_get, _wrap_amp_caps_amp_open_set },
    { "amp_close", _wrap_amp_caps_amp_close_get, _wrap_amp_caps_amp_close_set },
    { "set_freq", _wrap_amp_caps_set_freq_get, _wrap_amp_caps_set_freq_set },
    { "get_freq", _wrap_amp_caps_get_freq_get, _wrap_amp_caps_get_freq_set },
    { "set_conf", _wrap_amp_caps_set_conf_get, _wrap_amp_caps_set_conf_set },
    { "get_conf2", _wrap_amp_caps_get_conf2_get, _wrap_amp_caps_get_conf2_set },
    { "get_conf", _wrap_amp_caps_get_conf_get, _wrap_amp_caps_get_conf_set },
    { "reset", _wrap_amp_caps_reset_get, _wrap_amp_caps_reset_set },
    { "get_level", _wrap_amp_caps_get_level_get, _wrap_amp_caps_get_level_set },
    { "set_level", _wrap_amp_caps_set_level_get, _wrap_amp_caps_set_level_set },
    { "get_ext_level", _wrap_amp_caps_get_ext_level_get, _wrap_amp_caps_get_ext_level_set },
    { "set_ext_level", _wrap_amp_caps_set_ext_level_get, _wrap_amp_caps_set_ext_level_set },
    { "set_powerstat", _wrap_amp_caps_set_powerstat_get, _wrap_amp_caps_set_powerstat_set },
    { "get_powerstat", _wrap_amp_caps_get_powerstat_get, _wrap_amp_caps_get_powerstat_set },
    { "get_info", _wrap_amp_caps_get_info_get, _wrap_amp_caps_get_info_set },
    { "levels", _wrap_amp_caps_levels_get, _wrap_amp_caps_levels_set },
    { "ext_levels", _wrap_amp_caps_ext_levels_get, _wrap_amp_caps_ext_levels_set },
    { "extlevels", _wrap_amp_caps_extlevels_get, _wrap_amp_caps_extlevels_set },
    { "extparms", _wrap_amp_caps_extparms_get, _wrap_amp_caps_extparms_set },
    {0,0,0}
};
static swig_lua_method swig_amp_caps_methods[]= {
    {0,0}
};
static swig_lua_method swig_amp_caps_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_amp_caps_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_amp_caps_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_amp_caps_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_amp_caps_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_amp_caps_Sf_SwigStatic = {
    "amp_caps",
    swig_amp_caps_Sf_SwigStatic_methods,
    swig_amp_caps_Sf_SwigStatic_attributes,
    swig_amp_caps_Sf_SwigStatic_constants,
    swig_amp_caps_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_amp_caps_bases[] = {0};
static const char *swig_amp_caps_base_names[] = {0};
static swig_lua_class _wrap_class_amp_caps = { "amp_caps", "amp_caps", &SWIGTYPE_p_amp_caps,_proxy__wrap_new_amp_caps, swig_delete_amp_caps, swig_amp_caps_methods, swig_amp_caps_attributes, &swig_amp_caps_Sf_SwigStatic, swig_amp_caps_meta, swig_amp_caps_bases, swig_amp_caps_base_names };

static int _wrap_amp_state_comm_state_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_state *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("amp_state::comm_state",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_state::comm_state",1,"struct amp_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_state::comm_state",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_state,0))){
    SWIG_fail_ptr("amp_state_comm_state_set",1,SWIGTYPE_p_amp_state);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->comm_state = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_state_comm_state_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_state *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("amp_state::comm_state",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_state::comm_state",1,"struct amp_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_state,0))){
    SWIG_fail_ptr("amp_state_comm_state_get",1,SWIGTYPE_p_amp_state);
  }
  
  result = (int) ((arg1)->comm_state);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_state_priv_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_state *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("amp_state::priv",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_state::priv",1,"struct amp_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_state::priv",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_state,0))){
    SWIG_fail_ptr("amp_state_priv_set",1,SWIGTYPE_p_amp_state);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"amp_state_priv_set");
  if (arg1) (arg1)->priv = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_state_priv_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_state *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("amp_state::priv",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_state::priv",1,"struct amp_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_state,0))){
    SWIG_fail_ptr("amp_state_priv_get",1,SWIGTYPE_p_amp_state);
  }
  
  result = (void *) ((arg1)->priv);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_state_obj_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_state *arg1 = 0 ;
  void *arg2 = 0 ;
  
  SWIG_check_num_args("amp_state::obj",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_state::obj",1,"struct amp_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_state::obj",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_state,0))){
    SWIG_fail_ptr("amp_state_obj_set",1,SWIGTYPE_p_amp_state);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"amp_state_obj_set");
  if (arg1) (arg1)->obj = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_state_obj_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_state *arg1 = 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("amp_state::obj",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_state::obj",1,"struct amp_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_state,0))){
    SWIG_fail_ptr("amp_state_obj_get",1,SWIGTYPE_p_amp_state);
  }
  
  result = (void *) ((arg1)->obj);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_state_has_get_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_state *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("amp_state::has_get_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_state::has_get_level",1,"struct amp_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_state::has_get_level",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_state,0))){
    SWIG_fail_ptr("amp_state_has_get_level_set",1,SWIGTYPE_p_amp_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_get_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_state_has_get_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_state *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("amp_state::has_get_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_state::has_get_level",1,"struct amp_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_state,0))){
    SWIG_fail_ptr("amp_state_has_get_level_get",1,SWIGTYPE_p_amp_state);
  }
  
  result = (setting_t) ((arg1)->has_get_level);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_state_has_set_level_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_state *arg1 = 0 ;
  setting_t arg2 ;
  
  SWIG_check_num_args("amp_state::has_set_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_state::has_set_level",1,"struct amp_state *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("amp_state::has_set_level",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_state,0))){
    SWIG_fail_ptr("amp_state_has_set_level_set",1,SWIGTYPE_p_amp_state);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  if (arg1) (arg1)->has_set_level = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_state_has_set_level_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_state *arg1 = 0 ;
  setting_t result;
  
  SWIG_check_num_args("amp_state::has_set_level",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_state::has_set_level",1,"struct amp_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_state,0))){
    SWIG_fail_ptr("amp_state_has_set_level_get",1,SWIGTYPE_p_amp_state);
  }
  
  result = (setting_t) ((arg1)->has_set_level);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_state_level_gran_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_state *arg1 = 0 ;
  gran_t *arg2 = (gran_t *)0 ;
  
  SWIG_check_num_args("amp_state::level_gran",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_state::level_gran",1,"struct amp_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_state::level_gran",2,"gran_t [64]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_state,0))){
    SWIG_fail_ptr("amp_state_level_gran_set",1,SWIGTYPE_p_amp_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_gran,0))){
    SWIG_fail_ptr("amp_state_level_gran_set",2,SWIGTYPE_p_gran);
  }
  
  {
    size_t ii;
    gran_t *b = (gran_t *) arg1->level_gran;
    for (ii = 0; ii < (size_t)64; ii++) b[ii] = *((gran_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_state_level_gran_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_state *arg1 = 0 ;
  gran_t *result = 0 ;
  
  SWIG_check_num_args("amp_state::level_gran",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_state::level_gran",1,"struct amp_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_state,0))){
    SWIG_fail_ptr("amp_state_level_gran_get",1,SWIGTYPE_p_amp_state);
  }
  
  result = (gran_t *)(gran_t *) ((arg1)->level_gran);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_gran,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_state_parm_gran_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_state *arg1 = 0 ;
  gran_t *arg2 = (gran_t *)0 ;
  
  SWIG_check_num_args("amp_state::parm_gran",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_state::parm_gran",1,"struct amp_state *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("amp_state::parm_gran",2,"gran_t [64]");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_state,0))){
    SWIG_fail_ptr("amp_state_parm_gran_set",1,SWIGTYPE_p_amp_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_gran,0))){
    SWIG_fail_ptr("amp_state_parm_gran_set",2,SWIGTYPE_p_gran);
  }
  
  {
    size_t ii;
    gran_t *b = (gran_t *) arg1->parm_gran;
    for (ii = 0; ii < (size_t)64; ii++) b[ii] = *((gran_t *) arg2 + ii);
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_state_parm_gran_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_state *arg1 = 0 ;
  gran_t *result = 0 ;
  
  SWIG_check_num_args("amp_state::parm_gran",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_state::parm_gran",1,"struct amp_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_state,0))){
    SWIG_fail_ptr("amp_state_parm_gran_get",1,SWIGTYPE_p_amp_state);
  }
  
  result = (gran_t *)(gran_t *) ((arg1)->parm_gran);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_gran,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_state_ampport_set(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_state *arg1 = 0 ;
  hamlib_port_t arg2 ;
  hamlib_port_t *argp2 ;
  
  SWIG_check_num_args("amp_state::ampport",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_state::ampport",1,"struct amp_state *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("amp_state::ampport",2,"hamlib_port_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_state,0))){
    SWIG_fail_ptr("amp_state_ampport_set",1,SWIGTYPE_p_amp_state);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_hamlib_port,0))){
    SWIG_fail_ptr("amp_state_ampport_set",2,SWIGTYPE_p_hamlib_port);
  }
  arg2 = *argp2;
  
  if (arg1) (arg1)->ampport = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_amp_state_ampport_get(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_state *arg1 = 0 ;
  hamlib_port_t result;
  
  SWIG_check_num_args("amp_state::ampport",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("amp_state::ampport",1,"struct amp_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_amp_state,0))){
    SWIG_fail_ptr("amp_state_ampport_get",1,SWIGTYPE_p_amp_state);
  }
  
  result =  ((arg1)->ampport);
  {
    hamlib_port_t * resultptr;
    resultptr = (hamlib_port_t *) malloc(sizeof(hamlib_port_t));
    memmove(resultptr, &result, sizeof(hamlib_port_t));
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_hamlib_port,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_amp_state(lua_State* L) {
  int SWIG_arg = 0;
  struct amp_state *result = 0 ;
  
  SWIG_check_num_args("amp_state::amp_state",0,0)
  result = (struct amp_state *)calloc(1, sizeof(struct amp_state));
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_amp_state,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_amp_state(void *obj) {
struct amp_state *arg1 = (struct amp_state *) obj;
free((char *) arg1);
}
static int _proxy__wrap_new_amp_state(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_amp_state);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_amp_state_attributes[] = {
    { "comm_state", _wrap_amp_state_comm_state_get, _wrap_amp_state_comm_state_set },
    { "priv", _wrap_amp_state_priv_get, _wrap_amp_state_priv_set },
    { "obj", _wrap_amp_state_obj_get, _wrap_amp_state_obj_set },
    { "has_get_level", _wrap_amp_state_has_get_level_get, _wrap_amp_state_has_get_level_set },
    { "has_set_level", _wrap_amp_state_has_set_level_get, _wrap_amp_state_has_set_level_set },
    { "level_gran", _wrap_amp_state_level_gran_get, _wrap_amp_state_level_gran_set },
    { "parm_gran", _wrap_amp_state_parm_gran_get, _wrap_amp_state_parm_gran_set },
    { "ampport", _wrap_amp_state_ampport_get, _wrap_amp_state_ampport_set },
    {0,0,0}
};
static swig_lua_method swig_amp_state_methods[]= {
    {0,0}
};
static swig_lua_method swig_amp_state_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_amp_state_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_amp_state_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_amp_state_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_amp_state_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_amp_state_Sf_SwigStatic = {
    "amp_state",
    swig_amp_state_Sf_SwigStatic_methods,
    swig_amp_state_Sf_SwigStatic_attributes,
    swig_amp_state_Sf_SwigStatic_constants,
    swig_amp_state_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_amp_state_bases[] = {0};
static const char *swig_amp_state_base_names[] = {0};
static swig_lua_class _wrap_class_amp_state = { "amp_state", "amp_state", &SWIGTYPE_p_amp_state,_proxy__wrap_new_amp_state, swig_delete_amp_state, swig_amp_state_methods, swig_amp_state_attributes, &swig_amp_state_Sf_SwigStatic, swig_amp_state_meta, swig_amp_state_bases, swig_amp_state_base_names };

static int _wrap_Amp_caps_set(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  struct amp_caps *arg2 = 0 ;
  
  SWIG_check_num_args("Amp::caps",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::caps",1,"struct Amp *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Amp::caps",2,"struct amp_caps *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_caps_set",1,SWIGTYPE_p_Amp);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_amp_caps,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("Amp_caps_set",2,SWIGTYPE_p_amp_caps);
  }
  
  if (arg1) (arg1)->caps = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_caps_get(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  struct amp_caps *result = 0 ;
  
  SWIG_check_num_args("Amp::caps",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::caps",1,"struct Amp *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_caps_get",1,SWIGTYPE_p_Amp);
  }
  
  result = (struct amp_caps *) ((arg1)->caps);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_amp_caps,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_state_set(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  struct amp_state *arg2 = 0 ;
  
  SWIG_check_num_args("Amp::state",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::state",1,"struct Amp *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Amp::state",2,"struct amp_state *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_state_set",1,SWIGTYPE_p_Amp);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_amp_state,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("Amp_state_set",2,SWIGTYPE_p_amp_state);
  }
  
  if (arg1) (arg1)->state = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_state_get(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  struct amp_state *result = 0 ;
  
  SWIG_check_num_args("Amp::state",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::state",1,"struct Amp *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_state_get",1,SWIGTYPE_p_Amp);
  }
  
  result = (struct amp_state *) ((arg1)->state);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_amp_state,0); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_error_status_set(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("Amp::error_status",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::error_status",1,"struct Amp *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Amp::error_status",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_error_status_set",1,SWIGTYPE_p_Amp);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->error_status = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_error_status_get(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("Amp::error_status",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::error_status",1,"struct Amp *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_error_status_get",1,SWIGTYPE_p_Amp);
  }
  
  result = (int) ((arg1)->error_status);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_do_exception_set(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  int arg2 ;
  
  SWIG_check_num_args("Amp::do_exception",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::do_exception",1,"struct Amp *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Amp::do_exception",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_do_exception_set",1,SWIGTYPE_p_Amp);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->do_exception = arg2;
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_do_exception_get(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  int result;
  
  SWIG_check_num_args("Amp::do_exception",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::do_exception",1,"struct Amp *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_do_exception_get",1,SWIGTYPE_p_Amp);
  }
  
  result = (int) ((arg1)->do_exception);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_new_Amp(lua_State* L) {
  int SWIG_arg = 0;
  amp_model_t arg1 ;
  struct Amp *result = 0 ;
  
  SWIG_check_num_args("Amp::Amp",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Amp::Amp",1,"amp_model_t");
  arg1 = (amp_model_t)lua_tonumber(L, 1);
  result = (struct Amp *)new_Amp(arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Amp,1); SWIG_arg++; 
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_open(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  
  SWIG_check_num_args("Amp::open",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::open",1,"struct Amp *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_open",1,SWIGTYPE_p_Amp);
  }
  
  {
    arg1->error_status = RIG_OK;
    Amp_open(arg1);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_close(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  
  SWIG_check_num_args("Amp::close",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::close",1,"struct Amp *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_close",1,SWIGTYPE_p_Amp);
  }
  
  {
    arg1->error_status = RIG_OK;
    Amp_close(arg1);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_reset(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  amp_reset_t arg2 ;
  
  SWIG_check_num_args("Amp::reset",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::reset",1,"struct Amp *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Amp::reset",2,"amp_reset_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_reset",1,SWIGTYPE_p_Amp);
  }
  
  arg2 = (amp_reset_t)(int)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Amp_reset(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_token_lookup(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  const_char_string arg2 = 0 ;
  
  SWIG_check_num_args("Amp::token_lookup",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::token_lookup",1,"struct Amp *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Amp::token_lookup",2,"const_char_string");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_token_lookup",1,SWIGTYPE_p_Amp);
  }
  
  arg2 = (const_char_string)lua_tostring(L, 2);
  {
    arg1->error_status = RIG_OK;
    Amp_token_lookup(arg1,(char const *)arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_has_get_level(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  setting_t arg2 ;
  setting_t result;
  
  SWIG_check_num_args("Amp::has_get_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::has_get_level",1,"struct Amp *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Amp::has_get_level",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_has_get_level",1,SWIGTYPE_p_Amp);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    result = (setting_t)Amp_has_get_level(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_has_set_level(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  setting_t arg2 ;
  setting_t result;
  
  SWIG_check_num_args("Amp::has_set_level",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::has_set_level",1,"struct Amp *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Amp::has_set_level",2,"setting_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_has_set_level",1,SWIGTYPE_p_Amp);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    result = (setting_t)Amp_has_set_level(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_set_freq(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  freq_t arg2 ;
  
  SWIG_check_num_args("Amp::set_freq",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::set_freq",1,"struct Amp *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Amp::set_freq",2,"freq_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_set_freq",1,SWIGTYPE_p_Amp);
  }
  
  arg2 = (freq_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Amp_set_freq(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_set_powerstat(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  powerstat_t arg2 ;
  
  SWIG_check_num_args("Amp::set_powerstat",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::set_powerstat",1,"struct Amp *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Amp::set_powerstat",2,"powerstat_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_set_powerstat",1,SWIGTYPE_p_Amp);
  }
  
  arg2 = (powerstat_t)(int)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    Amp_set_powerstat(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_set_level(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  setting_t arg2 ;
  value_t arg3 ;
  value_t *argp3 ;
  
  SWIG_check_num_args("Amp::set_level",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::set_level",1,"struct Amp *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Amp::set_level",2,"setting_t");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Amp::set_level",3,"value_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_set_level",1,SWIGTYPE_p_Amp);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
  arg2 = (setting_t)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("Amp_set_level",3,SWIGTYPE_p_value_t);
  }
  arg3 = *argp3;
  
  {
    arg1->error_status = RIG_OK;
    Amp_set_level(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_set_ext_level(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  hamlib_token_t arg2 ;
  value_t arg3 ;
  value_t *argp3 ;
  
  SWIG_check_num_args("Amp::set_ext_level",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::set_ext_level",1,"struct Amp *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Amp::set_ext_level",2,"hamlib_token_t");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Amp::set_ext_level",3,"value_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_set_ext_level",1,SWIGTYPE_p_Amp);
  }
  
  arg2 = (hamlib_token_t)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_value_t,0))){
    SWIG_fail_ptr("Amp_set_ext_level",3,SWIGTYPE_p_value_t);
  }
  arg3 = *argp3;
  
  {
    arg1->error_status = RIG_OK;
    Amp_set_ext_level(arg1,arg2,arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_set_conf__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  char *arg2 = 0 ;
  char *arg3 = 0 ;
  
  SWIG_check_num_args("Amp::set_conf",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::set_conf",1,"struct Amp *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Amp::set_conf",2,"char const *");
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("Amp::set_conf",3,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_set_conf",1,SWIGTYPE_p_Amp);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  arg3 = (char *)lua_tostring(L, 3);
  {
    arg1->error_status = RIG_OK;
    Amp_set_conf__SWIG_0(arg1,(char const *)arg2,(char const *)arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_set_conf__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  hamlib_token_t arg2 ;
  const_char_string arg3 = 0 ;
  
  SWIG_check_num_args("Amp::set_conf",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::set_conf",1,"struct Amp *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Amp::set_conf",2,"hamlib_token_t");
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("Amp::set_conf",3,"const_char_string");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_set_conf",1,SWIGTYPE_p_Amp);
  }
  
  arg2 = (hamlib_token_t)lua_tonumber(L, 2);
  arg3 = (const_char_string)lua_tostring(L, 3);
  {
    arg1->error_status = RIG_OK;
    Amp_set_conf__SWIG_1(arg1,arg2,(char const *)arg3);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_set_conf(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Amp, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = SWIG_lua_isnilstring(L,argv[2]);
        }
        if (_v) {
          return _wrap_Amp_set_conf__SWIG_1(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Amp, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        {
          _v = SWIG_lua_isnilstring(L,argv[2]);
        }
        if (_v) {
          return _wrap_Amp_set_conf__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Amp_set_conf'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Amp::set_conf(char const *,char const *)\n"
    "    Amp::set_conf(hamlib_token_t,const_char_string)\n");
  lua_error(L);return 0;
}


static int _wrap_Amp_get_conf__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  hamlib_token_t arg2 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Amp::get_conf",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::get_conf",1,"struct Amp *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Amp::get_conf",2,"hamlib_token_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_get_conf",1,SWIGTYPE_p_Amp);
  }
  
  arg2 = (hamlib_token_t)lua_tonumber(L, 2);
  {
    arg1->error_status = RIG_OK;
    result = (char *)Amp_get_conf__SWIG_0(arg1,arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_get_conf__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  char *arg2 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Amp::get_conf",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::get_conf",1,"struct Amp *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Amp::get_conf",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_get_conf",1,SWIGTYPE_p_Amp);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    arg1->error_status = RIG_OK;
    result = (char *)Amp_get_conf__SWIG_1(arg1,(char const *)arg2);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_get_conf(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Amp, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_Amp_get_conf__SWIG_0(L);
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Amp, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        return _wrap_Amp_get_conf__SWIG_1(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Amp_get_conf'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Amp::get_conf(hamlib_token_t)\n"
    "    Amp::get_conf(char const *)\n");
  lua_error(L);return 0;
}


static int _wrap_Amp_get_freq(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  freq_t result;
  
  SWIG_check_num_args("Amp::get_freq",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::get_freq",1,"struct Amp *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_get_freq",1,SWIGTYPE_p_Amp);
  }
  
  {
    arg1->error_status = RIG_OK;
    result = (freq_t)Amp_get_freq(arg1);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_get_info(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Amp::get_info",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::get_info",1,"struct Amp *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_get_info",1,SWIGTYPE_p_Amp);
  }
  
  {
    arg1->error_status = RIG_OK;
    result = (char *)Amp_get_info(arg1);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static int _wrap_Amp_get_powerstat(lua_State* L) {
  int SWIG_arg = 0;
  struct Amp *arg1 = 0 ;
  powerstat_t result;
  
  SWIG_check_num_args("Amp::get_powerstat",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Amp::get_powerstat",1,"struct Amp *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Amp,0))){
    SWIG_fail_ptr("Amp_get_powerstat",1,SWIGTYPE_p_Amp);
  }
  
  {
    arg1->error_status = RIG_OK;
    result = (powerstat_t)Amp_get_powerstat(arg1);
    if (arg1->error_status != RIG_OK && arg1->do_exception)
    SWIG_exception(SWIG_UnknownError, rigerror(arg1->error_status));
  }
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  fail: SWIGUNUSED;
  lua_error(L);
  return 0;
}


static void swig_delete_Amp(void *obj) {
struct Amp *arg1 = (struct Amp *) obj;
delete_Amp(arg1);
}
static int _proxy__wrap_new_Amp(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_Amp);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_Amp_attributes[] = {
    { "caps", _wrap_Amp_caps_get, _wrap_Amp_caps_set },
    { "state", _wrap_Amp_state_get, _wrap_Amp_state_set },
    { "error_status", _wrap_Amp_error_status_get, _wrap_Amp_error_status_set },
    { "do_exception", _wrap_Amp_do_exception_get, _wrap_Amp_do_exception_set },
    {0,0,0}
};
static swig_lua_method swig_Amp_methods[]= {
    { "open", _wrap_Amp_open},
    { "close", _wrap_Amp_close},
    { "reset", _wrap_Amp_reset},
    { "token_lookup", _wrap_Amp_token_lookup},
    { "has_get_level", _wrap_Amp_has_get_level},
    { "has_set_level", _wrap_Amp_has_set_level},
    { "set_freq", _wrap_Amp_set_freq},
    { "set_powerstat", _wrap_Amp_set_powerstat},
    { "set_level", _wrap_Amp_set_level},
    { "set_ext_level", _wrap_Amp_set_ext_level},
    { "set_conf", _wrap_Amp_set_conf},
    { "get_conf", _wrap_Amp_get_conf},
    { "get_freq", _wrap_Amp_get_freq},
    { "get_info", _wrap_Amp_get_info},
    { "get_powerstat", _wrap_Amp_get_powerstat},
    {0,0}
};
static swig_lua_method swig_Amp_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_Amp_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_Amp_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_Amp_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_Amp_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_Amp_SwigStatic = {
    "Amp",
    swig_Amp_SwigStatic_methods,
    swig_Amp_SwigStatic_attributes,
    swig_Amp_SwigStatic_constants,
    swig_Amp_SwigStatic_classes,
    0
};
static swig_lua_class *swig_Amp_bases[] = {0};
static const char *swig_Amp_base_names[] = {0};
static swig_lua_class _wrap_class_Amp = { "Amp", "Amp", &SWIGTYPE_p_Amp,_proxy__wrap_new_Amp, swig_delete_Amp, swig_Amp_methods, swig_Amp_attributes, &swig_Amp_SwigStatic, swig_Amp_meta, swig_Amp_bases, swig_Amp_base_names };

static swig_lua_attribute swig_SwigModule_attributes[] = {
    { "cookie_use", _wrap_cookie_use_get, _wrap_cookie_use_set },
    { "skip_init", _wrap_skip_init_get, _wrap_skip_init_set },
    { "hamlib_version", _wrap_hamlib_version_get, SWIG_Lua_set_immutable },
    { "hamlib_copyright", _wrap_hamlib_copyright_get, SWIG_Lua_set_immutable },
    {0,0,0}
};
static swig_lua_const_info swig_SwigModule_constants[]= {
    {SWIG_LUA_CONSTTAB_INT("MAX_MODELS_PER_BACKEND", (1000))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_NONE", (0))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_DUMMY", ((1000*(0)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_NETRIGCTL", ((1000*(0)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ARMSTRONG", ((1000*(0)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FLRIG", ((1000*(0)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TRXMANAGER_RIG", ((1000*(0)+(5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_DUMMY_NOVFO", ((1000*(0)+(6))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TCI1X", ((1000*(0)+(7))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ACLOG", ((1000*(0)+(8))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SDRSHARP", ((1000*(0)+(9))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_QUISK", ((1000*(0)+(10))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_GQRX", ((1000*(0)+(11))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT847", ((1000*(1)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT1000", ((1000*(1)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT1000D", ((1000*(1)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT1000MPMKV", ((1000*(1)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT747", ((1000*(1)+(5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT757", ((1000*(1)+(6))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT757GXII", ((1000*(1)+(7))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT575", ((1000*(1)+(8))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT767", ((1000*(1)+(9))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT736R", ((1000*(1)+(10))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT840", ((1000*(1)+(11))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT820", ((1000*(1)+(12))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT900", ((1000*(1)+(13))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT920", ((1000*(1)+(14))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT890", ((1000*(1)+(15))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT990", ((1000*(1)+(16))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FRG100", ((1000*(1)+(17))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FRG9600", ((1000*(1)+(18))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FRG8800", ((1000*(1)+(19))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT817", ((1000*(1)+(20))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT100", ((1000*(1)+(21))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT857", ((1000*(1)+(22))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT897", ((1000*(1)+(23))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT1000MP", ((1000*(1)+(24))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT1000MPMKVFLD", ((1000*(1)+(25))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_VR5000", ((1000*(1)+(26))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT450", ((1000*(1)+(27))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT950", ((1000*(1)+(28))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT2000", ((1000*(1)+(29))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT9000", ((1000*(1)+(30))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT980", ((1000*(1)+(31))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FTDX5000", ((1000*(1)+(32))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_VX1700", ((1000*(1)+(33))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FTDX1200", ((1000*(1)+(34))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT991", ((1000*(1)+(35))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT891", ((1000*(1)+(36))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FTDX3000", ((1000*(1)+(37))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT847UNI", ((1000*(1)+(38))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT600", ((1000*(1)+(39))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FTDX101D", ((1000*(1)+(40))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT818", ((1000*(1)+(41))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FTDX10", ((1000*(1)+(42))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT897D", ((1000*(1)+(43))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FTDX101MP", ((1000*(1)+(44))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_MCHFQRP", ((1000*(1)+(45))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT450D", ((1000*(1)+(46))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT650", ((1000*(1)+(47))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT990UNI", ((1000*(1)+(48))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT710", ((1000*(1)+(49))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FT9000OLD", ((1000*(1)+(50))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FTX1", ((1000*(1)+(51))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS50", ((1000*(2)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS440", ((1000*(2)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS450S", ((1000*(2)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS570D", ((1000*(2)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS690S", ((1000*(2)+(5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS711", ((1000*(2)+(6))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS790", ((1000*(2)+(7))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS811", ((1000*(2)+(8))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS850", ((1000*(2)+(9))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS870S", ((1000*(2)+(10))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS940", ((1000*(2)+(11))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS950S", ((1000*(2)+(12))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS950SDX", ((1000*(2)+(13))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS2000", ((1000*(2)+(14))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_R5000", ((1000*(2)+(15))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS570S", ((1000*(2)+(16))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_THD7A", ((1000*(2)+(17))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_THD7AG", ((1000*(2)+(18))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_THF6A", ((1000*(2)+(19))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_THF7E", ((1000*(2)+(20))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_K2", ((1000*(2)+(21))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS930", ((1000*(2)+(22))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_THG71", ((1000*(2)+(23))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS680S", ((1000*(2)+(24))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS140S", ((1000*(2)+(25))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TMD700", ((1000*(2)+(26))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TMV7", ((1000*(2)+(27))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS480", ((1000*(2)+(28))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_K3", ((1000*(2)+(29))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TRC80", ((1000*(2)+(30))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS590S", ((1000*(2)+(31))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TRANSFOX", ((1000*(2)+(32))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_THD72A", ((1000*(2)+(33))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TMD710", ((1000*(2)+(34))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TMV71", ((1000*(2)+(35))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_F6K", ((1000*(2)+(36))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS590SG", ((1000*(2)+(37))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_XG3", ((1000*(2)+(38))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS990S", ((1000*(2)+(39))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_HPSDR", ((1000*(2)+(40))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TS890S", ((1000*(2)+(41))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_THD74", ((1000*(2)+(42))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_K3S", ((1000*(2)+(43))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_KX2", ((1000*(2)+(44))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_KX3", ((1000*(2)+(45))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_PT8000A", ((1000*(2)+(46))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_K4", ((1000*(2)+(47))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_POWERSDR", ((1000*(2)+(48))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_MALACHITE", ((1000*(2)+(49))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_LAB599_TX500", ((1000*(2)+(50))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SDRUNO", ((1000*(2)+(51))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_QRPLABS", ((1000*(2)+(52))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FX4", ((1000*(2)+(53))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_THETIS", ((1000*(2)+(54))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TRUSDX", ((1000*(2)+(55))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SDRCONSOLE", ((1000*(2)+(56))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_QRPLABS_QMX", ((1000*(2)+(57))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC1271", ((1000*(3)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC1275", ((1000*(3)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC271", ((1000*(3)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC275", ((1000*(3)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC375", ((1000*(3)+(5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC471", ((1000*(3)+(6))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC475", ((1000*(3)+(7))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC575", ((1000*(3)+(8))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC706", ((1000*(3)+(9))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC706MKII", ((1000*(3)+(10))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC706MKIIG", ((1000*(3)+(11))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC707", ((1000*(3)+(12))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC718", ((1000*(3)+(13))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC725", ((1000*(3)+(14))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC726", ((1000*(3)+(15))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC728", ((1000*(3)+(16))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC729", ((1000*(3)+(17))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC731", ((1000*(3)+(18))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC735", ((1000*(3)+(19))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC736", ((1000*(3)+(20))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC737", ((1000*(3)+(21))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC738", ((1000*(3)+(22))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC746", ((1000*(3)+(23))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC751", ((1000*(3)+(24))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC751A", ((1000*(3)+(25))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC756", ((1000*(3)+(26))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC756PRO", ((1000*(3)+(27))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC761", ((1000*(3)+(28))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC765", ((1000*(3)+(29))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC775", ((1000*(3)+(30))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC781", ((1000*(3)+(31))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC820", ((1000*(3)+(32))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC821H", ((1000*(3)+(34))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC970", ((1000*(3)+(35))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ICR10", ((1000*(3)+(36))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ICR71", ((1000*(3)+(37))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ICR72", ((1000*(3)+(38))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ICR75", ((1000*(3)+(39))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ICR7000", ((1000*(3)+(40))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ICR7100", ((1000*(3)+(41))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ICR8500", ((1000*(3)+(42))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ICR9000", ((1000*(3)+(43))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC910", ((1000*(3)+(44))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC78", ((1000*(3)+(45))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC746PRO", ((1000*(3)+(46))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC756PROII", ((1000*(3)+(47))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ICID1", ((1000*(3)+(54))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC703", ((1000*(3)+(55))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC7800", ((1000*(3)+(56))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC756PROIII", ((1000*(3)+(57))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ICR20", ((1000*(3)+(58))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC7000", ((1000*(3)+(60))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC7200", ((1000*(3)+(61))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC7700", ((1000*(3)+(62))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC7600", ((1000*(3)+(63))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC92D", ((1000*(3)+(65))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ICR9500", ((1000*(3)+(66))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC7410", ((1000*(3)+(67))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC9100", ((1000*(3)+(68))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ICRX7", ((1000*(3)+(69))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC7100", ((1000*(3)+(70))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ID5100", ((1000*(3)+(71))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC2730", ((1000*(3)+(72))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC7300", ((1000*(3)+(73))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_PERSEUS", ((1000*(3)+(74))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC785x", ((1000*(3)+(75))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_X108G", ((1000*(3)+(76))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ICR6", ((1000*(3)+(77))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC7610", ((1000*(3)+(78))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ICR8600", ((1000*(3)+(79))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ICR30", ((1000*(3)+(80))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC9700", ((1000*(3)+(81))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ID4100", ((1000*(3)+(82))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ID31", ((1000*(3)+(83))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ID51", ((1000*(3)+(84))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC705", ((1000*(3)+(85))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ICF8101", ((1000*(3)+(86))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_X6100", ((1000*(3)+(87))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_G90", ((1000*(3)+(88))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_X5105", ((1000*(3)+(89))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC905", ((1000*(3)+(90))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_X6200", ((1000*(3)+(91))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC7760", ((1000*(3)+(92))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ID52PLUS", ((1000*(3)+(93))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC7300MK2", ((1000*(3)+(94))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_MINISCOUT", ((1000*(3)+(48))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_XPLORER", ((1000*(3)+(49))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_OS535", ((1000*(3)+(52))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_OS456", ((1000*(3)+(53))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_OMNIVI", ((1000*(3)+(50))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_OMNIVIP", ((1000*(3)+(51))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_PARAGON2", ((1000*(3)+(59))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_DELTAII", ((1000*(3)+(64))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_PCR1000", ((1000*(4)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_PCR100", ((1000*(4)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_PCR1500", ((1000*(4)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_PCR2500", ((1000*(4)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_AR8200", ((1000*(5)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_AR8000", ((1000*(5)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_AR7030", ((1000*(5)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_AR5000", ((1000*(5)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_AR3030", ((1000*(5)+(5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_AR3000A", ((1000*(5)+(6))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_AR3000", ((1000*(5)+(7))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_AR2700", ((1000*(5)+(8))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_AR2500", ((1000*(5)+(9))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_AR16", ((1000*(5)+(10))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SDU5500", ((1000*(5)+(11))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SDU5000", ((1000*(5)+(12))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_AR8600", ((1000*(5)+(13))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_AR5000A", ((1000*(5)+(14))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_AR7030P", ((1000*(5)+(15))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SR2200", ((1000*(5)+(16))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_JST145", ((1000*(6)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_JST245", ((1000*(6)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_CMH530", ((1000*(6)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_NRD345", ((1000*(6)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_NRD525", ((1000*(6)+(5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_NRD535", ((1000*(6)+(6))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_NRD545", ((1000*(6)+(7))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_RS64", ((1000*(7)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_RS2005", ((1000*(7)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_RS2006", ((1000*(7)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_RS2035", ((1000*(7)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_RS2042", ((1000*(7)+(5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_RS2041", ((1000*(7)+(6))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_BC780", ((1000*(8)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_BC245", ((1000*(8)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_BC895", ((1000*(8)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_PRO2052", ((1000*(8)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_BC235", ((1000*(8)+(5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_BC250", ((1000*(8)+(6))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_BC785", ((1000*(8)+(7))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_BC786", ((1000*(8)+(8))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_BCT8", ((1000*(8)+(9))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_BCD396T", ((1000*(8)+(10))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_BCD996T", ((1000*(8)+(11))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_BC898", ((1000*(8)+(12))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_DKR8", ((1000*(9)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_DKR8A", ((1000*(9)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_DKR8B", ((1000*(9)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_HF150", ((1000*(10)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_HF225", ((1000*(10)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_HF250", ((1000*(10)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_HF235", ((1000*(10)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_RA3790", ((1000*(11)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_RA3720", ((1000*(11)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_RA6790", ((1000*(11)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_RA3710", ((1000*(11)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_RA3702", ((1000*(11)+(5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_HF1000", ((1000*(12)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_HF1000A", ((1000*(12)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_WJ8711", ((1000*(12)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_WJ8888", ((1000*(12)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ESM500", ((1000*(13)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_EK890", ((1000*(13)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_EK891", ((1000*(13)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_EK895", ((1000*(13)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_EK070", ((1000*(13)+(5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TRP7000", ((1000*(14)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TRP8000", ((1000*(14)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TRP9000", ((1000*(14)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TRP8255", ((1000*(14)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_WR1000", ((1000*(15)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_WR1500", ((1000*(15)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_WR1550", ((1000*(15)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_WR3100", ((1000*(15)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_WR3150", ((1000*(15)+(5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_WR3500", ((1000*(15)+(6))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_WR3700", ((1000*(15)+(7))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_G303", ((1000*(15)+(8))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_G313", ((1000*(15)+(9))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_G305", ((1000*(15)+(10))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_G315", ((1000*(15)+(11))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TT550", ((1000*(16)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TT538", ((1000*(16)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_RX320", ((1000*(16)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_RX340", ((1000*(16)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_RX350", ((1000*(16)+(5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TT526", ((1000*(16)+(6))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TT516", ((1000*(16)+(7))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TT565", ((1000*(16)+(8))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TT585", ((1000*(16)+(9))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TT588", ((1000*(16)+(11))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_RX331", ((1000*(16)+(12))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_TT599", ((1000*(16)+(13))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_DX77", ((1000*(17)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_DXSR8", ((1000*(17)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_505DSP", ((1000*(18)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_GNURADIO", ((1000*(20)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_MC4020", ((1000*(20)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_GRAUDIO", ((1000*(20)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_GRAUDIOIQ", ((1000*(20)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_USRP_G", ((1000*(20)+(5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_MICROTUNE_4937", ((1000*(21)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_MICROTUNE_4702", ((1000*(21)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_MICROTUNE_4707", ((1000*(21)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_DSP10", ((1000*(22)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SDR1000", ((1000*(23)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SDR1000RFE", ((1000*(23)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_DTTSP", ((1000*(23)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_DTTSP_UDP", ((1000*(23)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SMARTSDR_A", ((1000*(23)+(5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SMARTSDR_B", ((1000*(23)+(6))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SMARTSDR_C", ((1000*(23)+(7))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SMARTSDR_D", ((1000*(23)+(8))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SMARTSDR_E", ((1000*(23)+(9))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SMARTSDR_F", ((1000*(23)+(10))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SMARTSDR_G", ((1000*(23)+(11))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SMARTSDR_H", ((1000*(23)+(12))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_EKD500", ((1000*(24)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ELEKTOR304", ((1000*(25)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_DRT1", ((1000*(25)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_DWT", ((1000*(25)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_USRP0", ((1000*(25)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_USRP", ((1000*(25)+(5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_DDS60", ((1000*(25)+(6))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ELEKTOR507", ((1000*(25)+(7))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_MINIVNA", ((1000*(25)+(8))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SI570AVRUSB", ((1000*(25)+(9))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_PMSDR", ((1000*(25)+(10))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SI570PICUSB", ((1000*(25)+(11))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FIFISDR", ((1000*(25)+(12))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FUNCUBEDONGLE", ((1000*(25)+(13))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_HIQSDR", ((1000*(25)+(14))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FASDR", ((1000*(25)+(15))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SI570PEABERRY1", ((1000*(25)+(16))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SI570PEABERRY2", ((1000*(25)+(17))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_FUNCUBEDONGLEPLUS", ((1000*(25)+(18))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_RSHFIQ", ((1000*(25)+(19))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_V4L", ((1000*(26)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_V4L2", ((1000*(26)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ESMC", ((1000*(27)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_EB200", ((1000*(27)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_XK2100", ((1000*(27)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_EK89X", ((1000*(27)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_XK852", ((1000*(27)+(5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_PRM8060", ((1000*(28)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_PRM8070", ((1000*(28)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ADT_200A", ((1000*(29)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC_M700PRO", ((1000*(30)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC_M802", ((1000*(30)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC_M710", ((1000*(30)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_IC_M803", ((1000*(30)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_DORJI_DRA818V", ((1000*(31)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_DORJI_DRA818U", ((1000*(31)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_BARRETT_2050", ((1000*(32)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_BARRETT_950", ((1000*(32)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_BARRETT_4050", ((1000*(32)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_BARRETT_4100", ((1000*(32)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ELAD_FDM_DUO", ((1000*(33)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_CODAN_ENVOY", ((1000*(34)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_CODAN_NGT", ((1000*(34)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_CODAN_2110", ((1000*(34)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_GS100", ((1000*(35)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_MDS4710", ((1000*(36)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_MDS9710", ((1000*(36)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_ATD578UVIII", ((1000*(37)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_MICOM2", ((1000*(38)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_CTX10", ((1000*(39)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_PMR171", ((1000*(40)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_Q900", ((1000*(40)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_SIMPLECAT", ((1000*(41)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODEL_PRC138", ((1000*(42)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("BUILTINFUNC", (0))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_SECRET_LENGTH", (32))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_COOKIE_SIZE", (37))},
    {SWIG_LUA_CONSTTAB_INT("RIG_OK", (RIG_OK))},
    {SWIG_LUA_CONSTTAB_INT("RIG_EINVAL", (RIG_EINVAL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_ECONF", (RIG_ECONF))},
    {SWIG_LUA_CONSTTAB_INT("RIG_ENOMEM", (RIG_ENOMEM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_ENIMPL", (RIG_ENIMPL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_ETIMEOUT", (RIG_ETIMEOUT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_EIO", (RIG_EIO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_EINTERNAL", (RIG_EINTERNAL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_EPROTO", (RIG_EPROTO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_ERJCTED", (RIG_ERJCTED))},
    {SWIG_LUA_CONSTTAB_INT("RIG_ETRUNC", (RIG_ETRUNC))},
    {SWIG_LUA_CONSTTAB_INT("RIG_ENAVAIL", (RIG_ENAVAIL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_ENTARGET", (RIG_ENTARGET))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BUSERROR", (RIG_BUSERROR))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BUSBUSY", (RIG_BUSBUSY))},
    {SWIG_LUA_CONSTTAB_INT("RIG_EARG", (RIG_EARG))},
    {SWIG_LUA_CONSTTAB_INT("RIG_EVFO", (RIG_EVFO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_EDOM", (RIG_EDOM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_EDEPRECATED", (RIG_EDEPRECATED))},
    {SWIG_LUA_CONSTTAB_INT("RIG_ESECURITY", (RIG_ESECURITY))},
    {SWIG_LUA_CONSTTAB_INT("RIG_EPOWER", (RIG_EPOWER))},
    {SWIG_LUA_CONSTTAB_INT("RIG_ELIMIT", (RIG_ELIMIT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_EACCESS", (RIG_EACCESS))},
    {SWIG_LUA_CONSTTAB_INT("RIG_EEND", (RIG_EEND))},
    {SWIG_LUA_CONSTTAB_STRING("NETRIGCTL_RET", "RPRT ")},
    {SWIG_LUA_CONSTTAB_INT("RIG_DEBUG_NONE", (RIG_DEBUG_NONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_DEBUG_BUG", (RIG_DEBUG_BUG))},
    {SWIG_LUA_CONSTTAB_INT("RIG_DEBUG_ERR", (RIG_DEBUG_ERR))},
    {SWIG_LUA_CONSTTAB_INT("RIG_DEBUG_WARN", (RIG_DEBUG_WARN))},
    {SWIG_LUA_CONSTTAB_INT("RIG_DEBUG_VERBOSE", (RIG_DEBUG_VERBOSE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_DEBUG_TRACE", (RIG_DEBUG_TRACE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_DEBUG_CACHE", (RIG_DEBUG_CACHE))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_RIGNAMSIZ", (30))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_RIGVERSIZ", (8))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_FILPATHLEN", (512))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_FRQRANGESIZ", (30))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_MAXCHANDESC", (30))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_TSLSTSIZ", (20))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_FLTLSTSIZ", (60))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_MAXDBLSTSIZ", (8))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_CHANLSTSIZ", (16))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_MAX_AGC_LEVELS", (8))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_MAX_SPECTRUM_SCOPES", (4))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_MAX_SPECTRUM_MODES", (5))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_MAX_SPECTRUM_AVG_MODES", (12))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_MAX_SPECTRUM_SPANS", (20))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_MAX_SPECTRUM_DATA", (2048))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_MAX_CAL_LENGTH", (32))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_MAX_MODES", (63))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_MAX_VFOS", (31))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_MAX_ROTORS", (31))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_MAX_VFO_OPS", (31))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_MAX_RSCANS", (31))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_MAX_SNAPSHOT_PACKET_SIZE", (16384))},
    {SWIG_LUA_CONSTTAB_INT("CTCSS_LIST_SIZE", (60))},
    {SWIG_LUA_CONSTTAB_INT("DCS_LIST_SIZE", (128))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PORT_NONE", (RIG_PORT_NONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PORT_SERIAL", (RIG_PORT_SERIAL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PORT_NETWORK", (RIG_PORT_NETWORK))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PORT_DEVICE", (RIG_PORT_DEVICE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PORT_PACKET", (RIG_PORT_PACKET))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PORT_DTMF", (RIG_PORT_DTMF))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PORT_ULTRA", (RIG_PORT_ULTRA))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PORT_RPC", (RIG_PORT_RPC))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PORT_PARALLEL", (RIG_PORT_PARALLEL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PORT_USB", (RIG_PORT_USB))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PORT_UDP_NETWORK", (RIG_PORT_UDP_NETWORK))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PORT_CM108", (RIG_PORT_CM108))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PORT_GPIO", (RIG_PORT_GPIO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PORT_GPION", (RIG_PORT_GPION))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARITY_NONE", (RIG_PARITY_NONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARITY_ODD", (RIG_PARITY_ODD))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARITY_EVEN", (RIG_PARITY_EVEN))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARITY_MARK", (RIG_PARITY_MARK))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARITY_SPACE", (RIG_PARITY_SPACE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_HANDSHAKE_NONE", (RIG_HANDSHAKE_NONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_HANDSHAKE_XONXOFF", (RIG_HANDSHAKE_XONXOFF))},
    {SWIG_LUA_CONSTTAB_INT("RIG_HANDSHAKE_HARDWARE", (RIG_HANDSHAKE_HARDWARE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SIGNAL_UNSET", (RIG_SIGNAL_UNSET))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SIGNAL_ON", (RIG_SIGNAL_ON))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SIGNAL_OFF", (RIG_SIGNAL_OFF))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FLAG_RECEIVER", (RIG_FLAG_RECEIVER))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FLAG_TRANSMITTER", (RIG_FLAG_TRANSMITTER))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FLAG_SCANNER", (RIG_FLAG_SCANNER))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FLAG_MOBILE", (RIG_FLAG_MOBILE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FLAG_HANDHELD", (RIG_FLAG_HANDHELD))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FLAG_COMPUTER", (RIG_FLAG_COMPUTER))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FLAG_TRUNKING", (RIG_FLAG_TRUNKING))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FLAG_APRS", (RIG_FLAG_APRS))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FLAG_TNC", (RIG_FLAG_TNC))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FLAG_DXCLUSTER", (RIG_FLAG_DXCLUSTER))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FLAG_TUNER", (RIG_FLAG_TUNER))},
    {SWIG_LUA_CONSTTAB_INT("RIG_AGC_OFF", (RIG_AGC_OFF))},
    {SWIG_LUA_CONSTTAB_INT("RIG_AGC_SUPERFAST", (RIG_AGC_SUPERFAST))},
    {SWIG_LUA_CONSTTAB_INT("RIG_AGC_FAST", (RIG_AGC_FAST))},
    {SWIG_LUA_CONSTTAB_INT("RIG_AGC_SLOW", (RIG_AGC_SLOW))},
    {SWIG_LUA_CONSTTAB_INT("RIG_AGC_USER", (RIG_AGC_USER))},
    {SWIG_LUA_CONSTTAB_INT("RIG_AGC_MEDIUM", (RIG_AGC_MEDIUM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_AGC_AUTO", (RIG_AGC_AUTO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_AGC_LONG", (RIG_AGC_LONG))},
    {SWIG_LUA_CONSTTAB_INT("RIG_AGC_ON", (RIG_AGC_ON))},
    {SWIG_LUA_CONSTTAB_INT("RIG_AGC_NONE", (RIG_AGC_NONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TYPE_OTHER", (0))},
    {SWIG_LUA_CONSTTAB_INT("RIG_STATUS_ALPHA", (RIG_STATUS_ALPHA))},
    {SWIG_LUA_CONSTTAB_INT("RIG_STATUS_UNTESTED", (RIG_STATUS_UNTESTED))},
    {SWIG_LUA_CONSTTAB_INT("RIG_STATUS_BETA", (RIG_STATUS_BETA))},
    {SWIG_LUA_CONSTTAB_INT("RIG_STATUS_STABLE", (RIG_STATUS_STABLE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_STATUS_BUGGY", (RIG_STATUS_BUGGY))},
    {SWIG_LUA_CONSTTAB_INT("RIG_RPT_SHIFT_NONE", (RIG_RPT_SHIFT_NONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_RPT_SHIFT_MINUS", (RIG_RPT_SHIFT_MINUS))},
    {SWIG_LUA_CONSTTAB_INT("RIG_RPT_SHIFT_PLUS", (RIG_RPT_SHIFT_PLUS))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SPLIT_OFF", (RIG_SPLIT_OFF))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SPLIT_ON", (RIG_SPLIT_ON))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_NONE", (0))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_A", ((1u << (0))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_B", ((1u << (1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_C", ((1u << (2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_SUB_A", ((1u << (21))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_SUB_B", ((1u << (22))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_SUB_C", ((1u << (3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_MAIN_A", ((1u << (23))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_MAIN_B", ((1u << (24))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_MAIN_C", ((1u << (4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_OTHER", ((1u << (5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_SUB", ((1u << (25))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_MAIN", ((1u << (26))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_VFO", ((1u << (27))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_MEM", ((1u << (28))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_CURR", ((1u << (29))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_TX_FLAG", ((1u << (30))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_ALL", ((1u << (31))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_TX", ((((1u << (29)))|(1u << (30)))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_VFO_RX", ((1u << (29))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TARGETABLE_NONE", (0))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TARGETABLE_FREQ", ((1 << 0)))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TARGETABLE_MODE", ((1 << 1)))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TARGETABLE_PURE", ((1 << 2)))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TARGETABLE_TONE", ((1 << 3)))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TARGETABLE_FUNC", ((1 << 4)))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TARGETABLE_LEVEL", ((1 << 5)))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TARGETABLE_RITXIT", ((1 << 6)))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TARGETABLE_PTT", ((1 << 7)))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TARGETABLE_MEM", ((1 << 8)))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TARGETABLE_BANK", ((1 << 9)))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TARGETABLE_ANT", ((1 << 10)))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TARGETABLE_ROOFING", ((1 << 11)))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TARGETABLE_SPECTRUM", ((1 << 12)))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TARGETABLE_BAND", ((1 << 13)))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TARGETABLE_COMMON", (((1 << 6)|(1 << 7)|(1 << 8)|(1 << 9))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TARGETABLE_ALL", (0x7fffffff))},
    {SWIG_LUA_CONSTTAB_INT("VFO_DUAL", (((1u << (23))|(1u << (24))|(1u << (21))|(1u << (22)))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_DCD_OFF", (RIG_DCD_OFF))},
    {SWIG_LUA_CONSTTAB_INT("RIG_DCD_ON", (RIG_DCD_ON))},
    {SWIG_LUA_CONSTTAB_INT("RIG_DCD_NONE", (RIG_DCD_NONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_DCD_RIG", (RIG_DCD_RIG))},
    {SWIG_LUA_CONSTTAB_INT("RIG_DCD_SERIAL_DSR", (RIG_DCD_SERIAL_DSR))},
    {SWIG_LUA_CONSTTAB_INT("RIG_DCD_SERIAL_CTS", (RIG_DCD_SERIAL_CTS))},
    {SWIG_LUA_CONSTTAB_INT("RIG_DCD_SERIAL_CAR", (RIG_DCD_SERIAL_CAR))},
    {SWIG_LUA_CONSTTAB_INT("RIG_DCD_PARALLEL", (RIG_DCD_PARALLEL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_DCD_CM108", (RIG_DCD_CM108))},
    {SWIG_LUA_CONSTTAB_INT("RIG_DCD_GPIO", (RIG_DCD_GPIO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_DCD_GPION", (RIG_DCD_GPION))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTT_OFF", (RIG_PTT_OFF))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTT_ON", (RIG_PTT_ON))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTT_ON_MIC", (RIG_PTT_ON_MIC))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTT_ON_DATA", (RIG_PTT_ON_DATA))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTT_NONE", (RIG_PTT_NONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTT_RIG", (RIG_PTT_RIG))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTT_SERIAL_DTR", (RIG_PTT_SERIAL_DTR))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTT_SERIAL_RTS", (RIG_PTT_SERIAL_RTS))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTT_PARALLEL", (RIG_PTT_PARALLEL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTT_RIG_MICDATA", (RIG_PTT_RIG_MICDATA))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTT_CM108", (RIG_PTT_CM108))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTT_GPIO", (RIG_PTT_GPIO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTT_GPION", (RIG_PTT_GPION))},
    {SWIG_LUA_CONSTTAB_INT("RIG_POWER_OFF", (RIG_POWER_OFF))},
    {SWIG_LUA_CONSTTAB_INT("RIG_POWER_ON", (RIG_POWER_ON))},
    {SWIG_LUA_CONSTTAB_INT("RIG_POWER_STANDBY", (RIG_POWER_STANDBY))},
    {SWIG_LUA_CONSTTAB_INT("RIG_POWER_OPERATE", (RIG_POWER_OPERATE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_POWER_UNKNOWN", (RIG_POWER_UNKNOWN))},
    {SWIG_LUA_CONSTTAB_INT("RIG_RESET_NONE", (RIG_RESET_NONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_RESET_SOFT", (RIG_RESET_SOFT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_RESET_VFO", (RIG_RESET_VFO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_RESET_MCALL", (RIG_RESET_MCALL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_RESET_MASTER", (RIG_RESET_MASTER))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CLIENT_UNKNOWN", (RIG_CLIENT_UNKNOWN))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CLIENT_WSJTX", (RIG_CLIENT_WSJTX))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CLIENT_GPREDICT", (RIG_CLIENT_GPREDICT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_OP_NONE", (RIG_OP_NONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_OP_CPY", (RIG_OP_CPY))},
    {SWIG_LUA_CONSTTAB_INT("RIG_OP_XCHG", (RIG_OP_XCHG))},
    {SWIG_LUA_CONSTTAB_INT("RIG_OP_FROM_VFO", (RIG_OP_FROM_VFO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_OP_TO_VFO", (RIG_OP_TO_VFO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_OP_MCL", (RIG_OP_MCL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_OP_UP", (RIG_OP_UP))},
    {SWIG_LUA_CONSTTAB_INT("RIG_OP_DOWN", (RIG_OP_DOWN))},
    {SWIG_LUA_CONSTTAB_INT("RIG_OP_BAND_UP", (RIG_OP_BAND_UP))},
    {SWIG_LUA_CONSTTAB_INT("RIG_OP_BAND_DOWN", (RIG_OP_BAND_DOWN))},
    {SWIG_LUA_CONSTTAB_INT("RIG_OP_LEFT", (RIG_OP_LEFT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_OP_RIGHT", (RIG_OP_RIGHT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_OP_TUNE", (RIG_OP_TUNE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_OP_TOGGLE", (RIG_OP_TOGGLE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BAND_160M", (RIG_BAND_160M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BAND_80M", (RIG_BAND_80M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BAND_60M", (RIG_BAND_60M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BAND_40M", (RIG_BAND_40M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BAND_30M", (RIG_BAND_30M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BAND_20M", (RIG_BAND_20M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BAND_17M", (RIG_BAND_17M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BAND_15M", (RIG_BAND_15M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BAND_12M", (RIG_BAND_12M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BAND_10M", (RIG_BAND_10M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BAND_6M", (RIG_BAND_6M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BAND_GEN", (RIG_BAND_GEN))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BAND_MW", (RIG_BAND_MW))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BAND_UNUSED", (RIG_BAND_UNUSED))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BAND_AIR", (RIG_BAND_AIR))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BAND_144MHZ", (RIG_BAND_144MHZ))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BAND_430MHZ", (RIG_BAND_430MHZ))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_UNUSED", (RIG_BANDSELECT_UNUSED))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_2200M", (RIG_BANDSELECT_2200M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_600M", (RIG_BANDSELECT_600M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_160M", (RIG_BANDSELECT_160M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_80M", (RIG_BANDSELECT_80M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_60M", (RIG_BANDSELECT_60M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_40M", (RIG_BANDSELECT_40M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_30M", (RIG_BANDSELECT_30M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_20M", (RIG_BANDSELECT_20M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_17M", (RIG_BANDSELECT_17M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_15M", (RIG_BANDSELECT_15M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_12M", (RIG_BANDSELECT_12M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_10M", (RIG_BANDSELECT_10M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_6M", (RIG_BANDSELECT_6M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_WFM", (RIG_BANDSELECT_WFM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_GEN", (RIG_BANDSELECT_GEN))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_MW", (RIG_BANDSELECT_MW))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_AIR", (RIG_BANDSELECT_AIR))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_4M", (RIG_BANDSELECT_4M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_2M", (RIG_BANDSELECT_2M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_1_25M", (RIG_BANDSELECT_1_25M))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_70CM", (RIG_BANDSELECT_70CM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_33CM", (RIG_BANDSELECT_33CM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_23CM", (RIG_BANDSELECT_23CM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_13CM", (RIG_BANDSELECT_13CM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_9CM", (RIG_BANDSELECT_9CM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_5CM", (RIG_BANDSELECT_5CM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_BANDSELECT_3CM", (RIG_BANDSELECT_3CM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SCAN_NONE", (RIG_SCAN_NONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SCAN_MEM", (RIG_SCAN_MEM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SCAN_SLCT", (RIG_SCAN_SLCT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SCAN_PRIO", (RIG_SCAN_PRIO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SCAN_PROG", (RIG_SCAN_PROG))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SCAN_DELTA", (RIG_SCAN_DELTA))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SCAN_VFO", (RIG_SCAN_VFO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SCAN_PLT", (RIG_SCAN_PLT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SCAN_STOP", (RIG_SCAN_STOP))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CONF_END", (0))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CONF_STRING", (RIG_CONF_STRING))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CONF_COMBO", (RIG_CONF_COMBO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CONF_NUMERIC", (RIG_CONF_NUMERIC))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CONF_CHECKBUTTON", (RIG_CONF_CHECKBUTTON))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CONF_BUTTON", (RIG_CONF_BUTTON))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CONF_BINARY", (RIG_CONF_BINARY))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CONF_INT", (RIG_CONF_INT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_ANN_NONE", (RIG_ANN_NONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_ANN_OFF", (RIG_ANN_OFF))},
    {SWIG_LUA_CONSTTAB_INT("RIG_ANN_FREQ", (RIG_ANN_FREQ))},
    {SWIG_LUA_CONSTTAB_INT("RIG_ANN_RXMODE", (RIG_ANN_RXMODE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_ANN_CW", (RIG_ANN_CW))},
    {SWIG_LUA_CONSTTAB_INT("RIG_ANN_ENG", (RIG_ANN_ENG))},
    {SWIG_LUA_CONSTTAB_INT("RIG_ANN_JAP", (RIG_ANN_JAP))},
    {SWIG_LUA_CONSTTAB_INT("RIG_ANT_NONE", (0))},
    {SWIG_LUA_CONSTTAB_INT("RIG_ANT_MAX", (32))},
    {SWIG_LUA_CONSTTAB_INT("RIG_AGC_LAST", (99999))},
    {SWIG_LUA_CONSTTAB_INT("RIG_METER_NONE", (RIG_METER_NONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_METER_SWR", (RIG_METER_SWR))},
    {SWIG_LUA_CONSTTAB_INT("RIG_METER_COMP", (RIG_METER_COMP))},
    {SWIG_LUA_CONSTTAB_INT("RIG_METER_ALC", (RIG_METER_ALC))},
    {SWIG_LUA_CONSTTAB_INT("RIG_METER_IC", (RIG_METER_IC))},
    {SWIG_LUA_CONSTTAB_INT("RIG_METER_DB", (RIG_METER_DB))},
    {SWIG_LUA_CONSTTAB_INT("RIG_METER_PO", (RIG_METER_PO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_METER_VDD", (RIG_METER_VDD))},
    {SWIG_LUA_CONSTTAB_INT("RIG_METER_TEMP", (RIG_METER_TEMP))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_NONE", (0))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_PREAMP", ((1ul << (0))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_ATT", ((1ul << (1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_VOXDELAY", ((1ul << (2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_AF", ((1ul << (3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_RF", ((1ul << (4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_SQL", ((1ul << (5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_IF", ((1ul << (6))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_APF", ((1ul << (7))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_NR", ((1ul << (8))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_PBT_IN", ((1ul << (9))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_PBT_OUT", ((1ul << (10))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_CWPITCH", ((1ul << (11))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_RFPOWER", ((1ul << (12))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_MICGAIN", ((1ul << (13))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_KEYSPD", ((1ul << (14))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_NOTCHF", ((1ul << (15))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_COMP", ((1ul << (16))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_AGC", ((1ul << (17))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_BKINDL", ((1ul << (18))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_BALANCE", ((1ul << (19))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_METER", ((1ul << (20))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_VOXGAIN", ((1ul << (21))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_ANTIVOX", ((1ul << (22))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_SLOPE_LOW", ((1ul << (23))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_SLOPE_HIGH", ((1ul << (24))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_BKIN_DLYMS", ((1ul << (25))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_RAWSTR", ((1ul << (26))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_SWR", ((1ul << (28))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_ALC", ((1ul << (29))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_STRENGTH", ((1ul << (30))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_RFPOWER_METER", ((1ul << (32))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_COMP_METER", ((1ul << (33))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_VD_METER", ((1ul << (34))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_ID_METER", ((1ul << (35))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_NOTCHF_RAW", ((1ul << (36))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_MONITOR_GAIN", ((1ul << (37))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_NB", ((1ul << (38))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_RFPOWER_METER_WATTS", ((1ul << (39))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_SPECTRUM_MODE", ((1ul << (40))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_SPECTRUM_SPAN", ((1ul << (41))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_SPECTRUM_EDGE_LOW", ((1ul << (42))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_SPECTRUM_EDGE_HIGH", ((1ul << (43))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_SPECTRUM_SPEED", ((1ul << (44))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_SPECTRUM_REF", ((1ul << (45))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_SPECTRUM_AVG", ((1ul << (46))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_SPECTRUM_ATT", ((1ul << (47))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_TEMP_METER", ((1ul << (48))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_BAND_SELECT", ((1ul << (49))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_USB_AF", ((1ul << (50))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_USB_AF_INPUT", ((1ul << (51))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_AGC_TIME", ((1ul << (52))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_53", ((1ul << (53))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_54", ((1ul << (54))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_55", ((1ul << (55))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_56", ((1ul << (56))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_57", ((1ul << (57))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_58", ((1ul << (58))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_59", ((1ul << (59))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_60", ((1ul << (60))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_61", ((1ul << (61))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_62", ((1ul << (62))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_63", ((1ul << (63))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_FLOAT_LIST", (((1ul << (3))|(1ul << (4))|(1ul << (5))|(1ul << (7))|(1ul << (8))|(1ul << (9))|(1ul << (10))|(1ul << (12))|(1ul << (13))|(1ul << (16))|(1ul << (19))|(1ul << (28))|(1ul << (29))|(1ul << (21))|(1ul << (22))|(1ul << (32))|(1ul << (39))|(1ul << (33))|(1ul << (34))|(1ul << (35))|(1ul << (36))|(1ul << (37))|(1ul << (38))|(1ul << (45))|(1ul << (48))|(1ul << (50))|(1ul << (51))|(1ul << (52)))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_LEVEL_READONLY_LIST", (((1ul << (28))|(1ul << (29))|(1ul << (30))|(1ul << (26))|(1ul << (33))|(1ul << (34))|(1ul << (35))|(1ul << (48))|(1ul << (32))|(1ul << (39)))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARM_NONE", (RIG_PARM_NONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARM_ANN", (RIG_PARM_ANN))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARM_APO", (RIG_PARM_APO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARM_BACKLIGHT", (RIG_PARM_BACKLIGHT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARM_BEEP", (RIG_PARM_BEEP))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARM_TIME", (RIG_PARM_TIME))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARM_BAT", (RIG_PARM_BAT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARM_KEYLIGHT", (RIG_PARM_KEYLIGHT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARM_SCREENSAVER", (RIG_PARM_SCREENSAVER))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARM_AFIF", (RIG_PARM_AFIF))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARM_BANDSELECT", (RIG_PARM_BANDSELECT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARM_KEYERTYPE", (RIG_PARM_KEYERTYPE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARM_AFIF_LAN", (RIG_PARM_AFIF_LAN))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARM_AFIF_WLAN", (RIG_PARM_AFIF_WLAN))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PARM_AFIF_ACC", (RIG_PARM_AFIF_ACC))},
    {SWIG_LUA_CONSTTAB_INT("RIG_KEYERTYPE_STRAIGHT", (RIG_KEYERTYPE_STRAIGHT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_KEYERTYPE_BUG", (RIG_KEYERTYPE_BUG))},
    {SWIG_LUA_CONSTTAB_INT("RIG_KEYERTYPE_PADDLE", (RIG_KEYERTYPE_PADDLE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_KEYERTYPE_UNKNOWN", (RIG_KEYERTYPE_UNKNOWN))},
    {SWIG_LUA_CONSTTAB_INT("RIG_COOKIE_GET", (RIG_COOKIE_GET))},
    {SWIG_LUA_CONSTTAB_INT("RIG_COOKIE_RELEASE", (RIG_COOKIE_RELEASE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_COOKIE_RENEW", (RIG_COOKIE_RENEW))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MULTICAST_POLL", (RIG_MULTICAST_POLL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MULTICAST_TRANSCEIVE", (RIG_MULTICAST_TRANSCEIVE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MULTICAST_SPECTRUM", (RIG_MULTICAST_SPECTRUM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SETTING_MAX", (64))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TRN_OFF", (0))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TRN_RIG", (1))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TRN_POLL", (2))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_NONE", (0))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_FAGC", ((1ul << (0))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_NB", ((1ul << (1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_COMP", ((1ul << (2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_VOX", ((1ul << (3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_TONE", ((1ul << (4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_TSQL", ((1ul << (5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_SBKIN", ((1ul << (6))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_FBKIN", ((1ul << (7))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_ANF", ((1ul << (8))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_NR", ((1ul << (9))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_AIP", ((1ul << (10))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_APF", ((1ul << (11))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_MON", ((1ul << (12))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_MN", ((1ul << (13))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_RF", ((1ul << (14))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_ARO", ((1ul << (15))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_LOCK", ((1ul << (16))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_MUTE", ((1ul << (17))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_VSC", ((1ul << (18))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_REV", ((1ul << (19))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_SQL", ((1ul << (20))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_ABM", ((1ul << (21))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_BC", ((1ul << (22))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_MBC", ((1ul << (23))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_RIT", ((1ul << (24))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_AFC", ((1ul << (25))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_SATMODE", ((1ul << (26))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_SCOPE", ((1ul << (27))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_RESUME", ((1ul << (28))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_TBURST", ((1ul << (29))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_TUNER", ((1ul << (30))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_XIT", ((1ul << (31))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_NB2", ((1ul << (32))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_CSQL", ((1ul << (33))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_AFLT", ((1ul << (34))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_ANL", ((1ul << (35))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_BC2", ((1ul << (36))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_DUAL_WATCH", ((1ul << (37))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_DIVERSITY", ((1ul << (38))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_DSQL", ((1ul << (39))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_SCEN", ((1ul << (40))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_SLICE", ((1ul << (41))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_TRANSCEIVE", ((1ul << (42))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_SPECTRUM", ((1ul << (43))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_SPECTRUM_HOLD", ((1ul << (44))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_SEND_MORSE", ((1ul << (45))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_SEND_VOICE_MEM", ((1ul << (46))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_OVF_STATUS", ((1ul << (47))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_SYNC", ((1ul << (48))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_BIT49", ((1ul << (49))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_BIT50", ((1ul << (50))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_BIT51", ((1ul << (51))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_BIT52", ((1ul << (52))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_BIT53", ((1ul << (53))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_BIT54", ((1ul << (54))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_BIT55", ((1ul << (55))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_BIT56", ((1ul << (56))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_BIT57", ((1ul << (57))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_BIT58", ((1ul << (58))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_BIT59", ((1ul << (59))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_BIT60", ((1ul << (60))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_BIT61", ((1ul << (61))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_BIT62", ((1ul << (62))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNC_BIT63", ((1ul << (63))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_NONE", (0))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_AM", ((1ul << (0))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_CW", ((1ul << (1))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_USB", ((1ul << (2))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_LSB", ((1ul << (3))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_RTTY", ((1ul << (4))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_FM", ((1ul << (5))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_WFM", ((1ul << (6))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_CWR", ((1ul << (7))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_RTTYR", ((1ul << (8))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_AMS", ((1ul << (9))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_PKTLSB", ((1ul << (10))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_PKTUSB", ((1ul << (11))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_PKTFM", ((1ul << (12))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_ECSSUSB", ((1ul << (13))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_ECSSLSB", ((1ul << (14))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_FAX", ((1ul << (15))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_SAM", ((1ul << (16))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_SAL", ((1ul << (17))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_SAH", ((1ul << (18))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_DSB", ((1ul << (19))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_FMN", ((1ul << (21))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_PKTAM", ((1ul << (22))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_P25", ((1ul << (23))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_DSTAR", ((1ul << (24))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_DPMR", ((1ul << (25))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_NXDNVN", ((1ul << (26))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_NXDN_N", ((1ul << (27))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_DCR", ((1ul << (28))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_AMN", ((1ul << (29))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_PSK", ((1ul << (30))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_PSKR", ((1ul << (31))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_DD", ((1ul << (32))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_C4FM", ((1ul << (33))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_PKTFMN", ((1ul << (34))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_SPEC", ((1ul << (35))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_CWN", ((1ul << (36))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_IQ", ((1ul << (37))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_ISBUSB", ((1ul << (38))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_ISBLSB", ((1ul << (39))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_USBD1", ((1ul << (40))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_USBD2", ((1ul << (41))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_USBD3", ((1ul << (42))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_LSBD1", ((1ul << (43))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_LSBD2", ((1ul << (44))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_LSBD3", ((1ul << (45))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_WFMS", ((1ul << (46))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_BIT47", ((1ul << (47))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_BIT48", ((1ul << (48))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_BIT49", ((1ul << (49))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_BIT50", ((1ul << (50))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_BIT51", ((1ul << (51))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_BIT52", ((1ul << (52))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_BIT53", ((1ul << (53))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_BIT54", ((1ul << (54))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_BIT55", ((1ul << (55))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_BIT56", ((1ul << (56))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_BIT57", ((1ul << (57))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_BIT58", ((1ul << (58))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_BIT59", ((1ul << (59))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_BIT60", ((1ul << (60))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_BIT61", ((1ul << (61))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_BIT62", ((1ul << (62))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_TESTS_MAX", ((1ul << (63))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_ALL", ((0xffffffff)))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_SSB", (((1ul << (2))|(1ul << (3)))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_PKTSSB", (((1ul << (11))|(1ul << (10)))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MODE_ECSS", (((1ul << (13))|(1ul << (14)))))},
    {SWIG_LUA_CONSTTAB_INT("RIG_TS_ANY", (0))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FLT_ANY", (0))},
    {SWIG_LUA_CONSTTAB_INT("DEBUGMSGSAVE_SIZE", (24000))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CHFLAG_NONE", (0))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CHFLAG_SKIP", ((1 << 0)))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CHFLAG_DATA", ((1 << 1)))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CHFLAG_PSKIP", ((1 << 2)))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MTYPE_NONE", (RIG_MTYPE_NONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MTYPE_MEM", (RIG_MTYPE_MEM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MTYPE_EDGE", (RIG_MTYPE_EDGE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MTYPE_CALL", (RIG_MTYPE_CALL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MTYPE_MEMOPAD", (RIG_MTYPE_MEMOPAD))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MTYPE_SAT", (RIG_MTYPE_SAT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MTYPE_BAND", (RIG_MTYPE_BAND))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MTYPE_PRIO", (RIG_MTYPE_PRIO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MTYPE_VOICE", (RIG_MTYPE_VOICE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MTYPE_MORSE", (RIG_MTYPE_MORSE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MTYPE_SPLIT", (RIG_MTYPE_SPLIT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_MEM_CAPS_ALL", (-1))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SPECTRUM_MODE_NONE", (RIG_SPECTRUM_MODE_NONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SPECTRUM_MODE_CENTER", (RIG_SPECTRUM_MODE_CENTER))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SPECTRUM_MODE_FIXED", (RIG_SPECTRUM_MODE_FIXED))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SPECTRUM_MODE_CENTER_SCROLL", (RIG_SPECTRUM_MODE_CENTER_SCROLL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_SPECTRUM_MODE_FIXED_SCROLL", (RIG_SPECTRUM_MODE_FIXED_SCROLL))},
    {SWIG_LUA_CONSTTAB_STRING("HAMLIB_CHECK_RIG_CAPS", "HAMLIB_CHECK_RIG_CAPS")},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_INIT", (RIG_FUNCTION_INIT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_CLEANUP", (RIG_FUNCTION_CLEANUP))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_OPEN", (RIG_FUNCTION_OPEN))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_CLOSE", (RIG_FUNCTION_CLOSE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_FREQ", (RIG_FUNCTION_SET_FREQ))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_FREQ", (RIG_FUNCTION_GET_FREQ))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_MODE", (RIG_FUNCTION_SET_MODE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_MODE", (RIG_FUNCTION_GET_MODE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_VFO", (RIG_FUNCTION_SET_VFO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_VFO", (RIG_FUNCTION_GET_VFO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_PTT", (RIG_FUNCTION_SET_PTT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_PTT", (RIG_FUNCTION_GET_PTT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_DCD", (RIG_FUNCTION_GET_DCD))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_RPTR_SHIFT", (RIG_FUNCTION_SET_RPTR_SHIFT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_RPTR_SHIFT", (RIG_FUNCTION_GET_RPTR_SHIFT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_RPTR_OFFS", (RIG_FUNCTION_SET_RPTR_OFFS))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_RPTR_OFFS", (RIG_FUNCTION_GET_RPTR_OFFS))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_SPLIT_FREQ", (RIG_FUNCTION_SET_SPLIT_FREQ))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_SPLIT_FREQ", (RIG_FUNCTION_GET_SPLIT_FREQ))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_SPLIT_MODE", (RIG_FUNCTION_SET_SPLIT_MODE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_SPLIT_FREQ_MODE", (RIG_FUNCTION_SET_SPLIT_FREQ_MODE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_SPLIT_FREQ_MODE", (RIG_FUNCTION_GET_SPLIT_FREQ_MODE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_SPLIT_VFO", (RIG_FUNCTION_SET_SPLIT_VFO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_SPLIT_VFO", (RIG_FUNCTION_GET_SPLIT_VFO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_RIT", (RIG_FUNCTION_SET_RIT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_RIT", (RIG_FUNCTION_GET_RIT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_XIT", (RIG_FUNCTION_SET_XIT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_XIT", (RIG_FUNCTION_GET_XIT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_TS", (RIG_FUNCTION_SET_TS))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_TS", (RIG_FUNCTION_GET_TS))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_DCS_CODE", (RIG_FUNCTION_SET_DCS_CODE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_DCS_CODE", (RIG_FUNCTION_GET_DCS_CODE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_TONE", (RIG_FUNCTION_SET_TONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_TONE", (RIG_FUNCTION_GET_TONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_CTCSS_TONE", (RIG_FUNCTION_SET_CTCSS_TONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_CTCSS_TONE", (RIG_FUNCTION_GET_CTCSS_TONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_DCS_SQL", (RIG_FUNCTION_SET_DCS_SQL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_DCS_SQL", (RIG_FUNCTION_GET_DCS_SQL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_TONE_SQL", (RIG_FUNCTION_SET_TONE_SQL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_TONE_SQL", (RIG_FUNCTION_GET_TONE_SQL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_CTCSS_SQL", (RIG_FUNCTION_SET_CTCSS_SQL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_CTCSS_SQL", (RIG_FUNCTION_GET_CTCSS_SQL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_POWER2MW", (RIG_FUNCTION_POWER2MW))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_MW2POWER", (RIG_FUNCTION_MW2POWER))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_POWERSTAT", (RIG_FUNCTION_SET_POWERSTAT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_POWERSTAT", (RIG_FUNCTION_GET_POWERSTAT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_RESET", (RIG_FUNCTION_RESET))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_ANT", (RIG_FUNCTION_SET_ANT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_ANT", (RIG_FUNCTION_GET_ANT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_LEVEL", (RIG_FUNCTION_SET_LEVEL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_LEVEL", (RIG_FUNCTION_GET_LEVEL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_FUNC", (RIG_FUNCTION_SET_FUNC))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_FUNC", (RIG_FUNCTION_GET_FUNC))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_PARM", (RIG_FUNCTION_SET_PARM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_PARM", (RIG_FUNCTION_GET_PARM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_EXT_LEVEL", (RIG_FUNCTION_SET_EXT_LEVEL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_EXT_LEVEL", (RIG_FUNCTION_GET_EXT_LEVEL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_EXT_FUNC", (RIG_FUNCTION_SET_EXT_FUNC))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_EXT_FUNC", (RIG_FUNCTION_GET_EXT_FUNC))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_EXT_PARM", (RIG_FUNCTION_SET_EXT_PARM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_EXT_PARM", (RIG_FUNCTION_GET_EXT_PARM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_CONF", (RIG_FUNCTION_SET_CONF))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_CONF", (RIG_FUNCTION_GET_CONF))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SEND_DTMF", (RIG_FUNCTION_SEND_DTMF))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SEND_MORSE", (RIG_FUNCTION_SEND_MORSE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_STOP_MORSE", (RIG_FUNCTION_STOP_MORSE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_WAIT_MORSE", (RIG_FUNCTION_WAIT_MORSE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SEND_VOICE_MEM", (RIG_FUNCTION_SEND_VOICE_MEM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_BANK", (RIG_FUNCTION_SET_BANK))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_MEM", (RIG_FUNCTION_SET_MEM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_MEM", (RIG_FUNCTION_GET_MEM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_VFO_OP", (RIG_FUNCTION_VFO_OP))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SCAN", (RIG_FUNCTION_SCAN))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_TRN", (RIG_FUNCTION_SET_TRN))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_TRN", (RIG_FUNCTION_GET_TRN))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_DECODE_EVENT", (RIG_FUNCTION_DECODE_EVENT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_CHANNEL", (RIG_FUNCTION_SET_CHANNEL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_CHANNEL", (RIG_FUNCTION_GET_CHANNEL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_INFO", (RIG_FUNCTION_GET_INFO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_CHAN_ALL_CB", (RIG_FUNCTION_SET_CHAN_ALL_CB))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_CHAN_ALL_CB", (RIG_FUNCTION_GET_CHAN_ALL_CB))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_MEM_ALL_CB", (RIG_FUNCTION_SET_MEM_ALL_CB))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_MEM_ALL_CB", (RIG_FUNCTION_GET_MEM_ALL_CB))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_SET_VFO_OPT", (RIG_FUNCTION_SET_VFO_OPT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_READ_FRAME_DIRECT", (RIG_FUNCTION_READ_FRAME_DIRECT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_IS_ASYNC_FRAME", (RIG_FUNCTION_IS_ASYNC_FRAME))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_PROCESS_ASYNC_FRAME", (RIG_FUNCTION_PROCESS_ASYNC_FRAME))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_GET_CONF2", (RIG_FUNCTION_GET_CONF2))},
    {SWIG_LUA_CONSTTAB_INT("RIG_FUNCTION_STOP_VOICE_MEM", (RIG_FUNCTION_STOP_VOICE_MEM))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CAPS_TARGETABLE_VFO", (RIG_CAPS_TARGETABLE_VFO))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CAPS_RIG_MODEL", (RIG_CAPS_RIG_MODEL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CAPS_PORT_TYPE", (RIG_CAPS_PORT_TYPE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CAPS_PTT_TYPE", (RIG_CAPS_PTT_TYPE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CAPS_HAS_GET_LEVEL", (RIG_CAPS_HAS_GET_LEVEL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CAPS_HAS_SET_LEVEL", (RIG_CAPS_HAS_SET_LEVEL))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CAPS_VERSION_CPTR", (RIG_CAPS_VERSION_CPTR))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CAPS_MFG_NAME_CPTR", (RIG_CAPS_MFG_NAME_CPTR))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CAPS_MODEL_NAME_CPTR", (RIG_CAPS_MODEL_NAME_CPTR))},
    {SWIG_LUA_CONSTTAB_INT("RIG_CAPS_STATUS_CPTR", (RIG_CAPS_STATUS_CPTR))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTRX_NONE", (RIG_PTRX_NONE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTRX_RIGPORT", (RIG_PTRX_RIGPORT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTRX_PTTPORT", (RIG_PTRX_PTTPORT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTRX_DCDPORT", (RIG_PTRX_DCDPORT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTRX_CACHE", (RIG_PTRX_CACHE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTRX_AMPPORT", (RIG_PTRX_AMPPORT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTRX_ROTPORT", (RIG_PTRX_ROTPORT))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTRX_ROTPORT2", (RIG_PTRX_ROTPORT2))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTRX_STATE", (RIG_PTRX_STATE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTRX_AMPSTATE", (RIG_PTRX_AMPSTATE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTRX_ROTSTATE", (RIG_PTRX_ROTSTATE))},
    {SWIG_LUA_CONSTTAB_INT("RIG_PTRX_MAXIMUM", (RIG_PTRX_MAXIMUM))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_ELAPSED_GET", (0))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_ELAPSED_SET", (1))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_ELAPSED_INVALIDATE", (2))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_CACHE_ALWAYS", ((-1)))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_CACHE_ALL", (HAMLIB_CACHE_ALL))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_CACHE_VFO", (HAMLIB_CACHE_VFO))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_CACHE_FREQ", (HAMLIB_CACHE_FREQ))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_CACHE_MODE", (HAMLIB_CACHE_MODE))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_CACHE_PTT", (HAMLIB_CACHE_PTT))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_CACHE_SPLIT", (HAMLIB_CACHE_SPLIT))},
    {SWIG_LUA_CONSTTAB_INT("HAMLIB_CACHE_WIDTH", (HAMLIB_CACHE_WIDTH))},
    {SWIG_LUA_CONSTTAB_INT("TWIDDLE_OFF", (TWIDDLE_OFF))},
    {SWIG_LUA_CONSTTAB_INT("TWIDDLE_ON", (TWIDDLE_ON))},
    {SWIG_LUA_CONSTTAB_INT("RIG_COMM_STATUS_OK", (0x00))},
    {SWIG_LUA_CONSTTAB_INT("RIG_COMM_STATUS_CONNECTING", (0x01))},
    {SWIG_LUA_CONSTTAB_INT("RIG_COMM_STATUS_DISCONNECTED", (0x02))},
    {SWIG_LUA_CONSTTAB_INT("RIG_COMM_STATUS_TERMINATED", (0x03))},
    {SWIG_LUA_CONSTTAB_INT("RIG_COMM_STATUS_WARNING", (0x04))},
    {SWIG_LUA_CONSTTAB_INT("RIG_COMM_STATUS_ERROR", (0x05))},
    {SWIG_LUA_CONSTTAB_STRING("HAMLIB_SETTINGS_FILE", "hamlib_settings")},
    {SWIG_LUA_CONSTTAB_INT("GPIO1", (GPIO1))},
    {SWIG_LUA_CONSTTAB_INT("GPIO2", (GPIO2))},
    {SWIG_LUA_CONSTTAB_INT("GPIO3", (GPIO3))},
    {SWIG_LUA_CONSTTAB_INT("GPIO4", (GPIO4))},
    {SWIG_LUA_CONSTTAB_STRING("NETROTCTL_RET", "RPRT ")},
    {SWIG_LUA_CONSTTAB_INT("ROT_RESET_ALL", (1))},
    {SWIG_LUA_CONSTTAB_INT("ROT_FLAG_AZIMUTH", (ROT_FLAG_AZIMUTH))},
    {SWIG_LUA_CONSTTAB_INT("ROT_FLAG_ELEVATION", (ROT_FLAG_ELEVATION))},
    {SWIG_LUA_CONSTTAB_INT("ROT_TYPE_OTHER", (0))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MOVE_UP", ((1 << 1)))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MOVE_DOWN", ((1 << 2)))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MOVE_LEFT", ((1 << 3)))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MOVE_CCW", ((1 << 3)))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MOVE_RIGHT", ((1 << 4)))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MOVE_CW", ((1 << 4)))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MOVE_UP_LEFT", ((1 << 5)))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MOVE_UP_CCW", ((1 << 5)))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MOVE_UP_RIGHT", ((1 << 6)))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MOVE_UP_CW", ((1 << 6)))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MOVE_DOWN_LEFT", ((1 << 7)))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MOVE_DOWN_CCW", ((1 << 7)))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MOVE_DOWN_RIGHT", ((1 << 8)))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MOVE_DOWN_CW", ((1 << 8)))},
    {SWIG_LUA_CONSTTAB_INT("ROT_STATUS_NONE", (ROT_STATUS_NONE))},
    {SWIG_LUA_CONSTTAB_INT("ROT_STATUS_BUSY", (ROT_STATUS_BUSY))},
    {SWIG_LUA_CONSTTAB_INT("ROT_STATUS_MOVING", (ROT_STATUS_MOVING))},
    {SWIG_LUA_CONSTTAB_INT("ROT_STATUS_MOVING_AZ", (ROT_STATUS_MOVING_AZ))},
    {SWIG_LUA_CONSTTAB_INT("ROT_STATUS_MOVING_LEFT", (ROT_STATUS_MOVING_LEFT))},
    {SWIG_LUA_CONSTTAB_INT("ROT_STATUS_MOVING_RIGHT", (ROT_STATUS_MOVING_RIGHT))},
    {SWIG_LUA_CONSTTAB_INT("ROT_STATUS_MOVING_EL", (ROT_STATUS_MOVING_EL))},
    {SWIG_LUA_CONSTTAB_INT("ROT_STATUS_MOVING_UP", (ROT_STATUS_MOVING_UP))},
    {SWIG_LUA_CONSTTAB_INT("ROT_STATUS_MOVING_DOWN", (ROT_STATUS_MOVING_DOWN))},
    {SWIG_LUA_CONSTTAB_INT("ROT_STATUS_LIMIT_UP", (ROT_STATUS_LIMIT_UP))},
    {SWIG_LUA_CONSTTAB_INT("ROT_STATUS_LIMIT_DOWN", (ROT_STATUS_LIMIT_DOWN))},
    {SWIG_LUA_CONSTTAB_INT("ROT_STATUS_LIMIT_LEFT", (ROT_STATUS_LIMIT_LEFT))},
    {SWIG_LUA_CONSTTAB_INT("ROT_STATUS_LIMIT_RIGHT", (ROT_STATUS_LIMIT_RIGHT))},
    {SWIG_LUA_CONSTTAB_INT("ROT_STATUS_OVERLAP_UP", (ROT_STATUS_OVERLAP_UP))},
    {SWIG_LUA_CONSTTAB_INT("ROT_STATUS_OVERLAP_DOWN", (ROT_STATUS_OVERLAP_DOWN))},
    {SWIG_LUA_CONSTTAB_INT("ROT_STATUS_OVERLAP_LEFT", (ROT_STATUS_OVERLAP_LEFT))},
    {SWIG_LUA_CONSTTAB_INT("ROT_STATUS_OVERLAP_RIGHT", (ROT_STATUS_OVERLAP_RIGHT))},
    {SWIG_LUA_CONSTTAB_INT("ROT_SPEED_NOCHANGE", ((-1)))},
    {SWIG_LUA_CONSTTAB_INT("ROT_LEVEL_NONE", (ROT_LEVEL_NONE))},
    {SWIG_LUA_CONSTTAB_INT("ROT_LEVEL_SPEED", (ROT_LEVEL_SPEED))},
    {SWIG_LUA_CONSTTAB_INT("ROT_LEVEL_63", (ROT_LEVEL_63))},
    {SWIG_LUA_CONSTTAB_INT("ROT_LEVEL_FLOAT_LIST", ((0)))},
    {SWIG_LUA_CONSTTAB_INT("ROT_LEVEL_READONLY_LIST", ((0)))},
    {SWIG_LUA_CONSTTAB_INT("ROT_PARM_NONE", (ROT_PARM_NONE))},
    {SWIG_LUA_CONSTTAB_INT("ROT_PARM_FLOAT_LIST", ((0)))},
    {SWIG_LUA_CONSTTAB_INT("ROT_PARM_READONLY_LIST", ((0)))},
    {SWIG_LUA_CONSTTAB_INT("ROT_FUNC_NONE", (0))},
    {SWIG_LUA_CONSTTAB_INT("ROT_FUNC_BIT63", ((1ul << (63))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_NONE", (0))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_DUMMY", ((100*(0)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_NETROTCTL", ((100*(0)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_PSTROTATOR", ((100*(0)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_SATROTCTL", ((100*(0)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_EASYCOMM1", ((100*(2)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_EASYCOMM2", ((100*(2)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_EASYCOMM3", ((100*(2)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_FODTRACK", ((100*(3)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_ROTOREZ", ((100*(4)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_ROTORCARD", ((100*(4)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_DCU", ((100*(4)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_ERC", ((100*(4)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_RT21", ((100*(4)+(5))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_YRC1", ((100*(4)+(6))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_SARTEK1", ((100*(5)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_GS232A", ((100*(6)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_GS232_GENERIC", ((100*(6)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_GS232B", ((100*(6)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_F1TETRACKER", ((100*(6)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_GS23", ((100*(6)+(5))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_GS232", ((100*(6)+(6))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_LVB", ((100*(6)+(7))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_ST2", ((100*(6)+(8))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_GS232A_AZ", ((100*(6)+(9))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_GS232A_EL", ((100*(6)+(10))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_GS232B_AZ", ((100*(6)+(11))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_GS232B_EL", ((100*(6)+(12))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_GS23_AZ", ((100*(6)+(13))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_AF6SA_WRC", ((100*(6)+(14))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_ARRAYSOLUTIONS_SAL_12_20_30", ((100*(327)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_PCROTOR", ((100*(7)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_HD1780", ((100*(8)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_SPID_ROT2PROG", ((100*(9)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_SPID_ROT1PROG", ((100*(9)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_SPID_MD01_ROT2PROG", ((100*(9)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_RC2800", ((100*(10)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_RC2800_EARLY_AZ", ((100*(10)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_RC2800_EARLY_AZEL", ((100*(10)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_RCI_AZEL", ((100*(11)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_RCI_AZ", ((100*(11)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_IF100", ((100*(12)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_TS7400", ((100*(13)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_NEXSTAR", ((100*(14)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_ETHER6", ((100*(15)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_CNCTRK", ((100*(16)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_PROSISTEL_D_AZ", ((100*(17)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_PROSISTEL_D_EL", ((100*(17)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL", ((100*(17)+(3))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_PROSISTEL_D_EL_CBOXAZ", ((100*(17)+(4))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_MEADE", ((100*(18)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_IOPTRON", ((100*(19)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_INDI", ((100*(20)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_SATEL", ((100*(21)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_RADANT", ((100*(22)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_ANDROIDSENSOR", ((100*(23)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_GRBLTRK_SER", ((100*(24)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_GRBLTRK_NET", ((100*(24)+(2))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_FLIR", ((100*(25)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_APEX_SHARED_LOOP", ((100*(26)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_SAEBRTRACK", ((100*(27)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("ROT_MODEL_SKYWATCHER", ((100*(28)+(1))))},
    {SWIG_LUA_CONSTTAB_INT("AMP_MODEL_NONE", (0))},
    {SWIG_LUA_CONSTTAB_INT("AMP_MODEL_DUMMY", (((0)*100+(1))))},
    {SWIG_LUA_CONSTTAB_INT("AMP_MODEL_NETAMPCTL", (((0)*100+(2))))},
    {SWIG_LUA_CONSTTAB_INT("AMP_MODEL_ELECRAFT_KPA1500", (((2)*100+(1))))},
    {SWIG_LUA_CONSTTAB_INT("AMP_MODEL_GEMINI_DX1200", (((3)*100+(1))))},
    {SWIG_LUA_CONSTTAB_INT("AMP_MODEL_EXPERT_FA", (((4)*100+(1))))},
    {SWIG_LUA_CONSTTAB_STRING("NETAMPCTL_RET", "RPRT ")},
    {SWIG_LUA_CONSTTAB_INT("AMP_RESET_MEM", (AMP_RESET_MEM))},
    {SWIG_LUA_CONSTTAB_INT("AMP_RESET_FAULT", (AMP_RESET_FAULT))},
    {SWIG_LUA_CONSTTAB_INT("AMP_RESET_AMP", (AMP_RESET_AMP))},
    {SWIG_LUA_CONSTTAB_INT("AMP_FLAG_1", (AMP_FLAG_1))},
    {SWIG_LUA_CONSTTAB_INT("AMP_FLAG_2", (AMP_FLAG_2))},
    {SWIG_LUA_CONSTTAB_INT("AMP_TYPE_OTHER", (0))},
    {SWIG_LUA_CONSTTAB_INT("AMP_LEVEL_NONE", (AMP_LEVEL_NONE))},
    {SWIG_LUA_CONSTTAB_INT("AMP_LEVEL_SWR", (AMP_LEVEL_SWR))},
    {SWIG_LUA_CONSTTAB_INT("AMP_LEVEL_NH", (AMP_LEVEL_NH))},
    {SWIG_LUA_CONSTTAB_INT("AMP_LEVEL_PF", (AMP_LEVEL_PF))},
    {SWIG_LUA_CONSTTAB_INT("AMP_LEVEL_PWR_INPUT", (AMP_LEVEL_PWR_INPUT))},
    {SWIG_LUA_CONSTTAB_INT("AMP_LEVEL_PWR_FWD", (AMP_LEVEL_PWR_FWD))},
    {SWIG_LUA_CONSTTAB_INT("AMP_LEVEL_PWR_REFLECTED", (AMP_LEVEL_PWR_REFLECTED))},
    {SWIG_LUA_CONSTTAB_INT("AMP_LEVEL_PWR_PEAK", (AMP_LEVEL_PWR_PEAK))},
    {SWIG_LUA_CONSTTAB_INT("AMP_LEVEL_FAULT", (AMP_LEVEL_FAULT))},
    {SWIG_LUA_CONSTTAB_INT("AMP_LEVEL_PWR", (AMP_LEVEL_PWR))},
    {0,0,0,0,0,0}
};
static swig_lua_method swig_SwigModule_methods[]= {
    { "netrigctl_get_vfo_mode", _wrap_netrigctl_get_vfo_mode},
    { "rigerror", _wrap_rigerror},
    { "rigerror2", _wrap_rigerror2},
    { "rig_set_debug", _wrap_rig_set_debug},
    { "rig_get_debug", _wrap_rig_get_debug},
    { "rig_set_debug_time_stamp", _wrap_rig_set_debug_time_stamp},
    { "add2debugmsgsave", _wrap_add2debugmsgsave},
    { "rig_strrmode", _wrap_rig_strrmode},
    { "rig_strrmodes", _wrap_rig_strrmodes},
    { "rig_strvfo", _wrap_rig_strvfo},
    { "rig_strfunc", _wrap_rig_strfunc},
    { "rig_strlevel", _wrap_rig_strlevel},
    { "rig_strparm", _wrap_rig_strparm},
    { "rig_stragclevel", _wrap_rig_stragclevel},
    { "rig_strptrshift", _wrap_rig_strptrshift},
    { "rig_strvfop", _wrap_rig_strvfop},
    { "rig_strscan", _wrap_rig_strscan},
    { "rig_strstatus", _wrap_rig_strstatus},
    { "rig_strmtype", _wrap_rig_strmtype},
    { "rig_strspectrummode", _wrap_rig_strspectrummode},
    { "rig_strcommstatus", _wrap_rig_strcommstatus},
    { "hl_usleep", _wrap_hl_usleep},
    { "longlat2locator", _wrap_longlat2locator},
    { "locator2longlat", _wrap_locator2longlat},
    { "channelArray_frompointer", _wrap_channelArray_frompointer},
    { "toneArray_frompointer", _wrap_toneArray_frompointer},
    { "qrb", _wrap_qrb},
    { "distance_long_path", _wrap_distance_long_path},
    { "azimuth_long_path", _wrap_azimuth_long_path},
    { "dms2dec", _wrap_dms2dec},
    { "dec2dms", _wrap_dec2dms},
    { "dec2dmmm", _wrap_dec2dmmm},
    { "dmmm2dec", _wrap_dmmm2dec},
    {0,0}
};
static swig_lua_class* swig_SwigModule_classes[]= {
&_wrap_class_confparams,
&_wrap_class_confparams_u,
&_wrap_class_confparams_u_c,
&_wrap_class_confparams_u_n,
&_wrap_class_value_t,
&_wrap_class_value_t_b,
&_wrap_class_freq_range_t,
&_wrap_class_tuning_step_list,
&_wrap_class_filter_list,
&_wrap_class_ext_list,
&_wrap_class_channel,
&_wrap_class_channel_cap,
&_wrap_class_chan_list,
&_wrap_class_gran,
&_wrap_class_cal_table,
&_wrap_class_cal_table_table,
&_wrap_class_cal_table_float,
&_wrap_class_cal_table_float_table,
&_wrap_class_rig_spectrum_scope,
&_wrap_class_rig_spectrum_avg_mode,
&_wrap_class_rig_spectrum_line,
&_wrap_class_deferred_config_item,
&_wrap_class_deferred_config_header,
&_wrap_class_rig_caps,
&_wrap_class_multicast_s,
&_wrap_class_rig_callbacks,
&_wrap_class_rig_state,
&_wrap_class_Rig,
&_wrap_class_channelArray,
&_wrap_class_toneArray,
&_wrap_class_rot_caps,
&_wrap_class_rot_state,
&_wrap_class_Rot,
&_wrap_class_amp_caps,
&_wrap_class_amp_state,
&_wrap_class_Amp,
    0
};
static swig_lua_namespace* swig_SwigModule_namespaces[] = {
    0
};

static swig_lua_namespace swig_SwigModule = {
    "Hamliblua",
    swig_SwigModule_methods,
    swig_SwigModule_attributes,
    swig_SwigModule_constants,
    swig_SwigModule_classes,
    swig_SwigModule_namespaces
};
#ifdef __cplusplus
}
#endif

/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */

static void *_p_channelArrayTo_p_channel(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((struct channel *)  ((channelArray *) x));
}
static swig_type_info _swigt__p_Amp = {"_p_Amp", "Amp *|struct Amp *", 0, 0, (void*)&_wrap_class_Amp, 0};
static swig_type_info _swigt__p_FIFO_RIG_s = {"_p_FIFO_RIG_s", "struct FIFO_RIG_s *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Rig = {"_p_Rig", "Rig *|struct Rig *", 0, 0, (void*)&_wrap_class_Rig, 0};
static swig_type_info _swigt__p_Rot = {"_p_Rot", "Rot *|struct Rot *", 0, 0, (void*)&_wrap_class_Rot, 0};
static swig_type_info _swigt__p_agc_level_e = {"_p_agc_level_e", "enum agc_level_e *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_amp = {"_p_amp", "AMP *|struct amp *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_amp_caps = {"_p_amp_caps", "struct amp_caps *|amp_caps *", 0, 0, (void*)&_wrap_class_amp_caps, 0};
static swig_type_info _swigt__p_amp_reset_e = {"_p_amp_reset_e", "amp_reset_t *|enum amp_reset_e *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_amp_state = {"_p_amp_state", "struct amp_state *|amp_state *", 0, 0, (void*)&_wrap_class_amp_state, 0};
static swig_type_info _swigt__p_amp_type_e = {"_p_amp_type_e", "amp_type_t *|enum amp_type_e *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ann_t = {"_p_ann_t", "ann_t *|enum ann_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_cal_table = {"_p_cal_table", "cal_table_t *|struct cal_table *|cal_table *", 0, 0, (void*)&_wrap_class_cal_table, 0};
static swig_type_info _swigt__p_cal_table_float = {"_p_cal_table_float", "cal_table_float_t *|struct cal_table_float *|cal_table_float *", 0, 0, (void*)&_wrap_class_cal_table_float, 0};
static swig_type_info _swigt__p_cal_table_float_table = {"_p_cal_table_float_table", "cal_table_float_table *", 0, 0, (void*)&_wrap_class_cal_table_float_table, 0};
static swig_type_info _swigt__p_cal_table_table = {"_p_cal_table_table", "cal_table_table *", 0, 0, (void*)&_wrap_class_cal_table_table, 0};
static swig_type_info _swigt__p_chan_list = {"_p_chan_list", "chan_t *|struct chan_list *|chan_list *", 0, 0, (void*)&_wrap_class_chan_list, 0};
static swig_type_info _swigt__p_chan_type_t = {"_p_chan_type_t", "chan_type_t *|enum chan_type_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_channel = {"_p_channel", "channel_t *|struct channel *|channel *", 0, 0, (void*)&_wrap_class_channel, 0};
static swig_type_info _swigt__p_channelArray = {"_p_channelArray", "channelArray *", 0, 0, (void*)&_wrap_class_channelArray, 0};
static swig_type_info _swigt__p_channel_cap = {"_p_channel_cap", "channel_cap_t *|struct channel_cap *|channel_cap *", 0, 0, (void*)&_wrap_class_channel_cap, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_client_e = {"_p_client_e", "client_t *|enum client_e *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_confparams = {"_p_confparams", "struct confparams *|confparams *", 0, 0, (void*)&_wrap_class_confparams, 0};
static swig_type_info _swigt__p_confparams_u = {"_p_confparams_u", "confparams_u *", 0, 0, (void*)&_wrap_class_confparams_u, 0};
static swig_type_info _swigt__p_confparams_u_c = {"_p_confparams_u_c", "confparams_u_c *", 0, 0, (void*)&_wrap_class_confparams_u_c, 0};
static swig_type_info _swigt__p_confparams_u_n = {"_p_confparams_u_n", "confparams_u_n *", 0, 0, (void*)&_wrap_class_confparams_u_n, 0};
static swig_type_info _swigt__p_dcd_e = {"_p_dcd_e", "dcd_t *|enum dcd_e *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_dcd_type_e = {"_p_dcd_type_e", "dcd_type_t *|enum dcd_type_e *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_deferred_config_header = {"_p_deferred_config_header", "deferred_config_header_t *|struct deferred_config_header *|deferred_config_header *", 0, 0, (void*)&_wrap_class_deferred_config_header, 0};
static swig_type_info _swigt__p_deferred_config_item = {"_p_deferred_config_item", "deferred_config_item_t *|struct deferred_config_item *|deferred_config_item *", 0, 0, (void*)&_wrap_class_deferred_config_item, 0};
static swig_type_info _swigt__p_double = {"_p_double", "freq_t *|double *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ext_list = {"_p_ext_list", "struct ext_list *|ext_list *", 0, 0, (void*)&_wrap_class_ext_list, 0};
static swig_type_info _swigt__p_f_p_struct_amp__int = {"_p_f_p_struct_amp__int", "int (*)(AMP *)|int (*)(struct amp *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_amp__p_char = {"_p_f_p_struct_amp__p_char", "char *(*)(AMP *)|char *(*)(struct amp *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_amp_double__int = {"_p_f_p_struct_amp_double__int", "int (*)(AMP *,freq_t)|int (*)(struct amp *,double)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_amp_enum_amp_reset_e__int = {"_p_f_p_struct_amp_enum_amp_reset_e__int", "int (*)(AMP *,amp_reset_t)|int (*)(struct amp *,enum amp_reset_e)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_amp_enum_powerstat_t__int = {"_p_f_p_struct_amp_enum_powerstat_t__int", "int (*)(AMP *,powerstat_t)|int (*)(struct amp *,enum powerstat_t)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_amp_long_p_char__int = {"_p_f_p_struct_amp_long_p_char__int", "int (*)(AMP *,hamlib_token_t,char *)|int (*)(struct amp *,long,char *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_amp_long_p_char_int__int = {"_p_f_p_struct_amp_long_p_char_int__int", "int (*)(AMP *,hamlib_token_t,char *,int)|int (*)(struct amp *,long,char *,int)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_amp_long_p_q_const__char__int = {"_p_f_p_struct_amp_long_p_q_const__char__int", "int (*)(AMP *,hamlib_token_t,char const *)|int (*)(struct amp *,long,char const *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_amp_long_p_value_t__int = {"_p_f_p_struct_amp_long_p_value_t__int", "int (*)(AMP *,hamlib_token_t,value_t *)|int (*)(struct amp *,long,value_t *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_amp_long_value_t__int = {"_p_f_p_struct_amp_long_value_t__int", "int (*)(AMP *,hamlib_token_t,value_t)|int (*)(struct amp *,long,value_t)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_amp_p_double__int = {"_p_f_p_struct_amp_p_double__int", "int (*)(AMP *,freq_t *)|int (*)(struct amp *,double *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_amp_p_enum_powerstat_t__int = {"_p_f_p_struct_amp_p_enum_powerstat_t__int", "int (*)(AMP *,powerstat_t *)|int (*)(struct amp *,enum powerstat_t *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_amp_unsigned_long_long_p_value_t__int = {"_p_f_p_struct_amp_unsigned_long_long_p_value_t__int", "int (*)(AMP *,setting_t,value_t *)|int (*)(struct amp *,unsigned long long,value_t *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_amp_unsigned_long_long_value_t__int = {"_p_f_p_struct_amp_unsigned_long_long_value_t__int", "int (*)(AMP *,setting_t,value_t)|int (*)(struct amp *,unsigned long long,value_t)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig__int = {"_p_f_p_struct_s_rig__int", "int (*)(RIG *)|int (*)(struct s_rig *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig__p_char = {"_p_f_p_struct_s_rig__p_char", "char *(*)(RIG *)|char *(*)(struct s_rig *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_enum_powerstat_t__int = {"_p_f_p_struct_s_rig_enum_powerstat_t__int", "int (*)(RIG *,powerstat_t)|int (*)(struct s_rig *,enum powerstat_t)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_enum_reset_t__int = {"_p_f_p_struct_s_rig_enum_reset_t__int", "int (*)(RIG *,reset_t)|int (*)(struct s_rig *,enum reset_t)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_int__int = {"_p_f_p_struct_s_rig_int__int", "int (*)(RIG *,int)|int (*)(struct s_rig *,int)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_int_int_int_int_int_int_double_int__int = {"_p_f_p_struct_s_rig_int_int_int_int_int_int_double_int__int", "int (*)(RIG *,int,int,int,int,int,int,double,int)|int (*)(struct s_rig *,int,int,int,int,int,int,double,int)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_long_p_char__int = {"_p_f_p_struct_s_rig_long_p_char__int", "int (*)(RIG *,hamlib_token_t,char *)|int (*)(struct s_rig *,long,char *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_long_p_char_int__int = {"_p_f_p_struct_s_rig_long_p_char_int__int", "int (*)(RIG *,hamlib_token_t,char *,int)|int (*)(struct s_rig *,long,char *,int)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_long_p_q_const__char__int = {"_p_f_p_struct_s_rig_long_p_q_const__char__int", "int (*)(RIG *,hamlib_token_t,char const *)|int (*)(struct s_rig *,long,char const *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_long_p_value_t__int = {"_p_f_p_struct_s_rig_long_p_value_t__int", "int (*)(RIG *,hamlib_token_t,value_t *)|int (*)(struct s_rig *,long,value_t *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_long_value_t__int = {"_p_f_p_struct_s_rig_long_value_t__int", "int (*)(RIG *,hamlib_token_t,value_t)|int (*)(struct s_rig *,long,value_t)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_p_enum_powerstat_t__int = {"_p_f_p_struct_s_rig_p_enum_powerstat_t__int", "int (*)(RIG *,powerstat_t *)|int (*)(struct s_rig *,enum powerstat_t *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_p_float_unsigned_int_double_unsigned_long_long__int = {"_p_f_p_struct_s_rig_p_float_unsigned_int_double_unsigned_long_long__int", "int (*)(RIG *,float *,unsigned int,freq_t,rmode_t)|int (*)(struct s_rig *,float *,unsigned int,double,unsigned long long)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_p_int__int = {"_p_f_p_struct_s_rig_p_int__int", "int (*)(RIG *,int *)|int (*)(struct s_rig *,int *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_p_int_p_int_p_int_p_int_p_int_p_int_p_double_p_int__int = {"_p_f_p_struct_s_rig_p_int_p_int_p_int_p_int_p_int_p_int_p_double_p_int__int", "int (*)(RIG *,int *,int *,int *,int *,int *,int *,double *,int *)|int (*)(struct s_rig *,int *,int *,int *,int *,int *,int *,double *,int *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_p_q_const__char__int = {"_p_f_p_struct_s_rig_p_q_const__char__int", "int (*)(RIG *,char const *)|int (*)(struct s_rig *,char const *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_p_struct_rig_spectrum_line_p_void__int = {"_p_f_p_struct_s_rig_p_struct_rig_spectrum_line_p_void__int", "spectrum_cb_t|int (*)(struct s_rig *,struct rig_spectrum_line *,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_p_unsigned_int__int = {"_p_f_p_struct_s_rig_p_unsigned_int__int", "int (*)(RIG *,vfo_t *)|int (*)(struct s_rig *,unsigned int *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_p_unsigned_int_float_double_unsigned_long_long__int = {"_p_f_p_struct_s_rig_p_unsigned_int_float_double_unsigned_long_long__int", "int (*)(RIG *,unsigned int *,float,freq_t,rmode_t)|int (*)(struct s_rig *,unsigned int *,float,double,unsigned long long)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_size_t_p_q_const__unsigned_char__int = {"_p_f_p_struct_s_rig_size_t_p_q_const__unsigned_char__int", "int (*)(RIG *,size_t,unsigned char const *)|int (*)(struct s_rig *,size_t,unsigned char const *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int__int = {"_p_f_p_struct_s_rig_unsigned_int__int", "int (*)(RIG *,vfo_t)|int (*)(struct s_rig *,unsigned int)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_double__int = {"_p_f_p_struct_s_rig_unsigned_int_double__int", "int (*)(RIG *,vfo_t,freq_t)|int (*)(struct s_rig *,unsigned int,double)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_double_p_void__int = {"_p_f_p_struct_s_rig_unsigned_int_double_p_void__int", "freq_cb_t|int (*)(struct s_rig *,unsigned int,double,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_double_unsigned_long_long_long__int = {"_p_f_p_struct_s_rig_unsigned_int_double_unsigned_long_long_long__int", "int (*)(RIG *,vfo_t,freq_t,rmode_t,pbwidth_t)|int (*)(struct s_rig *,unsigned int,double,unsigned long long,long)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_enum_dcd_e_p_void__int = {"_p_f_p_struct_s_rig_unsigned_int_enum_dcd_e_p_void__int", "dcd_cb_t|int (*)(struct s_rig *,unsigned int,enum dcd_e,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_enum_ptt_t__int = {"_p_f_p_struct_s_rig_unsigned_int_enum_ptt_t__int", "int (*)(RIG *,vfo_t,ptt_t)|int (*)(struct s_rig *,unsigned int,enum ptt_t)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_enum_ptt_t_p_void__int = {"_p_f_p_struct_s_rig_unsigned_int_enum_ptt_t_p_void__int", "ptt_cb_t|int (*)(struct s_rig *,unsigned int,enum ptt_t,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_enum_rptr_shift_t__int = {"_p_f_p_struct_s_rig_unsigned_int_enum_rptr_shift_t__int", "int (*)(RIG *,vfo_t,rptr_shift_t)|int (*)(struct s_rig *,unsigned int,enum rptr_shift_t)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_enum_scan_t_int__int = {"_p_f_p_struct_s_rig_unsigned_int_enum_scan_t_int__int", "int (*)(RIG *,vfo_t,scan_t,int)|int (*)(struct s_rig *,unsigned int,enum scan_t,int)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_enum_split_t_unsigned_int__int = {"_p_f_p_struct_s_rig_unsigned_int_enum_split_t_unsigned_int__int", "int (*)(RIG *,vfo_t,split_t,vfo_t)|int (*)(struct s_rig *,unsigned int,enum split_t,unsigned int)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_enum_vfo_op_t__int = {"_p_f_p_struct_s_rig_unsigned_int_enum_vfo_op_t__int", "int (*)(RIG *,vfo_t,vfo_op_t)|int (*)(struct s_rig *,unsigned int,enum vfo_op_t)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_int__int = {"_p_f_p_struct_s_rig_unsigned_int_int__int", "int (*)(RIG *,vfo_t,int)|int (*)(struct s_rig *,unsigned int,int)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_long__int = {"_p_f_p_struct_s_rig_unsigned_int_long__int", "int (*)(RIG *,vfo_t,shortfreq_t)|int (*)(struct s_rig *,unsigned int,long)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_long_int__int = {"_p_f_p_struct_s_rig_unsigned_int_long_int__int", "int (*)(RIG *,vfo_t,hamlib_token_t,int)|int (*)(struct s_rig *,unsigned int,long,int)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_long_p_int__int = {"_p_f_p_struct_s_rig_unsigned_int_long_p_int__int", "int (*)(RIG *,vfo_t,hamlib_token_t,int *)|int (*)(struct s_rig *,unsigned int,long,int *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_long_p_value_t__int = {"_p_f_p_struct_s_rig_unsigned_int_long_p_value_t__int", "int (*)(RIG *,vfo_t,hamlib_token_t,value_t *)|int (*)(struct s_rig *,unsigned int,long,value_t *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_long_value_t__int = {"_p_f_p_struct_s_rig_unsigned_int_long_value_t__int", "int (*)(RIG *,vfo_t,hamlib_token_t,value_t)|int (*)(struct s_rig *,unsigned int,long,value_t)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_p_char_p_int__int = {"_p_f_p_struct_s_rig_unsigned_int_p_char_p_int__int", "int (*)(RIG *,vfo_t,char *,int *)|int (*)(struct s_rig *,unsigned int,char *,int *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_p_double__int = {"_p_f_p_struct_s_rig_unsigned_int_p_double__int", "int (*)(RIG *,vfo_t,freq_t *)|int (*)(struct s_rig *,unsigned int,double *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long__int = {"_p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long__int", "int (*)(RIG *,vfo_t,freq_t *,rmode_t *,pbwidth_t *)|int (*)(struct s_rig *,unsigned int,double *,unsigned long long *,long *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_enum_split_t__int = {"_p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_enum_split_t__int", "int (*)(RIG *,vfo_t,freq_t *,rmode_t *,pbwidth_t *,split_t *)|int (*)(struct s_rig *,unsigned int,double *,unsigned long long *,long *,enum split_t *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_void__int = {"_p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_void__int", "pltune_cb_t|int (*)(struct s_rig *,unsigned int,double *,unsigned long long *,long *,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_p_enum_dcd_e__int = {"_p_f_p_struct_s_rig_unsigned_int_p_enum_dcd_e__int", "int (*)(RIG *,vfo_t,dcd_t *)|int (*)(struct s_rig *,unsigned int,enum dcd_e *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_p_enum_ptt_t__int = {"_p_f_p_struct_s_rig_unsigned_int_p_enum_ptt_t__int", "int (*)(RIG *,vfo_t,ptt_t *)|int (*)(struct s_rig *,unsigned int,enum ptt_t *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_p_enum_rptr_shift_t__int = {"_p_f_p_struct_s_rig_unsigned_int_p_enum_rptr_shift_t__int", "int (*)(RIG *,vfo_t,rptr_shift_t *)|int (*)(struct s_rig *,unsigned int,enum rptr_shift_t *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_p_enum_split_t_p_unsigned_int__int = {"_p_f_p_struct_s_rig_unsigned_int_p_enum_split_t_p_unsigned_int__int", "int (*)(RIG *,vfo_t,split_t *,vfo_t *)|int (*)(struct s_rig *,unsigned int,enum split_t *,unsigned int *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_f_p_struct_s_rig_p_q_const__struct_confparams_p_value_t_p_void__int_p_void__int = {"_p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_f_p_struct_s_rig_p_q_const__struct_confparams_p_value_t_p_void__int_p_void__int", "int (*)(RIG *,vfo_t,chan_cb_t,confval_cb_t,void *)|int (*)(struct s_rig *,unsigned int,int (*)(struct s_rig *,unsigned int,struct channel **,int,struct chan_list const *,void *),int (*)(struct s_rig *,struct confparams const *,value_t *,void *),void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_void__int = {"_p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_void__int", "int (*)(RIG *,vfo_t,chan_cb_t,void *)|int (*)(struct s_rig *,unsigned int,int (*)(struct s_rig *,unsigned int,struct channel **,int,struct chan_list const *,void *),void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_p_int__int = {"_p_f_p_struct_s_rig_unsigned_int_p_int__int", "int (*)(RIG *,vfo_t,int *)|int (*)(struct s_rig *,unsigned int,int *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_p_long__int = {"_p_f_p_struct_s_rig_unsigned_int_p_long__int", "int (*)(RIG *,vfo_t,shortfreq_t *)|int (*)(struct s_rig *,unsigned int,long *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_p_q_const__char__int = {"_p_f_p_struct_s_rig_unsigned_int_p_q_const__char__int", "int (*)(RIG *,vfo_t,char const *)|int (*)(struct s_rig *,unsigned int,char const *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_p_q_const__struct_channel__int = {"_p_f_p_struct_s_rig_unsigned_int_p_q_const__struct_channel__int", "int (*)(RIG *,vfo_t,channel_t const *)|int (*)(struct s_rig *,unsigned int,struct channel const *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_p_struct_channel_int__int = {"_p_f_p_struct_s_rig_unsigned_int_p_struct_channel_int__int", "int (*)(RIG *,vfo_t,channel_t *,int)|int (*)(struct s_rig *,unsigned int,struct channel *,int)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int = {"_p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int", "int (*)(RIG *,vfo_t,tone_t *)|int (*)(struct s_rig *,unsigned int,unsigned int *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_p_unsigned_long_long_p_long__int = {"_p_f_p_struct_s_rig_unsigned_int_p_unsigned_long_long_p_long__int", "int (*)(RIG *,vfo_t,rmode_t *,pbwidth_t *)|int (*)(struct s_rig *,unsigned int,unsigned long long *,long *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_p_void__int = {"_p_f_p_struct_s_rig_unsigned_int_p_void__int", "vfo_cb_t|int (*)(struct s_rig *,unsigned int,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_int__int = {"_p_f_p_struct_s_rig_unsigned_int_unsigned_int__int", "int (*)(RIG *,vfo_t,tone_t)|int (*)(struct s_rig *,unsigned int,unsigned int)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_int_p_value_t_p_unsigned_int_p_unsigned_int_p_unsigned_int__int = {"_p_f_p_struct_s_rig_unsigned_int_unsigned_int_p_value_t_p_unsigned_int_p_unsigned_int_p_unsigned_int__int", "int (*)(RIG *,vfo_t,ant_t,value_t *,ant_t *,ant_t *,ant_t *)|int (*)(struct s_rig *,unsigned int,unsigned int,value_t *,unsigned int *,unsigned int *,unsigned int *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_int_value_t__int = {"_p_f_p_struct_s_rig_unsigned_int_unsigned_int_value_t__int", "int (*)(RIG *,vfo_t,ant_t,value_t)|int (*)(struct s_rig *,unsigned int,unsigned int,value_t)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_int__int = {"_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_int__int", "int (*)(RIG *,vfo_t,setting_t,int)|int (*)(struct s_rig *,unsigned int,unsigned long long,int)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long__int = {"_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long__int", "int (*)(RIG *,vfo_t,rmode_t,pbwidth_t)|int (*)(struct s_rig *,unsigned int,unsigned long long,long)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long_p_void__int = {"_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long_p_void__int", "mode_cb_t|int (*)(struct s_rig *,unsigned int,unsigned long long,long,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_int__int = {"_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_int__int", "int (*)(RIG *,vfo_t,setting_t,int *)|int (*)(struct s_rig *,unsigned int,unsigned long long,int *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_value_t__int = {"_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_value_t__int", "int (*)(RIG *,vfo_t,setting_t,value_t *)|int (*)(struct s_rig *,unsigned int,unsigned long long,value_t *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_value_t__int = {"_p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_value_t__int", "int (*)(RIG *,vfo_t,setting_t,value_t)|int (*)(struct s_rig *,unsigned int,unsigned long long,value_t)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_long_long_p_value_t__int = {"_p_f_p_struct_s_rig_unsigned_long_long_p_value_t__int", "int (*)(RIG *,setting_t,value_t *)|int (*)(struct s_rig *,unsigned long long,value_t *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rig_unsigned_long_long_value_t__int = {"_p_f_p_struct_s_rig_unsigned_long_long_value_t__int", "int (*)(RIG *,setting_t,value_t)|int (*)(struct s_rig *,unsigned long long,value_t)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rot__int = {"_p_f_p_struct_s_rot__int", "int (*)(ROT *)|int (*)(struct s_rot *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rot__p_char = {"_p_f_p_struct_s_rot__p_char", "char *(*)(ROT *)|char *(*)(struct s_rot *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rot_float_float__int = {"_p_f_p_struct_s_rot_float_float__int", "int (*)(ROT *,azimuth_t,elevation_t)|int (*)(struct s_rot *,float,float)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rot_int__int = {"_p_f_p_struct_s_rot_int__int", "int (*)(ROT *,rot_reset_t)|int (*)(struct s_rot *,int)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rot_int_int__int = {"_p_f_p_struct_s_rot_int_int__int", "int (*)(ROT *,int,int)|int (*)(struct s_rot *,int,int)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rot_long_int__int = {"_p_f_p_struct_s_rot_long_int__int", "int (*)(ROT *,hamlib_token_t,int)|int (*)(struct s_rot *,long,int)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rot_long_p_char__int = {"_p_f_p_struct_s_rot_long_p_char__int", "int (*)(ROT *,hamlib_token_t,char *)|int (*)(struct s_rot *,long,char *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rot_long_p_char_int__int = {"_p_f_p_struct_s_rot_long_p_char_int__int", "int (*)(ROT *,hamlib_token_t,char *,int)|int (*)(struct s_rot *,long,char *,int)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rot_long_p_int__int = {"_p_f_p_struct_s_rot_long_p_int__int", "int (*)(ROT *,hamlib_token_t,int *)|int (*)(struct s_rot *,long,int *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rot_long_p_q_const__char__int = {"_p_f_p_struct_s_rot_long_p_q_const__char__int", "int (*)(ROT *,hamlib_token_t,char const *)|int (*)(struct s_rot *,long,char const *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rot_long_p_value_t__int = {"_p_f_p_struct_s_rot_long_p_value_t__int", "int (*)(ROT *,hamlib_token_t,value_t *)|int (*)(struct s_rot *,long,value_t *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rot_long_value_t__int = {"_p_f_p_struct_s_rot_long_value_t__int", "int (*)(ROT *,hamlib_token_t,value_t)|int (*)(struct s_rot *,long,value_t)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rot_p_enum_rot_status_t__int = {"_p_f_p_struct_s_rot_p_enum_rot_status_t__int", "int (*)(ROT *,rot_status_t *)|int (*)(struct s_rot *,enum rot_status_t *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rot_p_float_p_float__int = {"_p_f_p_struct_s_rot_p_float_p_float__int", "int (*)(ROT *,azimuth_t *,elevation_t *)|int (*)(struct s_rot *,float *,float *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rot_unsigned_long_long_int__int = {"_p_f_p_struct_s_rot_unsigned_long_long_int__int", "int (*)(ROT *,setting_t,int)|int (*)(struct s_rot *,unsigned long long,int)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rot_unsigned_long_long_p_int__int = {"_p_f_p_struct_s_rot_unsigned_long_long_p_int__int", "int (*)(ROT *,setting_t,int *)|int (*)(struct s_rot *,unsigned long long,int *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rot_unsigned_long_long_p_value_t__int = {"_p_f_p_struct_s_rot_unsigned_long_long_p_value_t__int", "int (*)(ROT *,setting_t,value_t *)|int (*)(struct s_rot *,unsigned long long,value_t *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_struct_s_rot_unsigned_long_long_value_t__int = {"_p_f_p_struct_s_rot_unsigned_long_long_value_t__int", "int (*)(ROT *,setting_t,value_t)|int (*)(struct s_rot *,unsigned long long,value_t)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_filter_list = {"_p_filter_list", "struct filter_list *|filter_list *", 0, 0, (void*)&_wrap_class_filter_list, 0};
static swig_type_info _swigt__p_float = {"_p_float", "agc_time_t *|azimuth_t *|elevation_t *|swr_t *|float *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_freq_range_list = {"_p_freq_range_list", "freq_range_t *|struct freq_range_list *|freq_range_list *", 0, 0, (void*)&_wrap_class_freq_range_t, 0};
static swig_type_info _swigt__p_gran = {"_p_gran", "gran_t *|struct gran *|gran *", 0, 0, (void*)&_wrap_class_gran, 0};
static swig_type_info _swigt__p_hamlib_async_pipe = {"_p_hamlib_async_pipe", "hamlib_async_pipe_t *|struct hamlib_async_pipe *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_hamlib_band_t = {"_p_hamlib_band_t", "hamlib_band_t *|enum hamlib_band_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_hamlib_bandselect_t = {"_p_hamlib_bandselect_t", "hamlib_bandselect_t *|enum hamlib_bandselect_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_hamlib_cache_t = {"_p_hamlib_cache_t", "hamlib_cache_t *|enum hamlib_cache_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_hamlib_port = {"_p_hamlib_port", "hamlib_port_t *|struct hamlib_port *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "amp_model_t *|int32_t *|int_fast16_t *|int_fast32_t *|int_least32_t *|intptr_t *|rot_model_t *|rot_reset_t *|tune_value_t *|int *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_long = {"_p_long", "hamlib_token_t *|pbwidth_t *|shortfreq_t *|long *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_long_long = {"_p_long_long", "int64_t *|int_fast64_t *|int_least64_t *|intmax_t *|long long *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_multicast_s = {"_p_multicast_s", "struct multicast_s *|multicast_s *", 0, 0, (void*)&_wrap_class_multicast_s, 0};
static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_powerstat_t = {"_p_powerstat_t", "powerstat_t *|enum powerstat_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_pthread_mutex_t = {"_p_pthread_mutex_t", "pthread_mutex_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_pthread_t = {"_p_pthread_t", "pthread_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ptt_t = {"_p_ptt_t", "ptt_t *|enum ptt_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ptt_type_e = {"_p_ptt_type_e", "ptt_type_t *|enum ptt_type_e *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_reset_t = {"_p_reset_t", "reset_t *|enum reset_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_rig_callbacks = {"_p_rig_callbacks", "struct rig_callbacks *|rig_callbacks *", 0, 0, (void*)&_wrap_class_rig_callbacks, 0};
static swig_type_info _swigt__p_rig_caps = {"_p_rig_caps", "struct rig_caps *|rig_caps *", 0, 0, (void*)&_wrap_class_rig_caps, 0};
static swig_type_info _swigt__p_rig_debug_level_e = {"_p_rig_debug_level_e", "enum rig_debug_level_e *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_rig_port_e = {"_p_rig_port_e", "rig_port_t *|enum rig_port_e *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_rig_ptrx_t = {"_p_rig_ptrx_t", "rig_ptrx_t *|enum rig_ptrx_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_rig_spectrum_avg_mode = {"_p_rig_spectrum_avg_mode", "struct rig_spectrum_avg_mode *|rig_spectrum_avg_mode *", 0, 0, (void*)&_wrap_class_rig_spectrum_avg_mode, 0};
static swig_type_info _swigt__p_rig_spectrum_line = {"_p_rig_spectrum_line", "struct rig_spectrum_line *|rig_spectrum_line *", 0, 0, (void*)&_wrap_class_rig_spectrum_line, 0};
static swig_type_info _swigt__p_rig_spectrum_mode_e = {"_p_rig_spectrum_mode_e", "enum rig_spectrum_mode_e *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_rig_spectrum_scope = {"_p_rig_spectrum_scope", "struct rig_spectrum_scope *|rig_spectrum_scope *", 0, 0, (void*)&_wrap_class_rig_spectrum_scope, 0};
static swig_type_info _swigt__p_rig_state = {"_p_rig_state", "struct rig_state *|rig_state *", 0, 0, (void*)&_wrap_class_rig_state, 0};
static swig_type_info _swigt__p_rig_type_t = {"_p_rig_type_t", "rig_type_t *|enum rig_type_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_rot_caps = {"_p_rot_caps", "struct rot_caps *|rot_caps *", 0, 0, (void*)&_wrap_class_rot_caps, 0};
static swig_type_info _swigt__p_rot_state = {"_p_rot_state", "struct rot_state *|rot_state *", 0, 0, (void*)&_wrap_class_rot_state, 0};
static swig_type_info _swigt__p_rot_status_t = {"_p_rot_status_t", "rot_status_t *|enum rot_status_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_rot_type_t = {"_p_rot_type_t", "rot_type_t *|enum rot_type_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_rptr_shift_t = {"_p_rptr_shift_t", "rptr_shift_t *|enum rptr_shift_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_s_rig = {"_p_s_rig", "RIG *|struct s_rig *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_s_rot = {"_p_s_rot", "ROT *|struct s_rot *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_scan_t = {"_p_scan_t", "scan_t *|enum scan_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_short = {"_p_short", "int16_t *|int_least16_t *|short *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "int8_t *|int_fast8_t *|int_least8_t *|signed char *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_sockaddr_in = {"_p_sockaddr_in", "struct sockaddr_in *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_split_t = {"_p_split_t", "split_t *|enum split_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_time_t = {"_p_time_t", "time_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_timespec = {"_p_timespec", "struct timespec *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_toneArray = {"_p_toneArray", "toneArray *", 0, 0, (void*)&_wrap_class_toneArray, 0};
static swig_type_info _swigt__p_tuning_step_list = {"_p_tuning_step_list", "struct tuning_step_list *|tuning_step_list *", 0, 0, (void*)&_wrap_class_tuning_step_list, 0};
static swig_type_info _swigt__p_twiddle_state_t = {"_p_twiddle_state_t", "twiddle_state_t *|enum twiddle_state_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "uint8_t *|uint_fast8_t *|uint_least8_t *|unsigned char *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "ant_t *|rig_comm_status_t *|rig_model_t *|tone_t *|uint32_t *|uint_fast16_t *|uint_fast32_t *|uint_least32_t *|uintptr_t *|vfo_t *|unsigned int *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "rig_useconds_t *|unsigned long *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "rig_level_e *|rmode_t *|setting_t *|uint64_t *|uint_fast64_t *|uint_least64_t *|uintmax_t *|unsigned long long *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "uint16_t *|uint_least16_t *|unsigned short *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_value_t = {"_p_value_t", "value_t *", 0, 0, (void*)&_wrap_class_value_t, 0};
static swig_type_info _swigt__p_value_t_b = {"_p_value_t_b", "value_t_b *", 0, 0, (void*)&_wrap_class_value_t_b, 0};
static swig_type_info _swigt__p_vfo_op_t = {"_p_vfo_op_t", "vfo_op_t *|enum vfo_op_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_Amp,
  &_swigt__p_FIFO_RIG_s,
  &_swigt__p_Rig,
  &_swigt__p_Rot,
  &_swigt__p_agc_level_e,
  &_swigt__p_amp,
  &_swigt__p_amp_caps,
  &_swigt__p_amp_reset_e,
  &_swigt__p_amp_state,
  &_swigt__p_amp_type_e,
  &_swigt__p_ann_t,
  &_swigt__p_cal_table,
  &_swigt__p_cal_table_float,
  &_swigt__p_cal_table_float_table,
  &_swigt__p_cal_table_table,
  &_swigt__p_chan_list,
  &_swigt__p_chan_type_t,
  &_swigt__p_channel,
  &_swigt__p_channelArray,
  &_swigt__p_channel_cap,
  &_swigt__p_char,
  &_swigt__p_client_e,
  &_swigt__p_confparams,
  &_swigt__p_confparams_u,
  &_swigt__p_confparams_u_c,
  &_swigt__p_confparams_u_n,
  &_swigt__p_dcd_e,
  &_swigt__p_dcd_type_e,
  &_swigt__p_deferred_config_header,
  &_swigt__p_deferred_config_item,
  &_swigt__p_double,
  &_swigt__p_ext_list,
  &_swigt__p_f_p_struct_amp__int,
  &_swigt__p_f_p_struct_amp__p_char,
  &_swigt__p_f_p_struct_amp_double__int,
  &_swigt__p_f_p_struct_amp_enum_amp_reset_e__int,
  &_swigt__p_f_p_struct_amp_enum_powerstat_t__int,
  &_swigt__p_f_p_struct_amp_long_p_char__int,
  &_swigt__p_f_p_struct_amp_long_p_char_int__int,
  &_swigt__p_f_p_struct_amp_long_p_q_const__char__int,
  &_swigt__p_f_p_struct_amp_long_p_value_t__int,
  &_swigt__p_f_p_struct_amp_long_value_t__int,
  &_swigt__p_f_p_struct_amp_p_double__int,
  &_swigt__p_f_p_struct_amp_p_enum_powerstat_t__int,
  &_swigt__p_f_p_struct_amp_unsigned_long_long_p_value_t__int,
  &_swigt__p_f_p_struct_amp_unsigned_long_long_value_t__int,
  &_swigt__p_f_p_struct_s_rig__int,
  &_swigt__p_f_p_struct_s_rig__p_char,
  &_swigt__p_f_p_struct_s_rig_enum_powerstat_t__int,
  &_swigt__p_f_p_struct_s_rig_enum_reset_t__int,
  &_swigt__p_f_p_struct_s_rig_int__int,
  &_swigt__p_f_p_struct_s_rig_int_int_int_int_int_int_double_int__int,
  &_swigt__p_f_p_struct_s_rig_long_p_char__int,
  &_swigt__p_f_p_struct_s_rig_long_p_char_int__int,
  &_swigt__p_f_p_struct_s_rig_long_p_q_const__char__int,
  &_swigt__p_f_p_struct_s_rig_long_p_value_t__int,
  &_swigt__p_f_p_struct_s_rig_long_value_t__int,
  &_swigt__p_f_p_struct_s_rig_p_enum_powerstat_t__int,
  &_swigt__p_f_p_struct_s_rig_p_float_unsigned_int_double_unsigned_long_long__int,
  &_swigt__p_f_p_struct_s_rig_p_int__int,
  &_swigt__p_f_p_struct_s_rig_p_int_p_int_p_int_p_int_p_int_p_int_p_double_p_int__int,
  &_swigt__p_f_p_struct_s_rig_p_q_const__char__int,
  &_swigt__p_f_p_struct_s_rig_p_struct_rig_spectrum_line_p_void__int,
  &_swigt__p_f_p_struct_s_rig_p_unsigned_int__int,
  &_swigt__p_f_p_struct_s_rig_p_unsigned_int_float_double_unsigned_long_long__int,
  &_swigt__p_f_p_struct_s_rig_size_t_p_q_const__unsigned_char__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_double__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_double_p_void__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_double_unsigned_long_long_long__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_enum_dcd_e_p_void__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_enum_ptt_t__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_enum_ptt_t_p_void__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_enum_rptr_shift_t__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_enum_scan_t_int__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_enum_split_t_unsigned_int__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_enum_vfo_op_t__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_int__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_long__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_long_int__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_long_p_int__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_long_p_value_t__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_long_value_t__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_p_char_p_int__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_p_double__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_enum_split_t__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_void__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_p_enum_dcd_e__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_p_enum_ptt_t__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_p_enum_rptr_shift_t__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_p_enum_split_t_p_unsigned_int__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_f_p_struct_s_rig_p_q_const__struct_confparams_p_value_t_p_void__int_p_void__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_void__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_p_int__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_p_long__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_p_q_const__char__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_p_q_const__struct_channel__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_p_struct_channel_int__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_p_unsigned_long_long_p_long__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_p_void__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_int__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_int_p_value_t_p_unsigned_int_p_unsigned_int_p_unsigned_int__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_int_value_t__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_int__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long_p_void__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_int__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_value_t__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_value_t__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_long_long_p_value_t__int,
  &_swigt__p_f_p_struct_s_rig_unsigned_long_long_value_t__int,
  &_swigt__p_f_p_struct_s_rot__int,
  &_swigt__p_f_p_struct_s_rot__p_char,
  &_swigt__p_f_p_struct_s_rot_float_float__int,
  &_swigt__p_f_p_struct_s_rot_int__int,
  &_swigt__p_f_p_struct_s_rot_int_int__int,
  &_swigt__p_f_p_struct_s_rot_long_int__int,
  &_swigt__p_f_p_struct_s_rot_long_p_char__int,
  &_swigt__p_f_p_struct_s_rot_long_p_char_int__int,
  &_swigt__p_f_p_struct_s_rot_long_p_int__int,
  &_swigt__p_f_p_struct_s_rot_long_p_q_const__char__int,
  &_swigt__p_f_p_struct_s_rot_long_p_value_t__int,
  &_swigt__p_f_p_struct_s_rot_long_value_t__int,
  &_swigt__p_f_p_struct_s_rot_p_enum_rot_status_t__int,
  &_swigt__p_f_p_struct_s_rot_p_float_p_float__int,
  &_swigt__p_f_p_struct_s_rot_unsigned_long_long_int__int,
  &_swigt__p_f_p_struct_s_rot_unsigned_long_long_p_int__int,
  &_swigt__p_f_p_struct_s_rot_unsigned_long_long_p_value_t__int,
  &_swigt__p_f_p_struct_s_rot_unsigned_long_long_value_t__int,
  &_swigt__p_filter_list,
  &_swigt__p_float,
  &_swigt__p_freq_range_list,
  &_swigt__p_gran,
  &_swigt__p_hamlib_async_pipe,
  &_swigt__p_hamlib_band_t,
  &_swigt__p_hamlib_bandselect_t,
  &_swigt__p_hamlib_cache_t,
  &_swigt__p_hamlib_port,
  &_swigt__p_int,
  &_swigt__p_long,
  &_swigt__p_long_long,
  &_swigt__p_multicast_s,
  &_swigt__p_p_char,
  &_swigt__p_p_void,
  &_swigt__p_powerstat_t,
  &_swigt__p_pthread_mutex_t,
  &_swigt__p_pthread_t,
  &_swigt__p_ptt_t,
  &_swigt__p_ptt_type_e,
  &_swigt__p_reset_t,
  &_swigt__p_rig_callbacks,
  &_swigt__p_rig_caps,
  &_swigt__p_rig_debug_level_e,
  &_swigt__p_rig_port_e,
  &_swigt__p_rig_ptrx_t,
  &_swigt__p_rig_spectrum_avg_mode,
  &_swigt__p_rig_spectrum_line,
  &_swigt__p_rig_spectrum_mode_e,
  &_swigt__p_rig_spectrum_scope,
  &_swigt__p_rig_state,
  &_swigt__p_rig_type_t,
  &_swigt__p_rot_caps,
  &_swigt__p_rot_state,
  &_swigt__p_rot_status_t,
  &_swigt__p_rot_type_t,
  &_swigt__p_rptr_shift_t,
  &_swigt__p_s_rig,
  &_swigt__p_s_rot,
  &_swigt__p_scan_t,
  &_swigt__p_short,
  &_swigt__p_signed_char,
  &_swigt__p_sockaddr_in,
  &_swigt__p_split_t,
  &_swigt__p_time_t,
  &_swigt__p_timespec,
  &_swigt__p_toneArray,
  &_swigt__p_tuning_step_list,
  &_swigt__p_twiddle_state_t,
  &_swigt__p_unsigned_char,
  &_swigt__p_unsigned_int,
  &_swigt__p_unsigned_long,
  &_swigt__p_unsigned_long_long,
  &_swigt__p_unsigned_short,
  &_swigt__p_value_t,
  &_swigt__p_value_t_b,
  &_swigt__p_vfo_op_t,
  &_swigt__p_void,
};

static swig_cast_info _swigc__p_Amp[] = {  {&_swigt__p_Amp, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FIFO_RIG_s[] = {  {&_swigt__p_FIFO_RIG_s, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Rig[] = {  {&_swigt__p_Rig, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Rot[] = {  {&_swigt__p_Rot, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_agc_level_e[] = {  {&_swigt__p_agc_level_e, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_amp[] = {  {&_swigt__p_amp, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_amp_caps[] = {  {&_swigt__p_amp_caps, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_amp_reset_e[] = {  {&_swigt__p_amp_reset_e, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_amp_state[] = {  {&_swigt__p_amp_state, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_amp_type_e[] = {  {&_swigt__p_amp_type_e, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ann_t[] = {  {&_swigt__p_ann_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_cal_table[] = {  {&_swigt__p_cal_table, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_cal_table_float[] = {  {&_swigt__p_cal_table_float, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_cal_table_float_table[] = {  {&_swigt__p_cal_table_float_table, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_cal_table_table[] = {  {&_swigt__p_cal_table_table, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_chan_list[] = {  {&_swigt__p_chan_list, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_chan_type_t[] = {  {&_swigt__p_chan_type_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_channel[] = {  {&_swigt__p_channel, 0, 0, 0},  {&_swigt__p_channelArray, _p_channelArrayTo_p_channel, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_channelArray[] = {  {&_swigt__p_channelArray, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_channel_cap[] = {  {&_swigt__p_channel_cap, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_client_e[] = {  {&_swigt__p_client_e, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_confparams[] = {  {&_swigt__p_confparams, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_confparams_u[] = {  {&_swigt__p_confparams_u, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_confparams_u_c[] = {  {&_swigt__p_confparams_u_c, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_confparams_u_n[] = {  {&_swigt__p_confparams_u_n, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_dcd_e[] = {  {&_swigt__p_dcd_e, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_dcd_type_e[] = {  {&_swigt__p_dcd_type_e, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_deferred_config_header[] = {  {&_swigt__p_deferred_config_header, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_deferred_config_item[] = {  {&_swigt__p_deferred_config_item, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ext_list[] = {  {&_swigt__p_ext_list, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_amp__int[] = {  {&_swigt__p_f_p_struct_amp__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_amp__p_char[] = {  {&_swigt__p_f_p_struct_amp__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_amp_double__int[] = {  {&_swigt__p_f_p_struct_amp_double__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_amp_enum_amp_reset_e__int[] = {  {&_swigt__p_f_p_struct_amp_enum_amp_reset_e__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_amp_enum_powerstat_t__int[] = {  {&_swigt__p_f_p_struct_amp_enum_powerstat_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_amp_long_p_char__int[] = {  {&_swigt__p_f_p_struct_amp_long_p_char__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_amp_long_p_char_int__int[] = {  {&_swigt__p_f_p_struct_amp_long_p_char_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_amp_long_p_q_const__char__int[] = {  {&_swigt__p_f_p_struct_amp_long_p_q_const__char__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_amp_long_p_value_t__int[] = {  {&_swigt__p_f_p_struct_amp_long_p_value_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_amp_long_value_t__int[] = {  {&_swigt__p_f_p_struct_amp_long_value_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_amp_p_double__int[] = {  {&_swigt__p_f_p_struct_amp_p_double__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_amp_p_enum_powerstat_t__int[] = {  {&_swigt__p_f_p_struct_amp_p_enum_powerstat_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_amp_unsigned_long_long_p_value_t__int[] = {  {&_swigt__p_f_p_struct_amp_unsigned_long_long_p_value_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_amp_unsigned_long_long_value_t__int[] = {  {&_swigt__p_f_p_struct_amp_unsigned_long_long_value_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig__int[] = {  {&_swigt__p_f_p_struct_s_rig__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig__p_char[] = {  {&_swigt__p_f_p_struct_s_rig__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_enum_powerstat_t__int[] = {  {&_swigt__p_f_p_struct_s_rig_enum_powerstat_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_enum_reset_t__int[] = {  {&_swigt__p_f_p_struct_s_rig_enum_reset_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_int_int_int_int_int_int_double_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_int_int_int_int_int_int_double_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_long_p_char__int[] = {  {&_swigt__p_f_p_struct_s_rig_long_p_char__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_long_p_char_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_long_p_char_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_long_p_q_const__char__int[] = {  {&_swigt__p_f_p_struct_s_rig_long_p_q_const__char__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_long_p_value_t__int[] = {  {&_swigt__p_f_p_struct_s_rig_long_p_value_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_long_value_t__int[] = {  {&_swigt__p_f_p_struct_s_rig_long_value_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_p_enum_powerstat_t__int[] = {  {&_swigt__p_f_p_struct_s_rig_p_enum_powerstat_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_p_float_unsigned_int_double_unsigned_long_long__int[] = {  {&_swigt__p_f_p_struct_s_rig_p_float_unsigned_int_double_unsigned_long_long__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_p_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_p_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_p_int_p_int_p_int_p_int_p_int_p_int_p_double_p_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_p_int_p_int_p_int_p_int_p_int_p_int_p_double_p_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_p_q_const__char__int[] = {  {&_swigt__p_f_p_struct_s_rig_p_q_const__char__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_p_struct_rig_spectrum_line_p_void__int[] = {  {&_swigt__p_f_p_struct_s_rig_p_struct_rig_spectrum_line_p_void__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_p_unsigned_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_p_unsigned_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_p_unsigned_int_float_double_unsigned_long_long__int[] = {  {&_swigt__p_f_p_struct_s_rig_p_unsigned_int_float_double_unsigned_long_long__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_size_t_p_q_const__unsigned_char__int[] = {  {&_swigt__p_f_p_struct_s_rig_size_t_p_q_const__unsigned_char__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_double__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_double__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_double_p_void__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_double_p_void__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_double_unsigned_long_long_long__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_double_unsigned_long_long_long__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_enum_dcd_e_p_void__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_enum_dcd_e_p_void__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_enum_ptt_t__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_enum_ptt_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_enum_ptt_t_p_void__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_enum_ptt_t_p_void__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_enum_rptr_shift_t__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_enum_rptr_shift_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_enum_scan_t_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_enum_scan_t_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_enum_split_t_unsigned_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_enum_split_t_unsigned_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_enum_vfo_op_t__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_enum_vfo_op_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_long__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_long__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_long_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_long_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_long_p_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_long_p_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_long_p_value_t__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_long_p_value_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_long_value_t__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_long_value_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_p_char_p_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_p_char_p_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_p_double__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_p_double__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_enum_split_t__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_enum_split_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_void__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_void__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_p_enum_dcd_e__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_p_enum_dcd_e__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_p_enum_ptt_t__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_p_enum_ptt_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_p_enum_rptr_shift_t__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_p_enum_rptr_shift_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_p_enum_split_t_p_unsigned_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_p_enum_split_t_p_unsigned_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_f_p_struct_s_rig_p_q_const__struct_confparams_p_value_t_p_void__int_p_void__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_f_p_struct_s_rig_p_q_const__struct_confparams_p_value_t_p_void__int_p_void__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_void__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_void__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_p_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_p_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_p_long__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_p_long__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_p_q_const__char__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_p_q_const__char__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_p_q_const__struct_channel__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_p_q_const__struct_channel__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_p_struct_channel_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_p_struct_channel_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_p_unsigned_long_long_p_long__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_p_unsigned_long_long_p_long__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_p_void__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_p_void__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_unsigned_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_unsigned_int_p_value_t_p_unsigned_int_p_unsigned_int_p_unsigned_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_int_p_value_t_p_unsigned_int_p_unsigned_int_p_unsigned_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_unsigned_int_value_t__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_int_value_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long_p_void__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long_p_void__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_int__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_value_t__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_value_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_value_t__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_value_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_long_long_p_value_t__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_long_long_p_value_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rig_unsigned_long_long_value_t__int[] = {  {&_swigt__p_f_p_struct_s_rig_unsigned_long_long_value_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rot__int[] = {  {&_swigt__p_f_p_struct_s_rot__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rot__p_char[] = {  {&_swigt__p_f_p_struct_s_rot__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rot_float_float__int[] = {  {&_swigt__p_f_p_struct_s_rot_float_float__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rot_int__int[] = {  {&_swigt__p_f_p_struct_s_rot_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rot_int_int__int[] = {  {&_swigt__p_f_p_struct_s_rot_int_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rot_long_int__int[] = {  {&_swigt__p_f_p_struct_s_rot_long_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rot_long_p_char__int[] = {  {&_swigt__p_f_p_struct_s_rot_long_p_char__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rot_long_p_char_int__int[] = {  {&_swigt__p_f_p_struct_s_rot_long_p_char_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rot_long_p_int__int[] = {  {&_swigt__p_f_p_struct_s_rot_long_p_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rot_long_p_q_const__char__int[] = {  {&_swigt__p_f_p_struct_s_rot_long_p_q_const__char__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rot_long_p_value_t__int[] = {  {&_swigt__p_f_p_struct_s_rot_long_p_value_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rot_long_value_t__int[] = {  {&_swigt__p_f_p_struct_s_rot_long_value_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rot_p_enum_rot_status_t__int[] = {  {&_swigt__p_f_p_struct_s_rot_p_enum_rot_status_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rot_p_float_p_float__int[] = {  {&_swigt__p_f_p_struct_s_rot_p_float_p_float__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rot_unsigned_long_long_int__int[] = {  {&_swigt__p_f_p_struct_s_rot_unsigned_long_long_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rot_unsigned_long_long_p_int__int[] = {  {&_swigt__p_f_p_struct_s_rot_unsigned_long_long_p_int__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rot_unsigned_long_long_p_value_t__int[] = {  {&_swigt__p_f_p_struct_s_rot_unsigned_long_long_p_value_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_struct_s_rot_unsigned_long_long_value_t__int[] = {  {&_swigt__p_f_p_struct_s_rot_unsigned_long_long_value_t__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_filter_list[] = {  {&_swigt__p_filter_list, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_float[] = {  {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_freq_range_list[] = {  {&_swigt__p_freq_range_list, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_gran[] = {  {&_swigt__p_gran, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_hamlib_async_pipe[] = {  {&_swigt__p_hamlib_async_pipe, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_hamlib_band_t[] = {  {&_swigt__p_hamlib_band_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_hamlib_bandselect_t[] = {  {&_swigt__p_hamlib_bandselect_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_hamlib_cache_t[] = {  {&_swigt__p_hamlib_cache_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_hamlib_port[] = {  {&_swigt__p_hamlib_port, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_long[] = {  {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_long_long[] = {  {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_multicast_s[] = {  {&_swigt__p_multicast_s, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_void[] = {  {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_powerstat_t[] = {  {&_swigt__p_powerstat_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_pthread_mutex_t[] = {  {&_swigt__p_pthread_mutex_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_pthread_t[] = {  {&_swigt__p_pthread_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ptt_t[] = {  {&_swigt__p_ptt_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ptt_type_e[] = {  {&_swigt__p_ptt_type_e, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_reset_t[] = {  {&_swigt__p_reset_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_rig_callbacks[] = {  {&_swigt__p_rig_callbacks, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_rig_caps[] = {  {&_swigt__p_rig_caps, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_rig_debug_level_e[] = {  {&_swigt__p_rig_debug_level_e, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_rig_port_e[] = {  {&_swigt__p_rig_port_e, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_rig_ptrx_t[] = {  {&_swigt__p_rig_ptrx_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_rig_spectrum_avg_mode[] = {  {&_swigt__p_rig_spectrum_avg_mode, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_rig_spectrum_line[] = {  {&_swigt__p_rig_spectrum_line, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_rig_spectrum_mode_e[] = {  {&_swigt__p_rig_spectrum_mode_e, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_rig_spectrum_scope[] = {  {&_swigt__p_rig_spectrum_scope, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_rig_state[] = {  {&_swigt__p_rig_state, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_rig_type_t[] = {  {&_swigt__p_rig_type_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_rot_caps[] = {  {&_swigt__p_rot_caps, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_rot_state[] = {  {&_swigt__p_rot_state, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_rot_status_t[] = {  {&_swigt__p_rot_status_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_rot_type_t[] = {  {&_swigt__p_rot_type_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_rptr_shift_t[] = {  {&_swigt__p_rptr_shift_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_s_rig[] = {  {&_swigt__p_s_rig, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_s_rot[] = {  {&_swigt__p_s_rot, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_scan_t[] = {  {&_swigt__p_scan_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_short[] = {  {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_signed_char[] = {  {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_sockaddr_in[] = {  {&_swigt__p_sockaddr_in, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_split_t[] = {  {&_swigt__p_split_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_time_t[] = {  {&_swigt__p_time_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_timespec[] = {  {&_swigt__p_timespec, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_toneArray[] = {  {&_swigt__p_toneArray, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_tuning_step_list[] = {  {&_swigt__p_tuning_step_list, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_twiddle_state_t[] = {  {&_swigt__p_twiddle_state_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_int[] = {  {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_long[] = {  {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_long_long[] = {  {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_short[] = {  {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_value_t[] = {  {&_swigt__p_value_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_value_t_b[] = {  {&_swigt__p_value_t_b, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_vfo_op_t[] = {  {&_swigt__p_vfo_op_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_void[] = {  {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_Amp,
  _swigc__p_FIFO_RIG_s,
  _swigc__p_Rig,
  _swigc__p_Rot,
  _swigc__p_agc_level_e,
  _swigc__p_amp,
  _swigc__p_amp_caps,
  _swigc__p_amp_reset_e,
  _swigc__p_amp_state,
  _swigc__p_amp_type_e,
  _swigc__p_ann_t,
  _swigc__p_cal_table,
  _swigc__p_cal_table_float,
  _swigc__p_cal_table_float_table,
  _swigc__p_cal_table_table,
  _swigc__p_chan_list,
  _swigc__p_chan_type_t,
  _swigc__p_channel,
  _swigc__p_channelArray,
  _swigc__p_channel_cap,
  _swigc__p_char,
  _swigc__p_client_e,
  _swigc__p_confparams,
  _swigc__p_confparams_u,
  _swigc__p_confparams_u_c,
  _swigc__p_confparams_u_n,
  _swigc__p_dcd_e,
  _swigc__p_dcd_type_e,
  _swigc__p_deferred_config_header,
  _swigc__p_deferred_config_item,
  _swigc__p_double,
  _swigc__p_ext_list,
  _swigc__p_f_p_struct_amp__int,
  _swigc__p_f_p_struct_amp__p_char,
  _swigc__p_f_p_struct_amp_double__int,
  _swigc__p_f_p_struct_amp_enum_amp_reset_e__int,
  _swigc__p_f_p_struct_amp_enum_powerstat_t__int,
  _swigc__p_f_p_struct_amp_long_p_char__int,
  _swigc__p_f_p_struct_amp_long_p_char_int__int,
  _swigc__p_f_p_struct_amp_long_p_q_const__char__int,
  _swigc__p_f_p_struct_amp_long_p_value_t__int,
  _swigc__p_f_p_struct_amp_long_value_t__int,
  _swigc__p_f_p_struct_amp_p_double__int,
  _swigc__p_f_p_struct_amp_p_enum_powerstat_t__int,
  _swigc__p_f_p_struct_amp_unsigned_long_long_p_value_t__int,
  _swigc__p_f_p_struct_amp_unsigned_long_long_value_t__int,
  _swigc__p_f_p_struct_s_rig__int,
  _swigc__p_f_p_struct_s_rig__p_char,
  _swigc__p_f_p_struct_s_rig_enum_powerstat_t__int,
  _swigc__p_f_p_struct_s_rig_enum_reset_t__int,
  _swigc__p_f_p_struct_s_rig_int__int,
  _swigc__p_f_p_struct_s_rig_int_int_int_int_int_int_double_int__int,
  _swigc__p_f_p_struct_s_rig_long_p_char__int,
  _swigc__p_f_p_struct_s_rig_long_p_char_int__int,
  _swigc__p_f_p_struct_s_rig_long_p_q_const__char__int,
  _swigc__p_f_p_struct_s_rig_long_p_value_t__int,
  _swigc__p_f_p_struct_s_rig_long_value_t__int,
  _swigc__p_f_p_struct_s_rig_p_enum_powerstat_t__int,
  _swigc__p_f_p_struct_s_rig_p_float_unsigned_int_double_unsigned_long_long__int,
  _swigc__p_f_p_struct_s_rig_p_int__int,
  _swigc__p_f_p_struct_s_rig_p_int_p_int_p_int_p_int_p_int_p_int_p_double_p_int__int,
  _swigc__p_f_p_struct_s_rig_p_q_const__char__int,
  _swigc__p_f_p_struct_s_rig_p_struct_rig_spectrum_line_p_void__int,
  _swigc__p_f_p_struct_s_rig_p_unsigned_int__int,
  _swigc__p_f_p_struct_s_rig_p_unsigned_int_float_double_unsigned_long_long__int,
  _swigc__p_f_p_struct_s_rig_size_t_p_q_const__unsigned_char__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_double__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_double_p_void__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_double_unsigned_long_long_long__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_enum_dcd_e_p_void__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_enum_ptt_t__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_enum_ptt_t_p_void__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_enum_rptr_shift_t__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_enum_scan_t_int__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_enum_split_t_unsigned_int__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_enum_vfo_op_t__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_int__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_long__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_long_int__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_long_p_int__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_long_p_value_t__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_long_value_t__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_p_char_p_int__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_p_double__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_enum_split_t__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_p_double_p_unsigned_long_long_p_long_p_void__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_p_enum_dcd_e__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_p_enum_ptt_t__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_p_enum_rptr_shift_t__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_p_enum_split_t_p_unsigned_int__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_f_p_struct_s_rig_p_q_const__struct_confparams_p_value_t_p_void__int_p_void__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_p_f_p_struct_s_rig_unsigned_int_p_p_struct_channel_int_p_q_const__struct_chan_list_p_void__int_p_void__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_p_int__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_p_long__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_p_q_const__char__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_p_q_const__struct_channel__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_p_struct_channel_int__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_p_unsigned_int__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_p_unsigned_long_long_p_long__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_p_void__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_unsigned_int__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_unsigned_int_p_value_t_p_unsigned_int_p_unsigned_int_p_unsigned_int__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_unsigned_int_value_t__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_int__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_long_p_void__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_int__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_p_value_t__int,
  _swigc__p_f_p_struct_s_rig_unsigned_int_unsigned_long_long_value_t__int,
  _swigc__p_f_p_struct_s_rig_unsigned_long_long_p_value_t__int,
  _swigc__p_f_p_struct_s_rig_unsigned_long_long_value_t__int,
  _swigc__p_f_p_struct_s_rot__int,
  _swigc__p_f_p_struct_s_rot__p_char,
  _swigc__p_f_p_struct_s_rot_float_float__int,
  _swigc__p_f_p_struct_s_rot_int__int,
  _swigc__p_f_p_struct_s_rot_int_int__int,
  _swigc__p_f_p_struct_s_rot_long_int__int,
  _swigc__p_f_p_struct_s_rot_long_p_char__int,
  _swigc__p_f_p_struct_s_rot_long_p_char_int__int,
  _swigc__p_f_p_struct_s_rot_long_p_int__int,
  _swigc__p_f_p_struct_s_rot_long_p_q_const__char__int,
  _swigc__p_f_p_struct_s_rot_long_p_value_t__int,
  _swigc__p_f_p_struct_s_rot_long_value_t__int,
  _swigc__p_f_p_struct_s_rot_p_enum_rot_status_t__int,
  _swigc__p_f_p_struct_s_rot_p_float_p_float__int,
  _swigc__p_f_p_struct_s_rot_unsigned_long_long_int__int,
  _swigc__p_f_p_struct_s_rot_unsigned_long_long_p_int__int,
  _swigc__p_f_p_struct_s_rot_unsigned_long_long_p_value_t__int,
  _swigc__p_f_p_struct_s_rot_unsigned_long_long_value_t__int,
  _swigc__p_filter_list,
  _swigc__p_float,
  _swigc__p_freq_range_list,
  _swigc__p_gran,
  _swigc__p_hamlib_async_pipe,
  _swigc__p_hamlib_band_t,
  _swigc__p_hamlib_bandselect_t,
  _swigc__p_hamlib_cache_t,
  _swigc__p_hamlib_port,
  _swigc__p_int,
  _swigc__p_long,
  _swigc__p_long_long,
  _swigc__p_multicast_s,
  _swigc__p_p_char,
  _swigc__p_p_void,
  _swigc__p_powerstat_t,
  _swigc__p_pthread_mutex_t,
  _swigc__p_pthread_t,
  _swigc__p_ptt_t,
  _swigc__p_ptt_type_e,
  _swigc__p_reset_t,
  _swigc__p_rig_callbacks,
  _swigc__p_rig_caps,
  _swigc__p_rig_debug_level_e,
  _swigc__p_rig_port_e,
  _swigc__p_rig_ptrx_t,
  _swigc__p_rig_spectrum_avg_mode,
  _swigc__p_rig_spectrum_line,
  _swigc__p_rig_spectrum_mode_e,
  _swigc__p_rig_spectrum_scope,
  _swigc__p_rig_state,
  _swigc__p_rig_type_t,
  _swigc__p_rot_caps,
  _swigc__p_rot_state,
  _swigc__p_rot_status_t,
  _swigc__p_rot_type_t,
  _swigc__p_rptr_shift_t,
  _swigc__p_s_rig,
  _swigc__p_s_rot,
  _swigc__p_scan_t,
  _swigc__p_short,
  _swigc__p_signed_char,
  _swigc__p_sockaddr_in,
  _swigc__p_split_t,
  _swigc__p_time_t,
  _swigc__p_timespec,
  _swigc__p_toneArray,
  _swigc__p_tuning_step_list,
  _swigc__p_twiddle_state_t,
  _swigc__p_unsigned_char,
  _swigc__p_unsigned_int,
  _swigc__p_unsigned_long,
  _swigc__p_unsigned_long_long,
  _swigc__p_unsigned_short,
  _swigc__p_value_t,
  _swigc__p_value_t_b,
  _swigc__p_vfo_op_t,
  _swigc__p_void,
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */

/* -----------------------------------------------------------------------------
 * Type initialization:
 * This problem is made tough by the requirement that no dynamic
 * memory is used. Also, since swig_type_info structures store pointers to
 * swig_cast_info structures and swig_cast_info structures store pointers back
 * to swig_type_info structures, we need some lookup code at initialization.
 * The idea is that swig generates all the structures that are needed.
 * The runtime then collects these partially filled structures.
 * The SWIG_InitializeModule function takes these initial arrays out of
 * swig_module, and does all the lookup, filling in the swig_module.types
 * array with the correct data and linking the correct swig_cast_info
 * structures together.
 *
 * The generated swig_type_info structures are assigned statically to an initial
 * array. We just loop through that array, and handle each type individually.
 * First we lookup if this type has been already loaded, and if so, use the
 * loaded structure instead of the generated one. Then we have to fill in the
 * cast dependencies. The cast data is initially stored in something like a
 * two-dimensional array. Each row corresponds to a type (there are the same
 * number of rows as there are in the swig_type_initial array). Each entry in
 * a column is one of the swig_cast_info structures for that type.
 * The cast_initial array is actually an array of arrays, because each row has
 * a variable number of columns.
 *
 * We loop through the cast[] array associated with the type and mark casts
 * which have not been defined in previously loaded modules by assigning
 * cast pointer value to cast->next. We also hash cast->type->name string
 * and store the value in the cast->value field. If we encounter swig_cast_info
 * structure that represents a cast to self we move it to the beginning
 * of the cast array. One trick we need to do is making sure the type pointer
 * in the swig_cast_info struct is correct.
 *
 * First off, we lookup the cast->type name to see if it is already loaded.
 * There are three cases to handle:
 *  1) If the cast->type has already been loaded AND the type we are adding
 *     casting info to has not been loaded (it is in this module), THEN we
 *     replace the cast->type pointer with the type pointer that has already
 *     been loaded.
 *  2) If BOTH types (the one we are adding casting info to, and the
 *     cast->type) are loaded, THEN the cast info has already been loaded by
 *     the previous module so we just ignore it.
 *  3) Finally, if cast->type has not already been loaded, then we add that
 *     swig_cast_info to the list (because the cast->type) pointer will
 *     be correct.
 *
 * Once the cast array has been set up AND it does have new casts that need
 * to be added we sort non-self cast entries to move filtered out entries
 * to the end of the array and to arrange the rest in the increasing order
 * of their type pointer values. We store the index of the last added entry
 * in the cast->value field of the entry[0] (overwriting the name hash). Then
 * we sort <next|value> fields of the remaining entries to arrange hash values
 * in the increasing order. This way cast->next->type->name field matches
 * the cast->value hash.
 *
 * Example:
 * Array of casts for type stored at 0x5000, cast to type stored at 0x3000
 * has already been loaded
 *
 *      After sweep-and-hash:   After sort-by-type:    After sort-by-hash:
 *        ________________       ________________       ________________
 *       |                |     |                |     |                |
 * Entry |  type = 0x5000 |     |  type = 0x5000 |     |  type = 0x5000 |
 *   0   |                |     |                |     |                |
 *       |  next = Entry0 |     |  next = Entry0 |     |  next = Entry0 |
 *       | value = 1212   |     | value = 3      |     | value = 3      |
 *       |                |     |                |     |                |
 *       |================|     |================|     |================|
 *       |                |     |                |     |                |
 * Entry |  type = 0x2000 |     |  type = 0x1000 |     |  type = 0x1000 |
 *   1   |                |     |                |     |                |
 *       |  next = Entry1 |     |  next = Entry1 |     |  next = Entry3 |
 *       | value = 3434   |     | value = 4545   |     | value = 2323   |
 *       |________________|     |________________|     |________________|
 *       |                |     |                |     |                |
 * Entry |  type = 0x3000 |     |  type = 0x2000 |     |  type = 0x2000 |
 *   2   |                |     |                |     |                |
 *       |  next = 0      |     |  next = Entry2 |     |  next = Entry2 |
 *       | value = 0      |     | value = 3434   |     | value = 3434   |
 *       |________________|     |________________|     |________________|
 *       |                |     |                |     |                |
 * Entry |  type = 0x1000 |     |  type = 0x4000 |     |  type = 0x4000 |
 *   3   |                |     |                |     |                |
 *       |  next = Entry3 |     |  next = Entry3 |     |  next = Entry1 |
 *       | value = 4545   |     | value = 2323   |     | value = 4545   |
 *       |________________|     |________________|     |________________|
 *       |                |     |                |     |                |
 * Entry |  type = 0x4000 |     |  type = 0x3000 |     |  type = 0x3000 |
 *   4   |                |     |                |     |                |
 *       |  next = Entry4 |     |  next = 0      |     |  next = 0      |
 *       | value = 2323   |     | value = 0      |     | value = 0      |
 *       |________________|     |________________|     |________________|
 *
 * Once the cast array has been initialized, we use cast[0]->next field to link
 * it into the list of cast arrays for the type.
 *              ____    ____    ____
 * type->cast->|next|->|next|->|next|->0
 *             |----|  |----|  |----|
 *             |----|  |----|  |----|
 *             |----|  |----|  |----|
 *
 * Subsequent cast resolution works as follows:
 *
 * 1. Check whether the type matches the first entry in the current cast array.
 * 2. If not, then do a binary search over the (0:cast->value] interval using
 *    either type address or the hash value of the type name.
 * 3. If not found, then move over to the next cast array (cast[0]->next).
 *
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#if 0
} /* c-mode */
#endif
#endif

#if 0
#define SWIGRUNTIME_DEBUG
#endif

#ifndef SWIG_INIT_CLIENT_DATA_TYPE
#define SWIG_INIT_CLIENT_DATA_TYPE void *
#endif

/*
 * Sort function that puts cast entries with nonzero 'next' at the front
 * of the array while ordering them by addresses of their 'type' structs.
 */
SWIGINTERN int SWIG_CastCmpStruct(const void *pa, const void *pb) {
  swig_cast_info *pca = (swig_cast_info *)pa;
  swig_cast_info *pcb = (swig_cast_info *)pb;
  if (pca->type < pcb->type)
    return (pca->next || pcb->next == 0) ? -1 : 1;
  if (pca->type > pcb->type)
    return (pcb->next || pca->next == 0) ? 1 : -1;
  return 0;
}

/*
 * Shell-sort 'next' and 'value' field pairs to order them by 'value'.
 */
SWIGINTERN void SWIG_CastHashSort(swig_cast_info *cast, int size) {
  const int hmax = size/9;
  int h, i;
  for(h = 1; h <= hmax; h = 3*h+1);
  for(; h > 0; h /= 3)
  {
    for(i = h; i < size; ++i)
    {
      swig_cast_info *p = cast[i].next;
      unsigned int hash = cast[i].value;
      int j = i;
      while(j >= h && hash < cast[j-h].value)
      {
        cast[j].next = cast[j-h].next;
        cast[j].value = cast[j-h].value;
        j -= h;
      }
      cast[j].next = p;
      cast[j].value = hash;
    }
  }
}

SWIGRUNTIME void
SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata) {
  size_t i;
  swig_module_info *module_head, *iter;
  int init;

  /* check to see if the circular list has been setup, if not, set it up */
  if (swig_module.next==0) {
    /* Initialize the swig_module */
    swig_module.type_initial = swig_type_initial;
    swig_module.cast_initial = swig_cast_initial;
    swig_module.next = &swig_module;
    init = 1;
  } else {
    init = 0;
  }

  /* Try and load any already created modules */
  module_head = SWIG_GetModule(clientdata);
  if (!module_head) {
    /* This is the first module loaded for this interpreter */
    /* so set the swig module into the interpreter */
    SWIG_SetModule(clientdata, &swig_module);
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    iter=module_head;
    do {
      if (iter==&swig_module) {
        /* Our module is already in the list, so there's nothing more to do. */
        return;
      }
      iter=iter->next;
    } while (iter!= module_head);

    /* otherwise we must add our module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }

  /* When multiple interpreters are used, a module could have already been initialized in
     a different interpreter, but not yet have a pointer in this interpreter.
     In this case, we do not want to continue adding types... everything should be
     set up already */
  if (init == 0) return;

  /* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
  printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
#endif
  for (i = 0; i < swig_module.size; ++i) {
    swig_type_info *type = 0;
    swig_type_info *target_type;
    swig_cast_info *cast, *first;
    int num_mapped = 0;

#ifdef SWIGRUNTIME_DEBUG
    printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
#endif

    /* if there is another module already loaded */
    if (swig_module.next != &swig_module) {
      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
    }
    if (type) {
      /* Overwrite clientdata field */
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found type %s\n", type->name);
#endif
      if (swig_module.type_initial[i]->clientdata) {
	type->clientdata = swig_module.type_initial[i]->clientdata;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
#endif
      }
    } else {
      type = swig_module.type_initial[i];
    }

    /* Insert casting types */
    cast = first = swig_module.cast_initial[i];
    while (cast->type) {

      /* Don't need to add information already in the list */
      target_type = 0;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
#endif
      if (swig_module.next != &swig_module) {
        target_type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
        if (target_type) {

          /* Target type already defined in another module */
#ifdef SWIGRUNTIME_DEBUG
          printf("SWIG_InitializeModule: found cast %s\n", target_type->name);
#endif
          if (type == swig_module.type_initial[i]) {
#ifdef SWIGRUNTIME_DEBUG
            printf("SWIG_InitializeModule: skip old type %s\n", target_type->name);
#endif
            cast->type = target_type;
            target_type = 0;
          } else {
            /* Check if this cast is already in the list */
            swig_cast_info *ocast = SWIG_TypeCheck(target_type->name, type);
#ifdef SWIGRUNTIME_DEBUG
            if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", target_type->name);
#endif
            if (!ocast) target_type = 0;
          }
        }
      }

      if (!target_type) {
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
#endif
        /* Set inclusion mark for sorting */
        cast->next = cast;
        num_mapped++;

        if (type == cast->type) {
#ifdef SWIGRUNTIME_DEBUG
          printf("%s : self cast at pos [%li]\n", type->name, cast - first);
#endif
          if (cast - first) {

            /* Move cast to itself to the first entry in the array */

            swig_cast_info tmp = *cast;
            *cast = *first;
            *first = tmp;
          }
          first++;

        } else {
          cast->value = SWIG_Hash(cast->type->name, (unsigned int)strlen(cast->type->name));
        }
      }
      cast++;
    }

    if (num_mapped) {
      if (cast - first) {
        swig_cast_info *tmp;

        /* Sort casts by type address for binary search in SWIG_TypeCheckStruct */
        qsort(first, cast - first, sizeof(swig_cast_info), SWIG_CastCmpStruct);

        /* Remap back links for added entries */
        cast = swig_module.cast_initial[i] + num_mapped;
        for (tmp = first; tmp < cast; tmp++) {
          tmp->next = tmp;
        }
      }

      /* Set the value field of the first entry to the index of the last added entry */
      cast = swig_module.cast_initial[i];
      cast->value = num_mapped - 1;

      num_mapped -= (int)(first - cast);
      if (num_mapped > 1) {
        /* Sort <'next','value'> pairs by 'value' for binary search in SWIG_TypeCheck */

        SWIG_CastHashSort(first, num_mapped);
      }

      first = type->cast;
      if (first) {
        /* Link the current set into the list of cast arrays */
        cast->next = first->next;
        first->next = cast;
      } else {
        cast->next = 0;
        type->cast = cast;
      }
    }

    /* Set entry in modules->types array equal to the type */
    swig_module.types[i] = type;
  }
  swig_module.types[i] = 0;

#ifdef SWIGRUNTIME_DEBUG
  printf("**** SWIG_InitializeModule: Cast List ******\n");
  for (i = 0; i < swig_module.size; ++i) {
    int j = 0;
    swig_cast_info *cast = swig_module.cast_initial[i];
    printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
    while (cast->type) {
      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
      cast++;
      ++j;
    }
  printf("---- Total casts: %d\n",j);
  }
  printf("**** SWIG_InitializeModule: Cast List ******\n");
#endif
}

/* This function will propagate the clientdata field of type to
* any new swig_type_info structures that have been added into the list
* of equivalent types.  It is like calling
* SWIG_TypeClientData(type, clientdata) a second time.
*/
SWIGRUNTIME void
SWIG_PropagateClientData(void) {
  size_t i;
  static int init_run = 0;

  if (init_run) return;
  init_run = 1;

  for (i = 0; i < swig_module.size; i++) {
    if (swig_module.types[i]->clientdata) {
      swig_cast_info *head, *cast;
      head = swig_module.types[i]->cast;
      while (head) {
        for (cast = head; (cast - head) <= head->value; cast++) {
          if (!cast->converter) {
            if (cast->type && !cast->type->clientdata)
              SWIG_TypeClientData(cast->type, swig_module.types[i]->clientdata);
          }
        }
        head = head->next;
      }
    }
  }
}

#ifdef __cplusplus
#if 0
{ /* c-mode */
#endif
}
#endif



/* Forward declaration of where the user's %init{} gets inserted */
void SWIG_init_user(lua_State* L );
    
#ifdef __cplusplus
extern "C" {
#endif
/* this is the initialization function
  added at the very end of the code
  the function is always called SWIG_init, but an earlier #define will rename it
*/
#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
LUALIB_API int SWIG_init(lua_State* L)
#else
SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
#endif
{
#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) /* valid for both Lua and eLua */
  int i;
  int globalRegister = 0;
  /* start with global table */
  lua_pushglobaltable (L);
  /* SWIG's internal initialisation */
  SWIG_InitializeModule((void*)L);
  SWIG_PropagateClientData();
#endif

#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)) || defined(SWIG_LUA_ELUA_EMULATE)
  /* add a global fn */
  SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type);
  SWIG_Lua_add_function(L,"swig_equals",SWIG_Lua_class_equal);
#endif

#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
  /* set up base class pointers (the hierarchy) */
  for (i = 0; swig_types[i]; i++){
    if (swig_types[i]->clientdata){
      SWIG_Lua_init_base_class(L,(swig_lua_class*)(swig_types[i]->clientdata));
    }
  }
#ifdef SWIG_LUA_MODULE_GLOBAL
  globalRegister = 1;
#endif


#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
  SWIG_Lua_namespace_register(L,&swig_SwigModule, globalRegister);
#endif

#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
  for (i = 0; swig_types[i]; i++){
    if (swig_types[i]->clientdata){
      SWIG_Lua_elua_class_register_instance(L,(swig_lua_class*)(swig_types[i]->clientdata));
    }
  }
#endif

#if defined(SWIG_LUA_ELUA_EMULATE)
  lua_newtable(L);
  SWIG_Lua_elua_emulate_register(L,swig_SwigModule.ns_methods);
  SWIG_Lua_elua_emulate_register_clear(L);
  if(globalRegister) {
    lua_pushstring(L,swig_SwigModule.name);
    lua_pushvalue(L,-2);
    lua_rawset(L,-4);
  }
#endif

#endif

#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
  /* invoke user-specific initialization */
  SWIG_init_user(L);
  /* end module */
  /* Note: We do not clean up the stack here (Lua will do this for us). At this
     point, we have the globals table and out module table on the stack. Returning
     one value makes the module table the result of the require command. */
  return 1;
#else
  return 0;
#endif
}

#ifdef __cplusplus
}
#endif


const char* SWIG_LUACODE=
  "";

void SWIG_init_user(lua_State* L)
{
  /* exec Lua code if applicable */
  SWIG_Lua_dostring(L,SWIG_LUACODE);
}

