Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We don't have a friendly way to have message requests by ID #19

Open
patrickelectric opened this issue Apr 9, 2024 · 1 comment
Open
Assignees

Comments

@patrickelectric
Copy link
Member

We should create an enum that provides all messages id per device

@patrickelectric patrickelectric self-assigned this Apr 9, 2024
@RaulTrombin
Copy link
Member

actually:
To build a request message:

let request =
           common::Messages::GeneralRequest(common::GeneralRequestStruct { requested_id: 1201 });
       let mut package = message::ProtocolMessage::new();
       package.set_message(&request);
       self.get_mut_common().send_message(package).await;

Suggestion:
device.send( ping1d::request() ) .await. expect("failed somehow");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants