pub fn usp_operate_response<'a>(
    result: Vec<(&'a str, OperationResponse<'a>)>
) -> Body<'a>
Expand description

Creates a body for a USP Msg with a USP OperateResp response

§Arguments

  • result - The result of an operation

§Example

use rusp::usp_generator::{usp_operate_response, OperationResponse};

let resp_output_args = OperationResponse::Sync(vec![("Foo", "Bar")]);
let resp_error = OperationResponse::Error(7000, "Message failed");
let resp = usp_operate_response(vec![
        ("Device.Command()", resp_output_args),
        ("Device.Command()", resp_error),
    ]);