diff --git a/.gitignore b/.gitignore
index 529f4142d..276cb02f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,4 +9,4 @@ obj/
msbuild.log
*.orig
vcxproj.user
-launchSettings.json
+src/client/spark/Properties/launchSettings.json
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 36fdd03c8..29133e2f2 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -1,7 +1,25 @@
{
"version": "0.2.0",
"configurations": [
-
+ {
+ "name": "(gdb) Launch",
+ "type": "cppdbg",
+ "request": "launch",
+ "program": "${workspaceRoot}/build/gcc_debug/src/server/sparkd/sparkd",
+ "args": ["run"],
+ "stopAtEntry": false,
+ "cwd": "${workspaceRoot}/build/gcc_debug/src/server/sparkd",
+ "environment": [],
+ "externalConsole": true,
+ "MIMode": "gdb",
+ "setupCommands": [
+ {
+ "description": "Enable pretty-printing for gdb",
+ "text": "-enable-pretty-printing",
+ "ignoreFailures": true
+ }
+ ]
+ },
{
"name": "Client Launch",
"type": "clr",
@@ -11,8 +29,8 @@
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"externalConsole": true
- },
- {
+ },
+ {
"name": "Client Attach",
"type": "clr",
"request": "attach",
diff --git a/src/client/spark/Properties/launchSettings.json b/src/client/spark/Properties/launchSettings.json
deleted file mode 100644
index b73373800..000000000
--- a/src/client/spark/Properties/launchSettings.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "profiles": {
- "Spark": {
- "commandName": "Project",
- "workingDirectory": "$(OutputPath)"
- }
- }
-}
\ No newline at end of file
diff --git a/src/client/spark/Spark.csproj b/src/client/spark/Spark.csproj
index 4aa616e0e..366292a59 100644
--- a/src/client/spark/Spark.csproj
+++ b/src/client/spark/Spark.csproj
@@ -34,7 +34,7 @@
-
+
diff --git a/src/client/spark/sys/api/Test/ApiTests.cs b/src/client/spark/sys/api/Test/ApiTests.cs
index 66c16584b..d7e80b17a 100644
--- a/src/client/spark/sys/api/Test/ApiTests.cs
+++ b/src/client/spark/sys/api/Test/ApiTests.cs
@@ -1,4 +1,4 @@
-using bts.api;
+using bts.api;
using bts.api.core;
using bts.api.test;
using NUnit.Framework;
@@ -64,6 +64,7 @@ namespace mbts.api.Test {
[Test]
public void hello_server_test() {
+ //System.Windows.MessageBox.Show("attach debugger");
_mtest.run_hello_service(null);
_mtest.run_shout_service(null);
@@ -71,48 +72,48 @@ namespace mbts.api.Test {
var h = _context.locate();
TableUpdate last_update = null;
- h.subscribe_greetings().table().Subscribe(t => last_update = t);
+ using (var sub1 = h.subscribe_greetings().table().Subscribe(t => last_update = t)) {
- var response = h.say_hello(new HelloRequest() { Name = "UnitTest 1" });
- Assert.AreEqual("Hello UnitTest 1", response.Message);
- Assert.NotNull(last_update);
- Assert.True(last_update.added.Count == 1);
- Assert.True(last_update.removed.Count == 0);
- Assert.True(last_update.state.Count == 1);
- Assert.True(last_update.state.Single().Value.Message == "Hello UnitTest 1");
- last_update = null;
- response = h.yell_hello(new HelloRequest() { Name = "UnitTest 2" });
- Assert.AreEqual("HELLO UNITTEST 2", response.Message);
- Assert.NotNull(last_update);
- Assert.True(last_update.added.Count == 1);
- Assert.True(last_update.removed.Count == 1);
- Assert.True(last_update.state.Count == 1);
- Assert.True(last_update.state.Single().Value.Message == "HELLO UNITTEST 2");
- last_update = null;
+ var response = h.say_hello(new HelloRequest() { Name = "UnitTest 1" });
+ Assert.AreEqual("Hello UnitTest 1", response.Message);
+ Assert.NotNull(last_update);
+ Assert.True(last_update.added.Count == 1);
+ Assert.True(last_update.removed.Count == 0);
+ Assert.True(last_update.state.Count == 1);
+ Assert.True(last_update.state.Single().Value.Message == "Hello UnitTest 1");
+ last_update = null;
+ response = h.yell_hello(new HelloRequest() { Name = "UnitTest 2" });
+ Assert.AreEqual("HELLO UNITTEST 2", response.Message);
+ Assert.NotNull(last_update);
+ Assert.True(last_update.added.Count == 1);
+ Assert.True(last_update.removed.Count == 1);
+ Assert.True(last_update.state.Count == 1);
+ Assert.True(last_update.state.Single().Value.Message == "HELLO UNITTEST 2");
+ last_update = null;
- // Managed shout, Native hello
- _mtest.stop_hello_service(null);
- _ntest.run_hello_service(null);
- response = h.yell_hello(new HelloRequest() { Name = "UnitTest 3" });
- Assert.AreEqual("HELLO UNITTEST 3", response.Message);
- Assert.NotNull(last_update);
- Assert.True(last_update.added.Count == 1);
- Assert.True(last_update.removed.Count == 1);
- Assert.True(last_update.state.Count == 1);
- Assert.True(last_update.state.Single().Value.Message == "HELLO UNITTEST 3");
- last_update = null;
-
- // Native+native
- _mtest.stop_shout_service(null);
- _ntest.run_shout_service(null);
- response = h.yell_hello(new HelloRequest() { Name = "UnitTest 4" });
- Assert.AreEqual("HELLO UNITTEST 4", response.Message);
- Assert.True(last_update.added.Count == 1);
- Assert.True(last_update.removed.Count == 1);
- Assert.True(last_update.state.Count == 1);
- Assert.True(last_update.state.Single().Value.Message == "HELLO UNITTEST 4");
- last_update = null;
+ // Managed shout, Native hello
+ _mtest.stop_hello_service(null);
+ _ntest.run_hello_service(null);
+ response = h.yell_hello(new HelloRequest() { Name = "UnitTest 3" });
+ Assert.AreEqual("HELLO UNITTEST 3", response.Message);
+ Assert.NotNull(last_update);
+ Assert.True(last_update.added.Count == 1);
+ Assert.True(last_update.removed.Count == 1);
+ Assert.True(last_update.state.Count == 1);
+ Assert.True(last_update.state.Single().Value.Message == "HELLO UNITTEST 3");
+ last_update = null;
+ // Native+native
+ _mtest.stop_shout_service(null);
+ _ntest.run_shout_service(null);
+ response = h.yell_hello(new HelloRequest() { Name = "UnitTest 4" });
+ Assert.AreEqual("HELLO UNITTEST 4", response.Message);
+ Assert.True(last_update.added.Count == 1);
+ Assert.True(last_update.removed.Count == 1);
+ Assert.True(last_update.state.Count == 1);
+ Assert.True(last_update.state.Single().Value.Message == "HELLO UNITTEST 4");
+ last_update = null;
+ }
_ntest.stop_hello_service(null);
_ntest.stop_shout_service(null);
}
diff --git a/src/client/spark_api/api/Channels/QuickBusClientChannel.cs b/src/client/spark_api/api/Channels/QuickBusClientChannel.cs
index c7772580b..7570d645e 100644
--- a/src/client/spark_api/api/Channels/QuickBusClientChannel.cs
+++ b/src/client/spark_api/api/Channels/QuickBusClientChannel.cs
@@ -14,7 +14,6 @@ namespace bts.api.core {
internal class QuickbusClientChannel : ClientChannel {
IntPtr _client;
- List _subscriptions = new List();
public QuickbusClientChannel(ServiceContext context, string type_name, string qualifier) : base(context) {
_client = ApiNativeMethods.api_client_create(context.native_context, type_name, qualifier);
@@ -22,10 +21,6 @@ namespace bts.api.core {
}
public override void Dispose() {
- foreach (var sub in _subscriptions) {
- ApiNativeMethods.api_client_unsubscribe(_client, sub);
- }
- _subscriptions.Clear();
ApiNativeMethods.api_client_destroy(_client);
_client = IntPtr.Zero;
}
@@ -84,10 +79,8 @@ namespace bts.api.core {
}
};
var subscription = ApiNativeMethods.api_client_subscribe(_client, method_and_qualifier, cb, IntPtr.Zero);
- _subscriptions.Add(subscription);
return FinalizeableAnonymousDisposable.Create((disposing) => {
ApiNativeMethods.api_client_unsubscribe(_client, subscription);
- _subscriptions.Remove(subscription);
// keepalive
cb = null;
if (!disposing) {
diff --git a/src/lib/api/public/ServiceContext.cpp b/src/lib/api/public/ServiceContext.cpp
index 70ee413f7..3422640b7 100644
--- a/src/lib/api/public/ServiceContext.cpp
+++ b/src/lib/api/public/ServiceContext.cpp
@@ -20,7 +20,7 @@ ServiceContext::~ServiceContext() {
}
std::unique_ptr ServiceContext::create_channel(const char * type_name, const char * service_qualifier) const {
- LOG(Api,Info,"Locate Service: {}{}",type_name ,service_qualifier);
+ LOG(Api,Info,"Locate Service: {}{}",std::string(type_name) ,std::string(service_qualifier));
return std::unique_ptr(new QuickbusClientChannel(_qbus, type_name, service_qualifier));
}
diff --git a/src/lib/config/defaults/jetfix.conf b/src/lib/config/defaults/jetfix.conf
index 100a60b29..58ed958e3 100644
--- a/src/lib/config/defaults/jetfix.conf
+++ b/src/lib/config/defaults/jetfix.conf
@@ -71,7 +71,7 @@ JetFIX {
platform: GLBX
socket_connect_host_ip: "69.50.112.177"
socket_connect_port: 61924
- sender_compid: "MC7004N"
+ sender_compid: "MC8004N"
target_compid: "CME"
target_subid: "64"
start_time: "00:30:00"
@@ -142,5 +142,11 @@ SparkConnection {
rule: "System.host_name=='TAHA-SUPER_spark'"
value {connection_name: "cme_mc1"}
}
+
+# Jake Chapel Hill CME Cert-accessible host
+SparkConnection {
+ rule: "System.host_name=='bts-host15'"
+ value {connection_name: "cme_mc8"}
+}
SparkConnection {value {connection_name: "cme_mbx"}}
diff --git a/src/lib/logging/MsgPacking.h b/src/lib/logging/MsgPacking.h
index 97dbe2dd6..f83d52319 100644
--- a/src/lib/logging/MsgPacking.h
+++ b/src/lib/logging/MsgPacking.h
@@ -53,7 +53,7 @@ struct CheckPtr : public CheckPtr {
template
void pack_msg_args(std::array &buffer,Args&&...args) {
using Store = std::tuple::type...>;
- static_assert(CheckPtr::value,"Illegal type logged");
+ static_assert(CheckPtr::type...>::value,"Illegal type logged");
if(sizeof(Store) <= SZ)
new (&buffer[0]) Store(std::forward(args)...);
else {
diff --git a/tools/replicator/build_win.sh b/tools/replicator/build_win.sh
index d2ed8b7ed..a885b58ba 100644
--- a/tools/replicator/build_win.sh
+++ b/tools/replicator/build_win.sh
@@ -1,6 +1,6 @@
#!/bin/bash
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
-echo $SCRIPTPATH
-$SCRIPTPATH/replicate_to_windows_vm.py && ssh -p 2222 bts@localhost "cd /mnt/c/Users/bts/spark/tools && /mnt/c/Windows/System32/cmd.exe /c clientbuild.cmd"
+#$SCRIPTPATH/replicate_to_windows_vm.py && \
+ssh -p 2222 bts@localhost "cd /mnt/c/Users/bts/spark/tools && /mnt/c/Windows/System32/cmd.exe /c clientbuild.cmd"
diff --git a/tools/replicator/replicate_to_windows_vm.py b/tools/replicator/replicate_to_windows_vm.py
index 668e6cd02..fcf7c8d79 100644
--- a/tools/replicator/replicate_to_windows_vm.py
+++ b/tools/replicator/replicate_to_windows_vm.py
@@ -13,6 +13,7 @@ ignore = Path docker
ignore = Regex .*\.pyc
ignore = Path x64
ignore = Path .vs
+repeat = watch
batch = true
'''
diff --git a/tools/spark_vm_shell.sh b/tools/spark_vm_shell.sh
index c506be1f8..29d11f38b 100644
--- a/tools/spark_vm_shell.sh
+++ b/tools/spark_vm_shell.sh
@@ -4,7 +4,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
docker run \
--rm \
- -i \
+ --restart=unless-stopped \
-p 8000:8000 \
-p 8001:8001 \
-p 8080:8080 \