source: tags/cvs_2_svn/AISC_COM/pb_com.aisc

Last change on this file was 5390, checked in by westram, 16 years ago
  • TAB-Ex
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 10.6 KB
Line 
1PROJECT pb_com
2OBJECT_KEY PB,                  # MAIN PREFIX
3MAX_KEY 100,                    # MAX NUMBER OF AN ATTRIBUTE
4MAX_OBJECT 6,                   # MAX DIFFERENT STRUCTURES
5MAX_STRING_LEN 1024,
6MAX_PAR_CNT 16,
7MAGIC_NUMBER 0x471100,          #       MAGIC_NUMBER 6 HEX DIGITS
8MYTABSTOP       8,
9SERVER_INCLUDES (~
10#include <stdio.h>
11#include "pb_com.h"
12#include "pb_com_keys.h"~)
13INCLUDE_INCLUDES (~$$(#FILE aisc_include.header)~)
14
15DATA {
16
17# ********************************* USER DATA *******************************************
18
19@CONST,         @VALUE,         @DOCU;
20LIST_SIZE,      20,             (~Size of I_STR Buffer~);
21OK,             1,              (~all ok~);
22FAULT,          0,              (~an error~);
23
24@ENUM;
25bool, SKEY BOOL, {
26        @VAR,   @VAL,   @DOCU;
27        false,  ,       nein;
28        true,   ,       ja;
29};
30
31# ******************************* PRIVAT STRUCTURES: DO NOT CHANGE *********************************
32
33@STRUCT, @SKEY, @SKEYC, @SDOCU;
34
35dll_public,     ,       ,       (~Vater einer DoubledLinkedList dll~), {
36        @TYPE,          @IDENT, @REF,   @ACC,   @SAVE,  @KEY,   @KEYC,  @INIT,  @DOCU;
37        t_key,          key,    t,      r,      ,       ,       ,       ,       (~ The key~);
38        int,            cnt,    t,      r,      ,       CNT,    0,      ,       (~ Number of elements~);
39        long,           hash,   t,      ,       ,       ,       ,       ,       (~ Hash Table~);
40        dllheader_ext,  parent, flt,    r,      ,       PARENT, 1,      ,       (~ My Owner~);
41        dllheader_ext,  last,   flt,    r,      ,       LAST,   2,      ,       (~ Pointer to the last element~);
42        };
43
44
45dll_header,     COMMON, 0,      (~Der Link Header (sollte Kopf jeder Funktion sein)~), {
46        @TYPE,          @IDENT, @REF,   @ACC,   @SAVE,  @KEY,   @KEYC,  @INIT,  @DOCU;
47        t_key,          key,    t,      r,      ,       KEY,    0,      ,       (~ The Key~);
48        aisc_string,            aisc_get_keystring,%,r, ,       KEYSTRING,1,    ,       (~ THE STRING of the KEY ~);
49        dll_public,     parent, ls,     r,      ,       (~~),   2,      ,       (~ Pointer to dll_public~);
50        aisc_string,            ident,  t,      ,       1,      IDENT,  5,      ,       (~ The ident [not necessary]~);
51        };
52
53
54# ********************************* USER STRUCTURES *******************************************
55doclist, DOCLIST,       5,      (~the document list~), {
56        @TYPE,  @IDENT, @REF,   @ACC,   @SAVE,  @KEY,           @KEYC,  @INIT,          @DOCU;
57        dllh,   mh,     t,      ,       ,       (~~),           0,      ,               (~Header~);
58        int,    docnr,  t,      r,      ,       DOCNR,          10,     ,               (~document number~);
59        aisc_string,    doclab, t,      r,      ,       DOCLABEL,       11,     ,               (~the document short label~);
60        };
61
62fieldlist, FIELDLIST,   4,      (~the field list~), {
63        @TYPE,  @IDENT, @REF,   @ACC,   @SAVE,  @KEY,           @KEYC,  @INIT,          @DOCU;
64        dllh,   mh,     t,      ,       ,       (~~),           0,      ,               (~Header~);
65        aisc_string,    field,  t,      r,      ,       FIELD,          10,     ,               (~the field~);
66        };
67
68labellist, LABELLIST,   3,      (~the field label list~), {
69        @TYPE,  @IDENT, @REF,   @ACC,   @SAVE,  @KEY,           @KEYC,  @INIT,          @DOCU;
70        dllh,   mh,     t,      ,       ,       (~~),           0,      ,               (~Header~);
71        aisc_string,    label,  t,      r,      ,       LABEL,          10,     ,               (~the field label~);
72        int,    type,   t,      r,      ,       TYPE,           11,     65,             (~the field type in ascii~);
73        };
74
75
76lstruct, LOCS,  2,      (~local communication buffer~), {
77        @TYPE,  @IDENT, @REF,   @ACC,   @SAVE,  @KEY,           @KEYC,  @INIT,          @DOCU;
78        dllh,   mh,     t,      ,       ,       (~~),           0,      ,               (~Header~);
79        aisc_string,    species,t,      rw,     ,       SPECIES,        10,     "species",      (~a species ident~);
80        aisc_string,    probe,  t,      rw,     ,       PROBE,          11,     "not_specified",(~the probe~);
81        aisc_string,    node,   t,      rw,     ,       NODE,           12,     "main",         (~the node~);
82        aisc_string,    query_err,t,    r,      ,       ERROR_MSG,      13,     "",             (~the error~);
83        int,    socket, t,      ,       ,       ,               ,       pb_init_socket(this), (~the callback~), DESTROY pb_destroy_socket(this);
84        int,    client_id,t,    ,       ,       ,               ,       pb_init_clientid(this), (~init clientid~);
85
86        aisc_string,    user,   t,      rw,     ,       USER,           20,     "unknown",      (~the username~);
87        aisc_string,    address,t,      rw,     ,       ADDRESS,        21,     "unknown",      (~the useraddress~);
88        aisc_string,    login,  t,      rw,     ,       LOGINTIME,      22,     "notime",       (~the date the user logged in~);
89        aisc_string,    pb_test_passwd, %,w,    ,       PASSWD,         23,     ,               (~the users passwd~);
90
91        int,    q_cnt,  t,      r,      ,       QCNT,           25,     ,               (~the number of computed queries~);
92
93
94        aisc_string,    query,  t,      w,      ,       QUERY,          40,     "query",        (~the query text~);
95        func,   do_query,%,     w,      ,       DO_QUERY,       41,     ,               (~eval query~);
96        doclist,d_list, d,      r,      ,       DOCLIST,        42,     ,               (~the document list~);
97        bytestring,dn_list,t,   r,      ,       DOCNRARRAY,     45,     ,               (~intarray of docnrs~);
98        bytestring,ds_list,t,   r,      ,       DOCSARRAY,      46,     ,               (~stringarray of docstring~);
99        int,    hits,   t,      r,      ,       HITS,           47,     ,               (~the number of hit docs~);
100
101        int,    doc_nr, t,      rw,     ,       DOC,            50,     -1,             (~document number~);
102        func,   get_doc,%,      w,      ,       GET_DOC,        51,     ,               (~get_struct_fields~);
103        fieldlist,f_list,d,     r,      ,       FIELDLIST,      52,     ,               (~the field value list~);
104        bytestring,fs_list,t,   r,      ,       FIELDARRAY,     55,     ,               (~stringarray of fieldcontents~);
105        bytestring,pb_get_text,%,r,     ,       TEXT,           56,     ,               (~stringarray of doctext~);
106        int,    page_nr,t,      rw,     ,       PAGE,           57,     0,              (~document number~);
107        bytestring,pb_get_pic,%,r,      ,       PIC,            58,     ,               (~stringarray of docpagepic~);
108        int,    page_anz,t,     rw,     ,       PAGEANZ,        59,     0,              (~number of pages~);
109        int,    pix_width,t,    rw,     ,       PIX_WIDTH,      60,     0,              (~image pix width~);
110        int,    pix_height,t,   rw,     ,       PIX_HEIGHT,     61,     0,              (~image pix height~);
111        int,    pix_length,t,   rw,     ,       PIX_LENGTH,     62,     0,              (~image pix length~);
112        int,    pix_maplength,t,rw,     ,       PIX_MAPLENGTH,  63,     0,              (~image pix maplength~);
113
114        aisc_string,    send_hot,%,     w,      ,       SENDHOT,        65,     ,               (~send hotline msg func~);
115        aisc_string,    opanswer,%,     r,      ,       OPANSWER,       66,     ,               (~ get operator answer func ~);
116        aisc_string, search_probe,%,    w,      ,       SET_PROBE,      67,     ,               (~ set the probe string ~);
117        aisc_string, search_target,%,   w,      ,       SET_TARGET,     68,     ,               (~ set the probe string ~);
118        bytestring, create_probe,%,w,   ,       CREATE,         70,     ,               (~ create probe ~);
119        aisc_string, get_species_info,%,w,      ,       GET_SPECIES,    75,     ,               (~ get species info ~);
120        bytestring, cr_answ,t,  r,      ,       CREATEANSWER,   80,     ,               (~ answer of create (probe) ~);
121        };
122
123
124seqlist, SEQLIST,       6,      (~the field label list~), {
125        @TYPE,  @IDENT, @REF,   @ACC,   @SAVE,  @KEY,           @KEYC,  @INIT,          @DOCU;
126        dllh,   mh,     t,      ,       ,       (~~),           0,      ,               (~Header~);
127        aisc_string,    seq,    t,      ,       ,       ,               ,       ,               (~the seq label~);
128        int,    docnum, t,      ,       ,       ,               ,       ,               (~the seq docnr~);
129        };
130
131pbc_main, MAIN, 1, (~Die globalen Daten~), {
132        @TYPE,  @IDENT,         @REF,   @ACC,   @SAVE,  @KEY,           @KEYC,  @INIT,          @DOCU;
133        t_key,  key,            t,      n,      ,       ,               ,       ,               (~Der KEY~);
134        seqlist, seq_l,         d,      ,       ,       ,               ,       ,               (~ probe seq list~);
135        lstruct,loc_st,         d,      ,       ,       LOCS,           10,     ,               (~Die Parameter~);
136        func,   server_shutdown,%,      w,      ,       SHUTDOWN,       20,     ,               (~shut down~)   ,EXTERN;
137        aisc_string,    passwd,         t,      w,      ,       PASSWD,         22,     "sdt5",         (~ shutdown passwd ~);
138        labellist,l_list,       d,      ,       ,       LABELLIST,      26,     ,               (~the field label list~);
139        int,    l_cnt,          t,      r,      ,       LCNT,           30,     0,              (~the number of field names~);
140        int,    m_type,         t,      ,       ,       MESSAGE_TYPE,   31,     0,              (~the message type ~);
141        aisc_string,    m_text,         t,      ,       ,       MESSAGE,        32,     "NO_MSG",       (~ the message text ~);
142        func,   broadcast,      %,      w,      ,       BROADCAST,      33,     ,               (~ broadcast func ~);
143        int,    pix_magic,      t,      rw,     ,       PIX_MAGIC,      34,     0,              (~ pix magic num ~);
144        int,    pix_type,       t,      rw,     ,       PIX_TYPE,       35,     0,              (~ pix type ~);
145        bytestring,c_tree,      t,      r,      ,       TREE,           36,     ,               (~compact tree~);
146        bytestring,pt_answer_match,%,   w,      ,       PTANSWER_MATCH, 40,     ,               (~answer from pt server~);
147        bytestring,pt_answer_create,%,  w,      ,       PTANSWER_CREATE,41,     ,               (~answer from pt server~);
148        bytestring,pt_answer_find,%,    w,      ,       PTANSWER_FIND,  42,     ,               (~answer from pt server~);
149        int,    pt_answer_id,   t,      w,      ,       PTANSWERID,     44,     0,              (~pt server answer address~);
150        };
151}
Note: See TracBrowser for help on using the repository browser.