Created
February 28, 2016 17:14
-
-
Save DexterHaslem/eff3d3b95675e2541cf6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(struct fix-tag (tag contents)) | |
(define fix-soh (string (integer->char 01))) | |
(define (compute-checksum tags) | |
1) | |
;; creates tag string with SOH attached | |
(define (create-tag id contents) | |
(string-append (string-join (list id contents) "=") fix-soh)) | |
(define (create-msg tags) | |
(let ([msg-partial (string-join tags fix-soh)] | |
[msg-checksum (compute-checksum tags)]) | |
(string-append msg-partial fix-soh))) | |
(define test-msg (string-join '("8=FIX4.2." "10=341") fix-soh)) | |
test-msg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment