12345678910111213141516171819202122232425262728293031 |
- use crate::cmd::config::EMU_CONFIG;
- use crate::ems::service::Service;
- use anyhow::Error;
- use std::time::Duration;
- use tokio::task::JoinHandle;
- pub struct Pcs {}
- impl Pcs {
- /// 初始化PCS
- pub fn new() -> Self {
- println!("PCS初始化成功");
- Pcs {}
- }
- // pub fn read(&self){
- //
- // }
- }
- impl Service for Pcs {
- fn run(&self) -> Result<JoinHandle<()>, Error> {
- let handle = tokio::spawn(async {
- let emu_config = EMU_CONFIG.get();
- loop {
- tokio::time::sleep(Duration::from_millis(1)).await;
- }
- });
- Ok(handle)
- }
- }
|