Skip to content

Commit 106ad6f

Browse files
Merge pull request #271 from ShimmerEngineering/DEV-658_2
DEV-658 add Swift BLE gRPC Server to SensorMapsExample in Mac
2 parents 7221615 + 214610a commit 106ad6f

9 files changed

Lines changed: 191 additions & 2 deletions

File tree

ShimmerDriverPC/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ test {
3333
// this test requires a physical Shimmer2r to run
3434
exclude '**/API_00001_ShimmerPC_GeneralBluetoothShimmer2R.class'
3535
exclude '**/API_0000X_ByteCommunicationShimmer3lns0_16_11_w_sd_only.class'
36+
exclude '**/API_0000X_ByteCommunicationShimmer3lns0_16_11_w_sync_master.class'
37+
exclude '**/API_0000X_ByteCommunicationShimmer3lns0_16_11_w_sync_slave.class'
3638
}
3739

3840
publishing {
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Versions/Current/Resources
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Versions/Current/ShimmerBluetooth
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>BuildMachineOSBuild</key>
6+
<string>24D70</string>
7+
<key>CFBundleDevelopmentRegion</key>
8+
<string>en</string>
9+
<key>CFBundleDisplayName</key>
10+
<string></string>
11+
<key>CFBundleExecutable</key>
12+
<string>ShimmerBluetooth</string>
13+
<key>CFBundleIdentifier</key>
14+
<string>com.shimmersensing.ShimmerBluetooth</string>
15+
<key>CFBundleInfoDictionaryVersion</key>
16+
<string>6.0</string>
17+
<key>CFBundleName</key>
18+
<string>ShimmerBluetooth</string>
19+
<key>CFBundlePackageType</key>
20+
<string>FMWK</string>
21+
<key>CFBundleShortVersionString</key>
22+
<string>1.0</string>
23+
<key>CFBundleSupportedPlatforms</key>
24+
<array>
25+
<string>MacOSX</string>
26+
</array>
27+
<key>CFBundleVersion</key>
28+
<string>1</string>
29+
<key>DTCompiler</key>
30+
<string>com.apple.compilers.llvm.clang.1_0</string>
31+
<key>DTPlatformBuild</key>
32+
<string>24B75</string>
33+
<key>DTPlatformName</key>
34+
<string>macosx</string>
35+
<key>DTPlatformVersion</key>
36+
<string>15.1</string>
37+
<key>DTSDKBuild</key>
38+
<string>24B75</string>
39+
<key>DTSDKName</key>
40+
<string>macosx15.1</string>
41+
<key>DTXcode</key>
42+
<string>1610</string>
43+
<key>DTXcodeBuild</key>
44+
<string>16B40</string>
45+
<key>LSMinimumSystemVersion</key>
46+
<string>10.15</string>
47+
<key>NSBluetoothAlwaysUsageDescription</key>
48+
<string>Our app uses bluetooth to find, connect and transfer data between different devices</string>
49+
<key>NSBluetoothPeripheralUsageDescription</key>
50+
<string></string>
51+
</dict>
52+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>files</key>
6+
<dict>
7+
<key>Resources/Info.plist</key>
8+
<data>
9+
fQHYkAnYLSPrp1z1w0a3qxFKxyQ=
10+
</data>
11+
</dict>
12+
<key>files2</key>
13+
<dict>
14+
<key>Resources/Info.plist</key>
15+
<dict>
16+
<key>hash2</key>
17+
<data>
18+
XLFdl8kPs0fAIPEdwbTkiG3FK/t6WrvGYQQfdx39EOs=
19+
</data>
20+
</dict>
21+
</dict>
22+
<key>rules</key>
23+
<dict>
24+
<key>^Resources/</key>
25+
<true/>
26+
<key>^Resources/.*\.lproj/</key>
27+
<dict>
28+
<key>optional</key>
29+
<true/>
30+
<key>weight</key>
31+
<real>1000</real>
32+
</dict>
33+
<key>^Resources/.*\.lproj/locversion.plist$</key>
34+
<dict>
35+
<key>omit</key>
36+
<true/>
37+
<key>weight</key>
38+
<real>1100</real>
39+
</dict>
40+
<key>^Resources/Base\.lproj/</key>
41+
<dict>
42+
<key>weight</key>
43+
<real>1010</real>
44+
</dict>
45+
<key>^version.plist$</key>
46+
<true/>
47+
</dict>
48+
<key>rules2</key>
49+
<dict>
50+
<key>.*\.dSYM($|/)</key>
51+
<dict>
52+
<key>weight</key>
53+
<real>11</real>
54+
</dict>
55+
<key>^(.*/)?\.DS_Store$</key>
56+
<dict>
57+
<key>omit</key>
58+
<true/>
59+
<key>weight</key>
60+
<real>2000</real>
61+
</dict>
62+
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
63+
<dict>
64+
<key>nested</key>
65+
<true/>
66+
<key>weight</key>
67+
<real>10</real>
68+
</dict>
69+
<key>^.*</key>
70+
<true/>
71+
<key>^Info\.plist$</key>
72+
<dict>
73+
<key>omit</key>
74+
<true/>
75+
<key>weight</key>
76+
<real>20</real>
77+
</dict>
78+
<key>^PkgInfo$</key>
79+
<dict>
80+
<key>omit</key>
81+
<true/>
82+
<key>weight</key>
83+
<real>20</real>
84+
</dict>
85+
<key>^Resources/</key>
86+
<dict>
87+
<key>weight</key>
88+
<real>20</real>
89+
</dict>
90+
<key>^Resources/.*\.lproj/</key>
91+
<dict>
92+
<key>optional</key>
93+
<true/>
94+
<key>weight</key>
95+
<real>1000</real>
96+
</dict>
97+
<key>^Resources/.*\.lproj/locversion.plist$</key>
98+
<dict>
99+
<key>omit</key>
100+
<true/>
101+
<key>weight</key>
102+
<real>1100</real>
103+
</dict>
104+
<key>^Resources/Base\.lproj/</key>
105+
<dict>
106+
<key>weight</key>
107+
<real>1010</real>
108+
</dict>
109+
<key>^[^/]+$</key>
110+
<dict>
111+
<key>nested</key>
112+
<true/>
113+
<key>weight</key>
114+
<real>10</real>
115+
</dict>
116+
<key>^embedded\.provisionprofile$</key>
117+
<dict>
118+
<key>weight</key>
119+
<real>20</real>
120+
</dict>
121+
<key>^version\.plist$</key>
122+
<dict>
123+
<key>weight</key>
124+
<real>20</real>
125+
</dict>
126+
</dict>
127+
</dict>
128+
</plist>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
A

ShimmerPCBasicExamples/src/main/java/com/shimmerresearch/simpleexamples/SensorMapsExample.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,12 @@ public class SensorMapsExample extends BasicProcessWithCallBack {
9090
* @wbp.parser.entryPoint
9191
*/
9292
public void initialize() {
93-
//Set the default port to 50052, this is used if the software cannot start the gRPC server automatically
94-
BasicShimmerBluetoothManagerPc.mGRPCPort = 50052;
93+
//Set the default port to 500XX, this is used if the software cannot start the gRPC server automatically
94+
if(UtilShimmer.isOsMac()) {
95+
BasicShimmerBluetoothManagerPc.mGRPCPort = 50000; //the bundled /libs/ShimmerBLEGrpc/ for Mac uses port 50000
96+
} else {
97+
BasicShimmerBluetoothManagerPc.mGRPCPort = 50052;
98+
}
9599

96100
frame = new JFrame("Shimmer SensorMaps Example");
97101
frame.setBounds(100, 100, 1200, 591);

0 commit comments

Comments
 (0)