Configuration Database Project |
Home | Computing | DAQ | Notes | Meetings | Subsystems | Search |
routing_table_package_node
Interface:
create or replace package routing_table_package_node AUTHID
CURRENT_USER is
function createNodeLink_tab(sysname varchar2) return number;
function createRT_all(sysname varchar2,devname number,round_trip number default
10,trigger_flag number default 1) return number;
function createPathLineTab(sysname varchar2, devfrom number,rt_needed number,
round_trip number default 10) return number;
function createRoutingTable_SP(sysname varchar2,devfrom number) return number ;
function createTD_all(sysname varchar2,devname number,round_trip number default
10, trigger_flag number default 1) return number;
function createTabDestin(sysname varchar2,devfrom number) return number;
function CheckExistenceSeq(seqname varchar2) return number;
function CheckExistenceTabTemp(tabname varchar2) return number;
function CreatePathLineTab_Host(sysname varchar2, devfrom number,rt_needed
number, round_trip number default 10) return number;
end routing_table_package_node;
/
Prerequisites:
This package will create the tables in your schema. It enables you to create the routing and/or the destination tables of a given device provided that you have the connectivity table.
To run this package, you need the following privileges:
a grant to execute the package (send me a mail with your login account)
a grant to "create table", "create sequence" + all the DML object privileges related to your schema.
a table which represents the connectivity !
Information about the functions and procedures included in this package.
All the functions return the execution status: 0 if it's successful
function createNodeLink_tab ( sysname varchar2): this function creates the NodeLink and Linkpertwo tables of a given subsystem.
Example of
call from a PL/SQL block:
declare
devname varchar2(100);
sys varchar2(100):='DAQ';
begin
routing_table_package.createNodeLink_tab(sys);
end;
function createRT_all (sysname varchar2, devname number, round_trip number default 10, trigger_flag number 1) : this function creates all the tables (path_line, path_end_start and routing_table) of a given device name. The inputs are the following:
sysname : name of the system to which belongs the device
devname: device ID
round_trip: maximum length of a path (default 10)
trigger_flag : 0 if you don't call the procedure in a trigger : the flag set to 0 performs a commit at the end of the transaction. So if you call this procedure in a loop set trigger_flag to 1 except for the last one, set it to 0.(default 1)
function createPathLineTab (sysname varchar2, devfrom number, round_trip number) return number: this function creates the sysname_devfrom_11T table
sysname : name of the system to which belongs the device
devfrom: device ID (shouldn't not be a host node, if you call this procedure directly)
rt_needed : 1 if you want to (re)generate a routing table, 0 if you want to (re)generate a destination table
round_trip : maximum length of a path.(usually the default is 10)
function createRoutingTable_SP (sysname varchar2,devfrom number); this procedure creates the routing table of the given device provided that the sysname_devfrom_2RT table exists
sysname : name of the system to which belongs the device
devfrom: device ID
function createTD_all (sysname varchar2,devname number,round_trip number default 10, trigger_flag number default 0); this procedure creates the destination table of the given devname and all the intermediate tables.
sysname : name of the system to which belongs the device
devname : device ID
round_trip : maximun length of a path
trigger_flag (0 if you want to commit the transaction
function createTabDestin (sysname varchar2,devfrom number); this function creates the destination table of the given device provided that the path_end_start table exists.
sysname : name of the system to which belongs the device
devname: device ID
function CheckExistenceSeq (seqname varchar2) return number; this function checks the existence of the given seqname:, returns 1 if it exists.
function CheckExistenceTabTemp (tabname varchar2) return number; this function checks the existence of the given tabname:, returns 1 if it exists.
function CreatePathLineTab_Host(sysname varchar2,
devfrom number,rt-needed, round_trip number default 10) return number; this
function creates the sysname_devfrom_11T table in the case
devfrom is a host node. (similar
to CreatePathLineTab)
For any feedback, bug reports or problems send me a mail
This page last edited by L.A on September 20, 2005 . |