Exemplo n.º 1
0
def urborig_str(s):
    # used in URBS and URBT
    return str_str(
        s, {
            'A': 'Origin: Adabas nucleus',
            'G': 'Origin: ADARES',
            'L': 'Origin: ADALOD Load',
            'R': 'Origin: ADARPL Replay',
            'S': 'Origin: ADASAV',
            'U': 'Origin: ADALOD Update'
        })
Exemplo n.º 2
0
def urbsutyp_str(s):
    # used in URBSUT
    return str_str(
        s, {
            0x41: 'Change field length',
            0x44: 'Delete file',
            0x48: 'Refresh file',
            0x4a: 'Release descriptor',
            0x4b: 'Rename file',
            0x4e: 'Switch Reuse ISN',
            0x4f: 'Switch Reuse DS',
            0x55: 'Modify FCB',
            0x57: 'Define file',
            0x58: 'Write FDT',
            0x59: 'Add new fields',
            0x5c: 'Change field format',
            0x68: 'Switch USERISN',
            0x69: 'Switch MIXDSDEV',
            0x70: 'Online invert',
            0x78: 'Switch MUPEX',
        })
Exemplo n.º 3
0
def urbgffmt_str(s):
    return str_str(
        s,
        {
            0x00: '',  # No format (e.g., group)
            0x01: 'A',  # Alphanumeric
            0x02: 'B',  # Binary
            0x03: 'P',  # Packed
            0x04: 'U',  # Unpacked
            0x05: 'g',  # Short floating point               ?
            0x06: 'G',  # Long floating point                ?
            0x10: 'Date',  # Date type field               ?
            0x13: 'PDate',  # Packed date (4 bytes packed)  ?
            0x20: 'Time',  # Time type field               ?
            0x23: 'PTime',  # Packed time (7 bytes packed)  ?
            #0x40: 'W',     # Wide character format field setting
            0x41: 'W',  # Wide character (used with URBGFFAL)
            0x42: 'WB',  # Binary string (used with URBGFFBN)
            #0x80: 'Signed',  # Signed        (used with URBGFFBN)
            0x82:
            'B signed',  # Binary Signed (used with URBGFFBN) == Int1/2/4/8 ?
        })
Exemplo n.º 4
0
def urbtsort_str(s):
    return str_str(
        s, {
            'Y': 'Transaction records are sorted',
            'N': 'Transaction records are not sorted'
        })
Exemplo n.º 5
0
def urbtptrn_str(s):
    return str_str(s, {'Y': 'Prior-transaction request'})
Exemplo n.º 6
0
def urbtinst_str(s):
    return str_str(s, {'Y': 'Initial-state transaction'})
Exemplo n.º 7
0
def urbsst_str(s):
    "convert URBS status code to readable string"
    return str_str(s, urbs_status)
Exemplo n.º 8
0
def urbruc_str(s):
    return str_str(s, urbruc_type)
Exemplo n.º 9
0
# -*- coding: latin1 -*-
"""etbcinf8.py contains selected Command Info Services classes Info_*
   For Broker versions < V10 they should be imported from this module.

"""

from time import localtime, strftime
from adapya.base.defs import Abuf
from adapya.base.datamap import Datamap, String, Bytes, Filler, Uint1, \
    Uint2, Uint4, Uint8, T_HEX, T_IN, T_OUT, T_INOUT, T_NONE, str_str
from adapya.base.dtconv import intervalstr
from adapya.entirex.broker import option_str, uowStatus_str

# --- EntireX Broker Information Structure BROKER ------------------------

pstore_str = lambda i: str_str(i, { 0:'No', 1:'Hot', 2:'Cold', 4:'Warm'})

# pack class server service into one string 'class/server/service'
service_str = lambda svc:'%s/%s/%s' % (self.server_class,self.server,svc)

class Info_broker(Datamap):
    def __init__(self, **kw):
        fields=(                            # Available with CIS Interface version
        String('platform',8),
        Uint4('runtime',ppfunc=intervalstr),  #stckintervalstr if stck seconds
        Uint4('num_worker_act'),
        Uint4('num_long'),
        Uint4('long_act'),
        Uint4('long_high'),
        Uint4('num_short'),
        Uint4('short_act'),
Exemplo n.º 10
0
def urbirt_str(s):
    return str_str(s, urbi_rtext)
Exemplo n.º 11
0
def urbdtyp_str(s):
    return str_str(s, urbd_type)
Exemplo n.º 12
0
def urbrsnd_str(s):  # used in URBR and URBT
    return str_str(s, {'Y': 'Possible double delivery'})
Exemplo n.º 13
0
def urbcont_str(s):  # used in URBC and URBT
    return str_str(s, {'Y': 'Transaction will be continued in next message'})
Exemplo n.º 14
0
 def subtyp_str(i):
   return str_str(i, {1:'Job/work unit start', 2:'Interval activity',
     3:'Last interval before step term', 4:'Step total',
     5:'Job/work unit term', 6:'System address space'})
Exemplo n.º 15
0
def urbrtyp_str(s):
    return str_str(s, urbr_type)
Exemplo n.º 16
0
cio_str = lambda i: str_str(
    i, {
        7: 'BROKER',
        2: 'CLIENT',
        23: 'CMDLOG_FILTER',
        4: 'CONVERSATION',
        24: 'NET',
        18: 'PARTICIPANT',
        25: 'POOL_USAGE',
        9: 'PSF',
        12: 'PSFADA',
        20: 'PSFCTREE',
        11: 'PSFDIV',
        16: 'PUBLICATION',
        15: 'PUBLISHER',
        26: 'RESOURC_USAGE',
        21: 'SECURITY',
        1: 'SERVER',
        6: 'SERVICE',
        22: 'SSL',
        27: 'STATISTICS',
        14: 'SUBSCRIBER',
        19: 'TCP',
        29: 'TRANSPORT',
        17: 'TOPIC',
        31: 'UOW_STATISTICS',
        28: 'USER',
        8: 'WORKER',
        8: 'WORKER_USAGE'
    })
Exemplo n.º 17
0
FCT_UNSUBSCRIBE = 20
FCT_CNTLPUBLICATION = 21
FCT_REPYERROR = 22

function_str = lambda i: str_str(
    i, {
        1: 'SEND',
        2: 'RECEIVE',
        4: 'UNDO',
        5: 'EOC',
        6: 'REGISTER',
        7: 'DEREGISTER',
        8: 'VERSION',
        9: 'LOGON',
        10: 'LOGOFF',
        11: 'SET',
        12: 'GET',
        13: 'SYNCPOINT',
        14: 'KERNELVERS',
        15: 'LOCTRANS',
        16: 'SETSSLPARMS',
        17: 'SENDPUBLICATION',
        18: 'RECVPUBLICATION',
        19: 'SUBSCRIBE',
        20: 'UNSUBSCRIBE',
        21: 'CNTLPUBLICATION',
        22: 'REPLYERROR'
    })

# --- EntireX Broker API Option Constants (option) -----------------

OPT_MSG = 0x01