home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
MISC
/
PBAPI10.ZIP
/
APIDOCS.ZIP
/
NODEDAT.DOC
< prev
next >
Wrap
Text File
|
1998-02-21
|
20KB
|
539 lines
Author....... : Gary Price
Copyrighted by: Freejack's Software 1997-98
NODE_DAT API for TriBBS v10.x/11.x written in PowerBasic v3.5
---------------------------------------------------------------------------
The NODE_DAT unit is used to manipulate data in the NODE.DAT data file
found in Node's Main directory. The NODE_DAT unit is declared in
PBAPI10.INC as follows:
Node.dat BitFields Breakdown
NodeDatBit.bit1 BIT Assignment
0 = No300BaudCallersFlag 0 = Yes, 1 = No
1 = No1200BaudCallersFlag 0 = Yes, 1 = No
2 = No2400BaudCallersFlag 0 = Yes, 1 = No
3 = RTSCTSHandshakingFlag 0 = No, 1 = Yes
4 = LockSerialPortFlag 0 = No, 1 = Yes
5 = DirectScreenWriteFlag 0 = No, 1 = Yes
6 = PageBellOnFlag 0 = Off, 1 = On
7 = UseNodeDISPLAYDirectoryFlag 0 = No, 1 = Yes
NodeDatBit.bit2 BIT Assignment
0 = PhoneOffHookDuringEventsFlag 0 = No, 1 = Yes
1 = EnableLocalRIPscripEmulationFlag 0 = No, 1 = Yes
2 = UseFossilDriverFlag 0 = No, 1 = Yes
3 = EnableCallerIDFlag 0 = No, 1 = Yes
4 = BumpNoInfoCallsFlag 0 = No, 1 = Yes
5 = BumpBlockedCallsFlag 0 = No, 1 = Yes
6 = BumpOutOfAreaCallsFlag 0 = No, 1 = Yes
7 = 0 (Reserved)
NodeDatBit.bit3 to NodeDatBit.bit10 - All bits are set to 0 (Reserved)
Sub Type Structure for 10 byte BitFields
TYPE NodeDatBit
bit1 AS BYTE
bit2 AS BYTE
bit3 AS BYTE
bit4 AS BYTE
bit5 AS BYTE
bit6 AS BYTE
bit7 AS BYTE
bit8 AS BYTE
bit9 AS BYTE
bit10 AS BYTE
END TYPE
---------------------------------------------------------------------------
File Name: "NODE.DAT"
TYPE NodeDat
InitializationString AS STRING * 81
ErrorCorrectingConnectionMessage AS STRING * 5
ATZString AS STRING * 16
ATAString AS STRING * 16
ATH0String AS STRING * 16
ATH1String AS STRING * 16
DateOfLastCall AS STRING * 9
NodeNumber AS INTEGER
SerialPort AS INTEGER
DelayBeforeATA AS INTEGER
NumberOfRings AS INTEGER
NodeSecurityLevel AS INTEGER
MaximumKeyboardIdleTime AS INTEGER
NonStandardIRQNumber AS INTEGER
DelayAfterCONNECT AS INTEGER
MaximumBaudRate AS LONG
NodeDatBitFields AS NodeDatBit
ReservedDataArea AS STRING * 3907
END TYPE
DIM NodeDatBit AS NodeDatBit
DIM NODEDAT AS SHARED NODEDAT
DIM nd AS SHARED NODEDAT PTR
nd = VARPTR32(NODEDAT)
LSET NODEDAT = NODEDAT
---------------------------------------------------------------------------
FUNCTION's below are from the NODEDAT.PBU Unit and DECLAREd in PBAPI10.INC.
FUNCTION NODE_DAT_Open()
FUNCTION NODE_DAT_Close()
FUNCTION NODE_DAT_Read()
FUNCTION NODE_DAT_Write()
FUNCTION NODE_DAT_OpenRead()
FUNCTION NODE_DAT_WriteClose()
FUNCTION NODE_DAT_OpenReadClose()
FUNCTION NODE_DAT_OpenWriteClose()
FUNCTION NODE_DAT_ClearIt()
FUNCTION NODE_DAT_Initialize()
FUNCTION NODE_DAT_GetIS() AS STRING
FUNCTION NODE_DAT_PutIS(s AS STRING)
FUNCTION NODE_DAT_GetECCM() AS STRING
FUNCTION NODE_DAT_PutECCM(s AS STRING)
FUNCTION NODE_DAT_GetATZS() AS STRING
FUNCTION NODE_DAT_PutATZS(s AS STRING)
FUNCTION NODE_DAT_GetATAS() AS STRING
FUNCTION NODE_DAT_PutATAS(s AS STRING)
FUNCTION NODE_DAT_GetATH0S() AS STRING
FUNCTION NODE_DAT_PutATH0S(s AS STRING)
FUNCTION NODE_DAT_GetATH1S() AS STRING
FUNCTION NODE_DAT_PutATH1S(s AS STRING)
FUNCTION NODE_DAT_GetDOLC() AS STRING
FUNCTION NODE_DAT_PutDOLC(s AS STRING)
FUNCTION NODE_DAT_GetNN() AS INTEGER
FUNCTION NODE_DAT_PutNN(n AS INTEGER)
FUNCTION NODE_DAT_GetSP() AS INTEGER
FUNCTION NODE_DAT_PutSP(n AS INTEGER)
FUNCTION NODE_DAT_GetDBATA() AS INTEGER
FUNCTION NODE_DAT_PutDBATA(n AS INTEGER)
FUNCTION NODE_DAT_GetDAC() AS INTEGER
FUNCTION NODE_DAT_PutDAC(n AS INTEGER)
FUNCTION NODE_DAT_GetNOR() AS INTEGER
FUNCTION NODE_DAT_PutNOR(n AS INTEGER)
FUNCTION NODE_DAT_GetNSL() AS INTEGER
FUNCTION NODE_DAT_PutNSL(n AS INTEGER)
FUNCTION NODE_DAT_GetMKIT() AS INTEGER
FUNCTION NODE_DAT_PutMKIT(n AS INTEGER)
FUNCTION NODE_DAT_GetNSIRQN() AS INTEGER
FUNCTION NODE_DAT_PutNSIRQN(n AS INTEGER)
FUNCTION NODE_DAT_GetMBR() AS LONG
FUNCTION NODE_DAT_PutMBR(n AS LONG)
FUNCTION NODE_DAT_GetN300BCF() AS INTEGER
FUNCTION NODE_DAT_PutN300BCF(n AS INTEGER)
FUNCTION NODE_DAT_GetN1200BCF() AS INTEGER
FUNCTION NODE_DAT_PutN1200BCF(n AS INTEGER)
FUNCTION NODE_DAT_GetN2400BCF() AS INTEGER
FUNCTION NODE_DAT_PutN2400BCF(n AS INTEGER)
FUNCTION NODE_DAT_GetRTSCTSHF() AS INTEGER
FUNCTION NODE_DAT_PutRTSCTSHF(n AS INTEGER)
FUNCTION NODE_DAT_GetLSPFF() AS INTEGER
FUNCTION NODE_DAT_PutLSPF(n AS INTEGER)
FUNCTION NODE_DAT_GetDSWF() AS INTEGER
FUNCTION NODE_DAT_PutDSWF(n AS INTEGER)
FUNCTION NODE_DAT_GetPBOF() AS INTEGER
FUNCTION NODE_DAT_PutPBOF(n AS INTEGER)
FUNCTION NODE_DAT_GetUNDDF() AS INTEGER
FUNCTION NODE_DAT_PutUNDDF(n AS INTEGER)
FUNCTION NODE_DAT_GetPOHDEF() AS INTEGER
FUNCTION NODE_DAT_PutPOHDEF(n AS INTEGER)
FUNCTION NODE_DAT_GetELRIPEF() AS INTEGER
FUNCTION NODE_DAT_PutELRIPEF(n AS INTEGER)
FUNCTION NODE_DAT_GetUFDF() AS INTEGER
FUNCTION NODE_DAT_PutUFDF(n AS INTEGER)
FUNCTION NODE_DAT_GetECIDF() AS INTEGER
FUNCTION NODE_DAT_PutECIDF(n AS INTEGER)
FUNCTION NODE_DAT_GetBNICF() AS INTEGER
FUNCTION NODE_DAT_PutBNICF(n AS INTEGER)
FUNCTION NODE_DAT_GetBBCF() AS INTEGER
FUNCTION NODE_DAT_PutBBCF(n AS INTEGER)
FUNCTION NODE_DAT_GetBOOACF() AS INTEGER
FUNCTION NODE_DAT_PutBOOACF(n AS INTEGER)
---------------------------------------------------------------------------
** EXTERNAL FUNCTION/SUB USED BY NODE.DAT UNIT BELOW **
SUB SplitDate(BYVAL InDate AS STRING, _
Month AS INTEGER, _
Day AS INTEGER, _
Year AS INTEGER)
FUNCTION MakeDate(BYVAL Month AS INTEGER, _
BYVAL Day AS INTEGER, _
BYVAL Year AS INTEGER) AS STRING
---------------------------------------------------------------------------
MPORTANT: TBNode1sMainDirectory must be set to node 1's main directory
before calling any function with the "Open" word.
NODE_DAT_Open()
The NODE_DAT_Open function opens the NODE.DAT data file in the node's main
directory.
NODE_DAT_Close()
The NODE_DAT_Close function closes the NODE.DAT data file in the node's main
directory.
NODE_DAT_Read()
The NODE_DAT_Read function reads the contents of the NODE.DAT data file into
memory.
NODE_DAT_Write()
The NODE_DAT_Write function updates the contents of NODE.DAT from memory.
NODE_DAT_OpenRead()
The NODE_DAT_OpenRead function provides the functionality of the
NODE_DAT_Open and NODE_DAT_Read functions in a single function call.
NODE_DAT_WriteClose()
The NODE_DAT_WriteClose function provides the functionality of the
NODE_DAT_Write and NODE_DAT_Close functions in a single function call.
NODE_DAT_OpenReadClose()
The NODE_DAT_OpenReadClose function provides the functionality of the
NODE_DAT_Open, NODE_DAT_Read, and NODE_DAT_Close functions in a single
function call.
NODE_DAT_OpenWriteClose()
The NODE_DAT_OpenWriteClose function provides the functionality of the
NODE_DAT_Open, NODE_DAT_Write, and NODE_DAT_Close functions in a single
function call.
NODE_DAT_ClearIt()
The NODE_DAT_ClearIt function sets the entire NODE_DAT data record to all
zeros.
NODE_DAT_Initialize()
The NODE_DAT_Initialize function is used to create a NODE.DAT data file if
one doesn't exist.
-----------------------------------------------------------------------------
POINTERS Uses a hidden variable I use called "@nd". Any reference to this is
only for your information for discussion in this doc file. You will not need
to concern yourself trying to use this.. All calls are handled in the main
NODEDAT.PBU Unit by my routines automatically. In other words, I am trying
to keep Pointers as easy as possible for your use. :)
Also, all calls to any Functions which gets data with the string routines
will auto-trim each string's extra spaces and the null terminator, CHR$(0),
off so printing will be easier for you to manipulate. When calling the string
routines to put data back into the string space, all string data will be
resized to fit the NODE.DAT type structure and will add the null terminator
back to the end of the string. Just remember, when working the data in memory
with the pointer calls, you still have to write the data back to the NODE.DAT
in order for the changes to become permanent.
-----------------------------------------------------------------------------
NODE_DAT_GetIS() AS STRING
This form of the NODE_DAT_GetIS function returns a pointer to the node's
initialization string string.
NODE_DAT_PutIS(s AS STRING)
This form of the NODE_DAT_PutIS function sets the node's initialization
string string to the string pointed to by "s". Note that the string pointed
to by "s" can be no more than 80 characters in length.
NODE_DAT_GetECCM() AS STRING
This form of the NODE_DAT_GetECCM function returns a pointer to the node's
error correcting connection message string.
NODE_DAT_PutECCM(s AS STRING)
This form of the NODE_DAT_PutECCM sets the node's error correcting connection
message string to the string pointed to by "s". Note that the string pointed
to by "s" can be no more than 4 characters in length.
NODE_DAT_GetATZS() AS STRING
This form of the NODE_DAT_GetATZS function returns a pointer to the node's
ATZ string string.
NODE_DAT_PutATZS(s AS STRING)
This form of the NODE_DAT_GetATZS function sets the node's ATZ string string
to the string pointed to by "s". Note that the string pointed to by "s" can
be no more than 15 characters in length.
NODE_DAT_GetATAS() AS STRING
This form of the NODE_DAT_GetATAS function returns a pointer to the node's
ATA string string.
NODE_DAT_PutATAS(s AS STRING)
This form of the NODE_DAT_PutATAS function sets the node's ATA string string
to the string pointed to by "s". Note that the string pointed to by "s" can
be no more than 15 characters in length.
NODE_DAT_GetATH0S() AS STRING
This form of the NODE_DAT_GetATH0S function returns a pointer to the node's
ATH0 string string.
NODE_DAT_PutATH0S(s AS STRING)
This form of the NODE_DAT_PutATH0S function sets the node's ATH0 string
string to the string pointed to by "s". Note that the string pointed to by
"s" can be no more than 15 characters in length.
NODE_DAT_GetATH1S()
This form of the NODE_DAT_GetATH1S function returns a pointer to the node's
ATH1 string string.
NODE_DAT_PutATH1S(s AS STRING)
This form of the NODE_DAT_PutATH1S function sets the node's ATH1 string
string to the string pointed to by "s". Note that the string pointed to by
"s" can be no more than 15 characters in length.
NODE_DAT_GetDOLC() AS STRING
This form of the NODE_DAT_GetDOLC function returns a pointer to the node's
date of last call string.
NODE_DAT_PutDOLC(s AS STRING)
This form of the NODE_DAT_PutDOLC function sets the date of last call string
to the string pointed to by "s". Note that the string pointed to by "s" can
be no more than 8 characters in length and use the format "MM/DD/YY".
NODE_DAT_GetNN() AS INTEGER
This form of the NODE_DAT_GetNN function returns the node's node number.
NODE_DAT_PutNN(n AS INTEGER)
This form of the NODE_DAT_PutNN function sets the node's node number to "n".
"n" must be in the range of 1 to 255.
NODE_DAT_GetSP() AS INTEGER
This form of the NODE_DAT_GetSP function returns the node's serial port
number.
NODE_DAT_PutSP(n AS INTEGER)
This form of the NODE_DAT_PutSP function sets the node's serial port number
to "n". "n" must be in the range of 0 to 4.
0 = Local
1 = Com Port 1
2 = Com Port 2
3 = Com Port 3
4 = Com Port 4
NODE_DAT_GetDBATA() AS INTEGER
This form of the NODE_DAT_GetDBATA function returns the node's delay before
ATA.
NODE_DAT_PutDBATA(n AS INTEGER)
This form of the NODE_DAT_PutDBATA function sets the node's delay before ATA
to "n".
NODE_DAT_GetDAC() AS INTEGER
This form of the NODE_DAT_GetDAC function returns the node's delay after
CONNECT.
NODE_DAT_PutDAC(n AS INTEGER)
This form of the NODE_DAT_PutDAC function sets the node's delay after CONNECT
to "n".
NODE_DAT_GetNOR() AS INTERGER
This form of the NODE_DAT_PutNOR function returns the node's number of rings.
NODE_DAT_PutNOR(n AS INTEGER)
This form of the NODE_DAT_PutNOR function sets the node's number of rings to
"n".
NODE_DAT_GetNSL() AS INTEGER
This form of the NODE_DAT_GetNSL function returns the node's minimum security
level.
NODE_DAT_PutNSL(n AS INTEGER)
This form of the NODE_DAT_PutNSL function sets the node's minimum security
level to "n". "n" must be in the range of 0 to 9999.
NODE_DAT_GetMKIT() AS INTEGER
This form of the NODE_DAT_PutMKIT function returns the node's maximum
keyboard idle time.
NODE_DAT_PutMKIT(n AS INTEGER)
This form of the NODE_DAT_PutMKIT function sets the node's maximum keyboard
idle time to "n".
NODE_DAT_GetNSIRQN() AS INTEGER
This form of the NODE_DAT_GetNSIRQN function returns the node's nonstandard
IRQ number.
NODE_DAT_PutNSIRQN(n AS INTEGER)
This form of the NODE_DAT_PutNSIRQN function sets the node's nonstandard IRQ
number to "n". "n" must be in the range of 0 to 15.
NODE_DAT_GetMBR() AS LONG
This form of the NODE_DAT_GetMBR function returns the node's maximum baud
rate.
NODE_DAT_PutMBR(n AS LONG)
This form of the NODE_DAT_PutMBR function sets the node's maximum baud rate
to "n". "n" must be in the range of 0 to 115,400.
-----------------------------------------------------------------------------
All BIT Field Flags below have been converted to Integers to allow easier
access and handling.
-----------------------------------------------------------------------------
NODE_DAT_GetN300BCF() AS INTEGER
This form of the NODE_DAT_GetN300BCF function returns the node's no 300 baud
callers flag.
NODE_DAT_PutN300BCF(n AS INTEGER)
This form of the NODE_DAT_PutN300BCF function sets the node's no 300 baud
callers flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = Allow 300 baud callers.
1 = Do not allow 300 baud callers.
NODE_DAT_GetN1200BCF() AS INTERGER
This form of the NODE_DAT_GetN1200BCF function returns the node's no 1200
baud callers flag.
NODE_DAT_PutN1200BCF(n AS INTEGER)
This form of the NODE_DAT_PutN1200BCF function sets the node's no 1200 baud
callers flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = Allow 1200 baud callers.
1 = Do not allow 1200 baud callers.
NODE_DAT_GetN2400BCF() AS INTEGER
This form of the NODE_DAT_GetN2400BCF function returns the node's no 2400
baud callers flag.
NODE_DAT_PutN2400BCF(n AS INTEGER)
This form of the NODE_DAT_PutN2400BCF function sets the node's no 2400 baud
callers flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = Allow 2400 baud callers.
1 = Do not allow 2400 baud callers.
NODE_DAT_GetRTSCTSHF() AS INTEGER
This form of the NODE_DAT_GetRTSCTSHF function returns the node's RTS/CTS
handshaking flag.
NODE_DAT_PutRTSCTSHF(n AS INTEGER)
This form of the NODE_DAT_PutRTSCTSHF function sets the node's RTS/CTS
handshaking flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = Do not use RTS/CTS handshaking.
1 = Use RTS/CTS handshaking.
NODE_DAT_GetLSPF() AS INTEGER
This form of the NODE_DAT_GetLSPF function returns the node's lock serial
port flag.
NODE_DAT_PutLSPF(n AS INTEGER)
This form of the NODE_DAT_PutLSPF function sets the node's lock serial port
flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = Do not lock the serial port.
1 = Lock the serial port.
NODE_DAT_GetDSWF() AS INTEGER
This form of the NODE_DAT_GetDSWF function returns the node's direct screen
write flag.
NODE_DAT_PutDSWF(n AS INTEGER)
This form of the NODE_DAT_PutDSWF function sets the node's direct screen
write flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = Disable the video controller when writing to screen memory.
1 = Do not disable the video controller when writing to screen memory.
NODE_DAT_GetPBOF() AS INTEGER
This form of the NODE_DAT_GetPBOF function returns the node's page bell on
flag.
NODE_DAT_PutPBOF(n AS INTEGER)
This form of the NODE_DAT_PutPBOF function sets the node's page bell on flag
to "n". "n" must be in the range of 0 to 1 as follows:
0 = The page bell is off.
1 = The page bell is on.
NODE_DAT_GetUNDDF() AS INTEGER
This form of the NODE_DAT_GetUNDDF function returns the node's use node
DISPLAY directory flag.
NODE_DAT_PutUNDDF(n AS INTEGER)
This form of the NODE_DAT_GetUNDDF function sets the node's use node DISPLAY
directory flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = Use node 1's DISPLAY directory.
1 = Use the node's DISPLAY directory.
NODE_DAT_GetPOHDEF() AS INTEGER
This form of the NODE_DAT_GetPOHDEF function returns the node's phone off
hook during events flag.
NODE_DAT_PutPOHDEF(n AS INTEGER)
This form of the NODE_DAT_PutPOHDEF function sets the node's phone off hook
during events flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = Do not take the phone off hook during events.
1 = Take the phone off hook during events.
NODE_DAT_GetELRIPEF() AS INTEGER
This form of the NODE_DAT_GetELRIPEF function returns the node's enable
local RIPscrip emulation flag.
NODE_DAT_PutELRIPEF(n AS INTEGER)
This form of the NODE_DAT_PutELRIPEF function sets the node's enable local
RIPscrip emulation flag to "n". "n" must be in the range of 0 to 1 as
follows:
0 = Disable local RIPscrip emulation.
1 = Enable local RIPscrip emulation.
NODE_DAT_GetUFDF() AS INTEGER
This form of the NODE_DAT_GetUFDF function returns the node's use fossil
driver flag.
NODE_DAT_PutUFDF(n AS INTEGER)
This form of the NODE_DAT_PutUFDF function sets the node's use fossil driver
flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = Do not use a fossil driver.
1 = Use a fossil driver.
NODE_DAT_GetECIDF() AS INTEGER
This form of the NODE_DAT_GetECIDF function returns the node's enable caller
ID flag.
NODE_DAT_PutECIDF(n AS INTEGER)
This form of the NODE_DAT_PutECIDF function sets the node's enable caller ID
flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = Do not enable caller ID.
1 = Enable caller ID.
NODE_DAT_GetBNICF() AS INTEGER
This form of the NODE_DAT_GetBNICF function returns the node's bump no info
calls flag.
NODE_DAT_PutBNICF(n AS INTEGER)
This form of the NODE_DAT_PutBNICF function sets the node's bump no info
calls flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = Do not bump no info calls.
1 = Bump no info calls.
NODE_DAT_GetBBCF() AS INTEGER
This form of the NODE_DAT_GetBBCF function returns the node's bump blocked
calls flag.
NODE_DAT_PutBBCF(n AS INTEGER)
This form of the NODE_DAT_PutBBCF function sets the node's bump blocked
calls flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = Do not bump blocked calls.
1 = Bump blocked calls.
NODE_DAT_GetBOOACF() AS INTEGER
This form of the NODE_DAT_GetBOOACF function returns the node's bump out of
area calls flag.
NODE_DAT_PutBOOACF(n AS INTEGER)
This form of the NODE_DAT_PutBOOACF function sets the node's bump out of
area calls flag to "n". "n" must be in the range of 0 to 1 as follows:
0 = Do not bump out of area calls.
1 = Bump out of area calls.