Struct razberry::response::DataResponse
[−]
[src]
pub struct DataResponse { /* fields omitted */ }
XXX: DEPRECATED. A response from Razberry's /ZWaveAPI/Data endpoint.
Methods
impl DataResponse
[src]
XXX: DEPRECATED.
fn new(json: Json) -> DataResponse
fn from_str(raw_response: &str) -> Result<DataResponse, ParseError>
fn get_timestamp(&self) -> Option<Timestamp>
Get the timestamp when the response was generated.
fn is_full_response(&self) -> bool
Whether the response payload is "full", ie. contains all state information. When the endpoint is called without a timestamp, it returns a full state dump response.
fn get_burglar_alarm(
&self,
device: u8,
instance: u8
) -> Option<BurglarAlarmData>
&self,
device: u8,
instance: u8
) -> Option<BurglarAlarmData>
Get "burglar alarm" sensor data from the results, if present.
fn get_general_purpose_binary(
&self,
device: u8,
instance: u8
) -> Option<GeneralPurposeBinaryData>
&self,
device: u8,
instance: u8
) -> Option<GeneralPurposeBinaryData>
Get the "general purpose" (0x01) binary sensor (0x30) data, if present.
fn get_json(&self) -> &Json
Get a reference to the underlying Json.