use cc_talk_core::cc_talk::Category;
use super::{
command::{BelongsTo, CommandSet},
core::CoreCommandSet,
core_plus::CorePlusCommandSet,
multi_drop::MdbCommandSet,
};
pub mod device_commands;
pub struct CoinAcceptorCommandSet;
impl CommandSet for CoinAcceptorCommandSet {
const NAME: &'static str = "Coin Acceptor";
fn is_compatible_with(category: Category) -> bool {
category == Category::CoinAcceptor
}
}
impl BelongsTo<CoinAcceptorCommandSet> for CoreCommandSet {}
impl BelongsTo<CoinAcceptorCommandSet> for CorePlusCommandSet {}
impl BelongsTo<CoinAcceptorCommandSet> for MdbCommandSet {}
pub struct PayoutCommandSet;
impl CommandSet for PayoutCommandSet {
const NAME: &'static str = "Payout";
fn is_compatible_with(category: Category) -> bool {
category == Category::Payout
}
}
impl BelongsTo<PayoutCommandSet> for CoreCommandSet {}
impl BelongsTo<PayoutCommandSet> for CorePlusCommandSet {}
impl BelongsTo<PayoutCommandSet> for MdbCommandSet {}
pub struct BillValidatorCommandSet;
impl CommandSet for BillValidatorCommandSet {
const NAME: &'static str = "Bill Validator";
fn is_compatible_with(category: Category) -> bool {
category == Category::BillValidator
}
}
pub struct ChangerEscrowCommandSet;
impl CommandSet for ChangerEscrowCommandSet {
const NAME: &'static str = "Changer/Escrow";
fn is_compatible_with(category: Category) -> bool {
matches!(category, Category::Changer | Category::Escrow,)
}
}