Class ObserverExtensions
Extensions for the Observer enum.
Inherited Members
Namespace: NixUniversalSDK
Assembly: NixUniversalSDK.dll
Syntax
public static class ObserverExtensions
Methods
GetFOV(Observer)
Field of view (i.e. - 2 or 10)
Declaration
public static int GetFOV(this Observer observer)
Parameters
Type | Name | Description |
---|---|---|
Observer | observer |
Returns
Type | Description |
---|---|
int |
GetFullName(Observer)
Full name for display in UI (e.g. - '2°' for CIE1931)
Declaration
public static string GetFullName(this Observer observer)
Parameters
Type | Name | Description |
---|---|---|
Observer | observer |
Returns
Type | Description |
---|---|
string |
GetObserver(byte)
Helper to provide the Observer enum for a particular byte value. If an invalid value is provided, None is returned.
Declaration
public static Observer GetObserver(this byte value)
Parameters
Type | Name | Description |
---|---|---|
byte | value | Byte value of the given observer |
Returns
Type | Description |
---|---|
Observer | Observer enum corresponding to the provided byte |
GetObserver(int)
Helper to provide the Observer enum for a particular observer field-of-view (FOV). Valid options are 2 and 10; if an invalid value is provided, None is returned.
Declaration
public static Observer GetObserver(this int fov)
Parameters
Type | Name | Description |
---|---|---|
int | fov | Field of view (2 or 10 degrees) |
Returns
Type | Description |
---|---|
Observer | Observer enum corresponding to the provided FOV |
GetObserver(string)
Helper to provide the Observer enum for a particular observer name. If an invalid name is provided, None is returned.
Declaration
public static Observer GetObserver(this string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Full name of the given observer |
Returns
Type | Description |
---|---|
Observer | Observer enum corresponding to the provided name |