use super::{Command, CommandType, Response};
use adapter::Adapter;
use session::{Session, SessionError};
pub fn blink<A: Adapter>(session: &mut Session<A>, num_seconds: u8) -> Result<(), SessionError> {
session.send_command(BlinkCommand { num_seconds })?;
Ok(())
}
#[derive(Serialize, Deserialize, Debug)]
pub(crate) struct BlinkCommand {
pub num_seconds: u8,
}
impl Command for BlinkCommand {
type ResponseType = BlinkResponse;
}
#[derive(Serialize, Deserialize, Debug)]
pub(crate) struct BlinkResponse {}
impl Response for BlinkResponse {
const COMMAND_TYPE: CommandType = CommandType::Blink;
}