com.shinolab.autd3-sdk 0.14.1 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Client.cs CHANGED
@@ -22,7 +22,8 @@ namespace AUTD3
22
22
  public bool IsPatternMode => NativeClient.autd3_fpga_state_is_pattern_mode(Raw);
23
23
  public bool IsPatternStopped => NativeClient.autd3_fpga_state_is_pattern_stopped(Raw);
24
24
  public bool IsModStopped => NativeClient.autd3_fpga_state_is_mod_stopped(Raw);
25
- public bool IsTransitionPending => NativeClient.autd3_fpga_state_is_transition_pending(Raw);
25
+ public bool IsPatternTransitionPending => NativeClient.autd3_fpga_state_is_pattern_transition_pending(Raw);
26
+ public bool IsModTransitionPending => NativeClient.autd3_fpga_state_is_mod_transition_pending(Raw);
26
27
  }
27
28
 
28
29
  public readonly struct Version : IEquatable<Version>
package/Datagram.cs CHANGED
@@ -1,24 +1,11 @@
1
1
  using System;
2
- using System.Collections;
3
2
  using System.Collections.Generic;
4
3
 
5
4
  namespace AUTD3
6
5
  {
7
6
 
8
7
 
9
- public readonly struct Frame
10
- {
11
- internal Frames Frames { get; }
12
- internal UIntPtr Index { get; }
13
-
14
- internal Frame(Frames frames, int index)
15
- {
16
- Frames = frames;
17
- Index = (UIntPtr)index;
18
- }
19
- }
20
-
21
- public sealed class Frames : IDisposable, IEnumerable<Frame>
8
+ public sealed class Frames : IDisposable
22
9
  {
23
10
  private readonly FramesHandle _handle;
24
11
 
@@ -97,29 +84,6 @@ namespace AUTD3
97
84
 
98
85
  public bool IsEmpty => Length == 0;
99
86
 
100
- public Frame this[int index]
101
- {
102
- get
103
- {
104
- if (index < 0 || index >= Length)
105
- {
106
- throw new ArgumentOutOfRangeException(nameof(index));
107
- }
108
- return new Frame(this, index);
109
- }
110
- }
111
-
112
- public IEnumerator<Frame> GetEnumerator()
113
- {
114
- var count = Length;
115
- for (var i = 0; i < count; i++)
116
- {
117
- yield return new Frame(this, i);
118
- }
119
- }
120
-
121
- IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
122
-
123
87
  public void Dispose() => _handle.Dispose();
124
88
  }
125
89
  }
package/Native.cs CHANGED
@@ -55,7 +55,11 @@ namespace AUTD3
55
55
 
56
56
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
57
57
  [return: MarshalAs(UnmanagedType.I1)]
58
- internal static extern bool autd3_fpga_state_is_transition_pending(byte raw);
58
+ internal static extern bool autd3_fpga_state_is_pattern_transition_pending(byte raw);
59
+
60
+ [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
61
+ [return: MarshalAs(UnmanagedType.I1)]
62
+ internal static extern bool autd3_fpga_state_is_mod_transition_pending(byte raw);
59
63
 
60
64
 
61
65
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
Binary file
Binary file
package/Stm.cs CHANGED
@@ -69,18 +69,12 @@ namespace AUTD3
69
69
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
70
70
  internal static extern IntPtr autd3_op_write_foci_buffer(byte bank, uint startIndex, Autd3StmControlPointNative[] points, UIntPtr numSamples, byte numFoci, byte[] intensities);
71
71
 
72
- [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
73
- internal static extern UIntPtr autd3_op_write_foci_buffer_max_len(byte numFoci);
74
-
75
72
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
76
73
  internal static extern IntPtr autd3_op_pattern_stm(ushort configDivide, IntPtr[] phases, UIntPtr numPatterns, byte intensityKind, IntPtr[] intensities, UIntPtr numIntensities, byte uniformIntensity, byte bank, byte phaseDepth, ushort loopRep, byte transitionMode, ulong transitionValue);
77
74
 
78
75
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
79
76
  internal static extern IntPtr autd3_op_write_pattern_buffer(byte bank, ushort startIndex, IntPtr[] phases, UIntPtr numPatterns, byte intensityKind, IntPtr[] intensities, UIntPtr numIntensities, byte uniformIntensity);
80
77
 
81
- [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
82
- internal static extern UIntPtr autd3_op_write_pattern_buffer_max_len();
83
-
84
78
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
85
79
  internal static extern float autd3_foci_stm_option_default_sound_speed();
86
80
  }
@@ -218,8 +212,6 @@ namespace AUTD3
218
212
 
219
213
  public sealed class WritePatternBuffer : ICommand
220
214
  {
221
- public static readonly int MaxLen = (int)NativeStm.autd3_op_write_pattern_buffer_max_len();
222
-
223
215
  private readonly PatternBank _bank;
224
216
  private readonly ushort _startIndex;
225
217
  private readonly PhaseBuffer[] _patterns;
@@ -295,15 +287,6 @@ namespace AUTD3
295
287
  private readonly uint _startIndex;
296
288
  private readonly IReadOnlyList<ControlPoints> _points;
297
289
 
298
- public static int MaxLen(int numFoci)
299
- {
300
- if (numFoci < 1 || numFoci > Params.NumFociMax)
301
- {
302
- throw new Autd3Exception($"number of foci per sample must be 1..={Params.NumFociMax}", Autd3ErrorCode.InvalidArgument);
303
- }
304
- return (int)NativeStm.autd3_op_write_foci_buffer_max_len((byte)numFoci);
305
- }
306
-
307
290
  public WriteFociBuffer(PatternBank bank, uint startIndex, IReadOnlyList<ControlPoints> points)
308
291
  {
309
292
  _bank = bank;
@@ -1179,9 +1179,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
1179
1179
 
1180
1180
  Used by:
1181
1181
 
1182
- - autd3-rs 0.14.1 — https://github.com/shinolab/autd3-sdk
1183
- - autd3-rs-core 0.14.1 — https://github.com/shinolab/autd3-sdk
1184
- - autd3-cpu-wire 0.14.0 — https://github.com/shinolab/autd3-sdk
1182
+ - autd3-rs 0.15.0 — https://github.com/shinolab/autd3-sdk
1183
+ - autd3-rs-core 0.15.0 — https://github.com/shinolab/autd3-sdk
1184
+ - autd3-cpu-wire 0.15.0 — https://github.com/shinolab/autd3-sdk
1185
1185
 
1186
1186
  ```
1187
1187
  MIT License
@@ -1212,8 +1212,8 @@ SOFTWARE.
1212
1212
 
1213
1213
  Used by:
1214
1214
 
1215
- - autd3-ffi 0.14.1 — https://github.com/shinolab/autd3-sdk
1216
- - autd3-ffi-abi 0.14.1 — https://github.com/shinolab/autd3-sdk
1215
+ - autd3-ffi 0.15.0 — https://github.com/shinolab/autd3-sdk
1216
+ - autd3-ffi-abi 0.15.0 — https://github.com/shinolab/autd3-sdk
1217
1217
  - windows-link 0.2.1 — https://github.com/microsoft/windows-rs
1218
1218
  - windows-sys 0.61.2 — https://github.com/microsoft/windows-rs
1219
1219
 
package/Udp.cs CHANGED
@@ -6,7 +6,6 @@ namespace AUTD3
6
6
  [StructLayout(LayoutKind.Sequential)]
7
7
  internal struct TransportOptionNative
8
8
  {
9
- public ulong OpenTimeoutNs;
10
9
  public ulong SendBufferBytes;
11
10
  public byte SyncOnOpen;
12
11
  public byte HasHeartbeatInterval;
@@ -15,7 +14,6 @@ namespace AUTD3
15
14
 
16
15
  internal static class TransportOptionDefaults
17
16
  {
18
- internal static readonly TimeSpan OpenTimeout;
19
17
  internal static readonly ulong? SendBufferBytes;
20
18
  internal static readonly bool SyncOnOpen;
21
19
  internal static readonly TimeSpan? HeartbeatInterval;
@@ -23,7 +21,6 @@ namespace AUTD3
23
21
  static TransportOptionDefaults()
24
22
  {
25
23
  OptionNative.Apply("preset", NativeClient.autd3_transport_option_default(out var native));
26
- OpenTimeout = OptionNative.FromNanos(native.OpenTimeoutNs);
27
24
  SendBufferBytes = native.SendBufferBytes == 0 ? null : native.SendBufferBytes;
28
25
  SyncOnOpen = native.SyncOnOpen != 0;
29
26
  HeartbeatInterval = OptionNative.FromOptionalNanos(native.HasHeartbeatInterval, native.HeartbeatIntervalNs);
@@ -38,9 +35,6 @@ namespace AUTD3
38
35
 
39
36
  public Interface Iface { get; init; }
40
37
 
41
- private readonly TimeSpan? _openTimeout;
42
- public TimeSpan OpenTimeout { get => _openTimeout ?? TransportOptionDefaults.OpenTimeout; init => _openTimeout = value; }
43
-
44
38
  private readonly bool _sendBufferBytesSet;
45
39
  private readonly ulong? _sendBufferBytes;
46
40
 
@@ -81,7 +75,6 @@ namespace AUTD3
81
75
 
82
76
  internal TransportOptionNative ToNative() => new TransportOptionNative
83
77
  {
84
- OpenTimeoutNs = OptionNative.RequiredNanos("openTimeout", OpenTimeout),
85
78
  SendBufferBytes = SendBufferBytes switch
86
79
  {
87
80
  null => 0,
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "git+https://github.com/shinolab/autd3-sdk.git",
6
6
  "directory": "bindings/unity/com.shinolab.autd3-sdk"
7
7
  },
8
- "version": "0.14.1",
8
+ "version": "0.15.0",
9
9
  "displayName": "AUTD3",
10
10
  "description": "AUTD3 client, datagrams and STM (Unity binding).",
11
11
  "unity": "6000.0",
@@ -15,9 +15,9 @@
15
15
  "url": "https://github.com/shinolab"
16
16
  },
17
17
  "dependencies": {
18
- "com.shinolab.autd3-sdk.core": "0.14.1",
19
- "com.shinolab.autd3-sdk.pattern": "0.14.1",
20
- "com.shinolab.autd3-sdk.modulation": "0.14.1"
18
+ "com.shinolab.autd3-sdk.core": "0.15.0",
19
+ "com.shinolab.autd3-sdk.pattern": "0.15.0",
20
+ "com.shinolab.autd3-sdk.modulation": "0.15.0"
21
21
  },
22
22
  "samples": [
23
23
  {