Skip to content

Commit

Permalink
Update Ouch alpha fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Open-Markets-Initiative committed Jul 15, 2023
1 parent fd4a49c commit 2ad654c
Show file tree
Hide file tree
Showing 11 changed files with 1,971 additions and 34 deletions.
40 changes: 29 additions & 11 deletions Asx/Asx.Securities.SR8.Ouch.v2.0.Script.Dissector.lua
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,24 @@ function asx_securities_sr8_ouch_v2_0.prefs_changed()
end


-----------------------------------------------------------------------
-- Protocol Functions
-----------------------------------------------------------------------

-- trim trailing spaces
trim_right_spaces = function(str)
local finish = str:len()

for i = 1, finish do
if str:byte(i) == 0x20 then
return str:sub(1, i - 1)
end
end

return str
end


-----------------------------------------------------------------------
-- Dissect Asx Securities SR8 Ouch 2.0
-----------------------------------------------------------------------
Expand Down Expand Up @@ -371,7 +389,7 @@ end
asx_securities_sr8_ouch_v2_0_dissect.order_token = function(buffer, offset, packet, parent)
local length = asx_securities_sr8_ouch_v2_0_size_of.order_token
local range = buffer(offset, length)
local value = range:string()
local value = trim_right_spaces(range:string())
local display = asx_securities_sr8_ouch_v2_0_display.order_token(value, buffer, offset, packet, parent)

parent:add(asx_securities_sr8_ouch_v2_0.fields.order_token, range, value, display)
Expand Down Expand Up @@ -468,7 +486,7 @@ end
asx_securities_sr8_ouch_v2_0_dissect.filler = function(buffer, offset, packet, parent)
local length = asx_securities_sr8_ouch_v2_0_size_of.filler
local range = buffer(offset, length)
local value = range:string()
local value = trim_right_spaces(range:string())
local display = asx_securities_sr8_ouch_v2_0_display.filler(value, buffer, offset, packet, parent)

parent:add(asx_securities_sr8_ouch_v2_0.fields.filler, range, value, display)
Expand All @@ -488,7 +506,7 @@ end
asx_securities_sr8_ouch_v2_0_dissect.order_origin = function(buffer, offset, packet, parent)
local length = asx_securities_sr8_ouch_v2_0_size_of.order_origin
local range = buffer(offset, length)
local value = range:string()
local value = trim_right_spaces(range:string())
local display = asx_securities_sr8_ouch_v2_0_display.order_origin(value, buffer, offset, packet, parent)

parent:add(asx_securities_sr8_ouch_v2_0.fields.order_origin, range, value, display)
Expand All @@ -508,7 +526,7 @@ end
asx_securities_sr8_ouch_v2_0_dissect.intermediary_id = function(buffer, offset, packet, parent)
local length = asx_securities_sr8_ouch_v2_0_size_of.intermediary_id
local range = buffer(offset, length)
local value = range:string()
local value = trim_right_spaces(range:string())
local display = asx_securities_sr8_ouch_v2_0_display.intermediary_id(value, buffer, offset, packet, parent)

parent:add(asx_securities_sr8_ouch_v2_0.fields.intermediary_id, range, value, display)
Expand All @@ -528,7 +546,7 @@ end
asx_securities_sr8_ouch_v2_0_dissect.execution_venue = function(buffer, offset, packet, parent)
local length = asx_securities_sr8_ouch_v2_0_size_of.execution_venue
local range = buffer(offset, length)
local value = range:string()
local value = trim_right_spaces(range:string())
local display = asx_securities_sr8_ouch_v2_0_display.execution_venue(value, buffer, offset, packet, parent)

parent:add(asx_securities_sr8_ouch_v2_0.fields.execution_venue, range, value, display)
Expand Down Expand Up @@ -605,7 +623,7 @@ end
asx_securities_sr8_ouch_v2_0_dissect.exchange_info = function(buffer, offset, packet, parent)
local length = asx_securities_sr8_ouch_v2_0_size_of.exchange_info
local range = buffer(offset, length)
local value = range:string()
local value = trim_right_spaces(range:string())
local display = asx_securities_sr8_ouch_v2_0_display.exchange_info(value, buffer, offset, packet, parent)

parent:add(asx_securities_sr8_ouch_v2_0.fields.exchange_info, range, value, display)
Expand All @@ -625,7 +643,7 @@ end
asx_securities_sr8_ouch_v2_0_dissect.customer_info = function(buffer, offset, packet, parent)
local length = asx_securities_sr8_ouch_v2_0_size_of.customer_info
local range = buffer(offset, length)
local value = range:string()
local value = trim_right_spaces(range:string())
local display = asx_securities_sr8_ouch_v2_0_display.customer_info(value, buffer, offset, packet, parent)

parent:add(asx_securities_sr8_ouch_v2_0.fields.customer_info, range, value, display)
Expand All @@ -645,7 +663,7 @@ end
asx_securities_sr8_ouch_v2_0_dissect.client_account = function(buffer, offset, packet, parent)
local length = asx_securities_sr8_ouch_v2_0_size_of.client_account
local range = buffer(offset, length)
local value = range:string()
local value = trim_right_spaces(range:string())
local display = asx_securities_sr8_ouch_v2_0_display.client_account(value, buffer, offset, packet, parent)

parent:add(asx_securities_sr8_ouch_v2_0.fields.client_account, range, value, display)
Expand Down Expand Up @@ -725,7 +743,7 @@ end
asx_securities_sr8_ouch_v2_0_dissect.replacement_order_token = function(buffer, offset, packet, parent)
local length = asx_securities_sr8_ouch_v2_0_size_of.replacement_order_token
local range = buffer(offset, length)
local value = range:string()
local value = trim_right_spaces(range:string())
local display = asx_securities_sr8_ouch_v2_0_display.replacement_order_token(value, buffer, offset, packet, parent)

parent:add(asx_securities_sr8_ouch_v2_0.fields.replacement_order_token, range, value, display)
Expand All @@ -745,7 +763,7 @@ end
asx_securities_sr8_ouch_v2_0_dissect.existing_order_token = function(buffer, offset, packet, parent)
local length = asx_securities_sr8_ouch_v2_0_size_of.existing_order_token
local range = buffer(offset, length)
local value = range:string()
local value = trim_right_spaces(range:string())
local display = asx_securities_sr8_ouch_v2_0_display.existing_order_token(value, buffer, offset, packet, parent)

parent:add(asx_securities_sr8_ouch_v2_0.fields.existing_order_token, range, value, display)
Expand Down Expand Up @@ -1735,7 +1753,7 @@ end
asx_securities_sr8_ouch_v2_0_dissect.previous_order_token = function(buffer, offset, packet, parent)
local length = asx_securities_sr8_ouch_v2_0_size_of.previous_order_token
local range = buffer(offset, length)
local value = range:string()
local value = trim_right_spaces(range:string())
local display = asx_securities_sr8_ouch_v2_0_display.previous_order_token(value, buffer, offset, packet, parent)

parent:add(asx_securities_sr8_ouch_v2_0.fields.previous_order_token, range, value, display)
Expand Down
2 changes: 1 addition & 1 deletion Asx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
| Securities | [Ntp][Asx.Securities.Ntp.Itch.v1.05.Dissector] | Itch | [1.05][Asx.Securities.Ntp.Itch.v1.05.Dissector] | 12/1/2017 | 5127 | [Active][Omi.Glossary.Status.Active] | [Verified][Omi.Glossary.Testing.Verified] | [pdf][Asx.Securities.Ntp.Itch.v1.05.Pdf] |
| Securities | [SR8][Asx.Securities.SR8.Itch.v2.0.Dissector] | Itch | [2.0][Asx.Securities.SR8.Itch.v2.0.Dissector] | 4/1/2015 | 2978 | [Deprecated][Omi.Glossary.Status.Deprecated] | [Untested][Omi.Glossary.Testing.Untested] | [pdf][Asx.Securities.SR8.Itch.v2.0.Pdf] |
| Securities | [T24][Asx.Securities.T24.Itch.v1.13.Dissector] | Itch | [1.13][Asx.Securities.T24.Itch.v1.13.Dissector] | 7/15/2014 | 6049 | [Deprecated][Omi.Glossary.Status.Deprecated] | [Untested][Omi.Glossary.Testing.Untested] | [pdf][Asx.Securities.T24.Itch.v1.13.Pdf] |
| Securities | [SR8][Asx.Securities.SR8.Ouch.v2.0.Dissector] | Ouch | [2.0][Asx.Securities.SR8.Ouch.v2.0.Dissector] | 4/1/2015 | 2823 | [Deprecated][Omi.Glossary.Status.Deprecated] | [Untested][Omi.Glossary.Testing.Untested] | [pdf][Asx.Securities.SR8.Ouch.v2.0.Pdf] |
| Securities | [SR8][Asx.Securities.SR8.Ouch.v2.0.Dissector] | Ouch | [2.0][Asx.Securities.SR8.Ouch.v2.0.Dissector] | 4/1/2015 | 2841 | [Deprecated][Omi.Glossary.Status.Deprecated] | [Untested][Omi.Glossary.Testing.Untested] | [pdf][Asx.Securities.SR8.Ouch.v2.0.Pdf] |


Asx: [website](https://www.asx.com.au "Go to Australian Securities Exchange")
Expand Down
Loading

0 comments on commit 2ad654c

Please sign in to comment.