@@ -58,7 +58,6 @@ public IPAddress IPAddress
5858
5959 internal bHapticsConnection ( ) { }
6060
61-
6261 public bHapticsConnection ( string id , string name , bool tryToReconnect = true , int maxRetries = 5 )
6362 : this ( IPAddress . Loopback , id , name , tryToReconnect , maxRetries ) { }
6463
@@ -156,14 +155,22 @@ public bHapticsStatus Status
156155 #endregion
157156
158157 #region Device
158+ /// <summary>Gets the total amount of devices currently connected to the bHaptics Player</summary>
159+ /// <returns>The total amount of devices currently connected to the bHaptics Player</returns>
159160 public int GetConnectedDeviceCount ( ) => Socket ? . LastResponse ? . ConnectedDeviceCount ?? 0 ;
161+
162+ /// <summary>Gets if a specific device is currently connected to the bHaptics Player</summary>
163+ /// <returns>true if the device is connected, otherwise false</returns>
160164 public bool IsDeviceConnected ( PositionID type )
161165 {
162166 if ( ( type == PositionID . VestFront )
163167 || ( type == PositionID . VestBack ) )
164168 type = PositionID . Vest ;
165169 return Socket ? . LastResponse ? . ConnectedPositions ? . ContainsValue ( type . ToPacketString ( ) ) ?? false ;
166170 }
171+
172+ /// <summary>Gets the current status a specific device.</summary>
173+ /// <returns>An Integer Array containing the current intensity value for each motor of the device</returns>
167174 public int [ ] GetDeviceStatus ( PositionID type )
168175 {
169176 if ( ( Socket == null )
@@ -201,17 +208,27 @@ public int[] GetDeviceStatus(PositionID type)
201208 #endregion
202209
203210 #region IsPlaying
211+ /// <summary>Gets if a specified pattern is currently playing</summary>
212+ /// <param name="key">The key id of the pattern</param>
213+ /// <returns>true if the specified pattern is playing, otherwise false</returns>
204214 public bool IsPlaying ( string key ) => Socket ? . LastResponse ? . ActiveKeys ? . ContainsValue ( key ) ?? false ;
215+
216+ /// <summary>Gets if any pattern is currently playing</summary>
217+ /// <returns>true if any pattern is playing, otherwise false</returns>
205218 public bool IsPlayingAny ( ) => ( Socket ? . LastResponse ? . ActiveKeys ? . Count > 0 ) ;
206219 #endregion
207220
208221 #region StopPlaying
222+ /// <summary>Stops the specified pattern</summary>
223+ /// <param name="key">The key id of the pattern</param>
209224 public void StopPlaying ( string key )
210225 {
211226 if ( ! IsAlive ( ) || ! IsConnected ( ) )
212227 return ;
213228 SubmitQueue . Enqueue ( new SubmitRequest { key = key , type = "turnOff" } ) ;
214229 }
230+
231+ /// <summary>Stops all currently playing patterns</summary>
215232 public void StopPlayingAll ( )
216233 {
217234 if ( ! IsAlive ( ) || ! IsConnected ( ) )
@@ -221,8 +238,14 @@ public void StopPlayingAll()
221238 #endregion
222239
223240 #region PatternRegister
241+ /// <summary>Checks if the specified pattern is Registered in the Cache</summary>
242+ /// <param name="key">The key id of the pattern</param>
243+ /// <returns>true if Registered, otherwise false</returns>
224244 public bool IsPatternRegistered ( string key ) => Socket ? . LastResponse ? . RegisteredKeys ? . ContainsValue ( key ) ?? false ;
225245
246+ /// <summary>Registers a pattern from file path in the cache</summary>
247+ /// <param name="key">The key id of the pattern</param>
248+ /// <param name="tactFilePath">The file path of the pattern</param>
226249 public void RegisterPatternFromFile ( string key , string tactFilePath )
227250 {
228251 if ( ! File . Exists ( tactFilePath ) )
@@ -231,22 +254,28 @@ public void RegisterPatternFromFile(string key, string tactFilePath)
231254 RegisterPatternFromJson ( key , File . ReadAllText ( tactFilePath ) ) ;
232255 }
233256
234- public void RegisterPatternFromJson ( string key , string tactFileStr )
257+ /// <summary>Registers a pattern from raw json in the cache</summary>
258+ /// <param name="key">The key id of the pattern</param>
259+ /// <param name="tactFileJson">The raw json of the pattern</param>
260+ public void RegisterPatternFromJson ( string key , string tactFileJson )
235261 {
236262 if ( string . IsNullOrEmpty ( key ) )
237263 return ; // To-Do: Exception Here
238264
239- if ( string . IsNullOrEmpty ( tactFileStr ) )
265+ if ( string . IsNullOrEmpty ( tactFileJson ) )
240266 return ; // To-Do: Exception Here
241267
242268 RegisterRequest request = new RegisterRequest ( ) ;
243269 request . key = key ;
244- request . project = JSON . Parse ( tactFileStr ) [ nameof ( request . project ) ] . AsObject ;
270+ request . project = JSON . Parse ( tactFileJson ) [ nameof ( request . project ) ] . AsObject ;
245271
246272 RegisterCache . Add ( request ) ;
247273 RegisterQueue . Enqueue ( request ) ;
248274 }
249275
276+ /// <summary>Registers a pattern swapped from file path in the cache</summary>
277+ /// <param name="key">The key id of the pattern</param>
278+ /// <param name="tactFilePath">The file path of the pattern</param>
250279 public void RegisterPatternSwappedFromFile ( string key , string tactFilePath )
251280 {
252281 if ( ! File . Exists ( tactFilePath ) )
@@ -255,18 +284,21 @@ public void RegisterPatternSwappedFromFile(string key, string tactFilePath)
255284 RegisterPatternSwappedFromJson ( key , File . ReadAllText ( tactFilePath ) ) ;
256285 }
257286
258- public void RegisterPatternSwappedFromJson ( string key , string tactFileStr )
287+ /// <summary>Registers a pattern swapped from raw json in the cache</summary>
288+ /// <param name="key">The key id of the pattern</param>
289+ /// <param name="tactFileJson">The raw json of the pattern</param>
290+ public void RegisterPatternSwappedFromJson ( string key , string tactFileJson )
259291 {
260292 if ( string . IsNullOrEmpty ( key ) )
261293 return ; // To-Do: Exception Here
262294
263- if ( string . IsNullOrEmpty ( tactFileStr ) )
295+ if ( string . IsNullOrEmpty ( tactFileJson ) )
264296 return ; // To-Do: Exception Here
265297
266298 RegisterRequest request = new RegisterRequest ( ) ;
267299 request . key = key ;
268300
269- JSONObject project = JSON . Parse ( tactFileStr ) [ nameof ( project ) ] . AsObject ;
301+ JSONObject project = JSON . Parse ( tactFileJson ) [ nameof ( project ) ] . AsObject ;
270302 JSONArray tracks = project [ nameof ( tracks ) ] . AsArray ;
271303 LoopTracks ( tracks , ( effect ) =>
272304 {
@@ -304,6 +336,15 @@ private static void LoopTracks(JSONArray tracks, Action<JSONObject> act)
304336 #endregion
305337
306338 #region Play
339+ /// <summary>Plays a pattern</summary>
340+ /// <typeparam name="A">DotPoint Collection Type</typeparam>
341+ /// <typeparam name="B">PathPoint Collection Type</typeparam>
342+ /// <param name="key">Key id of this pattern</param>
343+ /// <param name="durationMillis">Duration of Playback</param>
344+ /// <param name="position">Position for Playback</param>
345+ /// <param name="dotPoints">Collection of int, byte, or DotPoint</param>
346+ /// <param name="pathPoints">Collection of PathPoint</param>
347+ /// <param name="dotMirrorDirection">Direction to Mirror Playback</param>
307348 public void Play < A , B > (
308349 string key ,
309350 int durationMillis ,
@@ -389,6 +430,11 @@ public void Play<A, B>(
389430 #endregion
390431
391432 #region PlayRegistered
433+ /// <summary>Plays a registered pattern from the Cache</summary>
434+ /// <param name="key">Key id of this pattern</param>
435+ /// <param name="altKey">Alternative Key id of this pattern, can be null</param>
436+ /// <param name="scaleOption">Custom Playback Scale Option, can be null</param>
437+ /// <param name="rotationOption">Custom Playback Rotation Option, can be null</param>
392438 public void PlayRegistered ( string key , string altKey = null , ScaleOption scaleOption = null , RotationOption rotationOption = null )
393439 {
394440 if ( ! IsAlive ( ) )
@@ -407,6 +453,10 @@ public void PlayRegistered(string key, string altKey = null, ScaleOption scaleOp
407453
408454 SubmitQueue . Enqueue ( request ) ;
409455 }
456+
457+ /// <summary>Plays a registered pattern from the Cache</summary>
458+ /// <param name="key">Key id of this pattern</param>
459+ /// <param name="startTimeMillis">Playback Start Time Delay in Milliseconds</param>
410460 public void PlayRegisteredMillis ( string key , int startTimeMillis = 0 )
411461 {
412462 if ( ! IsAlive ( ) )
0 commit comments