Add basic traits and implementation for configuration models
@@ -102,14 +102,9 @@ impl Message for ConfigurationMessage {
}
}
+#[derive(Clone, Debug, Default)]
pub struct ConfigurationServer;
-impl Default for ConfigurationServer {
- fn default() -> Self {
- Self
- }
-}
-
impl Model for ConfigurationServer {
const IDENTIFIER: ModelIdentifier = CONFIGURATION_SERVER;
const SUPPORTS_SUBSCRIPTION: bool = false;
@@ -185,6 +180,23 @@ impl Model for ConfigurationServer {
}
}
+#[derive(Clone, Debug, Default)]
+pub struct ConfigurationClient;
+
+impl Model for ConfigurationClient {
+ const IDENTIFIER: ModelIdentifier = CONFIGURATION_CLIENT;
+ const SUPPORTS_SUBSCRIPTION: bool = false;
+ const SUPPORTS_PUBLICATION: bool = false;
+ type Message<'m> = ConfigurationMessage;
+
+ fn parse<'m>(
+ _opcode: Opcode,
+ _parameters: &'m [u8],
+ ) -> Result<Option<Self::Message<'m>>, ParseError> {
+ todo!();
+ }
+}
+
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
