Skip to content

Commit

Permalink
Added a message type with a VARLEN field to the SOP example.
Browse files Browse the repository at this point in the history
  • Loading branch information
prontog committed Jan 21, 2016
1 parent 1230021 commit b5c880e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions examples/EN.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Field,Length,Type
msgType,2,
textLen,4,
text,textLen,VARLEN
source,16,
3 changes: 2 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ Type | Description | Spec
NO | New Order | NO.csv
OC | Order Confirmation | OC.csv
TR | Trade | TR.csv
RJ | Rejection | RJ.csv
RJ | Rejection | RJ.csv
EN | Exchange News | EN.csv

The specs of the payload of each message can be found at the relevant CSV file.

Expand Down
1 change: 1 addition & 0 deletions examples/en.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
095EN0073This is some news from IMEX, the Imaginary Exchange. How do you find SOP?IMEX 
7 changes: 4 additions & 3 deletions examples/sop.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ sop = Proto('SOP', 'Simple Order Protocol')
-- a table of our default settings - these can be changed by changing
-- the preferences through the GUI or command-line.
local defaultSettings = {
enable = false,
enable = true,
ports = '9001-9010',
trace = false
trace = true
}
local protoHelper = wsdh.createProtoHelper(sop)
protoHelper:setDefaultPreference(defaultSettings)

local msg_types = { { name = 'NO', file = 'NO.csv' },
{ name = 'OC', file = 'OC.csv' },
{ name = 'TR', file = 'TR.csv' },
{ name = 'RJ', file = 'RJ.csv' } }
{ name = 'RJ', file = 'RJ.csv' },
{ name = 'EN', file = 'EN.csv' } }

-- Define fields
local SopFields = {
Expand Down

0 comments on commit b5c880e

Please sign in to comment.