Module: Portal

Defined in:
lib/portal.rb,
ext/portalext.c,
ext/portalext.c

Overview

Helper functions for manipulating and converting data between Ruby and Flist.

Defined Under Namespace

Classes: Connection, Error

Constant Summary collapse

PIN_FLDT_UNUSED =

Fields from pcm.h. Aquire with ruby -ne ‘if $_ =~ /^#defines+(PIN_FLDT_.*)s+(d+)(.*)$/; puts “%-30s = %2s # %s” %[$1,$2,$3];end’ pcm.h

Reference with
0
PIN_FLDT_INT =
1
PIN_FLDT_UINT =

/* OBSOLETE */

2
PIN_FLDT_ENUM =
3
PIN_FLDT_NUM =

/* OBSOLETE */

4
PIN_FLDT_STR =
5
PIN_FLDT_BUF =
6
PIN_FLDT_POID =
7
PIN_FLDT_TSTAMP =
8
PIN_FLDT_ARRAY =

/* array element */

9
PIN_FLDT_SUBSTRUCT =

/* sub-type substructure */

10
PIN_FLDT_OBJ =

/* whole object */

11
PIN_FLDT_BINSTR =

/* (short) binary string data */

12
PIN_FLDT_ERR =
13
PIN_FLDT_DECIMAL =
14
PIN_FLDT_TIME =
15
PIN_FLDT_TEXTBUF =
16
PIN_FLDT_ERRBUF =
PIN_FLDT_ERR
PIN_FLDT_LAST =
16
PIN_ERROR_LEVEL_ERROR =
1
PIN_ERROR_LEVEL_WARN =
2
PIN_ERROR_LEVEL_DEBUG =
3

Class Method Summary collapse

Class Method Details

.field_nameObject

Returns the name for a given field number.



175
176
177
# File 'ext/portalext.c', line 175

static VALUE
portal_field_name(self,num)
VALUE self, num;

.field_numObject

The Portal field number for a string.



152
153
154
# File 'ext/portalext.c', line 152

static VALUE
portal_field_num(obj,str)
VALUE obj, str;

.field_typeObject

The Portal field type.



193
194
195
# File 'ext/portalext.c', line 193

static VALUE
portal_field_type(obj, value)
VALUE obj, value;

.hash_to_flist_stringObject

Test function for the from flist to hash conversion.



591
592
593
# File 'ext/portalext.c', line 591

static VALUE
portal_hash_to_flist_string(self,hash)
VALUE self, hash;

.set_log_levelObject

call-seq:

   Portal.set_log_level(level) -> true
 example:
   Portal.set_log_level(:warn)
   Portal.set_log_level(2)

Set the error level for the log file using symbols, strings, or ints.


644
645
646
# File 'ext/portalext.c', line 644

static VALUE
portal_set_log_level(self,level)
VALUE self, level;

.set_program_nameObject

call-seq:

  Portal.set_program_name(name) -> true

Set the program name for the Portal log file.


625
626
627
# File 'ext/portalext.c', line 625

static VALUE
portal_set_program_name(self,name)
VALUE self, name;

.test_flist_to_hashObject



564
565
566
# File 'ext/portalext.c', line 564

static VALUE
portal_test_flist_to_hash(self,hash)
VALUE self, hash;