BridgeMate Pro Control File Transfer Program (BMPFTP)

 

This utility program is intended for use by Bridge Scoring Programs which need to support Bridgemate but cannot or do not have a direct interface to Microsoft Access. This will be particularly necessary for non Windows based Scoring Programs. It uses an input file prepared by the Scoring Program to set up the Access Database File and then passes the results data back to the Scoring Program in an output file when applicable. All files will reside in the same folder as BMPFTP program.

 

Files Created by the Scoring Program

BMInput.txt Contains all the data required to set up the Database used by BMPro Control. The format is a simple comma separated text file which reflects the format required by the BMPro Control Database, with the addition of a length parameter for each table indicating the number of records in each of the Tables.

Files Created by BMPFTP

BMInput.bws Contains the Database shared with BMPro Control.

BMRData.txt Contains the Received Data as and when it is updated in the Database. The utility evaluates and adds the bridge score to the data.

BMPNums.txt Contains the Players Numbers information.

 

The program initially supports two User controlled command buttons:

 

Change BMPro Location

Change the source location of the BM Pro Control program. The Program location is initially defaulted to c:\program files\bridgemate pro\bmpro.exe.

 

Start Receiving Results:

If BM Pro Control is already running, offer the user the option to just start polling (recovery run).

Otherwise, the normal sequence is:

Create the Database BMInput.bws with all the initial Tables

Update the Database based on the contents of the BMinput.txt prepared by the Scoring Program

Start BMPro Control (which resets the server and uploads the tables).(Optionally, the reset server may be omitted eg in the case of a recovery run).

Enter normal polling mode. At the requested interval (screen option) , whenever the file BMRdata.txt does NOT exist, it reads the Received Data Table in the Database for unprocessed entries (or optionally all entries) and if any, stores them in BMRData.txt. The Scoring Program must delete the current BMRData.txt file whenever it is ready to receive new data.

 

Once Start Receiving Results command has been initiated, the program supports 6 new command buttons:

 

Read All Results

Store all the Received Data Table entries in BMRdata.txt, whether processed or otherwise. It can be used by Scoring Program which only wish to read all the results at the end of the competition (ie they never delete BMRData.txt file) or in an error recovery situation where results may have been lost previously.

 

Read Player Numbers

Store the Player Numbers Table entries in the BMPNums.txt file.

 

Update Movement

Recreate the RoundData and Tables entries in the Database BMInput.bws. This allows a new movement to be uploaded to the Server after the competition has started. The Scoring Program will need to set up the appropriate UpdateFromRound entry in BMInput.txt file

 

Reset Bridgemates (BMII only)

Reset the Bridgemates

 

Update BM Settings (BMII only)

Update the Settings Table with updated options (using the values in BMInput.txt)

 

Update Player Names (BMII only)

Update the Player Numbers Table with updated Player Names (using the values in BMInput.txt)

 

 

Format of Input File (BMInput.txt)

The Input file BMInput.txt is based on the Tables Clients,Section,Tables.RoundData,PlayersNumbers,PlayerNames,Settings

Ref: Bridgemate Implementation Guide Doc Rev 29 Jan 17th 2011). The file is structured similarly to the database but entries are comma separated and there is a length indicator at the end of each table header. Boolean Values should be set as 0=False, -1=True. There must be a Header entry for every table with the associated number of entries. The Tables may be in any order and blank lines, spaces before/after commas are ignored.

 

 "Clients", Number of Entries

ID, Computer

 

"Section", Number of Entries

ID, Letter, Tables, Missing Pair, EWMoveBeforePlay

"Tables", Number of Entries

Section, Table, ComputerID, Status, LogOnOff, CurrentRound, CurrentBoard, UpdateFromRound,Group

.........

Section, Table, ComputerID, Status, LogOnOff, CurrentRound, CurrentBoard, UpdateFromRound, Group

 

"RoundData", Number of Entries

Section, Table, Round, NSPair, EWPair, LowBoard, HighBoard <,CustomBoards>

.........

Section, Table, Round, NSPair, EWPair, LowBoard, HighBoard <,CustomBoards>

"PlayerNumbers", Number of Entries

Section, Table, Direction, Number, Name, Updated, TimeLog, Processed

.........

Section, Table, Direction, Number, Name, Updated, TimeLog, Processed

"PlayerNames", Number of Entries

ID, Name

.........

ID, Name

"Settings", Number of Entries

Section, ShowResults, ShowOwnResult, RepeatResults, MaximumResults, ShowPercentage, GroupSections...,BM2ShowHands, BM2NumberValidation, BM2NameSource

.........

Section, ShowResults, ShowOwnResult, RepeatResults, MaximumResults, ShowPercentage, GroupSections...,BM2ShowHands, BM2NumberValidation, BM2NameSource

 


Example BMInput.txt

Mitchell 3 tables, 3 rounds, 12 boards, Missing pair EW 3.

"Clients",1

0,"MBC01"

"Section",1

1,"A",3,6,0

"Tables",3

1,1,0,0,2,0,0,0,0

1,2,0,0,2,0,0,0,0

1,3,0,0,2,0,0,0,0

"RoundData",9

1,1,1,1,1,1,4

1,1,2,1,3,5,8

1,1,3,1,2,9,12

1,2,1,2,2,5,8

1,2,2,2,1,9,12

1,2,3,2,3,0,0,1,2,3,4

1,3,1,3,3,0,0,9,10,11,12

1,3,2,3,2,0,0,1,2,3,4

1,3,3,3,1,0,0,5,6,7,8

"PlayerNumbers",12

1,1,"N","0","",0,0,0

1,1,"E","0","",0,0,0

1,1,"S","0","",0,0,0

1,1,"W","0","",0,0,0

1,2,"N","0","",0,0,0

1,2,"E","0","",0,0,0

1,2,"S","0","",0,0,0

1,2,"W","0","",0,0,0

1,3,"N","0","",0,0,0

1,3,"E","0","",0,0,0

1,3,"S","0","",0,0,0

1,3,"W","0","",0,0,0

"PlayerNames",8

68879,"Jeff Smith"

108602,"Jackie Pye"

81260,"David Barton"

33120,"Alan Jones"

91562,"Alan Nelson"

14415,"Kath Nelson"

110852,"David Audley"

34321,"Andrew Petrie"

"Settings",1

1,1,1,1,0,1,1,0,0,1,1,20,4,1,1,1,0,1,0,0,0000,0,1,1,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0

 

Format of Results File (BMRData.txt)

The Results file BMRData.txt is based on the Table ReceivedData /Intermediate Data as Ref: Bridgemate Implementation Guide Doc Rev 29 Jan 17th 2011. The file is structured similarly to this Table with the entries comma separated and there is an extra field with the contract score value.

 

ID,Section,Table,Round,Board,PairNS,PairEW,Declarer,NS/EW,Contract,Result,Leadcard,Score, Remarks,Date,Time,Prc,Prc1,Prc2,Prc3,Prc4,Erased

.........

ID,Section,Table,Round,Board,PairNS,PairEW,Declarer,NS/EW,Contract,Result,Leadcard,Score, Remarks,Date,Time,Prc,Prc1,Prc2,Prc3,Prc4,Erased

 

Example (BMRData.txt)

3 tables, 3 rounds, 12 boards, Missing pair EW 3.

1,1,1,1,1,1,1,"N ","1 D x","-4","C4",-800,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,1,1,2,1,1,1,"W ","2 NT x","-2","C4",300,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,1,1,3,1,1,1,"E ","2 H xx","+1","H8",-1240,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,1,1,4,1,1,1,"W ","PASS","+2","C4",0,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,1,2,5,1,3,1,"N ","3 C x","-1","CQ",-200,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,1,2,6,1,3,1,"N ","4 D x","-3","HA",-500,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,1,2,7,1,3,3,"W ","1 D x","-4","H8",1100,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,1,2,8,1,3,3,"W ","5 D","-3","D10",150,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,1,3,9,1,2,1,"N ","PASS","-3","S6",0,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,1,3,10,1,2,2,"W ","5 D","-2","C4",200,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,1,3,11,1,2,2,"W ","4 S x","-2","CQ",300,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,1,3,12,1,2,1,"S ","1 D x","-4","HA",-1100,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,2,1,5,2,2,2,"E ","3 C x","+1","C4",-570,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,2,1,6,2,2,2,"E ","PASS","-2","D10",0,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,2,1,7,2,2,2,"W ","5 D","-3","D10",300,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,2,1,8,2,2,2,"S ","4 D x","-4","H8",-800,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,2,2,9,2,1,2,"S ","PASS","+1","H8",0,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,2,2,10,2,1,1,"E ","4 D x","+1","S6",-910,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,2,2,11,2,1,2,"S ","1 NT","+2","H8",150,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,2,2,12,2,1,2,"N ","1 D x","+1","D10",340,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,2,3,1,2,3,2,"N ","1 NT","-2","H8",-100,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,2,3,2,2,3,3,"W ","4 S x","-1","S6",100,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,2,3,3,2,3,3,"W ","4 D x","-2","H8",500,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,2,3,4,2,3,3,"E ","2 H xx","-4","S6",2200,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,3,1,9,3,3,3,"E ","2 NT x","-2","C4",500,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,3,1,10,3,3,3,"S ","1 D x","=","C4",140,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,3,1,11,3,3,3,"W ","2 H xx","+2","HA",-1040,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,3,1,12,3,3,3,"N ","1 D x","-1","S6",-200,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,3,2,1,3,2,3,"N ","3 C x","=","H8",470,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,3,2,2,3,2,3,"N ","1 NT","+1","S6",120,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,3,2,3,3,2,3,"N ","1 D x","-3","CQ",-500,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,3,2,4,3,2,3,"N ","4 D x","+1","D10",910,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,3,3,5,3,1,1,"W ","2 NT x","=","D10",-490,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,3,3,6,3,1,1,"W ","4 S x","-3","CQ",800,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,3,3,7,3,1,3,"N ","2 NT x","-1","H8",-200,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

1,3,3,8,3,1,3,"N ","1 D x","+2","CQ",340,"",#2006-01-27#,#1899-12-30 10:00:32#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#,#FALSE#

 

Format of Player Numbers Table (BMPnums.txt)

The Player Numbers file BMPNums.txt is based on the Table PlayerNumbers as Ref: Bridgemate Implementation Guide Doc Rev 29 Jan 17th 2011. The file is structured similarly to this Table with the entries comma separated.

Example (BMPNums.txt)

Mitchell 3 tables, 3 rounds, 12 boards, Missing pair EW 3.

1,1,"N ","65"

1,1,"E ","42"

1,1,"S ","165"

1,1,"W ","81"

1,2,"N ","4"

1,2,"E ","91"

1,2,"S ","22"

1,2,"W ","17"

1,3,"N ","88"

1,3,"E ","89"

1,3,"S ","0"

1,3,"W ","41"