OpenBCM V1.13 (Linux)

Packet Radio Mailbox

DB0FHN

[JN59NK Nuernberg]

 Login: GUEST





  
W0RLI  > BPQ      15.02.97 14:04l 190 Lines 5369 Bytes #-10852 (0) @ WW
BID : W0RLI30638
Read: DG0OAW VK3EUB GUEST
Subj: bpq dll info.
Path: DB0AAB<DB0AHO<DB0KFB<DB0CZ<HB9EAS<F6KDL<DB0HOM<LX0PAC<ON7RC<ON4AWP<
      ON6AR<F6CNB<WB0TAX<N9DBX<N7NEI<N7FSP<W0LVJ<KB7CNN<N7QDN<W0RLI
Sent: 970215/0311 30638@W0RLI.OR.USA.NOAM




                Using G8BPQ Switch with Windows Applications.



The BPQ Host mode interface cannot be used directly by Windows programs.
So I have written a couple of modules to allow WIndows applications to
access the switch. They are BPQCODE.386 and BPQDLL.DLL


BPQCODE.386

This is a Windows Virtual Device which converts calls from protected mode
software, eg Windows Applications, to real mode, and passes them to BPQCODE.
It will load automatically when Windows starts if you have already loaded
BPQCODE. It should be in the \WINDOWS\SYSTEM directory


BPQDLL.DLL


This module allows Windows applications to call the BPQ Host Mode API.
The API expects most parameters in CPU Registers. This is inconvenient in
high level languages, expecially Visual Basic. So BPQDLL uses pointers
to integers for these parameters.

The following are the function definitions. These map more or less directly
onto the corresponding API functions - see BPQHOST.DOC for full details of
the BPQHost API.


int FAR PASCAL GetFreeBuffs()

        Returns number of free buffers  (BPQHOST function 7 (part)).


int FAR PASCAL RXCount(int Stream)

        Returns count of packets waiting on stream
         (BPQHOST function 7 (part)).


int FAR PASCAL TXCount(int Stream)

        Returns number of packets on TX queue for stream
         (BPQHOST function 7 (part)).


int FAR PASCAL MONCount(int Stream)

        Returns number of monitor frames available
         (BPQHOST function 7 (part)).


int FAR PASCAL GetCallsign(int stream, LPSTR callsign)

        Returns call connected on stream (BPQHOST function 8 (part)).


int FAR PASCAL SessionControl(int stream, int command, int param)

        Send Session Control command (BPQHOST function 6)


int FAR PASCAL SetAppl(int stream, int flags, int mask)

        Sets Application Mask and Flags for stream. (BPQHOST function 1)


int FAR PASCAL SessionState(int stream, LPSTR state, LPSTR change)

        Get current Session State. Any state changed is ACK'ed
        automatically. See BPQHOST functions 4 and 5.


int FAR PASCAL SendMsg(int stream, LPSTR msg, int len)

        Send message go stream (BPQHOST Function 2)


int FAR PASCAL SendRaw(int port, LPSTR msg, int len)

        Send RaW (KISS mode) frame to port (BPQHOST function 10)


int FAR PASCAL GetMsg(int stream, LPSTR msg, LPINT len, LPINT count )

        Get message from stream. Returns length, and count of frames
        still waiting to be collected. (BPQHOST function 3)


int FAR PASCAL GetRaw(int stream, LPSTR msg, LPINT len, LPINT count )


        Get Raw (Trace) data (BPQHOST function 11)


int FAR PASCAL DecodeFrame(LPSTR msg, LPSTR buffer, int Stamp)


        This is not an API function. It is a utility to decode a received
        monitor frame into ascii text.


int FAR PASCAL SetTraceOptions(long mask, int mtxparam, int mcomparam)


        Sets the tracing options for DecodeFrame. Mask is a bit
        mask of ports to monitor (ie 101 binary will monitor ports
        1 and 3). MTX enables monitoring on transmitted frames. MCOM
        enables monitoring of protocol control frames (eg SABM, UA, RR),
        as well as info frames.



int FAR PASCAL FindFreeStream()

        Returns number of first unused BPQHOST stream. If none available,
        returns 255. See API function 13.


int FAR PASCAL AllocateStream(int stream)

        Allocate stream. If stream is already allocated, return nonzero.
        Otherwise allocate stream, and return zero.


int FAR PASCAL DeallocateStream(int stream)

        Release stream.



The following are Visual Basic function definitions for the above.


Declare Function getfreebuffs Lib "bpqdll" () As Integer

Declare Sub getcallsign Lib "bpqdlL.dll" (ByVal Stream As Integer,
   ByVal callsign As String)

Declare Sub SessionControl Lib "bpqdll.dll" (ByVal Stream As Integer,
   ByVal Commnd As Integer, ByVal Opt As Integer)

Declare Function SessionState Lib "bpqdll.dll" (ByVal Stream As Integer,
   state As Integer, change As Integer) As Integer

Declare Function SendMsg Lib "bpqdll.dll" (ByVal Stream As Integer,
   ByVal Msg As String, ByVal length As Integer) As Integer

Declare Function SendRaw Lib "bpqdll.dll" (ByVal port As Integer,
   ByVal Msg As String, ByVal length As Integer) As Integer

Declare Function GetMsg Lib "bpqdll.dll" (ByVal Stream As Integer,
   ByVal Msg As String, length As Integer, MORE As Integer) As Integer

Declare Function GetRAW Lib "bpqdll.dll" (ByVal Stream As Integer,
   ByVal Msg As String, length As Integer, MORE As Integer) As Integer

Declare Function RXCount Lib "bpqdll.dll" (ByVal Stream As Integer) As Integer

Declare Function TXCount Lib "bpqdll.dll" (ByVal Stream As Integer) As Integer

Declare Function MONCount Lib "bpqdll.dll" (ByVal Stream As Integer) As Integer

Declare Sub SetAppl Lib "bpqdll.dll" (ByVal Stream As Integer,
   ByVal Flags As Integer, ByVal mask As Integer)

Declare Function DecodeFrame Lib "bpqdll.dll" (ByVal inpmsg As String,
   ByVal outputmsg As String, ByVal TIMES As Integer) As Integer

Declare Sub SetTraceOptions Lib "bpqdll.dll" (ByVal MMASK As Long,
   ByVal MTX As Integer, ByVal MCOM As Integer)

Declare Function FindFreeStream Lib "bpqdll.dll" () As Integer

Declare Sub DeallocateStream Lib "bpqdll.dll" (ByVal Stream As Integer)



John Wiseman
1/10/94.
revised 5/11/94.





Read previous mail | Read next mail


 03.11.2026 04:50:35lGo back Go up