-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config nodes and GetProperty, naming cleanup
- Loading branch information
Showing
9 changed files
with
254 additions
and
127 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using Microsoft.Extensions.Logging; | ||
using System.Reactive.Disposables; | ||
using System.Reactive.Linq; | ||
|
||
namespace VL.Devices.IDS | ||
{ | ||
[ProcessNode(Name = "AvailableProperties")] | ||
public class AvailableProperties : IDisposable | ||
{ | ||
private readonly ILogger logger; | ||
private readonly SerialDisposable serialDisposable = new(); | ||
|
||
public AvailableProperties([Pin(Visibility = Model.PinVisibility.Hidden)] NodeContext nodeContext) | ||
{ | ||
logger = nodeContext.GetLogger(); | ||
} | ||
|
||
public void Update( | ||
VideoIn? input, | ||
out Spread<string> properties) | ||
{ | ||
if (input is null) | ||
{ | ||
properties = Spread<string>.Empty; | ||
return; | ||
} | ||
properties = input.PropertyInfos.Select(x => x.Name).ToSpread(); | ||
return; | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
serialDisposable.Dispose(); | ||
} | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using Microsoft.Extensions.Logging; | ||
using System.Reactive.Disposables; | ||
using System.Reactive.Linq; | ||
|
||
namespace VL.Devices.IDS | ||
{ | ||
[ProcessNode(Name = "GetProperty")] | ||
public class GetProperty : IDisposable | ||
{ | ||
private readonly ILogger logger; | ||
private readonly SerialDisposable serialDisposable = new(); | ||
|
||
public GetProperty([Pin(Visibility = Model.PinVisibility.Hidden)] NodeContext nodeContext) | ||
{ | ||
logger = nodeContext.GetLogger(); | ||
} | ||
|
||
public void Update( | ||
VideoIn? input, | ||
string name, | ||
out PropertyInfo? propertyInfo) | ||
{ | ||
if (input is null) | ||
{ | ||
propertyInfo = null; | ||
return; | ||
} | ||
propertyInfo = input.PropertyInfos.FirstOrDefault(x => x.Name == name); | ||
return; | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
serialDisposable.Dispose(); | ||
} | ||
} | ||
} |
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
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
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
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