OperationalStatePropertyClean Method
Namespace: ASCOM.Common.DeviceInterfacesAssembly: ASCOM.Common (in ASCOM.Common.dll) Version: 3.0.0-rc.1+86c25ce733aebb4d8b1b8a62e84770ea5e972bea
public static List<StateValue> Clean(
List<StateValue> deviceState,
DeviceTypes deviceType,
ILogger logger = null
)
Public Shared Function Clean (
deviceState As List(Of StateValue),
deviceType As DeviceTypes,
Optional logger As ILogger = Nothing
) As List(Of StateValue)
- deviceState ListStateValue
- List of device state values returned by the device
- deviceType DeviceTypes
- The device type (Camera,Telescope etc.)
- logger ILogger (Optional)
- Optional ILogger instance to receive operational log messages (defaults to null)
ListStateValueA cleaned list of device state values
When de-serialising StateValue objects in a DeviceState response, System.Text.JSON returns the
Value property as type
JsonElement
rather than the type sent by the device, which may have been
int,
double,
string,
DateTime etc.
This method parses a list of
StateValue objects and converts all
JsonElement types in
Value to the expected data type.
Supported in: 2.0