BPQ Home  BPQ32 Home
BPQ32 OLE (Active-X) Control.
This document applies to BPQCTRL.OCX, Version 220.127.116.11.
Although all the API functions can be called from Visual
Basic, it is difficult to handle the Windows messages needed for async
operation. So I produced the BPQCTRL.OCX interface, which maps the async
notifications to OLE Events. Most of the API functions are also mapped to OLE
Properties or Methods, although there are some minor differences in names and
that even in 32 bit VB, integers are 16 bits. Numeric Parameters are all
Most of my testing has been with VB Version 4.
Properties and Methods
Returns the version of BPQCTRL.OCX
String ApplCall(long Appl);
void SetFlags(long Stream, long Mask, long Flags);
Note that the Mask and Flags parameters are the opposite way round to the BPQ32 API.
This wasn't intended, but there are now too many programs around to correct it. So be careful!
long DeallocateStream(long Stream);
long Connect(long Stream);
long Disconnect(long Stream);
void ReturntoNode(long Stream);
String GetData(long Stream);
long SendData(long Stream, String Message, long Length);
Note that messages will be transmitted 'on-air' as
sent by the application, ie the application is responsible for PACLEN. The
application may use GetStreamPaclen to determine what the node recommends, but this is not enforced. The maximum length is 256 bytes, and frames larger than this will be ignored. Normally length should be limited to 236, to avoid fragmentation when passed over a NETROM link.
long ConnectState(long Stream);
Returns 1 if Stream is connected, 0 otherwise.
String Callsign(long Stream);
long GetStreamPort(long Stream);
long GetStreamPaclen(long Stream);
long GetStreamType(long Stream);
Value Returned (if Stream is connected) is a
combination of :
L2LINK EQU 1
SESSION EQU 10B
UPLINK EQU 100B
DOWNLINK EQU 1000B
BPQHOST EQU 100000B
long GetStreamMaxframe(long Stream);
long GetStreamL4Window(long Stream);
long GetMonCount(long Streeam);
long GetRXCount(long Stream);
long GetTXCount(long Stream);
long SendRaw(long Port, String Msg, long Length);
Monitor Decode Functions:
There are two sets of monitoring functions. One returns the classic BPQ decode,
and the other the format used by the AGW Packet Engine
String GetMonFrame(long Stream)
String GetMonFrameAndTimeStamp(long Stream, long* Stamp, long* Count)
String DecodeFrame(String Buffer, long Stamp)
String DecodeFrameAGW(String Buffer, long Stamp, long *FrameControl)
String GetAndDecodeMonFrame(long Stream)
String GetAndDecodeAGWFrame(long Stream)
void DataAvail(long Stream);
void MonDataAvail(long Stream);
void Connected(long Stream);
void Disconnected(long Stream);