Class DeviceState
- Namespace
- Harp.StepperDriver
- Assembly
- Harp.StepperDriver.dll
Represents a register that contains the state of the device.
public class DeviceState
- Inheritance
-
DeviceState
- Inherited Members
Fields
Address
Represents the address of the DeviceState register. This field is constant.
public const int Address = 79
Field Value
RegisterLength
Represents the length of the DeviceState register. This field is constant.
public const int RegisterLength = 1
Field Value
RegisterType
Represents the payload type of the DeviceState register. This field is constant.
public const PayloadType RegisterType = U8
Field Value
Methods
FromPayload(MessageType, DeviceStateMode)
Returns a Harp message for the DeviceState register.
public static HarpMessage FromPayload(MessageType messageType, DeviceStateMode value)
Parameters
messageType
MessageTypeThe type of the Harp message.
value
DeviceStateModeThe value to be stored in the message payload.
Returns
- HarpMessage
A HarpMessage object for the DeviceState register with the specified message type and payload.
FromPayload(double, MessageType, DeviceStateMode)
Returns a timestamped Harp message for the DeviceState register.
public static HarpMessage FromPayload(double timestamp, MessageType messageType, DeviceStateMode value)
Parameters
timestamp
doubleThe timestamp of the message payload, in seconds.
messageType
MessageTypeThe type of the Harp message.
value
DeviceStateModeThe value to be stored in the message payload.
Returns
- HarpMessage
A HarpMessage object for the DeviceState register with the specified message type, timestamp, and payload.
GetPayload(HarpMessage)
Returns the payload data for DeviceState register messages.
public static DeviceStateMode GetPayload(HarpMessage message)
Parameters
message
HarpMessageA HarpMessage object representing the register message.
Returns
- DeviceStateMode
A value representing the message payload.
GetTimestampedPayload(HarpMessage)
Returns the timestamped payload data for DeviceState register messages.
public static Timestamped<DeviceStateMode> GetTimestampedPayload(HarpMessage message)
Parameters
message
HarpMessageA HarpMessage object representing the register message.
Returns
- Timestamped<DeviceStateMode>
A value representing the timestamped message payload.